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

Modification of abi format to include gas cost estimate for functions… #308

Merged
merged 2 commits into from
Sep 6, 2017

Conversation

fubuloubu
Copy link
Member

… (skips constructor)

gas_estimates = gas_estimate(code)
for idx, func in enumerate(abi):
func_name = func['name'].split('(')[0]
print(func_name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this print plz

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duh, fixed. Thanks!

@fubuloubu
Copy link
Member Author

Had to reorder the commits because I tried re-basing this branch and made a mistake.

@fubuloubu
Copy link
Member Author

@vbuterin see any problems with this?

@fubuloubu
Copy link
Member Author

@DavidKnott What do you think of this update? Is there a potential problem with adding a field to the ABI output?

@DavidKnott
Copy link
Contributor

I don't think so, I'll look into it

@DavidKnott
Copy link
Contributor

@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 test_parser.py. I think gas estimation functionality needs to be improved before this gets merged.

@fubuloubu
Copy link
Member Author

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.

@DavidKnott
Copy link
Contributor

@fubuloubu Looked at this again and I think you're right, merging it in.

@DavidKnott DavidKnott merged commit f879014 into vyperlang:master Sep 6, 2017
@fubuloubu fubuloubu deleted the gas_cost_abi branch September 6, 2017 20:06
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