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

enhancement: support for Sway array types #1411

Merged
merged 3 commits into from
Oct 17, 2023

Conversation

ra0x3
Copy link
Contributor

@ra0x3 ra0x3 commented Oct 12, 2023

Thanks for opening a PR with the Fuel Indexer project. Please review the Checklist below and ensure you've completed all of the necessary steps to make this PR review as painless as possible.

Checklist

  • Ensure your top-level commit message is in line with our contributor guidelines.
  • Please add proper labels.
  • If there is an issue associated with this PR, please link the issue (right-hand sidebar)
  • If there is not an issue associated with this PR, add this PR to the "Fuel Indexer" project (right-hand sidebar)
  • Please allow Codeowners at least 24 hours to do a first-pass review.
  • Please add thoroughly detailed testing steps below.
  • Please keep your Changelog message short and sweet.

Description

  • PR adds support for indexing array types from Sway contracts
    • Array types are primitives (rust primitives) so no decoding work to be done

Testing steps

  • CI should pass (because an existing test was used for this work)

Changelog

  • enhancement: support for Sway array types

@ra0x3 ra0x3 self-assigned this Oct 12, 2023
@ra0x3 ra0x3 linked an issue Oct 12, 2023 that may be closed by this pull request
@ra0x3 ra0x3 marked this pull request as ready for review October 13, 2023 12:28
lostman
lostman previously approved these changes Oct 16, 2023
deekerno
deekerno previously approved these changes Oct 17, 2023
Copy link
Contributor

@deekerno deekerno left a comment

Choose a reason for hiding this comment

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

LGTM, left one non-blocking (but important) comment.

Comment on lines 133 to 136
.unwrap()
.trim_end_matches(']')
.parse::<usize>()
.unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we switch these unwraps for expects? Seems that the other additions have expects, so we should be consistent.

@ra0x3 ra0x3 dismissed stale reviews from deekerno and lostman via f1e5f02 October 17, 2023 12:24
@ra0x3 ra0x3 merged commit 0eb480f into develop Oct 17, 2023
5 checks passed
@ra0x3 ra0x3 deleted the rashad/1384-array-types-support branch October 17, 2023 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate support for Array [_; n] Sway types
3 participants