copyWith method

ETHTransaction copyWith({
  1. ETHTransactionType? type,
  2. ETHAddress? to,
  3. ETHAddress? from,
  4. int? nonce,
  5. BigInt? gasLimit,
  6. BigInt? gasPrice,
  7. BigInt? maxPriorityFeePerGas,
  8. BigInt? maxFeePerGas,
  9. List<int>? data,
  10. BigInt? value,
  11. BigInt? chainId,
  12. List<int>? hash,
  13. List<AccessListEntry>? accessList,
  14. ETHSignature? signature,
})

Creates a copy of the ETHTransaction with updated fields.

Implementation

ETHTransaction copyWith(
        {ETHTransactionType? type,
        ETHAddress? to,
        ETHAddress? from,
        int? nonce,
        BigInt? gasLimit,
        BigInt? gasPrice,
        BigInt? maxPriorityFeePerGas,
        BigInt? maxFeePerGas,
        List<int>? data,
        BigInt? value,
        BigInt? chainId,
        List<int>? hash,
        List<AccessListEntry>? accessList,
        ETHSignature? signature}) =>
    ETHTransaction._(
        type: type ?? this.type,
        to: to ?? this.to,
        from: from ?? this.from,
        nonce: nonce ?? this.nonce,
        accessList: accessList ?? this.accessList,
        gasLimit: gasLimit ?? this.gasLimit,
        gasPrice: gasPrice ?? this.gasPrice,
        maxPriorityFeePerGas:
            maxPriorityFeePerGas ?? this.maxPriorityFeePerGas,
        maxFeePerGas: maxFeePerGas ?? this.maxFeePerGas,
        data: data ?? this.data,
        value: value ?? this.value,
        chainId: chainId ?? this.chainId,
        signature: signature ?? this.signature);