20,000 USDC
View results
Submission Details
Severity: gas
Valid

Multiple Address/id Mappings Can Be Combined Into A Single Mapping Of An Address/id To A Struct, Where Appropriate

Summary

Combining multiple address/ID mappings into a single mapping of an address/ID to a struct can potentially save gas in some scenarios.
With the single mapping approach, you can save gas when performing operations such as initializing or updating the IDs for an address, as well as querying the IDs for a given address. Instead of performing multiple storage operations on separate mappings, you can achieve the same result with a single storage operation on the struct.

Support

FAQs

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