get_transaction_data_field
Documentation for eth_defi.abi.get_transaction_data_field function.
- get_transaction_data_field(tx)[source]
Get the “Data” payload of a transaction.
Ethereum Tester has this in tx.data while Ganache has this in tx.input. Yes, it is madness.
Example:
tx = web3.eth.get_transaction(tx_hash) function, input_args = router.decode_function_input(get_transaction_data_field(tx)) print("Transaction {tx_hash} called function {function}")
- Parameters
tx (web3.datastructures.AttributeDict) –
- Return type