Skip to content

Commit

Permalink
feat: gnosis market [skip cypress] (#1826)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Grothe <grothem@gmail.com>
  • Loading branch information
foodaka and grothem authored Nov 7, 2023
1 parent ae028e6 commit 2e27036
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"dependencies": {
"@aave/contract-helpers": "1.21.0",
"@aave/math-utils": "^1.21.0",
"@bgd-labs/aave-address-book": "^2.7.0",
"@bgd-labs/aave-address-book": "^2.10.0",
"@emotion/cache": "11.10.3",
"@emotion/react": "11.10.4",
"@emotion/server": "latest",
Expand Down
1 change: 1 addition & 0 deletions public/icons/networks/gnosis.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/tokens/eure.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/tokens/gno.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/tokens/gnosissdai.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/tokens/wxdai.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/tokens/xdai.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 17 additions & 1 deletion src/ui-config/marketsConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
AaveV3Fantom,
AaveV3FantomTestnet,
AaveV3Fuji,
AaveV3Gnosis,
AaveV3Harmony,
AaveV3Metis,
AaveV3Mumbai,
Expand Down Expand Up @@ -78,7 +79,6 @@ export type MarketDataType = {
marketName: string;
};
};

export enum CustomMarket {
// v3 test networks, all v3.0.1
proto_arbitrum_goerli_v3 = 'proto_arbitrum_goerli_v3',
Expand All @@ -98,6 +98,7 @@ export enum CustomMarket {
proto_arbitrum_v3 = 'proto_arbitrum_v3',
proto_metis_v3 = 'proto_metis_v3',
proto_base_v3 = 'proto_base_v3',
proto_gnosis_v3 = 'proto_gnosis_v3',
// v2
proto_mainnet = 'proto_mainnet',
proto_avalanche = 'proto_avalanche',
Expand Down Expand Up @@ -679,4 +680,19 @@ export const marketsData: {
marketName: 'polygon',
},
},
[CustomMarket.proto_gnosis_v3]: {
marketTitle: 'Gnosis',
chainId: ChainId.xdai,
v3: true,
// subgraphUrl: '',
addresses: {
LENDING_POOL_ADDRESS_PROVIDER: AaveV3Gnosis.POOL_ADDRESSES_PROVIDER,
LENDING_POOL: AaveV3Gnosis.POOL,
WETH_GATEWAY: AaveV3Gnosis.WETH_GATEWAY,
WALLET_BALANCE_PROVIDER: AaveV3Gnosis.WALLET_BALANCE_PROVIDER,
UI_POOL_DATA_PROVIDER: AaveV3Gnosis.UI_POOL_DATA_PROVIDER,
UI_INCENTIVE_DATA_PROVIDER: AaveV3Gnosis.UI_INCENTIVE_DATA_PROVIDER,
COLLECTOR: AaveV3Gnosis.COLLECTOR,
},
},
} as const;
21 changes: 21 additions & 0 deletions src/ui-config/networksConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,4 +413,25 @@ export const networkConfigs: Record<string, BaseNetworkConfig> = {
explorerLink: 'https://andromeda-explorer.metis.io',
networkLogoPath: '/icons/networks/metis.svg',
},

[ChainId.xdai]: {
name: 'Gnosis Chain',
privateJsonRPCUrl:
'https://gnosischain-mainnet.gateway.pokt.network/v1/lb/62b3314e123e6f00397f19ca',

publicJsonRPCUrl: ['https://rpc.ankr.com/gnosis', 'https://rpc.gnosischain.com'],
publicJsonRPCWSUrl: 'wss://rpc.gnosischain.com/wss',
baseUniswapAdapter: '0x0',
baseAssetSymbol: 'xDAI',
wrappedBaseAssetSymbol: 'WXDAI',
baseAssetDecimals: 18,
explorerLink: 'https://gnosisscan.io',
isTestnet: false,
networkLogoPath: '/icons/networks/gnosis.svg',
bridge: {
icon: '/icons/networks/gnosis.svg',
name: 'xDai Bridge',
url: 'https://bridge.gnosischain.com/',
},
},
} as const;
5 changes: 5 additions & 0 deletions src/ui-config/reservePatches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ export function fetchIconSymbolAndName({ underlyingAsset, symbol, name }: IconSy
symbol: 'USDC.e',
iconSymbol: 'USDC',
},
'0xaf204776c7245bf4147c2612bf6e5972ee483701': {
name: 'Savings xDAI',
symbol: 'sDAI',
iconSymbol: 'gnosissdai',
},
'0xa693B19d2931d498c5B318dF961919BB4aee87a5': { iconSymbol: 'UST', name: 'UST (Wormhole)' },
'0x59a19d8c652fa0284f44113d0ff9aba70bd46fb4': { iconSymbol: 'BPT_BAL_WETH' },
'0x1eff8af5d577060ba4ac8a29a13525bb0ee2a3d5': { iconSymbol: 'BPT_WBTC_WETH' },
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1328,10 +1328,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@bgd-labs/aave-address-book@^2.7.0":
version "2.7.0"
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-2.7.0.tgz#ae26abb1a340fe795b9a2febd87f842c2ed06a99"
integrity sha512-TYErogNQIecHnnr7NXxGSnr1d/QuXNP9o5L8wRzx0+GIJiCi7Dmy9dlJxQO/nEky/Nq512l09xYKjRVnTz37Tg==
"@bgd-labs/aave-address-book@^2.10.0":
version "2.10.0"
resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-2.10.0.tgz#19873ec0edf9ee1f1a5539162e6092b0a2b2c4b4"
integrity sha512-DVglkDCYUf7etb6mnCziIY2HPgap4X3AnC/1tC0ZqpXFrhO0lQzWBiMeWy20r1x/b81iHMQa02ULaco3LhdeVw==

"@coinbase/wallet-sdk@3.1.0", "@coinbase/wallet-sdk@^3.0.4":
version "3.1.0"
Expand Down

2 comments on commit 2e27036

@github-actions
Copy link

Choose a reason for hiding this comment

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

This commit was deployed on ipfs

@github-actions
Copy link

Choose a reason for hiding this comment

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

This commit was deployed on ipfs

Please sign in to comment.