sbip-sg / solc-json-parser

A Powerful AST Parser for Solidity
12 stars 1 forks source link

Parsing Contracts with importing from path "../" or with prefix #38

Closed YoHoSo closed 1 year ago

YoHoSo commented 1 year ago

When I was using SolcAST to build the evm signature database, I find out that we need to provide the remapping option and allow-path option to support compiling contracts with importing from path "../" or with prefix.

cassc commented 1 year ago

You can use the script solc_json_parser/fix_imports.py to fix imports first. For example,

python solc_json_parser/fix_imports.py  --root folder_of_some_contracts/

Please be aware that this script will change the files in place.