Weather Witness

First Flight #40
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

L-1: Events are missing indexed fields

The events are missing indexed fields that cause inaccessibility at off-chain

Description

Index event fields make the field more quickly accessible to off-chain tools that parse events. However, note that each index field costs extra gas during emission, so it's not necessarily best to index the maximum allowed per event (three fields).

Risk

Likelihood:

  • In smart contract development, it's common to emit events for off-chain systems (like subgraphs, bots, frontends) to monitor state changes.

Impact:

  • Off-chain systems (like The Graph or backend listeners) cannot efficiently query or filter relevant logs without indexed fields.


Recommended Mitigation

- event WeatherNFTMintRequestSent(
address user,
string pincode,
string isoCode,
bytes32 reqId
);
+ event WeatherNFTMintRequestSent(
indexed address user,
string pincode,
string isoCode,
bytes32 reqId
);
- event WeatherNFTMinted(bytes32 reqId, address user, Weather weather);
+ event WeatherNFTMinted(bytes32 reqId,indexed address user, Weather weather);
- event NftWeatherUpdateRequestSend(
uint256 tokenId,
bytes32 reqId,
uint256 upkeepId
);
+ event NftWeatherUpdateRequestSend(
indexed uint256 tokenId,
bytes32 reqId,
uint256 upkeepId
);
- event NftWeatherUpdated(uint256 tokenId, Weather weather);
+ event NftWeatherUpdated( indexed uint256 tokenId, Weather weather);
Updates

Appeal created

bube Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.