Skip to content

Commit 3c95c66

Browse files
authored
feat: gho gnosis ccip (#2566)
1 parent 58963bc commit 3c95c66

5 files changed

Lines changed: 32 additions & 19 deletions

File tree

src/components/transactions/Bridge/BridgeConfig.ts

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
AaveV3Base,
77
AaveV3BaseSepolia,
88
AaveV3Ethereum,
9+
AaveV3Gnosis,
910
AaveV3Sepolia,
1011
GhoArbitrum,
1112
GhoBase,
@@ -57,8 +58,6 @@ const prodConfig: Config[] = [
5758
symbol: 'GHO',
5859
decimals: 18,
5960
chainId: ChainId.mainnet,
60-
logoURI:
61-
'https://assets.coingecko.com/coins/images/30663/standard/gho-token-logo.png?1720517092',
6261
oracle: AaveV3Ethereum.ASSETS.GHO.ORACLE,
6362
extensions: {
6463
isNative: false,
@@ -71,8 +70,6 @@ const prodConfig: Config[] = [
7170
decimals: 18,
7271
address: constants.AddressZero, // Use zero address for network token ccip
7372
chainId: ChainId.mainnet,
74-
logoURI:
75-
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png',
7673
extensions: {
7774
isNative: true,
7875
},
@@ -95,8 +92,6 @@ const prodConfig: Config[] = [
9592
symbol: 'GHO',
9693
decimals: 18,
9794
chainId: ChainId.arbitrum_one,
98-
logoURI:
99-
'https://assets.coingecko.com/coins/images/30663/standard/gho-token-logo.png?1720517092',
10095
oracle: AaveV3Arbitrum.ASSETS.GHO.ORACLE,
10196
extensions: {
10297
isNative: false,
@@ -109,8 +104,6 @@ const prodConfig: Config[] = [
109104
decimals: 18,
110105
address: constants.AddressZero, // Use zero address for network token ccip
111106
chainId: ChainId.arbitrum_one,
112-
logoURI:
113-
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png',
114107
extensions: {
115108
isNative: true,
116109
},
@@ -133,8 +126,6 @@ const prodConfig: Config[] = [
133126
symbol: 'GHO',
134127
decimals: 18,
135128
chainId: ChainId.base,
136-
logoURI:
137-
'https://assets.coingecko.com/coins/images/30663/standard/gho-token-logo.png?1720517092',
138129
oracle: AaveV3Base.ASSETS.GHO.ORACLE,
139130
extensions: {
140131
isNative: false,
@@ -147,8 +138,6 @@ const prodConfig: Config[] = [
147138
decimals: 18,
148139
address: constants.AddressZero, // Use zero address for network token ccip
149140
chainId: ChainId.base,
150-
logoURI:
151-
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png',
152141
extensions: {
153142
isNative: true,
154143
},
@@ -171,8 +160,28 @@ const prodConfig: Config[] = [
171160
decimals: 18,
172161
address: constants.AddressZero, // Use zero address for network token ccip
173162
chainId: ChainId.avalanche,
174-
logoURI:
175-
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png',
163+
extensions: {
164+
isNative: true,
165+
},
166+
balance: '0',
167+
},
168+
],
169+
},
170+
{
171+
sourceChainId: ChainId.xdai,
172+
chainSelector: '465200170687744372',
173+
burnMintTokenPool: '0xDe6539018B095353A40753Dc54C91C68c9487D4E',
174+
router: '0x4aAD6071085df840abD9Baf1697d5D5992bDadce',
175+
tokenOracle: '0x360d8aa8F6b09B7BC57aF34db2Eb84dD87bf4d12',
176+
wrappedNativeOracle: AaveV3Gnosis.ASSETS.WXDAI.ORACLE,
177+
subgraphUrl: `https://gateway.thegraph.com/api/${process.env.NEXT_PUBLIC_SUBGRAPH_API_KEY}/subgraphs/id/CFjU1G9iUtFDqEBTzSePRiPjghjUzQeFX5C67DGSK2Ao`,
178+
feeTokens: [
179+
{
180+
name: 'XDAI',
181+
symbol: 'XDAI',
182+
decimals: 18,
183+
address: constants.AddressZero, // Use zero address for network token ccip
184+
chainId: ChainId.xdai,
176185
extensions: {
177186
isNative: true,
178187
},

src/components/transactions/Bridge/BridgeFeeTokenSelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export const BridgeFeeTokenSelector = ({
111111
}}
112112
>
113113
<Box display="flex" alignItems={'center'}>
114-
<TokenIcon sx={{ fontSize: '1em', paddingRight: '4px' }} symbol={token.symbol} />
114+
<TokenIcon sx={{ fontSize: '1em', mr: 1 }} symbol={token.symbol} />
115115
{token.symbol}
116116
</Box>
117117
</MenuItem>

src/modules/umbrella/UnstakeModalContent.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ChainId } from '@aave/contract-helpers';
2+
import { normalizeBN } from '@aave/math-utils';
23
import { Trans } from '@lingui/macro';
34
import { Skeleton, Stack, Typography } from '@mui/material';
45
import { BigNumber } from 'bignumber.js';
@@ -28,7 +29,6 @@ import { useShallow } from 'zustand/shallow';
2829

2930
import { usePreviewRedeem } from './hooks/usePreviewRedeem';
3031
import { UnStakeActions } from './UnstakeModalActions';
31-
import { normalizeBN } from '@aave/math-utils';
3232

3333
export enum RedeemType {
3434
NORMAL,
@@ -67,7 +67,10 @@ export const UnStakeModalContent = ({
6767
stakeData?.cooldownData.cooldownAmount || '0'
6868
);
6969

70-
const redeemableAmount = normalizeBN(redeemableAmountBN.toString(), stakeData.decimals).toString();
70+
const redeemableAmount = normalizeBN(
71+
redeemableAmountBN.toString(),
72+
stakeData.decimals
73+
).toString();
7174

7275
const isMaxSelected = amount === '-1';
7376
const amountToRedeem = isMaxSelected ? redeemableAmount : amount;

src/ui-config/marketsConfig.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ export const marketsData: {
627627
COLLECTOR: AaveV3Gnosis.COLLECTOR,
628628
DEBT_SWITCH_ADAPTER: AaveV3Gnosis.DEBT_SWAP_ADAPTER,
629629
WITHDRAW_SWITCH_ADAPTER: AaveV3Gnosis.WITHDRAW_SWAP_ADAPTER,
630+
GHO_TOKEN_ADDRESS: '0xfc421ad3c883bf9e7c4f42de845c4e4405799e73',
630631
},
631632
},
632633
[CustomMarket.proto_bnb_v3]: {

src/ui-config/networksConfig.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ export const prodNetworkConfig: Record<string, BaseNetworkConfig> = {
260260
[ChainId.base]: {
261261
name: 'Base',
262262
publicJsonRPCUrl: [
263-
'https://mainnet.base.org',
263+
'https://base.llamarpc.com',
264264
'https://1rpc.io/base',
265265
'https://base.publicnode.com',
266266
'https://base-mainnet.public.blastapi.io',
@@ -309,7 +309,7 @@ export const prodNetworkConfig: Record<string, BaseNetworkConfig> = {
309309
},
310310
[ChainId.xdai]: {
311311
name: 'Gnosis Chain',
312-
publicJsonRPCUrl: ['https://rpc.ankr.com/gnosis', 'https://rpc.gnosischain.com'],
312+
publicJsonRPCUrl: ['https://gnosis-rpc.publicnode.com', 'https://rpc.gnosischain.com'],
313313
baseUniswapAdapter: '0x0',
314314
baseAssetSymbol: 'xDAI',
315315
wrappedBaseAssetSymbol: 'WXDAI',

0 commit comments

Comments
 (0)