copyWith method
TransactionRequest
copyWith({
- String? to,
- BigInt? value,
- Uint8List? data,
- BigInt? gasLimit,
- BigInt? gasPrice,
- BigInt? maxFeePerGas,
- BigInt? maxPriorityFeePerGas,
- BigInt? nonce,
- int? chainId,
- TransactionType? type,
- List<
AccessListEntry> ? accessList, - List<
String> ? blobVersionedHashes, - BigInt? maxFeePerBlobGas,
- List<
Authorization> ? authorizationList,
Creates a copy with updated fields.
Implementation
TransactionRequest copyWith({
String? to,
BigInt? value,
Uint8List? data,
BigInt? gasLimit,
BigInt? gasPrice,
BigInt? maxFeePerGas,
BigInt? maxPriorityFeePerGas,
BigInt? nonce,
int? chainId,
TransactionType? type,
List<AccessListEntry>? accessList,
List<String>? blobVersionedHashes,
BigInt? maxFeePerBlobGas,
List<Authorization>? authorizationList,
}) {
return TransactionRequest(
to: to ?? this.to,
value: value ?? this.value,
data: data ?? this.data,
gasLimit: gasLimit ?? this.gasLimit,
gasPrice: gasPrice ?? this.gasPrice,
maxFeePerGas: maxFeePerGas ?? this.maxFeePerGas,
maxPriorityFeePerGas: maxPriorityFeePerGas ?? this.maxPriorityFeePerGas,
nonce: nonce ?? this.nonce,
chainId: chainId ?? this.chainId,
type: type ?? this.type,
accessList: accessList ?? this.accessList,
blobVersionedHashes: blobVersionedHashes ?? this.blobVersionedHashes,
maxFeePerBlobGas: maxFeePerBlobGas ?? this.maxFeePerBlobGas,
authorizationList: authorizationList ?? this.authorizationList,
);
}