-
Notifications
You must be signed in to change notification settings - Fork 11.4k
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
Update build-test.md #7235
Update build-test.md #7235
Conversation
correct test with filter no change is required to the imports bug running code --> simplify code sword_create(&mut forge, 42, 7, initial_owner, test_scenario::ctx(scenario)); │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ │ │ │ │ Found 5 argument(s) here │ Invalid call of '(my_first_package=0x0)::my_module::sword_create'. The call expected 4 argument(s) but got 5
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
thanks @georgescharlesbrain Adding another reviewer |
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.
A small comment/question about a section that was removed, but otherwise, LGTM. Thanks for contributing @georgescharlesbrain !
@@ -247,19 +250,9 @@ The code of the new functions is self-explanatory and uses struct | |||
creation and Sui-internal modules (`TxContext` and `Transfer`) in a | |||
way similar to what we have seen in the previous sections. The | |||
important part is for the entry functions to have correct signatures | |||
as described [earlier](index.md#entry-functions). In order for this code to |
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.
I couldn't figure out why this exposition wasn't necessary anymore -- the entry functions do introduce a reference to TxContext
. Having said that, one clean-up you can now make is to remove the unreferenced _ctx: &mut TxContext
parameter from sword_transfer
as entry functions are now allowed to omit that parameter if it goes unused.
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.
Because I was not required to do this part.
Earlier in the tutorial at defining the package I had already imported TxContext. Mentioning that you first need to import a struct before using it was already clear at this stage in the tutorials.
I'll leave the _ctx: &mut TxContext
parameter in for now.
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.
Thanks for answering my query @georgescharlesbrain. We still need @randall-Mysten or @ronny-mysten to review the copy, so adding them back -- the PR is all good from my side.
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.
Thanks for confirming Ashok!
correct test with filter
no change is required to the imports
bug running code --> simplify code
Why is the forge object required? This can't be passed to sword_create...
Already got my answer by continuing with the tutorial.
Code simplification is desired here though. So the code actually runs at this stage in the tutorial.