Emitting dynamic strings in an event increases gas costs significantly because:
Strings are not indexed in event logs, making them inefficient for search and filtering.
Events are meant for lightweight logging, but logging large strings (especially profileImage
, which might be a long URL or metadata) is expensive.
Alternative approaches (such as using bytes32
for hashes or storing data off-chain) can reduce costs.
High gas costs due to unnecessary storage of dynamic strings in an event.
Inefficient event indexing because strings cannot be indexed, making on-chain queries expensive.
manual review
Store profileImage
as a bytes32
Hash Instead
Before emitting, hash the profileImage
string
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.