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
VIP: Generate ABI from Vyper interface #1944
Comments
Meeting notes: Introducing the ellipse operator |
Ran into an issue with this - currently our ABI includes gas estimates for each function, but obviously we can't do that for an interface. I think the best approach is to separate the gas estimate from the ABI via #1997. But does removing gas estimates from the ABI constitute a breaking change? Alternatively we could only include gas costs when it's possible to calculate them. |
This sounds like what we'd want to do |
In relation to your comment here #1951 (comment), I think it may actually be better to encourage people to use |
Simple Summary
It should be possible to generate an ABI from a Vyper interface.
Currently this fails with an error of "Missing or Unmatched return statements".
Motivation
A Vyper interface and an ABI are essentially different formats of the same information. It should be possible to convert from one to the other.
Specification
.vyi
to differentiate between vyper interfaces and vyper contracts....
for the function body within interfaces.In general - if an ABI is to be compiled from a contract, that contract should be compilable. If an ABI is generated from an interface, the compiler should recognize this and not attempt to compile it. The presence of
...
, and nothing else, within a function body, serves as an indicator that this is an interface not a contract.Backwards Compatibility
No issues.
Copyright
Copyright and related rights waived via CC0
The text was updated successfully, but these errors were encountered: