scheduled[hash] in functions cancel and execScheduled is accessed 2 times. It would be a bit cheaper to extract this value to a variable and re-use it. Same situation in function setAddrPrivilege where privileges[addr] is accessed 2 times when checking the state.
Recommended Mitigation Steps
Cache and re-use state values to reduce gas costs.
Handle
pauliax
Vulnerability details
Impact
scheduled[hash] in functions cancel and execScheduled is accessed 2 times. It would be a bit cheaper to extract this value to a variable and re-use it. Same situation in function setAddrPrivilege where privileges[addr] is accessed 2 times when checking the state.
Recommended Mitigation Steps
Cache and re-use state values to reduce gas costs.