Skip to content
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

feat: bump dojo v1.0.9 #363

Merged
merged 1 commit into from
Dec 27, 2024
Merged

feat: bump dojo v1.0.9 #363

merged 1 commit into from
Dec 27, 2024

Conversation

MartianGreed
Copy link
Collaborator

@MartianGreed MartianGreed commented Dec 26, 2024

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
    • Introduced two new methods in the SDK for managing token balance subscriptions.
      • onTokenBalanceUpdated: Subscribe to updates on token balances.
      • updateTokenBalanceSubscription: Modify existing token balance subscriptions.
  • Documentation
    • Enhanced formatting in various README files for better readability.
    • Corrected typographical errors in the OnChainDash Vite Kitchen Sink README.
  • Chores
    • Updated .gitignore to exclude lerna-debug.log.
    • Modified script commands in package.json to use pnpx instead of npx.
    • Updated CI workflow configuration to reflect changes in the Continuous Integration process.

Copy link

coderabbitai bot commented Dec 26, 2024

Walkthrough

This pull request encompasses multiple minor updates across various files in the project. The changes include updating .gitignore to ignore Lerna debug logs, formatting improvements in several README files, modifications to package scripts using pnpx instead of npx, and significant SDK enhancements. The most notable technical change is the addition of two new methods in the SDK for token balance subscription management, allowing for more control over tracking token balance updates.

Changes

