diff --git a/.changeset/chatty-moose-yawn.md b/.changeset/chatty-moose-yawn.md new file mode 100644 index 00000000..11a45eac --- /dev/null +++ b/.changeset/chatty-moose-yawn.md @@ -0,0 +1,5 @@ +--- +"@wagmi/chains": minor +--- + +Added Mantle and Mantle Testnet chains diff --git a/packages/chains/README.md b/packages/chains/README.md index 04c6449f..a58cac94 100644 --- a/packages/chains/README.md +++ b/packages/chains/README.md @@ -60,6 +60,8 @@ const { chains, provider } = configureChains( - `iotexTestnet` - `localhost` - `mainnet` +- `mantle` +- `mantleTestnet` - `metis` - `metisGoerli` - `moonbaseAlpha` diff --git a/packages/chains/src/index.ts b/packages/chains/src/index.ts index 71521caf..98b192a8 100644 --- a/packages/chains/src/index.ts +++ b/packages/chains/src/index.ts @@ -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' diff --git a/packages/chains/src/mantle.ts b/packages/chains/src/mantle.ts new file mode 100644 index 00000000..198589fc --- /dev/null +++ b/packages/chains/src/mantle.ts @@ -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 diff --git a/packages/chains/src/mantleTestnet.ts b/packages/chains/src/mantleTestnet.ts new file mode 100644 index 00000000..cc8f14e0 --- /dev/null +++ b/packages/chains/src/mantleTestnet.ts @@ -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