Skip to content

Commit

Permalink
feat: add mantle and mantleTestnet chain support (#2049)
Browse files Browse the repository at this point in the history
* feat: add mantle support

* chore: changeset & examples

* chore: tweak changeset

---------

Co-authored-by: Daniel Sinclair <d@niel.nyc>
  • Loading branch information
chloe-tan and DanielSinclair authored Jun 13, 2024
1 parent b096405 commit 23e33b9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/poor-keys-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rainbow-me/rainbowkit": patch
---

Added `mantle` and `mantleTestnet` network support
4 changes: 4 additions & 0 deletions packages/example/src/wagmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ import {
klaytn,
klaytnBaobab,
mainnet,
mantle,
mantleTestnet,
optimism,
optimismSepolia,
polygon,
Expand Down Expand Up @@ -139,6 +141,7 @@ export const config = getDefaultConfig({
ronin,
klaytn,
sei,
mantle,
...(process.env.NEXT_PUBLIC_ENABLE_TESTNETS === 'true'
? [
sepolia,
Expand All @@ -152,6 +155,7 @@ export const config = getDefaultConfig({
avalancheFuji,
zetachainAthensTestnet,
klaytnBaobab,
mantleTestnet,
]
: []),
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ type ChainName =
| 'manta'
| 'mantaSepolia'
| 'mantaTestnet'
| 'mantle'
| 'mantleTestnet'
| 'optimism'
| 'optimismKovan'
| 'optimismGoerli'
Expand Down Expand Up @@ -114,6 +116,11 @@ const mantaIcon: IconMetadata = {
iconUrl: async () => (await import('./chainIcons/manta.svg')).default,
};

const mantleIcon: IconMetadata = {
iconBackground: '#000000',
iconUrl: async () => (await import('./chainIcons/mantle.svg')).default,
};

const polygonIcon: IconMetadata = {
iconBackground: '#9f71ec',
iconUrl: async () => (await import('./chainIcons/polygon.svg')).default,
Expand Down Expand Up @@ -170,6 +177,8 @@ const chainMetadataByName: Record<ChainName, ChainMetadata | null> = {
manta: { chainId: 169, name: 'Manta', ...mantaIcon },
mantaSepolia: { chainId: 3_441_006, ...mantaIcon },
mantaTestnet: { chainId: 3_441_005, ...mantaIcon },
mantle: { chainId: 5000, ...mantleIcon },
mantleTestnet: { chainId: 5001, ...mantleIcon },
optimism: { chainId: 10, name: 'Optimism', ...optimismIcon },
optimismGoerli: { chainId: 420, ...optimismIcon },
optimismKovan: { chainId: 69, ...optimismIcon },
Expand Down

0 comments on commit 23e33b9

Please sign in to comment.