OriginProtocol / OriginProtocol/origin-dollar
Mock contract MockRebornMinter.sol causes Slither/Echidna failure
Nobody has claimed this yet.
- Dominant language
- Solidity
- Stars
- 152
- Forks
- 115
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 17
Description
When running Echidna, it first runs slither the following way:
slither . --ignore-compile --print echidna --json -
See this line of code in Echidna.
That generates an error:
{"success": false, "error": "Traceback (most recent call last):\n File \"/Users/tom/.pyenv/versions/3.7.7/lib/python3.7/site-packages/slither/__main__.py\", line 712, in main_impl\n ) = process_all(filename, args, detector_classes, printer_classes)\n File \"/Users/tom/.pyenv/versions/3.7.7/lib/python3.7/site-packages/slither/__main__.py\", line 82, in process_all\n ) = process_single(compilation, args, detector_classes, printer_classes)\n File \"/Users/tom/.pyenv/versions/3.7.7/lib/python3.7/site-packages/slither/__main__.py\", line 67, in process_single\n return _process(slither, detector_classes, printer_classes)\n File \"/Users/tom/.pyenv/versions/3.7.7/lib/python3.7/site-packages/slither/__main__.py\", line 114, in _process\n printer_results = slither.run_printers()\n File \"/Users/tom/.pyenv/versions/3.7.7/lib/python3.7/site-packages/slither/slither.py\", line 192, in run_printers\n return [p.output(self._crytic_compile.target).data for p in self._printers]\n File \"/Users/tom/.pyenv/versions/3.7.7/lib/python3.7/site-packages/slither/slither.py\", line 192, in <listcomp>\n return [p.output(self._crytic_compile.target).data for p in self._printers]\n File \"/Users/tom/.pyenv/versions/3.7.7/lib/python3.7/site-packages/slither/printers/guidance/echidna.py\", line 376, in output\n call_parameters = _call_a_parameter(self.slither)\n File \"/Users/tom/.pyenv/versions/3.7.7/lib/python3.7/site-packages/slither/printers/guidance/echidna.py\", line 318, in _call_a_parameter\n \"signature\": _get_name(ir.function),\n File \"/Users/tom/.pyenv/versions/3.7.7/lib/python3.7/site-packages/slither/printers/guidance/echidna.py\", line 37, in _get_name\n if f.is_fallback or f.is_receive:\nAttributeError: 'StateVariable' object has no attribute 'is_fallback'\n", "results": {}}
This is caused by the MockRebornMinter.sol
A workaround is to delete that contract when running Echidna, but it would be good to figure out a better solution.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with MockRebornMinter.sol and reproduce the failure using slither . --ignore-compile --print echidna --json - while running Echidna. Read the reported Slither Echidna printer path and determine a project-side fix for the StateVariable/is_fallback error. Done means Echidna can run without deleting MockRebornMinter.sol or triggering this Slither failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- blockchain, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100