Skip to content

Commit

Permalink
fix: added default initializer for EthereumParameters;
Browse files Browse the repository at this point in the history
  • Loading branch information
JeneaVranceanu committed Jul 19, 2022
1 parent 647a0dc commit a9461c9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Sources/web3swift/Transaction/EthereumParameters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,30 @@ public struct EthereumParameters {

/// access list for contract execution (EIP-2930 and EIP-1559 only)
public var accessList: [AccessListEntry]?

public init(type: TransactionType? = nil,
to: EthereumAddress? = nil,
nonce: BigUInt? = nil,
chainID: BigUInt? = nil,
value: BigUInt? = nil,
data: Data? = nil,
gasLimit: BigUInt? = nil,
gasPrice: BigUInt? = nil,
maxFeePerGas: BigUInt? = nil,
maxPriorityFeePerGas: BigUInt? = nil,
accessList: [AccessListEntry]? = nil) {
self.type = type
self.to = to
self.nonce = nonce
self.chainID = chainID
self.value = value
self.data = data
self.gasLimit = gasLimit
self.gasPrice = gasPrice
self.maxFeePerGas = maxFeePerGas
self.maxPriorityFeePerGas = maxPriorityFeePerGas
self.accessList = accessList
}
}

public extension EthereumParameters {
Expand Down

0 comments on commit a9461c9

Please sign in to comment.