Apart from aiding off-chain integrators in consuming and filtering such an event, primitive types that are set as indexedwill result in a gas optimization due to reduced memory costs. As such, we advise the indexed keyword to be introduced to up to three different primitive types in total optimizing the referenced event declaration.
RDR-03S: Suboptimal Event Declaration
Description:
The referenced
event
declaration does not have anyindexed
argument or have less than threeindexed
arguments that are a primitive type.Example:
Recommendation:
Apart from aiding off-chain integrators in consuming and filtering such an event, primitive types that are set as
indexed
will result in a gas optimization due to reduced memory costs. As such, we advise theindexed
keyword to be introduced to up to three different primitive types in total optimizing the referencedevent
declaration.