Skip to content

Conversation

@Yash094
Copy link
Member

@Yash094 Yash094 commented Jan 7, 2026

[SDK] Feature: Add Etherlink Shadownet Testnet chain

Notes for the reviewer

Adds the Etherlink Shadownet testnet chain (ID 127823) to the predefined chains in the SDK. This includes its native currency (XTZ) and block explorer URL.

How to test

  • Verify the etherlinkShadownet chain can be imported from thirdweb/chains.
  • Check that the chain object contains the correct id, name, nativeCurrency, and blockExplorers properties.
  • Run pnpm build and pnpm lint to ensure no new issues are introduced.

Slack Thread

Open in Cursor Open in Web


PR-Codex overview

This PR introduces the Etherlink Shadownet, a new testnet chain with its configuration and details added to the codebase.

Detailed summary

  • Added a new chain definition for etherlinkShadownet in etherlink-shadownet.ts.
  • Defined properties such as id, name, nativeCurrency, and blockExplorers.
  • Exported etherlinkShadownet from chains.ts for use in the application.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • New Features
    • Added support for the Etherlink Shadownet testnet (chain ID 127823). This enables development and testing on that network with block explorer integration and native currency configured as Etherlink (XTZ, 18 decimals). The chain is now available in the product's supported chains list for use in development workflows.

✏️ Tip: You can customize this high-level summary in your review settings.

@cursor
Copy link

cursor bot commented Jan 7, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel
Copy link

vercel bot commented Jan 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
docs-v2 Ready Ready Preview, Comment Jan 7, 2026 2:17pm
nebula Ready Ready Preview, Comment Jan 7, 2026 2:17pm
thirdweb_playground Ready Ready Preview, Comment Jan 7, 2026 2:17pm
thirdweb-www Ready Ready Preview, Comment Jan 7, 2026 2:17pm
wallet-ui Ready Ready Preview, Comment Jan 7, 2026 2:17pm

@changeset-bot
Copy link

changeset-bot bot commented Jan 7, 2026

🦋 Changeset detected

Latest commit: 26a9153

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
thirdweb Patch
@thirdweb-dev/nebula Patch
@thirdweb-dev/wagmi-adapter Patch
wagmi-inapp Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

Walkthrough

This PR adds the Etherlink Shadownet testnet (chain ID 127823) by introducing a new chain definition, exporting it from the public chains API, and adding a changeset documenting the patch release.

Changes

Cohort / File(s) Summary
Etherlink Shadownet Chain Definition
packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts
New TypeScript module exporting etherlinkShadownet via defineChain; includes id 127823, name, nativeCurrency (Etherlink / XTZ, 18 decimals), blockExplorers, and testnet: true.
Chain Export Surface
packages/thirdweb/src/exports/chains.ts
Added re-export: export { etherlinkShadownet } from "../chains/chain-definitions/etherlink-shadownet.js".
Release Documentation
.changeset/etherlink-shadownet-chain.md
New changeset entry marking a patch release under the thirdweb scope documenting the addition of the new testnet chain.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Etherlink shadownet chain' clearly summarizes the main change—adding a new chain definition for Etherlink Shadownet testnet.
Description check ✅ Passed The description follows the template structure with a properly formatted title, comprehensive notes for reviewers, and detailed testing instructions covering verification and build checks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1915995 and 26a9153.

📒 Files selected for processing (3)
  • .changeset/etherlink-shadownet-chain.md
  • packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts
  • packages/thirdweb/src/exports/chains.ts
✅ Files skipped from review due to trivial changes (1)
  • .changeset/etherlink-shadownet-chain.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/thirdweb/src/exports/chains.ts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each TypeScript file to one stateless, single-responsibility function for clarity
Re-use shared types from @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes in TypeScript
Avoid any and unknown in TypeScript unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.) in TypeScript

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity and testability
Re-use shared types from @/types or local types.ts barrel exports
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics whenever possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic in TypeScript files; avoid restating TypeScript types and signatures in prose

Files:

  • packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts
packages/thirdweb/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/thirdweb/src/**/*.{ts,tsx}: Comment only ambiguous logic in SDK code; avoid restating TypeScript in prose
Load heavy dependencies inside async paths to keep initial bundle lean (e.g. const { jsPDF } = await import("jspdf");)

Lazy-load heavy dependencies inside async paths to keep the initial bundle lean (e.g., const { jsPDF } = await import('jspdf');)

Files:

  • packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts
**/*.{js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (AGENTS.md)

Biome governs formatting and linting; its rules live in biome.json. Run pnpm fix & pnpm lint before committing, ensure there are no linting errors

Files:

  • packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Lazy-import optional features; avoid top-level side-effects

Files:

  • packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Lint Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts (1)

6-21: Rename variable to correct the spelling: etherlinkShadownetetherlinkShadownet.

The variable name contains a typo (missing 'o'). The chain name on line 14 is correctly spelled "Etherlink Shadownet", but the exported identifier is etherlinkShadownet. Update the export name and all references throughout the codebase to maintain consistency.

Likely an incorrect or invalid review comment.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts:
- Around line 6-21: The exported variable name has a typo—rename the exported
const symbol from etherlinkShadownet to etherlinkShadownet (update the
declaration export const etherlinkShadownet = /* @__PURE__ */ defineChain({...})
to export const etherlinkShadownet = /* @__PURE__ */ defineChain({...})) and
update any references/imports across the codebase to use etherlinkShadownet so
the identifier matches the correct "Shadownet" spelling.

In @packages/thirdweb/src/exports/chains.ts:
- Line 35: The exported symbol name is misspelled; change the export from the
incorrect identifier to the correct one (rename the exported variable to
etherlinkShadownet) in the file that currently does export { etherlinkShadownet
} and ensure the corresponding symbol inside the chain definition module (the
export from "../chains/chain-definitions/etherlink-shadownet.js") is renamed to
match; also update any other references/imports that use the old identifier so
all usages of etherlinkShadownet are consistent.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a3ff757 and 1915995.

📒 Files selected for processing (3)
  • .changeset/etherlink-shadownet-chain.md
  • packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts
  • packages/thirdweb/src/exports/chains.ts
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each TypeScript file to one stateless, single-responsibility function for clarity
Re-use shared types from @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes in TypeScript
Avoid any and unknown in TypeScript unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.) in TypeScript

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity and testability
Re-use shared types from @/types or local types.ts barrel exports
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics whenever possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic in TypeScript files; avoid restating TypeScript types and signatures in prose

Files:

  • packages/thirdweb/src/exports/chains.ts
  • packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts
packages/thirdweb/src/exports/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/thirdweb/src/exports/**/*.{ts,tsx}: Export everything via exports/ directory, grouped by feature in SDK development
Every public symbol must have comprehensive TSDoc with at least one @example block that compiles and custom annotation tags (@beta, @internal, @experimental)

Export everything in packages/thirdweb via the exports/ directory, grouped by feature. Every public symbol must have comprehensive TSDoc including at least one @example block that compiles and one custom annotation (@beta, @internal, @experimental, etc.)

Files:

  • packages/thirdweb/src/exports/chains.ts
packages/thirdweb/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/thirdweb/src/**/*.{ts,tsx}: Comment only ambiguous logic in SDK code; avoid restating TypeScript in prose
Load heavy dependencies inside async paths to keep initial bundle lean (e.g. const { jsPDF } = await import("jspdf");)

Lazy-load heavy dependencies inside async paths to keep the initial bundle lean (e.g., const { jsPDF } = await import('jspdf');)

Files:

  • packages/thirdweb/src/exports/chains.ts
  • packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts
**/*.{js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (AGENTS.md)

Biome governs formatting and linting; its rules live in biome.json. Run pnpm fix & pnpm lint before committing, ensure there are no linting errors

Files:

  • packages/thirdweb/src/exports/chains.ts
  • packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Lazy-import optional features; avoid top-level side-effects

Files:

  • packages/thirdweb/src/exports/chains.ts
  • packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts
🧬 Code graph analysis (1)
packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts (1)
packages/thirdweb/src/exports/chains.ts (2)
  • etherlinkShadownet (35-35)
  • defineChain (94-94)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Build Packages
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Lint Packages
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (3)
.changeset/etherlink-shadownet-chain.md (1)

1-5: LGTM!

The changeset file correctly documents the patch release for adding the Etherlink Shadownet testnet chain.

packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts (2)

1-1: LGTM!

The import statement correctly imports defineChain from the utilities module.


3-5: Add comprehensive TSDoc with description, @example block, and annotation tags.

The current TSDoc is incomplete. According to coding guidelines for packages/thirdweb/src/exports/**/*.{ts,tsx}, every public symbol must have comprehensive TSDoc including:

  • A description of what the chain is
  • At least one @example block that compiles
  • Custom annotation tags (e.g., @beta, @internal, @experimental)
📝 Suggested TSDoc enhancement
 /**
+ * Etherlink Shadownet testnet chain.
+ * 
+ * Chain ID: 127823
+ * 
+ * @example
+ * ```ts
+ * import { etherlinkShadownet } from "thirdweb/chains";
+ * 
+ * const chain = etherlinkShadownet;
+ * ```
+ * 
  * @chain
+ * @beta
  */

Note: This assumes the variable name should be etherlinkShadownet (see related naming issue). Also verify whether @beta or another annotation tag is most appropriate for this chain.

Based on coding guidelines.

Likely an incorrect or invalid review comment.

