Skip to content

Conversation

@Yash094
Copy link
Member

@Yash094 Yash094 commented Oct 28, 2025


PR-Codex overview

This PR introduces the arcTestnet chain to the thirdweb package, adding details about its properties and exporting it for use in other parts of the application.

Detailed summary

  • Added a new file arc-testnet.ts defining the arcTestnet chain with properties such as id, name, nativeCurrency, and blockExplorers.
  • Exported arcTestnet from chains.ts to make it available for use in the application.

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

Summary by CodeRabbit

  • New Features
    • Arc Testnet is now available as a predefined network option, configured with testnet settings, USDC as the native currency, and integrated block explorer access for transaction verification.

@Yash094 Yash094 requested review from a team as code owners October 28, 2025 13:54
@changeset-bot
Copy link

changeset-bot bot commented Oct 28, 2025

🦋 Changeset detected

Latest commit: 7459e35

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

@vercel
Copy link

vercel bot commented Oct 28, 2025

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

Project Deployment Preview Comments Updated (UTC)
docs-v2 Ready Ready Preview Comment Oct 28, 2025 2:07pm
nebula Ready Ready Preview Comment Oct 28, 2025 2:07pm
thirdweb_playground Ready Ready Preview Comment Oct 28, 2025 2:07pm
thirdweb-www Ready Ready Preview Comment Oct 28, 2025 2:07pm
wallet-ui Ready Ready Preview Comment Oct 28, 2025 2:07pm

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 28, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Oct 28, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 28, 2025

Walkthrough

This PR adds a new Arc Testnet chain definition to the thirdweb chains package. A changeset documents the patch release, a new chain definition file defines the Arc Testnet configuration with chain ID 5042002, and the chain is exported through the chains module.

Changes

Cohort / File(s) Change Summary
Changeset
\.changeset/hip-spoons-go.md
Added changeset file documenting a patch release for the thirdweb package noting "Add Arc testnet to chains package"
Chain Definition
packages/thirdweb/src/chains/chain-definitions/arc-testnet.ts
New file exporting arcTestnet constant defined via defineChain() with chain ID 5042002, name "Arc Testnet", testnet flag true, USDC native currency (6 decimals), and Arc Testnet Explorer block explorer
Exports
packages/thirdweb/src/exports/chains.ts
Added export of arcTestnet from the new chain definition file to the chains barrel export

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • All changes follow an established pattern for adding new chain definitions
  • Straightforward configuration data with no complex logic
  • Single-line export addition with no interdependencies

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description is largely incomplete and does not follow the required template format. The description contains only the empty template comment block with sections for "Notes for the reviewer" and "How to test" left unfilled, plus an auto-generated PR-Codex summary. The template specifies that the title should follow a "[SDK/Dashboard/Portal] Feature/Fix:" format and include an issue tag (TEAM-0000), neither of which are present. The required sections for reviewer notes and testing instructions remain empty, leaving critical information missing that would help reviewers and testers understand the change. The description should be updated to follow the repository template by reformatting the title to include the "[SDK/Dashboard/Portal] Feature/Fix:" prefix, adding the relevant issue tag if available, filling in the "Notes for the reviewer" section with any important implementation details or caveats, and providing clear "How to test" instructions such as unit tests or manual verification steps. This will ensure the description provides complete context for reviewers and maintains consistency with repository standards.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "add arc testnet to chains package" directly and clearly describes the main change in the changeset: the addition of a new Arc Testnet chain definition and its export from the chains package. The title is concise, specific, and accurately summarizes what was done without being vague or misleading. A teammate scanning the history would immediately understand that this PR adds Arc Testnet support to the chains package.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch yash/add-arc-testnet

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.

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

📜 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 68cca6f and 7459e35.

📒 Files selected for processing (3)
  • .changeset/hip-spoons-go.md (1 hunks)
  • packages/thirdweb/src/chains/chain-definitions/arc-testnet.ts (1 hunks)
  • packages/thirdweb/src/exports/chains.ts (1 hunks)
🧰 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 @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless 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 @/types where applicable
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless 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/arc-testnet.ts
  • packages/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/arc-testnet.ts
  • packages/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 @example and 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/arc-testnet.ts
  • packages/thirdweb/src/exports/chains.ts
