-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: support raw_slice
returns from scripts and contracts
#743
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.
Haven't seen all the discussions around this, is this supported only by scripts, or can contract methods return raw_slice
as well?
If so we should probably cover that with tests as well.
Co-authored-by: Ahmed Sagdati <37515857+segfault-magnet@users.noreply.github.com>
This is needed for FuelLabs/sway#3450 and for #742 eventually. Spec issue: FuelLabs/fuel-specs#446 Compiler change: FuelLabs/sway#3450
Breaking changes: - Predicate instantiation - Sending funds to and receiving funds from predicates
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. Good work! Left a nit...
Co-authored-by: Halil Beglerović <git@hal3e.io>
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.
Great work, very clean implementation!
- This PR closes #703 by adding support for returning a `raw untyped slice` in scripts and contracts. - This PR maps the Sway type `raw untyped slice` to the SDK type `RawSlice`. - It only works with `u64` because the memory size of a `u64` is used to decode the returned `raw untyped slice`.
- This PR closes #703 by adding support for returning a `raw untyped slice` in scripts and contracts. - This PR maps the Sway type `raw untyped slice` to the SDK type `RawSlice`. - It only works with `u64` because the memory size of a `u64` is used to decode the returned `raw untyped slice`.
This PR closes #703 by adding support for `raw untyped slice` in scripts. It adds the possibility of returning a vector from a script, as basically an array of `u64`. Co-authored-by: Ahmed Sagdati <37515857+segfault-magnet@users.noreply.github.com> Co-authored-by: Anton Trunov <anton.a.trunov@gmail.com> Co-authored-by: Halil Beglerović <git@hal3e.io>
- This PR closes #703 by adding support for returning a `raw untyped slice` in scripts and contracts. - This PR maps the Sway type `raw untyped slice` to the SDK type `RawSlice`. - It only works with `u64` because the memory size of a `u64` is used to decode the returned `raw untyped slice`.
This PR closes #703 by adding support for `raw untyped slice` in scripts. It adds the possibility of returning a vector from a script, as basically an array of `u64`. Co-authored-by: Ahmed Sagdati <37515857+segfault-magnet@users.noreply.github.com> Co-authored-by: Anton Trunov <anton.a.trunov@gmail.com> Co-authored-by: Halil Beglerović <git@hal3e.io>
This PR closes #703 by adding support for `raw untyped slice` in scripts. It adds the possibility of returning a vector from a script, as basically an array of `u64`. Co-authored-by: Ahmed Sagdati <37515857+segfault-magnet@users.noreply.github.com> Co-authored-by: Anton Trunov <anton.a.trunov@gmail.com> Co-authored-by: Halil Beglerović <git@hal3e.io>
This PR closes #703 by adding support for `raw untyped slice` in scripts. It adds the possibility of returning a vector from a script, as basically an array of `u64`. Co-authored-by: Ahmed Sagdati <37515857+segfault-magnet@users.noreply.github.com> Co-authored-by: Anton Trunov <anton.a.trunov@gmail.com> Co-authored-by: Halil Beglerović <git@hal3e.io>
This PR closes #703 by adding support for
raw untyped slice
in scripts.It adds the possibility of returning a vector from a script, as basically an array of
u64
.