-
-
Notifications
You must be signed in to change notification settings - Fork 791
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
Modification of abi format to include gas cost estimate for functions… #308
Conversation
viper/compiler.py
Outdated
gas_estimates = gas_estimate(code) | ||
for idx, func in enumerate(abi): | ||
func_name = func['name'].split('(')[0] | ||
print(func_name) |
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.
Remove this print plz
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.
Duh, fixed. Thanks!
Had to reorder the commits because I tried re-basing this branch and made a mistake. |
@vbuterin see any problems with this? |
@DavidKnott What do you think of this update? Is there a potential problem with adding a field to the ABI output? |
I don't think so, I'll look into it |
@fubuloubu I think as of now gas estimation isn't accurate enough to be included in the abi. Right now gas estimation fails on quite a few the tests in |
I think it would be easier to debug if that information was actually available in the ABI as it at least shows a bigger picture, and also if the gas estimation feature were working correctly then this update still works the same way and provides those more accurate updates in the same way. I don't believe this update creates any new bugs as it is fairly simple and unobtrusive, and #306 shows it is a useful feature to have in the long term. This is alpha software after all, no guarantees on correct output just yet. |
@fubuloubu Looked at this again and I think you're right, merging it in. |
… (skips constructor)