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

abi reconstruction (--guess-abi) requires an address to be provided even though it should work without #16

Open
gsalzer opened this issue Oct 16, 2018 · 1 comment
Labels

Comments

@gsalzer
Copy link

gsalzer commented Oct 16, 2018

edit (original title): crash when using -A without -a

Apparently ABI reconstruction (option -A) takes the contract address from the commandline option -a. If the hex code is provided verbatim or in a file, this address is missing and the program generates a dump:

reconstructed ABI:
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/user/.local/lib/python3.6/site-packages/ethereum_dasm/__main__.py", line 7, in <module>
    evmdasm.main()
  File "/home/user/.local/lib/python3.6/site-packages/ethereum_dasm/evmdasm.py", line 659, in main
    print(contract.guess_abi())
  File "/home/user/.local/lib/python3.6/site-packages/ethereum_dasm/evmdasm.py", line 104, in guess_abi
    raise Exception("address required.")
Exception: address required.

@tintinweb
Copy link
Owner

Hi @gsalzer,

atm this is by intention as the ABI guessing code is quite experimental and not yet prepared to work without an address (it is basically checking an online source first and then merging this info with what we derive from the disassembly). Once I finish the implementation it should also work without having to provide the correct address.

I'll turn your issue into a feature request.

cheers,
tin

@tintinweb tintinweb changed the title crash when using -A without -a abi reconstruction (--guess-abi) requires an address to be provided even though it should work without Oct 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants