Skip to content

Commit 787118d

Browse files
committed
feat: add berachain and berachain-bepolia chains (#7343)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR introduces the `berachain` and `berachainBepolia` blockchain definitions to the `thirdweb` package, enhancing its chain support. It also updates the `chains` export file to include these new chains. ### Detailed summary - Added `berachain` and `berachainBepolia` definitions in their respective files. - Updated `packages/thirdweb/src/exports/chains.ts` to export `berachain` and `berachainBepolia`. - Defined `berachain` with an ID of 80094 and a native currency of `BERA`. - Defined `berachainBepolia` with an ID of 80069, marked as a testnet. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for the Berachain mainnet and Berachain Bepolia testnet networks, including native currency details and integrated block explorers for enhanced network visibility. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 70e024f commit 787118d

File tree

4 files changed

+41
-0
lines changed

4 files changed

+41
-0
lines changed

.changeset/spicy-cooks-smoke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": minor
3+
---
4+
5+
add berachain and berachain testnet in chains package
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { defineChain } from "../utils.js";
2+
3+
/**
4+
* @chain
5+
*/
6+
export const berachainBepolia = /* @__PURE__ */ defineChain({
7+
id: 80069,
8+
name: "Berachain Bepolia",
9+
nativeCurrency: { name: "BERA", symbol: "BERA", decimals: 18 },
10+
blockExplorers: [
11+
{
12+
name: "beratrail",
13+
url: "https://bepolia.beratrail.io/",
14+
},
15+
],
16+
testnet: true,
17+
});
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { defineChain } from "../utils.js";
2+
3+
/**
4+
* @chain
5+
*/
6+
export const berachain = /* @__PURE__ */ defineChain({
7+
id: 80094,
8+
name: "Berachain",
9+
nativeCurrency: { name: "BERA", symbol: "BERA", decimals: 18 },
10+
blockExplorers: [
11+
{
12+
name: "berascan",
13+
url: "https://berascan.com/",
14+
apiUrl: "https://api.berascan.com/api",
15+
},
16+
],
17+
});

packages/thirdweb/src/exports/chains.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,5 @@ export { soneiumMinato } from "../chains/chain-definitions/soneium-minato.js";
8383
export { treasure } from "../chains/chain-definitions/treasure.js";
8484
export { treasureTopaz } from "../chains/chain-definitions/treasureTopaz.js";
8585
export { monadTestnet } from "../chains/chain-definitions/monad-testnet.js";
86+
export { berachain } from "../chains/chain-definitions/berachain.js";
87+
export { berachainBepolia } from "../chains/chain-definitions/berachain-bepolia.js";

0 commit comments

Comments
 (0)