Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@aave/math-utils": "1.37.1",
"@aave/react": "^0.8.2",
"@amplitude/analytics-browser": "^2.13.0",
"@bgd-labs/aave-address-book": "^4.38.2",
"@bgd-labs/aave-address-book": "^4.44.0",
"@cowprotocol/cow-sdk": "7.2.4",
"@cowprotocol/sdk-ethers-v5-adapter": "0.3.0",
"@cowprotocol/sdk-flash-loans": "1.6.0",
Expand Down
37 changes: 32 additions & 5 deletions src/components/transactions/Bridge/BridgeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ import {
AaveV3BaseSepolia,
AaveV3Ethereum,
AaveV3Gnosis,
AaveV3InkWhitelabel,
AaveV3Sepolia,
GhoArbitrum,
GhoAvalanche,
GhoBase,
GhoEthereum,
GhoGnosis,
GhoInk,
GhoMantle,
} from '@bgd-labs/aave-address-book';
import { constants } from 'ethers';
import { TokenInfoWithBalance } from 'src/hooks/generic/useTokensBalance';
Expand All @@ -24,7 +29,7 @@ type Config = {
sourceChainId: ChainId | number;
router: string;
chainSelector: string;
subgraphKey: SubgraphKey;
subgraphKey: SubgraphKey | 'unsupported';
tokenOracle: string; // Used to get the GHO price
wrappedNativeOracle: string; // Used to get the fee price in USD
lockReleaseTokenPool?: string; // Only exists on Ethereum
Expand Down Expand Up @@ -149,7 +154,7 @@ const prodConfig: Config[] = [
{
sourceChainId: ChainId.avalanche,
chainSelector: '6433500567565415381',
burnMintTokenPool: '0xDe6539018B095353A40753Dc54C91C68c9487D4E',
burnMintTokenPool: GhoAvalanche.GHO_CCIP_TOKEN_POOL,
router: '0xF4c7E640EdA248ef95972845a62bdC74237805dB',
tokenOracle: '0x360d8aa8F6b09B7BC57aF34db2Eb84dD87bf4d12',
wrappedNativeOracle: AaveV3Avalanche.ASSETS.WAVAX.ORACLE,
Expand Down Expand Up @@ -183,7 +188,7 @@ const prodConfig: Config[] = [
{
sourceChainId: ChainId.xdai,
chainSelector: '465200170687744372',
burnMintTokenPool: '0xDe6539018B095353A40753Dc54C91C68c9487D4E',
burnMintTokenPool: GhoGnosis.GHO_CCIP_TOKEN_POOL,
router: '0x4aAD6071085df840abD9Baf1697d5D5992bDadce',
tokenOracle: '0x360d8aa8F6b09B7BC57aF34db2Eb84dD87bf4d12',
wrappedNativeOracle: AaveV3Gnosis.ASSETS.WXDAI.ORACLE,
Expand All @@ -205,10 +210,10 @@ const prodConfig: Config[] = [
{
sourceChainId: ChainId.ink,
chainSelector: '3461204551265785888',
burnMintTokenPool: '0xDe6539018B095353A40753Dc54C91C68c9487D4E',
burnMintTokenPool: GhoInk.GHO_CCIP_TOKEN_POOL,
router: '0xca7c90A52B44E301AC01Cb5EB99b2fD99339433A',
tokenOracle: '0x20fd5f3FCac8883a3A0A2bBcD658A2d2c6EFa6B6',
wrappedNativeOracle: '0xA17887fd35B14A4c6e6ec87458591941934d444c',
wrappedNativeOracle: AaveV3InkWhitelabel.ASSETS.WETH.ORACLE,
subgraphKey: 'ccip-ink',
feeTokens: [
{
Expand All @@ -224,6 +229,28 @@ const prodConfig: Config[] = [
},
],
},
{
sourceChainId: ChainId.mantle,
chainSelector: '1556008542357238666',
burnMintTokenPool: GhoMantle.GHO_CCIP_TOKEN_POOL,
router: '0x670052635a9850bb45882Cb2eCcF66bCff0F41B7',
tokenOracle: '0x360d8aa8F6b09B7BC57aF34db2Eb84dD87bf4d12',
wrappedNativeOracle: '0xD97F20bEbeD74e8144134C4b148fE93417dd0F96',
subgraphKey: 'unsupported',
feeTokens: [
{
name: 'Mantle',
symbol: 'MNT',
decimals: 18,
address: constants.AddressZero, // Use zero address for network token ccip
chainId: ChainId.mantle,
extensions: {
isNative: true,
},
balance: '0',
},
],
},
];

const testnetConfig: Config[] = [
Expand Down
21 changes: 21 additions & 0 deletions src/ui-config/marketsConfig.tsx
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

market has no reserves yet but had to do this to test mantle to * bridge flows, perhaps there's a better workaround for unlisted markets?

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
AaveV3Gnosis,
AaveV3InkWhitelabel,
AaveV3Linea,
AaveV3Mantle,
AaveV3Metis,
AaveV3Optimism,
AaveV3Plasma,
Expand Down Expand Up @@ -98,6 +99,7 @@ export enum CustomMarket {
proto_aptos_v3 = 'proto_aptos_v3',
proto_plasma_v3 = 'proto_plasma_v3',
proto_ink_v3 = 'proto_ink_v3',
proto_mantle_v3 = 'proto_mantle_v3',
// v2
proto_mainnet = 'proto_mainnet',
proto_avalanche = 'proto_avalanche',
Expand Down Expand Up @@ -714,6 +716,25 @@ export const marketsData: {
COLLECTOR: AaveV3Metis.COLLECTOR,
},
},
[CustomMarket.proto_mantle_v3]: {
marketTitle: 'Mantle',
market: CustomMarket.proto_mantle_v3,
chainId: ChainId.mantle,
v3: true,
enabledFeatures: {
incentives: true,
},
subgraphUrl: '',
addresses: {
LENDING_POOL_ADDRESS_PROVIDER: AaveV3Mantle.POOL_ADDRESSES_PROVIDER,
LENDING_POOL: AaveV3Mantle.POOL,
WETH_GATEWAY: AaveV3Mantle.WETH_GATEWAY,
WALLET_BALANCE_PROVIDER: AaveV3Mantle.WALLET_BALANCE_PROVIDER,
UI_POOL_DATA_PROVIDER: AaveV3Mantle.UI_POOL_DATA_PROVIDER,
UI_INCENTIVE_DATA_PROVIDER: AaveV3Mantle.UI_INCENTIVE_DATA_PROVIDER,
COLLECTOR: AaveV3Mantle.COLLECTOR,
},
},
} as const;

export const findByChainId = (chainId: ChainId) => {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1209,10 +1209,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@bgd-labs/aave-address-book@^4.38.2":
version "4.38.2"
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-4.38.2.tgz#91d128046b2686f2bf5e5d24f6e7910080c6c29f"
integrity sha512-cxWa3I2IAJInk8Fc+Qw2rqaWxWlCl/m6mXCH/PPj2mEyyECUbOB4uEG3C58pKXFISiKEdmjyC7IFjotAPHDrLw==
"@bgd-labs/aave-address-book@^4.44.0":
version "4.44.0"
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-4.44.0.tgz#2e363432a4088e110c05ea8f3f263d33a684b697"
integrity sha512-XYmIE8vEI4mn4ymB6kMvJ7p9+yAX1RX/vvb1vzzijQPvc8xlAIOL40AcIokWoRtgQBeBrWmQpCGLbwRmdXBJdQ==

"@coinbase/wallet-sdk@4.3.0":
version "4.3.0"
Expand Down
Loading