Omniscia KlimaDAO Audit
KlimaIDONFT Code Style Findings
KlimaIDONFT Code Style Findings
KID-01C: Inefficient Hash Specification
Type | Severity | Location |
---|---|---|
Gas Optimization | Informational | KlimaIDONFT.sol:L32, L33 |
Description:
The linked variables are assigned to a keccak256
instruction and are declared as constant
.
Example:
32bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");33bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
Recommendation:
We advise them to be set as immutable
instead to cache the result of the keccak256
instruction as otherwise it is performed each time redundantly.
Alleviation:
The KlimaDAO team considered this exhibit but opted to retain the codebase in its current state.
KID-02C: Redundant Visibility Specifiers
Type | Severity | Location |
---|---|---|
Gas Optimization | Informational | KlimaIDONFT.sol:L32, L33 |
Description:
The linked variables are meant to represent internally accessible constant
variables yet are exposed as public
.
Example:
32bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");33bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
Recommendation:
We advise them to be set as either internal
or private
depending on their intended usage.
Alleviation:
The KlimaDAO team considered this exhibit but opted to retain the codebase in its current state.
KID-03C: Redundant constructor
Implementation
Type | Severity | Location |
---|---|---|
Gas Optimization | Informational | KlimaIDONFT.sol:L44-L46 |
Description:
The linked constructor
is redundant.
Example:
44constructor() {45
46}
Recommendation:
We advise it to be omitted from the codebase.
Alleviation:
The KlimaDAO team considered this exhibit but opted to retain the codebase in its current state.