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 library return types to match VM specs #6108

Merged
merged 6 commits into from
Jun 12, 2024
Merged

Conversation

bitzoic
Copy link
Member

@bitzoic bitzoic commented Jun 10, 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

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@bitzoic bitzoic added lib: std Standard library breaking May cause existing user code to break. Requires a minor or major release. labels Jun 10, 2024
@bitzoic bitzoic self-assigned this Jun 10, 2024
@bitzoic bitzoic requested review from a team as code owners June 10, 2024 09:59
@bitzoic bitzoic linked an issue Jun 10, 2024 that may be closed by this pull request
@bitzoic bitzoic enabled auto-merge (squash) June 12, 2024 07:13
@bitzoic bitzoic merged commit e3eb823 into master Jun 12, 2024
34 checks passed
@bitzoic bitzoic deleted the bitzoic-6107 branch June 12, 2024 07:28
@woolworthgralt

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking May cause existing user code to break. Requires a minor or major release. lib: std Standard library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Inputs return types to match VM
4 participants