Skip to content
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 Inputs return types to match VM #6107

Closed
bitzoic opened this issue Jun 10, 2024 · 0 comments · Fixed by #6108
Closed

Update Inputs return types to match VM #6107

bitzoic opened this issue Jun 10, 2024 · 0 comments · Fixed by #6108
Assignees
Labels
lib: std Standard library

Comments

@bitzoic
Copy link
Member

bitzoic commented Jun 10, 2024

Some of the functions in the Inputs library return types do not match the VM spec, these need to be updated to reflect the changes made.

@bitzoic bitzoic added the lib: std Standard library label Jun 10, 2024
@bitzoic bitzoic self-assigned this Jun 10, 2024
@bitzoic bitzoic linked a pull request Jun 10, 2024 that will close this issue
8 tasks
bitzoic added a commit that referenced this issue Jun 12, 2024
## Description

There have been changes to the VM specs where the return type has been
updated from `u16` to `u64` or from `u8` to `u16` for inputs. These
changes are now reflected in the std-lib's `Inputs` library. Specs:
https://github.com/FuelLabs/fuel-specs/blob/master/src/tx-format/input.md

Closes #6107 

## Breaking

This is a breaking change. Any use of the following will need to be
updated:

- `input_count()` now returns a `u16`
- `input_witness_index()` now returns a `Option<u16>`
- `input_predicate_length()` now returns a `Option<u64>`
- `input_predicate_data_length()` now returns a `Option<u64>`
- `input_message_data_length()` now returns a `u64`

## Checklist

- [x] I have linked to any relevant issues.
- [x] I have commented my code, particularly in hard-to-understand
areas.
- [x] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [ ] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [x] I have added tests that prove my fix is effective or that my
feature works.
- [x] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [x] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [x] I have requested a review from the relevant team or maintainers.

---------

Co-authored-by: IGI-111 <igi-111@protonmail.com>
Co-authored-by: K1-R1 <77465250+K1-R1@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib: std Standard library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant