encode_function_args

Documentation for eth_defi.abi.encode_function_args function.

encode_function_args(func, args)[source]

Mimic Solidity’s abi.encodeWithSignature() in Python.

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

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

  • args (Sequence) – Argument values to be encoded.

Return type

bytes