Ignore specific warnings and make the rest into errors (#3695)

(cherry picked from commit 046121e080)
This commit is contained in:
Francisco
2022-09-22 17:33:13 -03:00
committed by Francisco Giordano
parent 8740d8f7f3
commit 089f9b95af
7 changed files with 490 additions and 58 deletions

View File

@ -106,9 +106,13 @@ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
address,
address,
uint256,
uint96
uint96 size
) internal virtual override {
revert("ERC721Enumerable: consecutive transfers not supported");
// We revert because enumerability is not supported with consecutive batch minting.
// This conditional is only needed to silence spurious warnings about unreachable code.
if (size > 0) {
revert("ERC721Enumerable: consecutive transfers not supported");
}
}
/**