Skip to content

Indexed parameters in events #40

Open
@pauliax

Description

@pauliax

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions