-
Notifications
You must be signed in to change notification settings - Fork 619
[SDK] Replace Celo Alfajores with Celo Sepolia Testnet #8384
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
[SDK] Replace Celo Alfajores with Celo Sepolia Testnet #8384
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 3ba3e8f 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 |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
WalkthroughReplaces Celo Alfajores Testnet with Celo Sepolia Testnet as the supported test network. The old chain definition is removed, a new one is added with updated metadata, and the public export is updated to reference the new chain definition. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (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: 1
🧹 Nitpick comments (1)
.changeset/shaky-dragons-check.md (1)
1-5: Consider using "minor" version bump instead of "patch".This change removes the public export
celoAlfajoresTestnetand adds a new public exportceloSepoliaTestnet, which constitutes a modification to the public API surface. As per coding guidelines, modified public API should use a "minor" version bump rather than "patch".Based on coding guidelines.
Apply this diff:
--- -"thirdweb": patch +"thirdweb": minor --- Replace celo alfajores with celoSepoliaTestnet
📜 Review details
Configuration used: CodeRabbit 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 (4)
.changeset/shaky-dragons-check.md(1 hunks)packages/thirdweb/src/chains/chain-definitions/celo-alfajores-testnet.ts(0 hunks)packages/thirdweb/src/chains/chain-definitions/celo-sepolia-testnet.ts(1 hunks)packages/thirdweb/src/exports/chains.ts(1 hunks)
💤 Files with no reviewable changes (1)
- packages/thirdweb/src/chains/chain-definitions/celo-alfajores-testnet.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 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
Avoidanyandunknownunless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial,Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from@/typeswhere applicable
Prefertypealiases overinterfaceexcept for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size
Files:
packages/thirdweb/src/chains/chain-definitions/celo-sepolia-testnet.tspackages/thirdweb/src/exports/chains.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)
Files:
packages/thirdweb/src/chains/chain-definitions/celo-sepolia-testnet.tspackages/thirdweb/src/exports/chains.ts
packages/thirdweb/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
packages/thirdweb/**/*.{ts,tsx}: Every public symbol must have comprehensive TSDoc with at least one compiling@exampleand a custom tag (@beta,@internal,@experimental, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
Lazy‑load heavy dependencies inside async paths (e.g.,const { jsPDF } = await import("jspdf"))
Files:
packages/thirdweb/src/chains/chain-definitions/celo-sepolia-testnet.tspackages/thirdweb/src/exports/chains.ts
packages/thirdweb/src/exports/**
📄 CodeRabbit inference engine (CLAUDE.md)
packages/thirdweb/src/exports/**: Export everything viaexports/directory, grouped by feature in the SDK public API
Every public symbol must have comprehensive TSDoc with at least one@exampleblock that compiles and custom annotation tags (@beta,@internal,@experimental)
Files:
packages/thirdweb/src/exports/chains.ts
.changeset/*.md
📄 CodeRabbit inference engine (AGENTS.md)
.changeset/*.md: Each change inpackages/*must include a changeset for the appropriate package
Version bump rules: patch for non‑API changes; minor for new/modified public API
Files:
.changeset/shaky-dragons-check.md
🧠 Learnings (6)
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to **/*.test.{ts,tsx} : Use `FORKED_ETHEREUM_CHAIN` for mainnet interactions and `ANVIL_CHAIN` for isolated tests
Applied to files:
packages/thirdweb/src/chains/chain-definitions/celo-sepolia-testnet.tspackages/thirdweb/src/exports/chains.ts
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to test/src/test-wallets.ts : Predefined test accounts are in `test/src/test-wallets.ts`
Applied to files:
packages/thirdweb/src/chains/chain-definitions/celo-sepolia-testnet.tspackages/thirdweb/src/exports/chains.ts
📚 Learning: 2025-06-06T23:46:08.795Z
Learnt from: MananTank
Repo: thirdweb-dev/js PR: 7298
File: apps/dashboard/src/app/nebula-app/move-funds/move-funds.tsx:424-424
Timestamp: 2025-06-06T23:46:08.795Z
Learning: The thirdweb project has an ESLint rule that restricts direct usage of `defineChain`. When it's necessary to use `defineChain` directly, it's acceptable to disable the rule with `// eslint-disable-next-line no-restricted-syntax`.
Applied to files:
packages/thirdweb/src/chains/chain-definitions/celo-sepolia-testnet.ts
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to packages/thirdweb/exports/** : Export all public API via `packages/thirdweb/exports/`, grouped by feature
Applied to files:
packages/thirdweb/src/exports/chains.ts
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to .changeset/*.md : Version bump rules: patch for non‑API changes; minor for new/modified public API
Applied to files:
.changeset/shaky-dragons-check.md
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
Repo: thirdweb-dev/js PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to .changeset/*.md : Each change in `packages/*` must include a changeset for the appropriate package
Applied to files:
.changeset/shaky-dragons-check.md
🧬 Code graph analysis (1)
packages/thirdweb/src/chains/chain-definitions/celo-sepolia-testnet.ts (1)
packages/thirdweb/src/exports/chains.ts (2)
celoSepoliaTestnet(27-27)defineChain(92-92)
⏰ 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, esbuild)
- GitHub Check: E2E Tests (pnpm, vite)
- GitHub Check: E2E Tests (pnpm, webpack)
- GitHub Check: Lint Packages
- GitHub Check: Size
- GitHub Check: Unit Tests
- GitHub Check: Build Packages
- GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
packages/thirdweb/src/exports/chains.ts (1)
27-27: All references toceloAlfajoresTestnethave been successfully updated.Verification confirms zero remaining references to the old export name in active source code. The migration to
celoSepoliaTestnetis complete—only a historical CHANGELOG entry documents the original Alfajores testnet addition, which requires no action.packages/thirdweb/src/chains/chain-definitions/celo-sepolia-testnet.ts (1)
6-17: I need to verify the native currency symbol. Let me search for that information.Based on the verification results:
Chain metadata for Celo Sepolia Testnet is accurate.
The chain ID 11142220 is confirmed, and the block explorer URL https://celo-sepolia.blockscout.com is correct.
Regarding the native currency symbol "CELO-S": Celo Sepolia Testnet uses CELO-S as the gas token, which aligns with thirdweb's product documentation. While official Celo MetaMask setup documentation shows "CELO", thirdweb uses "CELO-S" to distinguish the testnet token, which is consistent with thirdweb's platform.
All metadata in the code is accurate.
| /** | ||
| * @chain | ||
| */ | ||
| export const celoSepoliaTestnet = /* @__PURE__ */ defineChain({ | ||
| blockExplorers: [ | ||
| { | ||
| name: "Celo Sepolia Explorer", | ||
| url: "https://celo-sepolia.blockscout.com/", | ||
| }, | ||
| ], | ||
| id: 11142220, | ||
| name: "Celo Sepolia Testnet", | ||
| nativeCurrency: { decimals: 18, name: "CELO", symbol: "CELO-S" }, | ||
| 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.
🛠️ Refactor suggestion | 🟠 Major
Add comprehensive TSDoc documentation with example and custom tags.
The public export celoSepoliaTestnet is missing comprehensive TSDoc as required by the coding guidelines. Public symbols must include a description, at least one compiling @example block, and a custom annotation tag.
Based on coding guidelines.
Apply this diff:
/**
+ * The Celo Sepolia Testnet chain.
+ *
+ * @example
+ * ```ts
+ * import { celoSepoliaTestnet } from "thirdweb/chains";
+ * const tx = await sendTransaction({
+ * to: "0x...",
+ * chain: celoSepoliaTestnet,
+ * });
+ * ```
+ *
* @chain
+ * @beta
*/
size-limit report 📦
|

PR-Codex overview
This PR focuses on replacing the
celoAlfajoresTestnetwithceloSepoliaTestnetin the codebase, updating the relevant definitions and exports.Detailed summary
celo-alfajores-testnet.ts.changeset/shaky-dragons-check.md.celoSepoliaTestnetincelo-sepolia-testnet.ts.exports/chains.tsto exportceloSepoliaTestnetinstead ofceloAlfajoresTestnet.Summary by CodeRabbit