File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Sources/web3swift/Transaction Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ public struct EthereumTransaction: CustomStringConvertible {
14
14
/// and type specific implementation
15
15
internal var envelope : AbstractEnvelope
16
16
17
+ /// storage container for additional metadata returned by the node
18
+ /// when a transaction is decoded form a JSON stream
19
+ public var meta : EthereumMetadata ?
20
+
17
21
// convenience accessors to the common envelope fields
18
22
// everything else should come from getOpts/setOpts
19
23
/// The type of the transacton being represented, see TransactionType enum
@@ -227,6 +231,8 @@ extension EthereumTransaction: Decodable {
227
231
public init ( from decoder: Decoder ) throws {
228
232
guard let env = try EnvelopeFactory . createEnvelope ( from: decoder) else { throw Web3Error . dataError }
229
233
self . envelope = env
234
+ // capture any metadata that might be present
235
+ self . meta = try EthereumMetadata ( from: decoder)
230
236
}
231
237
}
232
238
You can’t perform that action at this time.
0 commit comments