code-423n4 / 2021-12-amun-findings

0 stars 0 forks source link

At `CallFacet.sol#removeCaller` use delete rather than setting false #248

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

0x0x0x

Vulnerability details

callStorage.canCall[_caller] = false;

can be replaced with

delete callStorage.canCall[_caller];

to save gas.

0xleastwood commented 2 years ago

no gas savings as its deleting a single item.