Skip to content

Commit ee12c85

Browse files
feat: add support for monad (#90)
1 parent 9bdffc6 commit ee12c85

File tree

6 files changed

+25
-19
lines changed

6 files changed

+25
-19
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@
5959
<img alt="mantle" src="https://raw.githubusercontent.com/rainbow-me/assets/master/blockchains/mantle/info/logo.png" width="22"/>
6060
<br>Mantle
6161
</div>
62+
</td>
63+
<td style="width:100px; text-align:center;">
64+
<div align="center">
65+
<img alt="mantle" src="https://raw.githubusercontent.com/rainbow-me/assets/master/blockchains/monad/info/logo.png" width="22"/>
66+
<br>Monad
67+
</div>
6268
</td>
6369
<td style="width:100px; text-align:center;">
6470
<div align="center">

package-lock.json

Lines changed: 11 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"test": "vitest --coverage"
5353
},
5454
"peerDependencies": {
55-
"viem": "^2.37.7"
55+
"viem": "^2.39.3"
5656
},
5757
"devDependencies": {
5858
"@types/node": "^24.5.2",

src/constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
avalanche,
1616
berachain,
1717
worldchain,
18+
monad
1819
} from "viem/chains";
1920
import type { SupportedChainId } from "./types";
2021

@@ -65,6 +66,7 @@ export const SUPPORTED_CHAINS = [
6566
avalanche,
6667
berachain,
6768
worldchain,
69+
monad,
6870
];
6971

7072
export const NATIVE_SYMBOL_BY_CHAIN_ID: { [key in SupportedChainId]: string } =
@@ -76,6 +78,7 @@ export const NATIVE_SYMBOL_BY_CHAIN_ID: { [key in SupportedChainId]: string } =
7678
[linea.id]: linea.nativeCurrency.symbol,
7779
[scroll.id]: scroll.nativeCurrency.symbol,
7880
[mantle.id]: mantle.nativeCurrency.symbol,
81+
[monad.id]: monad.nativeCurrency.symbol,
7982
[plasma.id]: plasma.nativeCurrency.symbol,
8083
[mainnet.id]: mainnet.nativeCurrency.symbol,
8184
[polygon.id]: polygon.nativeCurrency.symbol,

src/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
worldchain,
1616
berachain,
1717
unichain,
18+
monad
1819
} from "viem/chains";
1920

2021
import type {
@@ -31,6 +32,7 @@ export type SupportedChainId =
3132
| typeof bsc.id
3233
| typeof base.id
3334
| typeof mode.id
35+
| typeof monad.id
3436
| typeof blast.id
3537
| typeof linea.id
3638
| typeof scroll.id

src/utils/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
avalanche,
1717
berachain,
1818
worldchain,
19+
monad
1920
} from "viem/chains";
2021
import { NATIVE_SYMBOL_BY_CHAIN_ID, NATIVE_TOKEN_ADDRESS } from "../constants";
2122
import type { Address } from "viem";
@@ -33,6 +34,7 @@ export function isChainIdSupported(
3334
bsc.id,
3435
base.id,
3536
mode.id,
37+
monad.id,
3638
blast.id,
3739
linea.id,
3840
scroll.id,

0 commit comments

Comments
 (0)