.changeset/*.md

📄 CodeRabbit inference engine (AGENTS.md)

.changeset/*.md: Each change in packages/* must include a changeset for the appropriate package
Version bump rules: patch for non‑API changes; minor for new/modified public API

Files:

  • .changeset/hip-spoons-go.md
packages/thirdweb/src/exports/**

📄 CodeRabbit inference engine (CLAUDE.md)

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

Files:

  • packages/thirdweb/src/exports/chains.ts
🧠 Learnings (1)
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
PR: thirdweb-dev/js#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/hip-spoons-go.md
⏰ 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, webpack)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Lint Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (4)
packages/thirdweb/src/exports/chains.ts (1)

13-13: LGTM: export wired and alphabetically placed.

The arcTestnet re-export follows existing ESM path style (.js) and ordering.

packages/thirdweb/src/chains/chain-definitions/arc-testnet.ts (3)

15-16: Configuration is correct; no changes needed.

Arc Testnet confirms testnet USDC as the native gas token with 6 decimals. The current configuration matches Arc's specification. While using USDC as a gas token is unusual compared to other EVM chains, it is the correct and documented behavior for Arc Testnet.


7-12: Revert to standard array shape; optionally add apiUrl if available.

The blockExplorers field uses array format consistently across all 60+ chain definitions in the codebase (ethereum, arbitrum, base, polygon, zksync, optimism, etc.)—not an object with a default key. Your current code already follows this convention correctly.

If ArcScan exposes an API endpoint, add it as an optional property within the existing array element:

  blockExplorers: [
    {
      name: "Arc Testnet Explorer",
      url: "https://testnet.arcscan.app",
+     apiUrl: "https://testnet.arcscan.app/api",
    },
  ],

Verify that the apiUrl endpoint exists and is documented before adding it.

Likely an incorrect or invalid review comment.


6-17: Verify RPC aggregator coverage for chain ID 5042002.

The review comment raises a valid concern: if thirdweb's RPC aggregator doesn't support chain 5042002, consumers will encounter runtime failures when calling getRpcUrlForChain(). While RPC endpoints are optional in defineChain, explicit RPC entries should be added if the chain isn't in thirdweb's supported chains list.

Confirm on thirdweb's Chainlist whether chain 5042002 is covered by their default RPC aggregator. If not covered, add explicit RPC endpoint(s) to prevent runtime errors.

Comment on lines +2 to +5
"thirdweb": patch
---

Add Arc testnet to chains package
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 | 🟠 Major

Bump version to minor (new public export).

This adds a new public export (arcTestnet) to packages/thirdweb, which is a public API change. Per policy: patch for non-API changes; minor for new/modified public API.

Apply:

----
-"thirdweb": patch
+---
+"thirdweb": minor
 ---
 
 Add Arc testnet to chains package

Based on learnings.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
.changeset/hip-spoons-go.md lines 2-5: The changeset currently sets "thirdweb":
patch despite adding a new public export (arcTestnet), which requires a minor
bump; update the changeset to use "minor" instead of "patch" for the thirdweb
package and keep the release notes describing the new public export so the
package versioning correctly reflects the public API change.

Comment on lines +3 to +6
/**
* @chain
*/
export const arcTestnet = /* @__PURE__ */ defineChain({
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Add full TSDoc with compiling example and custom tag.

Public symbols in packages/thirdweb must include TSDoc with an @example and a custom tag. Please replace the brief comment with a complete block.

Apply:

-/**
- * @chain
- */
+/**
+ * Arc Testnet predefined chain.
+ *
+ * @chain
+ * @beta
+ * @example
+ * import { createThirdwebClient } from "thirdweb";
+ * import { arcTestnet, getRpcUrlForChain } from "thirdweb/chains";
+ *
+ * const client = createThirdwebClient({ clientId: process.env.TW_CLIENT_ID! });
+ * const rpcUrl = getRpcUrlForChain(arcTestnet, client);
+ * // use rpcUrl with your provider or SDK calls
+ */

As per coding guidelines.

🤖 Prompt for AI Agents
packages/thirdweb/src/chains/chain-definitions/arc-testnet.ts lines 3-6: the
brief comment must be replaced with a complete TSDoc block for the exported
public symbol; add a descriptive one-line summary, an optional short remarks
section, the required custom tag (e.g. @chain) and a compiling @example that
shows importing defineChain and using arcTestnet (a minimal, executable snippet
that TypeScript can compile), and ensure the block sits immediately above the
export so the doc is attached to export const arcTestnet.

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.55 KB (0%) 1.3 s (0%) 172 ms (+243.32% 🔺) 1.5 s
thirdweb (cjs) 366.18 KB (0%) 7.4 s (0%) 573 ms (+21.48% 🔺) 7.9 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 90 ms (+4305.6% 🔺) 204 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 87 ms (+5541.74% 🔺) 97 ms
thirdweb/react (minimal + tree-shaking) 19.09 KB (0%) 382 ms (0%) 82 ms (+2906.36% 🔺) 464 ms

@joaquim-verges joaquim-verges merged commit e0c8312 into main Oct 28, 2025
20 of 21 checks passed
@joaquim-verges joaquim-verges deleted the yash/add-arc-testnet branch October 28, 2025 19:09
@joaquim-verges joaquim-verges mentioned this pull request Oct 28, 2025
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.

4 participants