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 11# Nimbus
2- # Copyright (c) 2024 Status Research & Development GmbH
2+ # Copyright (c) 2024-2025 Status Research & Development GmbH
33# Licensed under either of
44# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
55# http://www.apache.org/licenses/LICENSE-2.0)
2222
2323const
2424 depositRequestSize = 192
25+ DEPOSIT_EVENT_SIGNATURE_HASH = bytes32 " 0x649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5"
2526
2627type
2728 DepositRequest = array [depositRequestSize, byte ]
@@ -73,7 +74,9 @@ func depositLogToRequest(data: openArray[byte]): DepositRequest =
7374func parseDepositLogs * (logs: openArray [Log ], depositContractAddress: Address ): Result [seq [byte ], string ] =
7475 var res = newSeqOfCap [byte ](logs.len* depositRequestSize)
7576 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):
7780 continue
7881 if log.data.len != 576 :
7982 return err (" deposit wrong length: want 576, have " & $ log.data.len)
You can’t perform that action at this time.
0 commit comments