-
Notifications
You must be signed in to change notification settings - Fork 559
feat: add berachain and berachain-bepolia chains #7343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"thirdweb": minor | ||
--- | ||
|
||
add berachain and berachain testnet in chains package |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { defineChain } from "../utils.js"; | ||
|
||
/** | ||
* @chain | ||
*/ | ||
export const berachainBepolia = /* @__PURE__ */ defineChain({ | ||
id: 80069, | ||
name: "Berachain Bepolia", | ||
nativeCurrency: { name: "BERA", symbol: "BERA", decimals: 18 }, | ||
blockExplorers: [ | ||
{ | ||
name: "beratrail", | ||
url: "https://bepolia.beratrail.io/", | ||
}, | ||
], | ||
testnet: true, | ||
}); | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { defineChain } from "../utils.js"; | ||
|
||
/** | ||
* @chain | ||
*/ | ||
export const berachain = /* @__PURE__ */ defineChain({ | ||
id: 80094, | ||
name: "Berachain", | ||
nativeCurrency: { name: "BERA", symbol: "BERA", decimals: 18 }, | ||
blockExplorers: [ | ||
{ | ||
name: "berascan", | ||
url: "https://berascan.com/", | ||
apiUrl: "https://api.berascan.com/api", | ||
}, | ||
], | ||
}); | ||
Comment on lines
+6
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add required rpcUrls: {
default: { http: ["https://rpc.berachain.com"] },
public: { http: ["https://rpc.berachain.com"] },
}, using the official RPC endpoints. 🤖 Prompt for AI Agents
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,3 +83,5 @@ export { soneiumMinato } from "../chains/chain-definitions/soneium-minato.js"; | |
export { treasure } from "../chains/chain-definitions/treasure.js"; | ||
export { treasureTopaz } from "../chains/chain-definitions/treasureTopaz.js"; | ||
export { monadTestnet } from "../chains/chain-definitions/monad-testnet.js"; | ||
export { berachain } from "../chains/chain-definitions/berachain.js"; | ||
export { berachainBepolia } from "../chains/chain-definitions/berachain-bepolia.js"; | ||
Comment on lines
+86
to
+87
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Group exports by network type 🤖 Prompt for AI Agents
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add required
rpcUrls
and ensure explorer consistencyrpcUrls
so that testnet clients can connect (e.g.,rpcUrls: { default: { http: ["https://rpc.bepolia.berachain.com"] } }
).apiUrl
to the block explorer entry.🤖 Prompt for AI Agents