@@ -41,12 +41,6 @@ public struct EIP1559Envelope: EIP2718Envelope {
41
41
public var maxFeePerGas : BigUInt
42
42
public var accessList : [ AccessListEntry ] // from EIP-2930
43
43
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
-
50
44
// for CustomStringConvertible
51
45
public var description : String {
52
46
var toReturn = " "
@@ -76,9 +70,6 @@ public struct EIP1559Envelope: EIP2718Envelope {
76
70
value: value,
77
71
data: data,
78
72
gasLimit: gasLimit,
79
- // MARK: workaround for gasPrice coming from nodes for EIP-1159 - this allows Oracle to work for now
80
- gasPrice: gasPrice,
81
-
82
73
maxFeePerGas: maxFeePerGas,
83
74
maxPriorityFeePerGas: maxPriorityFeePerGas,
84
75
accessList: accessList
@@ -94,8 +85,6 @@ public struct EIP1559Envelope: EIP2718Envelope {
94
85
maxFeePerGas = val. maxFeePerGas ?? maxFeePerGas
95
86
maxPriorityFeePerGas = val. maxPriorityFeePerGas ?? maxPriorityFeePerGas
96
87
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
99
88
}
100
89
}
101
90
@@ -117,8 +106,6 @@ extension EIP1559Envelope {
117
106
case v
118
107
case r
119
108
case s
120
- // MARK: workaround for gasPrice coming from nodes for EIP-1159 - this allows Oracle to work for now
121
- case gasPrice
122
109
}
123
110
124
111
public init ? ( from decoder: Decoder ) throws {
@@ -147,9 +134,6 @@ extension EIP1559Envelope {
147
134
self . to = ethAddr
148
135
}
149
136
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
-
153
137
self . value = try container. decodeHexIfPresent ( BigUInt . self, forKey: . value) ?? 0
154
138
self . maxPriorityFeePerGas = try container. decodeHexIfPresent ( BigUInt . self, forKey: . maxPriorityFeePerGas) ?? 0
155
139
self . maxFeePerGas = try container. decodeHexIfPresent ( BigUInt . self, forKey: . maxFeePerGas) ?? 0
@@ -212,7 +196,7 @@ extension EIP1559Envelope {
212
196
213
197
// swiftlint:disable force_unwrapping
214
198
switch rlpItem [ RlpKey . destination. rawValue] !. content {
215
- // swiftlint:enable force_unwrapping
199
+ // swiftlint:enable force_unwrapping
216
200
case . noItem:
217
201
self . to = EthereumAddress . contractDeploymentAddress ( )
218
202
case . data( let addressData) :
0 commit comments