re-al-Foundation / rwa-contracts

Core dev environment for the RWA Governance contracts
0 stars 0 forks source link

[RWA-01S] Suboptimal Event Declaration #31

Closed chasebrownn closed 7 months ago

chasebrownn commented 7 months ago

RWA-01S: Suboptimal Event Declaration

Type Severity Location
Gas Optimization RWAToken.sol:L77

Description:

The referenced event declaration does not have any indexed argument or have less than three indexed arguments that are a primitive type.

Example:

event FeeUpdated(uint256 oldFee, uint256 newFee);

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 the indexed keyword to be introduced to up to three different primitive types in total optimizing the referenced event declaration.