File Change Summary
.gitignore Added lerna-debug.log to ignored files
examples/*/README.md Minor formatting adjustments and typo corrections in multiple README files
package.json Updated Prettier script commands from npx to pnpx
packages/create-burner/readme.md Improved list and section formatting for readability
packages/sdk/src/index.ts Added onTokenBalanceUpdated and updateTokenBalanceSubscription methods
packages/sdk/src/types.ts Updated SDK interface with new token balance subscription methods
worlds/onchain-dash Updated subproject commit identifier
.github/workflows/ci.yaml Incremented dojoup command version and added build/test step for worlds/onchain-dash

Sequence Diagram

sequenceDiagram
    participant Client
    participant SDK
    participant TokenBalanceService

    Client->>SDK: onTokenBalanceUpdated(contracts, accounts, callback)
    SDK->>TokenBalanceService: Create Subscription
    TokenBalanceService-->>SDK: Return Subscription
    SDK-->>Client: Return Subscription Object

    Client->>SDK: updateTokenBalanceSubscription(subscription, newContracts, newAccounts)
    SDK->>TokenBalanceService: Update Subscription
    TokenBalanceService-->>SDK: Confirm Update
    SDK-->>Client: Resolve Promise
Loading

Poem

🐰 A Rabbit's Ode to Code Refinement 🔧
With gitignore and scripts so neat,
SDK methods now more complete.
Formatting polished, README's bright,
Our code dances with pure delight!
Hop, hop, hooray! 🎉

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. We would love to hear your feedback on Discord.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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. (Beta)
  • @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.

Copy link

@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: 0

🔭 Outside diff range comments (1)
package.json (1)

The PR title mentions version 1.0.9 but the codebase shows version 1.0.6

Based on the search results:

  • All dojo packages are currently at version 1.0.6 as shown in their package.json files
  • The latest version in the CHANGELOG.md files is also 1.0.6 (released on 2024-12-23)
  • The PR title mentions bumping to version 1.0.9 but no such version update is implemented in the codebase

The version bump to 1.0.9 appears to be missing from this PR. The version should be updated in:

  • The root lerna.json file (currently at 1.0.6)
  • All package.json files in the packages directory
🔗 Analysis chain

Line range hint 1-28: Verify the dojo version bump implementation.

The PR title mentions "feat: bump dojo v1.0.9" but the version update is not visible in this file.

Let's verify where the version bump is implemented:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Find files containing version information for dojo

# Search for package.json files in the packages directory
echo "Searching for package.json files in packages directory..."
fd --type f "package.json" packages/ --exec cat {} \; | jq -c '. | select(.name | contains("dojo")) | {name: .name, version: .version}'

# Search for version strings matching 1.0.9
echo "Searching for version strings..."
rg -g '!node_modules' -g '!dist' "1.0.9"

Length of output: 52126


Script:

#!/bin/bash
# Description: Find version information in packages and version bump commits

# Search for version information in package.json files
echo "Searching for version information in package.json files..."
fd --type f "package.json" packages/ --exec cat {} \; | jq -c '. | select(.version) | {name: .name, version: .version}'

# Search for version bump commits
echo "Searching for version bump commits..."
git log --oneline -n 10 | grep -i "bump"

# Search for version strings in other files
echo "Searching for version strings in other files..."
rg -g '!node_modules' -g '!dist' -g '!package.json' -g '!package-lock.json' -g '!pnpm-lock.yaml' "1\.0\.[0-9]+"

Length of output: 13701

🧹 Nitpick comments (6)
examples/example-vite-svelte-recs/README.md (1)

17-18: LGTM! Consider a minor grammatical improvement.

The technical considerations provide valuable context for users choosing between this template and SvelteKit. Consider adding a comma for improved readability.

- It brings its own routing solution which might not be preferable for some users.
+ It brings its own routing solution, which might not be preferable for some users.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~17-~17: Possible missing comma found.
Context: ...elteKit?** - It brings its own routing solution which might not be preferable for some ...

(AI_HYDRA_LEO_MISSING_COMMA)

package.json (1)

7-8: LGTM! Consider maintaining consistency across all scripts.

The switch from npx to pnpx for Prettier commands is appropriate since the project uses pnpm. However, the "release" script still uses npx for lerna. Consider updating all scripts to consistently use pnpx.

Apply this diff for consistency:

-    "release": "pnpm build && pnpm prettier && npx lerna publish --no-private --force-publish",
+    "release": "pnpm build && pnpm prettier && pnpx lerna publish --no-private --force-publish",
packages/sdk/src/index.ts (2)

203-213: Correct the doc block parameters and fix the callback’s type reference.

There's a minor spelling issue in the JSDoc (Funtion instead of Function). Also, static analysis suggests avoiding the Function type. It's more robust to define a parameter type that accurately describes the callback's signature, preventing potential type-related bugs.

Possible fix:

- * @param {Funtion} callback - JavaScript function to call on updates
+ * @param {(update: any) => void} callback - JavaScript function to call on updates

214-224: Recommend using more explicit callback typing instead of Function.

Same rationale as above. For example, if the callback receives a token balance update payload, define a type or interface for that payload to ensure better type safety and clarity.

Example fix:

- callback: Function
+ callback: (update: any) => void
🧰 Tools
🪛 Biome (1.9.4)

[error] 217-217: Don't use 'Function' as a type.

Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.

(lint/complexity/noBannedTypes)

packages/sdk/src/types.ts (1)

340-340: Avoid using Function as a type.

Static analysis flags the usage of the Function type. Defining a more specific function signature, if possible, is preferred. As an improvement, explicitly specify the parameter taken by the callback function to ensure clarity and type safety.

Example fix:

- callback: Function
+ callback: (update: any) => void
🧰 Tools
🪛 Biome (1.9.4)

[error] 340-340: Don't use 'Function' as a type.

Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.

(lint/complexity/noBannedTypes)

packages/create-burner/readme.md (1)

45-49: Indent bullet points to comply with markdown lint rules.

Markdownlint warns about inconsistent indentation for bullet points. Conforming to two spaces might improve readability. Consider applying the following diff:

-    - [With React](#with-react)
-    - [Vanilla JavaScript](#vanilla-javascript)
+  - [With React](#with-react)
+  - [Vanilla JavaScript](#vanilla-javascript)

-    - `get(address: string)`: Get a burner account based on its address.
-    - `list()`: List all burners.
-    - `select(address: string)`: Set a burner as the active account.
-    - `create()`: Create a new burner.
-    - `account`: The active burner account.
-    - `isDeploying`: A boolean that indicates whether a burner is being deployed.
-    - `listConnectors()`: List all available connectors that can be used with Starknet React.
+  - `get(address: string)`: Get a burner account based on its address.
+  - `list()`: List all burners.
+  - `select(address: string)`: Set a burner as the active account.
+  - `create()`: Create a new burner.
+  - `account`: The active burner account.
+  - `isDeploying`: A boolean that indicates whether a burner is being deployed.
+  - `listConnectors()`: List all available connectors that can be used with Starknet React.

Also applies to: 93-111

🧰 Tools
🪛 Markdownlint (0.37.0)

45-45: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


46-46: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between faf8d21 and e88f93f.

📒 Files selected for processing (9)
  • .gitignore (1 hunks)
  • examples/example-nodejs-bot/README.md (1 hunks)
  • examples/example-vite-kitchen-sink/README.md (1 hunks)
  • examples/example-vite-react-sdk/README.md (2 hunks)
  • examples/example-vite-svelte-recs/README.md (1 hunks)
  • package.json (1 hunks)
  • packages/create-burner/readme.md (3 hunks)
  • packages/sdk/src/index.ts (1 hunks)
  • packages/sdk/src/types.ts (1 hunks)
✅ Files skipped from review due to trivial changes (4)
  • .gitignore
  • examples/example-nodejs-bot/README.md
  • examples/example-vite-react-sdk/README.md
  • examples/example-vite-kitchen-sink/README.md
🧰 Additional context used
🪛 Biome (1.9.4)
packages/sdk/src/index.ts

[error] 217-217: Don't use 'Function' as a type.

Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.

(lint/complexity/noBannedTypes)

packages/sdk/src/types.ts

[error] 340-340: Don't use 'Function' as a type.

Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.

(lint/complexity/noBannedTypes)

🪛 LanguageTool
examples/example-vite-svelte-recs/README.md

[uncategorized] ~17-~17: Possible missing comma found.
Context: ...elteKit?** - It brings its own routing solution which might not be preferable for some ...

(AI_HYDRA_LEO_MISSING_COMMA)

packages/create-burner/readme.md

[uncategorized] ~95-~95: Loose punctuation mark.
Context: ... and more. - get(address: string): Get a burner account based on its addre...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~96-~96: Loose punctuation mark.
Context: ...unt based on its address. - list(): List all burners. - `select(address...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~97-~97: Loose punctuation mark.
Context: ...burners. - select(address: string): Set a burner as the active account. ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~98-~98: Loose punctuation mark.
Context: ... as the active account. - create(): Create a new burner. - account: T...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~99-~99: Loose punctuation mark.
Context: ...): Create a new burner. - account: The active burner account. - isDep...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~100-~100: Loose punctuation mark.
Context: ...tive burner account. - isDeploying: A boolean that indicates whether a burn...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...being deployed. - listConnectors(): List all available connectors that can ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~104-~104: Loose punctuation mark.
Context: ...o manage burner accounts. - init(): Initializes the manager. - `getActi...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~105-~105: Loose punctuation mark.
Context: ... the manager. - getActiveAccount(): Retrieves the active burner account. ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~106-~106: Loose punctuation mark.
Context: ...er account. - get(address: string): Get a burner account based on its addre...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~107-~107: Loose punctuation mark.
Context: ...unt based on its address. - list(): List all burners. - `select(address...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~108-~108: Loose punctuation mark.
Context: ...burners. - select(address: string): Set a burner as the active account. ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~109-~109: Loose punctuation mark.
Context: ... as the active account. - create(): Create a new burner. - account: T...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~110-~110: Loose punctuation mark.
Context: ...): Create a new burner. - account: The active burner account. - isDep...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~111-~111: Loose punctuation mark.
Context: ...tive burner account. - isDeploying: A boolean that indicates whether a burn...

(UNLIKELY_OPENING_PUNCTUATION)

🪛 Markdownlint (0.37.0)
packages/create-burner/readme.md

45-45: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


46-46: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


95-95: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


96-96: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


97-97: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


98-98: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


99-99: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


100-100: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


101-101: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


104-104: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


105-105: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


106-106: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


107-107: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


108-108: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


109-109: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


110-110: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


111-111: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

🔇 Additional comments (3)
packages/sdk/src/index.ts (1)

226-248: LGTM!

The method updateTokenBalanceSubscription is well-documented, and the implementation appears correct. No additional issues detected here.

packages/sdk/src/types.ts (1)

343-359: LGTM!

The method updateTokenBalanceSubscription in the SDK interface aligns with the implementation in index.ts. No issues found here.

packages/create-burner/readme.md (1)

36-39: LGTM!

The bullet points highlighting the new features are clear. No additional concerns here.

Copy link

@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

🧹 Nitpick comments (5)
examples/example-vite-kitchen-sink/README.md (1)

48-48: Fix typo and improve grammar in the note

There's a typo and missing article in the note.

- you main want to update `actions` contract address
+ you may want to update the `actions` contract address
🧰 Tools
🪛 LanguageTool

[uncategorized] ~48-~48: You might be missing the article “the” here.
Context: ... ### Notes - you main want to updateactionscontract address insrc/compon...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

packages/create-burner/readme.md (2)

43-49: Consider standardizing list indentation.

The nested list items use 4-space indentation. While this works, the markdown standard recommends 2-space indentation for nested lists.

 - [Installation](#installation)
 - [Usage](#usage)
-    - [With React](#with-react)
-    - [Vanilla JavaScript](#vanilla-javascript)
+  - [With React](#with-react)
+  - [Vanilla JavaScript](#vanilla-javascript)
 - [API](#api)
 - [Contribute](#contribute)
 - [License](#license)
🧰 Tools
🪛 Markdownlint (0.37.0)

45-45: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


46-46: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


93-111: Consider enhancing API documentation.

While the API documentation is clear and well-structured, consider these improvements:

  1. Add return types for methods to make the API more self-documenting:
- `get(address: string)`: Get a burner account based on its address.
+ `get(address: string): Account`: Get a burner account based on its address.

- `list()`: List all burners.
+ `list(): Account[]`: List all burners.

- `create()`: Create a new burner.
+ `create(): Promise<Account>`: Create a new burner.
  1. Standardize the indentation to use 2 spaces for nested lists to align with markdown standards.
🧰 Tools
🪛 Markdownlint (0.37.0)

95-95: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


96-96: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


97-97: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


98-98: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


99-99: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


100-100: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


101-101: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


104-104: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


105-105: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


106-106: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


107-107: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


108-108: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


109-109: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


110-110: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


111-111: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

🪛 LanguageTool

[uncategorized] ~95-~95: Loose punctuation mark.
Context: ... and more. - get(address: string): Get a burner account based on its addre...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~96-~96: Loose punctuation mark.
Context: ...unt based on its address. - list(): List all burners. - `select(address...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~97-~97: Loose punctuation mark.
Context: ...burners. - select(address: string): Set a burner as the active account. ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~98-~98: Loose punctuation mark.
Context: ... as the active account. - create(): Create a new burner. - account: T...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~99-~99: Loose punctuation mark.
Context: ...): Create a new burner. - account: The active burner account. - isDep...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~100-~100: Loose punctuation mark.
Context: ...tive burner account. - isDeploying: A boolean that indicates whether a burn...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...being deployed. - listConnectors(): List all available connectors that can ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~104-~104: Loose punctuation mark.
Context: ...o manage burner accounts. - init(): Initializes the manager. - `getActi...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~105-~105: Loose punctuation mark.
Context: ... the manager. - getActiveAccount(): Retrieves the active burner account. ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~106-~106: Loose punctuation mark.
Context: ...er account. - get(address: string): Get a burner account based on its addre...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~107-~107: Loose punctuation mark.
Context: ...unt based on its address. - list(): List all burners. - `select(address...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~108-~108: Loose punctuation mark.
Context: ...burners. - select(address: string): Set a burner as the active account. ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~109-~109: Loose punctuation mark.
Context: ... as the active account. - create(): Create a new burner. - account: T...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~110-~110: Loose punctuation mark.
Context: ...): Create a new burner. - account: The active burner account. - isDep...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~111-~111: Loose punctuation mark.
Context: ...tive burner account. - isDeploying: A boolean that indicates whether a burn...

(UNLIKELY_OPENING_PUNCTUATION)

packages/sdk/src/index.ts (1)

202-224: Maintain consistent documentation style

The documentation uses Rust-style (#) for sections which is inconsistent with the rest of the codebase. Also, add the callback signature details to the documentation.

Apply this diff:

 /**
  * Subscribes to token balance updates
  *
- * # Parameters
+ * @param {string[]} contract_addresses - Array of contract addresses to filter (empty for all)
+ * @param {string[]} account_addresses - Array of account addresses to filter (empty for all)
+ * @param {(balance: torii.TokenBalance) => void} callback - Function called on balance updates
  *
- * # Returns
- * Result containing subscription handle or error
+ * @returns {torii.Subscription} Subscription handle for managing the subscription
  */
