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

Support for u256 constants #4887

Merged
merged 5 commits into from
Jul 31, 2023
Merged

Support for u256 constants #4887

merged 5 commits into from
Jul 31, 2023

Conversation

xunilrj
Copy link
Contributor

@xunilrj xunilrj commented Jul 31, 2023

Description

This PR is part of #4794. It implements the bare minimum to support u256 constants across the stack.

They are represented in sway in hex literals with u256 suffixes. Hex without suffix will still be b256, for backward compatibility until we implement u256 completely. Then we can decide what to do.

There are multiple places in the code that will fail if the literal does not fit in u64. This will be fixed later in a specific PR for big u256. Some places have temporary unwrap(), that will be removed later. I can try to remove them now, if necessary.

I am leaving all documentation updates for when everything is implemented.

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.

@xunilrj xunilrj requested a review from a team July 31, 2023 09:42
vaivaswatha
vaivaswatha previously approved these changes Jul 31, 2023
@xunilrj xunilrj dismissed stale reviews from anton-trunov and vaivaswatha via 598befc July 31, 2023 12:50
@xunilrj xunilrj merged commit ad856d2 into master Jul 31, 2023
@xunilrj xunilrj deleted the xunilrj/u256-constants branch July 31, 2023 14:22
@xunilrj xunilrj mentioned this pull request Jul 27, 2023
19 tasks
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.

3 participants