Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: added default initializer for EthereumParameters;
  • Loading branch information
JeneaVranceanu committed Jul 19, 2022
commit a9461c92e23cf06d4987cf33dd1fb2d974fdb132
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