-
Notifications
You must be signed in to change notification settings - Fork 635
Etherlink shadownet chain #8611
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
Conversation
|
Cursor Agent can help with this pull request. Just |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 26a9153 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
WalkthroughThis 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used📓 Path-based instructions (4)**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
packages/thirdweb/src/**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.{js,jsx,ts,tsx,json}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
⏰ 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)
🔇 Additional comments (1)
Comment |
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.
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.
📒 Files selected for processing (3)
.changeset/etherlink-shadownet-chain.mdpackages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.tspackages/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@/typesor localtypes.tsbarrels
Prefer type aliases over interface except for nominal shapes in TypeScript
Avoidanyandunknownin 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.tspackages/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 viaexports/directory, grouped by feature in SDK development
Every public symbol must have comprehensive TSDoc with at least one@exampleblock 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.tspackages/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 lintbefore committing, ensure there are no linting errors
Files:
packages/thirdweb/src/exports/chains.tspackages/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.tspackages/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
defineChainfrom 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
@exampleblock 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@betaor another annotation tag is most appropriate for this chain.Based on coding guidelines.
Likely an incorrect or invalid review comment.
| 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, | ||
| }); |
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:
cat -n packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.tsRepository: 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:
- Chain name: Etherlink Shadownet Testnet. [1]
- Chain ID: 127823. [1][2]
- RPC endpoint (HTTP): https://node.shadownet.etherlink.com. [1][2]
- Relay endpoint: https://relay.shadownet.etherlink.com. [2]
- Block explorer: https://shadownet.explorer.etherlink.com. [1][2]
- Faucet: https://shadownet.faucet.etherlink.com/. [2]
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"; |
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:
# Find and examine the etherlink-shadownet definition file
find . -name "*etherlink-shadownet*" -type fRepository: thirdweb-dev/js
Length of output: 172
🏁 Script executed:
# Search for the actual variable name definition in chain definitions
rg "etherlinkShadow" --type ts --type tsxRepository: thirdweb-dev/js
Length of output: 86
🏁 Script executed:
# Also search for any references to this chain
rg "shadownet|Shadownet" --type ts --type tsx -iRepository: thirdweb-dev/js
Length of output: 86
🏁 Script executed:
cat -n ./packages/thirdweb/src/chains/chain-definitions/etherlink-shadownet.tsRepository: 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.
size-limit report 📦
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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
🚀 New features to boost your workflow:
|
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> <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 -->
1915995 to
26a9153
Compare
[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
etherlinkShadownetchain can be imported fromthirdweb/chains.id,name,nativeCurrency, andblockExplorersproperties.pnpm buildandpnpm lintto ensure no new issues are introduced.Slack Thread
PR-Codex overview
This PR introduces the
Etherlink Shadownet, a new testnet chain with its configuration and details added to the codebase.Detailed summary
etherlinkShadownetinetherlink-shadownet.ts.id,name,nativeCurrency, andblockExplorers.etherlinkShadownetfromchains.tsfor use in the application.Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.