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 {
1414 /// and type specific implementation
1515 internal var envelope : AbstractEnvelope
1616
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+
1721 // convenience accessors to the common envelope fields
1822 // everything else should come from getOpts/setOpts
1923 /// The type of the transacton being represented, see TransactionType enum
@@ -227,6 +231,8 @@ extension EthereumTransaction: Decodable {
227231 public init ( from decoder: Decoder ) throws {
228232 guard let env = try EnvelopeFactory . createEnvelope ( from: decoder) else { throw Web3Error . dataError }
229233 self . envelope = env
234+ // capture any metadata that might be present
235+ self . meta = try EthereumMetadata ( from: decoder)
230236 }
231237}
232238
You can’t perform that action at this time.
0 commit comments