diff --git a/package.json b/package.json index 9b8a30854..285182360 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@paraswap/dex-lib", - "version": "3.9.7-fluid-dex.3", + "version": "3.10.0", "main": "build/index.js", "types": "build/index.d.ts", "repository": "https://github.com/paraswap/paraswap-dex-lib", diff --git a/src/config.ts b/src/config.ts index 9d9c170fc..80106a65b 100644 --- a/src/config.ts +++ b/src/config.ts @@ -375,7 +375,6 @@ const baseConfigs: { [network: number]: BaseConfig } = { PolygonZkEvmAdapter01: '0xd63B7691dD98fa89A2ea5e1604700489c585aa7B', PolygonZkEvmBuyAdapter: '0xe2137168CdA486a2555E16c597905854C84F9127', }, - rpcPollingMaxAllowedStateDelayInBlocks: 0, rpcPollingBlocksBackToTriggerUpdate: 0, hashFlowAuthToken: process.env.API_KEY_HASHFLOW_AUTH_TOKEN || '', @@ -387,6 +386,35 @@ const baseConfigs: { [network: number]: BaseConfig } = { // FIXME: Not set properly uniswapV2ExchangeRouterAddress: '', }, + [Network.GNOSIS]: { + network: Network.GNOSIS, + networkName: 'Gnosis', + isTestnet: false, + nativeTokenName: 'xDAI', + nativeTokenSymbol: 'XDAI', + wrappedNativeTokenAddress: '0xe91d153e0b41518a2ce8dd3d7944fa863463a97d', + hasEIP1559: false, + augustusAddress: '0x0000000000000000000000000000000000000000', + tokenTransferProxyAddress: '0x0000000000000000000000000000000000000000', + multicallV2Address: '0xca11bde05977b3631167028862be2a173976ca11', + privateHttpProvider: process.env.HTTP_PROVIDER_100, + adapterAddresses: {}, + augustusRFQAddress: '0x92EaD5bACf6F0E995FA46Ad8215A9b11f67ca241', + augustusV6Address: '0x6a000f20005980200259b80c5102003040001068', + executorsAddresses: { + Executor01: '0x000010036c0190e009a000d0fc3541100a07380a', + Executor02: '0x00c600b30fb0400701010f4b080409018b9006e0', + Executor03: '0xe009f00e200a090090fc70e02d70b232000c0802', + }, + rpcPollingMaxAllowedStateDelayInBlocks: 0, + rpcPollingBlocksBackToTriggerUpdate: 0, + hashFlowDisabledMMs: [], + uniswapV3EventLoggingSampleRate: 0, + rfqConfigs: {}, + forceRpcFallbackDexs: [], + uniswapV2ExchangeRouterAddress: + '0xfa39c1c670b48956eeF9fd0BbD0E81A290326330', + }, [Network.BASE]: { network: Network.BASE, networkName: 'Base', diff --git a/src/constants.ts b/src/constants.ts index 68d570746..4bdfb1679 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -41,6 +41,7 @@ export enum Network { ARBITRUM = 42161, OPTIMISM = 10, BASE = 8453, + GNOSIS = 100, } export const SUBGRAPH_TIMEOUT = 20 * 1000; diff --git a/src/dex/aave-v3-stata/config.ts b/src/dex/aave-v3-stata/config.ts index a24cf6825..0ab9c22a2 100644 --- a/src/dex/aave-v3-stata/config.ts +++ b/src/dex/aave-v3-stata/config.ts @@ -7,7 +7,7 @@ import { AaveV3BNB, AaveV3Base, AaveV3Ethereum, - // AaveV3Gnosis, + AaveV3Gnosis, // AaveV3Metis, AaveV3Optimism, AaveV3Polygon, @@ -37,9 +37,9 @@ export const AaveV3StataConfig: DexConfigMap = { [Network.BSC]: { factoryAddress: AaveV3BNB.STATIC_A_TOKEN_FACTORY, }, - // [Network.Gnosis]: { - // factoryAddress: AaveV3Gnosis.STATIC_A_TOKEN_FACTORY, - // }, + [Network.GNOSIS]: { + factoryAddress: AaveV3Gnosis.STATIC_A_TOKEN_FACTORY, + }, // [Network.Scroll]: { // factoryAddress: AaveV3Scroll.STATIC_A_TOKEN_FACTORY, // }, diff --git a/src/dex/aave-v3/aave-v3-e2e.test.ts b/src/dex/aave-v3/aave-v3-e2e.test.ts index be24e0763..75487d09b 100644 --- a/src/dex/aave-v3/aave-v3-e2e.test.ts +++ b/src/dex/aave-v3/aave-v3-e2e.test.ts @@ -506,4 +506,73 @@ describe('AaveV3 E2E', () => { ); }); }); + + describe('AaveV3 GNOSIS', () => { + const network = Network.GNOSIS; + const tokens = Tokens[network]; + const holders = Holders[network]; + const provider = new StaticJsonRpcProvider( + generateConfig(network).privateHttpProvider, + network, + ); + + const pairs = [ + { + tokenSymbol: 'XDAI', + aTokenSymbol: 'aGnoWXDAI', + amount: '1000000000000000000', + }, + { + tokenSymbol: 'USDC', + aTokenSymbol: 'aGnoUSDC', + amount: '10000000', + }, + { + tokenSymbol: 'wstETH', + aTokenSymbol: 'aGnowstETH', + amount: '1000000000000000000', + }, + ]; + + const sideToContractMethods = new Map([ + [SwapSide.SELL, [ContractMethod.swapExactAmountIn]], + [SwapSide.BUY, [ContractMethod.swapExactAmountOut]], + ]); + + pairs.forEach(pair => { + sideToContractMethods.forEach((contractMethods, side) => + contractMethods.forEach((contractMethod: ContractMethod) => { + describe(`${contractMethod}`, () => { + it(pair.aTokenSymbol + ' -> ' + pair.tokenSymbol, async () => { + await testE2E( + tokens[pair.aTokenSymbol], + tokens[pair.tokenSymbol], + holders[pair.aTokenSymbol], + pair.amount, + side, + dexKey, + contractMethod, + network, + provider, + ); + }); + + it(pair.tokenSymbol + ' -> ' + pair.aTokenSymbol, async () => { + await testE2E( + tokens[pair.tokenSymbol], + tokens[pair.aTokenSymbol], + holders[pair.tokenSymbol], + pair.amount, + side, + dexKey, + contractMethod, + network, + provider, + ); + }); + }); + }), + ); + }); + }); }); diff --git a/src/dex/aave-v3/aave-v3.ts b/src/dex/aave-v3/aave-v3.ts index aef5a7479..80c941ddc 100644 --- a/src/dex/aave-v3/aave-v3.ts +++ b/src/dex/aave-v3/aave-v3.ts @@ -60,7 +60,7 @@ export class AaveV3 extends SimpleExchange implements IDex { } getAdapters(side: SwapSide): { name: string; index: number }[] | null { - return this.adapters[side]; + return this.adapters?.[side] ?? null; } async initializePricing(blockNumber: number): Promise { diff --git a/src/dex/aave-v3/config.ts b/src/dex/aave-v3/config.ts index c0d058bff..046c8d7ed 100644 --- a/src/dex/aave-v3/config.ts +++ b/src/dex/aave-v3/config.ts @@ -11,6 +11,7 @@ import { AaveV3Optimism, AaveV3Polygon, AaveV3PolygonZkEvm, + AaveV3Gnosis, } from '@bgd-labs/aave-address-book'; // TODO: find vals for V3 @@ -70,6 +71,12 @@ export const Config: DexConfigMap = { poolAddress: AaveV3PolygonZkEvm.POOL, wethGatewayAddress: AaveV3PolygonZkEvm.WETH_GATEWAY, }, + [Network.GNOSIS]: { + ethGasCost: 246 * 100, + lendingGasCost: 328 * 1000, + poolAddress: AaveV3Gnosis.POOL, + wethGatewayAddress: AaveV3Gnosis.WETH_GATEWAY, + }, }, }; diff --git a/src/dex/algebra/algebra-e2e.test.ts b/src/dex/algebra/algebra-e2e.test.ts index 0482c0899..f07da8330 100644 --- a/src/dex/algebra/algebra-e2e.test.ts +++ b/src/dex/algebra/algebra-e2e.test.ts @@ -288,4 +288,26 @@ describe('Algebra', () => { nativeTokenAmount, ); }); + + describe('SwaprV3', () => { + const dexKey = 'SwaprV3'; + const network = Network.GNOSIS; + + const tokenASymbol: string = 'WXDAI'; + const tokenBSymbol: string = 'USDC'; + + const tokenAAmount: string = '1000000000000000000'; + const tokenBAmount: string = '100000000'; + const nativeTokenAmount = '1000000000000000000'; + + testForNetwork( + network, + dexKey, + tokenASymbol, + tokenBSymbol, + tokenAAmount, + tokenBAmount, + nativeTokenAmount, + ); + }); }); diff --git a/src/dex/algebra/algebra-pool-v1_9_bidirectional_fee.ts b/src/dex/algebra/algebra-pool-v1_9_bidirectional_fee.ts index 5e83e5a81..81be0ba20 100644 --- a/src/dex/algebra/algebra-pool-v1_9_bidirectional_fee.ts +++ b/src/dex/algebra/algebra-pool-v1_9_bidirectional_fee.ts @@ -32,7 +32,7 @@ export class AlgebraEventPoolV1_9_bidirectional_fee extends AlgebraEventPoolV1_1 mapKey, poolInitCodeHash, poolDeployer, - false, // forceManualStateGeneration; mainly for zkEVM + true, // forceManualStateGeneration; mainly used for xLayer false, // areTicksCompressed ); diff --git a/src/dex/algebra/config.ts b/src/dex/algebra/config.ts index e3d726231..ae374b7d1 100644 --- a/src/dex/algebra/config.ts +++ b/src/dex/algebra/config.ts @@ -62,6 +62,8 @@ export const AlgebraConfig: DexConfigMap = { subgraphURL: '3CA9ffebLkS3N2otXaSj8XaDDdspty75upBjKTUS79qY', uniswapMulticall: '0x1F98415757620B543A52E61c46B32eB19261F984', deployer: '0xc0d4323426c709e8d04b5b130e7f059523464a91', + // optimism fork uses v1.9-bidirectional-fee (with TickSpacing event and simple `fee` in globalState), + // not sure why v1.1 is used here version: 'v1.1', }, }, @@ -79,6 +81,25 @@ export const AlgebraConfig: DexConfigMap = { uniswapMulticall: '0x1F98415757620B543A52E61c46B32eB19261F984', deployer: '0x6dd3fb9653b10e806650f107c3b5a0a6ff974f65', version: 'v1.9', + // looks like it isn't used as we override it with dexHelper.config.data.forceRpcFallbackDexs in constructor + forceRPC: true, + }, + }, + SwaprV3: { + [Network.GNOSIS]: { + factory: '0xA0864cCA6E114013AB0e27cbd5B6f4c8947da766', + router: '0xfFB643E73f280B97809A8b41f7232AB401a04ee1', + quoter: '0xcBaD9FDf0D2814659Eb26f600EFDeAF005Eda0F7', + initHash: + '0xbce37a54eab2fcd71913a0d40723e04238970e7fc1159bfd58ad5b79531697e7', + chunksCount: 10, + initRetryFrequency: 10, + // AlgebraStateMulticall + algebraStateMulticall: '0x49C46f7f88110ccA234ef27Cd664510f7bbF5998', + subgraphURL: 'AAA1vYjxwFHzbt6qKwLHNcDSASyr1J1xVViDH8gTMFMR', + uniswapMulticall: '0x4dfa9a980efE4802E969AC33968E3d6E59B8a19e', + deployer: '0xC1b576AC6Ec749d5Ace1787bF9Ec6340908ddB47', + version: 'v1.9-bidirectional-fee', forceRPC: true, }, }, diff --git a/src/dex/balancer-v2/balancer-v2-e2e.test.ts b/src/dex/balancer-v2/balancer-v2-e2e.test.ts index 43f0062cd..c8f1ff3c0 100644 --- a/src/dex/balancer-v2/balancer-v2-e2e.test.ts +++ b/src/dex/balancer-v2/balancer-v2-e2e.test.ts @@ -1444,256 +1444,28 @@ describe('BalancerV2 E2E', () => { ); }); - // describe('BeetsFi OPTIMISM', () => { - // const dexKey = 'BeetsFi'; - // const network = Network.OPTIMISM; - // const tokens = Tokens[network]; - // const holders = Holders[network]; - // const provider = new StaticJsonRpcProvider( - // generateConfig(network).privateHttpProvider, - // network, - // ); - // const BBAUSD_OP = '0x6222ae1d2a9f6894da50aa25cb7b303497f9bebd'; - // const BBAUSDMAI_OP = '0x1f131ec1175f023ee1534b16fa8ab237c00e2381'; - // const LIDO_SHUFFLE = '0xde45f101250f2ca1c0f8adfc172576d10c12072d'; - // const YELLOW_SUBMARINE = '0x981fb05b738e981ac532a99e77170ecb4bc27aef'; + describe('BalancerV2_GNOSIS', () => { + const dexKey = 'BalancerV2'; + const network = Network.GNOSIS; - // describe('Simpleswap', () => { - // it('ETH -> TOKEN', async () => { - // await testE2E( - // tokens['ETH'], - // tokens['USDC'], - // holders['ETH'], - // '7000000000000000000', - // SwapSide.SELL, - // dexKey, - // ContractMethod.simpleSwap, - // network, - // provider, - // ); - // }); - // it('TOKEN -> ETH', async () => { - // await testE2E( - // tokens['USDC'], - // tokens['ETH'], - // holders['USDC'], - // '2000000000', - // SwapSide.SELL, - // dexKey, - // ContractMethod.simpleSwap, - // network, - // provider, - // ); - // }); - // it('TOKEN -> TOKEN', async () => { - // await testE2E( - // tokens['USDC'], - // tokens['WETH'], - // holders['USDC'], - // '20000000', - // SwapSide.SELL, - // dexKey, - // ContractMethod.simpleSwap, - // network, - // provider, - // ); - // }); - // it('USDC -> DAI using bbaUSD', async () => { - // await testE2E( - // tokens['USDC'], - // tokens['DAI'], - // holders['USDC'], - // '20000000', - // SwapSide.SELL, - // dexKey, - // ContractMethod.simpleSwap, - // network, - // provider, - // [`${dexKey}_${BBAUSD_OP}`], - // ); - // }); - // it('DAI -> USDT using bbaUSD', async () => { - // await testE2E( - // tokens['DAI'], - // tokens['USDT'], - // holders['DAI'], - // '1000000000000000000', - // SwapSide.SELL, - // dexKey, - // ContractMethod.simpleSwap, - // network, - // provider, - // [`${dexKey}_${BBAUSD_OP}`], - // ); - // }); - // it('USDC -> MAI through bbaUSD-MAI', async () => { - // await testE2E( - // tokens['USDC'], - // tokens['MAI'], - // holders['USDC'], - // '20000000', - // SwapSide.SELL, - // dexKey, - // ContractMethod.simpleSwap, - // network, - // provider, - // [`${dexKey}_${BBAUSDMAI_OP}`], - // ); - // }); - // it('wstETH -> WETH through composable stable', async () => { - // await testE2E( - // tokens['wstETH'], - // tokens['WETH'], - // holders['wstETH'], - // '10000000000000000', - // SwapSide.SELL, - // dexKey, - // ContractMethod.simpleSwap, - // network, - // provider, - // [`${dexKey}_${LIDO_SHUFFLE}`], - // ); - // }); - // it('wstETH -> ETH through composable stable', async () => { - // await testE2E( - // tokens['wstETH'], - // tokens['ETH'], - // holders['wstETH'], - // '10000000000000000', - // SwapSide.SELL, - // dexKey, - // ContractMethod.simpleSwap, - // network, - // provider, - // [`${dexKey}_${LIDO_SHUFFLE}`], - // ); - // }); - // it('ETH -> wstETH through composable stable', async () => { - // await testE2E( - // tokens['ETH'], - // tokens['wstETH'], - // holders['ETH'], - // '10000000000000000', - // SwapSide.SELL, - // dexKey, - // ContractMethod.simpleSwap, - // network, - // provider, - // [`${dexKey}_${LIDO_SHUFFLE}`], - // ); - // }); - // it('wstETH -> WBTC through boosted weighted', async () => { - // await testE2E( - // tokens['wstETH'], - // tokens['WBTC'], - // holders['wstETH'], - // '25000000000000000', //1e18 - // SwapSide.SELL, - // dexKey, - // ContractMethod.simpleSwap, - // network, - // provider, - // [`${dexKey}_${YELLOW_SUBMARINE}`], - // ); - // }); - // it('USDC -> WBTC through boosted weighted', async () => { - // await testE2E( - // tokens['USDC'], - // tokens['WBTC'], - // holders['USDC'], - // '1000000', //1e6 - // SwapSide.SELL, - // dexKey, - // ContractMethod.simpleSwap, - // network, - // provider, - // [`${dexKey}_${YELLOW_SUBMARINE}`], - // ); - // }); - // it('wstETH -> USDC through boosted weighted', async () => { - // await testE2E( - // tokens['wstETH'], - // tokens['USDC'], - // holders['wstETH'], - // '1000000000000000000', //1e18 - // SwapSide.SELL, - // dexKey, - // ContractMethod.simpleSwap, - // network, - // provider, - // [`${dexKey}_${YELLOW_SUBMARINE}`], - // ); - // }); - // }); + testForNetwork( + network, + dexKey, + 'USDC', + 'USDT', + '11110010', + '21000000', + '100000000000000000', + ); - // describe('Multiswap', () => { - // it('ETH -> TOKEN', async () => { - // await testE2E( - // tokens['ETH'], - // tokens['USDC'], - // holders['ETH'], - // '7000000000000000000', - // SwapSide.SELL, - // dexKey, - // ContractMethod.multiSwap, - // network, - // provider, - // ); - // }); - // it('TOKEN -> ETH', async () => { - // await testE2E( - // tokens['USDC'], - // tokens['ETH'], - // holders['USDC'], - // '2000000000', - // SwapSide.SELL, - // dexKey, - // ContractMethod.multiSwap, - // network, - // provider, - // ); - // }); - // it('TOKEN -> TOKEN', async () => { - // await testE2E( - // tokens['USDC'], - // tokens['WETH'], - // holders['USDC'], - // '20000000', - // SwapSide.SELL, - // dexKey, - // ContractMethod.multiSwap, - // network, - // provider, - // ); - // }); - // it('USDC -> DAI using bbaUSD', async () => { - // await testE2E( - // tokens['USDC'], - // tokens['DAI'], - // holders['USDC'], - // '20000000', - // SwapSide.SELL, - // dexKey, - // ContractMethod.multiSwap, - // network, - // provider, - // [`${dexKey}_${BBAUSD_OP}`], - // ); - // }); - // it('wstETH -> USDC through boosted weighted', async () => { - // await testE2E( - // tokens['wstETH'], - // tokens['USDC'], - // holders['wstETH'], - // '1000000000000000000', //1e18 - // SwapSide.SELL, - // dexKey, - // ContractMethod.multiSwap, - // network, - // provider, - // [`${dexKey}_${YELLOW_SUBMARINE}`], - // ); - // }); - // }); - // }); + testForNetwork( + network, + dexKey, + 'WETH', + 'WXDAI', + '1000000000000000000', + '1000000000000000000', + '1000000000000000000', + ); + }); }); diff --git a/src/dex/balancer-v2/balancer-v2.ts b/src/dex/balancer-v2/balancer-v2.ts index aadafdb19..97f60f1aa 100644 --- a/src/dex/balancer-v2/balancer-v2.ts +++ b/src/dex/balancer-v2/balancer-v2.ts @@ -789,7 +789,7 @@ export class BalancerV2 } getAdapters(side: SwapSide): { name: string; index: number }[] | null { - return this.adapters[side] ? this.adapters[side] : null; + return this.adapters?.[side] ? this.adapters[side] : null; } async getPoolIdentifiers( diff --git a/src/dex/balancer-v2/config.ts b/src/dex/balancer-v2/config.ts index ea36a9647..f28a3fc86 100644 --- a/src/dex/balancer-v2/config.ts +++ b/src/dex/balancer-v2/config.ts @@ -25,6 +25,10 @@ export const BalancerConfig: DexConfigMap = { 'https://api.studio.thegraph.com/query/24660/balancer-base-v2/version/latest', vaultAddress: '0xBA12222222228d8Ba445958a75a0704d566BF2C8', }, + [Network.GNOSIS]: { + subgraphURL: 'EJezH1Cp31QkKPaBDerhVPRWsKVZLrDfzjrLqpmv6cGg', + vaultAddress: '0xBA12222222228d8Ba445958a75a0704d566BF2C8', + }, }, BeetsFi: { [Network.FANTOM]: { diff --git a/src/dex/curve-v1-factory/constants.ts b/src/dex/curve-v1-factory/constants.ts index ccedadfba..bc7db3de4 100644 --- a/src/dex/curve-v1-factory/constants.ts +++ b/src/dex/curve-v1-factory/constants.ts @@ -29,6 +29,7 @@ export const NETWORK_ID_TO_NAME: Record = { [Network.ARBITRUM]: 'arbitrum', [Network.OPTIMISM]: 'optimism', [Network.BASE]: 'base', + [Network.GNOSIS]: 'xdai', }; // They are hardcoded in factory contract. If factory is changing, must be diff --git a/src/dex/curve-v1-factory/curve-v1-factory.ts b/src/dex/curve-v1-factory/curve-v1-factory.ts index 8082c8b46..1e1fad10b 100644 --- a/src/dex/curve-v1-factory/curve-v1-factory.ts +++ b/src/dex/curve-v1-factory/curve-v1-factory.ts @@ -605,7 +605,8 @@ export class CurveV1Factory const allResultsFromFactory = ( await this.dexHelper.multiWrapper.tryAggregate< string[] | number[] | string - >(true, callDataFromFactoryPools) + // decrease batch size to 450 to avoid 'out-of-limit' error on gnosis + >(true, callDataFromFactoryPools, undefined, 450) ).map(r => r.returnData); const resultsFromFactory = allResultsFromFactory.slice( diff --git a/src/dex/curve-v1-stable-ng/config.ts b/src/dex/curve-v1-stable-ng/config.ts index 76334d128..5a517d17e 100644 --- a/src/dex/curve-v1-stable-ng/config.ts +++ b/src/dex/curve-v1-stable-ng/config.ts @@ -192,6 +192,34 @@ const CurveV1StableNgConfig: DexConfigMap = { }, customPools: {}, }, + [Network.GNOSIS]: { + factories: [ + { + address: '0xbc0797015fcfc47d9c1856639cae50d0e69fbee8', + isStableNg: true, + }, + ], + router: '0x0dcded3545d565ba3b19e683431381007245d983', // https://github.com/curvefi/curve-router-ng + stateUpdatePeriodMs: 5 * 1000, + disabledPools: new Set([]), + disabledImplementations: new Set([]), + factoryPoolImplementations: { + // TODO-gnosis: check if there's no missing implementations + '0x3d6cb2f6dcf47cdd9c13e4e3beae9af041d8796a': { + name: ImplementationNames.FACTORY_STABLE_NG, + address: '0x3d6cb2f6dcf47cdd9c13e4e3beae9af041d8796a', + liquidityApiSlug: '/factory-stable-ng', + isStoreRateSupported: true, + }, + '0xc1b393efef38140662b91441c6710aa704973228': { + name: ImplementationNames.FACTORY_STABLE_NG, + address: '0xc1b393efef38140662b91441c6710aa704973228', + liquidityApiSlug: '/factory-stable-ng', + isStoreRateSupported: true, + }, + }, + customPools: {}, + }, }, }; diff --git a/src/dex/curve-v1-stable-ng/curve-v1-stable-ng-e2e.test.ts b/src/dex/curve-v1-stable-ng/curve-v1-stable-ng-e2e.test.ts index 5cc02e4ef..cfea4d743 100644 --- a/src/dex/curve-v1-stable-ng/curve-v1-stable-ng-e2e.test.ts +++ b/src/dex/curve-v1-stable-ng/curve-v1-stable-ng-e2e.test.ts @@ -196,4 +196,24 @@ describe('CurveV1StableNG E2E', () => { sidesToContractMethods, ); }); + + describe('Gnosis', () => { + const network = Network.GNOSIS; + + const tokenASymbol: string = 'sDAI'; + const tokenBSymbol: string = 'crvUSD'; + + const tokenAAmount: string = '1000000000000000000'; + const tokenBAmount: string = '1000000000000000000'; + + testForNetwork( + network, + dexKey, + tokenASymbol, + tokenBSymbol, + tokenAAmount, + tokenBAmount, + sidesToContractMethods, + ); + }); }); diff --git a/src/dex/curve-v1/config.ts b/src/dex/curve-v1/config.ts index f87777fc1..f00de2e85 100644 --- a/src/dex/curve-v1/config.ts +++ b/src/dex/curve-v1/config.ts @@ -1115,6 +1115,42 @@ export const CurveV1Config: DexConfigMap = { }, }, }, + [Network.GNOSIS]: { + baseTokens: { + '0xe91d153e0b41518a2ce8dd3d7944fa863463a97d': { + address: '0xe91d153e0b41518a2ce8dd3d7944fa863463a97d', + decimals: 18, + reasonableVolume: 1000000000000000000000n, + }, + '0xddafbb505ad214d7b80b1f830fccc89b60fb7a83': { + address: '0xddafbb505ad214d7b80b1f830fccc89b60fb7a83', + decimals: 6, + reasonableVolume: 1000000000n, + }, + '0x4ecaba5870353805a9f068101a40e0f32ed605c6': { + address: '0x4ecaba5870353805a9f068101a40e0f32ed605c6', + decimals: 6, + reasonableVolume: 1000000000n, + }, + }, + eventSupportedPools: [], + pools: { + '3pool': { + underlying: [], + coins: [ + '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d', + '0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83', + '0x4ECaBa5870353805a9F068101A40E0f32ed605C6', + ], + address: '0x7f90122BF0700F9E7e1F688fe926940E8839F353', + name: '3pool (x3CRV)', + type: 1, + version: 3, + isLending: false, + isMetapool: false, + }, + }, + }, }, }; diff --git a/src/dex/curve-v1/curve-v1-e2e.test.ts b/src/dex/curve-v1/curve-v1-e2e.test.ts index d5a6efe43..b5a0b4f29 100644 --- a/src/dex/curve-v1/curve-v1-e2e.test.ts +++ b/src/dex/curve-v1/curve-v1-e2e.test.ts @@ -338,6 +338,75 @@ describe('CurveV1 E2E', () => { ); }); }); + + describe('GNOSIS', () => { + const network = Network.GNOSIS; + const tokens = Tokens[network]; + const holders = Holders[network]; + const provider = new StaticJsonRpcProvider( + generateConfig(network).privateHttpProvider, + network, + ); + + const tokensToTest = [ + [ + { + symbol: 'WXDAI', + amount: (10 ** 18).toString(), + }, + { + symbol: 'USDC', + amount: (10 ** 6).toString(), + }, + ], + [ + { + symbol: 'WXDAI', + amount: (10 ** 18).toString(), + }, + { + symbol: 'USDT', + amount: (10 ** 6).toString(), + }, + ], + [ + { + symbol: 'USDC', + amount: (10 ** 6).toString(), + }, + { + symbol: 'USDT', + amount: (10 ** 6).toString(), + }, + ], + ]; + + const sideToContractMethods = new Map([ + [SwapSide.SELL, [ContractMethod.swapExactAmountIn]], + ]); + + sideToContractMethods.forEach((contractMethods, side) => + contractMethods.forEach((contractMethod: ContractMethod) => { + tokensToTest.forEach(pair => { + describe(`${contractMethod}`, () => { + it(`${pair[0].symbol} -> ${pair[1].symbol}`, async () => { + await testE2E( + tokens[pair[0].symbol], + tokens[pair[1].symbol], + holders[pair[0].symbol], + side === SwapSide.SELL ? pair[0].amount : pair[1].amount, + side, + dexKey, + contractMethod, + network, + provider, + ); + }); + }); + }); + }), + ); + }); }); describe('Acryptos E2E', () => { diff --git a/src/dex/curve-v1/curve-v1.ts b/src/dex/curve-v1/curve-v1.ts index 98d574d54..2af608b36 100644 --- a/src/dex/curve-v1/curve-v1.ts +++ b/src/dex/curve-v1/curve-v1.ts @@ -861,7 +861,7 @@ export class CurveV1 } getAdapters(side: SwapSide): { name: string; index: number }[] | null { - return this.adapters[side]; + return this.adapters?.[side] ?? null; } static getDirectFunctionName(): string[] { diff --git a/src/dex/uniswap-v2/config.ts b/src/dex/uniswap-v2/config.ts index 02a45af11..9adbda125 100644 --- a/src/dex/uniswap-v2/config.ts +++ b/src/dex/uniswap-v2/config.ts @@ -427,6 +427,22 @@ export const UniswapV2Config: DexConfigMap = { '0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303', feeCode: 30, }, + [Network.GNOSIS]: { + subgraphURL: '7czeiia7ZXvsW45szX2w8EK1ZNgZWZET83zYCwE6JT9x', + factoryAddress: '0xc35dadb65012ec5796536bd9864ed8773abc74c4', + initCode: + '0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303', + feeCode: 30, + }, + }, + HoneySwap: { + [Network.GNOSIS]: { + subgraphURL: '7vjh6q6gj6M1bhRNgkKZmWqd5jot79kV84BiQtUDQSdV', + factoryAddress: '0xa818b4f111ccac7aa31d0bcc0806d64f2e0737d7', + initCode: + '0xdbd265d4828759db2a0351a7b97180bcc41449a038bcd08a45afe937147f6267', + feeCode: 30, + }, }, Zyberswap: { [Network.ARBITRUM]: { diff --git a/src/dex/uniswap-v2/nomiswap-v2.ts b/src/dex/uniswap-v2/nomiswap-v2.ts index 0dac17734..51cd2320c 100644 --- a/src/dex/uniswap-v2/nomiswap-v2.ts +++ b/src/dex/uniswap-v2/nomiswap-v2.ts @@ -18,6 +18,17 @@ export const NomiswapV2Config: DexConfigMap = { subgraphURL: '5CBKsDihF7KeBrNX4bgtb4tVFqy41PguVm88zBGpd4Hi', }, }, + // not exactly the same, but swapFee logic works in the same way + SwaprV2: { + [Network.GNOSIS]: { + factoryAddress: '0x5D48C95AdfFD4B40c1AAADc4e08fc44117E02179', + initCode: + '0xfcee8e246628cf9708fcb9d6f5d4aa0d96b62bb50f1af012a75a3292849e2dca', + poolGasCost: 120 * 1000, + feeCode: 25, // this is ignored as SwaprV2 uses dynamic fees, + subgraphURL: 'EWoa3JwNntAWtaLsLixTU25smp4R5tzGvs9rFXx9NHKZ', + }, + }, }; export class NomiswapV2 extends UniswapV2 { diff --git a/src/dex/uniswap-v2/uniswap-v2-e2e-gnosis.test.ts b/src/dex/uniswap-v2/uniswap-v2-e2e-gnosis.test.ts new file mode 100644 index 000000000..66ced3f61 --- /dev/null +++ b/src/dex/uniswap-v2/uniswap-v2-e2e-gnosis.test.ts @@ -0,0 +1,283 @@ +import dotenv from 'dotenv'; +dotenv.config(); + +import { testE2E } from '../../../tests/utils-e2e'; +import { Tokens, Holders } from '../../../tests/constants-e2e'; +import { Network, ContractMethod, SwapSide } from '../../constants'; +import { StaticJsonRpcProvider } from '@ethersproject/providers'; +import { generateConfig } from '../../config'; + +describe('UniswapV2 E2E Gnosis', () => { + const network = Network.GNOSIS; + const tokens = Tokens[network]; + const holders = Holders[network]; + const provider = new StaticJsonRpcProvider( + generateConfig(network).privateHttpProvider, + network, + ); + + describe('SushiSwap', () => { + const dexKey = 'SushiSwap'; + + describe('swapExactAmountIn', () => { + it('SushiSwap ETH -> TOKEN', async () => { + await testE2E( + tokens.XDAI, + tokens.USDC, + holders.XDAI, + '700000000000000000', + SwapSide.SELL, + dexKey, + ContractMethod.swapExactAmountIn, + network, + provider, + ); + }); + it('SushiSwap TOKEN -> ETH', async () => { + await testE2E( + tokens.WETH, + tokens.XDAI, + holders.WETH, + '700000000000000000', + SwapSide.SELL, + dexKey, + ContractMethod.swapExactAmountIn, + network, + provider, + ); + }); + it('SushiSwap TOKEN -> TOKEN', async () => { + await testE2E( + tokens.WETH, + tokens.USDC, + holders.WETH, + '7000000000000000', + SwapSide.SELL, + dexKey, + ContractMethod.swapExactAmountIn, + network, + provider, + ); + }); + }); + + describe('swapExactAmountOut', () => { + it('SushiSwap ETH -> TOKEN', async () => { + await testE2E( + tokens.XDAI, + tokens.USDC, + holders.XDAI, + '700000000', + SwapSide.BUY, + dexKey, + ContractMethod.swapExactAmountOut, + network, + provider, + ); + }); + it('SushiSwap TOKEN -> ETH', async () => { + await testE2E( + tokens.USDC, + tokens.XDAI, + holders.USDC, + '7000000000000000000', + SwapSide.BUY, + dexKey, + ContractMethod.swapExactAmountOut, + network, + provider, + ); + }); + it('SushiSwap TOKEN -> TOKEN', async () => { + await testE2E( + tokens.USDC, + tokens.WETH, + holders.USDC, + '7000000000000000', + SwapSide.BUY, + dexKey, + ContractMethod.swapExactAmountOut, + network, + provider, + ); + }); + }); + }); + + describe('HoneySwap', () => { + const dexKey = 'HoneySwap'; + + describe('swapExactAmountIn', () => { + it('SushiSwap ETH -> TOKEN', async () => { + await testE2E( + tokens.XDAI, + tokens.USDC, + holders.XDAI, + '700000000000000000', + SwapSide.SELL, + dexKey, + ContractMethod.swapExactAmountIn, + network, + provider, + ); + }); + it('SushiSwap TOKEN -> ETH', async () => { + await testE2E( + tokens.WETH, + tokens.XDAI, + holders.WETH, + '700000000000000000', + SwapSide.SELL, + dexKey, + ContractMethod.swapExactAmountIn, + network, + provider, + ); + }); + it('SushiSwap TOKEN -> TOKEN', async () => { + await testE2E( + tokens.WETH, + tokens.USDC, + holders.WETH, + '7000000000000000', + SwapSide.SELL, + dexKey, + ContractMethod.swapExactAmountIn, + network, + provider, + ); + }); + }); + + describe('swapExactAmountOut', () => { + it('SushiSwap ETH -> TOKEN', async () => { + await testE2E( + tokens.XDAI, + tokens.USDC, + holders.XDAI, + '700000000', + SwapSide.BUY, + dexKey, + ContractMethod.swapExactAmountOut, + network, + provider, + ); + }); + it('SushiSwap TOKEN -> ETH', async () => { + await testE2E( + tokens.USDC, + tokens.XDAI, + holders.USDC, + '7000000000000000000', + SwapSide.BUY, + dexKey, + ContractMethod.swapExactAmountOut, + network, + provider, + ); + }); + it('SushiSwap TOKEN -> TOKEN', async () => { + await testE2E( + tokens.USDC, + tokens.WETH, + holders.USDC, + '700000000000000', + SwapSide.BUY, + dexKey, + ContractMethod.swapExactAmountOut, + network, + provider, + ); + }); + }); + }); + + describe('SwaprV2', () => { + const dexKey = 'SwaprV2'; + + describe('swapExactAmountIn', () => { + it('SushiSwap ETH -> TOKEN', async () => { + await testE2E( + tokens.XDAI, + tokens.USDC, + holders.XDAI, + '700000000000000000', + SwapSide.SELL, + dexKey, + ContractMethod.swapExactAmountIn, + network, + provider, + ); + }); + it('SwaprV2 TOKEN -> ETH', async () => { + await testE2E( + tokens.WETH, + tokens.XDAI, + holders.WETH, + '700000000000000000', + SwapSide.SELL, + dexKey, + ContractMethod.swapExactAmountIn, + network, + provider, + ); + }); + it('SwaprV2 TOKEN -> TOKEN', async () => { + await testE2E( + tokens.WETH, + tokens.USDC, + holders.WETH, + '7000000000000000', + SwapSide.SELL, + dexKey, + ContractMethod.swapExactAmountIn, + network, + provider, + ); + }); + }); + + describe('swapExactAmountOut', () => { + it('SwaprV2 ETH -> TOKEN', async () => { + await testE2E( + tokens.XDAI, + // SWPR/WXDAI pool has non-standard feeCode - 100 + tokens.SWPR, + holders.XDAI, + '7000000000000000000', + SwapSide.BUY, + dexKey, + ContractMethod.swapExactAmountOut, + network, + provider, + ); + }); + it('SwaprV2 TOKEN -> ETH', async () => { + await testE2E( + tokens.USDC, + tokens.XDAI, + holders.USDC, + '7000000000000000000', + SwapSide.BUY, + dexKey, + ContractMethod.swapExactAmountOut, + network, + provider, + ); + }); + it('SwaprV2 TOKEN -> TOKEN', async () => { + await testE2E( + tokens.USDC, + tokens.WETH, + holders.USDC, + '700000000000000', + SwapSide.BUY, + dexKey, + ContractMethod.swapExactAmountOut, + network, + provider, + ); + }); + }); + }); +}); diff --git a/src/dex/uniswap-v2/uniswap-v2.ts b/src/dex/uniswap-v2/uniswap-v2.ts index 111b1edc4..ff022a36c 100644 --- a/src/dex/uniswap-v2/uniswap-v2.ts +++ b/src/dex/uniswap-v2/uniswap-v2.ts @@ -681,7 +681,7 @@ export class UniswapV2 } getAdapters(side: SwapSide): { name: string; index: number }[] | null { - return this.adapters[side]; + return this.adapters?.[side] ?? null; } async getTopPoolsForToken( diff --git a/src/dex/uniswap-v3/config.ts b/src/dex/uniswap-v3/config.ts index 88aa59a65..e2b2a0678 100644 --- a/src/dex/uniswap-v3/config.ts +++ b/src/dex/uniswap-v3/config.ts @@ -346,6 +346,20 @@ export const UniswapV3Config: DexConfigMap = { subgraphURL: 'https://api.studio.thegraph.com/query/59130/v3alb/0.3', }, }, + OkuTradeV3: { + [Network.GNOSIS]: { + factory: '0xe32f7dd7e3f098d518ff19a22d5f028e076489b1', + quoter: '0x7E9cB3499A6cee3baBe5c8a3D328EA7FD36578f4', + router: '0xB5253c895361678FF5D0fFDdA81Dd02f1F7a81D6', + supportedFees: SUPPORTED_FEES, + stateMulticall: '0x35Db9Ac2ff3C5A86fde165Bd26D43d303417942E', + uniswapMulticall: '0x4dfa9a980efE4802E969AC33968E3d6E59B8a19e', + chunksCount: 10, + initRetryFrequency: 10, + initHash: `0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54`, + subgraphURL: 'Dimv1udMsJu1DqirVM4G2vNRvH8CWzWTn7GffQQCGAaq', + }, + }, VelodromeSlipstream: { [Network.OPTIMISM]: { factory: '0x548118C7E0B865C2CfA94D15EC86B666468ac758', diff --git a/src/dex/uniswap-v3/uniswap-v3-e2e.test.ts b/src/dex/uniswap-v3/uniswap-v3-e2e.test.ts index a0096439d..3c8a7a425 100644 --- a/src/dex/uniswap-v3/uniswap-v3-e2e.test.ts +++ b/src/dex/uniswap-v3/uniswap-v3-e2e.test.ts @@ -1364,4 +1364,28 @@ describe('UniswapV3 E2E', () => { }); }); }); + + describe('OkuTradeV3 E2E', () => { + const dexKey = 'OkuTradeV3'; + describe('Gnosis', () => { + const network = Network.GNOSIS; + + const tokenASymbol: string = 'WETH'; + const tokenBSymbol: string = 'sDAI'; + + const tokenAAmount: string = '1000000000000000000'; + const tokenBAmount: string = '1000000000000000000'; + const nativeTokenAmount = '1000000000000000000'; + + testForNetwork( + network, + dexKey, + tokenASymbol, + tokenBSymbol, + tokenAAmount, + tokenBAmount, + nativeTokenAmount, + ); + }); + }); }); diff --git a/src/dex/uniswap-v3/uniswap-v3.ts b/src/dex/uniswap-v3/uniswap-v3.ts index 3c2e3385a..40defeeae 100644 --- a/src/dex/uniswap-v3/uniswap-v3.ts +++ b/src/dex/uniswap-v3/uniswap-v3.ts @@ -115,6 +115,7 @@ export class UniswapV3 'BaseswapV3', 'PharaohV2', 'AlienBaseV3', + 'OkuTradeV3', ]), ); diff --git a/src/dex/weth/config.ts b/src/dex/weth/config.ts index 653b9133f..e91ceeaf6 100644 --- a/src/dex/weth/config.ts +++ b/src/dex/weth/config.ts @@ -46,6 +46,11 @@ export const WethConfig: DexConfigMap = { poolGasCost: WethGasCost, }, }, + Wxdai: { + [Network.GNOSIS]: { + poolGasCost: WethGasCost, + }, + }, }; export const Adapters: { diff --git a/src/dex/wusdm/config.ts b/src/dex/wusdm/config.ts index 7e7d1733d..d2f1e1de6 100644 --- a/src/dex/wusdm/config.ts +++ b/src/dex/wusdm/config.ts @@ -25,4 +25,12 @@ export const WUSDMConfig: DexConfigMap = { USDMAddress: '0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C', }, }, + // not really wUSDM, but works in the same way + // might give 1wei difference on BUY + sDAI: { + [Network.GNOSIS]: { + wUSDMAddress: '0xaf204776c7245bF4147c2612BF6e5972Ee483701', // sDAI + USDMAddress: '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d', // WXDAI + }, + }, }; diff --git a/src/dex/wusdm/wusdm-e2e.test.ts b/src/dex/wusdm/wusdm-e2e.test.ts index 89aad8afb..9c922575b 100644 --- a/src/dex/wusdm/wusdm-e2e.test.ts +++ b/src/dex/wusdm/wusdm-e2e.test.ts @@ -163,4 +163,42 @@ describe('MountainProtocol E2E', () => { tokenBAmount, ); }); + + describe('Gnosis', () => { + const network = Network.GNOSIS; + + const tokenASymbol: string = 'sDAI'; + const tokenBSymbol: string = 'WXDAI'; + + const tokenAAmount: string = '500000000000000000'; + const tokenBAmount: string = '500000000000000000'; + + testForNetwork( + network, + 'sDAI', + tokenASymbol, + tokenBSymbol, + tokenAAmount, + tokenBAmount, + ); + }); + + describe('Gnosis with Native', () => { + const network = Network.GNOSIS; + + const tokenASymbol: string = 'sDAI'; + const tokenBSymbol: string = 'XDAI'; + + const tokenAAmount: string = '500000000000000000'; + const tokenBAmount: string = '500000000000000000'; + + testForNetwork( + network, + 'sDAI', + tokenASymbol, + tokenBSymbol, + tokenAAmount, + tokenBAmount, + ); + }); }); diff --git a/src/dex/wusdm/wusdm.ts b/src/dex/wusdm/wusdm.ts index 5505e0696..98c0e1682 100644 --- a/src/dex/wusdm/wusdm.ts +++ b/src/dex/wusdm/wusdm.ts @@ -38,6 +38,7 @@ export class WUSDM { readonly hasConstantPriceLargeAmounts = true; readonly isFeeOnTransferSupported = false; + readonly needWrapNative: boolean = true; public static dexKeysWithNetwork: { key: string; networks: Network[] }[] = getDexKeysWithNetwork(WUSDMConfig); @@ -89,7 +90,10 @@ export class WUSDM side: SwapSide, blockNumber: number, ): Promise { - return this.isAppropriatePair(srcToken, destToken) + const _srcToken = this.dexHelper.config.wrapETH(srcToken); + const _destToken = this.dexHelper.config.wrapETH(destToken); + + return this.isAppropriatePair(_srcToken, _destToken) ? [`${this.dexKey}_${this.wUSDMAddress}`] : []; } @@ -121,13 +125,16 @@ export class WUSDM blockNumber: number, limitPools?: string[], ): Promise> { - if (!this.isAppropriatePair(srcToken, destToken)) return null; + const _srcToken = this.dexHelper.config.wrapETH(srcToken); + const _destToken = this.dexHelper.config.wrapETH(destToken); + + if (!this.isAppropriatePair(_srcToken, _destToken)) return null; const state = this.eventPool.getState(blockNumber); if (!state) return null; - const isSrcAsset = this.isUSDM(srcToken.address); + const isSrcAsset = this.isUSDM(_srcToken.address); - const isWrap = this.isWrap(srcToken, destToken, side); + const isWrap = this.isWrap(_srcToken, _destToken, side); let calcFunction: Function; diff --git a/src/executor/WETHBytecodeBuilder.ts b/src/executor/WETHBytecodeBuilder.ts index 7e2d68106..e53d291b5 100644 --- a/src/executor/WETHBytecodeBuilder.ts +++ b/src/executor/WETHBytecodeBuilder.ts @@ -1,9 +1,9 @@ import { DexExchangeBuildParam } from '../types'; -import { OptimalRate, SwapSide } from '@paraswap/core'; +import { OptimalRate } from '@paraswap/core'; import { isETHAddress } from '../utils'; import { DepositWithdrawReturn } from '../dex/weth/types'; import { WethConfig } from '../dex/weth/config'; -import { Executors, Flag, SpecialDex } from './types'; +import { Executors } from './types'; import { ExecutorBytecodeBuilder } from './ExecutorBytecodeBuilder'; import { Network } from '../constants'; @@ -15,6 +15,7 @@ const SUPPORTED_NETWORKS = [ Network.POLYGON, Network.OPTIMISM, Network.ZKEVM, + Network.GNOSIS, ]; const SUPPORTED_EXCHANGES = Object.keys(WethConfig); diff --git a/tests/constants-e2e.ts b/tests/constants-e2e.ts index 7c7be8743..258fdd5f0 100644 --- a/tests/constants-e2e.ts +++ b/tests/constants-e2e.ts @@ -1459,6 +1459,64 @@ export const Tokens: { decimals: 6, }, }, + [Network.GNOSIS]: { + XDAI: { + address: ETHER_ADDRESS, + decimals: 18, + }, + WETH: { + address: '0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1', + decimals: 18, + }, + WBTC: { + address: '0x8e5bBbb09Ed1ebdE8674Cda39A0c169401db4252', + decimals: 8, + }, + USDC: { + address: '0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83', + decimals: 6, + }, + USDT: { + address: '0x4ECaBa5870353805a9F068101A40E0f32ed605C6', + decimals: 6, + }, + WXDAI: { + address: '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d', + decimals: 18, + }, + aGnoWETH: { + address: '0xa818f1b57c201e092c4a2017a91815034326efd1', + decimals: 18, + }, + aGnowstETH: { + address: '0x23e4e76d01b2002be436ce8d6044b0aa2f68b68a', + decimals: 18, + }, + aGnoUSDC: { + address: '0xc6b7aca6de8a6044e0e32d0c841a89244a10d284', + decimals: 6, + }, + wstETH: { + address: '0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6', + decimals: 18, + }, + aGnoWXDAI: { + address: '0xd0dd6cef72143e22cced4867eb0d5f2328715533', + decimals: 18, + }, + sDAI: { + address: '0xaf204776c7245bF4147c2612BF6e5972Ee483701', + decimals: 18, + }, + crvUSD: { + address: '0xaBEf652195F98A91E490f047A5006B71c85f058d', + decimals: 18, + }, + SWPR: { + address: '0x532801ED6f82FFfD2DAB70A19fC2d7B2772C4f4b', + decimals: 18, + }, + }, [Network.BASE]: { wstETH: { address: `0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452`, @@ -1896,6 +1954,21 @@ export const Holders: { WBTC: '0x99b31498b0a1dae01fc3433e3cb60f095340935c', USDC: '0x99b31498b0a1dae01fc3433e3cb60f095340935c', }, + [Network.GNOSIS]: { + XDAI: '0x9fc062032d4F2Fe7dAA601bd8B06C45F9c8f17Be', + WXDAI: '0xBA12222222228d8Ba445958a75a0704d566BF2C8', + WETH: '0x800e12aF6c96790EDDdc5B3f3302899e27B2A918', + USDT: '0x1098503a90c3224F0e6BE7c124a337888C0BA564', + WBTC: '0x8e5bBbb09Ed1ebdE8674Cda39A0c169401db4252', + USDC: '0xd4A39d219ADB43aB00739DC5D876D98Fdf0121Bf', + aGnoWXDAI: '0x458cD345B4C05e8DF39d0A07220feb4Ec19F5e6f', + aGnoUSDC: '0x458cD345B4C05e8DF39d0A07220feb4Ec19F5e6f', + wstETH: '0x458cD345B4C05e8DF39d0A07220feb4Ec19F5e6f', + aGnowstETH: '0x458cD345B4C05e8DF39d0A07220feb4Ec19F5e6f', + sDAI: '0x79f08F2e75A8C99428DE4A2e6456c07C99E55da5', + crvUSD: '0xE4A982fa1f1E8AD1AF238A7b1226b13b56bf5CcD', + SWPR: '0x9467dcFD4519287e3878C018c02f5670465a9003', + }, [Network.BASE]: { WETH: '0x4bb6b2efe7036020ba6f02a05602546c9f25bf28', PRIME: '0xe3879b7359695f802d6FD56Bb76fD82C362Dafd6', @@ -1947,6 +2020,7 @@ export const NativeTokenSymbols: { [network: number]: string } = { [Network.ARBITRUM]: 'ETH', [Network.OPTIMISM]: 'ETH', [Network.BASE]: 'ETH', + [Network.GNOSIS]: 'XDAI', }; export const WrappedNativeTokenSymbols: { [network: number]: string } = { @@ -1958,4 +2032,5 @@ export const WrappedNativeTokenSymbols: { [network: number]: string } = { [Network.ARBITRUM]: 'WETH', [Network.OPTIMISM]: 'WETH', [Network.BASE]: 'WETH', + [Network.GNOSIS]: 'WXDAI', };