Transaction.callContract constructor

Transaction.callContract({
  1. required DeployedContract contract,
  2. required ContractFunction function,
  3. required List parameters,
  4. XCBAddress? from,
  5. int? maxEnergy,
  6. XCBAmount? energyPrice,
  7. XCBAmount? value,
  8. int? nonce,
})

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.maxEnergy,
  this.energyPrice,
  this.value,
  this.nonce,
}) : to = contract.address,
     data = function.encodeCall(parameters);