copyWith method

Transaction copyWith({
  1. EthereumAddress? from,
  2. EthereumAddress? to,
  3. int? maxGas,
  4. EtherAmount? gasPrice,
  5. EtherAmount? value,
  6. Uint8List? data,
  7. int? nonce,
  8. EtherAmount? maxPriorityFeePerGas,
  9. EtherAmount? maxFeePerGas,
})

Implementation

Transaction copyWith({
  EthereumAddress? from,
  EthereumAddress? to,
  int? maxGas,
  EtherAmount? gasPrice,
  EtherAmount? value,
  Uint8List? data,
  int? nonce,
  EtherAmount? maxPriorityFeePerGas,
  EtherAmount? maxFeePerGas,
}) {
  return Transaction(
    from: from ?? this.from,
    to: to ?? this.to,
    maxGas: maxGas ?? this.maxGas,
    gasPrice: gasPrice ?? this.gasPrice,
    value: value ?? this.value,
    data: data ?? this.data,
    nonce: nonce ?? this.nonce,
    maxFeePerGas: maxFeePerGas ?? this.maxFeePerGas,
    maxPriorityFeePerGas: maxPriorityFeePerGas ?? this.maxPriorityFeePerGas,
  );
}