Skip to content

Commit

Permalink
feat: readd base and polygon as cctp [OTE-655] (#867)
Browse files Browse the repository at this point in the history
  • Loading branch information
yogurtandjam committed Aug 1, 2024
1 parent c25488b commit 294e3b0
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 0 deletions.
10 changes: 10 additions & 0 deletions public/configs/cctp.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,15 @@
"chainId": "42161",
"tokenAddress": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"name": "arbitrum"
},
{
"chainId": "8453",
"tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"name": "Base"
},
{
"chainId": "137",
"tokenAddress": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
"name": "Polygon"
}
]
120 changes: 120 additions & 0 deletions src/constants/__test__/cctp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ describe('getLowestFeeChainNames', () => {
'Avalanche',
'Optimism',
'Arbitrum',
'Base',
'Polygon',
]);
});
it('deposits skip - returns all cctp mainnet chain names as an array', () => {
Expand All @@ -23,6 +25,8 @@ describe('getLowestFeeChainNames', () => {
'Avalanche',
'Optimism',
'Arbitrum',
'Base',
'Polygon',
]);
});
it('withdrawals squid - returns all cctp mainnet chain names as an array', () => {
Expand All @@ -31,6 +35,8 @@ describe('getLowestFeeChainNames', () => {
'Avalanche',
'Optimism',
'Arbitrum',
'Base',
'Polygon',
]);
});
it('deposits squid - returns all cctp mainnet chain names as an array', () => {
Expand All @@ -39,6 +45,8 @@ describe('getLowestFeeChainNames', () => {
'Avalanche',
'Optimism',
'Arbitrum',
'Base',
'Polygon',
]);
});
});
Expand Down Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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', () => {
Expand Down Expand Up @@ -163,6 +213,20 @@ describe('getMapOfLowestFeeTokensByDenom', () => {
name: 'arbitrum',
},
],
'0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913': [
{
chainId: '8453',
tokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
name: 'Base',
},
],
'0x3c499c542cef5e3811e1192ce70d8cc03d5c3359': [
{
chainId: '137',
tokenAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359',
name: 'Polygon',
},
],
});
});
});
Expand Down Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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', () => {
Expand Down Expand Up @@ -286,6 +392,20 @@ describe('getMapOfLowestFeeTokensByChainId', () => {
name: 'arbitrum',
},
],
8453: [
{
chainId: '8453',
tokenAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
name: 'Base',
},
],
137: [
{
chainId: '137',
tokenAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359',
name: 'Polygon',
},
],
});
});
});
Expand Down

0 comments on commit 294e3b0

Please sign in to comment.