Skip to content

Commit 61f705b

Browse files
committed
chore: add in x layer and mantle networks
1 parent d725715 commit 61f705b

File tree

7 files changed

+39
-5
lines changed

7 files changed

+39
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"test:coverage": "jest --coverage"
3232
},
3333
"dependencies": {
34-
"@aave/contract-helpers": "1.36.1",
34+
"@aave/contract-helpers": "1.36.4-1c7d92ba9411792e35b0c4289a0bba27ddf86e1f.6",
3535
"@aave/graphql": "^0.10.0",
3636
"@aave/math-utils": "1.36.1",
3737
"@aave/react": "^0.8.1",

pages/api/rpc-proxy.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ const NETWORK_CONFIG: Record<number, { network: string; apiKey: string }> = {
4747
};
4848

4949
function getRpcUrl(chainId: number): string | null {
50+
// Temp patch for Mantle and X Layer
51+
if (chainId === ChainId.mantle) {
52+
return 'https://mantle-rpc.publicnode.com';
53+
}
54+
if (chainId === ChainId.xlayer) {
55+
return 'https://xlayer.drpc.org';
56+
}
57+
5058
const config = NETWORK_CONFIG[chainId];
5159
if (!config) return null;
5260
return `https://${config.network}.g.alchemy.com/v2/${config.apiKey}`;

public/icons/networks/mantle.svg

Lines changed: 1 addition & 0 deletions
Loading

public/icons/networks/xlayer.svg

Lines changed: 1 addition & 0 deletions
Loading

src/ui-config/governanceConfig.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
GovernanceV3Gnosis,
1212
GovernanceV3Ink,
1313
GovernanceV3Linea,
14+
GovernanceV3Mantle,
1415
GovernanceV3Metis,
1516
GovernanceV3Optimism,
1617
GovernanceV3Plasma,
@@ -146,6 +147,7 @@ export const governanceChainConfig: GovernanceChainConfig = {
146147
[ChainId.soneium]: GovernanceV3Soneium.PC_DATA_HELPER,
147148
[9745]: GovernanceV3Plasma.PC_DATA_HELPER,
148149
[57073]: GovernanceV3Ink.PC_DATA_HELPER,
150+
[ChainId.mantle]: GovernanceV3Mantle.PC_DATA_HELPER,
149151
},
150152
votingAssets: {
151153
aaveTokenAddress: AaveV3Ethereum.ASSETS.AAVE.UNDERLYING,

src/ui-config/networksConfig.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
ink,
1414
linea,
1515
mainnet,
16+
mantle,
1617
metis,
1718
optimism,
1819
optimismSepolia,
@@ -23,6 +24,7 @@ import {
2324
sepolia,
2425
soneium,
2526
sonic,
27+
xLayer,
2628
zksync,
2729
} from 'wagmi/chains';
2830

@@ -456,6 +458,26 @@ export const prodNetworkConfig: Record<string, BaseNetworkConfig> = {
456458
networkLogoPath: '/icons/networks/ink.svg',
457459
wagmiChain: ink,
458460
},
461+
[ChainId.mantle]: {
462+
name: 'Mantle',
463+
publicJsonRPCUrl: ['https://mantle-rpc.publicnode.com'],
464+
baseAssetSymbol: 'MNT',
465+
wrappedBaseAssetSymbol: 'WMNT',
466+
baseAssetDecimals: 18,
467+
explorerLink: 'https://mantlescan.xyz/',
468+
networkLogoPath: '/icons/networks/mantle.svg',
469+
wagmiChain: mantle,
470+
},
471+
[ChainId.xlayer]: {
472+
name: 'X Layer',
473+
publicJsonRPCUrl: ['https://xlayer.drpc.org'],
474+
baseAssetSymbol: 'OKB',
475+
wrappedBaseAssetSymbol: 'WOKB',
476+
baseAssetDecimals: 18,
477+
explorerLink: 'https://web3.okx.com/explorer/x-layer',
478+
networkLogoPath: '/icons/networks/xlayer.svg',
479+
wagmiChain: xLayer,
480+
},
459481
};
460482

461483
export const networkConfigs = {

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
"@urql/core" "^5.2.0"
2727
graphql "^16.11.0"
2828

29-
30-
version "1.36.1"
31-
resolved "https://registry.yarnpkg.com/@aave/contract-helpers/-/contract-helpers-1.36.1.tgz#729735e6be4f8a1872e1e3400591485fc2198b76"
32-
integrity sha512-Ppoz11WRA3bjkZqnRA0a/txjfb67fVWh+ucgtN/RR45WI9oDsEmtYsqAwiNR3egvigSeyJASFeei0ijGGoFifw==
29+
"@aave/[email protected].4-1c7d92ba9411792e35b0c4289a0bba27ddf86e1f.6":
30+
version "1.36.4-1c7d92ba9411792e35b0c4289a0bba27ddf86e1f.6"
31+
resolved "https://registry.yarnpkg.com/@aave/contract-helpers/-/contract-helpers-1.36.4-1c7d92ba9411792e35b0c4289a0bba27ddf86e1f.6.tgz#630904ade5c47ff4c65f8be023dbb0e3047bcc02"
32+
integrity sha512-ePflK4Ims0e77uYJIZsZpaq58ytMdym2CMomhDJqtt7JCwrqiTNHO98kGDeiEWMuCUIbxi5OWujQwIIaarl6QA==
3333
dependencies:
3434
isomorphic-unfetch "^3.1.0"
3535

0 commit comments

Comments
 (0)