Omniscia Gnosis Guild Audit
AvatarIsOwnerOfERC721 Code Style Findings
AvatarIsOwnerOfERC721 Code Style Findings
AIO-01C: Documentation Enhancement
Type | Severity | Location |
---|---|---|
Code Style | ![]() | AvatarIsOwnerOfERC721.sol:L20 |
Description:
Similarly to how the value
named argument is implied in the AvatarIsOwnerOfERC721::check
function, the extra
argument should be documented as well.
Example:
14function check(15 address to,16 uint256 /* value */,17 bytes calldata data,18 uint256 location,19 uint256 size,20 bytes1221) public view returns (bool success, bytes32 reason) {
Recommendation:
We advise the extra
name to be denoted in in-line comments after the bytes12
type specifier.
Alleviation (e6d315f9170dcf4c622d504bd2fb6eafbdac9b75):
The extra
named variable is properly denoted in the commented out section of the AvatarIsOwnerOfERC721::check
function, addressing this exhibit.
AIO-02C: Potential Enhancement of Custom Adapter Data
Type | Severity | Location |
---|---|---|
Standard Conformity | ![]() | AvatarIsOwnerOfERC721.sol:L24 |
Description:
The AvatarIsOwnerOfERC721::check
function will yield a value of 0
as the reason
the check failed.
Example:
14function check(15 address to,16 uint256 /* value */,17 bytes calldata data,18 uint256 location,19 uint256 size,20 bytes1221) public view returns (bool success, bytes32 reason) {22 address avatar = IModifier(msg.sender).avatar();23 uint256 tokenId = uint256(bytes32(data[location:location + size]));24 return (IERC721(to).ownerOf(tokenId) == avatar, 0);25}
Recommendation:
We advise its usability to be increased by simply yielding the actual avatar
expected, aiding off-chain as well as on-chain software in handling the custom condition's failure.
Alleviation (e6d315f9170dcf4c622d504bd2fb6eafbdac9b75):
The Gnosis Guild team evaluated this exhibit and opted not to apply a remediation for it as the avatar expected value is publicly and easily accessible. As such, we consider this exhibit acknowledged safely.