Omniscia Hot Cross Audit
CrossMint1155BaseURI Static Analysis Findings
CrossMint1155BaseURI Static Analysis Findings
CMB-01S: Unused Function
Type | Severity | Location |
---|---|---|
Language Specific | Informational | CrossMint1155BaseURI.sol:L68-L72 |
Description:
The _clearTokenURI
function remains unutilized in the codebase.
Example:
contracts/token/CrossMint1155BaseURI.sol
68function _clearTokenURI(uint256 tokenId) internal {69 if (bytes(_tokenURIs[tokenId]).length != 0) {70 delete _tokenURIs[tokenId];71 }72}
Recommendation:
We advise it to be removed to avoid unnecessary bytecode.
Alleviation:
The _clearTokenURI
function was safely omitted from the codebase.
CMB-02S: Variable Shadowing
Type | Severity | Location |
---|---|---|
Language Specific | Informational | CrossMint1155BaseURI.sol:L54 |
Description:
The linked variable shadows the declaration of an inherited contract.
Example:
contracts/token/CrossMint1155BaseURI.sol
54function _setTokenURI(uint256 tokenId, string memory _uri) internal virtual {55 _tokenURIs[tokenId] = _uri;56 emit URI(_tokenURI(tokenId), tokenId);57}
Recommendation:
We strongly recommend it to be renamed to avoid the colission, such as by prefixing them or suffixing them with an underscore (_
).
Alleviation:
The _uri
argument was set to tokenUri
thereby preventing a naming collision from occuring.