trace_evm_transaction

Documentation for eth_defi.trace.trace_evm_transaction function.

trace_evm_transaction(web3, tx_hash, trace_method=TraceMethod.parity)[source]

Trace a (failed) transaction.

  • See print_symbolic_trace() for usage

  • Extract an EVM transaction stack trace from a node, using GoEthereum compatible debug_traceTransaction

  • Currently only works with Anvil backend and if steps_trace=True

Parameters
  • web3 (web3.main.Web3) – Anvil connection

  • tx_hash (hexbytes.main.HexBytes | str) – Transaction to trace

  • trace_method (eth_defi.trace.TraceMethod) –

    How to trace.

    Choose between debug_traceTransaction and trace_transaction RPCs.

Return type

evm_trace.base.CallTreeNode