Omniscia Bonq Audit
mintable-token-owner Code Style Findings
mintable-token-owner Code Style Findings
MIT-01C: Variable Mutability Specifier (Immutable)
Type | Severity | Location |
---|---|---|
Gas Optimization | mintable-token-owner.sol:L9 |
Description:
The linked variable is assigned to only once during the contract's constructor
.
Example:
contracts/mintable-token-owner.sol
9IMintableToken public token;10mapping(address => bool) public minters;11
12// solhint-disable-next-line func-visibility13constructor(address _token) Ownable() {14 token = IMintableToken(_token);15}
Recommendation:
We advise it to be set as immutable
greatly optimizing its read-access gas cost.
Alleviation:
The Bonq Protocol team has marked the token
variable as immutable
.