🧰 Tools
🪛 Biome (1.9.4)

[error] 217-217: Don't use 'Function' as a type.

Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.

(lint/complexity/noBannedTypes)

packages/sdk/src/types.ts (1)

325-341: Maintain consistent documentation style in interface

Update the documentation to match the rest of the codebase's style and add callback signature details.

Apply this diff:

 /**
  * Subscribes to token balance updates
  *
- * # Parameters
+ * @param {string[]} contract_addresses - Array of contract addresses to filter (empty for all)
+ * @param {string[]} account_addresses - Array of account addresses to filter (empty for all)
+ * @param {(balance: torii.TokenBalance) => void} callback - Function called on balance updates
  *
- * # Returns
- * Result containing subscription handle or error
+ * @returns {torii.Subscription} Subscription handle for managing the subscription
  */
🧰 Tools
🪛 Biome (1.9.4)

[error] 340-340: Don't use 'Function' as a type.

Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.

(lint/complexity/noBannedTypes)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e88f93f and 5184801.

📒 Files selected for processing (10)
  • .gitignore (1 hunks)
  • examples/example-nodejs-bot/README.md (1 hunks)
  • examples/example-vite-kitchen-sink/README.md (1 hunks)
  • examples/example-vite-react-sdk/README.md (2 hunks)
  • examples/example-vite-svelte-recs/README.md (1 hunks)
  • package.json (1 hunks)
  • packages/create-burner/readme.md (3 hunks)
  • packages/sdk/src/index.ts (1 hunks)
  • packages/sdk/src/types.ts (1 hunks)
  • worlds/onchain-dash (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • worlds/onchain-dash
🚧 Files skipped from review as they are similar to previous changes (5)
  • examples/example-nodejs-bot/README.md
  • examples/example-vite-svelte-recs/README.md
  • examples/example-vite-react-sdk/README.md
  • .gitignore
  • package.json
🧰 Additional context used
🪛 Biome (1.9.4)
packages/sdk/src/types.ts

[error] 340-340: Don't use 'Function' as a type.

Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.

(lint/complexity/noBannedTypes)

packages/sdk/src/index.ts

[error] 217-217: Don't use 'Function' as a type.

Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.

(lint/complexity/noBannedTypes)

🪛 LanguageTool
examples/example-vite-kitchen-sink/README.md

[uncategorized] ~48-~48: You might be missing the article “the” here.
Context: ... ### Notes - you main want to updateactionscontract address insrc/compon...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

packages/create-burner/readme.md

[uncategorized] ~95-~95: Loose punctuation mark.
Context: ... and more. - get(address: string): Get a burner account based on its addre...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~96-~96: Loose punctuation mark.
Context: ...unt based on its address. - list(): List all burners. - `select(address...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~97-~97: Loose punctuation mark.
Context: ...burners. - select(address: string): Set a burner as the active account. ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~98-~98: Loose punctuation mark.
Context: ... as the active account. - create(): Create a new burner. - account: T...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~99-~99: Loose punctuation mark.
Context: ...): Create a new burner. - account: The active burner account. - isDep...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~100-~100: Loose punctuation mark.
Context: ...tive burner account. - isDeploying: A boolean that indicates whether a burn...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...being deployed. - listConnectors(): List all available connectors that can ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~104-~104: Loose punctuation mark.
Context: ...o manage burner accounts. - init(): Initializes the manager. - `getActi...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~105-~105: Loose punctuation mark.
Context: ... the manager. - getActiveAccount(): Retrieves the active burner account. ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~106-~106: Loose punctuation mark.
Context: ...er account. - get(address: string): Get a burner account based on its addre...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~107-~107: Loose punctuation mark.
Context: ...unt based on its address. - list(): List all burners. - `select(address...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~108-~108: Loose punctuation mark.
Context: ...burners. - select(address: string): Set a burner as the active account. ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~109-~109: Loose punctuation mark.
Context: ... as the active account. - create(): Create a new burner. - account: T...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~110-~110: Loose punctuation mark.
Context: ...): Create a new burner. - account: The active burner account. - isDep...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~111-~111: Loose punctuation mark.
Context: ...tive burner account. - isDeploying: A boolean that indicates whether a burn...

(UNLIKELY_OPENING_PUNCTUATION)

🪛 Markdownlint (0.37.0)
packages/create-burner/readme.md

45-45: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


46-46: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


95-95: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


96-96: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


97-97: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


98-98: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


99-99: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


100-100: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


101-101: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


104-104: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


105-105: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


106-106: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


107-107: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


108-108: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


109-109: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


110-110: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


111-111: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

🔇 Additional comments (4)
packages/create-burner/readme.md (2)

36-39: LGTM! Clear and well-formatted feature list.

The feature list is now more readable with each item on its own line.


61-61: LGTM! Valid example reference.

The example link is properly formatted and points to a relevant repository.

packages/sdk/src/index.ts (1)

238-248: Implementation looks good

The implementation correctly delegates to the client methods and maintains proper parameter ordering.

packages/sdk/src/types.ts (1)

355-359: Interface definition looks good

The method signatures are correctly defined and aligned with the implementation.

Comment on lines +214 to +224
onTokenBalanceUpdated: (
contract_addresses: string[],
account_addresses: string[],
callback: Function
): torii.Subscription => {
return client.onTokenBalanceUpdated(
contract_addresses,
account_addresses,
callback
);
},
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Improve type safety of the callback parameter

The Function type is too broad and can lead to runtime errors. Define a specific callback signature for better type safety.

Apply this diff:

-callback: Function
+callback: (balance: torii.TokenBalance) => void
📝 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.

Suggested change
onTokenBalanceUpdated: (
contract_addresses: string[],
account_addresses: string[],
callback: Function
): torii.Subscription => {
return client.onTokenBalanceUpdated(
contract_addresses,
account_addresses,
callback
);
},
onTokenBalanceUpdated: (
contract_addresses: string[],
account_addresses: string[],
callback: (balance: torii.TokenBalance) => void
): torii.Subscription => {
return client.onTokenBalanceUpdated(
contract_addresses,
account_addresses,
callback
);
},
🧰 Tools
🪛 Biome (1.9.4)

[error] 217-217: Don't use 'Function' as a type.

Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.

(lint/complexity/noBannedTypes)

Comment on lines +337 to +341
onTokenBalanceUpdated: (
contract_addresses: string[],
account_addresses: string[],
callback: Function
) => torii.Subscription;
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Improve type safety of the callback parameter in interface

The Function type should be replaced with a specific callback signature for better type safety, matching the implementation.

Apply this diff:

-callback: Function
+callback: (balance: torii.TokenBalance) => void
📝 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.

Suggested change
onTokenBalanceUpdated: (
contract_addresses: string[],
account_addresses: string[],
callback: Function
) => torii.Subscription;
onTokenBalanceUpdated: (
contract_addresses: string[],
account_addresses: string[],
callback: (balance: torii.TokenBalance) => void
) => torii.Subscription;
🧰 Tools
🪛 Biome (1.9.4)

[error] 340-340: Don't use 'Function' as a type.

Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.

(lint/complexity/noBannedTypes)

Copy link

@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: 0

♻️ Duplicate comments (1)
packages/sdk/src/types.ts (1)

337-341: ⚠️ Potential issue

Improve type safety of the callback parameter

The Function type should be replaced with a specific callback signature for better type safety, matching the implementation.

Apply this diff:

-callback: Function
+callback: (balance: torii.TokenBalance) => void
🧰 Tools
🪛 Biome (1.9.4)

[error] 340-340: Don't use 'Function' as a type.

Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.

(lint/complexity/noBannedTypes)

🧹 Nitpick comments (7)
examples/example-vite-kitchen-sink/README.md (1)

48-48: Fix typo in README

The phrase "you main want" appears to contain a typo.

-you main want to update `actions` contract address
+you may want to update the `actions` contract address
🧰 Tools
🪛 LanguageTool

[uncategorized] ~48-~48: You might be missing the article “the” here.
Context: ... ### Notes - you main want to updateactionscontract address insrc/compon...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

packages/sdk/src/index.ts (1)

238-248: Add error handling for async operation

The async method should include error handling to gracefully handle potential failures when updating the subscription.

 updateTokenBalanceSubscription: async (
     subscription: torii.Subscription,
     contract_addresses: string[],
     account_addresses: string[]
 ): Promise<void> => {
+    try {
         return await client.updateTokenBalanceSubscription(
             subscription,
             contract_addresses,
             account_addresses
         );
+    } catch (error) {
+        console.error("Failed to update token balance subscription:", error);
+        throw error;
+    }
 },
packages/create-burner/readme.md (5)

36-39: Adjust list indentation for consistency.

The features are well-structured and clearly communicate the package's capabilities. However, to maintain consistency with markdown standards, adjust the list indentation from 4 spaces to 2 spaces.

-    - Initialize and manage burner accounts.
-    - Abstracts away intricacies related to creating, fetching, and setting active burner accounts.
-    - Easily integrate with React apps using the provided hook.
-    - Vanilla JS support.
+  - Initialize and manage burner accounts.
+  - Abstracts away intricacies related to creating, fetching, and setting active burner accounts.
+  - Easily integrate with React apps using the provided hook.
+  - Vanilla JS support.

43-49: Standardize TOC indentation.

The Table of Contents structure is clear, but the indentation should be adjusted for consistency with markdown standards.

-    - [With React](#with-react)
-    - [Vanilla JavaScript](#vanilla-javascript)
+  - [With React](#with-react)
+  - [Vanilla JavaScript](#vanilla-javascript)
🧰 Tools
🪛 Markdownlint (0.37.0)

45-45: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


46-46: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


61-61: Consider expanding "In the wild" examples.

While the dojo-starter-react-app is a good reference, consider adding more real-world examples to showcase broader adoption and different use cases of the package.


93-111: Enhance API documentation.

The API documentation is comprehensive but could be improved in several ways:

  1. Fix indentation to use 2 spaces instead of 4 for consistency with markdown standards.
  2. Consider adding example usage for each method.
  3. Provide more detailed descriptions for methods like listConnectors().

Example enhancement for the listConnectors() method:

- `listConnectors()`: List all available connectors that can be used with Starknet React.
  Example:
  ```typescript
  const { listConnectors } = useBurner();
  const connectors = listConnectors();
  // connectors = [{ id: 'burner', name: 'Burner Account' }, ...]

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint (0.37.0)</summary>

95-95: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

96-96: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

97-97: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

98-98: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

99-99: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

100-100: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

101-101: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

104-104: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

105-105: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

106-106: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

107-107: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

108-108: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

109-109: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

110-110: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

111-111: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

</details>
<details>
<summary>🪛 LanguageTool</summary>

[uncategorized] ~95-~95: Loose punctuation mark.
Context: ... and more.      - `get(address: string)`: Get a burner account based on its addre...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~96-~96: Loose punctuation mark.
Context: ...unt based on its address.     - `list()`: List all burners.     - `select(address...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~97-~97: Loose punctuation mark.
Context: ...burners.     - `select(address: string)`: Set a burner as the active account.    ...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~98-~98: Loose punctuation mark.
Context: ... as the active account.     - `create()`: Create a new burner.     - `account`: T...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~99-~99: Loose punctuation mark.
Context: ...)`: Create a new burner.     - `account`: The active burner account.     - `isDep...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~100-~100: Loose punctuation mark.
Context: ...tive burner account.     - `isDeploying`: A boolean that indicates whether a burn...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...being deployed.     - `listConnectors()`: List all available connectors that can ...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~104-~104: Loose punctuation mark.
Context: ...o manage burner accounts.     - `init()`: Initializes the manager.     - `getActi...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~105-~105: Loose punctuation mark.
Context: ... the manager.     - `getActiveAccount()`: Retrieves the active burner account.   ...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~106-~106: Loose punctuation mark.
Context: ...er account.     - `get(address: string)`: Get a burner account based on its addre...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~107-~107: Loose punctuation mark.
Context: ...unt based on its address.     - `list()`: List all burners.     - `select(address...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~108-~108: Loose punctuation mark.
Context: ...burners.     - `select(address: string)`: Set a burner as the active account.    ...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~109-~109: Loose punctuation mark.
Context: ... as the active account.     - `create()`: Create a new burner.     - `account`: T...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~110-~110: Loose punctuation mark.
Context: ...)`: Create a new burner.     - `account`: The active burner account.     - `isDep...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~111-~111: Loose punctuation mark.
Context: ...tive burner account.     - `isDeploying`: A boolean that indicates whether a burn...

(UNLIKELY_OPENING_PUNCTUATION)

</details>

</details>

---

Line range hint `1-111`: **Overall documentation assessment.**

The documentation provides a clear and comprehensive overview of the package. However, consider:

1. Applying consistent 2-space indentation throughout all lists
2. Adding more real-world examples in the "In the wild" section
3. Enhancing API documentation with usage examples
4. Adding a "Getting Started" section with a complete example


Would you like me to help create a "Getting Started" section with a complete example that demonstrates the typical usage flow?

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint (0.37.0)</summary>

95-95: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

96-96: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

97-97: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

98-98: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

99-99: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

100-100: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

101-101: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

104-104: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

105-105: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

106-106: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

107-107: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

108-108: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

109-109: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

110-110: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

111-111: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

</details>
<details>
<summary>🪛 LanguageTool</summary>

[uncategorized] ~95-~95: Loose punctuation mark.
Context: ... and more.      - `get(address: string)`: Get a burner account based on its addre...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~96-~96: Loose punctuation mark.
Context: ...unt based on its address.     - `list()`: List all burners.     - `select(address...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~97-~97: Loose punctuation mark.
Context: ...burners.     - `select(address: string)`: Set a burner as the active account.    ...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~98-~98: Loose punctuation mark.
Context: ... as the active account.     - `create()`: Create a new burner.     - `account`: T...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~99-~99: Loose punctuation mark.
Context: ...)`: Create a new burner.     - `account`: The active burner account.     - `isDep...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~100-~100: Loose punctuation mark.
Context: ...tive burner account.     - `isDeploying`: A boolean that indicates whether a burn...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...being deployed.     - `listConnectors()`: List all available connectors that can ...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~104-~104: Loose punctuation mark.
Context: ...o manage burner accounts.     - `init()`: Initializes the manager.     - `getActi...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~105-~105: Loose punctuation mark.
Context: ... the manager.     - `getActiveAccount()`: Retrieves the active burner account.   ...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~106-~106: Loose punctuation mark.
Context: ...er account.     - `get(address: string)`: Get a burner account based on its addre...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~107-~107: Loose punctuation mark.
Context: ...unt based on its address.     - `list()`: List all burners.     - `select(address...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~108-~108: Loose punctuation mark.
Context: ...burners.     - `select(address: string)`: Set a burner as the active account.    ...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~109-~109: Loose punctuation mark.
Context: ... as the active account.     - `create()`: Create a new burner.     - `account`: T...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~110-~110: Loose punctuation mark.
Context: ...)`: Create a new burner.     - `account`: The active burner account.     - `isDep...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~111-~111: Loose punctuation mark.
Context: ...tive burner account.     - `isDeploying`: A boolean that indicates whether a burn...

(UNLIKELY_OPENING_PUNCTUATION)

</details>

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

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

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 5184801dc907993d70c1260d7ddb0505bc86fcc7 and 32db06cf32348b6b2d150e86817326f9fb35ce45.

</details>

<details>
<summary>📒 Files selected for processing (11)</summary>

* `.github/workflows/ci.yaml` (1 hunks)
* `.gitignore` (1 hunks)
* `examples/example-nodejs-bot/README.md` (1 hunks)
* `examples/example-vite-kitchen-sink/README.md` (1 hunks)
* `examples/example-vite-react-sdk/README.md` (2 hunks)
* `examples/example-vite-svelte-recs/README.md` (1 hunks)
* `package.json` (1 hunks)
* `packages/create-burner/readme.md` (3 hunks)
* `packages/sdk/src/index.ts` (1 hunks)
* `packages/sdk/src/types.ts` (1 hunks)
* `worlds/onchain-dash` (1 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (6)</summary>

* .gitignore
* examples/example-nodejs-bot/README.md
* examples/example-vite-react-sdk/README.md
* worlds/onchain-dash
* examples/example-vite-svelte-recs/README.md
* package.json

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 Biome (1.9.4)</summary>

<details>
<summary>packages/sdk/src/index.ts</summary>

[error] 217-217: Don't use 'Function' as a type.

Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.

(lint/complexity/noBannedTypes)

</details>
<details>
<summary>packages/sdk/src/types.ts</summary>

[error] 340-340: Don't use 'Function' as a type.

Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.

(lint/complexity/noBannedTypes)

</details>

</details>
<details>
<summary>🪛 LanguageTool</summary>

<details>
<summary>examples/example-vite-kitchen-sink/README.md</summary>

[uncategorized] ~48-~48: You might be missing the article “the” here.
Context: ...`  ### Notes  - you main want to update `actions` contract address in `src/compon...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

</details>
<details>
<summary>packages/create-burner/readme.md</summary>

[uncategorized] ~95-~95: Loose punctuation mark.
Context: ... and more.      - `get(address: string)`: Get a burner account based on its addre...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~96-~96: Loose punctuation mark.
Context: ...unt based on its address.     - `list()`: List all burners.     - `select(address...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~97-~97: Loose punctuation mark.
Context: ...burners.     - `select(address: string)`: Set a burner as the active account.    ...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~98-~98: Loose punctuation mark.
Context: ... as the active account.     - `create()`: Create a new burner.     - `account`: T...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~99-~99: Loose punctuation mark.
Context: ...)`: Create a new burner.     - `account`: The active burner account.     - `isDep...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~100-~100: Loose punctuation mark.
Context: ...tive burner account.     - `isDeploying`: A boolean that indicates whether a burn...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...being deployed.     - `listConnectors()`: List all available connectors that can ...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~104-~104: Loose punctuation mark.
Context: ...o manage burner accounts.     - `init()`: Initializes the manager.     - `getActi...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~105-~105: Loose punctuation mark.
Context: ... the manager.     - `getActiveAccount()`: Retrieves the active burner account.   ...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~106-~106: Loose punctuation mark.
Context: ...er account.     - `get(address: string)`: Get a burner account based on its addre...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~107-~107: Loose punctuation mark.
Context: ...unt based on its address.     - `list()`: List all burners.     - `select(address...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~108-~108: Loose punctuation mark.
Context: ...burners.     - `select(address: string)`: Set a burner as the active account.    ...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~109-~109: Loose punctuation mark.
Context: ... as the active account.     - `create()`: Create a new burner.     - `account`: T...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~110-~110: Loose punctuation mark.
Context: ...)`: Create a new burner.     - `account`: The active burner account.     - `isDep...

(UNLIKELY_OPENING_PUNCTUATION)

---

[uncategorized] ~111-~111: Loose punctuation mark.
Context: ...tive burner account.     - `isDeploying`: A boolean that indicates whether a burn...

(UNLIKELY_OPENING_PUNCTUATION)

</details>

</details>
<details>
<summary>🪛 Markdownlint (0.37.0)</summary>

<details>
<summary>packages/create-burner/readme.md</summary>

45-45: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

46-46: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

95-95: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

96-96: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

97-97: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

98-98: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

99-99: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

100-100: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

101-101: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

104-104: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

105-105: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

106-106: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

107-107: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

108-108: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

109-109: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

110-110: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

---

111-111: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (3)</summary>

<details>
<summary>.github/workflows/ci.yaml (1)</summary>

`23-23`: **LGTM! CI workflow updates are consistent**

The dojo version bump and addition of onchain-dash world testing steps are well-structured and follow existing patterns.



Also applies to: 28-31

</details>
<details>
<summary>packages/sdk/src/index.ts (1)</summary>

`214-224`: **Improve type safety of the callback parameter**

The `Function` type is too broad and can lead to runtime errors. This issue was previously identified and should be addressed.

```diff
-callback: Function
+callback: (balance: torii.TokenBalance) => void
🧰 Tools
🪛 Biome (1.9.4)

[error] 217-217: Don't use 'Function' as a type.

Prefer explicitly define the function shape. This type accepts any function-like value, which can be a common source of bugs.

(lint/complexity/noBannedTypes)

packages/sdk/src/types.ts (1)

355-359: LGTM! Well-documented method with proper type safety

The method signature and documentation are clear and complete. The types are properly defined for all parameters.

@MartianGreed MartianGreed merged commit 06afe72 into main Dec 27, 2024
2 of 3 checks passed
@MartianGreed MartianGreed deleted the feat/bump-dojo-1.0.9 branch December 27, 2024 08:46
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