sherlock-audit / 2024-10-ethos-network-judging

0 stars 0 forks source link

Acrobatic Burlap Lizard - Value in InteractionControl.sol:removeControlledContractName() can be calculated before to save gas #328

Closed sherlock-admin4 closed 2 weeks ago

sherlock-admin4 commented 2 weeks ago

Acrobatic Burlap Lizard

Low/Info

Value in InteractionControl.sol:removeControlledContractName() can be calculated before to save gas

Summary

Row keccak256(abi.encodePacked(contractName)) at line InteractionControl.sol#62 can be calculated before the for to save gas

Root Cause

No response

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

No response

PoC

No response

Mitigation

store bytes32 cName = keccak256(abi.encodePacked(contractName)) before the beginning of the for