decode_function_args

Documentation for eth_defi.abi.decode_function_args function.

decode_function_args(func, data)[source]

Decode binary CALL or CALLDATA to a Solidity function,

Uses web3.Contract.functions prepared function as the ABI source.

Parameters
  • func (web3.contract.contract.ContractFunction) – Function which arguments we are going to encode.

  • data (bytes | hexbytes.main.HexBytes) – Extracted from a transaction data field or EVM memoryo trace.

Returns

Ordered dict of the decoded arguments

Return type

dict