Change zero address revert message in the balanceOf function of ERC721 and ERC1155 (#3314)

This commit is contained in:
Amin Bashiri
2022-04-02 14:43:33 +04:30
committed by GitHub
parent 69c3781043
commit 742e85be7c
4 changed files with 5 additions and 5 deletions

View File

@ -23,7 +23,7 @@ function shouldBehaveLikeERC1155 ([minter, firstTokenHolder, secondTokenHolder,
it('reverts when queried about the zero address', async function () {
await expectRevert(
this.token.balanceOf(ZERO_ADDRESS, firstTokenId),
'ERC1155: balance query for the zero address',
'ERC1155: address zero is not a valid owner',
);
});
@ -106,7 +106,7 @@ function shouldBehaveLikeERC1155 ([minter, firstTokenHolder, secondTokenHolder,
[firstTokenHolder, secondTokenHolder, ZERO_ADDRESS],
[firstTokenId, secondTokenId, unknownTokenId],
),
'ERC1155: balance query for the zero address',
'ERC1155: address zero is not a valid owner',
);
});

View File

@ -46,7 +46,7 @@ function shouldBehaveLikeERC721 (errorPrefix, owner, newOwner, approved, another
context('when querying the zero address', function () {
it('throws', async function () {
await expectRevert(
this.token.balanceOf(ZERO_ADDRESS), 'ERC721: balance query for the zero address',
this.token.balanceOf(ZERO_ADDRESS), 'ERC721: address zero is not a valid owner',
);
});
});