File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Nimbus
2
- # Copyright (c) 2024 Status Research & Development GmbH
2
+ # Copyright (c) 2024-2025 Status Research & Development GmbH
3
3
# Licensed under either of
4
4
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
5
5
# http://www.apache.org/licenses/LICENSE-2.0)
22
22
23
23
const
24
24
depositRequestSize = 192
25
+ DEPOSIT_EVENT_SIGNATURE_HASH = bytes32 " 0x649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5"
25
26
26
27
type
27
28
DepositRequest = array [depositRequestSize, byte ]
@@ -73,7 +74,9 @@ func depositLogToRequest(data: openArray[byte]): DepositRequest =
73
74
func parseDepositLogs * (logs: openArray [Log ], depositContractAddress: Address ): Result [seq [byte ], string ] =
74
75
var res = newSeqOfCap [byte ](logs.len* depositRequestSize)
75
76
for i, log in logs:
76
- if log.address != depositContractAddress:
77
+ let isDepositEvent = log.topics.len > 0 and
78
+ log.topics[0 ] == DEPOSIT_EVENT_SIGNATURE_HASH
79
+ if not (log.address == depositContractAddress and isDepositEvent):
77
80
continue
78
81
if log.data.len != 576 :
79
82
return err (" deposit wrong length: want 576, have " & $ log.data.len)
You can’t perform that action at this time.
0 commit comments