-
Notifications
You must be signed in to change notification settings - Fork 627
[SDK] Add Monad chain definition #8465
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": patch | ||
| --- | ||
|
|
||
| Add customization options for the signIn modal shown from useFetchWithPayment |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "thirdweb": patch | ||
| --- | ||
|
|
||
| Add monad chain definition | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import { defineChain } from "../utils.js"; | ||
|
|
||
| /** | ||
| * @chain | ||
| */ | ||
|
Comment on lines
+3
to
+5
Contributor
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 | 🟠 Major Add comprehensive TSDoc for the public chain export. Per coding guidelines, every public symbol exported via
Currently, the TSDoc only contains Apply this diff to add complete documentation: /**
+ * The Monad mainnet chain.
+ *
+ * @example
+ * ```ts
+ * import { monad } from "thirdweb/chains";
+ * import { createThirdwebClient } from "thirdweb";
+ *
+ * const client = createThirdwebClient({ clientId: "..." });
+ * const contract = getContract({ client, chain: monad, address: "0x..." });
+ * ```
+ *
* @chain
+ * @beta
*/Based on coding guidelines. 🤖 Prompt for AI Agents |
||
| export const monad = /*@__PURE__*/ defineChain({ | ||
| blockExplorers: [ | ||
| { | ||
| name: "Monad Vision", | ||
| url: "https://monadvision.com/", | ||
| }, | ||
| { | ||
| name: "Monad Scan", | ||
| url: "https://monadscan.com/", | ||
| }, | ||
| ], | ||
| id: 143, | ||
| name: "Monad", | ||
| nativeCurrency: { decimals: 18, name: "Mon", symbol: "MON" }, | ||
| }); | ||
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.
🧩 Analysis chain
Script executed:
Repository: thirdweb-dev/js
<shell_result>
Repository: thirdweb-dev/js
Exit code: 0
stdout:
stderr:
</shell_result>
Script executed:
Repository: thirdweb-dev/js
<shell_result>
Repository: thirdweb-dev/js
Exit code: 0
stdout:
stderr:
</shell_result>
Script executed:
Repository: thirdweb-dev/js
<shell_result>
Repository: thirdweb-dev/js
Exit code: 0
stdout:
</shell_result>
Script executed:
Repository: thirdweb-dev/js
<shell_result>
Repository: thirdweb-dev/js
Exit code: 0
stdout:
</shell_result>
Script executed:
Repository: thirdweb-dev/js
<shell_result>
Repository: thirdweb-dev/js
Exit code: 0
stdout:
</shell_result>
Based on my verification:
Chain definitions are public API: The file
packages/thirdweb/src/exports/chains.tsis the central export point for chain definitions, and test files across the codebase import chains from this public API entry point.New chain is being added: The PR adds a new
monadchain definition (filepackages/thirdweb/src/chains/chain-definitions/monad.tsexists and is ready for export).Project policy confirmed: The
AGENTS.mdfile explicitly states: "minor for any new/modified public API" and "patch for changes that don't impact the public API."This is a public API addition: Adding a new exportable chain constant is a new public API surface that consumers can import and use.
Update changeset to use minor version bump for new public chain export.
The PR adds a new chain definition (
monad) to the thirdweb package's public API. Per project guidance in AGENTS.md, new/modified public APIs require a minor version bump, not patch.📝 Committable suggestion
🤖 Prompt for AI Agents