setCallPayload method

Contract setCallPayload({
  1. String? transition,
  2. List<Map>? params,
  3. BigInt? amount,
  4. int? gasLimit,
  5. BigInt? gasPrice,
  6. bool toDS = false,
})

Implementation

Contract setCallPayload(
    {String? transition,
    List<Map>? params,
    BigInt? amount,
    int? gasLimit,
    BigInt? gasPrice,
    bool toDS = false}) {
  Map msg = {
    '_tag': transition,
    'params': params,
  };
  Map txnParams = Map.from(this.callPayload);
  Map newMaps = {
    'amount': amount,
    'gasPrice': gasPrice,
    'gasLimit': gasLimit,
    'data': json.encode(msg)
  };
  txnParams.addAll(newMaps);
  this.transaction = new Transaction(
      params: txnParams, messenger: this.messenger, toDS: toDS);
  return this;
}