Skip to content

Commit 74376ba

Browse files
authored
fix: fix monad testnet bugs (#11353)
<!-- Before opening a pull request, please read the [contributing guidelines](https://github.com/pancakeswap/pancake-frontend/blob/develop/CONTRIBUTING.md) first --> <!-- start pr-codex --> --- ## PR-Codex overview This PR adds support for the `MONAD_TESTNET` chain by introducing new token definitions and updating existing configurations to include related tokens. ### Detailed summary - Added `MONAD_TESTNET` to `packages/widgets-internal/components/CurrencyLogo/utils.ts`. - Updated token addresses for `MONAD_TESTNET` in `packages/multicall/src/constants/contracts.ts`. - Changed token pairs for `MONAD_TESTNET` in `apps/web/src/config/constants/exchange.ts`. - Updated `USDC` token definition with a new address for `MONAD_TESTNET` in `packages/tokens/src/constants/common.ts`. - Added `USDT` token definition for `MONAD_TESTNET` in `packages/tokens/src/constants/common.ts`. - Included `usdt` and `wmon` in `monadTestnetTokens` in `packages/tokens/src/constants/monadTestnet.ts`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 8ebb007 commit 74376ba

File tree

5 files changed

+23
-4
lines changed

5 files changed

+23
-4
lines changed

apps/web/src/config/constants/exchange.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const SUGGESTED_BASES: ChainTokenList = {
8585
[ChainId.SEPOLIA]: [scrollSepoliaTokens.usdc, scrollSepoliaTokens.weth],
8686
[ChainId.ARBITRUM_SEPOLIA]: [arbSepoliaTokens.usdc, arbSepoliaTokens.weth],
8787
[ChainId.BASE_SEPOLIA]: [baseSepoliaTokens.usdc, baseSepoliaTokens.weth],
88-
[ChainId.MONAD_TESTNET]: [monadTestnetTokens.usdc, monadTestnetTokens.busd],
88+
[ChainId.MONAD_TESTNET]: [monadTestnetTokens.wmon, monadTestnetTokens.usdc, monadTestnetTokens.usdt],
8989
}
9090

9191
// used to construct the list of all pairs we consider by default in the frontend

packages/multicall/src/constants/contracts.ts

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const MULTICALL_ADDRESS: { [key in ChainId]?: Address } = {
2121
[ChainId.BASE_TESTNET]: '0x6F7f93D929d6FBaF16c245e42846EF21aee23437',
2222
[ChainId.OPBNB_TESTNET]: '0x6A70ED893D85cf6D4059e1CF3e63a48e4D204D32',
2323
[ChainId.SCROLL_SEPOLIA]: '0x052a99849Ef2e13a5CB28275862991671D4b6fF5',
24+
[ChainId.MONAD_TESTNET]: '0xF490DB8D37520bb41d45B79a1c5749A1FdA9f4Ea',
2425
}
2526

2627
export const MULTICALL3_ADDRESS = '0xcA11bde05977b3631167028862bE2a173976CA11'

packages/tokens/src/constants/common.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ export const USDC = {
367367
),
368368
[ChainId.MONAD_TESTNET]: new ERC20Token(
369369
ChainId.MONAD_TESTNET,
370-
'0x673cD70FA883394a1f3DEb3221937Ceb7C2618D7',
370+
'0xf817257fed379853cDe0fa4F97AB987181B1E5Ea',
371371
18,
372372
'USDC',
373373
'USD Coin',
@@ -442,6 +442,14 @@ export const USDT = {
442442
'Tether USDT',
443443
'https://tether.to/',
444444
),
445+
[ChainId.MONAD_TESTNET]: new ERC20Token(
446+
ChainId.MONAD_TESTNET,
447+
'0x88b8E2161DEDC77EF4ab7585569D2415a1C1055D',
448+
18,
449+
'USDT',
450+
'Tether USD',
451+
'https://tether.to/',
452+
),
445453
}
446454

447455
export const DAI = {
+11-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
import { ChainId } from '@pancakeswap/chains'
2-
import { WETH9 } from '@pancakeswap/sdk'
3-
import { BUSD, USDC } from './common'
2+
import { ERC20Token, WETH9 } from '@pancakeswap/sdk'
3+
import { BUSD, USDC, USDT } from './common'
44

55
export const monadTestnetTokens = {
66
weth: WETH9[ChainId.MONAD_TESTNET],
77
busd: BUSD[ChainId.MONAD_TESTNET],
88
usdc: USDC[ChainId.MONAD_TESTNET],
9+
usdt: USDT[ChainId.MONAD_TESTNET],
10+
wmon: new ERC20Token(
11+
ChainId.MONAD_TESTNET,
12+
'0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701',
13+
18,
14+
'WMON',
15+
'Wrapped Monad',
16+
'https://www.monad.xyz/',
17+
),
918
}

packages/widgets-internal/components/CurrencyLogo/utils.ts

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export const chainName: { [key: number]: string } = {
4949
[ChainId.LINEA]: "linea",
5050
[ChainId.BASE]: "base",
5151
[ChainId.OPBNB]: "opbnb",
52+
[ChainId.MONAD_TESTNET]: "monad-testnet",
5253
};
5354

5455
// TODO: move to utils or token-list

0 commit comments

Comments
 (0)