cryptokitties-bounty-2 icon indicating copy to clipboard operation
cryptokitties-bounty-2 copied to clipboard

Indexed parameters in events

Open pauliax opened this issue 6 years ago • 2 comments

Description

Consider adding "indexed" keyword next to the event parameters like address, IDs, etc. The indexed parameters allow filtering events by a specific value.

Impact

This is only useful for the frontend when fetching and displaying Blockchain data. It does not cause any security issues.

Fix

Here is an example:

  event OfferCreated(
        uint256 indexed tokenId,
        address indexed bidder,
        uint256 expiresAt,
        uint256 total,
        uint256 offerPrice
    );

so you can later filter OfferCreated by tokenId or bidder.

Ethereum address

0x09Cf79Bdf8F68739979C8c825C103A7538Bd4f4b

pauliax avatar Nov 18 '18 20:11 pauliax

Thanks @pauliax for your feedback! We will take it into consideration.

hwrdtm avatar Nov 19 '18 22:11 hwrdtm

Thanks for your participation, @pauliax! Our team has reviewed your submission and decided to reject the issue.

arthcmr avatar Nov 27 '18 00:11 arthcmr