-
Notifications
You must be signed in to change notification settings - Fork 54
chore: bump starknetjs version to v7 #440
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
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis change updates dependencies and refactors instantiation patterns across multiple packages. It replaces Changes
Sequence Diagram(s)sequenceDiagram
participant App
participant PredeployedWalletAccount
participant Provider
App->>Provider: Request accounts
Provider->>PredeployedWalletAccount: connect(provider, wallet)
PredeployedWalletAccount-->>Provider: Returns connected account
Provider-->>App: Returns accounts
Possibly related PRs
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
I think this should wait until |
5dc3697
to
4efe5f7
Compare
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 (6)
packages/create-burner/src/connectors/burner.ts (1)
2-2
: Use import type for type-only imports.The import statement should use
import type
sinceStarknetWindowObject
is only used as a type in this file.Apply this diff to use import type:
-import { StarknetWindowObject } from "@starknet-io/get-starknet-core"; +import type { StarknetWindowObject } from "@starknet-io/get-starknet-core";packages/create-burner/src/hooks/useBurnerWindowObject.ts (1)
2-2
: Preferimport type
for type-only import
StarknetWindowObject
is only used for type assertions and never at runtime, so flagging the import as type-only avoids emitting unnecessary code and satisfies the Biome lint.-import { StarknetWindowObject } from "@starknet-io/get-starknet-core"; +import type { StarknetWindowObject } from "@starknet-io/get-starknet-core";packages/create-burner/src/connectors/dojoBurnerSWO.ts (1)
1-1
: Mark the interface import as type-onlyThe class merely implements the interface; the symbol is erased after compilation.
-import { StarknetWindowObject } from "@starknet-io/get-starknet-core"; +import type { StarknetWindowObject } from "@starknet-io/get-starknet-core";packages/create-burner/src/connectors/dojoPredeployedSWO.ts (1)
1-1
: Useimport type
for compile-time-only symbolSame rationale as in
dojoBurnerSWO.ts
; keeps bundle lean and silences the Biome warning.-import { StarknetWindowObject } from "@starknet-io/get-starknet-core"; +import type { StarknetWindowObject } from "@starknet-io/get-starknet-core";packages/create-burner/src/hooks/usePredeployedWindowObject.ts (1)
2-2
: FlagStarknetWindowObject
as type importThe symbol is used only for typing the cast on line 30; import it with
type
to avoid runtime cost.-import { StarknetWindowObject } from "@starknet-io/get-starknet-core"; +import type { StarknetWindowObject } from "@starknet-io/get-starknet-core";.changeset/long-papers-judge.md (1)
15-16
: Expand the summary to clarify compatibility constraintsThe single-line summary doesn’t mention the known coupling with
@starknet-react/core ≥4
. Add a note so maintainers and consumers understand the pending external dependency before publishing.Example:
-chore: bump starknetjs version +chore: bump starknetjs to v7 (⚠️ requires @starknet-react/core ≥ 4 once released)This reduces surprise and avoids premature upgrades.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (11)
.changeset/long-papers-judge.md
(1 hunks)packages/core/src/provider/DojoProvider.ts
(1 hunks)packages/create-burner/package.json
(1 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/predeployed-connector/src/index.ts
(2 hunks)packages/react/package.json
(1 hunks)pnpm-workspace.yaml
(1 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
packages/create-burner/src/connectors/burner.ts
[error] 2-2: All these imports are only used as types.
Importing the types with import type ensures that they are removed by the compilers and avoids loading unnecessary modules.
Safe fix: Use import type.
(lint/style/useImportType)
packages/create-burner/src/connectors/dojoPredeployedSWO.ts
[error] 1-1: All these imports are only used as types.
Importing the types with import type ensures that they are removed by the compilers and avoids loading unnecessary modules.
Safe fix: Use import type.
(lint/style/useImportType)
packages/create-burner/src/connectors/dojoBurnerSWO.ts
[error] 1-1: All these imports are only used as types.
Importing the types with import type ensures that they are removed by the compilers and avoids loading unnecessary modules.
Safe fix: Use import type.
(lint/style/useImportType)
packages/create-burner/src/hooks/useBurnerWindowObject.ts
[error] 2-2: All these imports are only used as types.
Importing the types with import type ensures that they are removed by the compilers and avoids loading unnecessary modules.
Safe fix: Use import type.
(lint/style/useImportType)
packages/create-burner/src/hooks/usePredeployedWindowObject.ts
[error] 2-2: All these imports are only used as types.
Importing the types with import type ensures that they are removed by the compilers and avoids loading unnecessary modules.
Safe fix: Use import type.
(lint/style/useImportType)
⏰ 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). (2)
- GitHub Check: check
- GitHub Check: build
🔇 Additional comments (6)
pnpm-workspace.yaml (1)
6-7
: Ensure @starknet-react/core is compatible with Starknet v7.1.0
- In pnpm-workspace.yaml you’ve bumped
•starknet
from 6.23.1 → 7.1.0
• replacedget-starknet-core
with@starknet-io/get-starknet-core
v4.0.7- Meanwhile,
@starknet-react/core
is still at 3.7.4 (latest stable), with a 4.0.1-beta.4 available.- Since
@starknet-react/core
now declaresstarknet
andget-starknet-core
as peer dependencies, you must:
• Test your setup with the 4.0.1-beta.4 release (peer deps aligned with Starknet 7.x), or
• Wait for a stable v4.0.0 if you prefer non-beta releases.- Refer to the official compatibility table for guidance:
https://docs.starknet.io/tools/compatibility/?utm_source=openaiPlease confirm which path you’ll take and that all tests pass against Starknet 7.1.0.
packages/react/package.json (1)
49-49
: LGTM - Consistent dependency update.The dependency name change from
get-starknet-core
to@starknet-io/get-starknet-core
is consistent with the workspace catalog update and follows the migration to scoped packages.packages/core/src/provider/DojoProvider.ts (1)
197-197
: Verify StarkNet v7 Account.execute signature- return await account?.execute(calls, undefined, details); + return await account?.execute(calls, details);
- File: packages/core/src/provider/DojoProvider.ts (line 197)
Please confirm that in the StarkNet v7 client,Account.execute
no longer accepts a second (ABI) parameter and its signature is now(calls, details)
. If this aligns with the upstream v7 API, you’re good to merge; otherwise, adjust the call to match the correct method signature.packages/predeployed-connector/src/index.ts (1)
253-266
: Verify staticconnect
exists onWalletAccount
and signature matchesI didn’t find a
static connect
method defined inpackages/predeployed-connector/src/index.ts
(it only appears on the baseWalletAccount
class you extend). Please double-check that in starknet.js v7:
WalletAccount
(the parent class) exposes a staticconnect(provider, accountBase)
method- Its signature accepts
(provider: Provider, base: PredeployedWallet)
and returns an instance of your subclass- Invoking
PredeployedWalletAccount.connect(provider, new PredeployedWallet(...))
correctly initializes the accountpackages/create-burner/package.json (2)
51-51
: Looks good – dependency renamed correctlyThe move to the scoped package aligns with upstream changes and prevents duplicate installs.
46-53
: No orphaned get-starknet-core imports in source codeThe only matches for “get-starknet-core” are in pnpm-workspace.yaml and pnpm-lock.yaml (workspace config and lockfile metadata), not in any .js/.ts source files. No code-level imports or declarations remain, so no further changes are needed.
.changeset/long-papers-judge.md
Outdated
"@dojoengine/predeployed-connector": patch | ||
"@dojoengine/create-burner": patch | ||
"@dojoengine/react": patch | ||
"@dojoengine/core": patch | ||
"@dojoengine/create-dojo": patch | ||
"@dojoengine/sdk": patch | ||
"@dojoengine/state": patch | ||
"@dojoengine/torii-client": patch | ||
"@dojoengine/torii-wasm": patch | ||
"@dojoengine/utils": patch | ||
"@dojoengine/utils-wasm": patch |
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.
💡 Verification agent
🛠️ Refactor suggestion
🧩 Analysis chain
Patch bumps may be insufficient for a transitive major‐version upgrade
starknetjs
jumps from v6 → v7 (major). Even if no public APIs of the Dojo packages changed, consumers can still face breaking changes because their own code now links against a different major of a peer/dep. According to semver best-practice, that normally warrants at least a minor bump (or major if you expose starknetjs types/classes) rather than a patch.
Consider promoting each affected package’s version increment from patch
→ minor
to signal the potential risk to downstream users.
🏁 Script executed:
#!/bin/bash
# Search for StarkNet library dependencies and versions in all package.json files
rg -n '"starknet' -C2 -g '*.json'
Length of output: 8577
Use minor bumps for packages depending on a new major of starknetjs
Patch bumps won’t signal the transitive upgrade of starknet
from v6→v7 and may hide breaking changes for downstream consumers. Please update the bump type in .changeset/long-papers-judge.md
from patch
→ minor
for each Dojo package that lists starknet
as a peerDependency/dependency:
• @dojoengine/create-burner
• @dojoengine/react
• @dojoengine/core
• @dojoengine/sdk
• @dojoengine/state
• @dojoengine/utils
• @dojoengine/predeployed-connector
- "@dojoengine/create-burner": patch
- "@dojoengine/react": patch
- "@dojoengine/core": patch
- "@dojoengine/sdk": patch
- "@dojoengine/state": patch
- "@dojoengine/utils": patch
- "@dojoengine/predeployed-connector": patch
+ "@dojoengine/create-burner": minor
+ "@dojoengine/react": minor
+ "@dojoengine/core": minor
+ "@dojoengine/sdk": minor
+ "@dojoengine/state": minor
+ "@dojoengine/utils": minor
+ "@dojoengine/predeployed-connector": minor
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"@dojoengine/predeployed-connector": patch | |
"@dojoengine/create-burner": patch | |
"@dojoengine/react": patch | |
"@dojoengine/core": patch | |
"@dojoengine/create-dojo": patch | |
"@dojoengine/sdk": patch | |
"@dojoengine/state": patch | |
"@dojoengine/torii-client": patch | |
"@dojoengine/torii-wasm": patch | |
"@dojoengine/utils": patch | |
"@dojoengine/utils-wasm": patch | |
"@dojoengine/predeployed-connector": minor | |
"@dojoengine/create-burner": minor | |
"@dojoengine/react": minor | |
"@dojoengine/core": minor | |
"@dojoengine/create-dojo": patch | |
"@dojoengine/sdk": minor | |
"@dojoengine/state": minor | |
"@dojoengine/torii-client": patch | |
"@dojoengine/torii-wasm": patch | |
"@dojoengine/utils": minor | |
"@dojoengine/utils-wasm": patch |
🤖 Prompt for AI Agents
In .changeset/long-papers-judge.md lines 2 to 12, the version bumps for several
Dojo packages are marked as patch, but since these packages depend on a new
major version of starknetjs, the bumps should be minor to properly signal the
breaking change. Change the bump type from patch to minor for the listed
packages: @dojoengine/create-burner, @dojoengine/react, @dojoengine/core,
@dojoengine/sdk, @dojoengine/state, @dojoengine/utils, and
@dojoengine/predeployed-connector.
87a861e
to
f0ccf04
Compare
* chore: bump starknetjs version to v7 (#440) * chore: bump starknetjs version to v7 * chore: bump starknet-react * fix: typedoc run * feat: improve release * chore: release * chore: exit prerelease mode * feat: improve release * chore: release * chore: exit prerelease mode * fix: github workflow improvement * chore: release * chore: exit prerelease mode * chore: bump starknet.js to 7.6.2 * feat: remove grpc client lock * chore: bump dojo.c * chore: release * chore: exit prerelease mode * chore: bump dojo.c * chore: release * chore: exit prerelease mode * feat: historical zustand (#463) * feat: historical zustand * feat: add react hook * chore: release * chore: exit prerelease mode * fix(sdk): zustand historical hook * chore: release * chore: exit prerelease mode * fix(sdk): deduplicate historical_entities * chore: release * chore: exit prerelease mode * fix(sdk): remove useless JSON parse * chore: bump dojo & dojo-starter * chore(sdk): add effect schema * fix(torii-wasm): add type module to package.json * chore: bump dojo.c --------- Co-authored-by: MartianGreed <[email protected]>
Closes #
Introduced changes
Checklist
Summary by CodeRabbit
starknet
and@starknet-io/get-starknet-core
.get-starknet-core
.