From 079b633a1ce4893a6ef0a439c9d3762efb9a34d7 Mon Sep 17 00:00:00 2001 From: viet-nv Date: Mon, 16 Oct 2023 23:14:48 +0700 Subject: [PATCH 1/7] feat: add scroll --- .github/workflows/pr.yaml | 2 +- package.json | 4 +- src/constants/bases.ts | 2 + src/constants/networks.ts | 5 ++ src/constants/networks/index.ts | 1 + src/constants/networks/scroll.ts | 70 ++++++++++++++++++++++++ src/constants/tokens.ts | 13 ++++- src/pages/About/AboutKyberSwap/index.tsx | 5 ++ yarn.lock | 8 +-- 9 files changed, 102 insertions(+), 8 deletions(-) create mode 100644 src/constants/networks/scroll.ts diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 0f80ebb7bd..e621c974f4 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -114,7 +114,7 @@ jobs: VITE_TAG: ${{ needs.prepare.outputs.image_tag }} CURRENT_BRANCH: ${{ needs.prepare.outputs.current_branch }} NODE_OPTIONS: '--max_old_space_size=4096' - run: yarn build + run: yarn build-dev - name: Docker build and push uses: docker/build-push-action@v2 diff --git a/package.json b/package.json index be9d66f6ab..f8e62113b3 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@kybernetwork/oauth2": "1.0.0", "@kyberswap/krystal-walletconnect-v2": "0.0.1", "@kyberswap/ks-sdk-classic": "^1.0.3", - "@kyberswap/ks-sdk-core": "1.0.11", + "@kyberswap/ks-sdk-core": "1.0.12", "@kyberswap/ks-sdk-elastic": "^1.1.2", "@kyberswap/ks-sdk-solana": "^1.0.2", "@lingui/loader": "~3.14.0", @@ -200,7 +200,7 @@ "vite-tsconfig-paths": "^4.0.8" }, "resolutions": { - "@kyberswap/ks-sdk-core": "1.0.11", + "@kyberswap/ks-sdk-core": "1.0.12", "babel-plugin-lodash/@babel/types": "~7.20.0", "react-error-overlay": "6.0.9", "@lingui/babel-plugin-extract-messages": "3.14.0", diff --git a/src/constants/bases.ts b/src/constants/bases.ts index 8a4bd0bae2..808d2b0641 100644 --- a/src/constants/bases.ts +++ b/src/constants/bases.ts @@ -28,6 +28,7 @@ const WETH_ONLY: ChainTokenList = { [ChainId.LINEA]: [WETH[ChainId.LINEA]], [ChainId.ZKEVM]: [WETH[ChainId.ZKEVM]], [ChainId.BASE]: [WETH[ChainId.BASE]], + [ChainId.SCROLL]: [WETH[ChainId.SCROLL]], [ChainId.SOLANA_DEVNET]: [WETH[ChainId.SOLANA_DEVNET]], } @@ -179,4 +180,5 @@ export const SUGGESTED_BASES: ChainTokenList = { new Token(ChainId.LINEA, '0x7d43aabc515c356145049227cee54b608342c0ad', 18, 'BUSD', 'BUSD'), ], [ChainId.BASE]: [...WETH_ONLY[ChainId.BASE], USDC[ChainId.BASE], DAI[ChainId.BASE]], + [ChainId.SCROLL]: [...WETH_ONLY[ChainId.SCROLL], USDT[ChainId.SCROLL], USDC[ChainId.SCROLL], DAI[ChainId.SCROLL]], } diff --git a/src/constants/networks.ts b/src/constants/networks.ts index 51149291d8..9dad2d4a63 100644 --- a/src/constants/networks.ts +++ b/src/constants/networks.ts @@ -20,6 +20,7 @@ import { matic, mumbai, optimism, + scroll, solana, solanaDevnet, zkEvm, @@ -51,6 +52,7 @@ const NETWORKS_INFO_CONFIG: NETWORKS_INFO_CONFIG_TYPE = { [ChainId.LINEA]: linea, [ChainId.ZKEVM]: zkEvm, [ChainId.BASE]: base, + [ChainId.SCROLL]: scroll, [ChainId.SOLANA]: solana, [ChainId.SOLANA_DEVNET]: solanaDevnet, } as const @@ -77,6 +79,7 @@ export const MAINNET_NETWORKS = [ ChainId.ZKEVM, ChainId.ZKSYNC, ChainId.BASE, + ChainId.SCROLL, ChainId.BSCMAINNET, ChainId.AVAXMAINNET, // ChainId.SOLANA, @@ -148,6 +151,7 @@ export const STATIC_FEE_OPTIONS: { [chainId: number]: number[] | undefined } = { [ChainId.LINEA]: [8, 10, 50, 300, 500, 1000], [ChainId.ZKEVM]: [8, 10, 50, 300, 500, 1000], [ChainId.BASE]: [8, 10, 50, 300, 500, 1000], + [ChainId.SCROLL]: [8, 10, 50, 300, 500, 1000], } export const ONLY_STATIC_FEE_CHAINS = [ @@ -159,6 +163,7 @@ export const ONLY_STATIC_FEE_CHAINS = [ ChainId.LINEA, ChainId.ZKEVM, ChainId.BASE, + ChainId.SCROLL, ] // hardcode for unavailable subgraph diff --git a/src/constants/networks/index.ts b/src/constants/networks/index.ts index d5d210bd1b..f64d1000fd 100644 --- a/src/constants/networks/index.ts +++ b/src/constants/networks/index.ts @@ -17,4 +17,5 @@ export { default as zksync } from './zksync' export { default as linea } from './linea' export { default as zkEvm } from './zkevm' export { default as base } from './base' +export { default as scroll } from './scroll' export { default as solanaDevnet } from './solana-devnet' diff --git a/src/constants/networks/scroll.ts b/src/constants/networks/scroll.ts new file mode 100644 index 0000000000..b78f11ec83 --- /dev/null +++ b/src/constants/networks/scroll.ts @@ -0,0 +1,70 @@ +import { ChainId } from '@kyberswap/ks-sdk-core' + +import EthereumLogo from 'assets/images/ethereum-logo.png' +import { EVMNetworkInfo } from 'constants/networks/type' + +const EMPTY = '' +const EMPTY_ARRAY: any[] = [] +const NOT_SUPPORT = null + +const scroll: EVMNetworkInfo = { + chainId: ChainId.SCROLL, + route: 'scroll', + ksSettingRoute: 'scroll', + priceRoute: 'scroll', + poolFarmRoute: 'scroll', + aggregatorRoute: 'scroll', + name: 'Scroll', + icon: 'https://file.notion.so/f/s/253723b6-f537-4968-a2e6-f102b893ef4c/Scroll_logo_mark_300300px_RGB.svg?id=2ecfe530-2ce5-48d0-8bed-537a584a92ce&table=block&spaceId=cc12e519-e01d-4277-9573-3fe8e5bdf9ce&expirationTimestamp=1697558400000&signature=-PD15tUbD8xuN5VOSpwW0B1Cl30TILAHe-LsLjqPhlQ&downloadName=Scroll_logo+mark_300*300px_RGB.svg', + + iconSelected: NOT_SUPPORT, + + defaultBlockSubgraph: 'https://scroll-graph.kyberengineering.io/subgraphs/name/kybernetwork/scroll-blocks', + etherscanUrl: 'https://scrollscan.com', + etherscanName: 'Scrollscan', + bridgeURL: 'https://scroll.io/bridge', + nativeToken: { + symbol: 'ETH', + name: 'ETH', + logo: EthereumLogo, + decimal: 18, + minForGas: 10 ** 16, + }, + defaultRpcUrl: 'https://rpc.scroll.io', + multicall: '0xcA11bde05977b3631167028862bE2a173976CA11', + classic: { + defaultSubgraph: 'https://scroll-graph.kyberengineering.io/subgraphs/name/kybernetwork/kyberswap-exchange-scroll', + static: { + zap: '0x2abE8750e4a65584d7452316356128C936273e0D', + router: '0x5649B4DD00780e99Bab7Abb4A3d581Ea1aEB23D0', + factory: '0x1c758aF0688502e49140230F6b0EBd376d429be5', + }, + oldStatic: NOT_SUPPORT, + dynamic: NOT_SUPPORT, + claimReward: NOT_SUPPORT, + fairlaunch: EMPTY_ARRAY, + fairlaunchV2: EMPTY_ARRAY, + }, + elastic: { + defaultSubgraph: 'https://scroll-graph.kyberengineering.io/subgraphs/name/kybernetwork/kyberswap-elastic-scroll', + startBlock: 36376, + coreFactory: '0xC7a590291e07B9fe9E64b86c58fD8fC764308C4A', + nonfungiblePositionManager: '0xe222fBE074A436145b255442D919E4E3A6c6a480', + tickReader: '0x8Fd8Cb948965d9305999D767A02bf79833EADbB3', + initCodeHash: '0x00e263aaa3a2c06a89b53217a9e7aad7e15613490a72e0f95f303c4de2dc7045', + quoter: '0x4d47fd5a29904Dae0Ef51b1c450C9750F15D7856', + routers: '0xF9c2b5746c946EF883ab2660BbbB1f10A5bdeAb4', + farms: ['0x7D5ba536ab244aAA1EA42aB88428847F25E3E676'], + farmv2Quoter: '0x6AFeb9EDd6Cf44fA8E89b1eee28284e6dD7705C8', + farmV2S: ['0x3D6AfE2fB73fFEd2E3dD00c501A174554e147a43', '0xf2BcDf38baA52F6b0C1Db5B025DfFf01Ae1d6dBd'], + }, + limitOrder: NOT_SUPPORT, + averageBlockTimeInSeconds: 8.4, // dont use for base + coingeckoNetworkId: 'scroll', + coingeckoNativeTokenId: 'ethereum', + deBankSlug: EMPTY, + dexToCompare: NOT_SUPPORT, + geckoTermialId: NOT_SUPPORT, +} + +export default scroll diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 8087ffb1e5..121c9a0564 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -57,6 +57,7 @@ export const STABLE_COIN_ADDRESSES_TO_TAKE_FEE: Record = { [ChainId.ZKEVM]: [], [ChainId.LINEA]: [], [ChainId.BASE]: [], + [ChainId.SCROLL]: [], [ChainId.SOLANA_DEVNET]: [], } @@ -151,6 +152,7 @@ export const SUPER_STABLE_COINS_ADDRESS: { [chainId in ChainId]: string[] } = { '0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb', // DAI ], [ChainId.LINEA]: [], + [ChainId.SCROLL]: [], [ChainId.SOLANA_DEVNET]: [], } @@ -200,6 +202,7 @@ export const CORRELATED_COINS_ADDRESS: { [chainId in ChainId]: string[][] } = { [ChainId.ZKEVM]: [], [ChainId.LINEA]: [], [ChainId.BASE]: [], + [ChainId.SCROLL]: [], [ChainId.SOLANA_DEVNET]: [], } @@ -243,6 +246,8 @@ export const DAI: { [chainId in ChainId]: Token } = { 'DAI', 'DAI (Wormhole)', ), + // TDOD: Get real DAI + [ChainId.SCROLL]: new Token(ChainId.SCROLL, '0x50c5725949a6f0c72e6c4a641f24049a917db0cb', 18, 'DAI', 'Dai'), } export const USDC: { [chainId in ChainId]: Token } = { @@ -284,6 +289,8 @@ export const USDC: { [chainId in ChainId]: Token } = { [ChainId.ZKEVM]: new Token(ChainId.ZKEVM, '0xA8CE8aee21bC2A48a5EF670afCc9274C7bbbC035', 6, 'USDC', 'USD Coin'), [ChainId.LINEA]: new Token(ChainId.LINEA, '0x176211869cA2b568f2A7D4EE941E073a821EE1ff', 6, 'USDC', 'USD Coin'), [ChainId.BASE]: new Token(ChainId.BASE, '0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA', 6, 'USDC', 'USD Coin'), + // TODO: verify this USDC on Scroll + [ChainId.SCROLL]: new Token(ChainId.SCROLL, '0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4', 6, 'USDC', 'USD Coin'), } export const USDT: { [chainId in ChainId]: Token } = { @@ -352,6 +359,8 @@ export const USDT: { [chainId in ChainId]: Token } = { // not existed [ChainId.BASE]: new Token(ChainId.BASE, '0xA219439258ca9da29E9Cc4cE5596924745e12B93', 6, 'USDT', 'Tether USD'), + // TODO: verify this address + [ChainId.SCROLL]: new Token(ChainId.SCROLL, '0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df', 6, 'USDT', 'Tether USD'), } export const COMP = new Token(ChainId.MAINNET, '0xc00e94Cb662C3520282E6f5717214004A7f26888', 18, 'COMP', 'Compound') @@ -381,12 +390,13 @@ export const KNC: { [chainId in ChainId]: Token } = { [ChainId.OPTIMISM]: new Token(ChainId.OPTIMISM, '0xa00e3a3511aac35ca78530c85007afcd31753819', 18, 'KNC', 'KNC'), [ChainId.LINEA]: new Token(ChainId.LINEA, '0x3b2F62d42DB19B30588648bf1c184865D4C3B1D6', 18, 'KNC', 'KNC'), [ChainId.ZKEVM]: new Token(ChainId.ZKEVM, '0x6A80A465409ce8D36C513129C0FEEa61BEd579ba', 18, 'KNC', 'KNC'), + [ChainId.BASE]: new Token(ChainId.BASE, '0x28fe69Ff6864C1C218878BDCA01482D36B9D57b1', 18, 'KNC', 'KNC'), // TODO(viet-nv): KNC does not exist on the below chain [ChainId.CRONOS]: new Token(ChainId.CRONOS, KNC_ADDRESS, 18, 'KNC', 'KNC'), [ChainId.AURORA]: new Token(ChainId.AURORA, KNC_ADDRESS, 18, 'KNC', 'KNC'), [ChainId.FANTOM]: new Token(ChainId.FANTOM, KNC_ADDRESS, 18, 'KNC', 'KNC'), - [ChainId.BASE]: new Token(ChainId.BASE, KNC_ADDRESS, 18, 'KNC', 'KNC'), + [ChainId.SCROLL]: new Token(ChainId.SCROLL, KNC_ADDRESS, 18, 'KNC', 'KNC'), [ChainId.ZKSYNC]: new Token(ChainId.ZKSYNC, KNC_ADDRESS, 18, 'KNC', 'KNC'), [ChainId.AVAXTESTNET]: new Token(ChainId.AVAXTESTNET, KNC_ADDRESS, 18, 'KNC', 'KNC'), @@ -430,6 +440,7 @@ export const DEFAULT_OUTPUT_TOKEN_BY_CHAIN: Partial> = { [ChainId.ZKEVM]: USDT[ChainId.ZKEVM], [ChainId.LINEA]: USDC[ChainId.LINEA], [ChainId.BASE]: USDC[ChainId.BASE], + [ChainId.SCROLL]: USDC[ChainId.SCROLL], } export const DEFAULT_SWAP_FEE_STABLE_PAIRS = 4 diff --git a/src/pages/About/AboutKyberSwap/index.tsx b/src/pages/About/AboutKyberSwap/index.tsx index 7db120d347..adcfa213e2 100644 --- a/src/pages/About/AboutKyberSwap/index.tsx +++ b/src/pages/About/AboutKyberSwap/index.tsx @@ -1017,6 +1017,11 @@ function AboutKyberSwap() { alt="Base" width="100%" /> + Sroll diff --git a/yarn.lock b/yarn.lock index a4e14a88d9..0a2d855de6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2293,10 +2293,10 @@ tiny-warning "^1.0.3" toformat "^2.0.0" -"@kyberswap/ks-sdk-core@1.0.11", "@kyberswap/ks-sdk-core@^1.0.5": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@kyberswap/ks-sdk-core/-/ks-sdk-core-1.0.11.tgz#59362240147001ccabcb49ed77991b2f78b0e440" - integrity sha512-A7pPRqr0lFeSYOsuitsld+WglV4G8Tl5FsKZpx9mBjOrSFKGLOtCE0oMwAeD4+Jjo8VyLJppkBINQYY7wAq8Xg== +"@kyberswap/ks-sdk-core@1.0.12", "@kyberswap/ks-sdk-core@^1.0.5": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@kyberswap/ks-sdk-core/-/ks-sdk-core-1.0.12.tgz#a48cd835adb90cc138218746cea0d7f246d28643" + integrity sha512-JWqo4bfmvc74P5gUgmmJzZh2GQj5MzRPrpD4L/nIPMhzvdIMreK2aEbU0euv8g2ao+Gthnk8e3hnYragxzj7yQ== dependencies: "@ethersproject/address" "^5.0.2" "@solana/web3.js" "^1.66.2" From 763f93e5af8370b2268d05321af3bef134b90608 Mon Sep 17 00:00:00 2001 From: viet-nv Date: Tue, 17 Oct 2023 00:42:26 +0700 Subject: [PATCH 2/7] fix: weth address on scroll --- package.json | 4 ++-- yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index f8e62113b3..285bf6399e 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@kybernetwork/oauth2": "1.0.0", "@kyberswap/krystal-walletconnect-v2": "0.0.1", "@kyberswap/ks-sdk-classic": "^1.0.3", - "@kyberswap/ks-sdk-core": "1.0.12", + "@kyberswap/ks-sdk-core": "1.0.13", "@kyberswap/ks-sdk-elastic": "^1.1.2", "@kyberswap/ks-sdk-solana": "^1.0.2", "@lingui/loader": "~3.14.0", @@ -200,7 +200,7 @@ "vite-tsconfig-paths": "^4.0.8" }, "resolutions": { - "@kyberswap/ks-sdk-core": "1.0.12", + "@kyberswap/ks-sdk-core": "1.0.13", "babel-plugin-lodash/@babel/types": "~7.20.0", "react-error-overlay": "6.0.9", "@lingui/babel-plugin-extract-messages": "3.14.0", diff --git a/yarn.lock b/yarn.lock index 0a2d855de6..35100ef88a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2293,10 +2293,10 @@ tiny-warning "^1.0.3" toformat "^2.0.0" -"@kyberswap/ks-sdk-core@1.0.12", "@kyberswap/ks-sdk-core@^1.0.5": - version "1.0.12" - resolved "https://registry.yarnpkg.com/@kyberswap/ks-sdk-core/-/ks-sdk-core-1.0.12.tgz#a48cd835adb90cc138218746cea0d7f246d28643" - integrity sha512-JWqo4bfmvc74P5gUgmmJzZh2GQj5MzRPrpD4L/nIPMhzvdIMreK2aEbU0euv8g2ao+Gthnk8e3hnYragxzj7yQ== +"@kyberswap/ks-sdk-core@1.0.13", "@kyberswap/ks-sdk-core@^1.0.5": + version "1.0.13" + resolved "https://registry.yarnpkg.com/@kyberswap/ks-sdk-core/-/ks-sdk-core-1.0.13.tgz#31a67aa88edb6968366192f53f829d74ca329031" + integrity sha512-o6jXdZdX00gKQ5RE/G4iQ5oGoReue8ZQFGr0JVCvGxRf/ZLjjAHW+tZfyuxrktk5bWKQjMN43PX7AKZ2+KyHtQ== dependencies: "@ethersproject/address" "^5.0.2" "@solana/web3.js" "^1.66.2" From 85a3e9e4b0a701236db94ac4b2ddab7ecd3fb932 Mon Sep 17 00:00:00 2001 From: viet-nv Date: Tue, 17 Oct 2023 11:53:34 +0700 Subject: [PATCH 3/7] feat: point to prod --- .github/workflows/pr.yaml | 2 +- src/components/ClassicElasticTab.tsx | 2 +- src/constants/networks.ts | 1 + src/constants/tokens.ts | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index e621c974f4..0f80ebb7bd 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -114,7 +114,7 @@ jobs: VITE_TAG: ${{ needs.prepare.outputs.image_tag }} CURRENT_BRANCH: ${{ needs.prepare.outputs.current_branch }} NODE_OPTIONS: '--max_old_space_size=4096' - run: yarn build-dev + run: yarn build - name: Docker build and push uses: docker/build-push-action@v2 diff --git a/src/components/ClassicElasticTab.tsx b/src/components/ClassicElasticTab.tsx index e8285f4efc..ad8bed9727 100644 --- a/src/components/ClassicElasticTab.tsx +++ b/src/components/ClassicElasticTab.tsx @@ -45,7 +45,7 @@ function ClassicElasticTab() { const upToMedium = useMedia(`(max-width: ${MEDIA_WIDTHS.upToMedium}px)`) - const dontShowLegacy = [ChainId.ZKEVM, ChainId.BASE, ChainId.LINEA].includes(chainId) + const dontShowLegacy = [ChainId.ZKEVM, ChainId.BASE, ChainId.LINEA, ChainId.SCROLL].includes(chainId) const showLegacyExplicit = upToMedium || dontShowLegacy ? false : isFarmpage ? shouldShowFarmTab : shouldShowPositionTab diff --git a/src/constants/networks.ts b/src/constants/networks.ts index 9dad2d4a63..2ffd52dd5e 100644 --- a/src/constants/networks.ts +++ b/src/constants/networks.ts @@ -190,6 +190,7 @@ export const SUPPORTED_NETWORKS_FOR_MY_EARNINGS = [ ChainId.LINEA, ChainId.BASE, ChainId.ZKSYNC, + ChainId.SCROLL, ChainId.BSCMAINNET, ChainId.AVAXMAINNET, ChainId.FANTOM, diff --git a/src/constants/tokens.ts b/src/constants/tokens.ts index 121c9a0564..6baa86c82c 100644 --- a/src/constants/tokens.ts +++ b/src/constants/tokens.ts @@ -440,7 +440,7 @@ export const DEFAULT_OUTPUT_TOKEN_BY_CHAIN: Partial> = { [ChainId.ZKEVM]: USDT[ChainId.ZKEVM], [ChainId.LINEA]: USDC[ChainId.LINEA], [ChainId.BASE]: USDC[ChainId.BASE], - [ChainId.SCROLL]: USDC[ChainId.SCROLL], + [ChainId.SCROLL]: USDT[ChainId.SCROLL], } export const DEFAULT_SWAP_FEE_STABLE_PAIRS = 4 From 9670f5da150a51a2a190563044c405a91cd4c7fd Mon Sep 17 00:00:00 2001 From: viet-nv Date: Tue, 17 Oct 2023 15:26:08 +0700 Subject: [PATCH 4/7] add farm stg --- src/constants/networks/matic.ts | 4 ++-- src/constants/networks/scroll.ts | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/constants/networks/matic.ts b/src/constants/networks/matic.ts index 04d1a80533..5f4b1f0298 100644 --- a/src/constants/networks/matic.ts +++ b/src/constants/networks/matic.ts @@ -64,12 +64,12 @@ const maticInfo: EVMNetworkInfo = { routers: '0xF9c2b5746c946EF883ab2660BbbB1f10A5bdeAb4', farms: ['0x7D5ba536ab244aAA1EA42aB88428847F25E3E676'], farmv2Quoter: '0x6AFeb9EDd6Cf44fA8E89b1eee28284e6dD7705C8', - farmV2S: [ + farmV2S: [], + 'farmV2.1S': [ '0xA70a1Ad0F91c52c79e177c5A18a7C9E1C4360e0e', '0x3D6AfE2fB73fFEd2E3dD00c501A174554e147a43', '0xf2BcDf38baA52F6b0C1Db5B025DfFf01Ae1d6dBd', ], - 'farmV2.1S': [], }, limitOrder: '*', averageBlockTimeInSeconds: 2.6, diff --git a/src/constants/networks/scroll.ts b/src/constants/networks/scroll.ts index b78f11ec83..600b1ab9c6 100644 --- a/src/constants/networks/scroll.ts +++ b/src/constants/networks/scroll.ts @@ -56,7 +56,11 @@ const scroll: EVMNetworkInfo = { routers: '0xF9c2b5746c946EF883ab2660BbbB1f10A5bdeAb4', farms: ['0x7D5ba536ab244aAA1EA42aB88428847F25E3E676'], farmv2Quoter: '0x6AFeb9EDd6Cf44fA8E89b1eee28284e6dD7705C8', - farmV2S: ['0x3D6AfE2fB73fFEd2E3dD00c501A174554e147a43', '0xf2BcDf38baA52F6b0C1Db5B025DfFf01Ae1d6dBd'], + farmV2S: [ + '0x3D6AfE2fB73fFEd2E3dD00c501A174554e147a43', + '0xf2BcDf38baA52F6b0C1Db5B025DfFf01Ae1d6dBd', + '0x67BC5156227C8372b2561b5058A7F628846019B9', + ], }, limitOrder: NOT_SUPPORT, averageBlockTimeInSeconds: 8.4, // dont use for base From 16050b0d4a6866c23e5fdd0531ac5b513e769f26 Mon Sep 17 00:00:00 2001 From: viet-nv Date: Wed, 18 Oct 2023 09:29:03 +0700 Subject: [PATCH 5/7] fix: logo --- src/constants/index.ts | 1 + src/constants/networks/scroll.ts | 2 +- src/pages/About/AboutKyberSwap/index.tsx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/constants/index.ts b/src/constants/index.ts index e181ef45c2..35fc4562b1 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -333,6 +333,7 @@ export const TYPE_AND_SWAP_NOT_SUPPORTED_CHAINS: ChainId[] = [ ChainId.LINEA, ChainId.ZKEVM, ChainId.BASE, + ChainId.SCROLL, ] export const SWAP_FEE_RECEIVER_ADDRESS = '0x4f82e73EDb06d29Ff62C91EC8f5Ff06571bdeb29' diff --git a/src/constants/networks/scroll.ts b/src/constants/networks/scroll.ts index 600b1ab9c6..e29f99ffcb 100644 --- a/src/constants/networks/scroll.ts +++ b/src/constants/networks/scroll.ts @@ -15,7 +15,7 @@ const scroll: EVMNetworkInfo = { poolFarmRoute: 'scroll', aggregatorRoute: 'scroll', name: 'Scroll', - icon: 'https://file.notion.so/f/s/253723b6-f537-4968-a2e6-f102b893ef4c/Scroll_logo_mark_300300px_RGB.svg?id=2ecfe530-2ce5-48d0-8bed-537a584a92ce&table=block&spaceId=cc12e519-e01d-4277-9573-3fe8e5bdf9ce&expirationTimestamp=1697558400000&signature=-PD15tUbD8xuN5VOSpwW0B1Cl30TILAHe-LsLjqPhlQ&downloadName=Scroll_logo+mark_300*300px_RGB.svg', + icon: 'https://storage.googleapis.com/ks-setting-1d682dca/fe12013c-4d72-4ac3-9415-a278b7d474c71697595633825.png', iconSelected: NOT_SUPPORT, diff --git a/src/pages/About/AboutKyberSwap/index.tsx b/src/pages/About/AboutKyberSwap/index.tsx index adcfa213e2..42dc9950c2 100644 --- a/src/pages/About/AboutKyberSwap/index.tsx +++ b/src/pages/About/AboutKyberSwap/index.tsx @@ -1018,7 +1018,7 @@ function AboutKyberSwap() { width="100%" /> Sroll From e25afc21002954f7987557f070394c59269ef82f Mon Sep 17 00:00:00 2001 From: viet-nv Date: Wed, 18 Oct 2023 11:33:09 +0700 Subject: [PATCH 6/7] fix: farm v2 static --- src/constants/abis/v2/farmv2.1.json | 1414 +++++++++++++-------------- src/constants/networks/matic.ts | 4 +- src/constants/networks/scroll.ts | 3 +- 3 files changed, 711 insertions(+), 710 deletions(-) diff --git a/src/constants/abis/v2/farmv2.1.json b/src/constants/abis/v2/farmv2.1.json index 3cff91c838..4e492bbfe6 100644 --- a/src/constants/abis/v2/farmv2.1.json +++ b/src/constants/abis/v2/farmv2.1.json @@ -1,1474 +1,1474 @@ [ { + "type": "constructor", + "stateMutability": "nonpayable", "inputs": [ { - "internalType": "contract IERC721", + "type": "address", "name": "_nft", - "type": "address" + "internalType": "contract IERC721" }, { - "internalType": "contract IKSElasticLMHelper", + "type": "address", "name": "_helper", - "type": "address" + "internalType": "contract IKSElasticLMHelper" } - ], - "stateMutability": "nonpayable", - "type": "constructor" + ] }, { - "inputs": [], + "type": "error", "name": "EmergencyEnabled", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "Expired", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "FailToAdd", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "FailToRemove", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "FarmNotFound", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "Forbidden", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "InvalidFarm", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "InvalidInput", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "InvalidRange", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "InvalidReward", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "InvalidTime", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "LiquidityNotMatch", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "NotOwner", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "PhaseSettled", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "PositionNotEligible", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "RangeNotFound", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "RangeNotMatch", - "type": "error" + "inputs": [] }, { - "inputs": [], + "type": "error", "name": "StakeNotFound", - "type": "error" + "inputs": [] }, { - "anonymous": false, + "type": "event", + "name": "ActivateRange", "inputs": [ { - "indexed": true, - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256", + "indexed": true }, { - "indexed": false, - "internalType": "uint256", + "type": "uint256", "name": "rangeId", - "type": "uint256" + "internalType": "uint256", + "indexed": false } ], - "name": "ActivateRange", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "AddFarm", "inputs": [ { - "indexed": true, - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256", + "indexed": true }, { - "indexed": false, - "internalType": "address", + "type": "address", "name": "poolAddress", - "type": "address" + "internalType": "address", + "indexed": false }, { + "type": "tuple[]", + "name": "ranges", + "internalType": "struct IKSElasticLMV2.RangeInput[]", + "indexed": false, "components": [ { - "internalType": "int24", + "type": "int24", "name": "tickLower", - "type": "int24" + "internalType": "int24" }, { - "internalType": "int24", + "type": "int24", "name": "tickUpper", - "type": "int24" + "internalType": "int24" }, { - "internalType": "uint32", + "type": "uint32", "name": "weight", - "type": "uint32" + "internalType": "uint32" } - ], - "indexed": false, - "internalType": "struct IKSElasticLMV2.RangeInput[]", - "name": "ranges", - "type": "tuple[]" + ] }, { + "type": "tuple", + "name": "phase", + "internalType": "struct IKSElasticLMV2.PhaseInput", + "indexed": false, "components": [ { - "internalType": "uint32", + "type": "uint32", "name": "startTime", - "type": "uint32" + "internalType": "uint32" }, { - "internalType": "uint32", + "type": "uint32", "name": "endTime", - "type": "uint32" + "internalType": "uint32" }, { + "type": "tuple[]", + "name": "rewards", + "internalType": "struct IKSElasticLMV2.RewardInput[]", "components": [ { - "internalType": "address", + "type": "address", "name": "rewardToken", - "type": "address" + "internalType": "address" }, { - "internalType": "uint256", + "type": "uint256", "name": "rewardAmount", - "type": "uint256" + "internalType": "uint256" } - ], - "internalType": "struct IKSElasticLMV2.RewardInput[]", - "name": "rewards", - "type": "tuple[]" + ] } - ], - "indexed": false, - "internalType": "struct IKSElasticLMV2.PhaseInput", - "name": "phase", - "type": "tuple" + ] }, { - "indexed": false, - "internalType": "address", + "type": "address", "name": "farmingToken", - "type": "address" + "internalType": "address", + "indexed": false } ], - "name": "AddFarm", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "AddPhase", "inputs": [ { - "indexed": true, - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256", + "indexed": true }, { + "type": "tuple", + "name": "phase", + "internalType": "struct IKSElasticLMV2.PhaseInput", + "indexed": false, "components": [ { - "internalType": "uint32", + "type": "uint32", "name": "startTime", - "type": "uint32" + "internalType": "uint32" }, { - "internalType": "uint32", + "type": "uint32", "name": "endTime", - "type": "uint32" + "internalType": "uint32" }, { + "type": "tuple[]", + "name": "rewards", + "internalType": "struct IKSElasticLMV2.RewardInput[]", "components": [ { - "internalType": "address", + "type": "address", "name": "rewardToken", - "type": "address" + "internalType": "address" }, { - "internalType": "uint256", + "type": "uint256", "name": "rewardAmount", - "type": "uint256" + "internalType": "uint256" } - ], - "internalType": "struct IKSElasticLMV2.RewardInput[]", - "name": "rewards", - "type": "tuple[]" + ] } - ], - "indexed": false, - "internalType": "struct IKSElasticLMV2.PhaseInput", - "name": "phase", - "type": "tuple" + ] } ], - "name": "AddPhase", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "AddRange", "inputs": [ { - "indexed": true, - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256", + "indexed": true }, { + "type": "tuple", + "name": "range", + "internalType": "struct IKSElasticLMV2.RangeInput", + "indexed": false, "components": [ { - "internalType": "int24", + "type": "int24", "name": "tickLower", - "type": "int24" + "internalType": "int24" }, { - "internalType": "int24", + "type": "int24", "name": "tickUpper", - "type": "int24" + "internalType": "int24" }, { - "internalType": "uint32", + "type": "uint32", "name": "weight", - "type": "uint32" + "internalType": "uint32" } - ], - "indexed": false, - "internalType": "struct IKSElasticLMV2.RangeInput", - "name": "range", - "type": "tuple" + ] } ], - "name": "AddRange", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "ClaimReward", "inputs": [ { - "indexed": true, - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256", + "indexed": true }, { - "indexed": false, - "internalType": "uint256", + "type": "uint256", "name": "nftId", - "type": "uint256" + "internalType": "uint256", + "indexed": false }, { - "indexed": false, - "internalType": "address", + "type": "address", "name": "token", - "type": "address" + "internalType": "address", + "indexed": false }, { - "indexed": false, - "internalType": "uint256", + "type": "uint256", "name": "amount", - "type": "uint256" + "internalType": "uint256", + "indexed": false }, { - "indexed": false, - "internalType": "address", + "type": "address", "name": "receiver", - "type": "address" + "internalType": "address", + "indexed": false } ], - "name": "ClaimReward", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "ClaimReward", "inputs": [ { - "indexed": true, - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256", + "indexed": true }, { - "indexed": false, - "internalType": "uint256[]", + "type": "uint256[]", "name": "nftIds", - "type": "uint256[]" + "internalType": "uint256[]", + "indexed": false }, { - "indexed": false, - "internalType": "address", + "type": "address", "name": "token", - "type": "address" + "internalType": "address", + "indexed": false }, { - "indexed": false, - "internalType": "uint256", + "type": "uint256", "name": "amount", - "type": "uint256" + "internalType": "uint256", + "indexed": false }, { - "indexed": false, - "internalType": "address", + "type": "address", "name": "receiver", - "type": "address" + "internalType": "address", + "indexed": false } ], - "name": "ClaimReward", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "Deposit", "inputs": [ { - "indexed": true, - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256", + "indexed": true }, { - "indexed": false, - "internalType": "uint256", + "type": "uint256", "name": "rangeId", - "type": "uint256" + "internalType": "uint256", + "indexed": false }, { - "indexed": false, - "internalType": "uint256[]", + "type": "uint256[]", "name": "nftIds", - "type": "uint256[]" + "internalType": "uint256[]", + "indexed": false }, { - "indexed": true, - "internalType": "address", + "type": "address", "name": "depositer", - "type": "address" + "internalType": "address", + "indexed": true }, { - "indexed": false, - "internalType": "address", + "type": "address", "name": "receiver", - "type": "address" + "internalType": "address", + "indexed": false } ], - "name": "Deposit", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "ExpandEndTimeAndRewards", "inputs": [ { - "indexed": true, - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256", + "indexed": true }, { - "indexed": false, - "internalType": "uint256", + "type": "uint256", "name": "duration", - "type": "uint256" + "internalType": "uint256", + "indexed": false }, { - "indexed": false, - "internalType": "uint256[]", + "type": "uint256[]", "name": "rewardAmounts", - "type": "uint256[]" + "internalType": "uint256[]", + "indexed": false } ], - "name": "ExpandEndTimeAndRewards", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "ForceClosePhase", "inputs": [ { - "indexed": true, - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256", + "indexed": true } ], - "name": "ForceClosePhase", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "OwnershipTransferred", "inputs": [ { - "indexed": true, - "internalType": "address", + "type": "address", "name": "previousOwner", - "type": "address" + "internalType": "address", + "indexed": true }, { - "indexed": true, - "internalType": "address", + "type": "address", "name": "newOwner", - "type": "address" + "internalType": "address", + "indexed": true } ], - "name": "OwnershipTransferred", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "Paused", "inputs": [ { - "indexed": false, - "internalType": "address", + "type": "address", "name": "account", - "type": "address" + "internalType": "address", + "indexed": false } ], - "name": "Paused", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "RemoveRange", "inputs": [ { - "indexed": true, - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256", + "indexed": true }, { - "indexed": false, - "internalType": "uint256", + "type": "uint256", "name": "rangeId", - "type": "uint256" + "internalType": "uint256", + "indexed": false } ], - "name": "RemoveRange", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "Unpaused", "inputs": [ { - "indexed": false, - "internalType": "address", + "type": "address", "name": "account", - "type": "address" + "internalType": "address", + "indexed": false } ], - "name": "Unpaused", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "UpdateEmergency", "inputs": [ { - "indexed": false, - "internalType": "bool", + "type": "bool", "name": "enableOrDisable", - "type": "bool" + "internalType": "bool", + "indexed": false } ], - "name": "UpdateEmergency", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "UpdateGuardian", "inputs": [ { - "indexed": false, - "internalType": "address", + "type": "address", "name": "user", - "type": "address" + "internalType": "address", + "indexed": false }, { - "indexed": false, - "internalType": "bool", + "type": "bool", "name": "grantOrRevoke", - "type": "bool" + "internalType": "bool", + "indexed": false } ], - "name": "UpdateGuardian", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "UpdateHelper", "inputs": [ { - "indexed": false, - "internalType": "contract IKSElasticLMHelper", + "type": "address", "name": "helper", - "type": "address" + "internalType": "contract IKSElasticLMHelper", + "indexed": false } ], - "name": "UpdateHelper", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "UpdateLiquidity", "inputs": [ { - "indexed": true, - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256", + "indexed": true }, { - "indexed": false, - "internalType": "uint256", + "type": "uint256", "name": "nftId", - "type": "uint256" + "internalType": "uint256", + "indexed": false }, { - "indexed": false, - "internalType": "uint256", + "type": "uint256", "name": "liquidity", - "type": "uint256" + "internalType": "uint256", + "indexed": false } ], - "name": "UpdateLiquidity", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "UpdateOperator", "inputs": [ { - "indexed": false, - "internalType": "address", + "type": "address", "name": "user", - "type": "address" + "internalType": "address", + "indexed": false }, { - "indexed": false, - "internalType": "bool", + "type": "bool", "name": "grantOrRevoke", - "type": "bool" + "internalType": "bool", + "indexed": false } ], - "name": "UpdateOperator", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "UpdateTokenCode", "inputs": [ { - "indexed": false, - "internalType": "bytes", + "type": "bytes", "name": "farmingTokenCode", - "type": "bytes" + "internalType": "bytes", + "indexed": false } ], - "name": "UpdateTokenCode", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "Withdraw", "inputs": [ { - "indexed": false, - "internalType": "uint256[]", + "type": "uint256[]", "name": "nftIds", - "type": "uint256[]" + "internalType": "uint256[]", + "indexed": false }, { - "indexed": false, - "internalType": "address", + "type": "address", "name": "receiver", - "type": "address" + "internalType": "address", + "indexed": false } ], - "name": "Withdraw", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "WithdrawEmergency", "inputs": [ { - "indexed": false, - "internalType": "uint256", + "type": "uint256", "name": "nftId", - "type": "uint256" + "internalType": "uint256", + "indexed": false }, { - "indexed": false, - "internalType": "address", + "type": "address", "name": "receiver", - "type": "address" + "internalType": "address", + "indexed": false } ], - "name": "WithdrawEmergency", - "type": "event" + "anonymous": false }, { - "anonymous": false, + "type": "event", + "name": "WithdrawUnusedRewards", "inputs": [ { - "indexed": false, - "internalType": "address", + "type": "address", "name": "token", - "type": "address" + "internalType": "address", + "indexed": false }, { - "indexed": false, - "internalType": "uint256", + "type": "uint256", "name": "amount", - "type": "uint256" + "internalType": "uint256", + "indexed": false }, { - "indexed": false, - "internalType": "address", + "type": "address", "name": "receiver", - "type": "address" + "internalType": "address", + "indexed": false } ], - "name": "WithdrawUnusedRewards", - "type": "event" + "anonymous": false }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "activateRange", "inputs": [ { - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint256", + "type": "uint256", "name": "rangeId", - "type": "uint256" + "internalType": "uint256" } - ], - "name": "activateRange", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [ + { + "type": "uint256", + "name": "fId", + "internalType": "uint256" + } + ], + "name": "addFarm", "inputs": [ { - "internalType": "address", + "type": "address", "name": "poolAddress", - "type": "address" + "internalType": "address" }, { + "type": "tuple[]", + "name": "ranges", + "internalType": "struct IKSElasticLMV2.RangeInput[]", "components": [ { - "internalType": "int24", + "type": "int24", "name": "tickLower", - "type": "int24" + "internalType": "int24" }, { - "internalType": "int24", + "type": "int24", "name": "tickUpper", - "type": "int24" + "internalType": "int24" }, { - "internalType": "uint32", + "type": "uint32", "name": "weight", - "type": "uint32" + "internalType": "uint32" } - ], - "internalType": "struct IKSElasticLMV2.RangeInput[]", - "name": "ranges", - "type": "tuple[]" + ] }, { + "type": "tuple", + "name": "phase", + "internalType": "struct IKSElasticLMV2.PhaseInput", "components": [ { - "internalType": "uint32", + "type": "uint32", "name": "startTime", - "type": "uint32" + "internalType": "uint32" }, { - "internalType": "uint32", + "type": "uint32", "name": "endTime", - "type": "uint32" + "internalType": "uint32" }, { + "type": "tuple[]", + "name": "rewards", + "internalType": "struct IKSElasticLMV2.RewardInput[]", "components": [ { - "internalType": "address", + "type": "address", "name": "rewardToken", - "type": "address" + "internalType": "address" }, { - "internalType": "uint256", + "type": "uint256", "name": "rewardAmount", - "type": "uint256" + "internalType": "uint256" } - ], - "internalType": "struct IKSElasticLMV2.RewardInput[]", - "name": "rewards", - "type": "tuple[]" + ] } - ], - "internalType": "struct IKSElasticLMV2.PhaseInput", - "name": "phase", - "type": "tuple" + ] }, { - "internalType": "bool", + "type": "bool", "name": "isUsingToken", - "type": "bool" - } - ], - "name": "addFarm", - "outputs": [ - { - "internalType": "uint256", - "name": "fId", - "type": "uint256" + "internalType": "bool" } - ], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "addLiquidity", "inputs": [ { - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint256", + "type": "uint256", "name": "rangeId", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint256[]", + "type": "uint256[]", "name": "nftIds", - "type": "uint256[]" + "internalType": "uint256[]" } - ], - "name": "addLiquidity", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "addPhase", "inputs": [ { - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256" }, { + "type": "tuple", + "name": "phaseInput", + "internalType": "struct IKSElasticLMV2.PhaseInput", "components": [ { - "internalType": "uint32", + "type": "uint32", "name": "startTime", - "type": "uint32" + "internalType": "uint32" }, { - "internalType": "uint32", + "type": "uint32", "name": "endTime", - "type": "uint32" + "internalType": "uint32" }, { + "type": "tuple[]", + "name": "rewards", + "internalType": "struct IKSElasticLMV2.RewardInput[]", "components": [ { - "internalType": "address", + "type": "address", "name": "rewardToken", - "type": "address" + "internalType": "address" }, { - "internalType": "uint256", + "type": "uint256", "name": "rewardAmount", - "type": "uint256" + "internalType": "uint256" } - ], - "internalType": "struct IKSElasticLMV2.RewardInput[]", - "name": "rewards", - "type": "tuple[]" + ] } - ], - "internalType": "struct IKSElasticLMV2.PhaseInput", - "name": "phaseInput", - "type": "tuple" + ] } - ], - "name": "addPhase", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "addRange", "inputs": [ { - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256" }, { + "type": "tuple", + "name": "range", + "internalType": "struct IKSElasticLMV2.RangeInput", "components": [ { - "internalType": "int24", + "type": "int24", "name": "tickLower", - "type": "int24" + "internalType": "int24" }, { - "internalType": "int24", + "type": "int24", "name": "tickUpper", - "type": "int24" + "internalType": "int24" }, { - "internalType": "uint32", + "type": "uint32", "name": "weight", - "type": "uint32" + "internalType": "uint32" } - ], - "internalType": "struct IKSElasticLMV2.RangeInput", - "name": "range", - "type": "tuple" + ] } - ], - "name": "addRange", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "claimFee", "inputs": [ { - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint256[]", + "type": "uint256[]", "name": "nftIds", - "type": "uint256[]" + "internalType": "uint256[]" }, { - "internalType": "uint256", + "type": "uint256", "name": "amount0Min", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint256", + "type": "uint256", "name": "amount1Min", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint256", + "type": "uint256", "name": "deadline", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint8", + "type": "uint8", "name": "flags", - "type": "uint8" + "internalType": "uint8" } - ], - "name": "claimFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "claimReward", "inputs": [ { - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint256[]", + "type": "uint256[]", "name": "nftIds", - "type": "uint256[]" + "internalType": "uint256[]" } - ], - "name": "claimReward", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "deposit", "inputs": [ { - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint256", + "type": "uint256", "name": "rangeId", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint256[]", + "type": "uint256[]", "name": "nftIds", - "type": "uint256[]" + "internalType": "uint256[]" }, { - "internalType": "address", + "type": "address", "name": "receiver", - "type": "address" + "internalType": "address" } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { - "inputs": [], - "name": "disableLogic", - "outputs": [], + "type": "function", "stateMutability": "nonpayable", - "type": "function" + "outputs": [], + "name": "disableLogic", + "inputs": [] }, { - "inputs": [], - "name": "emergencyEnabled", + "type": "function", + "stateMutability": "view", "outputs": [ { - "internalType": "bool", + "type": "bool", "name": "", - "type": "bool" + "internalType": "bool" } ], - "stateMutability": "view", - "type": "function" + "name": "emergencyEnabled", + "inputs": [] }, { - "inputs": [], - "name": "enableLogic", - "outputs": [], + "type": "function", "stateMutability": "nonpayable", - "type": "function" + "outputs": [], + "name": "enableLogic", + "inputs": [] }, { - "inputs": [], - "name": "farmCount", + "type": "function", + "stateMutability": "view", "outputs": [ { - "internalType": "uint256", + "type": "uint256", "name": "", - "type": "uint256" + "internalType": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "farmCount", + "inputs": [] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "forceClosePhase", "inputs": [ { - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256" } - ], - "name": "forceClosePhase", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "getDepositedNFTs", + "type": "function", + "stateMutability": "view", "outputs": [ { - "internalType": "uint256[]", + "type": "uint256[]", "name": "listNFTs", - "type": "uint256[]" + "internalType": "uint256[]" } ], - "stateMutability": "view", - "type": "function" - }, - { + "name": "getDepositedNFTs", "inputs": [ { - "internalType": "uint256", - "name": "fId", - "type": "uint256" + "type": "address", + "name": "user", + "internalType": "address" } - ], - "name": "getFarm", + ] + }, + { + "type": "function", + "stateMutability": "view", "outputs": [ { - "internalType": "address", + "type": "address", "name": "poolAddress", - "type": "address" + "internalType": "address" }, { + "type": "tuple[]", + "name": "ranges", + "internalType": "struct IKSElasticLMV2.RangeInfo[]", "components": [ { - "internalType": "int24", + "type": "int24", "name": "tickLower", - "type": "int24" + "internalType": "int24" }, { - "internalType": "int24", + "type": "int24", "name": "tickUpper", - "type": "int24" + "internalType": "int24" }, { - "internalType": "uint32", + "type": "uint32", "name": "weight", - "type": "uint32" + "internalType": "uint32" }, { - "internalType": "bool", + "type": "bool", "name": "isRemoved", - "type": "bool" + "internalType": "bool" } - ], - "internalType": "struct IKSElasticLMV2.RangeInfo[]", - "name": "ranges", - "type": "tuple[]" + ] }, { + "type": "tuple", + "name": "phase", + "internalType": "struct IKSElasticLMV2.PhaseInfo", "components": [ { - "internalType": "uint32", + "type": "uint32", "name": "startTime", - "type": "uint32" + "internalType": "uint32" }, { - "internalType": "uint32", + "type": "uint32", "name": "endTime", - "type": "uint32" + "internalType": "uint32" }, { - "internalType": "bool", + "type": "bool", "name": "isSettled", - "type": "bool" + "internalType": "bool" }, { + "type": "tuple[]", + "name": "rewards", + "internalType": "struct IKSElasticLMV2.RewardInput[]", "components": [ { - "internalType": "address", + "type": "address", "name": "rewardToken", - "type": "address" + "internalType": "address" }, { - "internalType": "uint256", + "type": "uint256", "name": "rewardAmount", - "type": "uint256" + "internalType": "uint256" } - ], - "internalType": "struct IKSElasticLMV2.RewardInput[]", - "name": "rewards", - "type": "tuple[]" + ] } - ], - "internalType": "struct IKSElasticLMV2.PhaseInfo", - "name": "phase", - "type": "tuple" + ] }, { - "internalType": "uint256", + "type": "uint256", "name": "liquidity", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "address", + "type": "address", "name": "farmingToken", - "type": "address" + "internalType": "address" }, { - "internalType": "uint256[]", + "type": "uint256[]", "name": "sumRewardPerLiquidity", - "type": "uint256[]" + "internalType": "uint256[]" }, { - "internalType": "uint32", + "type": "uint32", "name": "lastTouchedTime", - "type": "uint32" + "internalType": "uint32" } ], - "stateMutability": "view", - "type": "function" + "name": "getFarm", + "inputs": [ + { + "type": "uint256", + "name": "fId", + "internalType": "uint256" + } + ] }, { - "inputs": [], - "name": "getNft", + "type": "function", + "stateMutability": "view", "outputs": [ { - "internalType": "contract IERC721", + "type": "address", "name": "", - "type": "address" + "internalType": "contract IERC721" } ], - "stateMutability": "view", - "type": "function" + "name": "getNft", + "inputs": [] }, { - "inputs": [ - { - "internalType": "uint256", - "name": "nftId", - "type": "uint256" - } - ], - "name": "getStake", + "type": "function", + "stateMutability": "view", "outputs": [ { - "internalType": "address", + "type": "address", "name": "owner", - "type": "address" + "internalType": "address" }, { - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint256", + "type": "uint256", "name": "rangeId", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint256", + "type": "uint256", "name": "liquidity", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint256[]", + "type": "uint256[]", "name": "lastSumRewardPerLiquidity", - "type": "uint256[]" + "internalType": "uint256[]" }, { - "internalType": "uint256[]", + "type": "uint256[]", "name": "rewardUnclaimed", - "type": "uint256[]" + "internalType": "uint256[]" } ], - "stateMutability": "view", - "type": "function" + "name": "getStake", + "inputs": [ + { + "type": "uint256", + "name": "nftId", + "internalType": "uint256" + } + ] }, { - "inputs": [ + "type": "function", + "stateMutability": "view", + "outputs": [ { - "internalType": "address", + "type": "bool", "name": "", - "type": "address" + "internalType": "bool" } ], "name": "guardians", - "outputs": [ + "inputs": [ { - "internalType": "bool", + "type": "address", "name": "", - "type": "bool" + "internalType": "address" } - ], - "stateMutability": "view", - "type": "function" + ] }, { - "inputs": [ + "type": "function", + "stateMutability": "view", + "outputs": [ { - "internalType": "address", + "type": "bool", "name": "", - "type": "address" + "internalType": "bool" } ], "name": "operators", - "outputs": [ + "inputs": [ { - "internalType": "bool", + "type": "address", "name": "", - "type": "bool" + "internalType": "address" } - ], - "stateMutability": "view", - "type": "function" + ] }, { - "inputs": [], - "name": "owner", + "type": "function", + "stateMutability": "view", "outputs": [ { - "internalType": "address", + "type": "address", "name": "", - "type": "address" + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "owner", + "inputs": [] }, { - "inputs": [], - "name": "paused", + "type": "function", + "stateMutability": "view", "outputs": [ { - "internalType": "bool", + "type": "bool", "name": "", - "type": "bool" + "internalType": "bool" } ], - "stateMutability": "view", - "type": "function" + "name": "paused", + "inputs": [] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "removeLiquidity", "inputs": [ { - "internalType": "uint256", + "type": "uint256", "name": "nftId", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint128", + "type": "uint128", "name": "liquidity", - "type": "uint128" + "internalType": "uint128" }, { - "internalType": "uint256", + "type": "uint256", "name": "amount0Min", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint256", + "type": "uint256", "name": "amount1Min", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint256", + "type": "uint256", "name": "deadline", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint8", + "type": "uint8", "name": "flags", - "type": "uint8" + "internalType": "uint8" } - ], - "name": "removeLiquidity", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "removeRange", "inputs": [ { - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint256", + "type": "uint256", "name": "rangeId", - "type": "uint256" + "internalType": "uint256" } - ], - "name": "removeRange", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], + "type": "function", "stateMutability": "nonpayable", - "type": "function" + "outputs": [], + "name": "renounceOwnership", + "inputs": [] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "transferOwnership", "inputs": [ { - "internalType": "address", + "type": "address", "name": "newOwner", - "type": "address" + "internalType": "address" } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "updateEmergency", "inputs": [ { - "internalType": "bool", + "type": "bool", "name": "enableOrDisable", - "type": "bool" + "internalType": "bool" } - ], - "name": "updateEmergency", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "updateGuardian", "inputs": [ { - "internalType": "address", + "type": "address", "name": "user", - "type": "address" + "internalType": "address" }, { - "internalType": "bool", + "type": "bool", "name": "grantOrRevoke", - "type": "bool" + "internalType": "bool" } - ], - "name": "updateGuardian", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "updateHelper", "inputs": [ { - "internalType": "contract IKSElasticLMHelper", + "type": "address", "name": "_helper", - "type": "address" + "internalType": "contract IKSElasticLMHelper" } - ], - "name": "updateHelper", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "updateOperator", "inputs": [ { - "internalType": "address", + "type": "address", "name": "user", - "type": "address" + "internalType": "address" }, { - "internalType": "bool", + "type": "bool", "name": "grantOrRevoke", - "type": "bool" + "internalType": "bool" } - ], - "name": "updateOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "updateTokenCode", "inputs": [ { - "internalType": "bytes", + "type": "bytes", "name": "_farmingTokenCreationCode", - "type": "bytes" + "internalType": "bytes" } - ], - "name": "updateTokenCode", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { - "inputs": [], - "name": "weth", + "type": "function", + "stateMutability": "view", "outputs": [ { - "internalType": "address", + "type": "address", "name": "", - "type": "address" + "internalType": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "weth", + "inputs": [] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "withdraw", "inputs": [ { - "internalType": "uint256", + "type": "uint256", "name": "fId", - "type": "uint256" + "internalType": "uint256" }, { - "internalType": "uint256[]", + "type": "uint256[]", "name": "nftIds", - "type": "uint256[]" + "internalType": "uint256[]" } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "withdrawEmergency", "inputs": [ { - "internalType": "uint256[]", + "type": "uint256[]", "name": "nftIds", - "type": "uint256[]" + "internalType": "uint256[]" } - ], - "name": "withdrawEmergency", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "withdrawUnusedRewards", "inputs": [ { - "internalType": "address[]", + "type": "address[]", "name": "tokens", - "type": "address[]" + "internalType": "address[]" }, { - "internalType": "uint256[]", + "type": "uint256[]", "name": "amounts", - "type": "uint256[]" + "internalType": "uint256[]" } - ], - "name": "withdrawUnusedRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + ] }, { - "stateMutability": "payable", - "type": "receive" + "type": "receive", + "stateMutability": "payable" } ] diff --git a/src/constants/networks/matic.ts b/src/constants/networks/matic.ts index 5f4b1f0298..04d1a80533 100644 --- a/src/constants/networks/matic.ts +++ b/src/constants/networks/matic.ts @@ -64,12 +64,12 @@ const maticInfo: EVMNetworkInfo = { routers: '0xF9c2b5746c946EF883ab2660BbbB1f10A5bdeAb4', farms: ['0x7D5ba536ab244aAA1EA42aB88428847F25E3E676'], farmv2Quoter: '0x6AFeb9EDd6Cf44fA8E89b1eee28284e6dD7705C8', - farmV2S: [], - 'farmV2.1S': [ + farmV2S: [ '0xA70a1Ad0F91c52c79e177c5A18a7C9E1C4360e0e', '0x3D6AfE2fB73fFEd2E3dD00c501A174554e147a43', '0xf2BcDf38baA52F6b0C1Db5B025DfFf01Ae1d6dBd', ], + 'farmV2.1S': [], }, limitOrder: '*', averageBlockTimeInSeconds: 2.6, diff --git a/src/constants/networks/scroll.ts b/src/constants/networks/scroll.ts index e29f99ffcb..2f7d181fb2 100644 --- a/src/constants/networks/scroll.ts +++ b/src/constants/networks/scroll.ts @@ -56,7 +56,8 @@ const scroll: EVMNetworkInfo = { routers: '0xF9c2b5746c946EF883ab2660BbbB1f10A5bdeAb4', farms: ['0x7D5ba536ab244aAA1EA42aB88428847F25E3E676'], farmv2Quoter: '0x6AFeb9EDd6Cf44fA8E89b1eee28284e6dD7705C8', - farmV2S: [ + farmV2S: [], + 'farmV2.1S': [ '0x3D6AfE2fB73fFEd2E3dD00c501A174554e147a43', '0xf2BcDf38baA52F6b0C1Db5B025DfFf01Ae1d6dBd', '0x67BC5156227C8372b2561b5058A7F628846019B9', From 3bf5d6e244fc970eace91c37936e26cc89b3d704 Mon Sep 17 00:00:00 2001 From: viet-nv Date: Wed, 18 Oct 2023 11:45:40 +0700 Subject: [PATCH 7/7] remove staging farm --- src/constants/networks/scroll.ts | 6 +----- src/pages/Farm/ElasticFarmv2/components/ListView.tsx | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/constants/networks/scroll.ts b/src/constants/networks/scroll.ts index 2f7d181fb2..97b19d22bb 100644 --- a/src/constants/networks/scroll.ts +++ b/src/constants/networks/scroll.ts @@ -57,11 +57,7 @@ const scroll: EVMNetworkInfo = { farms: ['0x7D5ba536ab244aAA1EA42aB88428847F25E3E676'], farmv2Quoter: '0x6AFeb9EDd6Cf44fA8E89b1eee28284e6dD7705C8', farmV2S: [], - 'farmV2.1S': [ - '0x3D6AfE2fB73fFEd2E3dD00c501A174554e147a43', - '0xf2BcDf38baA52F6b0C1Db5B025DfFf01Ae1d6dBd', - '0x67BC5156227C8372b2561b5058A7F628846019B9', - ], + 'farmV2.1S': ['0x3D6AfE2fB73fFEd2E3dD00c501A174554e147a43', '0xf2BcDf38baA52F6b0C1Db5B025DfFf01Ae1d6dBd'], }, limitOrder: NOT_SUPPORT, averageBlockTimeInSeconds: 8.4, // dont use for base diff --git a/src/pages/Farm/ElasticFarmv2/components/ListView.tsx b/src/pages/Farm/ElasticFarmv2/components/ListView.tsx index 8335109fdb..49153571e9 100644 --- a/src/pages/Farm/ElasticFarmv2/components/ListView.tsx +++ b/src/pages/Farm/ElasticFarmv2/components/ListView.tsx @@ -271,7 +271,7 @@ export const ListView = ({ -
+