Transaction.callContract constructor

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

Implementation

factory Transaction.callContract({
  required DeployedContract contract,
  required ContractFunction function,
  required List<dynamic> parameters,
  EthereumAddress? from,
  dynamic maxGas,
  EtherAmount? gasPrice,
  EtherAmount? value,
  int? nonce,
  EtherAmount? maxFeePerGas,
  EtherAmount? maxPriorityFeePerGas,
}) {
  return Transaction(
    from: from,
    to: contract.address,
    data: function.encodeCall(parameters),
    maxGas: maxGas,
    gasPrice: gasPrice,
    value: value,
    nonce: nonce,
    maxFeePerGas: maxFeePerGas,
    maxPriorityFeePerGas: maxPriorityFeePerGas,
  );
}