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

@ -53,8 +53,8 @@ contract('ERC20', function (accounts) {
function shouldDecreaseApproval (amount) {
describe('when there was no approved amount before', function () {
it('reverts', async function () {
await expectRevert(this.token.decreaseAllowance(
spender, amount, { from: initialHolder }), 'ERC20: decreased allowance below zero',
await expectRevert.unspecified(this.token.decreaseAllowance(
spender, amount, { from: initialHolder }),
);
});
});
@ -88,9 +88,9 @@ contract('ERC20', function (accounts) {
});
it('reverts when more than the full allowance is removed', async function () {
await expectRevert(
await expectRevert.unspecified(
this.token.decreaseAllowance(spender, approvedAmount.addn(1), { from: initialHolder }),
'ERC20: decreased allowance below zero',
);
});
});
@ -114,8 +114,8 @@ contract('ERC20', function (accounts) {
const spender = ZERO_ADDRESS;
it('reverts', async function () {
await expectRevert(this.token.decreaseAllowance(
spender, amount, { from: initialHolder }), 'ERC20: decreased allowance below zero',
await expectRevert.unspecified(this.token.decreaseAllowance(
spender, amount, { from: initialHolder }),
);
});
});
@ -247,8 +247,8 @@ contract('ERC20', function (accounts) {
describe('for a non zero account', function () {
it('rejects burning more than balance', async function () {
await expectRevert(this.token.burn(
initialHolder, initialSupply.addn(1)), 'ERC20: burn amount exceeds balance',
await expectRevert.unspecified(this.token.burn(
initialHolder, initialSupply.addn(1)),
);
});