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

feat(chains): add Mantle and Mantle testnet #399

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading