-
Notifications
You must be signed in to change notification settings - Fork 51
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
ABI parser #108
ABI parser #108
Conversation
boa/vyper/abi.py
Outdated
) | ||
|
||
|
||
def parse_abi_type(abi: dict) -> VyperType: |
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.
i think maybe a more robust method will be to go directly from the ABI dict/json format to an ABI (string) signature. i used the vyper parser as a shortcut to be compatible with the VyperFunction
machinery but if we need to rewrite the prepare_calldata/__call__
machinery think we can just bypass it (parsing to vyper types) at this point.
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.
i think eth-abi
or eth-stdlib
(both included as dependencies already) should have some utilities for this. also may want to wrap the dependency as is done in boa/util/abi.py
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.
What do you think about this TODO?
Line 29 in 71058ad
# todo: eth.codecs.abi does not have such a function, which one do we use? |
…abi-parsing-bugs
…abi-parsing-bugs
boa/util/evm.py
Outdated
|
||
class _EvmContract: | ||
""" | ||
Base class for the electrum virtual machine contracts: |
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.
Base class for the electrum virtual machine contracts: | |
Base class for EVM (Ethereum Virtual Machine) contracts: |
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.
😱
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.
this is looking fairly good. i would say we probably need an overall directory restructuring. how about something like the following:
boa/
boa/contract/
boa/contract/base_evm_contract.py
boa/contract/abi/
boa/contract/abi/... # everything currently in boa/abi.py
boa/contract/vyper/... # everything currently in boa/vyper/...
751a466
to
41338d5
Compare
Moving to #115 so the pipeline can run properly without the fork |
Fixes #106