Transaction constructor

Transaction(
  1. int chainTag,
  2. String blockRef,
  3. String expiration,
  4. List<Clause> clauses,
  5. String gasPriceCoef,
  6. String gas,
  7. String? dependsOn,
  8. String nonce,
  9. Reserved? reserved,
)

Construct a Transaction. @param chainTag eg. "1" @param blockRef eg. "0x00000000aabbccdd" @param expiration eg. "32" @param clauses See Clause.java @param gasPriceCoef eg. "128" @param gas eg. "21000" @param dependsOn eg. "0x..." as block ID, or null if not wish to depends on. @param nonce eg. "12345678", as a random positive number max width is 8 bytes. @param reserved See Reserved.java

Implementation

Transaction(
    int chainTag,
    String blockRef,
    String expiration,
    this.clauses,
    String gasPriceCoef,
    String gas,
    String? dependsOn, // can be null
    String nonce,
    Reserved? reserved // can be null
    ) {
  this.chainTag.setValueBigInt(BigInt.from(chainTag));
  this.blockRef.setValue(blockRef);
  this.expiration.setValueString(expiration);

  this.gasPriceCoef.setValueString(gasPriceCoef);
  this.gas.setValueString(gas);
  this.dependsOn.setValue(dependsOn);
  this.nonce.setValueString(nonce);
  if (reserved == null) {
    this.reserved = Reserved.getNullReserved();
  } else {
    this.reserved = reserved;
  }
}