To add crytic-compile options to argparser:
crytic-compile
from crytic_compile import cryticparser ... cryticparser.init(parser)
To compile a project:
from crytic_compile import CryticCompile, InvalidCompilation ... args = parser.parse_args() try: cryticCompile = CryticCompile(**vars(args)) for contract in cryticCompile.contracts_name: print(f'Contract {contract}') print(f'ABI: {cryticCompile.abi(contract)}') print(f'Init bytecode: {cryticCompile.init_bytecode(contract)}') print(f'Runtime bytecode: {cryticCompile.runtime_bytecode(contract)}') except InvalidCompilation as e: logger.error(e)
There was an error while loading. Please reload this page.