Skip to content

Commit

Permalink
feat: bridge fee info
Browse files Browse the repository at this point in the history
  • Loading branch information
foodaka committed Oct 17, 2024
1 parent 728b8c6 commit 8ecb64c
Show file tree
Hide file tree
Showing 4 changed files with 281 additions and 158 deletions.
123 changes: 121 additions & 2 deletions src/components/transactions/Bridge/BridgeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import {
AaveV3Ethereum,
AaveV3Sepolia,
} from '@bgd-labs/aave-address-book';
import { constants } from 'ethers';
import { TokenInfoWithBalance } from 'src/hooks/generic/useTokensBalance';
import { BaseNetworkConfig, networkConfigs } from 'src/ui-config/networksConfig';
import { ENABLE_TESTNET } from 'src/utils/marketsAndNetworksConfig';

Expand All @@ -23,6 +25,7 @@ type Config = {
destinationChainId: ChainId;
onRamp: string;
}[];
feeTokens: TokenInfoWithBalance[];
};

export enum MessageExecutionState {
Expand Down Expand Up @@ -51,6 +54,35 @@ const prodConfig: Config[] = [
onRamp: '0x925228d7b82d883dde340a55fe8e6da56244a22c',
},
],
feeTokens: [
{
name: 'Gho Token',
address: AaveV3Ethereum.ASSETS.GHO.UNDERLYING,
symbol: 'GHO',
decimals: 18,
chainId: 1,
logoURI:
'https://assets.coingecko.com/coins/images/30663/standard/gho-token-logo.png?1720517092',
oracle: AaveV3Ethereum.ASSETS.GHO.ORACLE,
extensions: {
isNative: false,
},
balance: '0',
},
{
name: 'Ethereum',
symbol: 'ETH',
decimals: 18,
address: constants.AddressZero, // Use zero address for network token ccip
chainId: 1,
logoURI:
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png',
extensions: {
isNative: true,
},
balance: '0',
},
],
},
{
sourceChainId: ChainId.arbitrum_one,
Expand All @@ -66,6 +98,35 @@ const prodConfig: Config[] = [
onRamp: '0xce11020d56e5fdbfe46d9fc3021641ffbbb5adee',
},
],
feeTokens: [
{
name: 'Gho Token',
address: AaveV3Arbitrum.ASSETS.GHO.UNDERLYING,
symbol: 'GHO',
decimals: 18,
chainId: 42161,
logoURI:
'https://assets.coingecko.com/coins/images/30663/standard/gho-token-logo.png?1720517092',
oracle: AaveV3Arbitrum.ASSETS.GHO.ORACLE,
extensions: {
isNative: false,
},
balance: '0',
},
{
name: 'Ethereum',
symbol: 'ETH',
decimals: 18,
address: constants.AddressZero, // Use zero address for network token ccip
chainId: 42161, // Arb
logoURI:
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png',
extensions: {
isNative: true,
},
balance: '0',
},
],
},
];

Expand All @@ -75,7 +136,7 @@ const testnetConfig: Config[] = [
lockReleaseTokenPool: '0x7768248E1Ff75612c18324bad06bb393c1206980',
chainSelector: '16015286601757825753',
router: '0x11c008349c41fb5c78e544397fb4613605ec1a74',
tokenOracle: '0x98458D6A99489F15e6eB5aFa67ACFAcf6F211051', // mock oracle
tokenOracle: '0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59', // mock oracle
wrappedNativeOracle: AaveV3Sepolia.ASSETS.WETH.ORACLE,
subgraphUrl: 'https://api.studio.thegraph.com/query/75867/gho-ccip-sepolia/version/latest',
destinations: [
Expand All @@ -84,13 +145,42 @@ const testnetConfig: Config[] = [
onRamp: '0x1f41c443cf68750d5c195e2ea7051521d981fc77',
},
],
feeTokens: [
{
name: 'Gho Token',
address: AaveV3Sepolia.ASSETS.GHO.UNDERLYING,
symbol: 'GHO',
decimals: 18,
chainId: 11155111,
logoURI:
'https://assets.coingecko.com/coins/images/30663/standard/gho-token-logo.png?1720517092',
oracle: AaveV3Sepolia.ASSETS.GHO.ORACLE,
extensions: {
isNative: false,
},
balance: '0',
},
{
name: 'Ethereum',
symbol: 'ETH',
decimals: 18,
address: constants.AddressZero, // Use zero address for network token ccip
chainId: 11155111,
logoURI:
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png',
extensions: {
isNative: true,
},
balance: '0',
},
],
},
{
sourceChainId: ChainId.arbitrum_sepolia,
burnMintTokenPool: '0x3eC2b6F818B72442fc36561e9F930DD2b60957D2',
chainSelector: '3478487238524512106',
router: '0x22356aec4cf05ec0ec63daa576c6b2ce1dc64701',
tokenOracle: '0x0153002d20B96532C639313c2d54c3dA09109309', // mock oracle
tokenOracle: '0x2a9C5afB0d0e4BAb2BCdaE109EC4b0c4Be15a165', // mock oracle
wrappedNativeOracle: AaveV3ArbitrumSepolia.ASSETS.WETH.ORACLE,
subgraphUrl: 'https://api.studio.thegraph.com/query/75867/gho-ccip-arb-sepolia/version/latest',
destinations: [
Expand All @@ -99,6 +189,35 @@ const testnetConfig: Config[] = [
onRamp: '0xc1ebd046a4086142479be3fc16a4791e2022909a',
},
],
feeTokens: [
{
name: 'Gho Token',
address: AaveV3Sepolia.ASSETS.GHO.UNDERLYING,
symbol: 'GHO',
decimals: 18,
chainId: 421614,
logoURI:
'https://assets.coingecko.com/coins/images/30663/standard/gho-token-logo.png?1720517092',
oracle: AaveV3Sepolia.ASSETS.GHO.ORACLE,
extensions: {
isNative: false,
},
balance: '0',
},
{
name: 'Ethereum',
symbol: 'ETH',
decimals: 18,
address: constants.AddressZero, // Use zero address for network token ccip
chainId: 421614, // Arb
logoURI:
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png',
extensions: {
isNative: true,
},
balance: '0',
},
],
},
];

Expand Down
Loading

0 comments on commit 8ecb64c

Please sign in to comment.