Omniscia NFTFY Audit
SafeERC721Metadata Code Style Findings
SafeERC721Metadata Code Style Findings
SER-01C: Redundant Return Variable
Type | Severity | Location |
---|---|---|
Code Style | Informational | SafeERC721Metadata.sol:L9, L18, L27 |
Description:
The linked function implementations contain an explicitly named return variable yet it remains unused in the function bodies.
Example:
contracts/SafeERC721Metadata.sol
9function safeName(IERC721Metadata _metadata) public view returns (string memory _name)10{11 try _metadata.name() returns (string memory _n) {12 return _n;13 } catch (bytes memory /* _data */) {14 return "";15 }16}
Recommendation:
We advise that the variable names of the return declarations are omitted from the codebase to ensure no redundant space is reserved in the EVM.
Alleviation:
The Nftfy team has responded by stating that the return variables are explicitly named to provide supplemental documentation to the code's readers and thus should remain in the codebase.