Transaction.callContract constructor

Transaction.callContract({
  1. required DeployedContract contract,
  2. required ContractFunction function,
  3. required List parameters,
  4. EthereumAddress? from,
  5. BigInt? gas,
  6. BigInt? maxGas,
  7. BigInt? gasPrice,
  8. EtherAmount? value,
  9. int? nonce,
  10. BigInt? maxFeePerGas,
  11. BigInt? maxPriorityFeePerGas,
})

Constructs a transaction that can be used to call a contract function.

Implementation

Transaction.callContract({
  required DeployedContract contract,
  required ContractFunction function,
  required List<dynamic> parameters,
  this.from,
  this.gas,
  this.maxGas,
  this.gasPrice,
  this.value,
  this.nonce,
  this.maxFeePerGas,
  this.maxPriorityFeePerGas,
})  : to = contract.address,
      data = function.encodeCall(parameters);