Skip to content

Commit 9d96252

Browse files
authored
Fix Starknet event ID calculation (#1138)
1 parent 3e6ba6e commit 9d96252

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dipdup/abi/cairo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def sn_keccak(x: str) -> str:
5757

5858
# NOTE: Create keccak256 hash in bytes and return hex representation of the first 250 bits.
5959
keccak_hash = keccak.new(data=x.encode('ascii'), digest_bits=256).digest()
60-
return f'0x{int.from_bytes(keccak_hash, "big") & (1 << 248) - 1:x}'
60+
return f'0x{int.from_bytes(keccak_hash, "big") & (1 << 250) - 1:x}'
6161

6262

6363
@cache

0 commit comments

Comments
 (0)