Skip to content

chore: bump starknetjs version to v7 (#440)#462

Merged
MartianGreed merged 33 commits into
mainfrom
release/1.6
Jul 25, 2025
Merged

chore: bump starknetjs version to v7 (#440)#462
MartianGreed merged 33 commits into
mainfrom
release/1.6

Conversation

@MartianGreed
Copy link
Copy Markdown
Contributor

@MartianGreed MartianGreed commented Jul 9, 2025

  • chore: bump starknetjs version to v7

  • chore: bump starknet-react

Closes #

Introduced changes

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added relevant tests
  • Add a dedicated CI job for new examples
  • Performed self-review of the code

Summary by CodeRabbit

  • New Features

    • Added support for historical entity state tracking, including new hooks and store methods for managing and querying historical data.
    • Introduced new React hooks for accessing historical entity and model data.
    • Enhanced SDK with improved token request handling and pagination support.
  • Bug Fixes

    • Improved deduplication logic for historical entities.
    • Fixed various issues related to GitHub workflows and release processes.
  • Chores

    • Updated multiple dependencies and internal packages to latest beta versions.
    • Improved release process documentation and automation.
    • Updated package exports and module types for better compatibility.
  • Documentation

    • Added detailed release process documentation.
    • Updated and extended changelogs across multiple packages.
  • Tests

    • Added comprehensive tests for historical entity state management.
    • Updated and expanded test coverage for query builders and SDK features.
  • Style

    • Added and updated stylesheets for coverage reports and documentation.
  • Refactor

    • Streamlined and standardized method signatures for SDK and store APIs.
    • Improved internal logic for token and controller queries.
  • Other

    • Added benchmark results and code coverage reports for performance analysis.

* chore: bump starknetjs version to v7

* chore: bump starknet-react
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jul 9, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update introduces a new historical entity state management feature in the SDK and Zustand store, including new React hooks and store methods for tracking, querying, and deduplicating historical states of entities. Several subscription and token-related methods are refactored for improved parameter handling and asynchronous operation. Numerous package versions and dependencies are updated, and the release workflow is overhauled for dynamic prerelease handling, better dry-run support, and branch-aware logic. Documentation, test suites, and benchmark/coverage reporting are also expanded.

Changes

Files / Groups Change Summary
.changeset/*.md, .changeset/config.json, .changeset/pre.json Added and updated changeset files for versioning, features, and access level (public).
.github/workflows/ci.yaml, .github/workflows/create_release.yaml, .github/workflows/release.yaml Refactored release workflows: externalized tag fetching, added dynamic prerelease support, improved dry-run, better branch handling, and NPM auth setup.
.gitignore, packages/sdk/.gitignore Added ignore patterns for build artifacts.
RELEASE_PROCESS.md New documentation for release process and best practices.
package.json, pnpm-workspace.yaml Updated scripts to use changeset tool, bumped devDependencies, and updated workspace dependency versions.
examples/example-vite-experimental-sdk/src/main.ts, examples/example-vite-react-sdk/src/historical-events.tsx Refactored entity/model querying to use new historical entity APIs and hooks.
packages/core/CHANGELOG.md, packages/create-burner/CHANGELOG.md, packages/create-dojo/CHANGELOG.md, packages/predeployed-connector/CHANGELOG.md, packages/react/CHANGELOG.md, packages/state/CHANGELOG.md, packages/torii-client/CHANGELOG.md, packages/torii-wasm/CHANGELOG.md, packages/utils-wasm/CHANGELOG.md, packages/utils/CHANGELOG.md, packages/sdk/CHANGELOG.md Added changelog entries for new beta releases, features, and dependency bumps.
packages/core/package.json, packages/create-burner/package.json, packages/create-dojo/package.json, packages/predeployed-connector/package.json, packages/react/package.json, packages/state/package.json, packages/torii-client/package.json, packages/torii-wasm/package.json, packages/utils-wasm/package.json, packages/utils/package.json, packages/sdk/package.json Bumped package versions to 1.6.0-beta.x, updated dependencies (notably to @starknet-io/get-starknet-core), and added/updated exports.
packages/core/src/provider/DojoProvider.ts, packages/create-burner/src/manager/prefundAccount.ts Simplified method calls by removing unnecessary arguments.
packages/create-burner/src/connectors/*.ts, packages/create-burner/src/hooks/*.ts Updated imports to use @starknet-io/get-starknet-core.
packages/create-burner/readme.md Minor whitespace cleanup.
packages/predeployed-connector/src/index.ts Changed error handling for chain switching and switched to static connect method for wallet accounts.
packages/sdk/src/__tests__/* Added comprehensive tests for historical entity state management; updated and removed tests for new API signatures and behaviors.
packages/sdk/src/internal/createSDK.ts, packages/sdk/src/internal/types.ts Refactored subscription methods to async, expanded parameters for controller queries, and improved pagination handling.
packages/sdk/src/internal/pagination.ts Added default pagination constant and improved handling of pagination parameters.
packages/sdk/src/internal/token.ts Introduced strict request parsing, async subscriptions, and required named parameters for token APIs.
packages/sdk/src/internal/toriiQueryBuilder.ts Simplified order-by clause to single field, added isHistorical method.
packages/sdk/src/web/react/hooks/entities.ts, packages/sdk/src/web/react/hooks/state.ts Added hooks for querying historical entities and models.
packages/sdk/src/web/state/index.ts, packages/sdk/src/web/state/zustand.ts Added historical entity state management: new state, deduplication, CRUD/query methods, and store reset logic.
packages/torii-wasm/dojo.c, worlds/dojo-starter Updated subproject commit references.
scripts/get-latest-tags.sh New script to fetch recent tags for release workflow.
packages/grpc/bench/comparison.md, packages/grpc/bench/results.json Added benchmark documentation and results comparing gRPC-Web and torii-wasm.
packages/grpc/coverage/* Added full code coverage report UI, styling, navigation, and statistics for gRPC client code.

Sequence Diagram(s)

Historical Entity State Management (React Hook and Zustand Store)

sequenceDiagram
    participant ReactComponent
    participant useHistoricalEntityQuery
    participant ZustandStore

    ReactComponent->>useHistoricalEntityQuery: Call with historical query
    useHistoricalEntityQuery->>ZustandStore: Subscribe to historical entity changes
    ZustandStore-->>useHistoricalEntityQuery: Initial historical entities
    useHistoricalEntityQuery-->>ReactComponent: Update with historical entities
    ZustandStore-->>useHistoricalEntityQuery: On entity update, deduplicate and store
    useHistoricalEntityQuery-->>ReactComponent: Update with new historical entity state
Loading

Token Subscription Flow (New Async API)

sequenceDiagram
    participant SDK
    participant Client
    participant Consumer

    Consumer->>SDK: onTokenBalanceUpdated(request)
    SDK->>Client: await subscribeTokenBalance(request)
    Client-->>SDK: Promise<Subscription>
    SDK-->>Consumer: Promise<Subscription>
Loading

Release Workflow (Dynamic Prerelease and Dry Run)

sequenceDiagram
    participant Developer
    participant GitHubActions
    participant ReleaseScript

    Developer->>GitHubActions: Trigger release workflow (optionally with prerelease_tag)
    GitHubActions->>ReleaseScript: Determine branch and release type
    alt Non-main branch or prerelease
        ReleaseScript->>ReleaseScript: Enter prerelease mode
    end
    ReleaseScript->>ReleaseScript: Check for changesets
    alt Changesets found
        ReleaseScript->>ReleaseScript: Version, commit, tag, publish
        alt Prerelease
            ReleaseScript->>ReleaseScript: Exit prerelease mode
        end
        ReleaseScript->>GitHubActions: Trigger downstream release creation
    else No changesets
        ReleaseScript->>GitHubActions: Exit early, no release
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Poem

🐇
In the garden of code, where histories bloom,
Rabbits hop through Zustand, clearing old gloom.
With hooks for the past and releases anew,
Async flows ripple, and tokens accrue.
Benchmarks and coverage, all shining bright—
This patch brings the future into the light!

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 30b6165 and 18223bc.

⛔ Files ignored due to path filters (13)
  • packages/grpc/coverage/favicon.png is excluded by !**/*.png
  • packages/grpc/coverage/sort-arrow-sprite.png is excluded by !**/*.png
  • packages/grpc/coverage/src/generated/google/protobuf/empty.ts.html is excluded by !**/generated/**
  • packages/grpc/coverage/src/generated/google/protobuf/index.html is excluded by !**/generated/**
  • packages/grpc/coverage/src/generated/index.html is excluded by !**/generated/**
  • packages/grpc/coverage/src/generated/schema.ts.html is excluded by !**/generated/**
  • packages/grpc/coverage/src/generated/types.ts.html is excluded by !**/generated/**
  • packages/grpc/coverage/src/generated/world.client.ts.html is excluded by !**/generated/**
  • packages/grpc/coverage/src/generated/world.ts.html is excluded by !**/generated/**
  • packages/grpc/dist/index.d.ts is excluded by !**/dist/**
  • packages/grpc/dist/index.js is excluded by !**/dist/**
  • packages/grpc/dist/index.js.map is excluded by !**/dist/**, !**/*.map
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (81)
  • .changeset/config.json (1 hunks)
  • .changeset/cuddly-cities-greet.md (1 hunks)
  • .changeset/eager-eggs-swim.md (1 hunks)
  • .changeset/early-regions-slide.md (1 hunks)
  • .changeset/free-masks-cut.md (1 hunks)
  • .changeset/heavy-waves-hide.md (1 hunks)
  • .changeset/light-cups-pay.md (1 hunks)
  • .changeset/long-papers-judge.md (1 hunks)
  • .changeset/orange-mice-flash.md (1 hunks)
  • .changeset/plain-insects-bet.md (1 hunks)
  • .changeset/pre.json (1 hunks)
  • .changeset/shiny-showers-chew.md (1 hunks)
  • .changeset/sixty-moments-brake.md (1 hunks)
  • .changeset/young-mice-crash.md (1 hunks)
  • .github/workflows/ci.yaml (0 hunks)
  • .github/workflows/create_release.yaml (4 hunks)
  • .github/workflows/release.yaml (4 hunks)
  • .gitignore (1 hunks)
  • RELEASE_PROCESS.md (1 hunks)
  • examples/example-vite-experimental-sdk/src/main.ts (2 hunks)
  • examples/example-vite-react-sdk/src/historical-events.tsx (2 hunks)
  • package.json (2 hunks)
  • packages/core/CHANGELOG.md (1 hunks)
  • packages/core/package.json (2 hunks)
  • packages/core/src/provider/DojoProvider.ts (1 hunks)
  • packages/create-burner/CHANGELOG.md (1 hunks)
  • packages/create-burner/package.json (2 hunks)
  • packages/create-burner/readme.md (0 hunks)
  • packages/create-burner/src/connectors/burner.ts (1 hunks)
  • packages/create-burner/src/connectors/dojoBurnerSWO.ts (1 hunks)
  • packages/create-burner/src/connectors/dojoPredeployedSWO.ts (1 hunks)
  • packages/create-burner/src/hooks/useBurnerWindowObject.ts (1 hunks)
  • packages/create-burner/src/hooks/usePredeployedWindowObject.ts (1 hunks)
  • packages/create-burner/src/manager/prefundAccount.ts (3 hunks)
  • packages/create-dojo/CHANGELOG.md (1 hunks)
  • packages/create-dojo/package.json (2 hunks)
  • packages/grpc/bench/comparison.md (1 hunks)
  • packages/grpc/bench/results.json (1 hunks)
  • packages/grpc/coverage/base.css (1 hunks)
  • packages/grpc/coverage/block-navigation.js (1 hunks)
  • packages/grpc/coverage/index.html (1 hunks)
  • packages/grpc/coverage/prettify.css (1 hunks)
  • packages/grpc/coverage/prettify.js (1 hunks)
  • packages/grpc/coverage/sorter.js (1 hunks)
  • packages/grpc/coverage/src/client.ts.html (1 hunks)
  • packages/grpc/coverage/src/index.html (1 hunks)
  • packages/grpc/coverage/src/index.ts.html (1 hunks)
  • packages/predeployed-connector/CHANGELOG.md (1 hunks)
  • packages/predeployed-connector/package.json (1 hunks)
  • packages/predeployed-connector/src/index.ts (3 hunks)
  • packages/react/CHANGELOG.md (1 hunks)
  • packages/react/package.json (3 hunks)
  • packages/sdk/.gitignore (1 hunks)
  • packages/sdk/CHANGELOG.md (1 hunks)
  • packages/sdk/package.json (2 hunks)
  • packages/sdk/src/__tests__/createSDK.test.ts (1 hunks)
  • packages/sdk/src/__tests__/historical-state.test.ts (1 hunks)
  • packages/sdk/src/__tests__/toriiQueryBuilder.test.ts (5 hunks)
  • packages/sdk/src/internal/createSDK.ts (6 hunks)
  • packages/sdk/src/internal/pagination.ts (2 hunks)
  • packages/sdk/src/internal/token.ts (9 hunks)
  • packages/sdk/src/internal/toriiQueryBuilder.ts (2 hunks)
  • packages/sdk/src/internal/types.ts (4 hunks)
  • packages/sdk/src/web/react/hooks/entities.ts (1 hunks)
  • packages/sdk/src/web/react/hooks/state.ts (2 hunks)
  • packages/sdk/src/web/state/index.ts (2 hunks)
  • packages/sdk/src/web/state/zustand.ts (4 hunks)
  • packages/state/CHANGELOG.md (1 hunks)
  • packages/state/package.json (2 hunks)
  • packages/torii-client/CHANGELOG.md (1 hunks)
  • packages/torii-client/package.json (2 hunks)
  • packages/torii-wasm/CHANGELOG.md (1 hunks)
  • packages/torii-wasm/dojo.c (1 hunks)
  • packages/torii-wasm/package.json (2 hunks)
  • packages/utils-wasm/CHANGELOG.md (1 hunks)
  • packages/utils-wasm/package.json (1 hunks)
  • packages/utils/CHANGELOG.md (1 hunks)
  • packages/utils/package.json (2 hunks)
  • pnpm-workspace.yaml (1 hunks)
  • scripts/get-latest-tags.sh (1 hunks)
  • worlds/dojo-starter (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch release/1.6

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@MartianGreed MartianGreed force-pushed the release/1.6 branch 3 times, most recently from 9245810 to 7675b62 Compare July 9, 2025 14:04
@MartianGreed MartianGreed marked this pull request as ready for review July 25, 2025 15:00
@MartianGreed MartianGreed merged commit 69dcb43 into main Jul 25, 2025
5 of 6 checks passed
@MartianGreed MartianGreed deleted the release/1.6 branch July 25, 2025 15:13
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