-
Notifications
You must be signed in to change notification settings - Fork 761
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
Can't analysis import contained contracts #1708
Comments
Nice catch! You'll have to remove the comma at the end. It should be
Make sure that the file PRC20.sol is in your remapped directory (i.e. |
I already removed the , but tells that node_modules/PRC20PRC20.sol is not there |
I also installed But get me this error : |
There is no library named PRC20. It's just a spoof of ERC20. You likely missed a |
I followed this tutorial : https://mythril-classic.readthedocs.io/en/develop/tutorial.html
and I use the following command :
myth analyze contract01 --solc-json json.json
but I get a python error.
Here's json.json content:
{ "remappings": [ "@openzeppelin/contracts/token/PRC20/=node_modules/PRC20" ], }
Here's contract01 content:
`
import "@openzeppelin/contracts/token/PRC20/PRC20.sol";
contract Nothing is PRC20{
string x_0 = "";
}
`
Here's error I get :
File "/usr/local/lib/python3.8/dist-packages/mythril/interfaces/cli.py", line 938, in parse_args_and_execute address = load_code(disassembler, args) File "/usr/local/lib/python3.8/dist-packages/mythril/interfaces/cli.py", line 693, in load_code address, _ = disassembler.load_from_solidity( File "/usr/local/lib/python3.8/dist-packages/mythril/mythril/mythril_disassembler.py", line 175, in load_from_solidity self.sigs.import_solidity_file( File "/usr/local/lib/python3.8/dist-packages/mythril/support/signatures.py", line 245, in import_solidity_file solc_json = get_solc_json(file_path, solc_binary, solc_settings_json) File "/usr/local/lib/python3.8/dist-packages/mythril/ethereum/util.py", line 56, in get_solc_json settings = json.load(f) File "/usr/lib/python3.8/json/__init__.py", line 293, in load return loads(fp.read(), File "/usr/lib/python3.8/json/__init__.py", line 357, in loads return _default_decoder.decode(s) File "/usr/lib/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.8/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 3 column 1 (char 79)
The text was updated successfully, but these errors were encountered: