-
Notifications
You must be signed in to change notification settings - Fork 194
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(bindgen): add AccountInterface
to function
#2770
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
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.
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
AccountInterface
as another type to the typescript function bindgen.Related issue
In
dojo.js
theDojoProvider.execute
accepts the account input with typeAccount | AccountInterface
:This is specifically relevant with
starknet-react
that defines accounts as theAccountInterface
type, however the bindgen is only generating account inputs as typeAccount
. Therefore, currently thestarknet-react
accounts need to be mapped to theAccount
type 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
Account
andAccountInterface
types as inputs.Bug Fixes