The project includes two versions of the NFT contract: one written in Solidity and the other in Huff. The Solidity rendition adheres to the ERC721Enumerable standard, providing additional enumeration functionality over the basic ERC721. However, the Huff rendition of the contract lacks these ERC721Enumerable features.
The Huff implementation of the NFT contract does not fully comply with the ERC721Enumerable standard. This discrepancy arises from:
The supportsInterface
method in the Huff rendition fails to acknowledge the ERC721Enumerable interface (type(IERC721Enumerable).interfaceId
), leading to a return value of false.
Essential methods of the ERC721Enumerable standard, including tokenOfOwnerByIndex
and tokenByIndex(uint256 index)
, are not implemented in the Huff version.
This inconsistency between the Solidity and Huff renditions could lead to significant functional limitations and potential incompatibility issues. Users and external contracts interacting with the Huff-based NFT might expect full ERC721Enumerable compliance, which is not met. This could result in failed transactions or incorrect assumptions about the contract's capabilities, potentially affecting user experience and trust.
Manual code review.
To resolve this issue and ensure compatibility and functionality, consider the following steps:
Update the Huff rendition to include the missing ERC721Enumerable methods: tokenOfOwnerByIndex
and tokenByIndex(uint256 index)
.
Modify the supportsInterface
method in the Huff version to return true for type(IERC721Enumerable).interfaceId
.
Conduct thorough testing of the updated Huff contract to ensure it meets all ERC721Enumerable standards and functions as expected.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.