re-al-Foundation / rwa-contracts

0 stars 0 forks source link

[RSE-01S] Suboptimal Event Declarations #39

Closed chasebrownn closed 6 months ago

chasebrownn commented 6 months ago

RSE-01S: Suboptimal Event Declarations

Type Severity Location
Gas Optimization RevenueStreamETH.sol:L55, L71

Description:

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

Example:

event RevenueDeposited(uint256 amount);

Recommendation:

Apart from aiding off-chain integrators in consuming and filtering such events, 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 declarations.