-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: AST nodes [APE-967] #105
Conversation
ct_data["userdoc"] = load_dict(ct_data["userdoc"]) | ||
ct_data["devdoc"] = load_dict(ct_data["devdoc"]) | ||
ct_data["sourcemap"] = evm_data["bytecode"]["sourceMap"] | ||
ct_data["ast"] = ast |
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.
would be nice to be able to filter out AST nodes that are specific to this contract, but not sure that is a very easy task.
(currently if 2 contracts are in same file, they have exact same AST structure)
"packaging", # Use the version ape requires | ||
"requests", | ||
"typing-extensions==4.5.0", # Can be removed onced pinned in Core. |
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.
once pydantic updates, we should be good: pydantic/pydantic#5824
What I did
How I did it
For the input JSON, you have to put
"ast"
at the source level; not the contract level, for it to work.This means Ape is slightly bloated in that will have duplicate AST info when contracts are stored in the same file.
this will be needed for contract flattening (i think, based on looking at past implementation), that is why i added it
How to verify it
Can now play with the AST node in contracts.
Checklist