Update all dependencies transitively (#2363)

This commit is contained in:
Francisco Giordano
2020-09-16 12:14:53 -03:00
committed by GitHub
parent bf4c9d700d
commit ace35fdeda
45 changed files with 6937 additions and 8793 deletions

View File

@ -27,7 +27,7 @@ function shouldBehaveLikeERC20 (errorPrefix, initialSupply, initialHolder, recip
shouldBehaveLikeERC20Transfer(errorPrefix, initialHolder, recipient, initialSupply,
function (from, to, value) {
return this.token.transfer(to, value, { from });
}
},
);
});
@ -88,7 +88,7 @@ function shouldBehaveLikeERC20 (errorPrefix, initialSupply, initialHolder, recip
it('reverts', async function () {
await expectRevert(this.token.transferFrom(
tokenOwner, to, amount, { from: spender }), `${errorPrefix}: transfer amount exceeds balance`
tokenOwner, to, amount, { from: spender }), `${errorPrefix}: transfer amount exceeds balance`,
);
});
});
@ -104,7 +104,7 @@ function shouldBehaveLikeERC20 (errorPrefix, initialSupply, initialHolder, recip
it('reverts', async function () {
await expectRevert(this.token.transferFrom(
tokenOwner, to, amount, { from: spender }), `${errorPrefix}: transfer amount exceeds allowance`
tokenOwner, to, amount, { from: spender }), `${errorPrefix}: transfer amount exceeds allowance`,
);
});
});
@ -114,7 +114,7 @@ function shouldBehaveLikeERC20 (errorPrefix, initialSupply, initialHolder, recip
it('reverts', async function () {
await expectRevert(this.token.transferFrom(
tokenOwner, to, amount, { from: spender }), `${errorPrefix}: transfer amount exceeds balance`
tokenOwner, to, amount, { from: spender }), `${errorPrefix}: transfer amount exceeds balance`,
);
});
});
@ -131,7 +131,7 @@ function shouldBehaveLikeERC20 (errorPrefix, initialSupply, initialHolder, recip
it('reverts', async function () {
await expectRevert(this.token.transferFrom(
tokenOwner, to, amount, { from: spender }), `${errorPrefix}: transfer to the zero address`
tokenOwner, to, amount, { from: spender }), `${errorPrefix}: transfer to the zero address`,
);
});
});
@ -144,7 +144,7 @@ function shouldBehaveLikeERC20 (errorPrefix, initialSupply, initialHolder, recip
it('reverts', async function () {
await expectRevert(this.token.transferFrom(
tokenOwner, to, amount, { from: spender }), `${errorPrefix}: transfer from the zero address`
tokenOwner, to, amount, { from: spender }), `${errorPrefix}: transfer from the zero address`,
);
});
});
@ -154,7 +154,7 @@ function shouldBehaveLikeERC20 (errorPrefix, initialSupply, initialHolder, recip
shouldBehaveLikeERC20Approve(errorPrefix, initialHolder, recipient, initialSupply,
function (owner, spender, amount) {
return this.token.approve(spender, amount, { from: owner });
}
},
);
});
}
@ -166,7 +166,7 @@ function shouldBehaveLikeERC20Transfer (errorPrefix, from, to, balance, transfer
it('reverts', async function () {
await expectRevert(transfer.call(this, from, to, amount),
`${errorPrefix}: transfer amount exceeds balance`
`${errorPrefix}: transfer amount exceeds balance`,
);
});
});
@ -219,7 +219,7 @@ function shouldBehaveLikeERC20Transfer (errorPrefix, from, to, balance, transfer
describe('when the recipient is the zero address', function () {
it('reverts', async function () {
await expectRevert(transfer.call(this, from, ZERO_ADDRESS, balance),
`${errorPrefix}: transfer to the zero address`
`${errorPrefix}: transfer to the zero address`,
);
});
});
@ -299,7 +299,7 @@ function shouldBehaveLikeERC20Approve (errorPrefix, owner, spender, supply, appr
describe('when the spender is the zero address', function () {
it('reverts', async function () {
await expectRevert(approve.call(this, owner, ZERO_ADDRESS, supply),
`${errorPrefix}: approve to the zero address`
`${errorPrefix}: approve to the zero address`,
);
});
});

View File

@ -56,7 +56,7 @@ describe('ERC20', function () {
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'
spender, amount, { from: initialHolder }), 'ERC20: decreased allowance below zero',
);
});
});
@ -92,7 +92,7 @@ describe('ERC20', function () {
it('reverts when more than the full allowance is removed', async function () {
await expectRevert(
this.token.decreaseAllowance(spender, approvedAmount.addn(1), { from: initialHolder }),
'ERC20: decreased allowance below zero'
'ERC20: decreased allowance below zero',
);
});
});
@ -117,7 +117,7 @@ describe('ERC20', function () {
it('reverts', async function () {
await expectRevert(this.token.decreaseAllowance(
spender, amount, { from: initialHolder }), 'ERC20: decreased allowance below zero'
spender, amount, { from: initialHolder }), 'ERC20: decreased allowance below zero',
);
});
});
@ -201,7 +201,7 @@ describe('ERC20', function () {
it('reverts', async function () {
await expectRevert(
this.token.increaseAllowance(spender, amount, { from: initialHolder }), 'ERC20: approve to the zero address'
this.token.increaseAllowance(spender, amount, { from: initialHolder }), 'ERC20: approve to the zero address',
);
});
});
@ -211,7 +211,7 @@ describe('ERC20', function () {
const amount = new BN(50);
it('rejects a null account', async function () {
await expectRevert(
this.token.mint(ZERO_ADDRESS, amount), 'ERC20: mint to the zero address'
this.token.mint(ZERO_ADDRESS, amount), 'ERC20: mint to the zero address',
);
});
@ -250,7 +250,7 @@ describe('ERC20', function () {
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'
initialHolder, initialSupply.addn(1)), 'ERC20: burn amount exceeds balance',
);
});
@ -295,7 +295,7 @@ describe('ERC20', function () {
describe('when the sender is the zero address', function () {
it('reverts', async function () {
await expectRevert(this.token.transferInternal(ZERO_ADDRESS, recipient, initialSupply),
'ERC20: transfer from the zero address'
'ERC20: transfer from the zero address',
);
});
});
@ -309,7 +309,7 @@ describe('ERC20', function () {
describe('when the owner is the zero address', function () {
it('reverts', async function () {
await expectRevert(this.token.approveInternal(ZERO_ADDRESS, recipient, initialSupply),
'ERC20: approve from the zero address'
'ERC20: approve from the zero address',
);
});
});

View File

@ -15,7 +15,7 @@ describe('ERC20Capped', function () {
it('requires a non-zero cap', async function () {
await expectRevert(
ERC20Capped.new(name, symbol, new BN(0), { from: minter }), 'ERC20Capped: cap is 0'
ERC20Capped.new(name, symbol, new BN(0), { from: minter }), 'ERC20Capped: cap is 0',
);
});

View File

@ -41,7 +41,7 @@ describe('ERC20Pausable', function () {
await this.token.pause();
await expectRevert(this.token.transfer(recipient, initialSupply, { from: holder }),
'ERC20Pausable: token transfer while paused'
'ERC20Pausable: token transfer while paused',
);
});
});
@ -74,7 +74,7 @@ describe('ERC20Pausable', function () {
await this.token.pause();
await expectRevert(this.token.transferFrom(
holder, recipient, allowance, { from: anotherAccount }), 'ERC20Pausable: token transfer while paused'
holder, recipient, allowance, { from: anotherAccount }), 'ERC20Pausable: token transfer while paused',
);
});
});
@ -101,7 +101,7 @@ describe('ERC20Pausable', function () {
await this.token.pause();
await expectRevert(this.token.mint(recipient, amount),
'ERC20Pausable: token transfer while paused'
'ERC20Pausable: token transfer while paused',
);
});
});
@ -128,7 +128,7 @@ describe('ERC20Pausable', function () {
await this.token.pause();
await expectRevert(this.token.burn(holder, amount),
'ERC20Pausable: token transfer while paused'
'ERC20Pausable: token transfer while paused',
);
});
});

