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

feat: add support for Bytes and RawSlice inputs #904

Merged
merged 23 commits into from
Apr 6, 2023

Conversation

hal3e
Copy link
Contributor

@hal3e hal3e commented Mar 23, 2023

closes: #879 and #878
co-developed with: @segfault-magnet

Bytes and RawSlice can be nested arbitrarily deep in custom types. We have added e2e test for contracts, scripts and predicates.

Checklist

  • I have linked to any relevant issues.
  • I have updated the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary labels.
  • 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.

@hal3e hal3e added the enhancement New feature or request label Mar 23, 2023
@hal3e hal3e requested a review from a team March 23, 2023 16:14
Copy link
Contributor

@iqdecay iqdecay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, especially the tests! I have one concern about the Bytes type we accept to encode.

packages/fuels-core/src/abi_encoder.rs Outdated Show resolved Hide resolved
packages/fuels-types/src/param_types.rs Show resolved Hide resolved
packages/fuels/tests/types/contracts/bytes/src/main.sw Outdated Show resolved Hide resolved
packages/fuels/tests/types/contracts/raw_slice/src/main.sw Outdated Show resolved Hide resolved
packages/fuels/tests/types_predicates.rs Outdated Show resolved Hide resolved
packages/fuels/tests/types_predicates.rs Outdated Show resolved Hide resolved
packages/fuels/tests/types_predicates.rs Show resolved Hide resolved
Copy link
Member

@digorithm digorithm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work and awesome tests! I left just a couple of comments, not really a hard request for changes, so this is essentially an approval.

segfault-magnet and others added 3 commits April 5, 2023 03:22
Co-authored-by: Ahmed Mujkic <32431923+MujkicA@users.noreply.github.com>
…fuels-rs into segfault-hal3e/bytes-as-inputs
Copy link
Member

@digorithm digorithm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice -- great work!

@hal3e hal3e dismissed iqdecay’s stale review April 6, 2023 11:52

should be resolved

@hal3e hal3e merged commit f5d08d6 into master Apr 6, 2023
@hal3e hal3e deleted the segfault-hal3e/bytes-as-inputs branch April 6, 2023 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: support Bytes as argument
5 participants