moonstream-to / moonworm

codegen for crypto degens and other ethereum smart contract toolkit for python
Apache License 2.0
36 stars 7 forks source link

Fix to bypass exception when no constructor #107

Closed kompotkot closed 1 year ago

kompotkot commented 1 year ago

Changes

If there are no constractor it throws an error:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/ubuntu/project/project_cli.py", line 26, in <module>
    if CONTRACT_FUNCTIONS["constructor"] is None:
KeyError: 'constructor'

How to test these changes?

Tested locally

Related issues

zomglings commented 1 year ago

@Andrei-Dolgolev : Can you please approve?