-
Notifications
You must be signed in to change notification settings - Fork 719
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 BAL balance opcode #226
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.
One small formatting change. The specification looks fine!
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.
I'm fine with it as-is, but can you make an issue to track fixing possible inconsistent use of balance
and balanceOf
?
Should also probably update with the new details about panic reasons added to the rest of the opcodes in #227. |
Does the color need to be in |
No, because it's getting the balance of a colored coin for a contract, of any color. |
The opcode implementation brings the ability to inspect the balance of a given color+contract tuple. This allows the test case `mint_burn` to be moved to the integrated scope since before this opcode, there was no way to fetch the balance of the tuple without inspecting the internals of the interpreter. Follows FuelLabs/fuel-specs#226
The opcode implementation brings the ability to inspect the balance of a given color+contract tuple. This allows the test case `mint_burn` to be moved to the integrated scope since before this opcode, there was no way to fetch the balance of the tuple without inspecting the internals of the interpreter. Follows FuelLabs/fuel-specs#226
Address #225.
TR
andTRO
opcodes. But this seems to make more sense if we want to add aSELFBAL
opcode in the future for getting the balance of the current contract ID, where we would just drop the contract ID argument.