@@ -41,12 +41,6 @@ public struct EIP1559Envelope: EIP2718Envelope {
4141 public var maxFeePerGas : BigUInt
4242 public var accessList : [ AccessListEntry ] // from EIP-2930
4343
44- /// EIP-1159 trnsactions do not have a gasPrice parameter
45- /// However, it appears that some nodes report a gasPrice, even for EIP-1159 transactions
46- /// thus for a temporary workaround we capture and store gasPrice if initialized from a JSON transaction
47- /// decided form a node. This is currently needed for Oracle to work
48- private var gasPrice : BigUInt = 0
49-
5044 // for CustomStringConvertible
5145 public var description : String {
5246 var toReturn = " "
@@ -76,9 +70,6 @@ public struct EIP1559Envelope: EIP2718Envelope {
7670 value: value,
7771 data: data,
7872 gasLimit: gasLimit,
79- // MARK: workaround for gasPrice coming from nodes for EIP-1159 - this allows Oracle to work for now
80- gasPrice: gasPrice,
81-
8273 maxFeePerGas: maxFeePerGas,
8374 maxPriorityFeePerGas: maxPriorityFeePerGas,
8475 accessList: accessList
@@ -94,8 +85,6 @@ public struct EIP1559Envelope: EIP2718Envelope {
9485 maxFeePerGas = val. maxFeePerGas ?? maxFeePerGas
9586 maxPriorityFeePerGas = val. maxPriorityFeePerGas ?? maxPriorityFeePerGas
9687 accessList = val. accessList ?? accessList
97- // MARK: workaround for gasPrice coming from nodes for EIP-1159 - this allows Oracle to work for now
98- gasPrice = val. gasPrice ?? gasPrice
9988 }
10089 }
10190
@@ -117,8 +106,6 @@ extension EIP1559Envelope {
117106 case v
118107 case r
119108 case s
120- // MARK: workaround for gasPrice coming from nodes for EIP-1159 - this allows Oracle to work for now
121- case gasPrice
122109 }
123110
124111 public init ? ( from decoder: Decoder ) throws {
@@ -147,9 +134,6 @@ extension EIP1559Envelope {
147134 self . to = ethAddr
148135 }
149136
150- // MARK: workaround for gasPrice coming from nodes for EIP-1159 - this allows Oracle to work for now
151- self . gasPrice = try container. decodeHexIfPresent ( BigUInt . self, forKey: . gasPrice) ?? 5000000000
152-
153137 self . value = try container. decodeHexIfPresent ( BigUInt . self, forKey: . value) ?? 0
154138 self . maxPriorityFeePerGas = try container. decodeHexIfPresent ( BigUInt . self, forKey: . maxPriorityFeePerGas) ?? 0
155139 self . maxFeePerGas = try container. decodeHexIfPresent ( BigUInt . self, forKey: . maxFeePerGas) ?? 0
@@ -212,7 +196,7 @@ extension EIP1559Envelope {
212196
213197 // swiftlint:disable force_unwrapping
214198 switch rlpItem [ RlpKey . destination. rawValue] !. content {
215- // swiftlint:enable force_unwrapping
199+ // swiftlint:enable force_unwrapping
216200 case . noItem:
217201 self . to = EthereumAddress . contractDeploymentAddress ( )
218202 case . data( let addressData) :
0 commit comments