Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
feat: add Mantle and Mantle testnet (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
noskodmi authored Jul 6, 2023
1 parent 4646dd0 commit 4b411d2
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/chatty-moose-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wagmi/chains": minor
---

Added Mantle and Mantle Testnet chains
2 changes: 2 additions & 0 deletions packages/chains/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ const { chains, provider } = configureChains(
- `iotexTestnet`
- `localhost`
- `mainnet`
- `mantle`
- `mantleTestnet`
- `metis`
- `metisGoerli`
- `moonbaseAlpha`
Expand Down
2 changes: 2 additions & 0 deletions packages/chains/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export { klaytn } from './klaytn'
export { lineaTestnet } from './lineaTestnet'
export { localhost } from './localhost'
export { mainnet } from './mainnet'
export { mantle } from './mantle'
export { mantleTestnet } from './mantleTestnet'
export { metis } from './metis'
export { metisGoerli } from './metisGoerli'
export { moonbaseAlpha } from './moonbaseAlpha'
Expand Down
26 changes: 26 additions & 0 deletions packages/chains/src/mantle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Chain } from './types'

export const mantle = {
id: 5000,
name: 'Mantle',
network: 'mantle',
nativeCurrency: {
decimals: 18,
name: 'MNT',
symbol: 'MNT',
},
rpcUrls: {
default: { http: ['https://rpc.mantle.xyz'] },
public: { http: ['https://rpc.mantle.xyz'] },
},
blockExplorers: {
etherscan: {
name: 'Mantle Testnet Explorer',
url: 'https://explorer.mantle.xyz',
},
default: {
name: 'Mantle Testnet Explorer',
url: 'https://explorer.mantle.xyz',
},
},
} as const satisfies Chain
27 changes: 27 additions & 0 deletions packages/chains/src/mantleTestnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Chain } from './types'

export const mantleTestnet = {
id: 5001,
name: 'Mantle Testnet',
network: 'mantle',
nativeCurrency: {
decimals: 18,
name: 'MNT',
symbol: 'MNT',
},
rpcUrls: {
default: { http: ['https://rpc.testnet.mantle.xyz'] },
public: { http: ['https://rpc.testnet.mantle.xyz'] },
},
blockExplorers: {
etherscan: {
name: 'Mantle Testnet Explorer',
url: 'https://explorer.testnet.mantle.xyz',
},
default: {
name: 'Mantle Testnet Explorer',
url: 'https://explorer.testnet.mantle.xyz',
},
},
testnet: true,
} as const satisfies Chain

0 comments on commit 4b411d2

Please sign in to comment.