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

@ -58,15 +58,15 @@ function shouldBehaveLikeERC777OperatorSend (holder, recipient, operator, data,
it('reverts when sending more than the balance', async function () {
const balance = await this.token.balanceOf(holder);
await expectRevert.unspecified(
this.token.operatorSend(holder, recipient, balance.addn(1), data, operatorData, { from: operator })
this.token.operatorSend(holder, recipient, balance.addn(1), data, operatorData, { from: operator }),
);
});
it('reverts when sending to the zero address', async function () {
await expectRevert.unspecified(
this.token.operatorSend(
holder, ZERO_ADDRESS, new BN('1'), data, operatorData, { from: operator }
)
holder, ZERO_ADDRESS, new BN('1'), data, operatorData, { from: operator },
),
);
});
});
@ -78,7 +78,7 @@ function shouldBehaveLikeERC777OperatorSend (holder, recipient, operator, data,
it('reverts when sending a non-zero amount', async function () {
await expectRevert.unspecified(
this.token.operatorSend(holder, recipient, new BN('1'), data, operatorData, { from: operator })
this.token.operatorSend(holder, recipient, new BN('1'), data, operatorData, { from: operator }),
);
});
@ -86,8 +86,8 @@ function shouldBehaveLikeERC777OperatorSend (holder, recipient, operator, data,
// This is not yet reflected in the spec
await expectRevert.unspecified(
this.token.operatorSend(
ZERO_ADDRESS, recipient, new BN('0'), data, operatorData, { from: operator }
)
ZERO_ADDRESS, recipient, new BN('0'), data, operatorData, { from: operator },
),
);
});
});
@ -135,7 +135,7 @@ function shouldBehaveLikeERC777OperatorBurn (holder, operator, data, operatorDat
it('reverts when burning more than the balance', async function () {
const balance = await this.token.balanceOf(holder);
await expectRevert.unspecified(
this.token.operatorBurn(holder, balance.addn(1), data, operatorData, { from: operator })
this.token.operatorBurn(holder, balance.addn(1), data, operatorData, { from: operator }),
);
});
});
@ -147,7 +147,7 @@ function shouldBehaveLikeERC777OperatorBurn (holder, operator, data, operatorDat
it('reverts when burning a non-zero amount', async function () {
await expectRevert.unspecified(
this.token.operatorBurn(holder, new BN('1'), data, operatorData, { from: operator })
this.token.operatorBurn(holder, new BN('1'), data, operatorData, { from: operator }),
);
});
@ -155,8 +155,8 @@ function shouldBehaveLikeERC777OperatorBurn (holder, operator, data, operatorDat
// This is not yet reflected in the spec
await expectRevert.unspecified(
this.token.operatorBurn(
ZERO_ADDRESS, new BN('0'), data, operatorData, { from: operator }
)
ZERO_ADDRESS, new BN('0'), data, operatorData, { from: operator },
),
);
});
});
@ -282,7 +282,7 @@ function shouldBehaveLikeERC777InternalMint (recipient, operator, amount, data,
it('reverts when minting tokens for the zero address', async function () {
await expectRevert.unspecified(
this.token.mintInternal(ZERO_ADDRESS, amount, data, operatorData, { from: operator })
this.token.mintInternal(ZERO_ADDRESS, amount, data, operatorData, { from: operator }),
);
});
}
@ -328,13 +328,13 @@ function shouldBehaveLikeERC777SendBurnMintInternalWithReceiveHook (operator, am
it('operatorSend reverts', async function () {
await expectRevert.unspecified(
this.token.operatorSend(this.sender, this.recipient, amount, data, operatorData, { from: operator })
this.token.operatorSend(this.sender, this.recipient, amount, data, operatorData, { from: operator }),
);
});
it('mint (internal) reverts', async function () {
await expectRevert.unspecified(
this.token.mintInternal(this.recipient, amount, data, operatorData, { from: operator })
this.token.mintInternal(this.recipient, amount, data, operatorData, { from: operator }),
);
});
});
@ -389,7 +389,7 @@ function shouldBehaveLikeERC777SendBurnMintInternalWithReceiveHook (operator, am
it('TokensRecipient receives mint (internal) data and is called after state mutation', async function () {
const { tx } = await this.token.mintInternal(
this.recipient, amount, data, operatorData, { from: operator }
this.recipient, amount, data, operatorData, { from: operator },
);
const postRecipientBalance = await this.token.balanceOf(this.recipient);
@ -422,7 +422,7 @@ function shouldBehaveLikeERC777SendBurnWithSendHook (operator, amount, data, ope
it('operatorSend reverts', async function () {
await expectRevert.unspecified(
this.token.operatorSend(this.sender, this.recipient, amount, data, operatorData, { from: operator })
this.token.operatorSend(this.sender, this.recipient, amount, data, operatorData, { from: operator }),
);
});
@ -432,7 +432,7 @@ function shouldBehaveLikeERC777SendBurnWithSendHook (operator, amount, data, ope
it('operatorBurn reverts', async function () {
await expectRevert.unspecified(
this.token.operatorBurn(this.sender, amount, data, operatorData, { from: operator })
this.token.operatorBurn(this.sender, amount, data, operatorData, { from: operator }),
);
});
});
@ -491,7 +491,7 @@ function shouldBehaveLikeERC777SendBurnWithSendHook (operator, amount, data, ope
const { tx } = await burnFromHolder(this.token, this.sender, amount, data, { from: this.sender });
await assertTokensToSendCalled(
this.token, tx, this.sender, this.sender, ZERO_ADDRESS, amount, data, null, preSenderBalance
this.token, tx, this.sender, this.sender, ZERO_ADDRESS, amount, data, null, preSenderBalance,
);
});
@ -501,7 +501,7 @@ function shouldBehaveLikeERC777SendBurnWithSendHook (operator, amount, data, ope
const { tx } = await this.token.operatorBurn(this.sender, amount, data, operatorData, { from: operator });
await assertTokensToSendCalled(
this.token, tx, operator, this.sender, ZERO_ADDRESS, amount, data, operatorData, preSenderBalance
this.token, tx, operator, this.sender, ZERO_ADDRESS, amount, data, operatorData, preSenderBalance,
);
});
});

View File

@ -53,7 +53,7 @@ describe('ERC777', function () {
describe('when the owner is the zero address', function () {
it('reverts', async function () {
await expectRevert(this.token.approveInternal(ZERO_ADDRESS, anyone, initialSupply),
'ERC777: approve from the zero address'
'ERC777: approve from the zero address',
);
});
});
@ -182,13 +182,13 @@ describe('ERC777', function () {
it('reverts when self-authorizing', async function () {
await expectRevert(
this.token.authorizeOperator(holder, { from: holder }), 'ERC777: authorizing self as operator'
this.token.authorizeOperator(holder, { from: holder }), 'ERC777: authorizing self as operator',
);
});
it('reverts when self-revoking', async function () {
await expectRevert(
this.token.revokeOperator(holder, { from: holder }), 'ERC777: revoking self as operator'
this.token.revokeOperator(holder, { from: holder }), 'ERC777: revoking self as operator',
);
});
@ -252,7 +252,7 @@ describe('ERC777', function () {
it('cannot be revoked for themselves', async function () {
await expectRevert(
this.token.revokeOperator(defaultOperatorA, { from: defaultOperatorA }),
'ERC777: revoking self as operator'
'ERC777: revoking self as operator',
);
});