copyWith method

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

Implementation

Transaction copyWith({
  EthereumAddress? from,
  EthereumAddress? to,
  BigInt? gas,
  BigInt? maxGas,
  BigInt? gasPrice,
  EtherAmount? value,
  Uint8List? data,
  int? nonce,
  BigInt? maxPriorityFeePerGas,
  BigInt? maxFeePerGas,
}) {
  return Transaction(
    from: from ?? this.from,
    to: to ?? this.to,
    gas: gas ?? this.gas,
    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,
  );
}