from manticore.seth import ManticoreEVM m = ManticoreEVM() m.verbosity(3) #And now make the contract account to analyze source_code = file('coverage.sol').read() user_account = m.create_account(balance=1000) bytecode = m.compile(source_code) #Initialize contract contract_account = m.create_contract(owner=user_account, balance=0, init=bytecode) m.transaction( caller=user_account, address=contract_account, value=None, data=m.SByte(164), ) #Up to here we get only ~30% coverage. #We need 2 transactions to fully explore the contract m.transaction( caller=user_account, address=contract_account, value=None, data=m.SByte(164), )
from manticore.seth import ManticoreEVM seth = ManticoreEVM() seth.verbosity(3) #And now make the contract account to analyze source_code = file('coverage.sol').read() user_account = seth.create_account(balance=1000) bytecode = seth.compile(source_code) #Initialize contract contract_account = seth.create_contract(owner=user_account, balance=0, init=bytecode) seth.transaction( caller=user_account, address=contract_account, value=None, data=seth.SByte(164), ) #Up to here we get only ~30% coverage. #We need 2 transactions to fully explore the contract seth.transaction( caller=user_account, address=contract_account, value=None, data=seth.SByte(164), )