This repository was archived by the owner on Feb 18, 2025. It is now read-only.
This repository was archived by the owner on Feb 18, 2025. It is now read-only.
[Bug-Candidate]: Error downloading from bscscan #16
Open
Description
Describe the issue:
It looks like I'm getting a crash when trying to run diffusc
on two contracts on BSC.
Chances are at least 50/50 that I'm doing something wrong 🙂
Code example to reproduce the issue:
diffusc 0x5dDDD9E7Aa629Be635Bf1b4311cCD680eB765883 0xa778088a07669EBFE5d3c5BAb357E526D39142C5 -V 0.8.17 -r -R https://bsc-dataseed1.binance.org/ -n bsc
Version:
❯ diffusc --version
0.1.0
Relevant log output:
* Inspecting V1 and V2 contracts:
* Using 'fork mode':
* Network specified via command line parameter: bsc
* RPC specified via command line parameter: https://bsc-dataseed1.binance.org/
* Warning: Block explorer API key not found. Either specify a key using the -K flag or set it with the ETHERSCAN_API_KEY environment variable.
* Getting information from address 0x5dDDD9E7Aa629Be635Bf1b4311cCD680eB765883
* Looking for contract 0x5dDDD9E7Aa629Be635Bf1b4311cCD680eB765883 in cache.
* Did not find contract 0x5dDDD9E7Aa629Be635Bf1b4311cCD680eB765883 in cache. Downloading...
Traceback (most recent call last):
File "/home/rappie/.pyenv/versions/diffusc/bin/diffusc", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/rappie/Desktop/repos/diffusc/diffusc/diffusc.py", line 255, in main
contract = analysis.write_test_contract()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rappie/Desktop/repos/diffusc/diffusc/core/analysis_mode.py", line 94, in write_test_contract
self.analyze_contracts()
File "/home/rappie/Desktop/repos/diffusc/diffusc/core/fork_mode.py", line 191, in analyze_contracts
self._v1 = get_contract_data_from_address(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rappie/Desktop/repos/diffusc/diffusc/utils/from_address.py", line 84, in get_contract_data_from_address
contract_data["slither"] = slither_provider.get_slither_from_address(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rappie/Desktop/repos/diffusc/diffusc/utils/slither_provider.py", line 107, in get_slither_from_address
slither = Slither(f"{self._network_prefix}:{address}", **args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rappie/.pyenv/versions/diffusc/lib/python3.11/site-packages/slither/slither.py", line 114, in __init__
parser.parse_top_level_from_loaded_json(ast, path)
File "/home/rappie/.pyenv/versions/diffusc/lib/python3.11/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 205, in parse_top_level_from_loaded_json
if data_loaded[self.get_key()] == "root":
~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'name'
Metadata
Metadata
Assignees
Labels
No labels