Closed zajck closed 2 years ago
The owner invocation will redundantly read the value of msg.sender from storage as it is performed in the constructor of the contract.
owner
msg.sender
constructor
constructor( address _daiTokenAddress ) notZeroAddress(_daiTokenAddress) { daiTokenAddress = _daiTokenAddress; emit LogTokenAddressChanged(_daiTokenAddress, owner()); }
We advise the msg.sender value to be used directly, optimizing the codebase.
DAI-01C: Read Access Optimization
Description:
The
owner
invocation will redundantly read the value ofmsg.sender
from storage as it is performed in theconstructor
of the contract.Example:
Recommendation:
We advise the
msg.sender
value to be used directly, optimizing the codebase.