Skip to content

Commit 77b09a7

Browse files
grothemmiguelmtzinffoodaka
authored
feat: gho on base [skip cypress] (#2340)
Co-authored-by: miguelmtzinf <[email protected]> Co-authored-by: Mark Hinschberger <[email protected]>
1 parent 9c37213 commit 77b09a7

File tree

6 files changed

+77
-13
lines changed

6 files changed

+77
-13
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"dependencies": {
3434
"@aave/contract-helpers": "1.30.5",
3535
"@aave/math-utils": "1.30.5",
36-
"@bgd-labs/aave-address-book": "4.8.1",
36+
"@bgd-labs/aave-address-book": "4.10.0",
3737
"@emotion/cache": "11.10.3",
3838
"@emotion/react": "11.10.4",
3939
"@emotion/server": "latest",

src/components/transactions/Bridge/BridgeConfig.ts

+61-8
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@ import { ChainId } from '@aave/contract-helpers';
22
import {
33
AaveV3Arbitrum,
44
AaveV3ArbitrumSepolia,
5+
AaveV3Base,
6+
AaveV3BaseSepolia,
57
AaveV3Ethereum,
68
AaveV3Sepolia,
9+
GhoArbitrum,
10+
GhoBase,
11+
GhoEthereum,
712
} from '@bgd-labs/aave-address-book';
813
import { constants } from 'ethers';
914
import { TokenInfoWithBalance } from 'src/hooks/generic/useTokensBalance';
@@ -39,9 +44,9 @@ const prodConfig: Config[] = [
3944
{
4045
sourceChainId: ChainId.mainnet,
4146
chainSelector: '5009297550715157269',
42-
lockReleaseTokenPool: '0x06179f7C1be40863405f374E7f5F8806c728660A', // TODO: address book
47+
lockReleaseTokenPool: GhoEthereum.GHO_CCIP_TOKEN_POOL,
4348
router: '0x80226fc0ee2b096224eeac085bb9a8cba1146f7d',
44-
tokenOracle: '0x3f12643d3f6f874d39c2a4c9f2cd6f2dbac877fc',
49+
tokenOracle: '0x3f12643d3f6f874d39c2a4c9f2cd6f2dbac877fc', // CL Feed
4550
wrappedNativeOracle: AaveV3Ethereum.ASSETS.WETH.ORACLE,
4651
subgraphUrl: `https://gateway-arbitrum.network.thegraph.com/api/${process.env.NEXT_PUBLIC_SUBGRAPH_API_KEY}/subgraphs/id/E11p8T4Ff1DHZbwSUC527hkUb5innVMdTuP6A2s1xtm1`,
4752
feeTokens: [
@@ -50,7 +55,7 @@ const prodConfig: Config[] = [
5055
address: AaveV3Ethereum.ASSETS.GHO.UNDERLYING,
5156
symbol: 'GHO',
5257
decimals: 18,
53-
chainId: 1,
58+
chainId: ChainId.mainnet,
5459
logoURI:
5560
'https://assets.coingecko.com/coins/images/30663/standard/gho-token-logo.png?1720517092',
5661
oracle: AaveV3Ethereum.ASSETS.GHO.ORACLE,
@@ -64,7 +69,7 @@ const prodConfig: Config[] = [
6469
symbol: 'ETH',
6570
decimals: 18,
6671
address: constants.AddressZero, // Use zero address for network token ccip
67-
chainId: 1,
72+
chainId: ChainId.mainnet,
6873
logoURI:
6974
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png',
7075
extensions: {
@@ -77,9 +82,9 @@ const prodConfig: Config[] = [
7782
{
7883
sourceChainId: ChainId.arbitrum_one,
7984
chainSelector: '4949039107694359620',
80-
burnMintTokenPool: '0xB94Ab28c6869466a46a42abA834ca2B3cECCA5eB', // TODO: address book
85+
burnMintTokenPool: GhoArbitrum.GHO_CCIP_TOKEN_POOL,
8186
router: '0x141fa059441e0ca23ce184b6a78bafd2a517dde8',
82-
tokenOracle: '0xb05984ad83c20b3ade7bf97a9a0cb539dde28dbb',
87+
tokenOracle: AaveV3Arbitrum.ASSETS.GHO.ORACLE,
8388
wrappedNativeOracle: AaveV3Arbitrum.ASSETS.WETH.ORACLE,
8489
subgraphUrl: `https://gateway-arbitrum.network.thegraph.com/api/${process.env.NEXT_PUBLIC_SUBGRAPH_API_KEY}/subgraphs/id/GPpZfiGoDChLsiWoMG5fxXdRNEYrsVDrKJ39moGcbz6i`,
8590
feeTokens: [
@@ -88,7 +93,7 @@ const prodConfig: Config[] = [
8893
address: AaveV3Arbitrum.ASSETS.GHO.UNDERLYING,
8994
symbol: 'GHO',
9095
decimals: 18,
91-
chainId: 42161,
96+
chainId: ChainId.arbitrum_one,
9297
logoURI:
9398
'https://assets.coingecko.com/coins/images/30663/standard/gho-token-logo.png?1720517092',
9499
oracle: AaveV3Arbitrum.ASSETS.GHO.ORACLE,
@@ -102,7 +107,31 @@ const prodConfig: Config[] = [
102107
symbol: 'ETH',
103108
decimals: 18,
104109
address: constants.AddressZero, // Use zero address for network token ccip
105-
chainId: 42161, // Arb
110+
chainId: ChainId.arbitrum_one,
111+
logoURI:
112+
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png',
113+
extensions: {
114+
isNative: true,
115+
},
116+
balance: '0',
117+
},
118+
],
119+
},
120+
{
121+
sourceChainId: ChainId.base,
122+
chainSelector: '15971525489660198786',
123+
burnMintTokenPool: GhoBase.GHO_CCIP_TOKEN_POOL,
124+
router: '0x881e3A65B4d4a04dD529061dd0071cf975F58bCD',
125+
tokenOracle: '0x42868EFcee13C0E71af89c04fF7d96f5bec479b0',
126+
wrappedNativeOracle: AaveV3Base.ASSETS.WETH.ORACLE,
127+
subgraphUrl: `https://gateway.thegraph.com/api/${process.env.NEXT_PUBLIC_SUBGRAPH_API_KEY}/subgraphs/id/7RqaLvSMWBv4Z3xmv4kb6Jq3t59ikYG3wpcsTnLgBWzt`,
128+
feeTokens: [
129+
{
130+
name: 'Ethereum',
131+
symbol: 'ETH',
132+
decimals: 18,
133+
address: constants.AddressZero, // Use zero address for network token ccip
134+
chainId: ChainId.base,
106135
logoURI:
107136
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png',
108137
extensions: {
@@ -191,6 +220,30 @@ const testnetConfig: Config[] = [
191220
},
192221
],
193222
},
223+
{
224+
sourceChainId: ChainId.base_sepolia,
225+
burnMintTokenPool: '0x2a33945f942913b730aB36A24150A96c3D0CC9E9',
226+
chainSelector: '10344971235874465080',
227+
router: '0xD3b06cEbF099CE7DA4AcCf578aaebFDBd6e88a93',
228+
tokenOracle: '0xFD5ea2e57CDC98D371D8eA899d1F2C24bfFb39BD',
229+
wrappedNativeOracle: AaveV3BaseSepolia.ASSETS.WETH.ORACLE,
230+
subgraphUrl: `https://gateway.thegraph.com/api/${process.env.NEXT_PUBLIC_SUBGRAPH_API_KEY}/subgraphs/id/8bpqvL6XBCVhN4heE9rdEwgTketeZ2U5vVGEh5fDoUEH`,
231+
feeTokens: [
232+
{
233+
name: 'Ethereum',
234+
symbol: 'ETH',
235+
decimals: 18,
236+
address: constants.AddressZero,
237+
chainId: ChainId.base_sepolia,
238+
logoURI:
239+
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png',
240+
extensions: {
241+
isNative: true,
242+
},
243+
balance: '0',
244+
},
245+
],
246+
},
194247
];
195248

196249
export const laneConfig = ENABLE_TESTNET ? testnetConfig : prodConfig;

src/services/WalletBalanceService.ts

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export class WalletBalanceService {
9090
marketData.chainId,
9191
marketData.addresses.WALLET_BALANCE_PROVIDER
9292
);
93+
9394
const balances = await walletBalanceService.batchBalanceOf(
9495
[user],
9596
[marketData.addresses.GHO_TOKEN_ADDRESS?.toLowerCase() as string] // GHO UNDERLYING

src/ui-config/TokenList.ts

+9
Original file line numberDiff line numberDiff line change
@@ -12723,6 +12723,15 @@ export const TOKEN_LIST: TokenList = {
1272312723
logoURI:
1272412724
'https://assets.coingecko.com/coins/images/30663/standard/gho-token-logo.png?1720517092',
1272512725
},
12726+
{
12727+
name: 'Gho Token',
12728+
address: '0x6bb7a212910682dcfdbd5bcbb3e28fb4e8da10ee',
12729+
symbol: 'GHO',
12730+
decimals: 18,
12731+
chainId: 8453,
12732+
logoURI:
12733+
'https://assets.coingecko.com/coins/images/30663/standard/gho-token-logo.png?1720517092',
12734+
},
1272612735
{
1272712736
name: 'stk GHO',
1272812737
address: '0x1a88Df1cFe15Af22B3c4c783D4e6F7F9e0C1885d',

src/ui-config/marketsConfig.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ export const marketsData: {
350350
SWAP_COLLATERAL_ADAPTER: AaveV3Base.SWAP_COLLATERAL_ADAPTER,
351351
WITHDRAW_SWITCH_ADAPTER: AaveV3Base.WITHDRAW_SWAP_ADAPTER,
352352
DEBT_SWITCH_ADAPTER: AaveV3Base.DEBT_SWAP_ADAPTER,
353+
GHO_TOKEN_ADDRESS: '0x6bb7a212910682dcfdbd5bcbb3e28fb4e8da10ee',
353354
},
354355
},
355356
[CustomMarket.proto_arbitrum_sepolia_v3]: {

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1066,10 +1066,10 @@
10661066
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
10671067
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
10681068

1069-
"@bgd-labs/aave-address-book@4.8.1":
1070-
version "4.8.1"
1071-
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-4.8.1.tgz#3c8b97c24770df3e3e965e58932b7f0a40e3b706"
1072-
integrity sha512-t0Qz6lycoxVgoa9Jhx3t80CpZfQJD9yIH1tY22eGeN0Li2nFG9Y+XX3i3UQrzqZH613RymtyLHS4WXqVpZu4LA==
1069+
"@bgd-labs/aave-address-book@4.10.0":
1070+
version "4.10.0"
1071+
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-4.10.0.tgz#3df9b6afda47d779f39b78aa48c4f0982a18c6e1"
1072+
integrity sha512-+WtMRtXLFpic/PLhNn32FIFzNFIgqlgC5Z9RLOsPgbdkvDDAW83w1emoxqxbW0jYGGNcYJUTTrtXqlhDeQGwkg==
10731073

10741074
"@coinbase/[email protected]":
10751075
version "4.2.3"

0 commit comments

Comments
 (0)