-
Notifications
You must be signed in to change notification settings - Fork 100
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
PassAll
gas option for program to program calls
#1417
base: main
Are you sure you want to change the base?
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.
I think this PR's functionality is important but I don't think a Gas
enum is the best way to do it. It seems much more intuitive to have gas be a field of context
. This way we can keep the u64 type(which is nice for dev experience and contract readability) and also have access to the actual amount of gas via the context
.
Good point @samliok ! Thanks |
Actually I'm not sure if that's totally correct. We already have the |
Closes #1184
Create a new
Gas
type that replaces the current alias by an enum that can either bePassAll
orUnits(NonZeroU64)
. The newPassAll
works around the current way of spending gas, namely callingConsumeFuel
with the passedFuel
parameter and refunding any unused gas by callingAddFuel
after the execution.