Skip to content

feat: upgrade to Starknet.js 10.0.2 - #529

Merged
tarrencev merged 2 commits into
mainfrom
feat/starknet-v10
Jul 9, 2026
Merged

feat: upgrade to Starknet.js 10.0.2#529
tarrencev merged 2 commits into
mainfrom
feat/starknet-v10

Conversation

@tarrencev

@tarrencev tarrencev commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Pin Starknet.js exactly to 10.0.2 across catalogs, overrides, generated manifests, and the Bun lockfile.
  • Migrate removed Account provider methods to account.provider.* and require Node.js 22 for affected packages and generated apps.
  • Replace the unreleased v9 changeset with v10 minor bumps and add provider/manifest regression coverage.

Validation

bun install --frozen-lockfile, format, lint, tests, full build, release dry-run, and packed installs in npm, pnpm, and Bun all pass with one Starknet.js 10.0.2; the pre-existing @dojoengine/[email protected] Node entrypoint filename mismatch still prevents importing @dojoengine/sdk/node in a clean consumer.

Summary by CodeRabbit

  • New Features

    • Updated supported Starknet.js versions to 10.0.2 across the project.
    • Generated app templates now use the matching Starknet.js version and require Node.js 22+.
  • Bug Fixes

    • Improved transaction polling and chain ID handling for better reliability in wallet and burner flows.
    • Updated deployment and funding flows to use more consistent network queries.
  • Chores

    • Raised the minimum supported Node.js version to 22 for multiple packages.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@tarrencev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e372a90b-246a-495e-9fec-6d6f66e7db52

📥 Commits

Reviewing files that changed from the base of the PR and between 7f71698 and 32e432f.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • example/package.json
  • packages/create-dojo/src/generators/client-app.ts
  • packages/create-dojo/src/generators/worker-app.ts
📝 Walkthrough

Walkthrough

This PR upgrades Starknet.js to v10.0.2 across the repository, migrating account-level API calls (waitForTransaction, getChainId, getTransactionReceipt, getNonceForAddress) to their provider-scoped equivalents. It also raises Node.js engine requirements to >=22 across packages and refactors create-dojo package.json generators into exported, testable helper functions.

Changes

Starknet v10 migration and Node 22 baseline

Layer / File(s) Summary
Version bump and docs
.changeset/starknet-v10-support.md, .changeset/starknet-v9-support.md (removed), CLAUDE.md, package.json, example/package.json
Starknet.js dependency/override pinned to 10.0.2, v9 changeset removed, and docs/engines updated for Node 22.
Account provider call migration
example/core/dojo/createSystemCalls.ts, packages/create-burner/src/connectors/burner.ts, packages/create-burner/src/manager/burnerManager.ts, packages/create-burner/src/manager/prefundAccount.ts, packages/predeployed-connector/src/index.ts, packages/create-burner/test/...
Calls to waitForTransaction, getChainId, getTransactionReceipt, and getNonceForAddress moved from the account object to account.provider, with new/updated tests covering each change.
create-dojo generator refactor
packages/create-dojo/src/generators/client-app.ts, packages/create-dojo/src/generators/worker-app.ts, packages/create-dojo/src/generators/package-json.test.ts, packages/create-dojo/package.json
Exported buildClientPackageJson and buildWorkerPackageJson helpers build package.json objects pinning starknet to 10.0.2 and Node engines to >=22; new test suite and a vitest test script added.
Node engines >=22 across packages
packages/core/..., packages/create-burner/package.json, packages/grpc/..., packages/internal/..., packages/predeployed-connector/package.json, packages/react/..., packages/sdk/..., packages/state/..., packages/utils/...
Package manifests updated or newly declare engines.node >=22 (previously >=18.0.0 or absent).

Estimated code review effort: 2 (Simple) | ~15 minutes

Sequence Diagram(s)

sequenceDiagram
  participant App
  participant Account
  participant Provider

  App->>Account: execute(calls)
  Account->>Provider: waitForTransaction(transaction_hash)
  Provider-->>Account: receipt
  Account-->>App: transaction confirmed
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: upgrading Starknet.js to 10.0.2.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/starknet-v10

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
packages/create-dojo/src/generators/client-app.ts (1)

47-53: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Replace any with a typed interface and add an explicit return type.

buildClientPackageJson is exported and uses const packageJson: any, violating two coding guidelines: avoid any and maintain explicit return types for exported APIs. The any type means all downstream property assignments in the switch cases and additionalDeps loop are unchecked.

