Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
Refactor the ABI generation logic to happen within the new type objects.
How I did it
_metadata
attribute to all node objects. This is an all-purpose dict for annotating nodes with information that doesn't strictly belong in the AST. For now it's being used very sparingly, but this is the approach I'm envisioning for passing type-check info into LLL gen. So good to discuss it now while there aren't many places to change it, if desired.to_abi_dict
methods toContractFunction
,Event
andInterfacePrimitive
objects. The logic is largely copied from the oldEventSignature
andFunctionSignature
objects.InterfacePrimitive
from the top-level node during type checking, and add it to the_metadata
so it can be used to build the ABI.signatures/
How to verify it
Run the test suite. There is already extensive coverage around ABI generation.
Cute Animal Picture