Skip to content

Commit

Permalink
Fix Starknet event ID calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kus committed Nov 20, 2024
1 parent bed745f commit dc468db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dipdup/abi/cairo.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def sn_keccak(x: str) -> str:

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


@cache
Expand Down

0 comments on commit dc468db

Please sign in to comment.