Update contracts to support Solidity 0.8.x (#2442)

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
Andre Korol
2021-01-14 22:38:53 +00:00
committed by GitHub
parent 6be0b410dc
commit 974c534210
159 changed files with 338 additions and 509 deletions

View File

@ -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',
);
});

View File

@ -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',
);
});