Omniscia Olympus DAO Audit
ERC20 Code Style Findings
ERC20 Code Style Findings
ERC-01C: Variable Mutability Specifier
Type | Severity | Location |
---|---|---|
Gas Optimization | Informational | ERC20.sol:L26, L31 |
Description:
As the ERC20
token implementation is used internally, the _decimals
member is only set once during the constructor
of the contract.
Example:
contracts/types/ERC20.sol
26uint8 internal _decimals;27
28constructor (string memory name_, string memory symbol_, uint8 decimals_) {29 _name = name_;30 _symbol = symbol_;31 _decimals = decimals_;32}
Recommendation:
We advise it to be set as immutable
greatly opimizing its read access gas cost.
Alleviation:
The _decimals
member was properly set as immutable
.