Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.
This repository was archived by the owner on Jul 21, 2023. It is now read-only.

Example in README fails #1

Description

@Melvillian

Setup:

  1. clone repo
  2. export MYTHX_API_KEY
  3. cd to scribble-exercise-2
  4. run the following command
➜  scribble-exercise-2 git:(master) mythx \
    --format simple \
    analyze --mode standard contracts/VulnerableERC721.sol \
    --check-properties \
    --scribble \
    --solc-version 0.6.2

which results in the error:

Traceback (most recent call last):
  File "/home/melvillian/.local/bin/mythx", line 8, in <module>
    sys.exit(cli())
  File "/home/melvillian/.local/lib/python3.8/site-packages/mythx_cli/cli.py", line 43, in __call__
    return self.main(*args, **kwargs)
  File "/home/melvillian/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/melvillian/.local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/melvillian/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/melvillian/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/melvillian/.local/lib/python3.8/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/home/melvillian/.local/lib/python3.8/site-packages/mythx_cli/analyze/command.py", line 251, in analyze
    job.generate_payloads(
  File "/home/melvillian/.local/lib/python3.8/site-packages/mythx_cli/analyze/solidity.py", line 235, in generate_payloads
    payload = self.payload_from_sources(
  File "/home/melvillian/.local/lib/python3.8/site-packages/mythx_cli/analyze/solidity.py", line 50, in payload_from_sources
    payload_dict["source"] = compiled_sources["source"]
KeyError: 'source'
➜  scribble-exercise-1 git:(master) ✗ /usr/bin/python3 --version                                                                                      [09:09:15]
Python 3.8.10

If it helps at all, I'm getting the same error in the scribble-exercise-1 repo when I run:

mythx analyze --scribble --solc-version 0.6.12 contracts/**/*.sol

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions