diff --git a/chains.png b/chains.png index f657a4d..439e8c9 100644 Binary files a/chains.png and b/chains.png differ diff --git a/package.json b/package.json index 814a173..dd4186d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stabilitydao/stability", - "version": "0.21.1", + "version": "0.21.2", "description": "Stability Integration Library", "main": "out/index.js", "types": "out/index.d.ts", diff --git a/src/assets.ts b/src/assets.ts index f7418b3..cc23517 100644 --- a/src/assets.ts +++ b/src/assets.ts @@ -17,7 +17,13 @@ export const assets: Asset[] = [ "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA", "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", ], - "111188": ["0xc518A88c67CECA8B3f24c4562CB71deeB2AF86B7"], + "111188": "0xc518A88c67CECA8B3f24c4562CB71deeB2AF86B7", + "1": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "42161": [ + "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8", + "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + ], + "42420": "0x2B7C1342Cc64add10B2a79C8f9767d2667DE64B2", }, symbol: "USDC", description: @@ -29,6 +35,9 @@ export const assets: Asset[] = [ addresses: { "137": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f", "8453": "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2", + "1": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "42161": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9", + "42420": "0x26E490d30e73c36800788DC6d6315946C4BbEa24", }, symbol: "USDT", description: @@ -41,6 +50,8 @@ export const assets: Asset[] = [ "137": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063", "8453": "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb", "111188": "0x75d0cBF342060b14c2fC756fd6E717dFeb5B1B70", + "1": "0x6B175474E89094C44Da98b954EedeAC495271d0F", + "42161": "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1", }, symbol: "DAI", description: @@ -62,6 +73,9 @@ export const assets: Asset[] = [ addresses: { "137": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619", "8453": "0x4200000000000000000000000000000000000006", + "1": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", + "42161": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + "42420": "0xbe231A8492487aAe6096278A97050FAe6B9d5BEc", }, symbol: "WETH", description: "WETH is an ERC-20 token that represents 1 Ether (ETH)", @@ -71,6 +85,9 @@ export const assets: Asset[] = [ { addresses: { "137": "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6", + "1": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599", + "42161": "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + "42420": "0xDBDc8c7B96286899aB624F6a59dd0250DD4Ce9bC", }, symbol: "WBTC", description: diff --git a/src/chains.ts b/src/chains.ts index 08b2453..d57dfc3 100644 --- a/src/chains.ts +++ b/src/chains.ts @@ -95,6 +95,7 @@ export const enum ChainName { BEVM = "BEVM", DYMENSION = "Dymension", HELA = "Hela", + ASSET_CHAIN = "Asset Chain", } export const chains: { [chainId: string]: Chain } = { @@ -526,6 +527,12 @@ export const chains: { [chainId: string]: Chain } = { status: ChainStatus.NOT_SUPPORTED, img: "hela.png", }, + "42420": { + name: ChainName.ASSET_CHAIN, + chainId: 42420, + status: ChainStatus.NOT_SUPPORTED, + img: "Assetchain.svg", + }, }; export const chainStatusInfo: { [status in ChainStatus]: ChainStatusInfo } = { diff --git a/src/contests.ts b/src/contests.ts index ffa8263..d262d1e 100644 --- a/src/contests.ts +++ b/src/contests.ts @@ -100,20 +100,25 @@ export const contests: { [contestId: string]: YieldContest } = { }, }, ], + img: "y2.png", + integration: { + intract: "6729f7115811e83272cd3613", + }, + xpMultiplier: 20, }, y3: { // 21 Nov 2024 - 04 Dec 2024 name: "Yield Contest #3", start: 1732147200, // Thu, 21 Nov 2024 00:00:00 GMT end: 1733356799, // Wed, 04 Dec 2024 23:59:59 GMT - minEarn: 1, + minEarn: 0.2, rewards: [ { type: RewardType.POINTS, winners: 100, winnerReward: 200, }, - // 200 USDT + /*// 200 USDT { type: RewardType.ERC20, winners: 20, @@ -122,7 +127,7 @@ export const contests: { [contestId: string]: YieldContest } = { chain: ChainName.POLYGON, address: "0xc2132d05d31c914a87c6611c10748aeb04b58e8f", }, - }, + },*/ // VaultManager { type: RewardType.NFT, @@ -145,7 +150,7 @@ export const contests: { [contestId: string]: YieldContest } = { name: "Yield Contest #4", start: 1733356800, // Thu, 05 Dec 2024 00:00:00 GMT end: 1734566399, // Wed, 18 Dec 2024 23:59:59 GMT - minEarn: 1, + minEarn: 0.5, rewards: [ { type: RewardType.POINTS, @@ -153,7 +158,7 @@ export const contests: { [contestId: string]: YieldContest } = { winnerReward: 200, }, // 200 USDT - { + /*{ type: RewardType.ERC20, winners: 20, winnerReward: 10, @@ -161,7 +166,7 @@ export const contests: { [contestId: string]: YieldContest } = { chain: ChainName.POLYGON, address: "0xc2132d05d31c914a87c6611c10748aeb04b58e8f", }, - }, + },*/ // StrategyLogic { type: RewardType.NFT, diff --git a/src/integrations.ts b/src/integrations.ts index e87bbbe..c13b9c0 100644 --- a/src/integrations.ts +++ b/src/integrations.ts @@ -130,8 +130,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { ChainName.METIS, ChainName.SCROLL, ], - coreContracts: ["PriceReader"], adapters: ["ChainLinkAdapter"], + coreContracts: ["PriceReader"], }, ccip: { name: "CCIP", @@ -225,8 +225,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { ChainName.KLAYTN, ChainName.AURORA, ], - coreContracts: ["Zap"], strategies: [StrategyShortId.AS1BLS], + coreContracts: ["Zap"], }, }, defiLlama: "1inch-network", @@ -252,8 +252,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { ChainName.CELO, ChainName.BLAST, ], - adapters: ["UniswapV3Adapter"], strategies: [StrategyShortId.CUMF, StrategyShortId.GUMF], + adapters: ["UniswapV3Adapter"], }, uniswapV2: { name: "Uniswap V2", @@ -403,8 +403,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { strategies: [StrategyShortId.BSMF], }, }, - github: "sushiswap", defiLlama: "sushi", + github: "sushiswap", }, gyroscope: { name: "Gyroscope", @@ -485,8 +485,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { strategies: [StrategyShortId.SL, StrategyShortId.SS], }, }, - github: "Pearl-Finance", defiLlama: "pearl-v2", + github: "Pearl-Finance", }, // ALM gamma: { @@ -713,8 +713,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { strategies: [StrategyShortId.BSMF], }, }, - github: "beefyfinance", defiLlama: "beefy", + github: "beefyfinance", }, // Lending compound: { @@ -876,8 +876,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { intermediaryStrategies: [StrategyShortId.Y], }, }, - github: "stargate-protocol", defiLlama: "stargate", + github: "stargate-protocol", }, // Liquid staking lido: { @@ -892,8 +892,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { strategies: [StrategyShortId.Y], }, }, - github: "lidofinance", defiLlama: "lido", + github: "lidofinance", }, stader: { name: "Stader Labs", @@ -912,8 +912,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { strategies: [StrategyShortId.AS1BLS], }, }, - github: "stader-labs", defiLlama: "stader", + github: "stader-labs", }, dezswap: { name: "Dezswap", @@ -927,8 +927,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { adapters: ["UniswapV3Adapter"], }, }, - github: "dezswap", defiLlama: "dezswap", + github: "dezswap", }, clearpool: { name: "Clearpool", @@ -951,8 +951,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { ], }, }, - github: "clearpool-finance", defiLlama: "clearpool", + github: "clearpool-finance", }, mintswap: { name: "MintSwap", @@ -966,8 +966,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { adapters: ["UniswapV3Adapter"], }, }, - github: "MintSwapFinance", defiLlama: "mintswap-finance", + github: "MintSwapFinance", }, kiloex: { name: "KiloEx", @@ -986,8 +986,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { //todo BSqared }, }, - github: "KiloExPerp", defiLlama: "kiloex", + github: "KiloExPerp", }, dymension: { name: "Dymension DEX", @@ -1000,8 +1000,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { chains: [ChainName.DYMENSION], }, }, - github: "dymensionxyz", defiLlama: "dymension-dex", + github: "dymensionxyz", }, camelot: { name: "Camelot", @@ -1016,8 +1016,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { adapters: ["UniswapV3Adapter"], }, }, - github: "camelotlabs", defiLlama: "camelot", + github: "camelotlabs", }, bouncebit: { name: "BounceBit", @@ -1040,8 +1040,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { chains: [ChainName.BOUNCEBIT, ChainName.BSC, ChainName.ETHEREUM], }, }, - github: "BounceBit-Labs", defiLlama: "bouncebit-cedefi", + github: "BounceBit-Labs", }, cyberswap: { name: "CyberSwap", @@ -1054,8 +1054,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { chains: [ChainName.CYBER], }, }, - github: "Cyberswap-DEX", defiLlama: "cyberswap", + github: "Cyberswap-DEX", }, deepr: { name: "Deepr", @@ -1069,8 +1069,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { //todo ShimmerEVM }, }, - github: "Deepr-Finance", defiLlama: "deepr-finance", + github: "Deepr-Finance", }, nitron: { name: "Nitron", @@ -1083,8 +1083,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { chains: [ChainName.CARBON], }, }, - github: "switcheo", defiLlama: "nitron", + github: "switcheo", }, bidofinance: { name: "Bido Finance", @@ -1097,8 +1097,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { chains: [ChainName.BEVM], }, }, - github: "Bidohub", defiLlama: "bido-finance", + github: "Bidohub", }, zircuit: { name: "Zircuit", @@ -1171,8 +1171,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { //todo Ultron, OntologyEVM, Meter, Cronos }, }, - github: "IzumiFinance", defiLlama: "iziswap", + github: "IzumiFinance", }, desyn: { name: "DeSyn", @@ -1190,8 +1190,8 @@ export const integrations: { [org: string]: DeFiOrganization } = { ], }, }, - github: "Meta-DesynLab", defiLlama: "desyn-liquid-strategy", + github: "Meta-DesynLab", }, cytoswap: { name: "Cytoswap", @@ -1204,9 +1204,47 @@ export const integrations: { [org: string]: DeFiOrganization } = { chains: [ChainName.HELA], }, }, - github: "Meta-DesynLab", defiLlama: "cytoswap", }, + dia: { + name: "DIA", + img: "Diadata.svg", + website: "https://www.diadata.org/", + protocols: { + diadata: { + name: "Dia Data", + category: DefiCategory.ORACLE, + chains: [ + ChainName.ARBITRUM, + ChainName.AURORA, + ChainName.AVALANCHE, + ChainName.BASE, + ChainName.BEVM, + ChainName.CELO, + ChainName.ETHEREUM, + ChainName.EVMOS, + ChainName.FANTOM, + ChainName.FUSE, + ChainName.LINEA, + ChainName.METIS, + ChainName.MOONBEAM, + ChainName.MOONRIVER, + ChainName.ZKSYNC, + ChainName.TELOS, + ChainName.OPTIMISM, + ChainName.POLYGON, + ChainName.POLYGON_ZKEVM, + ChainName.GNOSIS, + ChainName.BSC, + ChainName.BOBA, + ChainName.ASTAR_ZKEVM, + ], + adapters: ["DiaAdapter"], + }, + }, + defiLlama: "dia", + github: "diadata-org", + }, }; export const getIntegrationStatus = (p: DeFiProtocol): IntegrationStatus => { diff --git a/src/stability.tokenlist.json b/src/stability.tokenlist.json index ab3ef0b..c220fd4 100644 --- a/src/stability.tokenlist.json +++ b/src/stability.tokenlist.json @@ -2,11 +2,11 @@ "name": "Stability Token List", "logoURI": "https://stability.farm/logo.svg", "keywords": [], - "timestamp": "2024-10-22T00:00:00+00:00", + "timestamp": "2024-11-03T18:30:00+00:00", "version": { "major": 1, - "minor": 4, - "patch": 2 + "minor": 5, + "patch": 0 }, "tags": { "stablecoin": { @@ -27,11 +27,55 @@ } }, "tokens": [ + { + "chainId": 1, + "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "symbol": "USDC", + "name": "USD Coin", + "decimals": 6, + "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/usdc.jpg", + "tags": ["stablecoin"] + }, + { + "chainId": 1, + "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", + "symbol": "USDT", + "name": "Tether USD", + "decimals": 6, + "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/usdt.jpg", + "tags": ["stablecoin"] + }, + { + "chainId": 1, + "address": "0x6B175474E89094C44Da98b954EedeAC495271d0F", + "symbol": "DAI", + "name": "Dai Stablecoin", + "decimals": 18, + "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/dai.jpg", + "tags": ["stablecoin"] + }, + { + "chainId": 1, + "address": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599", + "symbol": "WBTC", + "name": "Wrapped BTC", + "decimals": 8, + "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/btc.jpg" + }, + { + "chainId": 1, + "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", + "symbol": "WETH", + "name": "Wrapped ETH", + "decimals": 18, + "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/eth.jpg", + "tags": ["wNative"] + }, { "chainId": 137, "address": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174", - "symbol": "USDC.e", - "name": "Bridged USDC", + "symbol": "USDC", + "name": "USD Coin (PoS)", "decimals": 6, "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/usdc.jpg", "tags": ["stablecoin", "bridged"] @@ -58,7 +102,7 @@ "chainId": 137, "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063", "symbol": "DAI", - "name": "Dai Stablecoin", + "name": "(PoS) Dai Stablecoin", "decimals": 18, "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/dai.jpg", "tags": ["stablecoin", "bridged"] @@ -66,8 +110,8 @@ { "chainId": 137, "address": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270", - "symbol": "WMATIC", - "name": "Wrapped Matic", + "symbol": "WPOL", + "name": "Wrapped Polygon Ecosystem Token", "decimals": 18, "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/polygon.jpg", "tags": ["wNative"] @@ -110,11 +154,110 @@ "chainId": 137, "address": "0xc4ce1d6f5d98d65ee25cf85e9f2e9dcfee6cb5d6", "symbol": "crvUSD", - "name": "Curve.Fi USD", + "name": "Curve.Fi USD Stablecoin(PoS)", "decimals": 18, "logoURI": "https://polygonscan.com/token/images/crvusd_32.png", "tags": ["stablecoin", "bridged"] }, + { + "chainId": 137, + "address": "0x03b54A6e9a984069379fae1a4fC4dBAE93B3bCCD", + "symbol": "wstETH", + "name": "Wrapped liquid staked Ether 2.0 (PoS)", + "decimals": 18, + "logoURI": "https://polygonscan.com/token/images/wsteth_32.png", + "tags": ["bridged"] + }, + { + "chainId": 42161, + "address": "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8", + "symbol": "USDC", + "name": "USD Coin (Arb1)", + "decimals": 6, + "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/usdc.jpg", + "tags": ["stablecoin", "bridged"] + }, + { + "chainId": 42161, + "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + "symbol": "USDC", + "name": "USD Coin", + "decimals": 6, + "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/usdc.jpg", + "tags": ["stablecoin"] + }, + { + "chainId": 42161, + "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9", + "symbol": "USDT", + "name": "Tether USD", + "decimals": 6, + "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/usdt.jpg", + "tags": ["stablecoin", "bridged"] + }, + { + "chainId": 42161, + "address": "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1", + "symbol": "DAI", + "name": "Dai Stablecoin", + "decimals": 18, + "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/dai.jpg", + "tags": ["stablecoin", "bridged"] + }, + { + "chainId": 42161, + "address": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + "symbol": "WETH", + "name": "Wrapped Ether", + "decimals": 18, + "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/eth.jpg", + "tags": ["bridged"] + }, + { + "chainId": 42161, + "address": "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", + "symbol": "WBTC", + "name": "Wrapped BTC", + "decimals": 8, + "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/btc.jpg", + "tags": ["bridged"] + }, + { + "chainId": 42420, + "address": "0x2B7C1342Cc64add10B2a79C8f9767d2667DE64B2", + "symbol": "USDC", + "name": "Bridged USDC (Asset Chain)", + "decimals": 6, + "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/usdc.jpg", + "tags": ["stablecoin", "bridged"] + }, + { + "chainId": 42420, + "address": "0x26E490d30e73c36800788DC6d6315946C4BbEa24", + "symbol": "USDT", + "name": "Tether USD (Bridged)", + "decimals": 18, + "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/usdt.jpg", + "tags": ["stablecoin", "bridged"] + }, + { + "chainId": 42420, + "address": "0xDBDc8c7B96286899aB624F6a59dd0250DD4Ce9bC", + "symbol": "BTC", + "name": "Bitlayer Bitcoin (Bridged)", + "decimals": 18, + "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/btc.jpg", + "tags": ["bridged"] + }, + { + "chainId": 42420, + "address": "0xbe231A8492487aAe6096278A97050FAe6B9d5BEc", + "symbol": "WETH", + "name": "Wrapped Ether (Bridged)", + "decimals": 18, + "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/eth.jpg", + "tags": ["bridged"] + }, { "chainId": 8453, "address": "0x4200000000000000000000000000000000000006", @@ -128,7 +271,7 @@ "chainId": 8453, "address": "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452", "symbol": "wstETH", - "name": "Wrapped Liquid Staked Ether 2.0", + "name": "Wrapped liquid staked Ether 2.0", "decimals": 18, "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/wsteth.jpg", "tags": ["lst", "bridged"] @@ -149,13 +292,13 @@ "name": "Tether USD", "decimals": 6, "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/usdt.jpg", - "tags": ["stablecoin"] + "tags": ["stablecoin", "bridged"] }, { "chainId": 8453, "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "symbol": "USDC", - "name": "USDC", + "name": "USD Coin", "decimals": 6, "logoURI": "https://raw.githubusercontent.com/sushiswap/list/master/logos/token-logos/token/usdc.jpg", "tags": ["stablecoin"] @@ -173,7 +316,7 @@ "chainId": 8453, "address": "0x417Ac0e078398C154EdFadD9Ef675d30Be60Af93", "symbol": "crvUSD", - "name": "Curve.Fi USD", + "name": "Curve.Fi USD Stablecoin", "decimals": 18, "logoURI": "https://polygonscan.com/token/images/crvusd_32.png", "tags": ["stablecoin", "bridged"] diff --git a/src/strategies.ts b/src/strategies.ts index decd1c2..7e7affd 100644 --- a/src/strategies.ts +++ b/src/strategies.ts @@ -426,16 +426,22 @@ export const getStrategyProtocols = ( shortId: StrategyShortId, ): DeFiProtocol[] => { const r: DeFiProtocol[] = []; - for (const orgSlug of Object.keys(integrations)) { - const org = integrations[orgSlug]; - for (const protocolSlug of Object.keys(org.protocols)) { - const protocol = org.protocols[protocolSlug]; - if (protocol.strategies?.includes(shortId)) { - protocol.organization = orgSlug; - r.push(protocol); + + if (strategies[shortId]) { + for (const protocol of strategies[shortId].protocols) { + const orgName = protocol.split(":")[0]; + const protocolName = protocol.split(":")[1]; + + if ( + integrations[orgName] && + integrations[orgName].protocols[protocolName] + ) { + const _protocol = integrations[orgName].protocols[protocolName]; + r.push(_protocol); } } } + return r; }; diff --git a/tools/issue.ts b/tools/issue.ts index ae63550..eb90db4 100644 --- a/tools/issue.ts +++ b/tools/issue.ts @@ -1,6 +1,9 @@ import { + assets, baseStrategyContracts, ChainName, + chains, + ChainStatus, getStrategyProtocols, integrations, strategies, @@ -12,6 +15,7 @@ import { console.log("== Issue helper =="); console.log(""); +// strategy issue for stability-contracts repo for (const shortId of Object.keys(strategies)) { const strategy = strategies[shortId as StrategyShortId]; if (strategy.contractGithubId === "is-being-created") { @@ -85,3 +89,33 @@ for (const shortId of Object.keys(strategies)) { console.log("-----------------------------------------------"); } } + +// assets issue for stability repo +for (const chainId in chains) { + const chain = chains[chainId]; + const chainAssets = assets.filter((asset) => + Object.keys(asset.addresses).includes(chainId), + ); + if (chainAssets.length === 0 && chain.status !== ChainStatus.NOT_SUPPORTED) { + console.log(`------------------ Assets issue for ${chain.name}`); + + console.log( + `Title: 🪙 Add blue chip assets for ${chain.name} [${chainId}]`, + ); + console.log(` +Need to add blue chip assets for blockchain ${chain.name} to this integration library. + +We usually consider the following as such assets: + +* top stables: USDC, USDT, DAI +* wrapped native coin +* top crypto: bridged WBTC and WETH of available + +## Task list + +* [ ] add assets to \`stability.tokenlist.json\` +* [ ] add addresses to \`assets.ts\` + `); + console.log("-----------------------------------------------"); + } +}