♻️ Proposed refactor: define a typed interface
+interface ClientPackageJson {
+    name: string;
+    version: string;
+    private: boolean;
+    type: string;
+    engines: { node: string };
+    scripts: Record<string, string>;
+    overrides: Record<string, string>;
+    pnpm: { overrides: Record<string, string> };
+    dependencies: Record<string, string>;
+    devDependencies: Record<string, string>;
+}
+
-export function buildClientPackageJson(
+export function buildClientPackageJson(
     config: ProjectConfig,
     versions: DojoVersions
-): {
+): ClientPackageJson {
     const { projectName, framework, additionalDeps } = config;

-    const packageJson: any = {
+    const packageJson: ClientPackageJson = {
         name: projectName,
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/create-dojo/src/generators/client-app.ts` around lines 47 - 53,
Replace the untyped packageJson in buildClientPackageJson with a concrete
interface or type that models the generated package.json shape, so the
switch-case assignments and additionalDeps merges are type-checked instead of
using any. Add an explicit return type to the exported buildClientPackageJson
function, and keep the type aligned with the object built from projectName,
framework, and versions so downstream consumers get a properly typed result.

Source: Coding guidelines

packages/create-dojo/src/generators/worker-app.ts (1)

128-183: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Clean separation of concerns for testability.

Extracting buildWorkerPackageJson as a pure exported function while keeping the I/O in createWorkerPackageJson is a solid refactor. The hardcoded starknet: "10.0.2" across overrides, pnpm overrides, and dependencies is consistent with the PR objective.

One minor note: @types/node is set to ^20.0.0 (line 178) while the generated engines field requires >=22 (line 151). Consider bumping for type accuracy.

💡 Optional: align `@types/node` with engine constraint
-            "`@types/node`": "^20.0.0",
+            "`@types/node`": "^22.0.0",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/create-dojo/src/generators/worker-app.ts` around lines 128 - 183,
The generated worker package metadata is inconsistent because
buildWorkerPackageJson sets engines.node to >=22 while devDependencies still pin
`@types/node` to a 20.x range. Update the `@types/node` entry in
buildWorkerPackageJson to match the Node 22 engine requirement so the generated
package.json stays type-accurate and aligned with the runtime constraint.
example/package.json (1)

74-77: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider aligning @types/node with the >=22 engine requirement.

@types/node is pinned to ^20.16.6 (line 61) while the new engines constraint requires >=22. This means Node 22-specific APIs won't have type definitions, which could cause type errors or missed type safety for new APIs.

💡 Optional: bump `@types/node`
-        "`@types/node`": "^20.16.6",
+        "`@types/node`": "^22.0.0",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@example/package.json` around lines 74 - 77, Align the Node type definitions
with the updated runtime requirement by updating the `@types/node` dependency in
package.json to a version that matches Node 22 or newer. Keep the existing
engines field as-is, and make sure the dependency version change is reflected
alongside the current package metadata so TypeScript can correctly type Node 22
APIs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@example/package.json`:
- Around line 74-77: Align the Node type definitions with the updated runtime
requirement by updating the `@types/node` dependency in package.json to a version
that matches Node 22 or newer. Keep the existing engines field as-is, and make
sure the dependency version change is reflected alongside the current package
metadata so TypeScript can correctly type Node 22 APIs.

In `@packages/create-dojo/src/generators/client-app.ts`:
- Around line 47-53: Replace the untyped packageJson in buildClientPackageJson
with a concrete interface or type that models the generated package.json shape,
so the switch-case assignments and additionalDeps merges are type-checked
instead of using any. Add an explicit return type to the exported
buildClientPackageJson function, and keep the type aligned with the object built
from projectName, framework, and versions so downstream consumers get a properly
typed result.

In `@packages/create-dojo/src/generators/worker-app.ts`:
- Around line 128-183: The generated worker package metadata is inconsistent
because buildWorkerPackageJson sets engines.node to >=22 while devDependencies
still pin `@types/node` to a 20.x range. Update the `@types/node` entry in
buildWorkerPackageJson to match the Node 22 engine requirement so the generated
package.json stays type-accurate and aligned with the runtime constraint.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 423fa835-6d8c-4bc7-a9b9-36632d4c2515

📥 Commits

Reviewing files that changed from the base of the PR and between 9c5de3e and 7f71698.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (26)
  • .changeset/starknet-v10-support.md
  • .changeset/starknet-v9-support.md
  • CLAUDE.md
  • example/core/dojo/createSystemCalls.ts
  • example/package.json
  • package.json
  • packages/core/package.json
  • packages/create-burner/package.json
  • packages/create-burner/src/connectors/burner.ts
  • packages/create-burner/src/manager/burnerManager.ts
  • packages/create-burner/src/manager/prefundAccount.ts
  • packages/create-burner/test/connectors/burner.test.ts
  • packages/create-burner/test/manager/burnerManager.test.ts
  • packages/create-burner/test/manager/prefundAccount.test.ts
  • packages/create-dojo/package.json
  • packages/create-dojo/src/generators/client-app.ts
  • packages/create-dojo/src/generators/package-json.test.ts
  • packages/create-dojo/src/generators/worker-app.ts
  • packages/grpc/package.json
  • packages/internal/package.json
  • packages/predeployed-connector/package.json
  • packages/predeployed-connector/src/index.ts
  • packages/react/package.json
  • packages/sdk/package.json
  • packages/state/package.json
  • packages/utils/package.json
💤 Files with no reviewable changes (1)
  • .changeset/starknet-v9-support.md

@tarrencev
tarrencev merged commit 3a5d648 into main Jul 9, 2026
9 checks passed
@tarrencev
tarrencev deleted the feat/starknet-v10 branch July 9, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant