diff --git a/.changeset/poor-keys-joke.md b/.changeset/poor-keys-joke.md new file mode 100644 index 0000000000..de35e1ad5a --- /dev/null +++ b/.changeset/poor-keys-joke.md @@ -0,0 +1,5 @@ +--- +"@rainbow-me/rainbowkit": patch +--- + +Added `mantle` and `mantleTestnet` network support diff --git a/packages/example/src/wagmi.ts b/packages/example/src/wagmi.ts index bf7b7b7d6b..a191731f53 100644 --- a/packages/example/src/wagmi.ts +++ b/packages/example/src/wagmi.ts @@ -65,6 +65,8 @@ import { klaytn, klaytnBaobab, mainnet, + mantle, + mantleTestnet, optimism, optimismSepolia, polygon, @@ -139,6 +141,7 @@ export const config = getDefaultConfig({ ronin, klaytn, sei, + mantle, ...(process.env.NEXT_PUBLIC_ENABLE_TESTNETS === 'true' ? [ sepolia, @@ -152,6 +155,7 @@ export const config = getDefaultConfig({ avalancheFuji, zetachainAthensTestnet, klaytnBaobab, + mantleTestnet, ] : []), ], diff --git a/packages/rainbowkit/src/components/RainbowKitProvider/chainIcons/mantle.svg b/packages/rainbowkit/src/components/RainbowKitProvider/chainIcons/mantle.svg new file mode 100644 index 0000000000..e13d25fc2c --- /dev/null +++ b/packages/rainbowkit/src/components/RainbowKitProvider/chainIcons/mantle.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/rainbowkit/src/components/RainbowKitProvider/provideRainbowKitChains.ts b/packages/rainbowkit/src/components/RainbowKitProvider/provideRainbowKitChains.ts index a035b9eeca..3cc6e003d5 100644 --- a/packages/rainbowkit/src/components/RainbowKitProvider/provideRainbowKitChains.ts +++ b/packages/rainbowkit/src/components/RainbowKitProvider/provideRainbowKitChains.ts @@ -29,6 +29,8 @@ type ChainName = | 'manta' | 'mantaSepolia' | 'mantaTestnet' + | 'mantle' + | 'mantleTestnet' | 'optimism' | 'optimismKovan' | 'optimismGoerli' @@ -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, @@ -170,6 +177,8 @@ const chainMetadataByName: Record = { 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 },