trace

Documentation for eth_defi.trace Python module.

Symbolic transaction tracing and human-readable Solidity stack traces.

  • This code is very preliminary and has not been througly tested with different smart contracts, so patches welcome

  • Internally use evm-trace library from Ape

  • Currently only works with Anvil (eth_defi.anvil) backend

Functions

assert_call_success_with_explanation(func[, ...])

Make a Web3.call and if it fails get the Solidity stack trace.

assert_transaction_success_with_explanation(...)

Checks if a transaction succeeds and give a verbose explanation why not..

print_symbolic_trace(contract_registry, calltree)

Print a symbolic trace of an Ethereum transaction.

trace_evm_call(web3, tx[, trace_method, ...])

Trace a Solidity function call.

trace_evm_transaction(web3, tx_hash[, ...])

Trace a (failed) transaction.

Classes

SymbolicTreeRepresentation

A EVM trace tree that can resolve contract names and functions.

TraceMethod

What kind of transaction tracing method we use.

Exceptions

TraceNotEnabled

Tracing is not enabled on the backend.

TransactionAssertionError

Exception thrown when unit test transaction asset fails.