You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using shorter 4-byte event ids for event signature matching is error-prone and can lead to unnecessary collisions:
$ cast sig 'Transfer(address,address,uint256)'
0xddf252ad
$ cast sig 'BeckerrJon(bytes16,bytes4,bytes23,bytes16,bytes1,bytes7,bytes1)'
0xddf252ad
$ cast sig-event 'Transfer(address,address,uint256)'
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
$ cast sig-event 'BeckerrJon(bytes16,bytes4,bytes23,bytes16,bytes1,bytes7,bytes1)'
0xddf252ade8bdc6f18de3868ae50ab6e67ee261b7136b3141cd791f1ad4786a79
At last, 4-byte method_id definition in FunctionSelector struct does not make a lot of sense for events, a full 32-byte selector would be more useful in practice.
The text was updated successfully, but these errors were encountered:
ABI spec stores full 32-byte event selectors in
topic0
- https://docs.soliditylang.org/en/v0.8.23/abi-spec.html#events, which is a slightly different behavior than the 4-byte selectors used for methods and errors.Using shorter 4-byte event ids for event signature matching is error-prone and can lead to unnecessary collisions:
At last, 4-byte
method_id
definition inFunctionSelector
struct does not make a lot of sense for events, a full 32-byte selector would be more useful in practice.The text was updated successfully, but these errors were encountered: