Skip to content

Commit d745aca

Browse files
chore: updated docs and removed + minor clean up
1 parent ef06fbf commit d745aca

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Sources/Core/Transaction/CodableTransaction.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ extension CodableTransaction {
407407
/// - nonce: nonce for this transaction (default 0)
408408
/// - chainID: chainId the transaction belongs to (default: type specific)
409409
/// - value: Native value for the transaction (default 0)
410-
/// - data: Payload data for the transaction (required)
410+
/// - data: Payload data for the transaction (default 0 bytes)
411411
/// - v: signature v parameter (default 1) - will get set properly once signed
412412
/// - r: signature r parameter (default 0) - will get set properly once signed
413413
/// - s: signature s parameter (default 0) - will get set properly once signed
@@ -417,14 +417,14 @@ extension CodableTransaction {
417417
gasLimit: BigUInt = 0, maxFeePerGas: BigUInt? = nil, maxPriorityFeePerGas: BigUInt? = nil, gasPrice: BigUInt? = nil,
418418
accessList: [AccessListEntry]? = nil, v: BigUInt = 1, r: BigUInt = 0, s: BigUInt = 0) {
419419
self.accessList = accessList
420-
self.gasLimitPolicy = .automatic
421-
self.noncePolicy = .pending
422-
self.gasPricePolicy = .automatic
423-
self.maxFeePerGasPolicy = .automatic
424-
self.maxPriorityFeePerGasPolicy = .automatic
425-
self.callOnBlock = .latest
426-
427-
self.envelope = EnvelopeFactory.createEnvelope(type: type, to: to, nonce: nonce, chainID: chainID, value: value, data: data, gasLimit: gasLimit, maxFeePerGas: maxFeePerGas, maxPriorityFeePerGas: maxPriorityFeePerGas, gasPrice: gasPrice, accessList: accessList, v: v, r: r, s: s)
420+
gasLimitPolicy = .automatic
421+
noncePolicy = .pending
422+
gasPricePolicy = .automatic
423+
maxFeePerGasPolicy = .automatic
424+
maxPriorityFeePerGasPolicy = .automatic
425+
callOnBlock = .latest
426+
427+
envelope = EnvelopeFactory.createEnvelope(type: type, to: to, nonce: nonce, chainID: chainID, value: value, data: data, gasLimit: gasLimit, maxFeePerGas: maxFeePerGas, maxPriorityFeePerGas: maxPriorityFeePerGas, gasPrice: gasPrice, accessList: accessList, v: v, r: r, s: s)
428428
}
429429
}
430430

0 commit comments

Comments
 (0)