feat(bindgen): add AccountInterface to function - #2770
Conversation
WalkthroughOhayo, sensei! The recent changes in the Changes
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🔇 Additional comments (4)crates/dojo/bindgen/src/lib.rs (1)
The changes enhance the test's robustness by:
crates/dojo/bindgen/src/plugins/typescript/generator/function.rs (3)
The import statement now correctly includes both
The change to support both
The test expectations have been properly updated to reflect the new type signature, ensuring the changes are thoroughly verified. Also applies to: 300-300, 315-315 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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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
Documentation and Community
|
AccountInterface to function
glihm
left a comment
There was a problem hiding this comment.
Thank you @starknetdev for the addition, @MartianGreed any additional comment on this?
|
Perfect ! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2770 +/- ##
==========================================
+ Coverage 55.50% 55.67% +0.17%
==========================================
Files 434 434
Lines 54295 54542 +247
==========================================
+ Hits 30137 30368 +231
- Misses 24158 24174 +16 ☔ View full report in Codecov by Sentry. |
Description
This PR adds
AccountInterfaceas another type to the typescript function bindgen.Related issue
In
dojo.jstheDojoProvider.executeaccepts the account input with typeAccount | AccountInterface:This is specifically relevant with
starknet-reactthat defines accounts as theAccountInterfacetype, however the bindgen is only generating account inputs as typeAccount. Therefore, currently thestarknet-reactaccounts need to be mapped to theAccounttype before being passed to the bindings.Tests
Added to documentation?
Checklist
scripts/prettier.sh,scripts/rust_fmt.sh,scripts/cairo_fmt.sh)scripts/clippy.sh,scripts/docs.sh)Summary by CodeRabbit
New Features
AccountandAccountInterfacetypes as inputs.Bug Fixes