bosonprotocol / contracts

[DEPRECATED] Boson Protocol v1
GNU Lesser General Public License v3.0
69 stars 17 forks source link

Read Access Optimization #330

Closed zajck closed 2 years ago

zajck commented 2 years ago

TRY-01C: Read Access Optimization

Type Severity Location
Gas Optimization Informational TokenRegistry.sol:L28

Description:

The owner invocation will redundantly read the value of msg.sender from storage as it is performed in the constructor of the contract.

Example:

constructor() {
    ethLimit = 1 ether;
    emit LogETHLimitChanged(ethLimit, owner());
}

Recommendation:

We advise the msg.sender value to be used directly, optimizing the codebase.