getContractFunction static method

ContractFunction getContractFunction(
  1. String methodName,
  2. EthereumAddress contractAddress,
  3. ContractAbi abi
)

Returns a ContractFunction instance for a given method.

  • methodName: The name of the method in the contract.
  • contractAddress: The address of the contract.
  • abi: The ABI of the contract.

Returns a ContractFunction.

Implementation

static ContractFunction getContractFunction(
    String methodName, EthereumAddress contractAddress, ContractAbi abi) {
  final instance = DeployedContract(abi, contractAddress);
  return instance.function(methodName);
}