Comment on lines +6 to +21
export const etherlinkShadownet = /* @__PURE__ */ defineChain({
blockExplorers: [
{
name: "Etherlink Shadownet Explorer",
url: "https://shadownet.explorer.etherlink.com/",
},
],
id: 127823,
name: "Etherlink Shadownet",
nativeCurrency: {
decimals: 18,
name: "Etherlink",
symbol: "XTZ",
},
testnet: true,
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat -n packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts

Repository: thirdweb-dev/js

Length of output: 620


🌐 Web query:

Etherlink Shadownet testnet chain ID RPC explorer official documentation

💡 Result:

Here are the official details for the Etherlink Shadownet Testnet:

Sources: Etherlink docs — “Migrating to Etherlink Shadownet Testnet” and “Network information.” [1] [2]


Rename variable from etherlinkShadownet to etherlinkShadownet.

The variable name contains a typo (missing 'o' in "Shadownet"). All configuration details are accurate: chain ID 127823, explorer URL https://shadownet.explorer.etherlink.com, and native currency XTZ are verified correct for Etherlink Shadownet testnet.

🤖 Prompt for AI Agents
In @packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts around
lines 6 - 21, The exported variable name has a typo—rename the exported const
symbol from etherlinkShadownet to etherlinkShadownet (update the declaration
export const etherlinkShadownet = /* @__PURE__ */ defineChain({...}) to export
const etherlinkShadownet = /* @__PURE__ */ defineChain({...})) and update any
references/imports across the codebase to use etherlinkShadownet so the
identifier matches the correct "Shadownet" spelling.

// mainnet = alias for ethereum
export { ethereum, mainnet } from "../chains/chain-definitions/ethereum.js";
export { etherlink } from "../chains/chain-definitions/etherlink.js";
export { etherlinkShadownet } from "../chains/chain-definitions/etherlink-shadownet.js";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Find and examine the etherlink-shadownet definition file
find . -name "*etherlink-shadownet*" -type f

Repository: thirdweb-dev/js

Length of output: 172


🏁 Script executed:

# Search for the actual variable name definition in chain definitions
rg "etherlinkShadow" --type ts --type tsx

Repository: thirdweb-dev/js

Length of output: 86


🏁 Script executed:

# Also search for any references to this chain
rg "shadownet|Shadownet" --type ts --type tsx -i

Repository: thirdweb-dev/js

Length of output: 86


🏁 Script executed:

cat -n ./packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.ts

Repository: thirdweb-dev/js

Length of output: 620


🏁 Script executed:

# Also check the exports file to see the actual export
cat -n ./packages/thirdweb/src/exports/chains.ts | grep -A 2 -B 2 "etherlink"

Repository: thirdweb-dev/js

Length of output: 603


Fix variable naming inconsistency: rename etherlinkShadownet to etherlinkShadownet.

The variable name etherlinkShadownet contains a typo—it's missing the 'o' in "Shadow". This creates an inconsistency with the official chain name ("Etherlink Shadownet" on line 14) and the file name (etherlink-shadownet.ts). Rename the variable to etherlinkShadownet to match the official naming across the chain definition, file naming, and exported symbol.

🤖 Prompt for AI Agents
In @packages/thirdweb/src/exports/chains.ts at line 35, The exported symbol name
is misspelled; change the export from the incorrect identifier to the correct
one (rename the exported variable to etherlinkShadownet) in the file that
currently does export { etherlinkShadownet } and ensure the corresponding symbol
inside the chain definition module (the export from
"../chains/chain-definitions/etherlink-shadownet.js") is renamed to match; also
update any other references/imports that use the old identifier so all usages of
etherlinkShadownet are consistent.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

size-limit report 📦

Path Size
@thirdweb-dev/nexus (esm) 105.66 KB (0%)
@thirdweb-dev/nexus (cjs) 319.47 KB (0%)

@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.05%. Comparing base (a3ff757) to head (26a9153).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8611      +/-   ##
==========================================
+ Coverage   53.00%   53.05%   +0.05%     
==========================================
  Files         923      924       +1     
  Lines       61721    61738      +17     
  Branches     4031     4039       +8     
==========================================
+ Hits        32713    32757      +44     
+ Misses      28910    28884      -26     
+ Partials       98       97       -1     
Flag Coverage Δ
packages 53.05% <100.00%> (+0.05%) ⬆️
Files with missing lines Coverage Δ
...rc/chains/chain-definitions/etherlink-shadownet.ts 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Yash094 Yash094 added the merge-queue Adds the pull request to Graphite's merge queue. label Jan 7, 2026
Copy link
Member Author

Yash094 commented Jan 7, 2026

Merge activity

<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

-->
[SDK] Feature: Add Etherlink Shadownet Testnet chain

## Notes for the reviewer

Adds the Etherlink Shadownet testnet chain (ID 127823) to the predefined chains in the SDK. This includes its native currency (XTZ) and block explorer URL.

## How to test

- Verify the `etherlinkShadownet` chain can be imported from `thirdweb/chains`.
- Check that the chain object contains the correct `id`, `name`, `nativeCurrency`, and `blockExplorers` properties.
- Run `pnpm build` and `pnpm lint` to ensure no new issues are introduced.

---
[Slack Thread](https://thirdwebdev.slack.com/archives/C09DS2CKGP2/p1767789368607579?thread_ts=1767789368.607579&cid=C09DS2CKGP2)

<a href="https://cursor.com/background-agent?bcId=bc-a0f088a7-057b-46f0-b6a6-3ba957d1e261"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-cursor-light.svg"><img alt="Open in Cursor" src="https://cursor.com/open-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?id=bc-a0f088a7-057b-46f0-b6a6-3ba957d1e261"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/open-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/open-in-web-light.svg"><img alt="Open in Web" src="https://cursor.com/open-in-web.svg"></picture></a>

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces the `Etherlink Shadownet` testnet chain to the project, defining its properties and adding it to the exports.

### Detailed summary
- Added a new chain definition for `etherlinkShadownet` in `etherlink-shadownet.ts`.
- Defined properties such as `id`, `name`, `nativeCurrency`, and `blockExplorers`.
- Exported `etherlinkShadownet` in `chains.ts` for use in the application.

> ✨ 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 Etherlink Shadownet testnet chain, enabling development and testing on this network with proper block explorer integration and native currency configuration (XTZ).

<sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants