From 294e3b04d05121b285f54a83723e780668f7f981 Mon Sep 17 00:00:00 2001 From: Jeremy Lee <37092291+yogurtandjam@users.noreply.github.com> Date: Thu, 1 Aug 2024 15:23:19 -0400 Subject: [PATCH] feat: readd base and polygon as cctp [OTE-655] (#867) --- public/configs/cctp.json | 10 +++ src/constants/__test__/cctp.spec.ts | 120 ++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+) diff --git a/public/configs/cctp.json b/public/configs/cctp.json index 9375f7518..3c06e0fc1 100644 --- a/public/configs/cctp.json +++ b/public/configs/cctp.json @@ -24,5 +24,15 @@ "chainId": "42161", "tokenAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "name": "arbitrum" + }, + { + "chainId": "8453", + "tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "name": "Base" + }, + { + "chainId": "137", + "tokenAddress": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359", + "name": "Polygon" } ] diff --git a/src/constants/__test__/cctp.spec.ts b/src/constants/__test__/cctp.spec.ts index 224ab1d20..709ea954c 100644 --- a/src/constants/__test__/cctp.spec.ts +++ b/src/constants/__test__/cctp.spec.ts @@ -15,6 +15,8 @@ describe('getLowestFeeChainNames', () => { 'Avalanche', 'Optimism', 'Arbitrum', + 'Base', + 'Polygon', ]); }); it('deposits skip - returns all cctp mainnet chain names as an array', () => { @@ -23,6 +25,8 @@ describe('getLowestFeeChainNames', () => { 'Avalanche', 'Optimism', 'Arbitrum', + 'Base', + 'Polygon', ]); }); it('withdrawals squid - returns all cctp mainnet chain names as an array', () => { @@ -31,6 +35,8 @@ describe('getLowestFeeChainNames', () => { 'Avalanche', 'Optimism', 'Arbitrum', + 'Base', + 'Polygon', ]); }); it('deposits squid - returns all cctp mainnet chain names as an array', () => { @@ -39,6 +45,8 @@ describe('getLowestFeeChainNames', () => { 'Avalanche', 'Optimism', 'Arbitrum', + 'Base', + 'Polygon', ]); }); }); @@ -67,6 +75,20 @@ describe('getMapOfLowestFeeTokensByDenom', () => { name: 'arbitrum', }, ], + '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913': [ + { + chainId: '8453', + tokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', + name: 'Base', + }, + ], + '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359': [ + { + chainId: '137', + tokenAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359', + name: 'Polygon', + }, + ], }); }); it('deposits skip - returns a map of token denom/addresses to token information including ETH USDC', () => { @@ -99,6 +121,20 @@ describe('getMapOfLowestFeeTokensByDenom', () => { name: 'arbitrum', }, ], + '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913': [ + { + chainId: '8453', + tokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', + name: 'Base', + }, + ], + '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359': [ + { + chainId: '137', + tokenAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359', + name: 'Polygon', + }, + ], }); }); it('withdrawals squid - returns a map of token denom/addresses to token information including ETH USDC', () => { @@ -131,6 +167,20 @@ describe('getMapOfLowestFeeTokensByDenom', () => { name: 'arbitrum', }, ], + '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913': [ + { + chainId: '8453', + tokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', + name: 'Base', + }, + ], + '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359': [ + { + chainId: '137', + tokenAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359', + name: 'Polygon', + }, + ], }); }); it('deposits squid - returns a map of token denom/addresses to token information including ETH USDC', () => { @@ -163,6 +213,20 @@ describe('getMapOfLowestFeeTokensByDenom', () => { name: 'arbitrum', }, ], + '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913': [ + { + chainId: '8453', + tokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', + name: 'Base', + }, + ], + '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359': [ + { + chainId: '137', + tokenAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359', + name: 'Polygon', + }, + ], }); }); }); @@ -190,6 +254,20 @@ describe('getMapOfLowestFeeTokensByChainId', () => { name: 'arbitrum', }, ], + 8453: [ + { + chainId: '8453', + tokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', + name: 'Base', + }, + ], + 137: [ + { + chainId: '137', + tokenAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359', + name: 'Polygon', + }, + ], }); }); it('deposits skip - should be a map of chain ids to token information including ETH USDC', () => { @@ -222,6 +300,20 @@ describe('getMapOfLowestFeeTokensByChainId', () => { name: 'arbitrum', }, ], + 8453: [ + { + chainId: '8453', + tokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', + name: 'Base', + }, + ], + 137: [ + { + chainId: '137', + tokenAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359', + name: 'Polygon', + }, + ], }); }); it('withdrawals squid - should be a map of chain ids to token information including ETH USDC', () => { @@ -254,6 +346,20 @@ describe('getMapOfLowestFeeTokensByChainId', () => { name: 'arbitrum', }, ], + 8453: [ + { + chainId: '8453', + tokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', + name: 'Base', + }, + ], + 137: [ + { + chainId: '137', + tokenAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359', + name: 'Polygon', + }, + ], }); }); it('deposits squid - should be a map of chain ids to token information including ETH USDC', () => { @@ -286,6 +392,20 @@ describe('getMapOfLowestFeeTokensByChainId', () => { name: 'arbitrum', }, ], + 8453: [ + { + chainId: '8453', + tokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', + name: 'Base', + }, + ], + 137: [ + { + chainId: '137', + tokenAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359', + name: 'Polygon', + }, + ], }); }); });