Update contracts to support Solidity 0.8.x (#2442)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
@ -208,7 +208,7 @@ function shouldBehaveLikeERC1155 ([minter, firstTokenHolder, secondTokenHolder,
|
||||
});
|
||||
|
||||
it('reverts when transferring more than balance', async function () {
|
||||
await expectRevert(
|
||||
await expectRevert.unspecified(
|
||||
this.token.safeTransferFrom(
|
||||
multiTokenHolder,
|
||||
recipient,
|
||||
@ -217,7 +217,6 @@ function shouldBehaveLikeERC1155 ([minter, firstTokenHolder, secondTokenHolder,
|
||||
'0x',
|
||||
{ from: multiTokenHolder },
|
||||
),
|
||||
'ERC1155: insufficient balance for transfer',
|
||||
);
|
||||
});
|
||||
|
||||
@ -464,14 +463,13 @@ function shouldBehaveLikeERC1155 ([minter, firstTokenHolder, secondTokenHolder,
|
||||
});
|
||||
|
||||
it('reverts when transferring amount more than any of balances', async function () {
|
||||
await expectRevert(
|
||||
await expectRevert.unspecified(
|
||||
this.token.safeBatchTransferFrom(
|
||||
multiTokenHolder, recipient,
|
||||
[firstTokenId, secondTokenId],
|
||||
[firstAmount, secondAmount.addn(1)],
|
||||
'0x', { from: multiTokenHolder },
|
||||
),
|
||||
'ERC1155: insufficient balance for transfer',
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@ -118,9 +118,8 @@ contract('ERC1155', function (accounts) {
|
||||
});
|
||||
|
||||
it('reverts when burning a non-existent token id', async function () {
|
||||
await expectRevert(
|
||||
await expectRevert.unspecified(
|
||||
this.token.burn(tokenHolder, tokenId, mintAmount),
|
||||
'ERC1155: burn amount exceeds balance',
|
||||
);
|
||||
});
|
||||
|
||||
@ -133,9 +132,8 @@ contract('ERC1155', function (accounts) {
|
||||
{ from: operator },
|
||||
);
|
||||
|
||||
await expectRevert(
|
||||
await expectRevert.unspecified(
|
||||
this.token.burn(tokenHolder, tokenId, mintAmount.addn(1)),
|
||||
'ERC1155: burn amount exceeds balance',
|
||||
);
|
||||
});
|
||||
|
||||
@ -190,9 +188,8 @@ contract('ERC1155', function (accounts) {
|
||||
});
|
||||
|
||||
it('reverts when burning a non-existent token id', async function () {
|
||||
await expectRevert(
|
||||
await expectRevert.unspecified(
|
||||
this.token.burnBatch(tokenBatchHolder, tokenBatchIds, burnAmounts),
|
||||
'ERC1155: burn amount exceeds balance',
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user