Skip to content

Commit a9461c9

Browse files
fix: added default initializer for EthereumParameters;
1 parent 647a0dc commit a9461c9

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Sources/web3swift/Transaction/EthereumParameters.swift

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,30 @@ public struct EthereumParameters {
4949

5050
/// access list for contract execution (EIP-2930 and EIP-1559 only)
5151
public var accessList: [AccessListEntry]?
52+
53+
public init(type: TransactionType? = nil,
54+
to: EthereumAddress? = nil,
55+
nonce: BigUInt? = nil,
56+
chainID: BigUInt? = nil,
57+
value: BigUInt? = nil,
58+
data: Data? = nil,
59+
gasLimit: BigUInt? = nil,
60+
gasPrice: BigUInt? = nil,
61+
maxFeePerGas: BigUInt? = nil,
62+
maxPriorityFeePerGas: BigUInt? = nil,
63+
accessList: [AccessListEntry]? = nil) {
64+
self.type = type
65+
self.to = to
66+
self.nonce = nonce
67+
self.chainID = chainID
68+
self.value = value
69+
self.data = data
70+
self.gasLimit = gasLimit
71+
self.gasPrice = gasPrice
72+
self.maxFeePerGas = maxFeePerGas
73+
self.maxPriorityFeePerGas = maxPriorityFeePerGas
74+
self.accessList = accessList
75+
}
5276
}
5377

5478
public extension EthereumParameters {

0 commit comments

Comments
 (0)