-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add increment functionality to b256
#4787
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK, mainly approving based on tests
I dont see any tests for testing that the b256 doesnt overflow |
As far as I'm aware there is no |
@bitzoic You can add it as an end-to-end test, perhaps. Those can expect panics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we discussed, I think that b256
shouldn't have arithmetic operations, and that we should introduce a u256
primitive type instead to support those.
Closing in favor of #4794 |
Description
There are currently no mathematical operations allowed on a b256 in Sway. This should come with support of fuel-core v0.19.0 but for now we are able to add an increment function now.
This is critical functionality to storage optimizations that are in progress.
Closes #4781
Checklist
Breaking*
orNew Feature
labels where relevant.