From 3e1cd5617feb29f5d8f125269f35b7b13ff5be16 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Mon, 25 Mar 2024 22:29:09 -0400 Subject: [PATCH 01/70] 0.0.199 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 45ec75d..7fd004e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.198", + "version": "0.0.199", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.198", + "version": "0.0.199", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 7407635..1507c86 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.198", + "version": "0.0.199", "description": "", "main": "dist/index.js", "module": "index.ts", From e1a675d0719936261767d9232154f6df65d9bc29 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 26 Mar 2024 17:37:49 -0400 Subject: [PATCH 02/70] USDC.e --- src/constants/tokens.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 62a0abc..0915a1b 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -2098,7 +2098,7 @@ export const TOKENS: TokenMapping = { tableName: `pol_${TokenName.USDC}`, address: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174', decimals: 6, - displayName: 'USDC', + displayName: 'USDC.e', symbol: 'USDC', fullName: 'USD Coin (PoS)', atCoingecko: true, From fdd5a8894bc6aef2218edaed824785322903204e Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 26 Mar 2024 18:04:11 -0400 Subject: [PATCH 03/70] 0.0.200 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7fd004e..620a778 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.199", + "version": "0.0.200", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.199", + "version": "0.0.200", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 1507c86..fc2d146 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.199", + "version": "0.0.200", "description": "", "main": "dist/index.js", "module": "index.ts", From e7613ba4f6ef4625369809c32f85b070f1d13021 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 26 Mar 2024 18:04:11 -0400 Subject: [PATCH 04/70] 0.0.200 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7fd004e..620a778 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.199", + "version": "0.0.200", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.199", + "version": "0.0.200", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 1507c86..fc2d146 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.199", + "version": "0.0.200", "description": "", "main": "dist/index.js", "module": "index.ts", From c67ea261f096538d7972eefd3ab269232899852c Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Fri, 29 Mar 2024 15:33:58 -0400 Subject: [PATCH 05/70] Add taoUSD and zkEVM USDC.e --- src/constants/tokens.ts | 24 ++++++++++++++++++++++++ src/enums/tokenName.ts | 1 + src/utils/token.ts | 7 +++++++ 3 files changed, 32 insertions(+) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 0915a1b..081654a 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -1966,6 +1966,19 @@ export const TOKENS: TokenMapping = { atCoingecko: true } }, + [TokenName.TAOUSD]: { + [ChainId.Arbitrum]: { + tokenName: TokenName.TAOUSD, + tableName: tokenNameWithChainPrefix(TokenName.TAOUSD, ChainId.Arbitrum), + address: '0x966570A84709D693463CDD69dCadb0121b2C9d26', + decimals: 18, + displayName: 'taoUSD', + symbol: 'taoUSD', + fullName: 'taoUSD', + isOneToken: false, + atCoingecko: false, + } + }, [TokenName.TASHI]: { [ChainId.Evmos]: { tokenName: TokenName.TASHI, @@ -2227,6 +2240,17 @@ export const TOKENS: TokenMapping = { atCoingecko: false, isOneToken: false }, + [ChainId.zkEVM]: { + tokenName: TokenName.USDC2, + tableName: tokenNameWithChainPrefix(TokenName.USDC2, ChainId.zkEVM), + address: '0x37eAA0eF3549a5Bb7D431be78a3D99BD360d19e5', + decimals: 6, + displayName: 'USDC.e', + symbol: 'USDC', + fullName: 'USD Coin', + atCoingecko: false, + isOneToken: false + }, }, [TokenName.USDCHTS]: { [ChainId.Hedera]: { diff --git a/src/enums/tokenName.ts b/src/enums/tokenName.ts index 095398a..1a4c4f0 100644 --- a/src/enums/tokenName.ts +++ b/src/enums/tokenName.ts @@ -114,6 +114,7 @@ export enum TokenName { SUSHI = 'sushi', SWETH = 'sweth', SWISE = 'swise', + TAOUSD = 'taousd', TASHI = 'tashi', TBTC = 'tbtc', THE = 'the', diff --git a/src/utils/token.ts b/src/utils/token.ts index 17731f4..a36abb1 100644 --- a/src/utils/token.ts +++ b/src/utils/token.ts @@ -411,6 +411,13 @@ export async function getTokenMetrics( '0xCEad8ee30e03aE87E5E709617f7FdF180Eef9973', price1 ) break; + case TokenName.TAOUSD: + price = await getDollarTokenPriceFromUniV3Vault( + '0x2347E1daecC7CF0CEFa3704b013855d9A19655B8', // taoUSD-USDC + provider, + '0x966570A84709D693463CDD69dCadb0121b2C9d26', // taoUSD + 1) + break; case TokenName.WEVMOS: const evmosCoingeckoId = 'evmos'; const evmosPrice = await getTokenPriceById(evmosCoingeckoId, cg_key); From bc566f48cac1fe1105f462cc6bb30a8c28b1de13 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Fri, 29 Mar 2024 15:42:07 -0400 Subject: [PATCH 06/70] 0.0.201 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 620a778..2e70f2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.200", + "version": "0.0.201", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.200", + "version": "0.0.201", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index fc2d146..e0bb205 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.200", + "version": "0.0.201", "description": "", "main": "dist/index.js", "module": "index.ts", From bf33a52260f212b168596ae97e7e86f98b892014 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Fri, 29 Mar 2024 15:42:07 -0400 Subject: [PATCH 07/70] 0.0.201 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 620a778..2e70f2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.200", + "version": "0.0.201", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.200", + "version": "0.0.201", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index fc2d146..e0bb205 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.200", + "version": "0.0.201", "description": "", "main": "dist/index.js", "module": "index.ts", From 35fa7a2e7a07f6ee0352870f5042aac683686321 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Sun, 31 Mar 2024 13:16:04 -0400 Subject: [PATCH 08/70] Add rETH, rsETH and wstETH --- src/constants/tokens.ts | 52 +++++++++++++++++++++++++++++++++++++++-- src/enums/tokenName.ts | 2 ++ src/utils/token.ts | 35 +++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 2 deletions(-) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 081654a..ffb98ca 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -1814,6 +1814,19 @@ export const TOKENS: TokenMapping = { atCoingecko: true } }, + [TokenName.RETH]: { + [ChainId.zkEVM]: { + tokenName: TokenName.RETH, + tableName: tokenNameWithChainPrefix(TokenName.RETH, ChainId.zkEVM), + address: '0xb23C20EFcE6e24Acca0Cef9B7B7aA196b84EC942', + decimals: 18, + displayName: 'rETH', + symbol: 'rETH', + fullName: 'Rocket Pool ETH', + isOneToken: false, + atCoingecko: false, + } + }, [TokenName.RETRO]: { [ChainId.Polygon]: { tokenName: TokenName.RETRO, @@ -1827,6 +1840,19 @@ export const TOKENS: TokenMapping = { atCoingecko: true } }, + [TokenName.RSETH]: { + [ChainId.zkEVM]: { + tokenName: TokenName.RSETH, + tableName: tokenNameWithChainPrefix(TokenName.RSETH, ChainId.zkEVM), + address: '0x8C7D118B5c47a5BCBD47cc51789558B98dAD17c5', + decimals: 18, + displayName: 'rsETH', + symbol: 'rsETH', + fullName: 'rsETH', + isOneToken: false, + atCoingecko: false, + } + }, [TokenName.SATS]: { [ChainId.Bsc]: { tokenName: TokenName.SATS, @@ -2310,6 +2336,17 @@ export const TOKENS: TokenMapping = { isOneToken: false, atCoingecko: true }, + [ChainId.Celo]: { + tokenName: TokenName.USDT, + tableName: tokenNameWithChainPrefix(TokenName.USDT, ChainId.Celo), + address: '0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e', + decimals: 6, + displayName: 'USDT', + symbol: 'USDT', + fullName: 'Tether USD', + isOneToken: false, + atCoingecko: false, + }, [ChainId.Eon]: { tokenName: TokenName.USDT, tableName: `eon_${TokenName.USDT}`, @@ -2324,7 +2361,7 @@ export const TOKENS: TokenMapping = { [ChainId.Evmos]: { tokenName: TokenName.USDT, tableName: tokenNameWithChainPrefix(TokenName.USDT, ChainId.Evmos), - address: '0xA167bcAb6791304EDa9B636C8beEC75b3D2829E6', + address: '0xb8f812b5943ab3bf941d5d4f1de90a4b326c5d8f ', decimals: 6, displayName: 'USDT', symbol: 'USDT', @@ -2831,7 +2868,18 @@ export const TOKENS: TokenMapping = { fullName: 'Wrapped liquid staked Ether', isOneToken: false, atCoingecko: true - } + }, + [ChainId.zkEVM]: { + tokenName: TokenName.WSTETH, + tableName: tokenNameWithChainPrefix(TokenName.WSTETH, ChainId.zkEVM), + address: '0x5D8cfF95D7A57c0BF50B30b43c7CC0D52825D4a9', + decimals: 18, + displayName: 'wstETH', + symbol: 'wstETH', + fullName: 'Wrapped liquid staked Ether', + isOneToken: false, + atCoingecko: false, + }, }, [TokenName.WZEN]: { [ChainId.Eon]: { diff --git a/src/enums/tokenName.ts b/src/enums/tokenName.ts index 1a4c4f0..e17fa80 100644 --- a/src/enums/tokenName.ts +++ b/src/enums/tokenName.ts @@ -104,7 +104,9 @@ export enum TokenName { RAM = 'ram', RBNB = 'rbnb', RENFIL = 'renfil', + RETH = 'reth', RETRO = 'retro', + RSETH = 'rseth', SATS = 'sats', SAUCE = 'sauce', SFRAX = 'sfrax', diff --git a/src/utils/token.ts b/src/utils/token.ts index a36abb1..ba2fce5 100644 --- a/src/utils/token.ts +++ b/src/utils/token.ts @@ -536,6 +536,41 @@ export async function getTokenMetrics( throw new Error(`Could not lookup token prices for ${token.symbol}, possibly flooding CoinGecko`); } break; + case TokenName.WSTETH: + const wstEthAddress = (chainId !== ChainId.zkEVM) + ? token.address.toLowerCase() + : TOKENS[TokenName.WSTETH]![ChainId.Polygon]?.address?.toLowerCase(); + if (opts.tokenPrices && wstEthAddress && wstEthAddress in opts.tokenPrices) { + price = opts.tokenPrices[wstEthAddress].usd; + priceChange = opts.tokenPrices[wstEthAddress].usd_24h_change; + } else { + throw new Error(`Could not lookup token prices for ${token.symbol}, possibly flooding CoinGecko`); + } + break; + case TokenName.RETH: + if (opts.tokenPrices && wethAddress && wethAddress in opts.tokenPrices) { + wethPrice = opts.tokenPrices[wethAddress].usd; + } else { + throw new Error(`Could not lookup token prices for ${token.symbol}, possibly flooding CoinGecko`); + } + price = await getDollarTokenPriceFromUniV3Vault( + '0x02F3893D0A1725155357dA6125d0f3Ca67d86FbB', // wETH-rETH + provider, + '0xb23C20EFcE6e24Acca0Cef9B7B7aA196b84EC942', // rETH + wethPrice) + break; + case TokenName.RSETH: + if (opts.tokenPrices && wethAddress && wethAddress in opts.tokenPrices) { + wethPrice = opts.tokenPrices[wethAddress].usd; + } else { + throw new Error(`Could not lookup token prices for ${token.symbol}, possibly flooding CoinGecko`); + } + price = await getDollarTokenPriceFromUniV3Vault( + '0x36ED8160b40eA5A5c267Ca1362e329805B7eb9E4', // wETH-rsETH + provider, + '0x8C7D118B5c47a5BCBD47cc51789558B98dAD17c5', // rsETH + wethPrice) + break; case TokenName.WZEN: const zenCoingeckoId = 'zencash'; const zenPrice = await getTokenPriceById(zenCoingeckoId, cg_key); From da3e7f2ba7071e8faf3f01569649fdf58b9d8665 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Sun, 31 Mar 2024 13:23:12 -0400 Subject: [PATCH 09/70] 0.0.202 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2e70f2e..07ee798 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.201", + "version": "0.0.202", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.201", + "version": "0.0.202", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index e0bb205..ad63a55 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.201", + "version": "0.0.202", "description": "", "main": "dist/index.js", "module": "index.ts", From 6c8a14327bd0c6b44ce08e31b4df471c97d09176 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Sun, 31 Mar 2024 13:23:12 -0400 Subject: [PATCH 10/70] 0.0.202 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2e70f2e..07ee798 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.201", + "version": "0.0.202", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.201", + "version": "0.0.202", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index e0bb205..ad63a55 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.201", + "version": "0.0.202", "description": "", "main": "dist/index.js", "module": "index.ts", From a45a23d4099d607e92b3dbc7c002e012e08e848b Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 2 Apr 2024 21:30:59 -0400 Subject: [PATCH 11/70] Add blast --- src/constants/tokens.ts | 26 ++++++++++++++++++++++++++ src/crypto/networks.ts | 18 ++++++++++++++++++ src/crypto/providers.ts | 7 +++++++ src/enums/tokenName.ts | 1 + src/utils/env.ts | 2 ++ 5 files changed, 54 insertions(+) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index ffb98ca..9a4c8fa 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -14,6 +14,8 @@ export const tokenNameWithChainPrefix = (tokenName: TokenName | string, chainId: return `avalanche_${tokenName}` as TokenTableName case ChainId.Base: return `base_${tokenName}` as TokenTableName + case ChainId.Blast: + return `blast_${tokenName}` as TokenTableName case ChainId.Bsc: return `bsc_${tokenName}` as TokenTableName case ChainId.Celo: @@ -2107,6 +2109,19 @@ export const TOKENS: TokenMapping = { atCoingecko: true } }, + [TokenName.USDB]: { + [ChainId.Blast]: { + tokenName: TokenName.USDB, + tableName: tokenNameWithChainPrefix(TokenName.USDB, ChainId.Blast), + address: '0x4300000000000000000000000000000000000003', + decimals: 18, + displayName: 'USDB', + symbol: 'USDB', + fullName: 'USDB', + isOneToken: false, + atCoingecko: true, + } + }, [TokenName.USDBC]: { [ChainId.Base]: { tokenName: TokenName.USDBC, @@ -2666,6 +2681,17 @@ export const TOKENS: TokenMapping = { isOneToken: false, atCoingecko: true, }, + [ChainId.Blast]: { + tokenName: TokenName.WETH, + tableName: tokenNameWithChainPrefix(TokenName.WETH, ChainId.Blast), + address: '0x4300000000000000000000000000000000000004', + decimals: 18, + displayName: 'WETH', + symbol: 'WETH', + fullName: 'Wrapped Ether', + isOneToken: false, + atCoingecko: true, + }, [ChainId.Eon]: { tokenName: TokenName.WETH, tableName: `eon_${TokenName.WETH}`, diff --git a/src/crypto/networks.ts b/src/crypto/networks.ts index 46197d7..9076296 100644 --- a/src/crypto/networks.ts +++ b/src/crypto/networks.ts @@ -10,6 +10,7 @@ export enum ChainId { Avalanche = 43114, Mumbai = 80001, Base = 8453, + Blast = 81457, Bsc = 56, Celo = 42220, Eon = 7332, @@ -175,6 +176,23 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = { } } }, + [ChainId.Blast]: { + chainId: ChainId.Blast, + name: 'Blast', + color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)', + icon: generateIconUrl(ChainId.Blast, 'svg'), + env: 'mainnet', + scanLink: 'blastscan.io', + scanName: 'BlastScan', + coingecko: 'blast', + rpc: { + rpcUrl: 'https://rpc.blast.io', + nativeCurrency: { + symbol: 'ETH', + name: 'ETH' + } + } + }, [ChainId.Bsc]: { chainId: ChainId.Bsc, name: 'BSC', diff --git a/src/crypto/providers.ts b/src/crypto/providers.ts index 3cf4672..3516970 100644 --- a/src/crypto/providers.ts +++ b/src/crypto/providers.ts @@ -37,6 +37,11 @@ export const providerCacheReference: Record = { cacheHit: 0, cacheMiss: 0 }, + [ChainId.Blast]: { + lastUdated: 0, + cacheHit: 0, + cacheMiss: 0 + }, [ChainId.Bsc]: { lastUdated: 0, cacheHit: 0, @@ -217,6 +222,8 @@ const getRpcEnvName = (chainId: ChainId): EnvUtils.EnvName => { return EnvUtils.EnvName.GOERLI_RPC_HOSTS; case ChainId.Base: return EnvUtils.EnvName.BASE_RPC_HOSTS; + case ChainId.Blast: + return EnvUtils.EnvName.BLAST_RPC_HOSTS; case ChainId.Bsc: return EnvUtils.EnvName.BSC_RPC_HOSTS; case ChainId.Celo: diff --git a/src/enums/tokenName.ts b/src/enums/tokenName.ts index e17fa80..e5b9f6e 100644 --- a/src/enums/tokenName.ts +++ b/src/enums/tokenName.ts @@ -124,6 +124,7 @@ export enum TokenName { TRADE = 'trade', UMA = 'uma', UNI = 'uni', + USDB = 'usdb', USDBC = 'usdbc', USDC = 'usdc', USDC2 = 'usdc2', diff --git a/src/utils/env.ts b/src/utils/env.ts index 91a0657..7392ad4 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -9,6 +9,7 @@ export namespace EnvUtils { MAINNET_RPC_HOSTS = 'MAINNET_RPC_HOSTS', GOERLI_RPC_HOSTS = 'GOERLI_RPC_HOSTS', BASE_RPC_HOSTS = 'BASE_RPC_HOSTS', + BLAST_RPC_HOSTS = 'BLAST_RPC_HOSTS', BSC_RPC_HOSTS = 'BSC_RPC_HOSTS', CELO_RPC_HOSTS = 'CELO_RPC_HOSTS', EON_RPC_HOSTS = 'EON_RPC_HOSTS', @@ -35,6 +36,7 @@ export namespace EnvUtils { GATSBY_MAINNET_RPC_HOSTS = 'GATSBY_MAINNET_RPC_HOSTS', GATSBY_GOERLI_RPC_HOSTS = 'GATSBY_GOERLI_RPC_HOSTS', GATSBY_BASE_RPC_HOSTS = 'GATSBY_BASE_RPC_HOSTS', + GATSBY_BLAST_RPC_HOSTS = 'GATSBY_BLAST_RPC_HOSTS', GATSBY_BSC_RPC_HOSTS = 'GATSBY_BSC_RPC_HOSTS', GATSBY_CELO_RPC_HOSTS = 'GATSBY_CELO_RPC_HOSTS', GATSBY_EON_RPC_HOSTS = 'GATSBY_EON_RPC_HOSTS', From 2eedb70056314b6d59fe3c842ab9d00f14c55e0d Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 2 Apr 2024 21:40:19 -0400 Subject: [PATCH 12/70] 0.0.203 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 07ee798..9d329f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.202", + "version": "0.0.203", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.202", + "version": "0.0.203", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index ad63a55..56ed37c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.202", + "version": "0.0.203", "description": "", "main": "dist/index.js", "module": "index.ts", From b336cc36d3f6db66f37762fdebe9abc293f7ccd3 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 2 Apr 2024 21:40:19 -0400 Subject: [PATCH 13/70] 0.0.203 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 07ee798..9d329f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.202", + "version": "0.0.203", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.202", + "version": "0.0.203", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index ad63a55..56ed37c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.202", + "version": "0.0.203", "description": "", "main": "dist/index.js", "module": "index.ts", From e2a925a339da708907725d0668bd0c43bb502da5 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Fri, 5 Apr 2024 14:19:59 -0400 Subject: [PATCH 14/70] Add Kava --- src/constants/tokens.ts | 2 ++ src/crypto/networks.ts | 18 ++++++++++++++++++ src/crypto/providers.ts | 7 +++++++ src/utils/env.ts | 2 ++ 4 files changed, 29 insertions(+) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 9a4c8fa..a9c33b5 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -28,6 +28,8 @@ export const tokenNameWithChainPrefix = (tokenName: TokenName | string, chainId: return `fantom_${tokenName}` as TokenTableName case ChainId.Hedera: return `hedera_${tokenName}` as TokenTableName + case ChainId.Kava: + return `kava_${tokenName}` as TokenTableName case ChainId.Linea: return `linea_${tokenName}` as TokenTableName case ChainId.Mantle: diff --git a/src/crypto/networks.ts b/src/crypto/networks.ts index 9076296..4cc984a 100644 --- a/src/crypto/networks.ts +++ b/src/crypto/networks.ts @@ -22,6 +22,7 @@ export enum ChainId { Linea = 59144, opBNB = 204, zkEVM = 1101, + Kava = 2222, } export interface IAssetData { @@ -296,6 +297,23 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = { } } }, + [ChainId.Kava]: { + chainId: ChainId.Kava, + name: 'Kava', + color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)', + icon: generateIconUrl(ChainId.Kava, 'svg'), + env: 'mainnet', + scanLink: 'https://kavascan.com/', + scanName: 'KavaScan', + coingecko: 'kava', + rpc: { + rpcUrl: 'https://evm.kava.io', + nativeCurrency: { + symbol: 'KAVA', + name: 'KAVA' + } + } + }, [ChainId.Linea]: { chainId: ChainId.Linea, name: 'Linea', diff --git a/src/crypto/providers.ts b/src/crypto/providers.ts index 3516970..087d011 100644 --- a/src/crypto/providers.ts +++ b/src/crypto/providers.ts @@ -72,6 +72,11 @@ export const providerCacheReference: Record = { cacheHit: 0, cacheMiss: 0 }, + [ChainId.Kava]: { + lastUdated: 0, + cacheHit: 0, + cacheMiss: 0 + }, [ChainId.Linea]: { lastUdated: 0, cacheHit: 0, @@ -236,6 +241,8 @@ const getRpcEnvName = (chainId: ChainId): EnvUtils.EnvName => { return EnvUtils.EnvName.FANTOM_RPC_HOSTS; case ChainId.Hedera: return EnvUtils.EnvName.HEDERA_RPC_HOSTS; + case ChainId.Kava: + return EnvUtils.EnvName.KAVA_RPC_HOSTS; case ChainId.Linea: return EnvUtils.EnvName.LINEA_RPC_HOSTS; case ChainId.Mantle: diff --git a/src/utils/env.ts b/src/utils/env.ts index 7392ad4..395a856 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -16,6 +16,7 @@ export namespace EnvUtils { EVMOS_RPC_HOSTS = 'EVMOS_RPC_HOSTS', FANTOM_RPC_HOSTS = 'FANTOM_RPC_HOSTS', HEDERA_RPC_HOSTS = 'HEDERA_RPC_HOSTS', + KAVA_RPC_HOSTS = 'KAVA_RPC_HOSTS', LINEA_RPC_HOSTS = 'LINEA_RPC_HOSTS', MANTLE_RPC_HOSTS = 'MANTLE_RPC_HOSTS', OPBNB_RPC_HOSTS = 'OPBNB_RPC_HOSTS', @@ -43,6 +44,7 @@ export namespace EnvUtils { GATSBY_EVMOS_RPC_HOSTS = 'GATSBY_EVMOS_RPC_HOSTS', GATSBY_FANTOM_RPC_HOSTS = 'GATSBY_FANTOM_RPC_HOSTS', GATSBY_HEDERA_RPC_HOSTS = 'GATSBY_HEDERA_RPC_HOSTS', + GATSBY_KAVA_RPC_HOSTS = 'GATSBY_KAVA_RPC_HOSTS', GATSBY_LINEA_RPC_HOSTS = 'GATSBY_LINEA_RPC_HOSTS', GATSBY_MANTLE_RPC_HOSTS = 'GATSBY_MANTLE_RPC_HOSTS', GATSBY_OPBNB_RPC_HOSTS = 'GATSBY_OPBNB_RPC_HOSTS', From cf7f69ce1d2eac4f8480eed25328f00c442d32f3 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Fri, 5 Apr 2024 14:53:46 -0400 Subject: [PATCH 15/70] 0.0.204 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9d329f7..56cf3a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.203", + "version": "0.0.204", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.203", + "version": "0.0.204", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 56ed37c..f40c63b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.203", + "version": "0.0.204", "description": "", "main": "dist/index.js", "module": "index.ts", From e3735e6d9c539a88b664b665930aba66d82c7fa2 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Fri, 5 Apr 2024 14:53:46 -0400 Subject: [PATCH 16/70] 0.0.204 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9d329f7..56cf3a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.203", + "version": "0.0.204", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.203", + "version": "0.0.204", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 56ed37c..f40c63b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.203", + "version": "0.0.204", "description": "", "main": "dist/index.js", "module": "index.ts", From afeef4020274d111290ad17a5c044e163c489308 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 16 Apr 2024 22:11:51 -0400 Subject: [PATCH 17/70] Add Scroll --- src/crypto/networks.ts | 26 ++++++++++++++++++++++---- src/crypto/providers.ts | 7 +++++++ src/utils/env.ts | 2 ++ 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/crypto/networks.ts b/src/crypto/networks.ts index 4cc984a..6a08f7c 100644 --- a/src/crypto/networks.ts +++ b/src/crypto/networks.ts @@ -6,9 +6,9 @@ export enum ChainId { Rinkeby = 4, Goerli = 5, Polygon = 137, + Mumbai = 80001, Arbitrum = 42161, Avalanche = 43114, - Mumbai = 80001, Base = 8453, Blast = 81457, Bsc = 56, @@ -16,13 +16,14 @@ export enum ChainId { Eon = 7332, Evmos = 9001, Fantom = 250, - zkSync = 324, Hedera = 295, - Mantle = 5000, + Kava = 2222, Linea = 59144, + Mantle = 5000, opBNB = 204, + Scroll = 534352, zkEVM = 1101, - Kava = 2222, + zkSync = 324, } export interface IAssetData { @@ -365,6 +366,23 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = { } } }, + [ChainId.Scroll]: { + chainId: ChainId.Scroll, + name: 'Scroll', + color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)', + icon: generateIconUrl(ChainId.Scroll, 'svg'), + env: 'mainnet', + scanLink: 'https://scrollscan.com/', + scanName: 'ScrollScan', + coingecko: 'Scroll', + rpc: { + rpcUrl: 'https://1rpc.io/scroll', + nativeCurrency: { + symbol: 'ETH', + name: 'ETH' + } + } + }, [ChainId.zkEVM]: { chainId: ChainId.zkEVM, name: 'Polygon_zkEVM', diff --git a/src/crypto/providers.ts b/src/crypto/providers.ts index 087d011..bdb4aa5 100644 --- a/src/crypto/providers.ts +++ b/src/crypto/providers.ts @@ -97,6 +97,11 @@ export const providerCacheReference: Record = { cacheHit: 0, cacheMiss: 0 }, + [ChainId.Scroll]: { + lastUdated: 0, + cacheHit: 0, + cacheMiss: 0 + }, [ChainId.zkEVM]: { lastUdated: 0, cacheHit: 0, @@ -251,6 +256,8 @@ const getRpcEnvName = (chainId: ChainId): EnvUtils.EnvName => { return EnvUtils.EnvName.OPBNB_RPC_HOSTS; case ChainId.Polygon: return EnvUtils.EnvName.POLYGON_RPC_HOSTS; + case ChainId.Scroll: + return EnvUtils.EnvName.SCROLL_RPC_HOSTS; case ChainId.zkEVM: return EnvUtils.EnvName.ZKEVM_RPC_HOSTS; case ChainId.zkSync: diff --git a/src/utils/env.ts b/src/utils/env.ts index 395a856..1ac08e6 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -21,6 +21,7 @@ export namespace EnvUtils { MANTLE_RPC_HOSTS = 'MANTLE_RPC_HOSTS', OPBNB_RPC_HOSTS = 'OPBNB_RPC_HOSTS', POLYGON_RPC_HOSTS = 'POLYGON_RPC_HOSTS', + SCROLL_RPC_HOSTS = 'SCROLL_RPC_HOSTS', ZKEVM_RPC_HOSTS = 'ZKEVM_RPC_HOSTS', ZKSYNC_RPC_HOSTS = 'ZKSYNC_RPC_HOSTS', MUMBAI_RPC_HOSTS = 'MUMBAI_RPC_HOSTS', @@ -49,6 +50,7 @@ export namespace EnvUtils { GATSBY_MANTLE_RPC_HOSTS = 'GATSBY_MANTLE_RPC_HOSTS', GATSBY_OPBNB_RPC_HOSTS = 'GATSBY_OPBNB_RPC_HOSTS', GATSBY_POLYGON_RPC_HOSTS = 'GATSBY_POLYGON_RPC_HOSTS', + GATSBY_SCROLL_RPC_HOSTS = 'GATSBY_SCROLL_RPC_HOSTS', GATSBY_ZKEVM_RPC_HOSTS = 'GATSBY_ZKEVM_RPC_HOSTS', GATSBY_ZKSYNC_RPC_HOSTS = 'GATSBY_ZKSYNC_RPC_HOSTS', GATSBY_MUMBAI_RPC_HOSTS = 'GATSBY_MUMBAI_RPC_HOSTS', From 27b17ecfd904a317b98f05d8bbc13240fad1fba7 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 16 Apr 2024 22:17:48 -0400 Subject: [PATCH 18/70] 0.0.205 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 56cf3a7..0c22406 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.204", + "version": "0.0.205", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.204", + "version": "0.0.205", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index f40c63b..c5e7ccd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.204", + "version": "0.0.205", "description": "", "main": "dist/index.js", "module": "index.ts", From 615e6e2f9ad955e951aa7146540ba551498cf47d Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 16 Apr 2024 22:17:48 -0400 Subject: [PATCH 19/70] 0.0.205 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 56cf3a7..0c22406 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.204", + "version": "0.0.205", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.204", + "version": "0.0.205", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index f40c63b..c5e7ccd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.204", + "version": "0.0.205", "description": "", "main": "dist/index.js", "module": "index.ts", From 2abc22a6c0a7b5eaae592be0fe232166ba2e7b84 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 16 Apr 2024 23:06:15 -0400 Subject: [PATCH 20/70] Add scroll token names --- src/constants/tokens.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index a9c33b5..61d9edb 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -40,6 +40,8 @@ export const tokenNameWithChainPrefix = (tokenName: TokenName | string, chainId: return `pol_${tokenName}` as TokenTableName case ChainId.opBNB: return `opbnb_${tokenName}` as TokenTableName + case ChainId.Scroll: + return `scroll_${tokenName}` as TokenTableName case ChainId.zkEVM: return `zkevm_${tokenName}` as TokenTableName case ChainId.zkSync: From 8c2e9b4639ad882b2eb52b3f5ae87617f9196143 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 16 Apr 2024 23:10:28 -0400 Subject: [PATCH 21/70] 0.0.206 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0c22406..bb9becd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.205", + "version": "0.0.206", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.205", + "version": "0.0.206", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index c5e7ccd..51f6782 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.205", + "version": "0.0.206", "description": "", "main": "dist/index.js", "module": "index.ts", From 996769929b2fb12e806a7f7b2488ecff52c3e247 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 16 Apr 2024 23:36:01 -0400 Subject: [PATCH 22/70] coingecko for scroll --- src/crypto/networks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/networks.ts b/src/crypto/networks.ts index 6a08f7c..ffb0d9a 100644 --- a/src/crypto/networks.ts +++ b/src/crypto/networks.ts @@ -374,7 +374,7 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = { env: 'mainnet', scanLink: 'https://scrollscan.com/', scanName: 'ScrollScan', - coingecko: 'Scroll', + coingecko: 'scroll', rpc: { rpcUrl: 'https://1rpc.io/scroll', nativeCurrency: { From 4b18f264cd8c79bf0371598c822a411503eac231 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 16 Apr 2024 23:40:52 -0400 Subject: [PATCH 23/70] 0.0.207 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index bb9becd..3f11580 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.206", + "version": "0.0.207", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.206", + "version": "0.0.207", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 51f6782..729ea0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.206", + "version": "0.0.207", "description": "", "main": "dist/index.js", "module": "index.ts", From fbb335aacc29ebf7b5d3b56ea42bec96580350d9 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 16 Apr 2024 23:10:28 -0400 Subject: [PATCH 24/70] 0.0.206 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0c22406..bb9becd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.205", + "version": "0.0.206", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.205", + "version": "0.0.206", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index c5e7ccd..51f6782 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.205", + "version": "0.0.206", "description": "", "main": "dist/index.js", "module": "index.ts", From 2783e448be97e60a864e5c60fa7f411f28c404e9 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 16 Apr 2024 23:40:52 -0400 Subject: [PATCH 25/70] 0.0.207 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index bb9becd..3f11580 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.206", + "version": "0.0.207", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.206", + "version": "0.0.207", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 51f6782..729ea0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.206", + "version": "0.0.207", "description": "", "main": "dist/index.js", "module": "index.ts", From a45d7bac34d58ef49da544d4647fedea7196e814 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Sun, 21 Apr 2024 22:12:47 -0400 Subject: [PATCH 26/70] Fix axlLqdr --- src/constants/tokens.ts | 6 +++--- src/utils/token.ts | 15 --------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 61d9edb..5787ea2 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -353,14 +353,14 @@ export const TOKENS: TokenMapping = { [TokenName.AXLLQDR]: { [ChainId.Polygon]: { tokenName: TokenName.AXLLQDR, - tableName: TokenName.AXLLQDR, + tableName: tokenNameWithChainPrefix(TokenName.AXLLQDR, ChainId.Polygon), address: '0x0294D8eB7857D43FEb1210Db72456d41481f9Ede', decimals: 18, displayName: 'axlLQDR', symbol: 'axlLQDR', fullName: 'Axelar Wrapped Lqdr', isOneToken: false, - atCoingecko: false + atCoingecko: true, } }, [TokenName.AXLUSDC]: { @@ -539,7 +539,7 @@ export const TOKENS: TokenMapping = { symbol: 'CASH', fullName: 'CASH', isOneToken: false, - atCoingecko: false + atCoingecko: true, } }, [TokenName.CEL]: { diff --git a/src/utils/token.ts b/src/utils/token.ts index ba2fce5..24c22d7 100644 --- a/src/utils/token.ts +++ b/src/utils/token.ts @@ -242,7 +242,6 @@ export async function getTokenMetrics( case TokenName.USDC: case TokenName.USDC2: case TokenName.DAI: - case TokenName.CASH: case TokenName.HOME: case TokenName.CUSD: price = 1; @@ -692,20 +691,6 @@ export async function getTokenMetrics( throw new Error(`Could not lookup token prices for ${token.symbol}`); } break; - case TokenName.AXLLQDR: - polygonProvider = await getProvider(ChainId.Polygon); - if (!polygonProvider) { - throw new Error('Could not establish Polygon provider'); - } - - price = await getTokenPriceFromVault( - VaultName.RETRO_CASH_AXLLQDR, - polygonProvider, - ChainId.Polygon, - TokenName.AXLLQDR, - 1 // CASH price = 1 - ) - break; case TokenName.HBR: const bscProvider = await getProvider(ChainId.Bsc); if (!bscProvider) { From 0678b00be310c02fa70fbf03146a5e16a285bb5f Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Sun, 21 Apr 2024 22:20:55 -0400 Subject: [PATCH 27/70] 0.0.208 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3f11580..9667463 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.207", + "version": "0.0.208", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.207", + "version": "0.0.208", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 729ea0e..4ddc343 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.207", + "version": "0.0.208", "description": "", "main": "dist/index.js", "module": "index.ts", From 88d22868e000a13a4fe81ae6eca535d52298d631 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Mon, 29 Apr 2024 22:01:53 -0400 Subject: [PATCH 28/70] Add algebra integral contract and wBTC on Blast --- .../abis/generate/algebraIntegralPool.json | 1340 +++++++++++++ index.ts | 1 + src/constants/tokens.ts | 11 + src/generated/AlgebraIntegralPool.ts | 1668 +++++++++++++++++ .../factories/AlgebraIntegralPool__factory.ts | 1364 ++++++++++++++ src/generated/factories/index.ts | 1 + src/generated/index.ts | 2 + src/utils/contracts.ts | 10 + src/utils/token.ts | 5 +- 9 files changed, 4401 insertions(+), 1 deletion(-) create mode 100644 content/abis/generate/algebraIntegralPool.json create mode 100644 src/generated/AlgebraIntegralPool.ts create mode 100644 src/generated/factories/AlgebraIntegralPool__factory.ts diff --git a/content/abis/generate/algebraIntegralPool.json b/content/abis/generate/algebraIntegralPool.json new file mode 100644 index 0000000..1947b25 --- /dev/null +++ b/content/abis/generate/algebraIntegralPool.json @@ -0,0 +1,1340 @@ +[ + { + "inputs": [], + "name": "AddressZero", + "type": "error" + }, + { + "inputs": [], + "name": "alreadyInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "arithmeticError", + "type": "error" + }, + { + "inputs": [], + "name": "bottomTickLowerThanMIN", + "type": "error" + }, + { + "inputs": [], + "name": "dynamicFeeActive", + "type": "error" + }, + { + "inputs": [], + "name": "dynamicFeeDisabled", + "type": "error" + }, + { + "inputs": [], + "name": "flashInsufficientPaid0", + "type": "error" + }, + { + "inputs": [], + "name": "flashInsufficientPaid1", + "type": "error" + }, + { + "inputs": [], + "name": "insufficientInputAmount", + "type": "error" + }, + { + "inputs": [], + "name": "invalidAmountRequired", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "expectedSelector", + "type": "bytes4" + } + ], + "name": "invalidHookResponse", + "type": "error" + }, + { + "inputs": [], + "name": "invalidLimitSqrtPrice", + "type": "error" + }, + { + "inputs": [], + "name": "invalidNewCommunityFee", + "type": "error" + }, + { + "inputs": [], + "name": "invalidNewTickSpacing", + "type": "error" + }, + { + "inputs": [], + "name": "liquidityAdd", + "type": "error" + }, + { + "inputs": [], + "name": "liquidityOverflow", + "type": "error" + }, + { + "inputs": [], + "name": "liquiditySub", + "type": "error" + }, + { + "inputs": [], + "name": "locked", + "type": "error" + }, + { + "inputs": [], + "name": "notAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "notInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "pluginIsNotConnected", + "type": "error" + }, + { + "inputs": [], + "name": "priceOutOfRange", + "type": "error" + }, + { + "inputs": [], + "name": "tickInvalidLinks", + "type": "error" + }, + { + "inputs": [], + "name": "tickIsNotInitialized", + "type": "error" + }, + { + "inputs": [], + "name": "tickIsNotSpaced", + "type": "error" + }, + { + "inputs": [], + "name": "tickOutOfRange", + "type": "error" + }, + { + "inputs": [], + "name": "topTickAboveMAX", + "type": "error" + }, + { + "inputs": [], + "name": "topTickLowerOrEqBottomTick", + "type": "error" + }, + { + "inputs": [], + "name": "transferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "zeroAmountRequired", + "type": "error" + }, + { + "inputs": [], + "name": "zeroLiquidityActual", + "type": "error" + }, + { + "inputs": [], + "name": "zeroLiquidityDesired", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "int24", + "name": "bottomTick", + "type": "int24" + }, + { + "indexed": true, + "internalType": "int24", + "name": "topTick", + "type": "int24" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "liquidityAmount", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "name": "Burn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": true, + "internalType": "int24", + "name": "bottomTick", + "type": "int24" + }, + { + "indexed": true, + "internalType": "int24", + "name": "topTick", + "type": "int24" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount0", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount1", + "type": "uint128" + } + ], + "name": "Collect", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "communityFeeNew", + "type": "uint16" + } + ], + "name": "CommunityFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newCommunityVault", + "type": "address" + } + ], + "name": "CommunityVault", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "fee", + "type": "uint16" + } + ], + "name": "Fee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "paid0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "paid1", + "type": "uint256" + } + ], + "name": "Flash", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint160", + "name": "price", + "type": "uint160" + }, + { + "indexed": false, + "internalType": "int24", + "name": "tick", + "type": "int24" + } + ], + "name": "Initialize", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "int24", + "name": "bottomTick", + "type": "int24" + }, + { + "indexed": true, + "internalType": "int24", + "name": "topTick", + "type": "int24" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "liquidityAmount", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newPluginAddress", + "type": "address" + } + ], + "name": "Plugin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "newPluginConfig", + "type": "uint8" + } + ], + "name": "PluginConfig", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "int256", + "name": "amount0", + "type": "int256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "amount1", + "type": "int256" + }, + { + "indexed": false, + "internalType": "uint160", + "name": "price", + "type": "uint160" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "liquidity", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "int24", + "name": "tick", + "type": "int24" + } + ], + "name": "Swap", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "int24", + "name": "newTickSpacing", + "type": "int24" + } + ], + "name": "TickSpacing", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "int24", + "name": "bottomTick", + "type": "int24" + }, + { + "internalType": "int24", + "name": "topTick", + "type": "int24" + }, + { + "internalType": "uint128", + "name": "amount", + "type": "uint128" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "burn", + "outputs": [ + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "erc20Rebasing_", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount_", + "type": "uint256" + } + ], + "name": "claim", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "int24", + "name": "bottomTick", + "type": "int24" + }, + { + "internalType": "int24", + "name": "topTick", + "type": "int24" + }, + { + "internalType": "uint128", + "name": "amount0Requested", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "amount1Requested", + "type": "uint128" + } + ], + "name": "collect", + "outputs": [ + { + "internalType": "uint128", + "name": "amount0", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "amount1", + "type": "uint128" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "communityFeeLastTimestamp", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "communityVault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "erc20Rebasing_", + "type": "address" + }, + { + "internalType": "enum YieldMode", + "name": "mode_", + "type": "uint8" + } + ], + "name": "configure", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "fee", + "outputs": [ + { + "internalType": "uint16", + "name": "currentFee", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "flash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getCommunityFeePending", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getReserves", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "globalState", + "outputs": [ + { + "internalType": "uint160", + "name": "price", + "type": "uint160" + }, + { + "internalType": "int24", + "name": "tick", + "type": "int24" + }, + { + "internalType": "uint16", + "name": "lastFee", + "type": "uint16" + }, + { + "internalType": "uint8", + "name": "pluginConfig", + "type": "uint8" + }, + { + "internalType": "uint16", + "name": "communityFee", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "unlocked", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint160", + "name": "initialPrice", + "type": "uint160" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isUnlocked", + "outputs": [ + { + "internalType": "bool", + "name": "unlocked", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "liquidity", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxLiquidityPerTick", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "leftoversRecipient", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "int24", + "name": "bottomTick", + "type": "int24" + }, + { + "internalType": "int24", + "name": "topTick", + "type": "int24" + }, + { + "internalType": "uint128", + "name": "liquidityDesired", + "type": "uint128" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount1", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "liquidityActual", + "type": "uint128" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "nextTickGlobal", + "outputs": [ + { + "internalType": "int24", + "name": "", + "type": "int24" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "plugin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "positions", + "outputs": [ + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "innerFeeGrowth0Token", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "innerFeeGrowth1Token", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "fees0", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "fees1", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prevTickGlobal", + "outputs": [ + { + "internalType": "int24", + "name": "", + "type": "int24" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "safelyGetStateOfAMM", + "outputs": [ + { + "internalType": "uint160", + "name": "sqrtPrice", + "type": "uint160" + }, + { + "internalType": "int24", + "name": "tick", + "type": "int24" + }, + { + "internalType": "uint16", + "name": "lastFee", + "type": "uint16" + }, + { + "internalType": "uint8", + "name": "pluginConfig", + "type": "uint8" + }, + { + "internalType": "uint128", + "name": "activeLiquidity", + "type": "uint128" + }, + { + "internalType": "int24", + "name": "nextTick", + "type": "int24" + }, + { + "internalType": "int24", + "name": "previousTick", + "type": "int24" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "newCommunityFee", + "type": "uint16" + } + ], + "name": "setCommunityFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newCommunityVault", + "type": "address" + } + ], + "name": "setCommunityVault", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "newFee", + "type": "uint16" + } + ], + "name": "setFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newPluginAddress", + "type": "address" + } + ], + "name": "setPlugin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "newConfig", + "type": "uint8" + } + ], + "name": "setPluginConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int24", + "name": "newTickSpacing", + "type": "int24" + } + ], + "name": "setTickSpacing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "bool", + "name": "zeroToOne", + "type": "bool" + }, + { + "internalType": "int256", + "name": "amountRequired", + "type": "int256" + }, + { + "internalType": "uint160", + "name": "limitSqrtPrice", + "type": "uint160" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "swap", + "outputs": [ + { + "internalType": "int256", + "name": "amount0", + "type": "int256" + }, + { + "internalType": "int256", + "name": "amount1", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "leftoversRecipient", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "bool", + "name": "zeroToOne", + "type": "bool" + }, + { + "internalType": "int256", + "name": "amountToSell", + "type": "int256" + }, + { + "internalType": "uint160", + "name": "limitSqrtPrice", + "type": "uint160" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "swapWithPaymentInAdvance", + "outputs": [ + { + "internalType": "int256", + "name": "amount0", + "type": "int256" + }, + { + "internalType": "int256", + "name": "amount1", + "type": "int256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tickSpacing", + "outputs": [ + { + "internalType": "int24", + "name": "", + "type": "int24" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int16", + "name": "", + "type": "int16" + } + ], + "name": "tickTable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tickTreeRoot", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int16", + "name": "", + "type": "int16" + } + ], + "name": "tickTreeSecondLayer", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int24", + "name": "", + "type": "int24" + } + ], + "name": "ticks", + "outputs": [ + { + "internalType": "uint256", + "name": "liquidityTotal", + "type": "uint256" + }, + { + "internalType": "int128", + "name": "liquidityDelta", + "type": "int128" + }, + { + "internalType": "int24", + "name": "prevTick", + "type": "int24" + }, + { + "internalType": "int24", + "name": "nextTick", + "type": "int24" + }, + { + "internalType": "uint256", + "name": "outerFeeGrowth0Token", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "outerFeeGrowth1Token", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token0", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token1", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalFeeGrowth0Token", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalFeeGrowth1Token", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file diff --git a/index.ts b/index.ts index 2f44d40..5833f8e 100644 --- a/index.ts +++ b/index.ts @@ -65,6 +65,7 @@ export { getUniswapV3PositionsContract, getUniswapV3PoolContract, getAlgebraPoolContract, + getAlgebraIntegralPoolContract, getUniswapV3FactoryContract, getIchiBntV3Contract, getDodoLiquidityPoolContract, diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 5787ea2..00cb5cc 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -2543,6 +2543,17 @@ export const TOKENS: TokenMapping = { atCoingecko: true, isOneToken: false }, + [ChainId.Blast]: { + tokenName: TokenName.WBTC, + tableName: tokenNameWithChainPrefix(TokenName.WBTC, ChainId.Blast), + address: '0xF7bc58b8D8f97ADC129cfC4c9f45Ce3C0E1D2692', + decimals: 8, + displayName: 'wBTC', + symbol: 'wBTC', + fullName: 'Wrapped BTC', + atCoingecko: false, + isOneToken: false, + }, [ChainId.Eon]: { tokenName: TokenName.WBTC, tableName: `eon_${TokenName.WBTC}`, diff --git a/src/generated/AlgebraIntegralPool.ts b/src/generated/AlgebraIntegralPool.ts new file mode 100644 index 0000000..0162b8b --- /dev/null +++ b/src/generated/AlgebraIntegralPool.ts @@ -0,0 +1,1668 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "./common"; + +export interface AlgebraIntegralPoolInterface extends utils.Interface { + functions: { + "burn(int24,int24,uint128,bytes)": FunctionFragment; + "claim(address,address,uint256)": FunctionFragment; + "collect(address,int24,int24,uint128,uint128)": FunctionFragment; + "communityFeeLastTimestamp()": FunctionFragment; + "communityVault()": FunctionFragment; + "configure(address,uint8)": FunctionFragment; + "factory()": FunctionFragment; + "fee()": FunctionFragment; + "flash(address,uint256,uint256,bytes)": FunctionFragment; + "getCommunityFeePending()": FunctionFragment; + "getReserves()": FunctionFragment; + "globalState()": FunctionFragment; + "initialize(uint160)": FunctionFragment; + "isUnlocked()": FunctionFragment; + "liquidity()": FunctionFragment; + "maxLiquidityPerTick()": FunctionFragment; + "mint(address,address,int24,int24,uint128,bytes)": FunctionFragment; + "nextTickGlobal()": FunctionFragment; + "plugin()": FunctionFragment; + "positions(bytes32)": FunctionFragment; + "prevTickGlobal()": FunctionFragment; + "safelyGetStateOfAMM()": FunctionFragment; + "setCommunityFee(uint16)": FunctionFragment; + "setCommunityVault(address)": FunctionFragment; + "setFee(uint16)": FunctionFragment; + "setPlugin(address)": FunctionFragment; + "setPluginConfig(uint8)": FunctionFragment; + "setTickSpacing(int24)": FunctionFragment; + "swap(address,bool,int256,uint160,bytes)": FunctionFragment; + "swapWithPaymentInAdvance(address,address,bool,int256,uint160,bytes)": FunctionFragment; + "tickSpacing()": FunctionFragment; + "tickTable(int16)": FunctionFragment; + "tickTreeRoot()": FunctionFragment; + "tickTreeSecondLayer(int16)": FunctionFragment; + "ticks(int24)": FunctionFragment; + "token0()": FunctionFragment; + "token1()": FunctionFragment; + "totalFeeGrowth0Token()": FunctionFragment; + "totalFeeGrowth1Token()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "burn" + | "claim" + | "collect" + | "communityFeeLastTimestamp" + | "communityVault" + | "configure" + | "factory" + | "fee" + | "flash" + | "getCommunityFeePending" + | "getReserves" + | "globalState" + | "initialize" + | "isUnlocked" + | "liquidity" + | "maxLiquidityPerTick" + | "mint" + | "nextTickGlobal" + | "plugin" + | "positions" + | "prevTickGlobal" + | "safelyGetStateOfAMM" + | "setCommunityFee" + | "setCommunityVault" + | "setFee" + | "setPlugin" + | "setPluginConfig" + | "setTickSpacing" + | "swap" + | "swapWithPaymentInAdvance" + | "tickSpacing" + | "tickTable" + | "tickTreeRoot" + | "tickTreeSecondLayer" + | "ticks" + | "token0" + | "token1" + | "totalFeeGrowth0Token" + | "totalFeeGrowth1Token" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "burn", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "claim", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "collect", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "communityFeeLastTimestamp", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "communityVault", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "configure", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "factory", values?: undefined): string; + encodeFunctionData(functionFragment: "fee", values?: undefined): string; + encodeFunctionData( + functionFragment: "flash", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getCommunityFeePending", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getReserves", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "globalState", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isUnlocked", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "liquidity", values?: undefined): string; + encodeFunctionData( + functionFragment: "maxLiquidityPerTick", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "mint", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "nextTickGlobal", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "plugin", values?: undefined): string; + encodeFunctionData( + functionFragment: "positions", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "prevTickGlobal", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "safelyGetStateOfAMM", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setCommunityFee", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setCommunityVault", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setFee", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setPlugin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setPluginConfig", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setTickSpacing", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "swap", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "swapWithPaymentInAdvance", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "tickSpacing", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "tickTable", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "tickTreeRoot", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "tickTreeSecondLayer", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "ticks", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "token0", values?: undefined): string; + encodeFunctionData(functionFragment: "token1", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalFeeGrowth0Token", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "totalFeeGrowth1Token", + values?: undefined + ): string; + + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "collect", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "communityFeeLastTimestamp", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "communityVault", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "configure", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "fee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "flash", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getCommunityFeePending", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getReserves", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "globalState", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isUnlocked", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "liquidity", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "maxLiquidityPerTick", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "nextTickGlobal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "plugin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "positions", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "prevTickGlobal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "safelyGetStateOfAMM", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setCommunityFee", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setCommunityVault", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setFee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setPlugin", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setPluginConfig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setTickSpacing", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "swapWithPaymentInAdvance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "tickSpacing", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "tickTable", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "tickTreeRoot", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "tickTreeSecondLayer", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ticks", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "token0", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "token1", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalFeeGrowth0Token", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "totalFeeGrowth1Token", + data: BytesLike + ): Result; + + events: { + "Burn(address,int24,int24,uint128,uint256,uint256)": EventFragment; + "Collect(address,address,int24,int24,uint128,uint128)": EventFragment; + "CommunityFee(uint16)": EventFragment; + "CommunityVault(address)": EventFragment; + "Fee(uint16)": EventFragment; + "Flash(address,address,uint256,uint256,uint256,uint256)": EventFragment; + "Initialize(uint160,int24)": EventFragment; + "Mint(address,address,int24,int24,uint128,uint256,uint256)": EventFragment; + "Plugin(address)": EventFragment; + "PluginConfig(uint8)": EventFragment; + "Swap(address,address,int256,int256,uint160,uint128,int24)": EventFragment; + "TickSpacing(int24)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Burn"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Collect"): EventFragment; + getEvent(nameOrSignatureOrTopic: "CommunityFee"): EventFragment; + getEvent(nameOrSignatureOrTopic: "CommunityVault"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Fee"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Flash"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialize"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Mint"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Plugin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PluginConfig"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Swap"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TickSpacing"): EventFragment; +} + +export interface BurnEventObject { + owner: string; + bottomTick: number; + topTick: number; + liquidityAmount: BigNumber; + amount0: BigNumber; + amount1: BigNumber; +} +export type BurnEvent = TypedEvent< + [string, number, number, BigNumber, BigNumber, BigNumber], + BurnEventObject +>; + +export type BurnEventFilter = TypedEventFilter; + +export interface CollectEventObject { + owner: string; + recipient: string; + bottomTick: number; + topTick: number; + amount0: BigNumber; + amount1: BigNumber; +} +export type CollectEvent = TypedEvent< + [string, string, number, number, BigNumber, BigNumber], + CollectEventObject +>; + +export type CollectEventFilter = TypedEventFilter; + +export interface CommunityFeeEventObject { + communityFeeNew: number; +} +export type CommunityFeeEvent = TypedEvent<[number], CommunityFeeEventObject>; + +export type CommunityFeeEventFilter = TypedEventFilter; + +export interface CommunityVaultEventObject { + newCommunityVault: string; +} +export type CommunityVaultEvent = TypedEvent< + [string], + CommunityVaultEventObject +>; + +export type CommunityVaultEventFilter = TypedEventFilter; + +export interface FeeEventObject { + fee: number; +} +export type FeeEvent = TypedEvent<[number], FeeEventObject>; + +export type FeeEventFilter = TypedEventFilter; + +export interface FlashEventObject { + sender: string; + recipient: string; + amount0: BigNumber; + amount1: BigNumber; + paid0: BigNumber; + paid1: BigNumber; +} +export type FlashEvent = TypedEvent< + [string, string, BigNumber, BigNumber, BigNumber, BigNumber], + FlashEventObject +>; + +export type FlashEventFilter = TypedEventFilter; + +export interface InitializeEventObject { + price: BigNumber; + tick: number; +} +export type InitializeEvent = TypedEvent< + [BigNumber, number], + InitializeEventObject +>; + +export type InitializeEventFilter = TypedEventFilter; + +export interface MintEventObject { + sender: string; + owner: string; + bottomTick: number; + topTick: number; + liquidityAmount: BigNumber; + amount0: BigNumber; + amount1: BigNumber; +} +export type MintEvent = TypedEvent< + [string, string, number, number, BigNumber, BigNumber, BigNumber], + MintEventObject +>; + +export type MintEventFilter = TypedEventFilter; + +export interface PluginEventObject { + newPluginAddress: string; +} +export type PluginEvent = TypedEvent<[string], PluginEventObject>; + +export type PluginEventFilter = TypedEventFilter; + +export interface PluginConfigEventObject { + newPluginConfig: number; +} +export type PluginConfigEvent = TypedEvent<[number], PluginConfigEventObject>; + +export type PluginConfigEventFilter = TypedEventFilter; + +export interface SwapEventObject { + sender: string; + recipient: string; + amount0: BigNumber; + amount1: BigNumber; + price: BigNumber; + liquidity: BigNumber; + tick: number; +} +export type SwapEvent = TypedEvent< + [string, string, BigNumber, BigNumber, BigNumber, BigNumber, number], + SwapEventObject +>; + +export type SwapEventFilter = TypedEventFilter; + +export interface TickSpacingEventObject { + newTickSpacing: number; +} +export type TickSpacingEvent = TypedEvent<[number], TickSpacingEventObject>; + +export type TickSpacingEventFilter = TypedEventFilter; + +export interface AlgebraIntegralPool extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: AlgebraIntegralPoolInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + burn( + bottomTick: PromiseOrValue, + topTick: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + claim( + erc20Rebasing_: PromiseOrValue, + recipient_: PromiseOrValue, + amount_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + collect( + recipient: PromiseOrValue, + bottomTick: PromiseOrValue, + topTick: PromiseOrValue, + amount0Requested: PromiseOrValue, + amount1Requested: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + communityFeeLastTimestamp(overrides?: CallOverrides): Promise<[number]>; + + communityVault(overrides?: CallOverrides): Promise<[string]>; + + configure( + erc20Rebasing_: PromiseOrValue, + mode_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + factory(overrides?: CallOverrides): Promise<[string]>; + + fee(overrides?: CallOverrides): Promise<[number] & { currentFee: number }>; + + flash( + recipient: PromiseOrValue, + amount0: PromiseOrValue, + amount1: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getCommunityFeePending( + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber]>; + + getReserves(overrides?: CallOverrides): Promise<[BigNumber, BigNumber]>; + + globalState( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, number, number, boolean] & { + price: BigNumber; + tick: number; + lastFee: number; + pluginConfig: number; + communityFee: number; + unlocked: boolean; + } + >; + + initialize( + initialPrice: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isUnlocked( + overrides?: CallOverrides + ): Promise<[boolean] & { unlocked: boolean }>; + + liquidity(overrides?: CallOverrides): Promise<[BigNumber]>; + + maxLiquidityPerTick(overrides?: CallOverrides): Promise<[BigNumber]>; + + mint( + leftoversRecipient: PromiseOrValue, + recipient: PromiseOrValue, + bottomTick: PromiseOrValue, + topTick: PromiseOrValue, + liquidityDesired: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + nextTickGlobal(overrides?: CallOverrides): Promise<[number]>; + + plugin(overrides?: CallOverrides): Promise<[string]>; + + positions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { + liquidity: BigNumber; + innerFeeGrowth0Token: BigNumber; + innerFeeGrowth1Token: BigNumber; + fees0: BigNumber; + fees1: BigNumber; + } + >; + + prevTickGlobal(overrides?: CallOverrides): Promise<[number]>; + + safelyGetStateOfAMM( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, number, BigNumber, number, number] & { + sqrtPrice: BigNumber; + tick: number; + lastFee: number; + pluginConfig: number; + activeLiquidity: BigNumber; + nextTick: number; + previousTick: number; + } + >; + + setCommunityFee( + newCommunityFee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCommunityVault( + newCommunityVault: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFee( + newFee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setPlugin( + newPluginAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setPluginConfig( + newConfig: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setTickSpacing( + newTickSpacing: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + swap( + recipient: PromiseOrValue, + zeroToOne: PromiseOrValue, + amountRequired: PromiseOrValue, + limitSqrtPrice: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + swapWithPaymentInAdvance( + leftoversRecipient: PromiseOrValue, + recipient: PromiseOrValue, + zeroToOne: PromiseOrValue, + amountToSell: PromiseOrValue, + limitSqrtPrice: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tickSpacing(overrides?: CallOverrides): Promise<[number]>; + + tickTable( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + tickTreeRoot(overrides?: CallOverrides): Promise<[number]>; + + tickTreeSecondLayer( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + ticks( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, number, number, BigNumber, BigNumber] & { + liquidityTotal: BigNumber; + liquidityDelta: BigNumber; + prevTick: number; + nextTick: number; + outerFeeGrowth0Token: BigNumber; + outerFeeGrowth1Token: BigNumber; + } + >; + + token0(overrides?: CallOverrides): Promise<[string]>; + + token1(overrides?: CallOverrides): Promise<[string]>; + + totalFeeGrowth0Token(overrides?: CallOverrides): Promise<[BigNumber]>; + + totalFeeGrowth1Token(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + burn( + bottomTick: PromiseOrValue, + topTick: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + claim( + erc20Rebasing_: PromiseOrValue, + recipient_: PromiseOrValue, + amount_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + collect( + recipient: PromiseOrValue, + bottomTick: PromiseOrValue, + topTick: PromiseOrValue, + amount0Requested: PromiseOrValue, + amount1Requested: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + communityFeeLastTimestamp(overrides?: CallOverrides): Promise; + + communityVault(overrides?: CallOverrides): Promise; + + configure( + erc20Rebasing_: PromiseOrValue, + mode_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + factory(overrides?: CallOverrides): Promise; + + fee(overrides?: CallOverrides): Promise; + + flash( + recipient: PromiseOrValue, + amount0: PromiseOrValue, + amount1: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getCommunityFeePending( + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber]>; + + getReserves(overrides?: CallOverrides): Promise<[BigNumber, BigNumber]>; + + globalState( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, number, number, boolean] & { + price: BigNumber; + tick: number; + lastFee: number; + pluginConfig: number; + communityFee: number; + unlocked: boolean; + } + >; + + initialize( + initialPrice: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isUnlocked(overrides?: CallOverrides): Promise; + + liquidity(overrides?: CallOverrides): Promise; + + maxLiquidityPerTick(overrides?: CallOverrides): Promise; + + mint( + leftoversRecipient: PromiseOrValue, + recipient: PromiseOrValue, + bottomTick: PromiseOrValue, + topTick: PromiseOrValue, + liquidityDesired: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + nextTickGlobal(overrides?: CallOverrides): Promise; + + plugin(overrides?: CallOverrides): Promise; + + positions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { + liquidity: BigNumber; + innerFeeGrowth0Token: BigNumber; + innerFeeGrowth1Token: BigNumber; + fees0: BigNumber; + fees1: BigNumber; + } + >; + + prevTickGlobal(overrides?: CallOverrides): Promise; + + safelyGetStateOfAMM( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, number, BigNumber, number, number] & { + sqrtPrice: BigNumber; + tick: number; + lastFee: number; + pluginConfig: number; + activeLiquidity: BigNumber; + nextTick: number; + previousTick: number; + } + >; + + setCommunityFee( + newCommunityFee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCommunityVault( + newCommunityVault: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFee( + newFee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setPlugin( + newPluginAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setPluginConfig( + newConfig: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setTickSpacing( + newTickSpacing: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + swap( + recipient: PromiseOrValue, + zeroToOne: PromiseOrValue, + amountRequired: PromiseOrValue, + limitSqrtPrice: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + swapWithPaymentInAdvance( + leftoversRecipient: PromiseOrValue, + recipient: PromiseOrValue, + zeroToOne: PromiseOrValue, + amountToSell: PromiseOrValue, + limitSqrtPrice: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tickSpacing(overrides?: CallOverrides): Promise; + + tickTable( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + tickTreeRoot(overrides?: CallOverrides): Promise; + + tickTreeSecondLayer( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ticks( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, number, number, BigNumber, BigNumber] & { + liquidityTotal: BigNumber; + liquidityDelta: BigNumber; + prevTick: number; + nextTick: number; + outerFeeGrowth0Token: BigNumber; + outerFeeGrowth1Token: BigNumber; + } + >; + + token0(overrides?: CallOverrides): Promise; + + token1(overrides?: CallOverrides): Promise; + + totalFeeGrowth0Token(overrides?: CallOverrides): Promise; + + totalFeeGrowth1Token(overrides?: CallOverrides): Promise; + + callStatic: { + burn( + bottomTick: PromiseOrValue, + topTick: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + >; + + claim( + erc20Rebasing_: PromiseOrValue, + recipient_: PromiseOrValue, + amount_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + collect( + recipient: PromiseOrValue, + bottomTick: PromiseOrValue, + topTick: PromiseOrValue, + amount0Requested: PromiseOrValue, + amount1Requested: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + >; + + communityFeeLastTimestamp(overrides?: CallOverrides): Promise; + + communityVault(overrides?: CallOverrides): Promise; + + configure( + erc20Rebasing_: PromiseOrValue, + mode_: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + factory(overrides?: CallOverrides): Promise; + + fee(overrides?: CallOverrides): Promise; + + flash( + recipient: PromiseOrValue, + amount0: PromiseOrValue, + amount1: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getCommunityFeePending( + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber]>; + + getReserves(overrides?: CallOverrides): Promise<[BigNumber, BigNumber]>; + + globalState( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, number, number, boolean] & { + price: BigNumber; + tick: number; + lastFee: number; + pluginConfig: number; + communityFee: number; + unlocked: boolean; + } + >; + + initialize( + initialPrice: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isUnlocked(overrides?: CallOverrides): Promise; + + liquidity(overrides?: CallOverrides): Promise; + + maxLiquidityPerTick(overrides?: CallOverrides): Promise; + + mint( + leftoversRecipient: PromiseOrValue, + recipient: PromiseOrValue, + bottomTick: PromiseOrValue, + topTick: PromiseOrValue, + liquidityDesired: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + amount0: BigNumber; + amount1: BigNumber; + liquidityActual: BigNumber; + } + >; + + nextTickGlobal(overrides?: CallOverrides): Promise; + + plugin(overrides?: CallOverrides): Promise; + + positions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber, BigNumber, BigNumber] & { + liquidity: BigNumber; + innerFeeGrowth0Token: BigNumber; + innerFeeGrowth1Token: BigNumber; + fees0: BigNumber; + fees1: BigNumber; + } + >; + + prevTickGlobal(overrides?: CallOverrides): Promise; + + safelyGetStateOfAMM( + overrides?: CallOverrides + ): Promise< + [BigNumber, number, number, number, BigNumber, number, number] & { + sqrtPrice: BigNumber; + tick: number; + lastFee: number; + pluginConfig: number; + activeLiquidity: BigNumber; + nextTick: number; + previousTick: number; + } + >; + + setCommunityFee( + newCommunityFee: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setCommunityVault( + newCommunityVault: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFee( + newFee: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setPlugin( + newPluginAddress: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setPluginConfig( + newConfig: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setTickSpacing( + newTickSpacing: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + swap( + recipient: PromiseOrValue, + zeroToOne: PromiseOrValue, + amountRequired: PromiseOrValue, + limitSqrtPrice: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + >; + + swapWithPaymentInAdvance( + leftoversRecipient: PromiseOrValue, + recipient: PromiseOrValue, + zeroToOne: PromiseOrValue, + amountToSell: PromiseOrValue, + limitSqrtPrice: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { amount0: BigNumber; amount1: BigNumber } + >; + + tickSpacing(overrides?: CallOverrides): Promise; + + tickTable( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + tickTreeRoot(overrides?: CallOverrides): Promise; + + tickTreeSecondLayer( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ticks( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, number, number, BigNumber, BigNumber] & { + liquidityTotal: BigNumber; + liquidityDelta: BigNumber; + prevTick: number; + nextTick: number; + outerFeeGrowth0Token: BigNumber; + outerFeeGrowth1Token: BigNumber; + } + >; + + token0(overrides?: CallOverrides): Promise; + + token1(overrides?: CallOverrides): Promise; + + totalFeeGrowth0Token(overrides?: CallOverrides): Promise; + + totalFeeGrowth1Token(overrides?: CallOverrides): Promise; + }; + + filters: { + "Burn(address,int24,int24,uint128,uint256,uint256)"( + owner?: PromiseOrValue | null, + bottomTick?: PromiseOrValue | null, + topTick?: PromiseOrValue | null, + liquidityAmount?: null, + amount0?: null, + amount1?: null + ): BurnEventFilter; + Burn( + owner?: PromiseOrValue | null, + bottomTick?: PromiseOrValue | null, + topTick?: PromiseOrValue | null, + liquidityAmount?: null, + amount0?: null, + amount1?: null + ): BurnEventFilter; + + "Collect(address,address,int24,int24,uint128,uint128)"( + owner?: PromiseOrValue | null, + recipient?: null, + bottomTick?: PromiseOrValue | null, + topTick?: PromiseOrValue | null, + amount0?: null, + amount1?: null + ): CollectEventFilter; + Collect( + owner?: PromiseOrValue | null, + recipient?: null, + bottomTick?: PromiseOrValue | null, + topTick?: PromiseOrValue | null, + amount0?: null, + amount1?: null + ): CollectEventFilter; + + "CommunityFee(uint16)"(communityFeeNew?: null): CommunityFeeEventFilter; + CommunityFee(communityFeeNew?: null): CommunityFeeEventFilter; + + "CommunityVault(address)"( + newCommunityVault?: null + ): CommunityVaultEventFilter; + CommunityVault(newCommunityVault?: null): CommunityVaultEventFilter; + + "Fee(uint16)"(fee?: null): FeeEventFilter; + Fee(fee?: null): FeeEventFilter; + + "Flash(address,address,uint256,uint256,uint256,uint256)"( + sender?: PromiseOrValue | null, + recipient?: PromiseOrValue | null, + amount0?: null, + amount1?: null, + paid0?: null, + paid1?: null + ): FlashEventFilter; + Flash( + sender?: PromiseOrValue | null, + recipient?: PromiseOrValue | null, + amount0?: null, + amount1?: null, + paid0?: null, + paid1?: null + ): FlashEventFilter; + + "Initialize(uint160,int24)"( + price?: null, + tick?: null + ): InitializeEventFilter; + Initialize(price?: null, tick?: null): InitializeEventFilter; + + "Mint(address,address,int24,int24,uint128,uint256,uint256)"( + sender?: null, + owner?: PromiseOrValue | null, + bottomTick?: PromiseOrValue | null, + topTick?: PromiseOrValue | null, + liquidityAmount?: null, + amount0?: null, + amount1?: null + ): MintEventFilter; + Mint( + sender?: null, + owner?: PromiseOrValue | null, + bottomTick?: PromiseOrValue | null, + topTick?: PromiseOrValue | null, + liquidityAmount?: null, + amount0?: null, + amount1?: null + ): MintEventFilter; + + "Plugin(address)"(newPluginAddress?: null): PluginEventFilter; + Plugin(newPluginAddress?: null): PluginEventFilter; + + "PluginConfig(uint8)"(newPluginConfig?: null): PluginConfigEventFilter; + PluginConfig(newPluginConfig?: null): PluginConfigEventFilter; + + "Swap(address,address,int256,int256,uint160,uint128,int24)"( + sender?: PromiseOrValue | null, + recipient?: PromiseOrValue | null, + amount0?: null, + amount1?: null, + price?: null, + liquidity?: null, + tick?: null + ): SwapEventFilter; + Swap( + sender?: PromiseOrValue | null, + recipient?: PromiseOrValue | null, + amount0?: null, + amount1?: null, + price?: null, + liquidity?: null, + tick?: null + ): SwapEventFilter; + + "TickSpacing(int24)"(newTickSpacing?: null): TickSpacingEventFilter; + TickSpacing(newTickSpacing?: null): TickSpacingEventFilter; + }; + + estimateGas: { + burn( + bottomTick: PromiseOrValue, + topTick: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + claim( + erc20Rebasing_: PromiseOrValue, + recipient_: PromiseOrValue, + amount_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + collect( + recipient: PromiseOrValue, + bottomTick: PromiseOrValue, + topTick: PromiseOrValue, + amount0Requested: PromiseOrValue, + amount1Requested: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + communityFeeLastTimestamp(overrides?: CallOverrides): Promise; + + communityVault(overrides?: CallOverrides): Promise; + + configure( + erc20Rebasing_: PromiseOrValue, + mode_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + factory(overrides?: CallOverrides): Promise; + + fee(overrides?: CallOverrides): Promise; + + flash( + recipient: PromiseOrValue, + amount0: PromiseOrValue, + amount1: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getCommunityFeePending(overrides?: CallOverrides): Promise; + + getReserves(overrides?: CallOverrides): Promise; + + globalState(overrides?: CallOverrides): Promise; + + initialize( + initialPrice: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isUnlocked(overrides?: CallOverrides): Promise; + + liquidity(overrides?: CallOverrides): Promise; + + maxLiquidityPerTick(overrides?: CallOverrides): Promise; + + mint( + leftoversRecipient: PromiseOrValue, + recipient: PromiseOrValue, + bottomTick: PromiseOrValue, + topTick: PromiseOrValue, + liquidityDesired: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + nextTickGlobal(overrides?: CallOverrides): Promise; + + plugin(overrides?: CallOverrides): Promise; + + positions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + prevTickGlobal(overrides?: CallOverrides): Promise; + + safelyGetStateOfAMM(overrides?: CallOverrides): Promise; + + setCommunityFee( + newCommunityFee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCommunityVault( + newCommunityVault: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFee( + newFee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setPlugin( + newPluginAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setPluginConfig( + newConfig: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setTickSpacing( + newTickSpacing: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + swap( + recipient: PromiseOrValue, + zeroToOne: PromiseOrValue, + amountRequired: PromiseOrValue, + limitSqrtPrice: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + swapWithPaymentInAdvance( + leftoversRecipient: PromiseOrValue, + recipient: PromiseOrValue, + zeroToOne: PromiseOrValue, + amountToSell: PromiseOrValue, + limitSqrtPrice: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tickSpacing(overrides?: CallOverrides): Promise; + + tickTable( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + tickTreeRoot(overrides?: CallOverrides): Promise; + + tickTreeSecondLayer( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ticks( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + token0(overrides?: CallOverrides): Promise; + + token1(overrides?: CallOverrides): Promise; + + totalFeeGrowth0Token(overrides?: CallOverrides): Promise; + + totalFeeGrowth1Token(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + burn( + bottomTick: PromiseOrValue, + topTick: PromiseOrValue, + amount: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + claim( + erc20Rebasing_: PromiseOrValue, + recipient_: PromiseOrValue, + amount_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + collect( + recipient: PromiseOrValue, + bottomTick: PromiseOrValue, + topTick: PromiseOrValue, + amount0Requested: PromiseOrValue, + amount1Requested: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + communityFeeLastTimestamp( + overrides?: CallOverrides + ): Promise; + + communityVault(overrides?: CallOverrides): Promise; + + configure( + erc20Rebasing_: PromiseOrValue, + mode_: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + factory(overrides?: CallOverrides): Promise; + + fee(overrides?: CallOverrides): Promise; + + flash( + recipient: PromiseOrValue, + amount0: PromiseOrValue, + amount1: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getCommunityFeePending( + overrides?: CallOverrides + ): Promise; + + getReserves(overrides?: CallOverrides): Promise; + + globalState(overrides?: CallOverrides): Promise; + + initialize( + initialPrice: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isUnlocked(overrides?: CallOverrides): Promise; + + liquidity(overrides?: CallOverrides): Promise; + + maxLiquidityPerTick( + overrides?: CallOverrides + ): Promise; + + mint( + leftoversRecipient: PromiseOrValue, + recipient: PromiseOrValue, + bottomTick: PromiseOrValue, + topTick: PromiseOrValue, + liquidityDesired: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + nextTickGlobal(overrides?: CallOverrides): Promise; + + plugin(overrides?: CallOverrides): Promise; + + positions( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + prevTickGlobal(overrides?: CallOverrides): Promise; + + safelyGetStateOfAMM( + overrides?: CallOverrides + ): Promise; + + setCommunityFee( + newCommunityFee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setCommunityVault( + newCommunityVault: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFee( + newFee: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setPlugin( + newPluginAddress: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setPluginConfig( + newConfig: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setTickSpacing( + newTickSpacing: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + swap( + recipient: PromiseOrValue, + zeroToOne: PromiseOrValue, + amountRequired: PromiseOrValue, + limitSqrtPrice: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + swapWithPaymentInAdvance( + leftoversRecipient: PromiseOrValue, + recipient: PromiseOrValue, + zeroToOne: PromiseOrValue, + amountToSell: PromiseOrValue, + limitSqrtPrice: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tickSpacing(overrides?: CallOverrides): Promise; + + tickTable( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + tickTreeRoot(overrides?: CallOverrides): Promise; + + tickTreeSecondLayer( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + ticks( + arg0: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + token0(overrides?: CallOverrides): Promise; + + token1(overrides?: CallOverrides): Promise; + + totalFeeGrowth0Token( + overrides?: CallOverrides + ): Promise; + + totalFeeGrowth1Token( + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/src/generated/factories/AlgebraIntegralPool__factory.ts b/src/generated/factories/AlgebraIntegralPool__factory.ts new file mode 100644 index 0000000..25fd0ac --- /dev/null +++ b/src/generated/factories/AlgebraIntegralPool__factory.ts @@ -0,0 +1,1364 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + AlgebraIntegralPool, + AlgebraIntegralPoolInterface, +} from "../AlgebraIntegralPool"; + +const _abi = [ + { + inputs: [], + name: "AddressZero", + type: "error", + }, + { + inputs: [], + name: "alreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "arithmeticError", + type: "error", + }, + { + inputs: [], + name: "bottomTickLowerThanMIN", + type: "error", + }, + { + inputs: [], + name: "dynamicFeeActive", + type: "error", + }, + { + inputs: [], + name: "dynamicFeeDisabled", + type: "error", + }, + { + inputs: [], + name: "flashInsufficientPaid0", + type: "error", + }, + { + inputs: [], + name: "flashInsufficientPaid1", + type: "error", + }, + { + inputs: [], + name: "insufficientInputAmount", + type: "error", + }, + { + inputs: [], + name: "invalidAmountRequired", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "expectedSelector", + type: "bytes4", + }, + ], + name: "invalidHookResponse", + type: "error", + }, + { + inputs: [], + name: "invalidLimitSqrtPrice", + type: "error", + }, + { + inputs: [], + name: "invalidNewCommunityFee", + type: "error", + }, + { + inputs: [], + name: "invalidNewTickSpacing", + type: "error", + }, + { + inputs: [], + name: "liquidityAdd", + type: "error", + }, + { + inputs: [], + name: "liquidityOverflow", + type: "error", + }, + { + inputs: [], + name: "liquiditySub", + type: "error", + }, + { + inputs: [], + name: "locked", + type: "error", + }, + { + inputs: [], + name: "notAllowed", + type: "error", + }, + { + inputs: [], + name: "notInitialized", + type: "error", + }, + { + inputs: [], + name: "pluginIsNotConnected", + type: "error", + }, + { + inputs: [], + name: "priceOutOfRange", + type: "error", + }, + { + inputs: [], + name: "tickInvalidLinks", + type: "error", + }, + { + inputs: [], + name: "tickIsNotInitialized", + type: "error", + }, + { + inputs: [], + name: "tickIsNotSpaced", + type: "error", + }, + { + inputs: [], + name: "tickOutOfRange", + type: "error", + }, + { + inputs: [], + name: "topTickAboveMAX", + type: "error", + }, + { + inputs: [], + name: "topTickLowerOrEqBottomTick", + type: "error", + }, + { + inputs: [], + name: "transferFailed", + type: "error", + }, + { + inputs: [], + name: "zeroAmountRequired", + type: "error", + }, + { + inputs: [], + name: "zeroLiquidityActual", + type: "error", + }, + { + inputs: [], + name: "zeroLiquidityDesired", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "int24", + name: "bottomTick", + type: "int24", + }, + { + indexed: true, + internalType: "int24", + name: "topTick", + type: "int24", + }, + { + indexed: false, + internalType: "uint128", + name: "liquidityAmount", + type: "uint128", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + name: "Burn", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: true, + internalType: "int24", + name: "bottomTick", + type: "int24", + }, + { + indexed: true, + internalType: "int24", + name: "topTick", + type: "int24", + }, + { + indexed: false, + internalType: "uint128", + name: "amount0", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "amount1", + type: "uint128", + }, + ], + name: "Collect", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint16", + name: "communityFeeNew", + type: "uint16", + }, + ], + name: "CommunityFee", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "newCommunityVault", + type: "address", + }, + ], + name: "CommunityVault", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint16", + name: "fee", + type: "uint16", + }, + ], + name: "Fee", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "paid0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "paid1", + type: "uint256", + }, + ], + name: "Flash", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint160", + name: "price", + type: "uint160", + }, + { + indexed: false, + internalType: "int24", + name: "tick", + type: "int24", + }, + ], + name: "Initialize", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "int24", + name: "bottomTick", + type: "int24", + }, + { + indexed: true, + internalType: "int24", + name: "topTick", + type: "int24", + }, + { + indexed: false, + internalType: "uint128", + name: "liquidityAmount", + type: "uint128", + }, + { + indexed: false, + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + name: "Mint", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "newPluginAddress", + type: "address", + }, + ], + name: "Plugin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "newPluginConfig", + type: "uint8", + }, + ], + name: "PluginConfig", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "int256", + name: "amount0", + type: "int256", + }, + { + indexed: false, + internalType: "int256", + name: "amount1", + type: "int256", + }, + { + indexed: false, + internalType: "uint160", + name: "price", + type: "uint160", + }, + { + indexed: false, + internalType: "uint128", + name: "liquidity", + type: "uint128", + }, + { + indexed: false, + internalType: "int24", + name: "tick", + type: "int24", + }, + ], + name: "Swap", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "int24", + name: "newTickSpacing", + type: "int24", + }, + ], + name: "TickSpacing", + type: "event", + }, + { + inputs: [ + { + internalType: "int24", + name: "bottomTick", + type: "int24", + }, + { + internalType: "int24", + name: "topTick", + type: "int24", + }, + { + internalType: "uint128", + name: "amount", + type: "uint128", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "burn", + outputs: [ + { + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "erc20Rebasing_", + type: "address", + }, + { + internalType: "address", + name: "recipient_", + type: "address", + }, + { + internalType: "uint256", + name: "amount_", + type: "uint256", + }, + ], + name: "claim", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "int24", + name: "bottomTick", + type: "int24", + }, + { + internalType: "int24", + name: "topTick", + type: "int24", + }, + { + internalType: "uint128", + name: "amount0Requested", + type: "uint128", + }, + { + internalType: "uint128", + name: "amount1Requested", + type: "uint128", + }, + ], + name: "collect", + outputs: [ + { + internalType: "uint128", + name: "amount0", + type: "uint128", + }, + { + internalType: "uint128", + name: "amount1", + type: "uint128", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "communityFeeLastTimestamp", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "communityVault", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "erc20Rebasing_", + type: "address", + }, + { + internalType: "enum YieldMode", + name: "mode_", + type: "uint8", + }, + ], + name: "configure", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "factory", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "fee", + outputs: [ + { + internalType: "uint16", + name: "currentFee", + type: "uint16", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "flash", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getCommunityFeePending", + outputs: [ + { + internalType: "uint128", + name: "", + type: "uint128", + }, + { + internalType: "uint128", + name: "", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getReserves", + outputs: [ + { + internalType: "uint128", + name: "", + type: "uint128", + }, + { + internalType: "uint128", + name: "", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "globalState", + outputs: [ + { + internalType: "uint160", + name: "price", + type: "uint160", + }, + { + internalType: "int24", + name: "tick", + type: "int24", + }, + { + internalType: "uint16", + name: "lastFee", + type: "uint16", + }, + { + internalType: "uint8", + name: "pluginConfig", + type: "uint8", + }, + { + internalType: "uint16", + name: "communityFee", + type: "uint16", + }, + { + internalType: "bool", + name: "unlocked", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint160", + name: "initialPrice", + type: "uint160", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isUnlocked", + outputs: [ + { + internalType: "bool", + name: "unlocked", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "liquidity", + outputs: [ + { + internalType: "uint128", + name: "", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "maxLiquidityPerTick", + outputs: [ + { + internalType: "uint128", + name: "", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "leftoversRecipient", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "int24", + name: "bottomTick", + type: "int24", + }, + { + internalType: "int24", + name: "topTick", + type: "int24", + }, + { + internalType: "uint128", + name: "liquidityDesired", + type: "uint128", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "mint", + outputs: [ + { + internalType: "uint256", + name: "amount0", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount1", + type: "uint256", + }, + { + internalType: "uint128", + name: "liquidityActual", + type: "uint128", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "nextTickGlobal", + outputs: [ + { + internalType: "int24", + name: "", + type: "int24", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "plugin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "positions", + outputs: [ + { + internalType: "uint256", + name: "liquidity", + type: "uint256", + }, + { + internalType: "uint256", + name: "innerFeeGrowth0Token", + type: "uint256", + }, + { + internalType: "uint256", + name: "innerFeeGrowth1Token", + type: "uint256", + }, + { + internalType: "uint128", + name: "fees0", + type: "uint128", + }, + { + internalType: "uint128", + name: "fees1", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "prevTickGlobal", + outputs: [ + { + internalType: "int24", + name: "", + type: "int24", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "safelyGetStateOfAMM", + outputs: [ + { + internalType: "uint160", + name: "sqrtPrice", + type: "uint160", + }, + { + internalType: "int24", + name: "tick", + type: "int24", + }, + { + internalType: "uint16", + name: "lastFee", + type: "uint16", + }, + { + internalType: "uint8", + name: "pluginConfig", + type: "uint8", + }, + { + internalType: "uint128", + name: "activeLiquidity", + type: "uint128", + }, + { + internalType: "int24", + name: "nextTick", + type: "int24", + }, + { + internalType: "int24", + name: "previousTick", + type: "int24", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint16", + name: "newCommunityFee", + type: "uint16", + }, + ], + name: "setCommunityFee", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newCommunityVault", + type: "address", + }, + ], + name: "setCommunityVault", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint16", + name: "newFee", + type: "uint16", + }, + ], + name: "setFee", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newPluginAddress", + type: "address", + }, + ], + name: "setPlugin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint8", + name: "newConfig", + type: "uint8", + }, + ], + name: "setPluginConfig", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "int24", + name: "newTickSpacing", + type: "int24", + }, + ], + name: "setTickSpacing", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "bool", + name: "zeroToOne", + type: "bool", + }, + { + internalType: "int256", + name: "amountRequired", + type: "int256", + }, + { + internalType: "uint160", + name: "limitSqrtPrice", + type: "uint160", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "swap", + outputs: [ + { + internalType: "int256", + name: "amount0", + type: "int256", + }, + { + internalType: "int256", + name: "amount1", + type: "int256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "leftoversRecipient", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "bool", + name: "zeroToOne", + type: "bool", + }, + { + internalType: "int256", + name: "amountToSell", + type: "int256", + }, + { + internalType: "uint160", + name: "limitSqrtPrice", + type: "uint160", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "swapWithPaymentInAdvance", + outputs: [ + { + internalType: "int256", + name: "amount0", + type: "int256", + }, + { + internalType: "int256", + name: "amount1", + type: "int256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "tickSpacing", + outputs: [ + { + internalType: "int24", + name: "", + type: "int24", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "int16", + name: "", + type: "int16", + }, + ], + name: "tickTable", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "tickTreeRoot", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "int16", + name: "", + type: "int16", + }, + ], + name: "tickTreeSecondLayer", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "int24", + name: "", + type: "int24", + }, + ], + name: "ticks", + outputs: [ + { + internalType: "uint256", + name: "liquidityTotal", + type: "uint256", + }, + { + internalType: "int128", + name: "liquidityDelta", + type: "int128", + }, + { + internalType: "int24", + name: "prevTick", + type: "int24", + }, + { + internalType: "int24", + name: "nextTick", + type: "int24", + }, + { + internalType: "uint256", + name: "outerFeeGrowth0Token", + type: "uint256", + }, + { + internalType: "uint256", + name: "outerFeeGrowth1Token", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token0", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token1", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalFeeGrowth0Token", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalFeeGrowth1Token", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +export class AlgebraIntegralPool__factory { + static readonly abi = _abi; + static createInterface(): AlgebraIntegralPoolInterface { + return new utils.Interface(_abi) as AlgebraIntegralPoolInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): AlgebraIntegralPool { + return new Contract(address, _abi, signerOrProvider) as AlgebraIntegralPool; + } +} diff --git a/src/generated/factories/index.ts b/src/generated/factories/index.ts index 2dcc173..f52dbef 100644 --- a/src/generated/factories/index.ts +++ b/src/generated/factories/index.ts @@ -1,6 +1,7 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +export { AlgebraIntegralPool__factory } from "./AlgebraIntegralPool__factory"; export { AlgebraPool__factory } from "./AlgebraPool__factory"; export { Ally__factory } from "./Ally__factory"; export { BalancerPool__factory } from "./BalancerPool__factory"; diff --git a/src/generated/index.ts b/src/generated/index.ts index 15b94ca..1f887c0 100644 --- a/src/generated/index.ts +++ b/src/generated/index.ts @@ -1,6 +1,7 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ +export type { AlgebraIntegralPool } from "./AlgebraIntegralPool"; export type { AlgebraPool } from "./AlgebraPool"; export type { Ally } from "./Ally"; export type { BalancerPool } from "./BalancerPool"; @@ -45,6 +46,7 @@ export type { UniswapV3Pool } from "./UniswapV3Pool"; export type { UniswapV3Positions } from "./UniswapV3Positions"; export type { XIchi } from "./XIchi"; export * as factories from "./factories"; +export { AlgebraIntegralPool__factory } from "./factories/AlgebraIntegralPool__factory"; export { AlgebraPool__factory } from "./factories/AlgebraPool__factory"; export { Ally__factory } from "./factories/Ally__factory"; export { BalancerPool__factory } from "./factories/BalancerPool__factory"; diff --git a/src/utils/contracts.ts b/src/utils/contracts.ts index 1200676..643ce26 100644 --- a/src/utils/contracts.ts +++ b/src/utils/contracts.ts @@ -54,6 +54,8 @@ import { AlgebraPool__factory, Rebalancing_flip_v1, Rebalancing_flip_v1__factory, + AlgebraIntegralPool, + AlgebraIntegralPool__factory, } from '../generated'; import { TokenName } from '../enums/tokenName'; import { AddressName } from '../enums/addressName'; @@ -244,6 +246,14 @@ export function getAlgebraPoolContract(address: string, provider: StaticJsonRpcP throw e; } } +export function getAlgebraIntegralPoolContract(address: string, provider: StaticJsonRpcProvider): AlgebraIntegralPool { + try { + return AlgebraIntegralPool__factory.connect(address, provider); + } catch (e) { + console.error(`Couldn't create AlgebraIntegralPool contract with address: ${address}`); + throw e; + } +} export function getUniswapV3FactoryContract(address: string, provider: StaticJsonRpcProvider): UniswapV3Factory { try { return UniswapV3Factory__factory.connect(address, provider); diff --git a/src/utils/token.ts b/src/utils/token.ts index 24c22d7..abef478 100644 --- a/src/utils/token.ts +++ b/src/utils/token.ts @@ -503,7 +503,10 @@ export async function getTokenMetrics( priceWbnb) break; case TokenName.WBTC: - const wbtcAddress = (chainId !== ChainId.Eon && chainId !== ChainId.Linea && chainId !== ChainId.Evmos) + const wbtcAddress = (chainId !== ChainId.Eon + && chainId !== ChainId.Linea + && chainId !== ChainId.Evmos + && chainId !== ChainId.Blast) ? token.address.toLowerCase() : TOKENS[TokenName.WBTC]![ChainId.Mainnet]?.address?.toLowerCase(); if (opts.tokenPrices && wbtcAddress && wbtcAddress in opts.tokenPrices) { From f3a1e22cc075a4cbf6ea249b6c8510ae213484c8 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Mon, 29 Apr 2024 22:09:16 -0400 Subject: [PATCH 29/70] 0.0.209 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9667463..2be04cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.208", + "version": "0.0.209", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.208", + "version": "0.0.209", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 4ddc343..20c2d78 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.208", + "version": "0.0.209", "description": "", "main": "dist/index.js", "module": "index.ts", From fd0f56e9446ed8f910a5c1164d93e2effb6bf056 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 30 Apr 2024 15:13:11 -0400 Subject: [PATCH 30/70] Add mpDAO vaults --- src/constants/poolLabels.ts | 32 +++++++++++++++++++++++ src/constants/pools.ts | 2 ++ src/constants/tokens.ts | 13 ++++++++++ src/constants/vaults.ts | 52 +++++++++++++++++++++++++++++++++++++ src/enums/poolNumber.ts | 2 ++ src/enums/tokenName.ts | 1 + src/enums/vaultName.ts | 5 ++++ src/utils/token.ts | 13 ++++++++++ 8 files changed, 120 insertions(+) diff --git a/src/constants/poolLabels.ts b/src/constants/poolLabels.ts index eeb70a4..0176da3 100644 --- a/src/constants/poolLabels.ts +++ b/src/constants/poolLabels.ts @@ -1633,6 +1633,38 @@ export const PoolLabels: TPoolLabels = { irrStartDate: new Date(0), irrStartTxAmount: 0 }, + [MainnetPoolNumbers.USDT_MPDAO_VAULT]: { + name: 'USDT-mpDAO Vault', + poolNumber: MainnetPoolNumbers.USDT_MPDAO_VAULT, + lpName: 'ICHI_VAULT_LP', + shortLpName: 'VAULT_LP', + farmAddress: '', + farmId: 0, + tradeUrl: '', + subgraphEndpoint: '', + isInverted: isVaultInverted(VaultName.USDT_MPDAO, ChainId.Mainnet), + isHodl: true, + vaultName: VaultName.USDT_MPDAO, + vaultAddress: getVaultAddress(VaultName.USDT_MPDAO, ChainId.Mainnet), + irrStartDate: new Date(0), + irrStartTxAmount: 0 + }, + [MainnetPoolNumbers.WETH_MPDAO_VAULT]: { + name: 'WETH-mpDAO Vault', + poolNumber: MainnetPoolNumbers.WETH_MPDAO_VAULT, + lpName: 'ICHI_VAULT_LP', + shortLpName: 'VAULT_LP', + farmAddress: '', + farmId: 0, + tradeUrl: '', + subgraphEndpoint: '', + isInverted: isVaultInverted(VaultName.WETH_MPDAO, ChainId.Mainnet), + isHodl: true, + vaultName: VaultName.WETH_MPDAO, + vaultAddress: getVaultAddress(VaultName.WETH_MPDAO, ChainId.Mainnet), + irrStartDate: new Date(0), + irrStartTxAmount: 0 + }, }, [ChainId.Polygon]: { [PolygonPoolNumbers.ONE_BTC_VAULT]: { diff --git a/src/constants/pools.ts b/src/constants/pools.ts index a9824cc..a9d18ad 100644 --- a/src/constants/pools.ts +++ b/src/constants/pools.ts @@ -301,11 +301,13 @@ export const Pools: TPools = { MainnetPoolNumbers.UMA_VAULT, MainnetPoolNumbers.UNI_VAULT, MainnetPoolNumbers.USDC_VAULT, + MainnetPoolNumbers.USDT_MPDAO_VAULT, MainnetPoolNumbers.WBTC_VAULT, MainnetPoolNumbers.WBTC_VAULT_LEGACY, MainnetPoolNumbers.WETH_ABOND_VAULT, MainnetPoolNumbers.WETH_VAULT, MainnetPoolNumbers.WETH_GARBAGE_VAULT, + MainnetPoolNumbers.WETH_MPDAO_VAULT, MainnetPoolNumbers.WNXM_VAULT, MainnetPoolNumbers.WNXM_VAULT_LEGACY, MainnetPoolNumbers.YFI_VAULT, diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 00cb5cc..1dcbaf4 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -1526,6 +1526,19 @@ export const TOKENS: TokenMapping = { atCoingecko: true } }, + [TokenName.MPDAO]: { + [ChainId.Mainnet]: { + tokenName: TokenName.MPDAO, + tableName: TokenName.MPDAO, + address: '0x798bcB35D2d48C8cE7eF8171860B8d53A98b361d', + decimals: 6, + displayName: 'mpDAO', + symbol: 'mpDAO', + fullName: 'Meta Pool DAO Token', + isOneToken: false, + atCoingecko: false, + } + }, [TokenName.MPH]: { [ChainId.Mainnet]: { tokenName: TokenName.MPH, diff --git a/src/constants/vaults.ts b/src/constants/vaults.ts index 2003193..d4ec9cf 100644 --- a/src/constants/vaults.ts +++ b/src/constants/vaults.ts @@ -1649,6 +1649,32 @@ export const VAULTS: VaultMapping = { strategyBy: 'Bril Finance', } }, + [VaultName.USDT_MPDAO]: { + [ChainId.Mainnet]: { + vaultName: VaultName.USDT_MPDAO, + tableName: VaultTableName.USDT_MPDAO, + displayName: 'USDT-mpDAO', + address: '0xB8FaCc364eb27D740E05265b4DbDC62a2Bf5C3D6', + deployer: '0xfF7B5E167c9877f2b9f65D19d9c8c9aa651Fe19F', + farm: 0, + externalFarm: '', + scarceToken: 'token0', + scarceTokenName: TokenName.MPDAO, + scarceTokenDecimals: tokenDecimals(TokenName.MPDAO, ChainId.Mainnet), + scarceTokenCoingeckoId: '', + baseTokenName: TokenName.USDT, + baseTokenDecimals: tokenDecimals(TokenName.USDT, ChainId.Mainnet), + enableNotifications: true, + subgraphEndpoint: '', + irrStartDate: new Date(0), + isInverted: true, + isHodlVault: true, + isLegacy: isLegacy(MainnetPoolNumbers.USDT_MPDAO_VAULT, ChainId.Mainnet), + irrStartTxAmount: 0, + depositStatus: true, + strategyBy: 'Bril Finance', + } + }, [VaultName.WBTC]: { [ChainId.Mainnet]: { vaultName: VaultName.WBTC, // old: 'wbtc', @@ -1783,6 +1809,32 @@ export const VAULTS: VaultMapping = { strategyBy: 'Bril Finance', } }, + [VaultName.WETH_MPDAO]: { + [ChainId.Mainnet]: { + vaultName: VaultName.WETH_MPDAO, + tableName: VaultTableName.WETH_MPDAO, + displayName: 'WETH-mpDAO', + address: '0x9bFe5Cd9c421F9Fd0deA92Ef84406eaB2F19f51e', + deployer: '0xfF7B5E167c9877f2b9f65D19d9c8c9aa651Fe19F', + farm: 0, + externalFarm: '', + scarceToken: 'token0', + scarceTokenName: TokenName.MPDAO, + scarceTokenDecimals: tokenDecimals(TokenName.MPDAO, ChainId.Mainnet), + scarceTokenCoingeckoId: '', + baseTokenName: TokenName.WETH, + baseTokenDecimals: tokenDecimals(TokenName.WETH, ChainId.Mainnet), + enableNotifications: true, + subgraphEndpoint: '', + irrStartDate: new Date(0), + isInverted: true, + isHodlVault: true, + isLegacy: isLegacy(MainnetPoolNumbers.WETH_MPDAO_VAULT, ChainId.Mainnet), + irrStartTxAmount: 0, + depositStatus: true, + strategyBy: 'Bril Finance', + } + }, [VaultName.WING]: { [ChainId.Mainnet]: { vaultName: VaultName.WING, // old: 'wing', diff --git a/src/enums/poolNumber.ts b/src/enums/poolNumber.ts index 2edb7ba..cefca18 100644 --- a/src/enums/poolNumber.ts +++ b/src/enums/poolNumber.ts @@ -100,6 +100,8 @@ export enum MainnetPoolNumbers { PANCAKESWAP_WETH_SWETH_VAULT = 7013, BLUEPRINT_USDC_BLUE_VAULT = 7014, BLUEPRINT_WETH_BLUE_VAULT = 7015, + USDT_MPDAO_VAULT = 7025, + WETH_MPDAO_VAULT = 7026, } export enum PolygonPoolNumbers { diff --git a/src/enums/tokenName.ts b/src/enums/tokenName.ts index e5b9f6e..54db195 100644 --- a/src/enums/tokenName.ts +++ b/src/enums/tokenName.ts @@ -86,6 +86,7 @@ export enum TokenName { MIDAS = 'midas', MIMATIC = 'mimatic', MKR = 'mkr', + MPDAO = 'mpdao', MPH = 'mph', MUBI = 'mubi', OATH = 'oath', diff --git a/src/enums/vaultName.ts b/src/enums/vaultName.ts index 25fc078..77e52d4 100644 --- a/src/enums/vaultName.ts +++ b/src/enums/vaultName.ts @@ -69,6 +69,8 @@ export enum VaultName { ICHI_ETH = 'ichi_eth', ICHI_WBTC = 'ichi_wbtc', ICHI_USDC = 'ichi_usdc', + USDT_MPDAO = 'usdt_mpdao', + WETH_MPDAO = 'weth_mpdao', // Mainnet PancakeSwap PANCAKESWAP_SWETH_WETH = 'pancakeswap_sweth_weth', @@ -372,6 +374,9 @@ export enum VaultTableName { ICHI_ETH = 'ichi_eth', ICHI_WBTC = 'ichi_wbtc', ICHI_USDC = 'ichi_usdc', + USDT_MPDAO = 'usdt_mpdao', + WETH_MPDAO = 'weth_mpdao', + // Mainnet PancakeSwap PANCAKESWAP_SWETH_WETH = 'pancakeswap_sweth_weth', PANCAKESWAP_WETH_SWETH = 'pancakeswap_weth_sweth', diff --git a/src/utils/token.ts b/src/utils/token.ts index abef478..fc1cc1f 100644 --- a/src/utils/token.ts +++ b/src/utils/token.ts @@ -648,6 +648,19 @@ export async function getTokenMetrics( throw new Error(`Could not lookup token prices for ${token.symbol}`); } break; + case TokenName.MPDAO: + if (opts.tokenPrices && wethAddress && wethAddress in opts.tokenPrices) { + wethPrice = opts.tokenPrices[wethAddress].usd; + price = await getPriceFromWethVault( + VaultName.WETH_MPDAO, + provider, + ChainId.Mainnet, + wethPrice + ) + } else { + throw new Error(`Could not lookup token prices for ${token.symbol}`); + } + break; case TokenName.GARBAGE: mainnetProvider = await getProvider(ChainId.Mainnet); if (!mainnetProvider) { From 4e2b0e3ee1248bcb5e480cf68548b038ec927e3b Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 30 Apr 2024 15:27:05 -0400 Subject: [PATCH 31/70] 0.0.210 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2be04cb..1cbca4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.209", + "version": "0.0.210", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.209", + "version": "0.0.210", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 20c2d78..66efff1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.209", + "version": "0.0.210", "description": "", "main": "dist/index.js", "module": "index.ts", From 812c04cab8dfb221c74441de393be2312dc121c6 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Sun, 5 May 2024 21:05:52 -0400 Subject: [PATCH 32/70] Remove duplicate vaults --- src/constants/tokens.ts | 2 +- src/constants/vaults.ts | 52 ----------------------------------------- 2 files changed, 1 insertion(+), 53 deletions(-) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 1dcbaf4..09bb4d7 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -803,7 +803,7 @@ export const TOKENS: TokenMapping = { [ChainId.Polygon]: { tokenName: TokenName.ERN, tableName: tokenNameWithChainPrefix(TokenName.ERN, ChainId.Polygon), - address: '0x85955046DF4668e1DD369D2DE9f3AEB98DD2A369', + address: '0xC3a9a54c043f348027fffAac0F2F996123A19bF4', decimals: 18, displayName: 'ERN', symbol: 'ERN', diff --git a/src/constants/vaults.ts b/src/constants/vaults.ts index d4ec9cf..fc16d7f 100644 --- a/src/constants/vaults.ts +++ b/src/constants/vaults.ts @@ -4722,32 +4722,6 @@ export const VAULTS: VaultMapping = { strategyBy: 'Bril Finance', } }, - [VaultName.POLYGON_ICHI_WETH]: { - [ChainId.Polygon]: { - vaultName: VaultName.POLYGON_ICHI_WETH, - tableName: VaultTableName.POLYGON_ICHI_WETH, - displayName: 'ICHI-WETH (polygon)', - address: '0x5a0834EBaFdF97DB54f45a43290b6B09D4226ec6', - deployer: '0x0768A75F616B98ee0937673bD83B7aBF142236Ea', - farm: 0, - externalFarm: '', - scarceToken: 'token1', - scarceTokenName: TokenName.WETH, - scarceTokenDecimals: 18, - scarceTokenCoingeckoId: 'weth', - baseTokenName: TokenName.ICHI_V2, - baseTokenDecimals: 18, - enableNotifications: true, - subgraphEndpoint: '', - irrStartDate: new Date(0), - isInverted: false, - isHodlVault: true, - isLegacy: isLegacy(PolygonPoolNumbers.ICHI_WETH_VAULT, ChainId.Polygon), - irrStartTxAmount: 0, - depositStatus: true, - strategyBy: 'Bril Finance', - } - }, [VaultName.POLYGON_ICHI_WMATIC]: { [ChainId.Polygon]: { vaultName: VaultName.POLYGON_ICHI_WMATIC, @@ -5749,32 +5723,6 @@ export const VAULTS: VaultMapping = { strategyBy: 'Bril Finance', } }, - [VaultName.POLYGON_QUICKSWAP_WMATIC_QUICK]: { - [ChainId.Polygon]: { - vaultName: VaultName.POLYGON_QUICKSWAP_WMATIC_QUICK, - tableName: VaultTableName.POLYGON_QUICKSWAP_WMATIC_QUICK, - displayName: 'WMATIC-QUICK (quickswap)', - address: '0x74b706767f18a360c0083854ab42c1b96e076229', - deployer: '0x0768A75F616B98ee0937673bD83B7aBF142236Ea', - farm: 0, - externalFarm: '', - scarceToken: 'token1', - scarceTokenName: TokenName.QUICK, - scarceTokenDecimals: tokenDecimals(TokenName.QUICK, ChainId.Polygon), - scarceTokenCoingeckoId: 'quickswap', - baseTokenName: TokenName.WMATIC, - baseTokenDecimals: tokenDecimals(TokenName.WMATIC, ChainId.Polygon), - enableNotifications: true, - subgraphEndpoint: '', - irrStartDate: new Date(0), - isInverted: false, - isHodlVault: true, - isLegacy: isLegacy(PolygonPoolNumbers.QUICKSWAP_WMATIC_QUICK_VAULT, ChainId.Polygon), - irrStartTxAmount: 0, - depositStatus: true, - strategyBy: 'Bril Finance', - } - }, [VaultName.POLYGON_QUICKSWAP_WMATIC_USDT]: { [ChainId.Polygon]: { vaultName: VaultName.POLYGON_QUICKSWAP_WMATIC_USDT, From 0585f2e113bc134f112117ec0476d90ec3dd6047 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Sun, 5 May 2024 21:25:04 -0400 Subject: [PATCH 33/70] Remove duplicate vaults addition --- src/constants/poolLabels.ts | 29 ----------------------------- src/constants/pools.ts | 4 ---- src/enums/poolNumber.ts | 2 -- src/enums/vaultName.ts | 4 ---- 4 files changed, 39 deletions(-) diff --git a/src/constants/poolLabels.ts b/src/constants/poolLabels.ts index 0176da3..92c8ed8 100644 --- a/src/constants/poolLabels.ts +++ b/src/constants/poolLabels.ts @@ -1790,21 +1790,6 @@ export const PoolLabels: TPoolLabels = { irrStartDate: new Date(0), irrStartTxAmount: 0 }, - [PolygonPoolNumbers.ICHI_WETH_VAULT]: { - name: 'ICHI-WETH Vault', - poolNumber: PolygonPoolNumbers.ICHI_WETH_VAULT, - lpName: 'ICHI_VAULT_LP', - shortLpName: 'VAULT_LP', - tradeUrl: - 'https://app.uniswap.org/#/swap?inputCurrency=0x7ceb23fd6bc0add59e62ac25578270cff1b9f619&outputCurrency=0x111111517e4929D3dcbdfa7CCe55d30d4B6BC4d6&chain=polygon', - subgraphEndpoint: '', - isInverted: false, - isHodl: true, - vaultName: VaultName.POLYGON_ICHI_WETH, - vaultAddress: '0x5a0834EBaFdF97DB54f45a43290b6B09D4226ec6', - irrStartDate: new Date(0), - irrStartTxAmount: 0 - }, [PolygonPoolNumbers.ICHI_WMATIC_VAULT]: { name: 'ICHI-WMATIC Vault', poolNumber: PolygonPoolNumbers.ICHI_WMATIC_VAULT, @@ -2952,20 +2937,6 @@ export const PoolLabels: TPoolLabels = { irrStartDate: new Date(0), irrStartTxAmount: 0 }, - [PolygonPoolNumbers.QUICKSWAP_WMATIC_QUICK_VAULT]: { - name: 'WMATIC-QUICK Vault', - poolNumber: PolygonPoolNumbers.QUICKSWAP_WMATIC_QUICK_VAULT, - lpName: 'ICHI_VAULT_LP', - shortLpName: 'VAULT_LP', - tradeUrl: '', - subgraphEndpoint: '', - isInverted: isVaultInverted(VaultName.POLYGON_QUICKSWAP_WMATIC_QUICK, ChainId.Polygon), - isHodl: true, - vaultName: VaultName.POLYGON_QUICKSWAP_WMATIC_QUICK, - vaultAddress: getVaultAddress(VaultName.POLYGON_QUICKSWAP_WMATIC_QUICK, ChainId.Polygon), - irrStartDate: new Date(0), - irrStartTxAmount: 0 - }, [PolygonPoolNumbers.QUICKSWAP_WMATIC_USDT_VAULT]: { name: 'WMATIC-USDT Vault', poolNumber: PolygonPoolNumbers.QUICKSWAP_WMATIC_USDT_VAULT, diff --git a/src/constants/pools.ts b/src/constants/pools.ts index a9d18ad..c1e6dd6 100644 --- a/src/constants/pools.ts +++ b/src/constants/pools.ts @@ -331,7 +331,6 @@ export const Pools: TPools = { PolygonPoolNumbers.GOVI_VAULT, PolygonPoolNumbers.ICHI_USDC_VAULT, PolygonPoolNumbers.ICHI_WBTC_VAULT, - PolygonPoolNumbers.ICHI_WETH_VAULT, PolygonPoolNumbers.ICHI_WMATIC_VAULT, PolygonPoolNumbers.LINK_WETH_VAULT, PolygonPoolNumbers.ONE_BTC_VAULT, @@ -370,7 +369,6 @@ export const Pools: TPools = { PolygonPoolNumbers.QUICKSWAP_WETH_WEFI_VAULT, PolygonPoolNumbers.QUICKSWAP_WMATIC_ABOND_VAULT, PolygonPoolNumbers.QUICKSWAP_WMATIC_ICHI_VAULT, - PolygonPoolNumbers.QUICKSWAP_WMATIC_QUICK_VAULT, PolygonPoolNumbers.QUICKSWAP_WMATIC_USDT_VAULT, PolygonPoolNumbers.QUICKSWAP_WMATIC_WETH_VAULT, // Retro @@ -983,7 +981,6 @@ export const Pools: TPools = { PolygonPoolNumbers.QUICKSWAP_WETH_WEFI_VAULT, PolygonPoolNumbers.QUICKSWAP_WMATIC_ABOND_VAULT, PolygonPoolNumbers.QUICKSWAP_WMATIC_ICHI_VAULT, - PolygonPoolNumbers.QUICKSWAP_WMATIC_QUICK_VAULT, PolygonPoolNumbers.QUICKSWAP_WMATIC_USDT_VAULT, PolygonPoolNumbers.QUICKSWAP_WMATIC_WETH_VAULT, // Retro @@ -1162,7 +1159,6 @@ export const Pools: TPools = { PolygonPoolNumbers.QUICKSWAP_WETH_WEFI_VAULT, PolygonPoolNumbers.QUICKSWAP_WMATIC_ABOND_VAULT, PolygonPoolNumbers.QUICKSWAP_WMATIC_ICHI_VAULT, - PolygonPoolNumbers.QUICKSWAP_WMATIC_QUICK_VAULT, PolygonPoolNumbers.QUICKSWAP_WMATIC_USDT_VAULT, PolygonPoolNumbers.QUICKSWAP_WMATIC_WETH_VAULT, ], diff --git a/src/enums/poolNumber.ts b/src/enums/poolNumber.ts index cefca18..8e75a78 100644 --- a/src/enums/poolNumber.ts +++ b/src/enums/poolNumber.ts @@ -113,7 +113,6 @@ export enum PolygonPoolNumbers { TRADE_USDT_VAULT = 4005, ICHI_USDC_VAULT = 7500, ICHI_WBTC_VAULT = 7501, - ICHI_WETH_VAULT = 7502, ICHI_WMATIC_VAULT = 7503, BAL_WETH_VAULT = 7504, DPI_WETH_VAULT = 7505, @@ -184,7 +183,6 @@ export enum PolygonPoolNumbers { QUICKSWAP_WETH_ICHI_VAULT = 7570, QUICKSWAP_WETH_QUICK_VAULT = 7571, QUICKSWAP_WETH_USDT_VAULT = 7572, - QUICKSWAP_WMATIC_QUICK_VAULT = 7573, QUICKSWAP_WMATIC_USDT_VAULT = 7574, QUICKSWAP_WMATIC_WETH_VAULT = 7575, QUICKSWAP_USDC_ABOND_VAULT = 7576, diff --git a/src/enums/vaultName.ts b/src/enums/vaultName.ts index 77e52d4..0272411 100644 --- a/src/enums/vaultName.ts +++ b/src/enums/vaultName.ts @@ -198,7 +198,6 @@ export enum VaultName { POLYGON_GOVI = 'pol_govi', POLYGON_ICHI_USDC = 'pol_ichi_usdc', POLYGON_ICHI_WBTC = 'pol_ichi_wbtc', - POLYGON_ICHI_WETH = 'pol_ichi_weth', POLYGON_ICHI_WMATIC = 'pol_ichi_wmatic', POLYGON_LINK_WETH = 'pol_link_weth', POLYGON_ONEBTC = 'pol_onebtc', @@ -237,7 +236,6 @@ export enum VaultName { POLYGON_QUICKSWAP_WETH_WEFI = 'pol_quickswap_weth_wefi', POLYGON_QUICKSWAP_WMATIC_ABOND = 'pol_quickswap_wmatic_abond', POLYGON_QUICKSWAP_WMATIC_ICHI = 'pol_quickswap_wmatic_ichi', - POLYGON_QUICKSWAP_WMATIC_QUICK = 'pol_quickswap_wmatic_quick', POLYGON_QUICKSWAP_WMATIC_USDT = 'pol_quickswap_wmatic_usdt', POLYGON_QUICKSWAP_WMATIC_WETH = 'pol_quickswap_wmatic_weth', // Polygon-Retro @@ -500,7 +498,6 @@ export enum VaultTableName { POLYGON_GOVI_ICHI = 'pol_govi_ichi', POLYGON_ICHI_USDC = 'pol_ichi_usdc', POLYGON_ICHI_WBTC = 'pol_ichi_wbtc', - POLYGON_ICHI_WETH = 'pol_ichi_weth', POLYGON_ICHI_WMATIC = 'pol_ichi_wmatic', POLYGON_LINK_WETH = 'pol_link_weth', POLYGON_ONEBTC_ICHI = 'pol_onebtc_ichi', @@ -539,7 +536,6 @@ export enum VaultTableName { POLYGON_QUICKSWAP_WETH_WEFI = 'pol_quickswap_weth_wefi', POLYGON_QUICKSWAP_WMATIC_ABOND = 'pol_quickswap_wmatic_abond', POLYGON_QUICKSWAP_WMATIC_ICHI = 'pol_quickswap_wmatic_ichi', - POLYGON_QUICKSWAP_WMATIC_QUICK = 'pol_quickswap_wmatic_quick', POLYGON_QUICKSWAP_WMATIC_USDT = 'pol_quickswap_wmatic_usdt', POLYGON_QUICKSWAP_WMATIC_WETH = 'pol_quickswap_wmatic_weth', // Polygon-Retro From a7b8f859f5e213ad18ee399bc3e9e7538334356c Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Sun, 5 May 2024 21:38:24 -0400 Subject: [PATCH 34/70] 0.0.211 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1cbca4c..8f6df0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.210", + "version": "0.0.211", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.210", + "version": "0.0.211", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 66efff1..ec66bb5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.210", + "version": "0.0.211", "description": "", "main": "dist/index.js", "module": "index.ts", From 9df9ef8cd9d34525bd57b2bd13b2d5b42fb8d2db Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Sun, 21 Apr 2024 22:20:55 -0400 Subject: [PATCH 35/70] 0.0.208 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3f11580..9667463 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.207", + "version": "0.0.208", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.207", + "version": "0.0.208", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 729ea0e..4ddc343 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.207", + "version": "0.0.208", "description": "", "main": "dist/index.js", "module": "index.ts", From f4a55249300f0c386df8b02dfe4aa40f0eb448dd Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Mon, 29 Apr 2024 22:09:16 -0400 Subject: [PATCH 36/70] 0.0.209 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9667463..2be04cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.208", + "version": "0.0.209", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.208", + "version": "0.0.209", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 4ddc343..20c2d78 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.208", + "version": "0.0.209", "description": "", "main": "dist/index.js", "module": "index.ts", From 3b4b98b7a5796851bccf1233651198ddf84bf163 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 30 Apr 2024 15:27:05 -0400 Subject: [PATCH 37/70] 0.0.210 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2be04cb..1cbca4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.209", + "version": "0.0.210", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.209", + "version": "0.0.210", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 20c2d78..66efff1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.209", + "version": "0.0.210", "description": "", "main": "dist/index.js", "module": "index.ts", From 1f9327531acac3187be1da2fddb26fdbc62726a4 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Sun, 5 May 2024 21:38:24 -0400 Subject: [PATCH 38/70] 0.0.211 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1cbca4c..8f6df0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.210", + "version": "0.0.211", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.210", + "version": "0.0.211", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 66efff1..ec66bb5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.210", + "version": "0.0.211", "description": "", "main": "dist/index.js", "module": "index.ts", From 2fc1409ea09ac6d0a49b80f95ff6593a940f0dee Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Mon, 13 May 2024 22:58:42 -0400 Subject: [PATCH 39/70] update Pancake vaults for Bril UI integration --- src/constants/poolLabels.ts | 42 -------------------- src/constants/pools.ts | 24 +++++++----- src/constants/vaults.ts | 78 ------------------------------------- src/enums/poolNumber.ts | 3 -- src/enums/vaultName.ts | 6 --- 5 files changed, 15 insertions(+), 138 deletions(-) diff --git a/src/constants/poolLabels.ts b/src/constants/poolLabels.ts index 92c8ed8..be4c994 100644 --- a/src/constants/poolLabels.ts +++ b/src/constants/poolLabels.ts @@ -3519,20 +3519,6 @@ export const PoolLabels: TPoolLabels = { }, // Bsc [ChainId.Bsc]: { - [BscPoolNumbers.AIOZ_USDT_VAULT]: { - name: 'AIOZ-USDT Vault', - poolNumber: BscPoolNumbers.AIOZ_USDT_VAULT, - lpName: 'ICHI_VAULT_LP', - shortLpName: 'VAULT_LP', - tradeUrl: '', - subgraphEndpoint: '', - isInverted: isVaultInverted(VaultName.BSC_AIOZ_USDT, ChainId.Bsc), - isHodl: true, - vaultName: VaultName.BSC_AIOZ_USDT, - vaultAddress: getVaultAddress(VaultName.BSC_AIOZ_USDT, ChainId.Bsc), - irrStartDate: new Date(0), - irrStartTxAmount: 0 - }, [BscPoolNumbers.AIOZ_WBNB_VAULT]: { name: 'AIOZ-WBNB Vault', poolNumber: BscPoolNumbers.AIOZ_WBNB_VAULT, @@ -3617,20 +3603,6 @@ export const PoolLabels: TPoolLabels = { irrStartDate: new Date(0), irrStartTxAmount: 0 }, - [BscPoolNumbers.USDT_AIOZ_VAULT]: { - name: 'USDT-AIOZ Vault', - poolNumber: BscPoolNumbers.USDT_AIOZ_VAULT, - lpName: 'ICHI_VAULT_LP', - shortLpName: 'VAULT_LP', - tradeUrl: '', - subgraphEndpoint: '', - isInverted: isVaultInverted(VaultName.BSC_USDT_AIOZ, ChainId.Bsc), - isHodl: true, - vaultName: VaultName.BSC_USDT_AIOZ, - vaultAddress: getVaultAddress(VaultName.BSC_USDT_AIOZ, ChainId.Bsc), - irrStartDate: new Date(0), - irrStartTxAmount: 0 - }, [BscPoolNumbers.USDT_CAKE_VAULT]: { name: 'USDT-CAKE Vault', poolNumber: BscPoolNumbers.USDT_CAKE_VAULT, @@ -3659,20 +3631,6 @@ export const PoolLabels: TPoolLabels = { irrStartDate: new Date(0), irrStartTxAmount: 0 }, - [BscPoolNumbers.WBNB_AIOZ_VAULT]: { - name: 'WBNB-AIOZ Vault', - poolNumber: BscPoolNumbers.WBNB_AIOZ_VAULT, - lpName: 'ICHI_VAULT_LP', - shortLpName: 'VAULT_LP', - tradeUrl: '', - subgraphEndpoint: '', - isInverted: isVaultInverted(VaultName.BSC_WBNB_AIOZ, ChainId.Bsc), - isHodl: true, - vaultName: VaultName.BSC_WBNB_AIOZ, - vaultAddress: getVaultAddress(VaultName.BSC_WBNB_AIOZ, ChainId.Bsc), - irrStartDate: new Date(0), - irrStartTxAmount: 0 - }, [BscPoolNumbers.WBNB_CAKE_VAULT]: { name: 'WBNB-CAKE Vault', poolNumber: BscPoolNumbers.WBNB_CAKE_VAULT, diff --git a/src/constants/pools.ts b/src/constants/pools.ts index c1e6dd6..b849fc1 100644 --- a/src/constants/pools.ts +++ b/src/constants/pools.ts @@ -461,7 +461,6 @@ export const Pools: TPools = { [ChainId.Avalanche]: [], [ChainId.Bsc]: [ // Pancake - BscPoolNumbers.AIOZ_USDT_VAULT, BscPoolNumbers.AIOZ_WBNB_VAULT, BscPoolNumbers.BTCB_CAKE_VAULT, BscPoolNumbers.BTCB_USDT_VAULT, @@ -472,10 +471,8 @@ export const Pools: TPools = { BscPoolNumbers.ORDI_WBNB_VAULT, BscPoolNumbers.SATS_WBNB_VAULT, BscPoolNumbers.USDC_ETH_VAULT, - BscPoolNumbers.USDT_AIOZ_VAULT, BscPoolNumbers.USDT_CAKE_VAULT, BscPoolNumbers.USDT_WBNB_VAULT, - BscPoolNumbers.WBNB_AIOZ_VAULT, BscPoolNumbers.WBNB_CAKE_VAULT, // Thena BscPoolNumbers.THENA_BTCB_THE_VAULT, @@ -954,8 +951,9 @@ export const Pools: TPools = { // They are available by direct link [PoolGroupName.HIDDEN_VAULTS]: { [ChainId.Mainnet]: [ - MainnetPoolNumbers.PANCAKESWAP_WETH_USDT_VAULT, + MainnetPoolNumbers.PANCAKESWAP_SWETH_WETH_VAULT, MainnetPoolNumbers.PANCAKESWAP_WETH_SWETH_VAULT, + MainnetPoolNumbers.PANCAKESWAP_WETH_USDT_VAULT, // Blueprint MainnetPoolNumbers.BLUEPRINT_USDC_BLUE_VAULT, MainnetPoolNumbers.BLUEPRINT_WETH_BLUE_VAULT, @@ -1062,11 +1060,19 @@ export const Pools: TPools = { ], [ChainId.Avalanche]: [], [ChainId.Bsc]: [ - BscPoolNumbers.CAKE_USDT_VAULT, - BscPoolNumbers.CAKE_WBNB_VAULT, - // BscPoolNumbers.USDT_CAKE_VAULT, - // BscPoolNumbers.USDT_WBNB_VAULT, - // BscPoolNumbers.WBNB_CAKE_VAULT, + BscPoolNumbers.AIOZ_WBNB_VAULT, + BscPoolNumbers.BTCB_CAKE_VAULT, + BscPoolNumbers.BTCB_USDT_VAULT, + BscPoolNumbers.CAKE_USDT_VAULT, + BscPoolNumbers.CAKE_WBNB_VAULT, + BscPoolNumbers.ETH_CAKE_VAULT, + BscPoolNumbers.MUBI_WBNB_VAULT, + BscPoolNumbers.ORDI_WBNB_VAULT, + BscPoolNumbers.SATS_WBNB_VAULT, + BscPoolNumbers.USDC_ETH_VAULT, + BscPoolNumbers.USDT_CAKE_VAULT, + BscPoolNumbers.USDT_WBNB_VAULT, + BscPoolNumbers.WBNB_CAKE_VAULT, // Thena BscPoolNumbers.THENA_BTCB_THE_VAULT, BscPoolNumbers.THENA_ETH_THE_VAULT, diff --git a/src/constants/vaults.ts b/src/constants/vaults.ts index fc16d7f..a0975df 100644 --- a/src/constants/vaults.ts +++ b/src/constants/vaults.ts @@ -2992,32 +2992,6 @@ export const VAULTS: VaultMapping = { } }, // Bsc - [VaultName.BSC_AIOZ_USDT]: { - [ChainId.Bsc]: { - vaultName: VaultName.BSC_AIOZ_USDT, - tableName: VaultTableName.BSC_AIOZ_USDT, - displayName: 'AIOZ-USDT (bsc-pancakeswap)', - address: '0x10e4bbeD1064C0ceE9667f91085D07353Cc58D30', - deployer: '0x05cC3CA6E768a68A7f86b09e3ceE754437bd5f12', - farm: 0, - externalFarm: '', - scarceToken: 'token1', - scarceTokenName: TokenName.USDT, - scarceTokenDecimals: tokenDecimals(TokenName.USDT, ChainId.Bsc), - scarceTokenCoingeckoId: '', - baseTokenName: TokenName.AIOZ, - baseTokenDecimals: tokenDecimals(TokenName.AIOZ, ChainId.Bsc), - enableNotifications: true, - subgraphEndpoint: '', - irrStartDate: new Date(0), - isInverted: false, - isHodlVault: true, - isLegacy: isLegacy(BscPoolNumbers.AIOZ_USDT_VAULT, ChainId.Bsc), - irrStartTxAmount: 0, - depositStatus: true, - strategyBy: 'Bril Finance', - } - }, [VaultName.BSC_AIOZ_WBNB]: { [ChainId.Bsc]: { vaultName: VaultName.BSC_AIOZ_WBNB, @@ -3278,32 +3252,6 @@ export const VAULTS: VaultMapping = { strategyBy: 'Bril Finance', } }, - [VaultName.BSC_USDT_AIOZ]: { - [ChainId.Bsc]: { - vaultName: VaultName.BSC_USDT_AIOZ, - tableName: VaultTableName.BSC_USDT_AIOZ, - displayName: 'USDT-AIOZ (bsc-pancakeswap)', - address: '0x48C074Cb02Eb62EC04EB110B4D710CB5665b60e0', - deployer: '0x05cC3CA6E768a68A7f86b09e3ceE754437bd5f12', - farm: 0, - externalFarm: '', - scarceToken: 'token0', - scarceTokenName: TokenName.AIOZ, - scarceTokenDecimals: tokenDecimals(TokenName.AIOZ, ChainId.Bsc), - scarceTokenCoingeckoId: '', - baseTokenName: TokenName.USDT, - baseTokenDecimals: tokenDecimals(TokenName.USDT, ChainId.Bsc), - enableNotifications: true, - subgraphEndpoint: '', - irrStartDate: new Date(0), - isInverted: true, - isHodlVault: true, - isLegacy: isLegacy(BscPoolNumbers.USDT_AIOZ_VAULT, ChainId.Bsc), - irrStartTxAmount: 0, - depositStatus: true, - strategyBy: 'Bril Finance', - } - }, [VaultName.BSC_USDT_CAKE]: { [ChainId.Bsc]: { vaultName: VaultName.BSC_USDT_CAKE, @@ -3356,32 +3304,6 @@ export const VAULTS: VaultMapping = { strategyBy: 'Bril Finance', } }, - [VaultName.BSC_WBNB_AIOZ]: { - [ChainId.Bsc]: { - vaultName: VaultName.BSC_WBNB_AIOZ, - tableName: VaultTableName.BSC_WBNB_AIOZ, - displayName: 'WBNB-AIOZ (bsc-pancakeswap)', - address: '0xe8Bec06ae06968bb8A73CA46f2f83b2A00777aB9', - deployer: '0x05cC3CA6E768a68A7f86b09e3ceE754437bd5f12', - farm: 0, - externalFarm: '', - scarceToken: 'token0', - scarceTokenName: TokenName.AIOZ, - scarceTokenDecimals: tokenDecimals(TokenName.AIOZ, ChainId.Bsc), - scarceTokenCoingeckoId: '', - baseTokenName: TokenName.WBNB, - baseTokenDecimals: tokenDecimals(TokenName.WBNB, ChainId.Bsc), - enableNotifications: true, - subgraphEndpoint: '', - irrStartDate: new Date(0), - isInverted: true, - isHodlVault: true, - isLegacy: isLegacy(BscPoolNumbers.WBNB_AIOZ_VAULT, ChainId.Bsc), - irrStartTxAmount: 0, - depositStatus: true, - strategyBy: 'Bril Finance', - } - }, [VaultName.BSC_WBNB_CAKE]: { [ChainId.Bsc]: { vaultName: VaultName.BSC_WBNB_CAKE, diff --git a/src/enums/poolNumber.ts b/src/enums/poolNumber.ts index 8e75a78..df49310 100644 --- a/src/enums/poolNumber.ts +++ b/src/enums/poolNumber.ts @@ -268,10 +268,7 @@ export enum BscPoolNumbers { THENA_OATH_WBNB_VAULT = 7917, THENA_WBNB_ICHI_VAULT = 7918, UNIV3_ICHI_WBNB_VAULT = 7919, - AIOZ_USDT_VAULT = 7920, AIOZ_WBNB_VAULT = 7921, - USDT_AIOZ_VAULT = 7922, - WBNB_AIOZ_VAULT = 7923, MUBI_WBNB_VAULT = 7924, ORDI_WBNB_VAULT = 7925, SATS_WBNB_VAULT = 7926, diff --git a/src/enums/vaultName.ts b/src/enums/vaultName.ts index 0272411..6a68d04 100644 --- a/src/enums/vaultName.ts +++ b/src/enums/vaultName.ts @@ -124,7 +124,6 @@ export enum VaultName { ARBITRUM_SUSHISWAP_WBTC_ICHI = 'arbitrum_sushiswap_wbtc_ichi', // Avalanche // Bsc-PancakeSwap - BSC_AIOZ_USDT = 'bsc_aioz_usdt', BSC_AIOZ_WBNB = 'bsc_aioz_wbnb', BSC_BTCB_CAKE = 'bsc_btcb_cake', BSC_BTCB_USDT = 'bsc_btcb_usdt', @@ -135,10 +134,8 @@ export enum VaultName { BSC_ORDI_WBNB = 'bsc_ordi_wbnb', BSC_SATS_WBNB = 'bsc_sats_wbnb', BSC_USDC_ETH = 'bsc_usdc_eth', - BSC_USDT_AIOZ = 'bsc_usdt_aioz', BSC_USDT_CAKE = 'bsc_usdt_cake', BSC_USDT_WBNB = 'bsc_usdt_wbnb', - BSC_WBNB_AIOZ = 'bsc_wbnb_aioz', BSC_WBNB_CAKE = 'bsc_wbnb_cake', // Bsc-Thena BSC_THENA_BTCB_THE = 'bsc_thena_btcb_the', @@ -424,7 +421,6 @@ export enum VaultTableName { ARBITRUM_SUSHISWAP_WBTC_ICHI = 'arbitrum_sushiswap_wbtc_ichi', // Avalanche // Bsc-PancakeSwap - BSC_AIOZ_USDT = 'bsc_aioz_usdt', BSC_AIOZ_WBNB = 'bsc_aioz_wbnb', BSC_BTCB_CAKE = 'bsc_btcb_cake', BSC_BTCB_USDT = 'bsc_btcb_usdt', @@ -435,10 +431,8 @@ export enum VaultTableName { BSC_ORDI_WBNB = 'bsc_ordi_wbnb', BSC_SATS_WBNB = 'bsc_sats_wbnb', BSC_USDC_ETH = 'bsc_usdc_eth', - BSC_USDT_AIOZ = 'bsc_usdt_aioz', BSC_USDT_CAKE = 'bsc_usdt_cake', BSC_USDT_WBNB = 'bsc_usdt_wbnb', - BSC_WBNB_AIOZ = 'bsc_wbnb_aioz', BSC_WBNB_CAKE = 'bsc_wbnb_cake', // Bsc-Thena BSC_THENA_BTCB_THE = 'bsc_thena_btcb_the', From fb059c0f372317d74ba18e85ce55f26e82458bae Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Mon, 13 May 2024 23:08:25 -0400 Subject: [PATCH 40/70] 0.0.212 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8f6df0c..0f3c8aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.211", + "version": "0.0.212", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.211", + "version": "0.0.212", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index ec66bb5..9e43b8b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.211", + "version": "0.0.212", "description": "", "main": "dist/index.js", "module": "index.ts", From e915b17a3033b51e586b0eaaea8bb6e0efdac323 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Wed, 15 May 2024 15:41:35 -0400 Subject: [PATCH 41/70] Add CELO coingecko ID --- src/constants/tokens.ts | 13 ------------- src/crypto/networks.ts | 2 +- src/enums/tokenName.ts | 1 - src/utils/token.ts | 10 ---------- 4 files changed, 1 insertion(+), 25 deletions(-) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 09bb4d7..b9cf750 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -555,19 +555,6 @@ export const TOKENS: TokenMapping = { atCoingecko: true } }, - [TokenName.CELO]: { - [ChainId.Celo]: { - tokenName: TokenName.CELO, - tableName: tokenNameWithChainPrefix(TokenName.CELO, ChainId.Celo), - address: '0x471EcE3750Da237f93B8E339c536989b8978a438', - decimals: 18, - displayName: 'CELO', - symbol: 'CELO', - fullName: 'Celo native asset', - isOneToken: false, - atCoingecko: false, - } - }, [TokenName.CEUR]: { [ChainId.Celo]: { tokenName: TokenName.CEUR, diff --git a/src/crypto/networks.ts b/src/crypto/networks.ts index ffb0d9a..e445371 100644 --- a/src/crypto/networks.ts +++ b/src/crypto/networks.ts @@ -221,7 +221,7 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = { env: 'mainnet', scanLink: 'celoscan.io', scanName: 'CeloScan', - coingecko: '', + coingecko: 'celo', rpc: { rpcUrl: 'https://1rpc.io/celo', nativeCurrency: { diff --git a/src/enums/tokenName.ts b/src/enums/tokenName.ts index 54db195..7023270 100644 --- a/src/enums/tokenName.ts +++ b/src/enums/tokenName.ts @@ -27,7 +27,6 @@ export enum TokenName { CAKE = 'cake', CASH = 'cash', CEL = 'cel', - CELO = 'celo', CEUR = 'ceur', CHO = 'cho', CLEO = 'cleo', diff --git a/src/utils/token.ts b/src/utils/token.ts index fc1cc1f..e7b047a 100644 --- a/src/utils/token.ts +++ b/src/utils/token.ts @@ -427,16 +427,6 @@ export async function getTokenMetrics( throw new Error(`Could not lookup token prices for ${token.symbol}, possibly flooding CoinGecko`); } break; - case TokenName.CELO: - const celoCoingeckoId = 'celo'; - const celoPrice = await getTokenPriceById(celoCoingeckoId, cg_key); - if (celoPrice) { - price = celoPrice[celoCoingeckoId].usd; - priceChange = celoPrice[celoCoingeckoId].usd_24h_change; - } else { - throw new Error(`Could not lookup token prices for ${token.symbol}, possibly flooding CoinGecko`); - } - break; case TokenName.CEUR: const ceurCoingeckoId = 'celo-euro'; const ceurPrice = await getTokenPriceById(ceurCoingeckoId, cg_key); From d25f3a7d2855a990fae66dcfb10f1b5830e3ed76 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Wed, 15 May 2024 21:06:54 -0400 Subject: [PATCH 42/70] 0.0.213 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0f3c8aa..e5b1b23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.212", + "version": "0.0.213", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.212", + "version": "0.0.213", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 9e43b8b..2bf0a35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.212", + "version": "0.0.213", "description": "", "main": "dist/index.js", "module": "index.ts", From 8d487a4981e0bec12f009e0fd026e32d198bcab7 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 21 May 2024 10:57:41 -0400 Subject: [PATCH 43/70] Add Arthera --- src/crypto/networks.ts | 22 ++++++++++++++++++++-- src/crypto/providers.ts | 7 +++++++ src/utils/env.ts | 2 ++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/crypto/networks.ts b/src/crypto/networks.ts index e445371..6c309f9 100644 --- a/src/crypto/networks.ts +++ b/src/crypto/networks.ts @@ -8,6 +8,7 @@ export enum ChainId { Polygon = 137, Mumbai = 80001, Arbitrum = 42161, + Arthera = 10242, Avalanche = 43114, Base = 8453, Blast = 81457, @@ -114,7 +115,7 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = { chainId: ChainId.Arbitrum, name: 'Arbitrum', color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)', - icon: generateIconUrl(ChainId.Polygon, 'svg'), + icon: generateIconUrl(ChainId.Arbitrum, 'svg'), env: 'mainnet', scanLink: 'arbiscan.io', scanName: 'Arbiscan', @@ -127,11 +128,28 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = { } } }, + [ChainId.Arthera]: { + chainId: ChainId.Arthera, + name: 'Arthera', + color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)', + icon: generateIconUrl(ChainId.Arthera, 'svg'), + env: 'mainnet', + scanLink: 'explorer.arthera.net', + scanName: 'Arthera explorer', + coingecko: '', + rpc: { + rpcUrl: `https://rpc.arthera.net`, + nativeCurrency: { + symbol: 'AA', + name: 'AA' + } + } + }, [ChainId.Avalanche]: { chainId: ChainId.Avalanche, name: 'Avalanche', color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)', - icon: generateIconUrl(ChainId.Polygon, 'svg'), + icon: generateIconUrl(ChainId.Avalanche, 'svg'), env: 'mainnet', scanLink: 'snowtrace.io', scanName: 'Snowtrace', diff --git a/src/crypto/providers.ts b/src/crypto/providers.ts index bdb4aa5..ba9c10c 100644 --- a/src/crypto/providers.ts +++ b/src/crypto/providers.ts @@ -32,6 +32,11 @@ export const providerCacheReference: Record = { cacheHit: 0, cacheMiss: 0 }, + [ChainId.Arthera]: { + lastUdated: 0, + cacheHit: 0, + cacheMiss: 0 + }, [ChainId.Base]: { lastUdated: 0, cacheHit: 0, @@ -230,6 +235,8 @@ const getRpcEnvName = (chainId: ChainId): EnvUtils.EnvName => { return EnvUtils.EnvName.MAINNET_RPC_HOSTS; case ChainId.Goerli: return EnvUtils.EnvName.GOERLI_RPC_HOSTS; + case ChainId.Arthera: + return EnvUtils.EnvName.ARTHERA_RPC_HOSTS; case ChainId.Base: return EnvUtils.EnvName.BASE_RPC_HOSTS; case ChainId.Blast: diff --git a/src/utils/env.ts b/src/utils/env.ts index 1ac08e6..faa1846 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -8,6 +8,7 @@ export namespace EnvUtils { CHAIN_SRC = 'CHAIN_SRC', MAINNET_RPC_HOSTS = 'MAINNET_RPC_HOSTS', GOERLI_RPC_HOSTS = 'GOERLI_RPC_HOSTS', + ARTHERA_RPC_HOSTS = 'ARTHERA_RPC_HOSTS', BASE_RPC_HOSTS = 'BASE_RPC_HOSTS', BLAST_RPC_HOSTS = 'BLAST_RPC_HOSTS', BSC_RPC_HOSTS = 'BSC_RPC_HOSTS', @@ -37,6 +38,7 @@ export namespace EnvUtils { GATSBY_CHAIN_SRC = 'GATSBY_CHAIN_SRC', GATSBY_MAINNET_RPC_HOSTS = 'GATSBY_MAINNET_RPC_HOSTS', GATSBY_GOERLI_RPC_HOSTS = 'GATSBY_GOERLI_RPC_HOSTS', + GATSBY_ARTHERA_RPC_HOSTS = 'GATSBY_ARTHERA_RPC_HOSTS', GATSBY_BASE_RPC_HOSTS = 'GATSBY_BASE_RPC_HOSTS', GATSBY_BLAST_RPC_HOSTS = 'GATSBY_BLAST_RPC_HOSTS', GATSBY_BSC_RPC_HOSTS = 'GATSBY_BSC_RPC_HOSTS', From 650af678600fd566ea3e4fe900ab36aad9bc9f56 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 21 May 2024 11:08:31 -0400 Subject: [PATCH 44/70] 0.0.214 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e5b1b23..86cea38 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.213", + "version": "0.0.214", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.213", + "version": "0.0.214", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 2bf0a35..4bbd806 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.213", + "version": "0.0.214", "description": "", "main": "dist/index.js", "module": "index.ts", From 3b1fa25dc13ee520dcb8f903b4bd675791a46580 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Wed, 22 May 2024 14:23:50 -0400 Subject: [PATCH 45/70] Remove Horiza and Zero --- src/constants/poolLabels.ts | 160 -------------------- src/constants/pools.ts | 48 ------ src/constants/tokens.ts | 13 -- src/constants/vaults.ts | 289 ------------------------------------ src/enums/poolNumber.ts | 16 -- src/enums/tokenName.ts | 1 - src/enums/vaultName.ts | 26 ---- src/utils/token.ts | 20 --- 8 files changed, 573 deletions(-) diff --git a/src/constants/poolLabels.ts b/src/constants/poolLabels.ts index be4c994..0c3e7a3 100644 --- a/src/constants/poolLabels.ts +++ b/src/constants/poolLabels.ts @@ -22,8 +22,6 @@ import { EonPoolNumberValues, FantomPoolNumbers, FantomPoolNumberValues, - ZkEvmPoolNumbers, - ZkEvmPoolNumberValues, ZkSyncPoolNumbers, ZkSyncPoolNumberValues, LineaPoolNumberValues, @@ -59,7 +57,6 @@ type TPoolLabels = { [ChainId.Linea]: PartialRecord; [ChainId.Mantle]: PartialRecord; [ChainId.opBNB]: PartialRecord; - [ChainId.zkEVM]: PartialRecord; [ChainId.zkSync]: PartialRecord; [ChainId.Mumbai]: PartialRecord; }; @@ -3488,34 +3485,6 @@ export const PoolLabels: TPoolLabels = { irrStartDate: new Date(0), irrStartTxAmount: 0 }, - [ArbitrumPoolNumbers.HORIZA_USDC_ICHI_VAULT]: { - name: 'USDC-ICHI Vault', - poolNumber: ArbitrumPoolNumbers.HORIZA_USDC_ICHI_VAULT, - lpName: 'ICHI_VAULT_LP', - shortLpName: 'VAULT_LP', - tradeUrl: '', - subgraphEndpoint: '', - isInverted: isVaultInverted(VaultName.ARBITRUM_HORIZA_USDC_ICHI, ChainId.Arbitrum), - isHodl: true, - vaultName: VaultName.ARBITRUM_HORIZA_USDC_ICHI, - vaultAddress: getVaultAddress(VaultName.ARBITRUM_HORIZA_USDC_ICHI, ChainId.Arbitrum), - irrStartDate: new Date(0), - irrStartTxAmount: 0 - }, - [ArbitrumPoolNumbers.HORIZA_WETH_ICHI_VAULT]: { - name: 'WETH-ICHI Vault', - poolNumber: ArbitrumPoolNumbers.HORIZA_WETH_ICHI_VAULT, - lpName: 'ICHI_VAULT_LP', - shortLpName: 'VAULT_LP', - tradeUrl: '', - subgraphEndpoint: '', - isInverted: isVaultInverted(VaultName.ARBITRUM_HORIZA_WETH_ICHI, ChainId.Arbitrum), - isHodl: true, - vaultName: VaultName.ARBITRUM_HORIZA_WETH_ICHI, - vaultAddress: getVaultAddress(VaultName.ARBITRUM_HORIZA_WETH_ICHI, ChainId.Arbitrum), - irrStartDate: new Date(0), - irrStartTxAmount: 0 - }, }, // Bsc [ChainId.Bsc]: { @@ -4283,135 +4252,6 @@ export const PoolLabels: TPoolLabels = { }, }, - // zkEVM - [ChainId.zkEVM]: { - [ZkEvmPoolNumbers.ZERO_MATIC_ZERO_VAULT]: { - name: 'MATIC-ZERO Vault', - poolNumber: ZkEvmPoolNumbers.ZERO_MATIC_ZERO_VAULT, - lpName: 'ICHI_VAULT_LP', - shortLpName: 'VAULT_LP', - tradeUrl: '', - subgraphEndpoint: '', - isInverted: isVaultInverted(VaultName.ZKEVM_ZERO_MATIC_ZERO, ChainId.zkEVM), - isHodl: true, - vaultName: VaultName.ZKEVM_ZERO_MATIC_ZERO, - vaultAddress: getVaultAddress(VaultName.ZKEVM_ZERO_MATIC_ZERO, ChainId.zkEVM), - irrStartDate: new Date(0), - irrStartTxAmount: 0 - }, - [ZkEvmPoolNumbers.ZERO_USDC_WETH_VAULT]: { - name: 'USDC-WETH Vault', - poolNumber: ZkEvmPoolNumbers.ZERO_USDC_WETH_VAULT, - lpName: 'ICHI_VAULT_LP', - shortLpName: 'VAULT_LP', - tradeUrl: '', - subgraphEndpoint: '', - isInverted: isVaultInverted(VaultName.ZKEVM_ZERO_USDC_WETH, ChainId.zkEVM), - isHodl: true, - vaultName: VaultName.ZKEVM_ZERO_USDC_WETH, - vaultAddress: getVaultAddress(VaultName.ZKEVM_ZERO_USDC_WETH, ChainId.zkEVM), - irrStartDate: new Date(0), - irrStartTxAmount: 0 - }, - [ZkEvmPoolNumbers.ZERO_USDC_ZERO_VAULT]: { - name: 'USDC-ZERO Vault', - poolNumber: ZkEvmPoolNumbers.ZERO_USDC_ZERO_VAULT, - lpName: 'ICHI_VAULT_LP', - shortLpName: 'VAULT_LP', - tradeUrl: '', - subgraphEndpoint: '', - isInverted: isVaultInverted(VaultName.ZKEVM_ZERO_USDC_ZERO, ChainId.zkEVM), - isHodl: true, - vaultName: VaultName.ZKEVM_ZERO_USDC_ZERO, - vaultAddress: getVaultAddress(VaultName.ZKEVM_ZERO_USDC_ZERO, ChainId.zkEVM), - irrStartDate: new Date(0), - irrStartTxAmount: 0 - }, - [ZkEvmPoolNumbers.ZERO_USDT_ZERO_VAULT]: { - name: 'USDT-ZERO Vault', - poolNumber: ZkEvmPoolNumbers.ZERO_USDT_ZERO_VAULT, - lpName: 'ICHI_VAULT_LP', - shortLpName: 'VAULT_LP', - tradeUrl: '', - subgraphEndpoint: '', - isInverted: isVaultInverted(VaultName.ZKEVM_ZERO_USDT_ZERO, ChainId.zkEVM), - isHodl: true, - vaultName: VaultName.ZKEVM_ZERO_USDT_ZERO, - vaultAddress: getVaultAddress(VaultName.ZKEVM_ZERO_USDT_ZERO, ChainId.zkEVM), - irrStartDate: new Date(0), - irrStartTxAmount: 0 - }, - [ZkEvmPoolNumbers.ZERO_WBTC_WETH_VAULT]: { - name: 'WBTC-WETH Vault', - poolNumber: ZkEvmPoolNumbers.ZERO_WBTC_WETH_VAULT, - lpName: 'ICHI_VAULT_LP', - shortLpName: 'VAULT_LP', - tradeUrl: '', - subgraphEndpoint: '', - isInverted: isVaultInverted(VaultName.ZKEVM_ZERO_WBTC_WETH, ChainId.zkEVM), - isHodl: true, - vaultName: VaultName.ZKEVM_ZERO_WBTC_WETH, - vaultAddress: getVaultAddress(VaultName.ZKEVM_ZERO_WBTC_WETH, ChainId.zkEVM), - irrStartDate: new Date(0), - irrStartTxAmount: 0 - }, - [ZkEvmPoolNumbers.ZERO_WBTC_ZERO_VAULT]: { - name: 'WBTC-ZERO Vault', - poolNumber: ZkEvmPoolNumbers.ZERO_WBTC_ZERO_VAULT, - lpName: 'ICHI_VAULT_LP', - shortLpName: 'VAULT_LP', - tradeUrl: '', - subgraphEndpoint: '', - isInverted: isVaultInverted(VaultName.ZKEVM_ZERO_WBTC_ZERO, ChainId.zkEVM), - isHodl: true, - vaultName: VaultName.ZKEVM_ZERO_WBTC_ZERO, - vaultAddress: getVaultAddress(VaultName.ZKEVM_ZERO_WBTC_ZERO, ChainId.zkEVM), - irrStartDate: new Date(0), - irrStartTxAmount: 0 - }, - [ZkEvmPoolNumbers.ZERO_WETH_USDC_VAULT]: { - name: 'WETH-USDC Vault', - poolNumber: ZkEvmPoolNumbers.ZERO_WETH_USDC_VAULT, - lpName: 'ICHI_VAULT_LP', - shortLpName: 'VAULT_LP', - tradeUrl: '', - subgraphEndpoint: '', - isInverted: isVaultInverted(VaultName.ZKEVM_ZERO_WETH_USDC, ChainId.zkEVM), - isHodl: true, - vaultName: VaultName.ZKEVM_ZERO_WETH_USDC, - vaultAddress: getVaultAddress(VaultName.ZKEVM_ZERO_WETH_USDC, ChainId.zkEVM), - irrStartDate: new Date(0), - irrStartTxAmount: 0 - }, - [ZkEvmPoolNumbers.ZERO_WETH_WBTC_VAULT]: { - name: 'WETH-WBTC Vault', - poolNumber: ZkEvmPoolNumbers.ZERO_WETH_WBTC_VAULT, - lpName: 'ICHI_VAULT_LP', - shortLpName: 'VAULT_LP', - tradeUrl: '', - subgraphEndpoint: '', - isInverted: isVaultInverted(VaultName.ZKEVM_ZERO_WETH_WBTC, ChainId.zkEVM), - isHodl: true, - vaultName: VaultName.ZKEVM_ZERO_WETH_WBTC, - vaultAddress: getVaultAddress(VaultName.ZKEVM_ZERO_WETH_WBTC, ChainId.zkEVM), - irrStartDate: new Date(0), - irrStartTxAmount: 0 - }, - [ZkEvmPoolNumbers.ZERO_WETH_ZERO_VAULT]: { - name: 'WETH-ZERO Vault', - poolNumber: ZkEvmPoolNumbers.ZERO_WETH_ZERO_VAULT, - lpName: 'ICHI_VAULT_LP', - shortLpName: 'VAULT_LP', - tradeUrl: '', - subgraphEndpoint: '', - isInverted: isVaultInverted(VaultName.ZKEVM_ZERO_WETH_ZERO, ChainId.zkEVM), - isHodl: true, - vaultName: VaultName.ZKEVM_ZERO_WETH_ZERO, - vaultAddress: getVaultAddress(VaultName.ZKEVM_ZERO_WETH_ZERO, ChainId.zkEVM), - irrStartDate: new Date(0), - irrStartTxAmount: 0 - }, - }, // zkSynk [ChainId.zkSync]: { [ZkSyncPoolNumbers.PANCAKESWAP_USDT_WETH_VAULT]: { diff --git a/src/constants/pools.ts b/src/constants/pools.ts index b849fc1..61e1a58 100644 --- a/src/constants/pools.ts +++ b/src/constants/pools.ts @@ -26,8 +26,6 @@ import { OpBnbPoolNumberValues, PolygonPoolNumbers, PolygonPoolNumberValues, - ZkEvmPoolNumbers, - ZkEvmPoolNumberValues, ZkSyncPoolNumbers, ZkSyncPoolNumberValues, } from '../enums/poolNumber'; @@ -173,7 +171,6 @@ type TPools = { [ChainId.Mantle]: MantlePoolNumberValues[]; [ChainId.opBNB]: OpBnbPoolNumberValues[]; [ChainId.Polygon]: PolygonPoolNumberValues[]; - [ChainId.zkEVM]: ZkEvmPoolNumberValues[]; [ChainId.zkSync]: ZkSyncPoolNumberValues[]; [ChainId.Mumbai]: MumbaiPoolNumberValues[]; }; @@ -207,7 +204,6 @@ export const Pools: TPools = { [ChainId.Linea]: [], [ChainId.Mantle]: [], [ChainId.opBNB]: [], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [], }, @@ -232,7 +228,6 @@ export const Pools: TPools = { [ChainId.Linea]: [], [ChainId.Mantle]: [], [ChainId.opBNB]: [], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [], }, @@ -430,9 +425,6 @@ export const Pools: TPools = { ArbitrumPoolNumbers.WBTC_ICHI_VAULT, ArbitrumPoolNumbers.WETH_ICHI_VAULT, ArbitrumPoolNumbers.WETH_LMR_VAULT, - // Horiza - ArbitrumPoolNumbers.HORIZA_USDC_ICHI_VAULT, - ArbitrumPoolNumbers.HORIZA_WETH_ICHI_VAULT, // Ramses ArbitrumPoolNumbers.RAMSES_ARB_RAM_VAULT, ArbitrumPoolNumbers.RAMSES_ARB_USDC_VAULT, @@ -527,17 +519,6 @@ export const Pools: TPools = { OpBnbPoolNumbers.THENA_USDT_WBNB_VAULT, OpBnbPoolNumbers.THENA_WBNB_ETH_VAULT, ], - [ChainId.zkEVM]: [ - ZkEvmPoolNumbers.ZERO_MATIC_ZERO_VAULT, - ZkEvmPoolNumbers.ZERO_USDC_WETH_VAULT, - ZkEvmPoolNumbers.ZERO_USDC_ZERO_VAULT, - ZkEvmPoolNumbers.ZERO_USDT_ZERO_VAULT, - ZkEvmPoolNumbers.ZERO_WBTC_WETH_VAULT, - ZkEvmPoolNumbers.ZERO_WBTC_ZERO_VAULT, - ZkEvmPoolNumbers.ZERO_WETH_USDC_VAULT, - ZkEvmPoolNumbers.ZERO_WETH_WBTC_VAULT, - ZkEvmPoolNumbers.ZERO_WETH_ZERO_VAULT, - ], [ChainId.zkSync]: [ ZkSyncPoolNumbers.PANCAKESWAP_USDT_WETH_VAULT, ZkSyncPoolNumbers.PANCAKESWAP_WETH_USDC_VAULT, @@ -559,7 +540,6 @@ export const Pools: TPools = { [ChainId.Linea]: [], [ChainId.Mantle]: [], [ChainId.opBNB]: [], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [], }, @@ -574,7 +554,6 @@ export const Pools: TPools = { [ChainId.Linea]: [], [ChainId.Mantle]: [], [ChainId.opBNB]: [], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [], }, @@ -589,7 +568,6 @@ export const Pools: TPools = { [ChainId.Linea]: [], [ChainId.Mantle]: [], [ChainId.opBNB]: [], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [], }, @@ -604,7 +582,6 @@ export const Pools: TPools = { [ChainId.Linea]: [], [ChainId.Mantle]: [], [ChainId.opBNB]: [], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [], }, @@ -702,7 +679,6 @@ export const Pools: TPools = { [ChainId.Linea]: [], [ChainId.Mantle]: [], [ChainId.opBNB]: [], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [ MumbaiPoolNumbers.ONE_BTC_ICHI_VAULT @@ -721,7 +697,6 @@ export const Pools: TPools = { [ChainId.Linea]: [], [ChainId.Mantle]: [], [ChainId.opBNB]: [], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [], }, @@ -738,7 +713,6 @@ export const Pools: TPools = { [ChainId.Linea]: [], [ChainId.Mantle]: [], [ChainId.opBNB]: [], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [], }, @@ -756,7 +730,6 @@ export const Pools: TPools = { [ChainId.Linea]: [], [ChainId.Mantle]: [], [ChainId.opBNB]: [], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [], }, @@ -773,7 +746,6 @@ export const Pools: TPools = { [ChainId.Linea]: [], [ChainId.Mantle]: [], [ChainId.opBNB]: [], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [], }, @@ -790,7 +762,6 @@ export const Pools: TPools = { [ChainId.Linea]: [], [ChainId.Mantle]: [], [ChainId.opBNB]: [], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [], }, @@ -808,7 +779,6 @@ export const Pools: TPools = { [ChainId.Linea]: [], [ChainId.Mantle]: [], [ChainId.opBNB]: [], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [], }, @@ -828,7 +798,6 @@ export const Pools: TPools = { [ChainId.Linea]: [], [ChainId.Mantle]: [], [ChainId.opBNB]: [], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [], }, @@ -913,7 +882,6 @@ export const Pools: TPools = { [ChainId.Linea]: [], [ChainId.Mantle]: [], [ChainId.opBNB]: [], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [], }, @@ -943,7 +911,6 @@ export const Pools: TPools = { [ChainId.Linea]: [], [ChainId.Mantle]: [], [ChainId.opBNB]: [], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [], }, @@ -1030,9 +997,6 @@ export const Pools: TPools = { PolygonPoolNumbers.RETRO_WMATIC_WETH_VAULT, ], [ChainId.Arbitrum]: [ - // Horiza - ArbitrumPoolNumbers.HORIZA_USDC_ICHI_VAULT, - ArbitrumPoolNumbers.HORIZA_WETH_ICHI_VAULT, // Ramses ArbitrumPoolNumbers.RAMSES_ARB_RAM_VAULT, ArbitrumPoolNumbers.RAMSES_ARB_USDC_VAULT, @@ -1124,17 +1088,6 @@ export const Pools: TPools = { OpBnbPoolNumbers.THENA_USDT_WBNB_VAULT, OpBnbPoolNumbers.THENA_WBNB_ETH_VAULT, ], - [ChainId.zkEVM]: [ - ZkEvmPoolNumbers.ZERO_MATIC_ZERO_VAULT, - ZkEvmPoolNumbers.ZERO_USDC_WETH_VAULT, - ZkEvmPoolNumbers.ZERO_USDC_ZERO_VAULT, - ZkEvmPoolNumbers.ZERO_USDT_ZERO_VAULT, - ZkEvmPoolNumbers.ZERO_WBTC_WETH_VAULT, - ZkEvmPoolNumbers.ZERO_WBTC_ZERO_VAULT, - ZkEvmPoolNumbers.ZERO_WETH_USDC_VAULT, - ZkEvmPoolNumbers.ZERO_WETH_WBTC_VAULT, - ZkEvmPoolNumbers.ZERO_WETH_ZERO_VAULT, - ], [ChainId.zkSync]: [ ZkSyncPoolNumbers.PANCAKESWAP_USDT_WETH_VAULT, ZkSyncPoolNumbers.PANCAKESWAP_WETH_USDC_VAULT, @@ -1206,7 +1159,6 @@ export const Pools: TPools = { OpBnbPoolNumbers.THENA_USDT_WBNB_VAULT, OpBnbPoolNumbers.THENA_WBNB_ETH_VAULT, ], - [ChainId.zkEVM]: [], [ChainId.zkSync]: [], [ChainId.Mumbai]: [], }, diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index b9cf750..cf26c64 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -2985,19 +2985,6 @@ export const TOKENS: TokenMapping = { atCoingecko: true } }, - [TokenName.ZERO]: { - [ChainId.zkEVM]: { - tokenName: TokenName.ZERO, - tableName: tokenNameWithChainPrefix(TokenName.ZERO, ChainId.zkEVM), - address: '0xB409FeA6c79dA7015Ce92748f38D7c008BB43EBE', - decimals: 18, - displayName: 'ZERO', - symbol: 'ZERO', - fullName: 'ZERO', - isOneToken: false, - atCoingecko: true, - } - }, [TokenName.ZUSD]: { [ChainId.Eon]: { tokenName: TokenName.ZUSD, diff --git a/src/constants/vaults.ts b/src/constants/vaults.ts index a0975df..e2eeb63 100644 --- a/src/constants/vaults.ts +++ b/src/constants/vaults.ts @@ -17,7 +17,6 @@ import { MainnetPoolNumbers, LineaPoolNumbers, MantlePoolNumbers, ZkSyncPoolNumbers, - ZkEvmPoolNumbers, OpBnbPoolNumbers} from '../enums/poolNumber'; import { PoolGroupName } from '../enums/poolManagementName'; import { Pools } from './pools'; @@ -2364,59 +2363,6 @@ export const VAULTS: VaultMapping = { strategyBy: 'Bril Finance', } }, - // Horiza - [VaultName.ARBITRUM_HORIZA_USDC_ICHI]: { - [ChainId.Arbitrum]: { - vaultName: VaultName.ARBITRUM_HORIZA_USDC_ICHI, - tableName: VaultTableName.ARBITRUM_HORIZA_USDC_ICHI, - displayName: 'USDC-ICHI (horiza)', - address: '0x386a4CA8B3a10b9857b2e9b44956ACEF4d3Cf57a', - deployer: '0x508C3daa571854247726ba26949f182086Ff89B0', - farm: 0, - externalFarm: '', - scarceToken: 'token0', - scarceTokenName: TokenName.ICHI, - scarceTokenDecimals: tokenDecimals(TokenName.ICHI, ChainId.Arbitrum), - scarceTokenCoingeckoId: 'ichi', - baseTokenName: TokenName.USDC, - baseTokenDecimals: tokenDecimals(TokenName.USDC, ChainId.Arbitrum), - enableNotifications: true, - subgraphEndpoint: '', - irrStartDate: new Date(0), - isInverted: true, - isHodlVault: true, - isLegacy: isLegacy(ArbitrumPoolNumbers.HORIZA_USDC_ICHI_VAULT, ChainId.Arbitrum), - irrStartTxAmount: 0, - depositStatus: true, - strategyBy: 'Bril Finance', - } - }, - [VaultName.ARBITRUM_HORIZA_WETH_ICHI]: { - [ChainId.Arbitrum]: { - vaultName: VaultName.ARBITRUM_HORIZA_WETH_ICHI, - tableName: VaultTableName.ARBITRUM_HORIZA_WETH_ICHI, - displayName: 'WETH-ICHI (horiza)', - address: '0x352db9E36bA3583f248b72adD1899aA09BF61871', - deployer: '0x508C3daa571854247726ba26949f182086Ff89B0', - farm: 0, - externalFarm: '', - scarceToken: 'token1', - scarceTokenName: TokenName.ICHI, - scarceTokenDecimals: tokenDecimals(TokenName.ICHI, ChainId.Arbitrum), - scarceTokenCoingeckoId: 'ichi', - baseTokenName: TokenName.WETH, - baseTokenDecimals: tokenDecimals(TokenName.WETH, ChainId.Arbitrum), - enableNotifications: true, - subgraphEndpoint: '', - irrStartDate: new Date(0), - isInverted: false, - isHodlVault: true, - isLegacy: isLegacy(ArbitrumPoolNumbers.HORIZA_WETH_ICHI_VAULT, ChainId.Arbitrum), - irrStartTxAmount: 0, - depositStatus: true, - strategyBy: 'Bril Finance', - } - }, // Ramses [VaultName.ARBITRUM_RAMSES_ARB_RAM]: { [ChainId.Arbitrum]: { @@ -6895,241 +6841,6 @@ export const VAULTS: VaultMapping = { strategyBy: 'Bril Finance', } }, - // zkEVM ZERO - [VaultName.ZKEVM_ZERO_MATIC_ZERO]: { - [ChainId.zkEVM]: { - vaultName: VaultName.ZKEVM_ZERO_MATIC_ZERO, - tableName: VaultTableName.ZKEVM_ZERO_MATIC_ZERO, - displayName: 'MATIC-ZERO (zkevm-zero)', - address: '0x86FCa3fe89a91856364b421C1acaA932b9f9F747', - deployer: '0xCAE2d9760B852861e1A552b35e48c263047Fbc0f', - farm: 0, - externalFarm: '', - scarceToken: 'token1', - scarceTokenName: TokenName.ZERO, - scarceTokenDecimals: tokenDecimals(TokenName.ZERO, ChainId.zkEVM), - scarceTokenCoingeckoId: '', - baseTokenName: TokenName.MATIC, - baseTokenDecimals: tokenDecimals(TokenName.MATIC, ChainId.zkEVM), - enableNotifications: true, - subgraphEndpoint: '', - irrStartDate: new Date(0), - isInverted: false, - isHodlVault: true, - isLegacy: isLegacy(ZkEvmPoolNumbers.ZERO_MATIC_ZERO_VAULT, ChainId.zkEVM), - irrStartTxAmount: 0, - depositStatus: true, - strategyBy: 'Bril Finance', - } - }, - [VaultName.ZKEVM_ZERO_USDC_WETH]: { - [ChainId.zkEVM]: { - vaultName: VaultName.ZKEVM_ZERO_USDC_WETH, - tableName: VaultTableName.ZKEVM_ZERO_USDC_WETH, - displayName: 'USDC-WETH (zkevm-zero)', - address: '0x271B11e351bEAcF655Be7cC28e473b3442041dCA', - deployer: '0xCAE2d9760B852861e1A552b35e48c263047Fbc0f', - farm: 0, - externalFarm: '', - scarceToken: 'token0', - scarceTokenName: TokenName.WETH, - scarceTokenDecimals: tokenDecimals(TokenName.WETH, ChainId.zkEVM), - scarceTokenCoingeckoId: '', - baseTokenName: TokenName.USDC, - baseTokenDecimals: tokenDecimals(TokenName.USDC, ChainId.zkEVM), - enableNotifications: true, - subgraphEndpoint: '', - irrStartDate: new Date(0), - isInverted: true, - isHodlVault: true, - isLegacy: isLegacy(ZkEvmPoolNumbers.ZERO_USDC_WETH_VAULT, ChainId.zkEVM), - irrStartTxAmount: 0, - depositStatus: true, - strategyBy: 'Bril Finance', - } - }, - [VaultName.ZKEVM_ZERO_USDC_ZERO]: { - [ChainId.zkEVM]: { - vaultName: VaultName.ZKEVM_ZERO_USDC_ZERO, - tableName: VaultTableName.ZKEVM_ZERO_USDC_ZERO, - displayName: 'USDC-ZERO (zkevm-zero)', - address: '0xB103626188089DEc745924B642C8EaF0719d9104', - deployer: '0xCAE2d9760B852861e1A552b35e48c263047Fbc0f', - farm: 0, - externalFarm: '', - scarceToken: 'token1', - scarceTokenName: TokenName.ZERO, - scarceTokenDecimals: tokenDecimals(TokenName.ZERO, ChainId.zkEVM), - scarceTokenCoingeckoId: '', - baseTokenName: TokenName.USDC, - baseTokenDecimals: tokenDecimals(TokenName.USDC, ChainId.zkEVM), - enableNotifications: true, - subgraphEndpoint: '', - irrStartDate: new Date(0), - isInverted: false, - isHodlVault: true, - isLegacy: isLegacy(ZkEvmPoolNumbers.ZERO_USDC_ZERO_VAULT, ChainId.zkEVM), - irrStartTxAmount: 0, - depositStatus: true, - strategyBy: 'Bril Finance', - } - }, - [VaultName.ZKEVM_ZERO_USDT_ZERO]: { - [ChainId.zkEVM]: { - vaultName: VaultName.ZKEVM_ZERO_USDT_ZERO, - tableName: VaultTableName.ZKEVM_ZERO_USDT_ZERO, - displayName: 'USDT-ZERO (zkevm-zero)', - address: '0x287F9766ea0E10cb759264BD3C7628eeb60f67a0', - deployer: '0xCAE2d9760B852861e1A552b35e48c263047Fbc0f', - farm: 0, - externalFarm: '', - scarceToken: 'token1', - scarceTokenName: TokenName.ZERO, - scarceTokenDecimals: tokenDecimals(TokenName.ZERO, ChainId.zkEVM), - scarceTokenCoingeckoId: '', - baseTokenName: TokenName.USDT, - baseTokenDecimals: tokenDecimals(TokenName.USDT, ChainId.zkEVM), - enableNotifications: true, - subgraphEndpoint: '', - irrStartDate: new Date(0), - isInverted: false, - isHodlVault: true, - isLegacy: isLegacy(ZkEvmPoolNumbers.ZERO_USDT_ZERO_VAULT, ChainId.zkEVM), - irrStartTxAmount: 0, - depositStatus: true, - strategyBy: 'Bril Finance', - } - }, - [VaultName.ZKEVM_ZERO_WBTC_WETH]: { - [ChainId.zkEVM]: { - vaultName: VaultName.ZKEVM_ZERO_WBTC_WETH, - tableName: VaultTableName.ZKEVM_ZERO_WBTC_WETH, - displayName: 'WBTC-WETH (zkevm-zero)', - address: '0x5d3ECAb7c9ecd5227D76f50511b2D28b0Ee6ad40', - deployer: '0xCAE2d9760B852861e1A552b35e48c263047Fbc0f', - farm: 0, - externalFarm: '', - scarceToken: 'token0', - scarceTokenName: TokenName.WETH, - scarceTokenDecimals: tokenDecimals(TokenName.WETH, ChainId.zkEVM), - scarceTokenCoingeckoId: '', - baseTokenName: TokenName.WBTC, - baseTokenDecimals: tokenDecimals(TokenName.WBTC, ChainId.zkEVM), - enableNotifications: true, - subgraphEndpoint: '', - irrStartDate: new Date(0), - isInverted: true, - isHodlVault: true, - isLegacy: isLegacy(ZkEvmPoolNumbers.ZERO_WBTC_WETH_VAULT, ChainId.zkEVM), - irrStartTxAmount: 0, - depositStatus: true, - strategyBy: 'Bril Finance', - } - }, - [VaultName.ZKEVM_ZERO_WBTC_ZERO]: { - [ChainId.zkEVM]: { - vaultName: VaultName.ZKEVM_ZERO_WBTC_ZERO, - tableName: VaultTableName.ZKEVM_ZERO_WBTC_ZERO, - displayName: 'WBTC-ZERO (zkevm-zero)', - address: '0x1470f3A476c1E10a83d3E883001b086aeFeA8043', - deployer: '0xCAE2d9760B852861e1A552b35e48c263047Fbc0f', - farm: 0, - externalFarm: '', - scarceToken: 'token0', - scarceTokenName: TokenName.ZERO, - scarceTokenDecimals: tokenDecimals(TokenName.ZERO, ChainId.zkEVM), - scarceTokenCoingeckoId: '', - baseTokenName: TokenName.WBTC, - baseTokenDecimals: tokenDecimals(TokenName.WBTC, ChainId.zkEVM), - enableNotifications: true, - subgraphEndpoint: '', - irrStartDate: new Date(0), - isInverted: true, - isHodlVault: true, - isLegacy: isLegacy(ZkEvmPoolNumbers.ZERO_WBTC_ZERO_VAULT, ChainId.zkEVM), - irrStartTxAmount: 0, - depositStatus: true, - strategyBy: 'Bril Finance', - } - }, - [VaultName.ZKEVM_ZERO_WETH_USDC]: { - [ChainId.zkEVM]: { - vaultName: VaultName.ZKEVM_ZERO_WETH_USDC, - tableName: VaultTableName.ZKEVM_ZERO_WETH_USDC, - displayName: 'WETH-USDC (zkevm-zero)', - address: '0xB1eFD152aAcD102Dcedf03791EC380F8fF280f80', - deployer: '0xCAE2d9760B852861e1A552b35e48c263047Fbc0f', - farm: 0, - externalFarm: '', - scarceToken: 'token1', - scarceTokenName: TokenName.USDC, - scarceTokenDecimals: tokenDecimals(TokenName.USDC, ChainId.zkEVM), - scarceTokenCoingeckoId: '', - baseTokenName: TokenName.WETH, - baseTokenDecimals: tokenDecimals(TokenName.WETH, ChainId.zkEVM), - enableNotifications: true, - subgraphEndpoint: '', - irrStartDate: new Date(0), - isInverted: false, - isHodlVault: true, - isLegacy: isLegacy(ZkEvmPoolNumbers.ZERO_WETH_USDC_VAULT, ChainId.zkEVM), - irrStartTxAmount: 0, - depositStatus: true, - strategyBy: 'Bril Finance', - } - }, - [VaultName.ZKEVM_ZERO_WETH_WBTC]: { - [ChainId.zkEVM]: { - vaultName: VaultName.ZKEVM_ZERO_WETH_WBTC, - tableName: VaultTableName.ZKEVM_ZERO_WETH_WBTC, - displayName: 'WETH-WBTC (zkevm-zero)', - address: '0x2723f6F685c8770F0Cabc84482d0B6F6F75be25b', - deployer: '0xCAE2d9760B852861e1A552b35e48c263047Fbc0f', - farm: 0, - externalFarm: '', - scarceToken: 'token1', - scarceTokenName: TokenName.WBTC, - scarceTokenDecimals: tokenDecimals(TokenName.WBTC, ChainId.zkEVM), - scarceTokenCoingeckoId: '', - baseTokenName: TokenName.WETH, - baseTokenDecimals: tokenDecimals(TokenName.WETH, ChainId.zkEVM), - enableNotifications: true, - subgraphEndpoint: '', - irrStartDate: new Date(0), - isInverted: false, - isHodlVault: true, - isLegacy: isLegacy(ZkEvmPoolNumbers.ZERO_WETH_WBTC_VAULT, ChainId.zkEVM), - irrStartTxAmount: 0, - depositStatus: true, - strategyBy: 'Bril Finance', - } - }, - [VaultName.ZKEVM_ZERO_WETH_ZERO]: { - [ChainId.zkEVM]: { - vaultName: VaultName.ZKEVM_ZERO_WETH_ZERO, - tableName: VaultTableName.ZKEVM_ZERO_WETH_ZERO, - displayName: 'WETH-ZERO (zkevm-zero)', - address: '0x05BE84e780425f88fE8fE56deb4Bec137BB875F6', - deployer: '0xCAE2d9760B852861e1A552b35e48c263047Fbc0f', - farm: 0, - externalFarm: '', - scarceToken: 'token1', - scarceTokenName: TokenName.ZERO, - scarceTokenDecimals: tokenDecimals(TokenName.ZERO, ChainId.zkEVM), - scarceTokenCoingeckoId: '', - baseTokenName: TokenName.WETH, - baseTokenDecimals: tokenDecimals(TokenName.WETH, ChainId.zkEVM), - enableNotifications: true, - subgraphEndpoint: '', - irrStartDate: new Date(0), - isInverted: false, - isHodlVault: true, - isLegacy: isLegacy(ZkEvmPoolNumbers.ZERO_WETH_ZERO_VAULT, ChainId.zkEVM), - irrStartTxAmount: 0, - depositStatus: true, - strategyBy: 'Bril Finance', - } - }, // zkSync PancakeSwap [VaultName.ZKSYNC_PANCAKESWAP_USDT_WETH]: { [ChainId.zkSync]: { diff --git a/src/enums/poolNumber.ts b/src/enums/poolNumber.ts index df49310..631c195 100644 --- a/src/enums/poolNumber.ts +++ b/src/enums/poolNumber.ts @@ -222,8 +222,6 @@ export enum ArbitrumPoolNumbers { RAMSES_WETH_RAM_VAULT = 7712, LMR_WBTC_VAULT = 7713, WETH_LMR_VAULT = 7714, - HORIZA_USDC_ICHI_VAULT = 7715, - HORIZA_WETH_ICHI_VAULT = 7716, RAMSES_ARB_USDC_VAULT = 7717, RAMSES_ARB_WETH_VAULT = 7718, RAMSES_GRAI_RAM_VAULT = 7719, @@ -318,18 +316,6 @@ export enum OpBnbPoolNumbers { THENA_ETH_BTCB_VAULT = 9107, } -export enum ZkEvmPoolNumbers { - ZERO_MATIC_ZERO_VAULT = 8500, - ZERO_USDC_WETH_VAULT = 8501, - ZERO_USDC_ZERO_VAULT = 8502, - ZERO_USDT_ZERO_VAULT = 8503, - ZERO_WBTC_WETH_VAULT = 8504, - ZERO_WBTC_ZERO_VAULT = 8505, - ZERO_WETH_USDC_VAULT = 8506, - ZERO_WETH_WBTC_VAULT = 8507, - ZERO_WETH_ZERO_VAULT = 8508, -} - export enum ZkSyncPoolNumbers { PANCAKESWAP_USDT_WETH_VAULT = 8300, PANCAKESWAP_WETH_USDC_VAULT = 8301, @@ -346,7 +332,6 @@ export type FantomPoolNumberValues = typeof FantomPoolNumbers[keyof typeof Fanto export type LineaPoolNumberValues = typeof LineaPoolNumbers[keyof typeof LineaPoolNumbers]; export type MantlePoolNumberValues = typeof MantlePoolNumbers[keyof typeof MantlePoolNumbers]; export type OpBnbPoolNumberValues = typeof OpBnbPoolNumbers[keyof typeof OpBnbPoolNumbers]; -export type ZkEvmPoolNumberValues = typeof ZkEvmPoolNumbers[keyof typeof ZkEvmPoolNumbers]; export type ZkSyncPoolNumberValues = typeof ZkSyncPoolNumbers[keyof typeof ZkSyncPoolNumbers]; export type PoolNumberValues = @@ -360,6 +345,5 @@ export type PoolNumberValues = | LineaPoolNumberValues | MantlePoolNumberValues | OpBnbPoolNumberValues - | ZkEvmPoolNumberValues | ZkSyncPoolNumberValues | MumbaiPoolNumberValues; diff --git a/src/enums/tokenName.ts b/src/enums/tokenName.ts index 7023270..0bfbb04 100644 --- a/src/enums/tokenName.ts +++ b/src/enums/tokenName.ts @@ -154,7 +154,6 @@ export enum TokenName { XSAUCE = 'xsauce', YFI = 'yfi', ZRX = 'zrx', - ZERO = 'zero', ZUSD = 'zusd', // one tokens ONE_ETH = 'oneeth', diff --git a/src/enums/vaultName.ts b/src/enums/vaultName.ts index 6a68d04..2d9c6b9 100644 --- a/src/enums/vaultName.ts +++ b/src/enums/vaultName.ts @@ -95,9 +95,6 @@ export enum VaultName { ARBITRUM_WBTC_ICHI = 'arbitrum_wbtc_ichi', ARBITRUM_WETH_ICHI = 'arbitrum_weth_ichi', ARBITRUM_WETH_LMR = 'arbitrum_weth_lmr', - // Horiza - ARBITRUM_HORIZA_USDC_ICHI = 'arbitrum_horiza_usdc_ichi', - ARBITRUM_HORIZA_WETH_ICHI = 'arbitrum_horiza_weth_ichi', // Arbitrum-Ramses ARBITRUM_RAMSES_ARB_RAM = 'arbitrum_ramses_arb_ram', ARBITRUM_RAMSES_ARB_USDC = 'arbitrum_ramses_arb_usdc', @@ -282,16 +279,6 @@ export enum VaultName { RETRO_WMATIC_USDC = 'pol_retro_wmatic_usdc', RETRO_WMATIC_USDC_05 = 'pol_retro_wmatic_usdc_05', RETRO_WMATIC_WETH = 'pol_retro_wmatic_weth', - // zkEVM ZERO - ZKEVM_ZERO_MATIC_ZERO = 'zkevm_zero_matic_zero', - ZKEVM_ZERO_USDC_WETH = 'zkevm_zero_usdc_weth', - ZKEVM_ZERO_USDC_ZERO = 'zkevm_zero_usdc_zero', - ZKEVM_ZERO_USDT_ZERO = 'zkevm_zero_usdt_zero', - ZKEVM_ZERO_WBTC_WETH = 'zkevm_zero_wbtc_weth', - ZKEVM_ZERO_WBTC_ZERO = 'zkevm_zero_wbtc_zero', - ZKEVM_ZERO_WETH_USDC = 'zkevm_zero_weth_usdc', - ZKEVM_ZERO_WETH_WBTC = 'zkevm_zero_weth_wbtc', - ZKEVM_ZERO_WETH_ZERO = 'zkevm_zero_weth_zero', // zkSync PancakeSwap ZKSYNC_PANCAKESWAP_USDT_WETH = 'zksync_pancakeswap_usdt_weth', ZKSYNC_PANCAKESWAP_WETH_USDC = 'zksync_pancakeswap_weth_usdc', @@ -392,9 +379,6 @@ export enum VaultTableName { ARBITRUM_WBTC_ICHI = 'arbitrum_wbtc_ichi', ARBITRUM_WETH_ICHI = 'arbitrum_weth_ichi', ARBITRUM_WETH_LMR = 'arbitrum_weth_lmr', - // Horiza - ARBITRUM_HORIZA_USDC_ICHI = 'arbitrum_horiza_usdc_ichi', - ARBITRUM_HORIZA_WETH_ICHI = 'arbitrum_horiza_weth_ichi', // Arbitrum-Ramses ARBITRUM_RAMSES_ARB_RAM = 'arbitrum_ramses_arb_ram', ARBITRUM_RAMSES_ARB_USDC = 'arbitrum_ramses_arb_usdc', @@ -579,16 +563,6 @@ export enum VaultTableName { RETRO_WMATIC_USDC = 'pol_retro_wmatic_usdc', RETRO_WMATIC_USDC_05 = 'pol_retro_wmatic_usdc_05', RETRO_WMATIC_WETH = 'pol_retro_wmatic_weth', - // zkEVM ZERO - ZKEVM_ZERO_MATIC_ZERO = 'zkevm_zero_matic_zero', - ZKEVM_ZERO_USDC_WETH = 'zkevm_zero_usdc_weth', - ZKEVM_ZERO_USDC_ZERO = 'zkevm_zero_usdc_zero', - ZKEVM_ZERO_USDT_ZERO = 'zkevm_zero_usdt_zero', - ZKEVM_ZERO_WBTC_WETH = 'zkevm_zero_wbtc_weth', - ZKEVM_ZERO_WBTC_ZERO = 'zkevm_zero_wbtc_zero', - ZKEVM_ZERO_WETH_USDC = 'zkevm_zero_weth_usdc', - ZKEVM_ZERO_WETH_WBTC = 'zkevm_zero_weth_wbtc', - ZKEVM_ZERO_WETH_ZERO = 'zkevm_zero_weth_zero', // zkSync PancakeSwap ZKSYNC_PANCAKESWAP_USDT_WETH = 'zksync_pancakeswap_usdt_weth', ZKSYNC_PANCAKESWAP_WETH_USDC = 'zksync_pancakeswap_weth_usdc', diff --git a/src/utils/token.ts b/src/utils/token.ts index e7b047a..78d8a33 100644 --- a/src/utils/token.ts +++ b/src/utils/token.ts @@ -669,26 +669,6 @@ export async function getTokenMetrics( throw new Error(`Could not lookup token prices for ${token.symbol}`); } break; - case TokenName.ZERO: - const zkEvmProvider = await getProvider(ChainId.zkEVM); - if (!zkEvmProvider) { - throw new Error('Could not establish zkEVM provider'); - } - const zkevm_wethAddress = TOKENS[TokenName.WETH]![ChainId.zkEVM]?.address?.toLowerCase(); - - - if (opts.tokenPrices && zkevm_wethAddress && zkevm_wethAddress in opts.tokenPrices) { - const zkevm_wethPrice = opts.tokenPrices[zkevm_wethAddress].usd; - price = await getPriceFromWethVault( - VaultName.ZKEVM_ZERO_WETH_ZERO, - zkEvmProvider, - ChainId.zkEVM, - zkevm_wethPrice - ) - } else { - throw new Error(`Could not lookup token prices for ${token.symbol}`); - } - break; case TokenName.ETH: if (opts.tokenPrices && wethAddress && wethAddress in opts.tokenPrices) { wethPrice = opts.tokenPrices[wethAddress].usd; From ac71d3b6c723a55f25766d3c1317709e4a6c59fd Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Wed, 22 May 2024 14:32:53 -0400 Subject: [PATCH 46/70] 0.0.215 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 86cea38..4a30f64 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.214", + "version": "0.0.215", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.214", + "version": "0.0.215", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 4bbd806..1329dc2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.214", + "version": "0.0.215", "description": "", "main": "dist/index.js", "module": "index.ts", From c758148b8fb55fd0238ce0ea03d2fe51c9ca2f5c Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Thu, 23 May 2024 10:04:55 -0400 Subject: [PATCH 47/70] Fix token table name for Arthera --- src/constants/tokens.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index cf26c64..0d09026 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -10,6 +10,8 @@ export const tokenNameWithChainPrefix = (tokenName: TokenName | string, chainId: switch (chainId) { case ChainId.Arbitrum: return `arbitrum_${tokenName}` as TokenTableName + case ChainId.Arthera: + return `arthera_${tokenName}` as TokenTableName case ChainId.Avalanche: return `avalanche_${tokenName}` as TokenTableName case ChainId.Base: From 770136a33b8c1b3b84c4e49d70c393f9cbaa72af Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Thu, 23 May 2024 10:13:07 -0400 Subject: [PATCH 48/70] 0.0.216 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4a30f64..fc3302e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.215", + "version": "0.0.216", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.215", + "version": "0.0.216", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 1329dc2..c7a9e5f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.215", + "version": "0.0.216", "description": "", "main": "dist/index.js", "module": "index.ts", From 288896053eceae30c79d75d63c6003ab59ba839c Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Mon, 3 Jun 2024 21:02:56 -0400 Subject: [PATCH 49/70] Add Taiko --- src/constants/tokens.ts | 2 ++ src/crypto/networks.ts | 18 ++++++++++++++++++ src/crypto/providers.ts | 7 +++++++ src/utils/env.ts | 2 ++ 4 files changed, 29 insertions(+) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 0d09026..c91f2f1 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -44,6 +44,8 @@ export const tokenNameWithChainPrefix = (tokenName: TokenName | string, chainId: return `opbnb_${tokenName}` as TokenTableName case ChainId.Scroll: return `scroll_${tokenName}` as TokenTableName + case ChainId.Taiko: + return `taiko_${tokenName}` as TokenTableName case ChainId.zkEVM: return `zkevm_${tokenName}` as TokenTableName case ChainId.zkSync: diff --git a/src/crypto/networks.ts b/src/crypto/networks.ts index 6c309f9..f23bbe2 100644 --- a/src/crypto/networks.ts +++ b/src/crypto/networks.ts @@ -23,6 +23,7 @@ export enum ChainId { Mantle = 5000, opBNB = 204, Scroll = 534352, + Taiko = 167000, zkEVM = 1101, zkSync = 324, } @@ -401,6 +402,23 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = { } } }, + [ChainId.Taiko]: { + chainId: ChainId.Taiko, + name: 'Taiko', + color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)', + icon: generateIconUrl(ChainId.Taiko, 'svg'), + env: 'mainnet', + scanLink: 'https://taikoscan.io/', + scanName: 'taikoscan', + coingecko: 'taiko', + rpc: { + rpcUrl: 'https://rpc.mainnet.taiko.xyz', + nativeCurrency: { + symbol: 'ETH', + name: 'ETH' + } + } + }, [ChainId.zkEVM]: { chainId: ChainId.zkEVM, name: 'Polygon_zkEVM', diff --git a/src/crypto/providers.ts b/src/crypto/providers.ts index ba9c10c..7f5ea14 100644 --- a/src/crypto/providers.ts +++ b/src/crypto/providers.ts @@ -107,6 +107,11 @@ export const providerCacheReference: Record = { cacheHit: 0, cacheMiss: 0 }, + [ChainId.Taiko]: { + lastUdated: 0, + cacheHit: 0, + cacheMiss: 0 + }, [ChainId.zkEVM]: { lastUdated: 0, cacheHit: 0, @@ -265,6 +270,8 @@ const getRpcEnvName = (chainId: ChainId): EnvUtils.EnvName => { return EnvUtils.EnvName.POLYGON_RPC_HOSTS; case ChainId.Scroll: return EnvUtils.EnvName.SCROLL_RPC_HOSTS; + case ChainId.Taiko: + return EnvUtils.EnvName.TAIKO_RPC_HOSTS; case ChainId.zkEVM: return EnvUtils.EnvName.ZKEVM_RPC_HOSTS; case ChainId.zkSync: diff --git a/src/utils/env.ts b/src/utils/env.ts index faa1846..891cf4f 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -23,6 +23,7 @@ export namespace EnvUtils { OPBNB_RPC_HOSTS = 'OPBNB_RPC_HOSTS', POLYGON_RPC_HOSTS = 'POLYGON_RPC_HOSTS', SCROLL_RPC_HOSTS = 'SCROLL_RPC_HOSTS', + TAIKO_RPC_HOSTS = 'TAIKO_RPC_HOSTS', ZKEVM_RPC_HOSTS = 'ZKEVM_RPC_HOSTS', ZKSYNC_RPC_HOSTS = 'ZKSYNC_RPC_HOSTS', MUMBAI_RPC_HOSTS = 'MUMBAI_RPC_HOSTS', @@ -53,6 +54,7 @@ export namespace EnvUtils { GATSBY_OPBNB_RPC_HOSTS = 'GATSBY_OPBNB_RPC_HOSTS', GATSBY_POLYGON_RPC_HOSTS = 'GATSBY_POLYGON_RPC_HOSTS', GATSBY_SCROLL_RPC_HOSTS = 'GATSBY_SCROLL_RPC_HOSTS', + GATSBY_TAIKO_RPC_HOSTS = 'GATSBY_TAIKO_RPC_HOSTS', GATSBY_ZKEVM_RPC_HOSTS = 'GATSBY_ZKEVM_RPC_HOSTS', GATSBY_ZKSYNC_RPC_HOSTS = 'GATSBY_ZKSYNC_RPC_HOSTS', GATSBY_MUMBAI_RPC_HOSTS = 'GATSBY_MUMBAI_RPC_HOSTS', From da3387434dd7a91f32925e9f69014acf3a6bba97 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Mon, 3 Jun 2024 21:11:23 -0400 Subject: [PATCH 50/70] 0.0.217 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index fc3302e..8c0c178 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.216", + "version": "0.0.217", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.216", + "version": "0.0.217", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index c7a9e5f..00e81a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.216", + "version": "0.0.217", "description": "", "main": "dist/index.js", "module": "index.ts", From d92495c2131d3741efbe249043674c3ac55541b9 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 18 Jun 2024 18:29:57 -0400 Subject: [PATCH 51/70] Add Skale Europa --- src/constants/tokens.ts | 4 +++- src/crypto/networks.ts | 18 ++++++++++++++++++ src/crypto/providers.ts | 7 +++++++ src/utils/env.ts | 2 ++ src/utils/token.ts | 8 -------- 5 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index c91f2f1..ba9015b 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -44,6 +44,8 @@ export const tokenNameWithChainPrefix = (tokenName: TokenName | string, chainId: return `opbnb_${tokenName}` as TokenTableName case ChainId.Scroll: return `scroll_${tokenName}` as TokenTableName + case ChainId.Skale_Europa: + return `skale_europa_${tokenName}` as TokenTableName case ChainId.Taiko: return `taiko_${tokenName}` as TokenTableName case ChainId.zkEVM: @@ -824,7 +826,7 @@ export const TOKENS: TokenMapping = { symbol: 'ETH', fullName: 'Binance-Peg Ethereum Token', isOneToken: false, - atCoingecko: false + atCoingecko: true, }, [ChainId.opBNB]: { tokenName: TokenName.ETH, diff --git a/src/crypto/networks.ts b/src/crypto/networks.ts index f23bbe2..293eafe 100644 --- a/src/crypto/networks.ts +++ b/src/crypto/networks.ts @@ -23,6 +23,7 @@ export enum ChainId { Mantle = 5000, opBNB = 204, Scroll = 534352, + Skale_Europa = 2046399126, Taiko = 167000, zkEVM = 1101, zkSync = 324, @@ -402,6 +403,23 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = { } } }, + [ChainId.Skale_Europa]: { + chainId: ChainId.Skale_Europa, + name: 'Skale_Europa', + color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)', + icon: generateIconUrl(ChainId.Skale_Europa, 'svg'), + env: 'mainnet', + scanLink: 'https://elated-tan-skat.explorer.mainnet.skalenodes.com/', + scanName: 'EuropaLiquidityHubExplorer', + coingecko: '', + rpc: { + rpcUrl: 'https://mainnet.skalenodes.com/v1/elated-tan-skat', + nativeCurrency: { + symbol: 'sFUEL', + name: 'sFUEL' + } + } + }, [ChainId.Taiko]: { chainId: ChainId.Taiko, name: 'Taiko', diff --git a/src/crypto/providers.ts b/src/crypto/providers.ts index 7f5ea14..2266292 100644 --- a/src/crypto/providers.ts +++ b/src/crypto/providers.ts @@ -107,6 +107,11 @@ export const providerCacheReference: Record = { cacheHit: 0, cacheMiss: 0 }, + [ChainId.Skale_Europa]: { + lastUdated: 0, + cacheHit: 0, + cacheMiss: 0 + }, [ChainId.Taiko]: { lastUdated: 0, cacheHit: 0, @@ -270,6 +275,8 @@ const getRpcEnvName = (chainId: ChainId): EnvUtils.EnvName => { return EnvUtils.EnvName.POLYGON_RPC_HOSTS; case ChainId.Scroll: return EnvUtils.EnvName.SCROLL_RPC_HOSTS; + case ChainId.Skale_Europa: + return EnvUtils.EnvName.SKALE_EUROPA_RPC_HOSTS; case ChainId.Taiko: return EnvUtils.EnvName.TAIKO_RPC_HOSTS; case ChainId.zkEVM: diff --git a/src/utils/env.ts b/src/utils/env.ts index 891cf4f..2bd0d64 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -23,6 +23,7 @@ export namespace EnvUtils { OPBNB_RPC_HOSTS = 'OPBNB_RPC_HOSTS', POLYGON_RPC_HOSTS = 'POLYGON_RPC_HOSTS', SCROLL_RPC_HOSTS = 'SCROLL_RPC_HOSTS', + SKALE_EUROPA_RPC_HOSTS = 'SKALE_EUROPA_RPC_HOSTS', TAIKO_RPC_HOSTS = 'TAIKO_RPC_HOSTS', ZKEVM_RPC_HOSTS = 'ZKEVM_RPC_HOSTS', ZKSYNC_RPC_HOSTS = 'ZKSYNC_RPC_HOSTS', @@ -54,6 +55,7 @@ export namespace EnvUtils { GATSBY_OPBNB_RPC_HOSTS = 'GATSBY_OPBNB_RPC_HOSTS', GATSBY_POLYGON_RPC_HOSTS = 'GATSBY_POLYGON_RPC_HOSTS', GATSBY_SCROLL_RPC_HOSTS = 'GATSBY_SCROLL_RPC_HOSTS', + GATSBY_SKALE_EUROPA_RPC_HOSTS = 'GATSBY_SKALE_EUROPA_RPC_HOSTS', GATSBY_TAIKO_RPC_HOSTS = 'GATSBY_TAIKO_RPC_HOSTS', GATSBY_ZKEVM_RPC_HOSTS = 'GATSBY_ZKEVM_RPC_HOSTS', GATSBY_ZKSYNC_RPC_HOSTS = 'GATSBY_ZKSYNC_RPC_HOSTS', diff --git a/src/utils/token.ts b/src/utils/token.ts index 78d8a33..a5e9a36 100644 --- a/src/utils/token.ts +++ b/src/utils/token.ts @@ -669,14 +669,6 @@ export async function getTokenMetrics( throw new Error(`Could not lookup token prices for ${token.symbol}`); } break; - case TokenName.ETH: - if (opts.tokenPrices && wethAddress && wethAddress in opts.tokenPrices) { - wethPrice = opts.tokenPrices[wethAddress].usd; - price = wethPrice - } else { - throw new Error(`Could not lookup token prices for ${token.symbol}`); - } - break; case TokenName.HBR: const bscProvider = await getProvider(ChainId.Bsc); if (!bscProvider) { From a3be3164f7f0b5bf64acebe0cd45c9f010e18117 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 18 Jun 2024 18:42:04 -0400 Subject: [PATCH 52/70] 0.0.218 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8c0c178..857be11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.217", + "version": "0.0.218", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.217", + "version": "0.0.218", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 00e81a2..af30e95 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.217", + "version": "0.0.218", "description": "", "main": "dist/index.js", "module": "index.ts", From cfe7d9690ffb6a22f5d2ab7b81b4c38aaf5cf029 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Mon, 24 Jun 2024 21:50:47 -0400 Subject: [PATCH 53/70] Add Fuse --- src/constants/tokens.ts | 2 ++ src/crypto/networks.ts | 18 ++++++++++++++++++ src/crypto/providers.ts | 7 +++++++ src/utils/env.ts | 2 ++ 4 files changed, 29 insertions(+) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index ba9015b..5818754 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -28,6 +28,8 @@ export const tokenNameWithChainPrefix = (tokenName: TokenName | string, chainId: return `evmos_${tokenName}` as TokenTableName case ChainId.Fantom: return `fantom_${tokenName}` as TokenTableName + case ChainId.Fuse: + return `fuse_${tokenName}` as TokenTableName case ChainId.Hedera: return `hedera_${tokenName}` as TokenTableName case ChainId.Kava: diff --git a/src/crypto/networks.ts b/src/crypto/networks.ts index 293eafe..541579c 100644 --- a/src/crypto/networks.ts +++ b/src/crypto/networks.ts @@ -17,6 +17,7 @@ export enum ChainId { Eon = 7332, Evmos = 9001, Fantom = 250, + Fuse = 122, Hedera = 295, Kava = 2222, Linea = 59144, @@ -301,6 +302,23 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = { } } }, + [ChainId.Fuse]: { + chainId: ChainId.Fuse, + name: 'Fuse', + color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)', + icon: generateIconUrl(ChainId.Fuse, 'svg'), + env: 'mainnet', + scanLink: 'https://explorer.fuse.io/', + scanName: 'Fuse Explorer', + coingecko: 'fuse', + rpc: { + rpcUrl: 'https://fuse-pokt.nodies.app', + nativeCurrency: { + symbol: 'FUSE', + name: 'FUSE' + } + } + }, [ChainId.Hedera]: { chainId: ChainId.Hedera, name: 'Hedera', diff --git a/src/crypto/providers.ts b/src/crypto/providers.ts index 2266292..88f3a15 100644 --- a/src/crypto/providers.ts +++ b/src/crypto/providers.ts @@ -72,6 +72,11 @@ export const providerCacheReference: Record = { cacheHit: 0, cacheMiss: 0 }, + [ChainId.Fuse]: { + lastUdated: 0, + cacheHit: 0, + cacheMiss: 0 + }, [ChainId.Hedera]: { lastUdated: 0, cacheHit: 0, @@ -261,6 +266,8 @@ const getRpcEnvName = (chainId: ChainId): EnvUtils.EnvName => { return EnvUtils.EnvName.EVMOS_RPC_HOSTS; case ChainId.Fantom: return EnvUtils.EnvName.FANTOM_RPC_HOSTS; + case ChainId.Fuse: + return EnvUtils.EnvName.FUSE_RPC_HOSTS; case ChainId.Hedera: return EnvUtils.EnvName.HEDERA_RPC_HOSTS; case ChainId.Kava: diff --git a/src/utils/env.ts b/src/utils/env.ts index 2bd0d64..bad0874 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -16,6 +16,7 @@ export namespace EnvUtils { EON_RPC_HOSTS = 'EON_RPC_HOSTS', EVMOS_RPC_HOSTS = 'EVMOS_RPC_HOSTS', FANTOM_RPC_HOSTS = 'FANTOM_RPC_HOSTS', + FUSE_RPC_HOSTS = 'FUSE_RPC_HOSTS', HEDERA_RPC_HOSTS = 'HEDERA_RPC_HOSTS', KAVA_RPC_HOSTS = 'KAVA_RPC_HOSTS', LINEA_RPC_HOSTS = 'LINEA_RPC_HOSTS', @@ -48,6 +49,7 @@ export namespace EnvUtils { GATSBY_EON_RPC_HOSTS = 'GATSBY_EON_RPC_HOSTS', GATSBY_EVMOS_RPC_HOSTS = 'GATSBY_EVMOS_RPC_HOSTS', GATSBY_FANTOM_RPC_HOSTS = 'GATSBY_FANTOM_RPC_HOSTS', + GATSBY_FUSE_RPC_HOSTS = 'GATSBY_FUSE_RPC_HOSTS', GATSBY_HEDERA_RPC_HOSTS = 'GATSBY_HEDERA_RPC_HOSTS', GATSBY_KAVA_RPC_HOSTS = 'GATSBY_KAVA_RPC_HOSTS', GATSBY_LINEA_RPC_HOSTS = 'GATSBY_LINEA_RPC_HOSTS', From 4bc02c378bdafa6783d62e3a3880b1233b656586 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Mon, 24 Jun 2024 22:03:41 -0400 Subject: [PATCH 54/70] 0.0.219 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 857be11..8bcf5f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.218", + "version": "0.0.219", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.218", + "version": "0.0.219", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index af30e95..0d54c8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.218", + "version": "0.0.219", "description": "", "main": "dist/index.js", "module": "index.ts", From 53cb6d4986bad683bf8b46c1542283754cb42254 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Mon, 5 Aug 2024 11:20:06 -0400 Subject: [PATCH 55/70] Add Flare --- src/constants/tokens.ts | 2 ++ src/crypto/networks.ts | 18 ++++++++++++++++++ src/crypto/providers.ts | 7 +++++++ src/utils/env.ts | 2 ++ 4 files changed, 29 insertions(+) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 5818754..7fdff29 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -28,6 +28,8 @@ export const tokenNameWithChainPrefix = (tokenName: TokenName | string, chainId: return `evmos_${tokenName}` as TokenTableName case ChainId.Fantom: return `fantom_${tokenName}` as TokenTableName + case ChainId.Flare: + return `flare_${tokenName}` as TokenTableName case ChainId.Fuse: return `fuse_${tokenName}` as TokenTableName case ChainId.Hedera: diff --git a/src/crypto/networks.ts b/src/crypto/networks.ts index 541579c..2123b8e 100644 --- a/src/crypto/networks.ts +++ b/src/crypto/networks.ts @@ -17,6 +17,7 @@ export enum ChainId { Eon = 7332, Evmos = 9001, Fantom = 250, + Flare = 14, Fuse = 122, Hedera = 295, Kava = 2222, @@ -302,6 +303,23 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = { } } }, + [ChainId.Flare]: { + chainId: ChainId.Flare, + name: 'Flare', + color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)', + icon: generateIconUrl(ChainId.Flare, 'svg'), + env: 'mainnet', + scanLink: 'https://flarescan.com', + scanName: 'flarescan', + coingecko: 'flare-network', + rpc: { + rpcUrl: 'https://rpc.ftso.au/flare', + nativeCurrency: { + symbol: 'FLR', + name: 'FLR' + } + } + }, [ChainId.Fuse]: { chainId: ChainId.Fuse, name: 'Fuse', diff --git a/src/crypto/providers.ts b/src/crypto/providers.ts index 88f3a15..c6c95df 100644 --- a/src/crypto/providers.ts +++ b/src/crypto/providers.ts @@ -72,6 +72,11 @@ export const providerCacheReference: Record = { cacheHit: 0, cacheMiss: 0 }, + [ChainId.Flare]: { + lastUdated: 0, + cacheHit: 0, + cacheMiss: 0 + }, [ChainId.Fuse]: { lastUdated: 0, cacheHit: 0, @@ -266,6 +271,8 @@ const getRpcEnvName = (chainId: ChainId): EnvUtils.EnvName => { return EnvUtils.EnvName.EVMOS_RPC_HOSTS; case ChainId.Fantom: return EnvUtils.EnvName.FANTOM_RPC_HOSTS; + case ChainId.Flare: + return EnvUtils.EnvName.FLARE_RPC_HOSTS; case ChainId.Fuse: return EnvUtils.EnvName.FUSE_RPC_HOSTS; case ChainId.Hedera: diff --git a/src/utils/env.ts b/src/utils/env.ts index bad0874..7bebd88 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -16,6 +16,7 @@ export namespace EnvUtils { EON_RPC_HOSTS = 'EON_RPC_HOSTS', EVMOS_RPC_HOSTS = 'EVMOS_RPC_HOSTS', FANTOM_RPC_HOSTS = 'FANTOM_RPC_HOSTS', + FLARE_RPC_HOSTS = 'FLARE_RPC_HOSTS', FUSE_RPC_HOSTS = 'FUSE_RPC_HOSTS', HEDERA_RPC_HOSTS = 'HEDERA_RPC_HOSTS', KAVA_RPC_HOSTS = 'KAVA_RPC_HOSTS', @@ -49,6 +50,7 @@ export namespace EnvUtils { GATSBY_EON_RPC_HOSTS = 'GATSBY_EON_RPC_HOSTS', GATSBY_EVMOS_RPC_HOSTS = 'GATSBY_EVMOS_RPC_HOSTS', GATSBY_FANTOM_RPC_HOSTS = 'GATSBY_FANTOM_RPC_HOSTS', + GATSBY_FLARE_RPC_HOSTS = 'GATSBY_FLARE_RPC_HOSTS', GATSBY_FUSE_RPC_HOSTS = 'GATSBY_FUSE_RPC_HOSTS', GATSBY_HEDERA_RPC_HOSTS = 'GATSBY_HEDERA_RPC_HOSTS', GATSBY_KAVA_RPC_HOSTS = 'GATSBY_KAVA_RPC_HOSTS', From 62cf2665dbb50a24473667e5138ac92caeca70db Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Mon, 5 Aug 2024 11:29:07 -0400 Subject: [PATCH 56/70] 0.0.220 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8bcf5f5..ef08dc4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.219", + "version": "0.0.220", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.219", + "version": "0.0.220", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 0d54c8d..845888c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.219", + "version": "0.0.220", "description": "", "main": "dist/index.js", "module": "index.ts", From c7fde438e46f54332d5cc503604450d29bb155ff Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Wed, 21 Aug 2024 11:02:13 -0400 Subject: [PATCH 57/70] Fix weETH address --- src/constants/tokens.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 7fdff29..efb58e1 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -2626,7 +2626,7 @@ export const TOKENS: TokenMapping = { [ChainId.Arbitrum]: { tokenName: TokenName.WEETH, tableName: tokenNameWithChainPrefix(TokenName.WEETH, ChainId.Arbitrum), - address: '0xfFA188493C15DfAf2C206c97D8633377847b6a52', + address: '0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe', decimals: 18, displayName: 'weETH', symbol: 'weETH', From 1c0bebbcca3559769b8d2d9e43f74961b61cd4de Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Wed, 21 Aug 2024 11:13:35 -0400 Subject: [PATCH 58/70] 0.0.221 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ef08dc4..30b5ae9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.220", + "version": "0.0.221", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.220", + "version": "0.0.221", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 845888c..9cfdfcd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.220", + "version": "0.0.221", "description": "", "main": "dist/index.js", "module": "index.ts", From fa7eda9432b48c75038f80bc115ac02f8fc86332 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 27 Aug 2024 23:00:41 -0400 Subject: [PATCH 59/70] 0.0.222 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 30b5ae9..96aa5fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.221", + "version": "0.0.222", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.221", + "version": "0.0.222", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 9cfdfcd..1975b29 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.221", + "version": "0.0.222", "description": "", "main": "dist/index.js", "module": "index.ts", From f6f1843985eb3870107e4eec673dc38a0bb7cfee Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Sun, 1 Sep 2024 22:59:21 -0400 Subject: [PATCH 60/70] Add Berachain Bartio --- src/constants/tokens.ts | 2 ++ src/crypto/networks.ts | 18 ++++++++++++++++++ src/crypto/providers.ts | 7 +++++++ src/utils/env.ts | 2 ++ 4 files changed, 29 insertions(+) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 9cb555d..dd90f57 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -16,6 +16,8 @@ export const tokenNameWithChainPrefix = (tokenName: TokenName | string, chainId: return `avalanche_${tokenName}` as TokenTableName case ChainId.Base: return `base_${tokenName}` as TokenTableName + case ChainId.Berachain_bArtio: + return `berachain_bartio_${tokenName}` as TokenTableName case ChainId.Blast: return `blast_${tokenName}` as TokenTableName case ChainId.Bsc: diff --git a/src/crypto/networks.ts b/src/crypto/networks.ts index 10484b3..e1dbd2f 100644 --- a/src/crypto/networks.ts +++ b/src/crypto/networks.ts @@ -11,6 +11,7 @@ export enum ChainId { Arthera = 10242, Avalanche = 43114, Base = 8453, + Berachain_bArtio = 80084, Blast = 81457, Bsc = 56, Celo = 42220, @@ -201,6 +202,23 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = { } } }, + [ChainId.Berachain_bArtio]: { + chainId: ChainId.Berachain_bArtio, + name: 'Berachain bArtio', + color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)', + icon: generateIconUrl(ChainId.Berachain_bArtio, 'svg'), + env: 'mainnet', + scanLink: 'https://bartio.beratrail.io', + scanName: 'Bartio Testnet Explorer', + coingecko: '', + rpc: { + rpcUrl: 'https://bartio.rpc.berachain.com', + nativeCurrency: { + symbol: 'BERA', + name: 'BERA' + } + } + }, [ChainId.Blast]: { chainId: ChainId.Blast, name: 'Blast', diff --git a/src/crypto/providers.ts b/src/crypto/providers.ts index 9931e15..d8d75d6 100644 --- a/src/crypto/providers.ts +++ b/src/crypto/providers.ts @@ -42,6 +42,11 @@ export const providerCacheReference: Record = { cacheHit: 0, cacheMiss: 0 }, + [ChainId.Berachain_bArtio]: { + lastUdated: 0, + cacheHit: 0, + cacheMiss: 0 + }, [ChainId.Blast]: { lastUdated: 0, cacheHit: 0, @@ -264,6 +269,8 @@ const getRpcEnvName = (chainId: ChainId): EnvUtils.EnvName => { return EnvUtils.EnvName.ARTHERA_RPC_HOSTS; case ChainId.Base: return EnvUtils.EnvName.BASE_RPC_HOSTS; + case ChainId.Berachain_bArtio: + return EnvUtils.EnvName.BERACHAIN_BARTIO_RPC_HOSTS; case ChainId.Blast: return EnvUtils.EnvName.BLAST_RPC_HOSTS; case ChainId.Bsc: diff --git a/src/utils/env.ts b/src/utils/env.ts index 5e6024d..f84405e 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -10,6 +10,7 @@ export namespace EnvUtils { GOERLI_RPC_HOSTS = 'GOERLI_RPC_HOSTS', ARTHERA_RPC_HOSTS = 'ARTHERA_RPC_HOSTS', BASE_RPC_HOSTS = 'BASE_RPC_HOSTS', + BERACHAIN_BARTIO_RPC_HOSTS = 'BERACHAIN_BARTIO_RPC_HOSTS', BLAST_RPC_HOSTS = 'BLAST_RPC_HOSTS', BSC_RPC_HOSTS = 'BSC_RPC_HOSTS', CELO_RPC_HOSTS = 'CELO_RPC_HOSTS', @@ -45,6 +46,7 @@ export namespace EnvUtils { GATSBY_GOERLI_RPC_HOSTS = 'GATSBY_GOERLI_RPC_HOSTS', GATSBY_ARTHERA_RPC_HOSTS = 'GATSBY_ARTHERA_RPC_HOSTS', GATSBY_BASE_RPC_HOSTS = 'GATSBY_BASE_RPC_HOSTS', + GATSBY_BERACHAIN_BARTIO_RPC_HOSTS = 'GATSBY_BERACHAIN_BARTIO_RPC_HOSTS', GATSBY_BLAST_RPC_HOSTS = 'GATSBY_BLAST_RPC_HOSTS', GATSBY_BSC_RPC_HOSTS = 'GATSBY_BSC_RPC_HOSTS', GATSBY_CELO_RPC_HOSTS = 'GATSBY_CELO_RPC_HOSTS', From 6ab14473c1657ac8d769f1778f33c0dd6a0fba22 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Sun, 1 Sep 2024 23:08:35 -0400 Subject: [PATCH 61/70] 0.0.223 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 96aa5fa..5887a71 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.222", + "version": "0.0.223", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.222", + "version": "0.0.223", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 1975b29..fc10c94 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.222", + "version": "0.0.223", "description": "", "main": "dist/index.js", "module": "index.ts", From d3ec1644d3ed6a52cff35b36b9a8b3f04fef1d57 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Fri, 20 Sep 2024 00:33:00 -0400 Subject: [PATCH 62/70] Add Mode --- src/constants/tokens.ts | 2 ++ src/crypto/networks.ts | 18 ++++++++++++++++++ src/crypto/providers.ts | 7 +++++++ src/utils/env.ts | 2 ++ 4 files changed, 29 insertions(+) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index dd90f57..64ad346 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -42,6 +42,8 @@ export const tokenNameWithChainPrefix = (tokenName: TokenName | string, chainId: return `linea_${tokenName}` as TokenTableName case ChainId.Mantle: return `mantle_${tokenName}` as TokenTableName + case ChainId.Mode: + return `mode_${tokenName}` as TokenTableName case ChainId.Mumbai: return `mum_${tokenName}` as TokenTableName case ChainId.Polygon: diff --git a/src/crypto/networks.ts b/src/crypto/networks.ts index e1dbd2f..ff2fbcc 100644 --- a/src/crypto/networks.ts +++ b/src/crypto/networks.ts @@ -24,6 +24,7 @@ export enum ChainId { Kava = 2222, Linea = 59144, Mantle = 5000, + Mode = 34443, opBNB = 204, Real = 111188, Scroll = 534352, @@ -424,6 +425,23 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = { } } }, + [ChainId.Mode]: { + chainId: ChainId.Mode, + name: 'Mode', + color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)', + icon: generateIconUrl(ChainId.Mode, 'svg'), + env: 'mainnet', + scanLink: 'https://modescan.io/', + scanName: 'Modescan', + coingecko: 'mode', + rpc: { + rpcUrl: 'https://mode.drpc.org', + nativeCurrency: { + symbol: 'ETH', + name: 'ETH' + } + } + }, [ChainId.opBNB]: { chainId: ChainId.opBNB, name: 'op_BNB', diff --git a/src/crypto/providers.ts b/src/crypto/providers.ts index d8d75d6..5014555 100644 --- a/src/crypto/providers.ts +++ b/src/crypto/providers.ts @@ -107,6 +107,11 @@ export const providerCacheReference: Record = { cacheHit: 0, cacheMiss: 0 }, + [ChainId.Mode]: { + lastUdated: 0, + cacheHit: 0, + cacheMiss: 0 + }, [ChainId.opBNB]: { lastUdated: 0, cacheHit: 0, @@ -295,6 +300,8 @@ const getRpcEnvName = (chainId: ChainId): EnvUtils.EnvName => { return EnvUtils.EnvName.LINEA_RPC_HOSTS; case ChainId.Mantle: return EnvUtils.EnvName.MANTLE_RPC_HOSTS; + case ChainId.Mode: + return EnvUtils.EnvName.MODE_RPC_HOSTS; case ChainId.opBNB: return EnvUtils.EnvName.OPBNB_RPC_HOSTS; case ChainId.Polygon: diff --git a/src/utils/env.ts b/src/utils/env.ts index f84405e..6457016 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -23,6 +23,7 @@ export namespace EnvUtils { KAVA_RPC_HOSTS = 'KAVA_RPC_HOSTS', LINEA_RPC_HOSTS = 'LINEA_RPC_HOSTS', MANTLE_RPC_HOSTS = 'MANTLE_RPC_HOSTS', + MODE_RPC_HOSTS = 'MODE_RPC_HOSTS', OPBNB_RPC_HOSTS = 'OPBNB_RPC_HOSTS', POLYGON_RPC_HOSTS = 'POLYGON_RPC_HOSTS', REAL_RPC_HOSTS = 'REAL_RPC_HOSTS', @@ -59,6 +60,7 @@ export namespace EnvUtils { GATSBY_KAVA_RPC_HOSTS = 'GATSBY_KAVA_RPC_HOSTS', GATSBY_LINEA_RPC_HOSTS = 'GATSBY_LINEA_RPC_HOSTS', GATSBY_MANTLE_RPC_HOSTS = 'GATSBY_MANTLE_RPC_HOSTS', + GATSBY_MODE_RPC_HOSTS = 'GATSBY_MODE_RPC_HOSTS', GATSBY_OPBNB_RPC_HOSTS = 'GATSBY_OPBNB_RPC_HOSTS', GATSBY_POLYGON_RPC_HOSTS = 'GATSBY_POLYGON_RPC_HOSTS', GATSBY_REAL_RPC_HOSTS = 'GATSBY_REAL_RPC_HOSTS', From 5ddef32619e2a883389567b024cab5eca7ab704a Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Fri, 20 Sep 2024 00:41:50 -0400 Subject: [PATCH 63/70] 0.0.224 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5887a71..c876450 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.223", + "version": "0.0.224", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.223", + "version": "0.0.224", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index fc10c94..65163ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.223", + "version": "0.0.224", "description": "", "main": "dist/index.js", "module": "index.ts", From 9b7776f8aa8d0230e5f3ea4ae416cc03dfcdfb72 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Fri, 4 Oct 2024 22:47:50 -0400 Subject: [PATCH 64/70] Add Rootstock --- src/constants/tokens.ts | 2 ++ src/crypto/networks.ts | 18 ++++++++++++++++++ src/crypto/providers.ts | 7 +++++++ src/utils/env.ts | 2 ++ 4 files changed, 29 insertions(+) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 64ad346..af9b338 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -52,6 +52,8 @@ export const tokenNameWithChainPrefix = (tokenName: TokenName | string, chainId: return `opbnb_${tokenName}` as TokenTableName case ChainId.Real: return `real_${tokenName}` as TokenTableName + case ChainId.Rootstock: + return `rootstock_${tokenName}` as TokenTableName case ChainId.Scroll: return `scroll_${tokenName}` as TokenTableName case ChainId.Skale_Europa: diff --git a/src/crypto/networks.ts b/src/crypto/networks.ts index ff2fbcc..0a184ff 100644 --- a/src/crypto/networks.ts +++ b/src/crypto/networks.ts @@ -27,6 +27,7 @@ export enum ChainId { Mode = 34443, opBNB = 204, Real = 111188, + Rootstock = 30, Scroll = 534352, Skale_Europa = 2046399126, Taiko = 167000, @@ -476,6 +477,23 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = { } } }, + [ChainId.Rootstock]: { + chainId: ChainId.Rootstock, + name: 'Rootstock', + color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)', + icon: generateIconUrl(ChainId.Rootstock, 'svg'), + env: 'mainnet', + scanLink: 'https://rootstock.blockscout.com/', + scanName: 'Rootstock explorer', + coingecko: 'rootstock', + rpc: { + rpcUrl: 'https://mycrypto.rsk.co', + nativeCurrency: { + symbol: 'RBTC', + name: 'RBTC' + } + } + }, [ChainId.Scroll]: { chainId: ChainId.Scroll, name: 'Scroll', diff --git a/src/crypto/providers.ts b/src/crypto/providers.ts index 5014555..ba6d597 100644 --- a/src/crypto/providers.ts +++ b/src/crypto/providers.ts @@ -127,6 +127,11 @@ export const providerCacheReference: Record = { cacheHit: 0, cacheMiss: 0 }, + [ChainId.Rootstock]: { + lastUdated: 0, + cacheHit: 0, + cacheMiss: 0 + }, [ChainId.Scroll]: { lastUdated: 0, cacheHit: 0, @@ -308,6 +313,8 @@ const getRpcEnvName = (chainId: ChainId): EnvUtils.EnvName => { return EnvUtils.EnvName.POLYGON_RPC_HOSTS; case ChainId.Real: return EnvUtils.EnvName.REAL_RPC_HOSTS; + case ChainId.Rootstock: + return EnvUtils.EnvName.ROOTSTOCK_RPC_HOSTS; case ChainId.Scroll: return EnvUtils.EnvName.SCROLL_RPC_HOSTS; case ChainId.Skale_Europa: diff --git a/src/utils/env.ts b/src/utils/env.ts index 6457016..e956a68 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -27,6 +27,7 @@ export namespace EnvUtils { OPBNB_RPC_HOSTS = 'OPBNB_RPC_HOSTS', POLYGON_RPC_HOSTS = 'POLYGON_RPC_HOSTS', REAL_RPC_HOSTS = 'REAL_RPC_HOSTS', + ROOTSTOCK_RPC_HOSTS = 'ROOTSTOCK_RPC_HOSTS', SCROLL_RPC_HOSTS = 'SCROLL_RPC_HOSTS', SKALE_EUROPA_RPC_HOSTS = 'SKALE_EUROPA_RPC_HOSTS', TAIKO_RPC_HOSTS = 'TAIKO_RPC_HOSTS', @@ -64,6 +65,7 @@ export namespace EnvUtils { GATSBY_OPBNB_RPC_HOSTS = 'GATSBY_OPBNB_RPC_HOSTS', GATSBY_POLYGON_RPC_HOSTS = 'GATSBY_POLYGON_RPC_HOSTS', GATSBY_REAL_RPC_HOSTS = 'GATSBY_REAL_RPC_HOSTS', + GATSBY_ROOTSTOCK_RPC_HOSTS = 'GATSBY_ROOTSTOCK_RPC_HOSTS', GATSBY_SCROLL_RPC_HOSTS = 'GATSBY_SCROLL_RPC_HOSTS', GATSBY_SKALE_EUROPA_RPC_HOSTS = 'GATSBY_SKALE_EUROPA_RPC_HOSTS', GATSBY_TAIKO_RPC_HOSTS = 'GATSBY_TAIKO_RPC_HOSTS', From 7e615b4f94f88b162af0e2e08e165db786baa375 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Sat, 5 Oct 2024 09:34:44 -0400 Subject: [PATCH 65/70] 0.0.225 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c876450..f32dc8f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.224", + "version": "0.0.225", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.224", + "version": "0.0.225", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 65163ef..dae6554 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.224", + "version": "0.0.225", "description": "", "main": "dist/index.js", "module": "index.ts", From 71a873614a69ba86824a65080229cb19d28c759a Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Mon, 28 Oct 2024 22:13:14 -0400 Subject: [PATCH 66/70] Add Zircuit --- src/constants/tokens.ts | 2 ++ src/crypto/networks.ts | 18 ++++++++++++++++++ src/crypto/providers.ts | 7 +++++++ src/utils/env.ts | 2 ++ 4 files changed, 29 insertions(+) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index af9b338..51d4aa8 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -60,6 +60,8 @@ export const tokenNameWithChainPrefix = (tokenName: TokenName | string, chainId: return `skale_europa_${tokenName}` as TokenTableName case ChainId.Taiko: return `taiko_${tokenName}` as TokenTableName + case ChainId.Zircuit: + return `zircuit_${tokenName}` as TokenTableName case ChainId.zkEVM: return `zkevm_${tokenName}` as TokenTableName case ChainId.zkSync: diff --git a/src/crypto/networks.ts b/src/crypto/networks.ts index 0a184ff..40a7b7c 100644 --- a/src/crypto/networks.ts +++ b/src/crypto/networks.ts @@ -31,6 +31,7 @@ export enum ChainId { Scroll = 534352, Skale_Europa = 2046399126, Taiko = 167000, + Zircuit = 48900, zkEVM = 1101, zkSync = 324, } @@ -545,6 +546,23 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = { } } }, + [ChainId.Zircuit]: { + chainId: ChainId.Zircuit, + name: 'Zircuit', + color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)', + icon: generateIconUrl(ChainId.Zircuit, 'svg'), + env: 'mainnet', + scanLink: 'https://explorer.zircuit.com/', + scanName: 'Zircuit Explorer', + coingecko: 'zircuit', + rpc: { + rpcUrl: 'https://zircuit-mainnet.drpc.org', + nativeCurrency: { + symbol: 'ETH', + name: 'ETH' + } + } + }, [ChainId.zkEVM]: { chainId: ChainId.zkEVM, name: 'Polygon_zkEVM', diff --git a/src/crypto/providers.ts b/src/crypto/providers.ts index ba6d597..845d89a 100644 --- a/src/crypto/providers.ts +++ b/src/crypto/providers.ts @@ -147,6 +147,11 @@ export const providerCacheReference: Record = { cacheHit: 0, cacheMiss: 0 }, + [ChainId.Zircuit]: { + lastUdated: 0, + cacheHit: 0, + cacheMiss: 0 + }, [ChainId.zkEVM]: { lastUdated: 0, cacheHit: 0, @@ -321,6 +326,8 @@ const getRpcEnvName = (chainId: ChainId): EnvUtils.EnvName => { return EnvUtils.EnvName.SKALE_EUROPA_RPC_HOSTS; case ChainId.Taiko: return EnvUtils.EnvName.TAIKO_RPC_HOSTS; + case ChainId.Zircuit: + return EnvUtils.EnvName.ZIRCUIT_RPC_HOSTS; case ChainId.zkEVM: return EnvUtils.EnvName.ZKEVM_RPC_HOSTS; case ChainId.zkSync: diff --git a/src/utils/env.ts b/src/utils/env.ts index e956a68..bd41ee3 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -31,6 +31,7 @@ export namespace EnvUtils { SCROLL_RPC_HOSTS = 'SCROLL_RPC_HOSTS', SKALE_EUROPA_RPC_HOSTS = 'SKALE_EUROPA_RPC_HOSTS', TAIKO_RPC_HOSTS = 'TAIKO_RPC_HOSTS', + ZIRCUIT_RPC_HOSTS = 'ZIRCUIT_RPC_HOSTS', ZKEVM_RPC_HOSTS = 'ZKEVM_RPC_HOSTS', ZKSYNC_RPC_HOSTS = 'ZKSYNC_RPC_HOSTS', MUMBAI_RPC_HOSTS = 'MUMBAI_RPC_HOSTS', @@ -69,6 +70,7 @@ export namespace EnvUtils { GATSBY_SCROLL_RPC_HOSTS = 'GATSBY_SCROLL_RPC_HOSTS', GATSBY_SKALE_EUROPA_RPC_HOSTS = 'GATSBY_SKALE_EUROPA_RPC_HOSTS', GATSBY_TAIKO_RPC_HOSTS = 'GATSBY_TAIKO_RPC_HOSTS', + GATSBY_ZIRCUIT_RPC_HOSTS = 'GATSBY_ZIRCUIT_RPC_HOSTS', GATSBY_ZKEVM_RPC_HOSTS = 'GATSBY_ZKEVM_RPC_HOSTS', GATSBY_ZKSYNC_RPC_HOSTS = 'GATSBY_ZKSYNC_RPC_HOSTS', GATSBY_MUMBAI_RPC_HOSTS = 'GATSBY_MUMBAI_RPC_HOSTS', From 343d678b23710d0b87bf1f272b51df3f7b5de12b Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Mon, 28 Oct 2024 22:26:54 -0400 Subject: [PATCH 67/70] 0.0.226 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f32dc8f..5a33e34 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.225", + "version": "0.0.226", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.225", + "version": "0.0.226", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index dae6554..72bee8a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.225", + "version": "0.0.226", "description": "", "main": "dist/index.js", "module": "index.ts", From a96ecf9f69bea855fe8565d42524d5d04ea02329 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 12 Nov 2024 23:05:15 -0500 Subject: [PATCH 68/70] Add coingecko Skale id --- src/crypto/networks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/networks.ts b/src/crypto/networks.ts index 40a7b7c..75a03ff 100644 --- a/src/crypto/networks.ts +++ b/src/crypto/networks.ts @@ -520,7 +520,7 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = { env: 'mainnet', scanLink: 'https://elated-tan-skat.explorer.mainnet.skalenodes.com/', scanName: 'EuropaLiquidityHubExplorer', - coingecko: '', + coingecko: 'skale', rpc: { rpcUrl: 'https://mainnet.skalenodes.com/v1/elated-tan-skat', nativeCurrency: { From 42d18fab28dd3d361d70bae1a4b65a509fe4d8c4 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Tue, 12 Nov 2024 23:12:42 -0500 Subject: [PATCH 69/70] 0.0.227 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5a33e34..b829920 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.226", + "version": "0.0.227", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ichidao/ichi-sdk", - "version": "0.0.226", + "version": "0.0.227", "license": "MIT", "dependencies": { "@thanpolas/univ3prices": "^3.0.2", diff --git a/package.json b/package.json index 72bee8a..262a31a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ichidao/ichi-sdk", - "version": "0.0.226", + "version": "0.0.227", "description": "", "main": "dist/index.js", "module": "index.ts", From 6b37f0a74aa592c2dd2cf38541574e9748e7a8f9 Mon Sep 17 00:00:00 2001 From: Tatyana Stemkovski Date: Sun, 17 Nov 2024 19:41:12 -0500 Subject: [PATCH 70/70] Update wBTC on linea --- src/constants/tokens.ts | 4 ++-- src/utils/token.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 51d4aa8..4bcdb77 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -1426,7 +1426,7 @@ export const TOKENS: TokenMapping = { symbol: 'LYNX', fullName: 'Lynex', isOneToken: false, - atCoingecko: false, + atCoingecko: true, } }, [TokenName.MATIC]: { @@ -2604,7 +2604,7 @@ export const TOKENS: TokenMapping = { displayName: 'wBTC', symbol: 'wBTC', fullName: 'Wrapped BTC', - atCoingecko: false, + atCoingecko: true, isOneToken: false }, [ChainId.zkEVM]: { diff --git a/src/utils/token.ts b/src/utils/token.ts index a5e9a36..525fe35 100644 --- a/src/utils/token.ts +++ b/src/utils/token.ts @@ -494,7 +494,6 @@ export async function getTokenMetrics( break; case TokenName.WBTC: const wbtcAddress = (chainId !== ChainId.Eon - && chainId !== ChainId.Linea && chainId !== ChainId.Evmos && chainId !== ChainId.Blast) ? token.address.toLowerCase()