-
Notifications
You must be signed in to change notification settings - Fork 1.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
Initial interface for contract calls #9
Conversation
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.
LGTM
let salt: [u8; 32] = rng.gen(); | ||
let salt = Salt::from(salt); |
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.
let salt: [u8; 32] = rng.gen(); | |
let salt = Salt::from(salt); | |
let salt: Salt = rng.gen(); |
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.
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 will figure this out on the next PR I'll be submitting soon, need to merge this 😅.
Introduces an interface contract calls. Right now it only performs very basic calls to contracts and scripts deployment + execution (scripts not related to contracts).
Contract calls can be done like this:
And simple script execution from within the SDK, like this:
You can jump straight to
fuels-rs/tests/calls.rs
to see how it works.The next step is to bind this interface to the functions generated by the
abigen!
and craftscript_data
on the fly in order to call specific functions from a deployed contract.Closes #4.