Redundant mapping update in set_l1_l2_collection_mapping function.
The set_l1_l2_collection_mapping function allows redundant updates to the L1-L2 address mappings. The function does not check if the new mapping values are identical to the existing ones before performing write operations.
This issue results in unnecessary gas consumption when the function is called with parameters that match the existing mappings.
Manual review
Implement a check to compare the new mapping values with the existing ones before performing write operations. Only update the mappings if there's an actual change.
Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.
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.