From b6d65cf1c42a6c6707489e2d3ab3510f137c1b35 Mon Sep 17 00:00:00 2001 From: gregfromstl Date: Fri, 17 Jan 2025 22:25:40 +0000 Subject: [PATCH] [SDK] Feature: Add Mode chain definition (#5982) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- title: "[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. --- ## PR-Codex overview This PR introduces a new blockchain chain called `mode` to the `thirdweb` package, enhancing the available options for developers. ### Detailed summary - Added `mode` as a predefined chain in `packages/thirdweb/src/chains/chain-definitions/mode.ts`. - Exported `mode` from `packages/thirdweb/src/exports/chains.ts`. - Defined `mode` with properties such as `id`, `name`, `nativeCurrency`, and `blockExplorers`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .changeset/witty-bugs-roll.md | 5 +++++ .../src/chains/chain-definitions/mode.ts | 16 ++++++++++++++++ packages/thirdweb/src/exports/chains.ts | 1 + 3 files changed, 22 insertions(+) create mode 100644 .changeset/witty-bugs-roll.md create mode 100644 packages/thirdweb/src/chains/chain-definitions/mode.ts diff --git a/.changeset/witty-bugs-roll.md b/.changeset/witty-bugs-roll.md new file mode 100644 index 00000000000..505213460d2 --- /dev/null +++ b/.changeset/witty-bugs-roll.md @@ -0,0 +1,5 @@ +--- +"thirdweb": patch +--- + +Added `mode` as a predefined chain diff --git a/packages/thirdweb/src/chains/chain-definitions/mode.ts b/packages/thirdweb/src/chains/chain-definitions/mode.ts new file mode 100644 index 00000000000..76940840fb7 --- /dev/null +++ b/packages/thirdweb/src/chains/chain-definitions/mode.ts @@ -0,0 +1,16 @@ +import { defineChain } from "../utils.js"; + +/** + * @chain + */ +export const mode = /* @__PURE__ */ defineChain({ + id: 919, + name: "Mode", + nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, + blockExplorers: [ + { + name: "Modescout", + url: "https://explorer.mode.network/", + }, + ], +}); diff --git a/packages/thirdweb/src/exports/chains.ts b/packages/thirdweb/src/exports/chains.ts index b3a3f3b9e68..733662f76ee 100644 --- a/packages/thirdweb/src/exports/chains.ts +++ b/packages/thirdweb/src/exports/chains.ts @@ -77,4 +77,5 @@ export { celoAlfajoresTestnet } from "../chains/chain-definitions/celo-alfajores export { fraxtalTestnet } from "../chains/chain-definitions/fraxtal-testnet.js"; export { metalL2Testnet } from "../chains/chain-definitions/metal-l2-testnet.js"; export { modeTestnet } from "../chains/chain-definitions/mode-testnet.js"; +export { mode } from "../chains/chain-definitions/mode.js"; export { soneiumMinato } from "../chains/chain-definitions/soneium-minato.js";