Skip to content

Commit

Permalink
[SDK] Feature: Add Mode chain definition (#5982)
Browse files Browse the repository at this point in the history
---
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.

<!-- start pr-codex -->

---

## 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}`

<!-- end pr-codex -->
  • Loading branch information
gregfromstl committed Jan 17, 2025
1 parent a92617f commit b6d65cf
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/witty-bugs-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Added `mode` as a predefined chain
16 changes: 16 additions & 0 deletions packages/thirdweb/src/chains/chain-definitions/mode.ts
Original file line number Diff line number Diff line change
@@ -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/",
},
],
});
1 change: 1 addition & 0 deletions packages/thirdweb/src/exports/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

0 comments on commit b6d65cf

Please sign in to comment.