Skip to content

Commit 5ec9e17

Browse files
committed
add viem client for berachain
1 parent 41b6209 commit 5ec9e17

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/common/utils/viemClients.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,27 @@ export const bartio = defineChain({
3232
},
3333
})
3434

35+
export const berachain = defineChain({
36+
id: 80094,
37+
name: "Berachain",
38+
nativeCurrency: {
39+
decimals: 18,
40+
name: "Bera",
41+
symbol: "BERA",
42+
},
43+
blockExplorers: {
44+
default: {
45+
name: "berascan",
46+
url: "https://berascan.com/",
47+
},
48+
},
49+
rpcUrls: {
50+
default: {
51+
http: ["https://rpc.berachain.com"],
52+
},
53+
},
54+
})
55+
3556
const sonicnetwork = defineChain({
3657
id: 146,
3758
name: "Sonic",
@@ -63,7 +84,7 @@ export const RPC_URLS: Record<number, string> = {
6384
[chains.arbitrum.id]: process.env.RPC_URL_42161 || "",
6485
[chains.base.id]: process.env.RPC_URL_8453 || "",
6586
[bartio.id]: process.env.RPC_URL_80084 || "",
66-
[80094]: process.env.RPC_URL_80094 || "",
87+
[berachain.id]: process.env.RPC_URL_80094 || "",
6788
[146]: process.env.RPC_URL_146 || "",
6889
[chains.foundry.id]: process.env.RPC_URL_31337 || "http://localhost:8545",
6990
} as const
@@ -97,6 +118,7 @@ export const createClients = (): Record<number, Client<Transport, Chain>> => ({
97118
chain: sonicnetwork,
98119
transport: http(RPC_URLS[sonicnetwork.id]),
99120
}),
121+
[berachain.id]: createChainConfig(berachain),
100122
})
101123

102124
export const viemClients = createClients()

0 commit comments

Comments
 (0)