copyWith method

Transaction copyWith({
  1. XCBAddress? from,
  2. XCBAddress? to,
  3. int? maxEnergy,
  4. XCBAmount? energyPrice,
  5. XCBAmount? value,
  6. Uint8List? data,
  7. int? nonce,
  8. XCBAmount? maxPriorityFeePerEnergy,
  9. XCBAmount? maxFeePerEnergy,
})

Implementation

Transaction copyWith({
  XCBAddress? from,
  XCBAddress? to,
  int? maxEnergy,
  XCBAmount? energyPrice,
  XCBAmount? value,
  Uint8List? data,
  int? nonce,
  XCBAmount? maxPriorityFeePerEnergy,
  XCBAmount? maxFeePerEnergy,
}) {
  return Transaction(
    from: from ?? this.from,
    to: to ?? this.to,
    maxEnergy: maxEnergy ?? this.maxEnergy,
    energyPrice: energyPrice ?? this.energyPrice,
    value: value ?? this.value,
    data: data ?? this.data,
    nonce: nonce ?? this.nonce,
  );
}