Transaction.callContract constructor
Transaction.callContract({
- required DeployedContract contract,
- required ContractFunction function,
- required List parameters,
- EthereumAddress? from,
- dynamic maxGas,
- EtherAmount? gasPrice,
- EtherAmount? value,
- int? nonce,
- EtherAmount? maxFeePerGas,
- 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,
);
}