File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,16 @@ public struct EventFilter {
66
66
}
67
67
}
68
68
}
69
+
70
+ public init ( fromBlock: Block ? , toBlock: Block ? ,
71
+ addresses: [ EthereumAddress ] ? = nil ,
72
+ parameterFilters: [ [ EventFilterable ] ? ] ? = nil ) {
73
+ self . fromBlock = fromBlock
74
+ self . toBlock = toBlock
75
+ self . addresses = addresses
76
+ self . parameterFilters = parameterFilters
77
+ }
78
+
69
79
public var fromBlock : Block ?
70
80
public var toBlock : Block ?
71
81
public var addresses : [ EthereumAddress ] ?
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ public struct EventLog {
130
130
guard let ad = json [ " address " ] as? String else { return nil }
131
131
guard let d = json [ " data " ] as? String else { return nil }
132
132
guard let li = json [ " logIndex " ] as? String else { return nil }
133
- guard let rm = json [ " removed " ] as? Int else { return nil }
133
+ let rm = json [ " removed " ] as? Int ?? 0
134
134
guard let tpc = json [ " topics " ] as? [ String ] else { return nil }
135
135
guard let addr = EthereumAddress ( ad) else { return nil }
136
136
address = addr
You can’t perform that action at this time.
0 commit comments