View File

@ -76,7 +76,7 @@ describe('ERC20Snapshot', function () {
expect(await this.token.totalSupplyAt(this.initialSnapshotId)).to.be.bignumber.equal(initialSupply);
expect(await this.token.totalSupplyAt(this.secondSnapshotId)).to.be.bignumber.equal(
await this.token.totalSupply()
await this.token.totalSupply(),
);
});
});
@ -160,13 +160,13 @@ describe('ERC20Snapshot', function () {
expect(await this.token.balanceOfAt(other, this.initialSnapshotId)).to.be.bignumber.equal('0');
expect(await this.token.balanceOfAt(initialHolder, this.secondSnapshotId)).to.be.bignumber.equal(
await this.token.balanceOf(initialHolder)
await this.token.balanceOf(initialHolder),
);
expect(await this.token.balanceOfAt(recipient, this.secondSnapshotId)).to.be.bignumber.equal(
await this.token.balanceOf(recipient)
await this.token.balanceOf(recipient),
);
expect(await this.token.balanceOfAt(other, this.secondSnapshotId)).to.be.bignumber.equal(
await this.token.balanceOf(other)
await this.token.balanceOf(other),
);
});
});
@ -189,13 +189,13 @@ describe('ERC20Snapshot', function () {
for (const id of this.secondSnapshotIds) {
expect(await this.token.balanceOfAt(initialHolder, id)).to.be.bignumber.equal(
await this.token.balanceOf(initialHolder)
await this.token.balanceOf(initialHolder),
);
expect(await this.token.balanceOfAt(recipient, id)).to.be.bignumber.equal(
await this.token.balanceOf(recipient)
await this.token.balanceOf(recipient),
);
expect(await this.token.balanceOfAt(other, id)).to.be.bignumber.equal(
await this.token.balanceOf(other)
await this.token.balanceOf(other),
);
}
});

View File

@ -97,7 +97,7 @@ function shouldOnlyRevertOnErrors () {
it('reverts when decreasing the allowance', async function () {
await expectRevert(
this.wrapper.decreaseAllowance(10),
'SafeERC20: decreased allowance below zero'
'SafeERC20: decreased allowance below zero',
);
});
});
@ -110,7 +110,7 @@ function shouldOnlyRevertOnErrors () {
it('reverts when approving a non-zero allowance', async function () {
await expectRevert(
this.wrapper.approve(20),
'SafeERC20: approve from non-zero to non-zero allowance'
'SafeERC20: approve from non-zero to non-zero allowance',
);
});
@ -129,7 +129,7 @@ function shouldOnlyRevertOnErrors () {
it('reverts when decreasing the allowance to a negative value', async function () {
await expectRevert(
this.wrapper.decreaseAllowance(200),
'SafeERC20: decreased allowance below zero'
'SafeERC20: decreased allowance below zero',
);
});
});

View File

@ -24,7 +24,7 @@ describe('TokenTimelock', function () {
const pastReleaseTime = (await time.latest()).sub(time.duration.years(1));
await expectRevert(
TokenTimelock.new(this.token.address, beneficiary, pastReleaseTime),
'TokenTimelock: release time is before current time'
'TokenTimelock: release time is before current time',
);
});

View File

@ -38,7 +38,7 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) {
it('reverts', async function () {
await expectRevert(this.token.burn(amount, { from: owner }),
'ERC20: burn amount exceeds balance'
'ERC20: burn amount exceeds balance',
);
});
});
@ -87,7 +87,7 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) {
it('reverts', async function () {
await this.token.approve(burner, amount, { from: owner });
await expectRevert(this.token.burnFrom(owner, amount, { from: burner }),
'ERC20: burn amount exceeds balance'
'ERC20: burn amount exceeds balance',
);
});
});
@ -98,7 +98,7 @@ function shouldBehaveLikeERC20Burnable (owner, initialBalance, [burner]) {
it('reverts', async function () {
await this.token.approve(burner, allowance, { from: owner });
await expectRevert(this.token.burnFrom(owner, allowance.addn(1), { from: burner }),
'ERC20: burn amount exceeds allowance'
'ERC20: burn amount exceeds allowance',
);
});
});