Update all dependencies transitively (#2363)
This commit is contained in:
committed by
GitHub
parent
bf4c9d700d
commit
ace35fdeda
@ -87,7 +87,7 @@ describe('Address', function () {
|
||||
await this.contractRecipient.setAcceptEther(false);
|
||||
await expectRevert(
|
||||
this.mock.sendValue(this.contractRecipient.address, funds),
|
||||
'Address: unable to send value, recipient may have reverted'
|
||||
'Address: unable to send value, recipient may have reverted',
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -122,7 +122,7 @@ describe('Address', function () {
|
||||
|
||||
await expectRevert(
|
||||
this.mock.functionCall(this.contractRecipient.address, abiEncodedCall),
|
||||
'Address: low-level call failed'
|
||||
'Address: low-level call failed',
|
||||
);
|
||||
});
|
||||
|
||||
@ -135,7 +135,7 @@ describe('Address', function () {
|
||||
|
||||
await expectRevert(
|
||||
this.mock.functionCall(this.contractRecipient.address, abiEncodedCall),
|
||||
'CallReceiverMock: reverting'
|
||||
'CallReceiverMock: reverting',
|
||||
);
|
||||
});
|
||||
|
||||
@ -152,7 +152,7 @@ describe('Address', function () {
|
||||
|
||||
await expectRevert(
|
||||
this.mock.functionCall(this.contractRecipient.address, abiEncodedCall),
|
||||
'Address: low-level call failed'
|
||||
'Address: low-level call failed',
|
||||
);
|
||||
}).timeout(5000);
|
||||
|
||||
@ -165,7 +165,7 @@ describe('Address', function () {
|
||||
|
||||
await expectRevert(
|
||||
this.mock.functionCall(this.contractRecipient.address, abiEncodedCall),
|
||||
'Address: low-level call failed'
|
||||
'Address: low-level call failed',
|
||||
);
|
||||
});
|
||||
|
||||
@ -178,7 +178,7 @@ describe('Address', function () {
|
||||
|
||||
await expectRevert(
|
||||
this.mock.functionCall(this.contractRecipient.address, abiEncodedCall),
|
||||
'Address: low-level call failed'
|
||||
'Address: low-level call failed',
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -228,7 +228,7 @@ describe('Address', function () {
|
||||
|
||||
await expectRevert(
|
||||
this.mock.functionCallWithValue(this.contractRecipient.address, abiEncodedCall, amount),
|
||||
'Address: insufficient balance for call'
|
||||
'Address: insufficient balance for call',
|
||||
);
|
||||
});
|
||||
|
||||
@ -261,7 +261,7 @@ describe('Address', function () {
|
||||
|
||||
expect(await balance.current(this.mock.address)).to.be.bignumber.equal('0');
|
||||
const receipt = await this.mock.functionCallWithValue(
|
||||
this.contractRecipient.address, abiEncodedCall, amount, { from: other, value: amount }
|
||||
this.contractRecipient.address, abiEncodedCall, amount, { from: other, value: amount },
|
||||
);
|
||||
|
||||
expect(await tracker.delta()).to.be.bignumber.equal(amount);
|
||||
@ -280,7 +280,7 @@ describe('Address', function () {
|
||||
await send.ether(other, this.mock.address, amount);
|
||||
await expectRevert(
|
||||
this.mock.functionCallWithValue(this.contractRecipient.address, abiEncodedCall, amount),
|
||||
'Address: low-level call with value failed'
|
||||
'Address: low-level call with value failed',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@ -15,7 +15,7 @@ describe('Create2', function () {
|
||||
|
||||
const encodedParams = web3.eth.abi.encodeParameters(
|
||||
['string', 'string', 'address', 'uint256'],
|
||||
['MyToken', 'MTKN', deployerAccount, 100]
|
||||
['MyToken', 'MTKN', deployerAccount, 100],
|
||||
).slice(2);
|
||||
|
||||
const constructorByteCode = `${ERC20Mock.bytecode}${encodedParams}`;
|
||||
@ -73,20 +73,20 @@ describe('Create2', function () {
|
||||
it('fails deploying a contract in an existent address', async function () {
|
||||
await this.factory.deploy(0, saltHex, constructorByteCode, { from: deployerAccount });
|
||||
await expectRevert(
|
||||
this.factory.deploy(0, saltHex, constructorByteCode, { from: deployerAccount }), 'Create2: Failed on deploy'
|
||||
this.factory.deploy(0, saltHex, constructorByteCode, { from: deployerAccount }), 'Create2: Failed on deploy',
|
||||
);
|
||||
});
|
||||
|
||||
it('fails deploying a contract if the bytecode length is zero', async function () {
|
||||
await expectRevert(
|
||||
this.factory.deploy(0, saltHex, '0x', { from: deployerAccount }), 'Create2: bytecode length is zero'
|
||||
this.factory.deploy(0, saltHex, '0x', { from: deployerAccount }), 'Create2: bytecode length is zero',
|
||||
);
|
||||
});
|
||||
|
||||
it('fails deploying a contract if factory contract does not have sufficient balance', async function () {
|
||||
await expectRevert(
|
||||
this.factory.deploy(1, saltHex, constructorByteCode, { from: deployerAccount }),
|
||||
'Create2: insufficient balance'
|
||||
'Create2: insufficient balance',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@ -21,13 +21,13 @@ describe('EnumerableMap', function () {
|
||||
expect(keys.length).to.equal(values.length);
|
||||
|
||||
await Promise.all(keys.map(async key =>
|
||||
expect(await map.contains(key)).to.equal(true)
|
||||
expect(await map.contains(key)).to.equal(true),
|
||||
));
|
||||
|
||||
expect(await map.length()).to.bignumber.equal(keys.length.toString());
|
||||
|
||||
expect(await Promise.all(keys.map(key =>
|
||||
map.get(key)
|
||||
map.get(key),
|
||||
))).to.have.same.members(values);
|
||||
|
||||
// To compare key-value pairs, we zip keys and values, and convert BNs to
|
||||
@ -36,7 +36,7 @@ describe('EnumerableMap', function () {
|
||||
const entry = await map.at(index);
|
||||
return [entry.key.toString(), entry.value];
|
||||
}))).to.have.same.deep.members(
|
||||
zip(keys.map(k => k.toString()), values)
|
||||
zip(keys.map(k => k.toString()), values),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ const { expect } = require('chai');
|
||||
function shouldBehaveLikeSet (valueA, valueB, valueC) {
|
||||
async function expectMembersMatch (set, values) {
|
||||
await Promise.all(values.map(async value =>
|
||||
expect(await set.contains(value)).to.equal(true)
|
||||
expect(await set.contains(value)).to.equal(true),
|
||||
));
|
||||
|
||||
expect(await set.length()).to.bignumber.equal(values.length.toString());
|
||||
|
||||
@ -27,7 +27,7 @@ describe('Pausable', function () {
|
||||
|
||||
it('cannot take drastic measure in non-pause', async function () {
|
||||
await expectRevert(this.pausable.drasticMeasure(),
|
||||
'Pausable: not paused'
|
||||
'Pausable: not paused',
|
||||
);
|
||||
expect(await this.pausable.drasticMeasureTaken()).to.equal(false);
|
||||
});
|
||||
@ -77,7 +77,7 @@ describe('Pausable', function () {
|
||||
|
||||
it('should prevent drastic measure', async function () {
|
||||
await expectRevert(this.pausable.drasticMeasure(),
|
||||
'Pausable: not paused'
|
||||
'Pausable: not paused',
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@ -23,13 +23,13 @@ describe('ReentrancyGuard', function () {
|
||||
// in the side-effects.
|
||||
it('does not allow local recursion', async function () {
|
||||
await expectRevert(
|
||||
this.reentrancyMock.countLocalRecursive(10), 'ReentrancyGuard: reentrant call'
|
||||
this.reentrancyMock.countLocalRecursive(10), 'ReentrancyGuard: reentrant call',
|
||||
);
|
||||
});
|
||||
|
||||
it('does not allow indirect local recursion', async function () {
|
||||
await expectRevert(
|
||||
this.reentrancyMock.countThisRecursive(10), 'ReentrancyMock: failed call'
|
||||
this.reentrancyMock.countThisRecursive(10), 'ReentrancyMock: failed call',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@ -29,14 +29,14 @@ describe('SafeCast', async () => {
|
||||
it(`reverts when downcasting 2^${bits} (${maxValue.addn(1)})`, async function () {
|
||||
await expectRevert(
|
||||
this.safeCast[`toUint${bits}`](maxValue.addn(1)),
|
||||
`SafeCast: value doesn't fit in ${bits} bits`
|
||||
`SafeCast: value doesn't fit in ${bits} bits`,
|
||||
);
|
||||
});
|
||||
|
||||
it(`reverts when downcasting 2^${bits} + 1 (${maxValue.addn(2)})`, async function () {
|
||||
await expectRevert(
|
||||
this.safeCast[`toUint${bits}`](maxValue.addn(2)),
|
||||
`SafeCast: value doesn't fit in ${bits} bits`
|
||||
`SafeCast: value doesn't fit in ${bits} bits`,
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -64,21 +64,21 @@ describe('SafeCast', async () => {
|
||||
it('reverts when casting -1', async function () {
|
||||
await expectRevert(
|
||||
this.safeCast.toUint256(-1),
|
||||
'SafeCast: value must be positive'
|
||||
'SafeCast: value must be positive',
|
||||
);
|
||||
});
|
||||
|
||||
it(`reverts when casting INT256_MIN (${minInt256})`, async function () {
|
||||
await expectRevert(
|
||||
this.safeCast.toUint256(minInt256),
|
||||
'SafeCast: value must be positive'
|
||||
'SafeCast: value must be positive',
|
||||
);
|
||||
});
|
||||
|
||||
it(`reverts when casting UINT256_MAX (${maxUint256})`, async function () {
|
||||
await expectRevert(
|
||||
this.safeCast.toUint256(maxUint256),
|
||||
'SafeCast: value must be positive'
|
||||
'SafeCast: value must be positive',
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -111,28 +111,28 @@ describe('SafeCast', async () => {
|
||||
it(`reverts when downcasting -2^${bits - 1} - 1 (${minValue.subn(1)})`, async function () {
|
||||
await expectRevert(
|
||||
this.safeCast[`toInt${bits}`](minValue.subn(1)),
|
||||
`SafeCast: value doesn't fit in ${bits} bits`
|
||||
`SafeCast: value doesn't fit in ${bits} bits`,
|
||||
);
|
||||
});
|
||||
|
||||
it(`reverts when downcasting -2^${bits - 1} - 2 (${minValue.subn(2)})`, async function () {
|
||||
await expectRevert(
|
||||
this.safeCast[`toInt${bits}`](minValue.subn(2)),
|
||||
`SafeCast: value doesn't fit in ${bits} bits`
|
||||
`SafeCast: value doesn't fit in ${bits} bits`,
|
||||
);
|
||||
});
|
||||
|
||||
it(`reverts when downcasting 2^${bits - 1} (${maxValue.addn(1)})`, async function () {
|
||||
await expectRevert(
|
||||
this.safeCast[`toInt${bits}`](maxValue.addn(1)),
|
||||
`SafeCast: value doesn't fit in ${bits} bits`
|
||||
`SafeCast: value doesn't fit in ${bits} bits`,
|
||||
);
|
||||
});
|
||||
|
||||
it(`reverts when downcasting 2^${bits - 1} + 1 (${maxValue.addn(2)})`, async function () {
|
||||
await expectRevert(
|
||||
this.safeCast[`toInt${bits}`](maxValue.addn(2)),
|
||||
`SafeCast: value doesn't fit in ${bits} bits`
|
||||
`SafeCast: value doesn't fit in ${bits} bits`,
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -159,14 +159,14 @@ describe('SafeCast', async () => {
|
||||
it(`reverts when casting INT256_MAX + 1 (${maxInt256.addn(1)})`, async function () {
|
||||
await expectRevert(
|
||||
this.safeCast.toInt256(maxInt256.addn(1)),
|
||||
'SafeCast: value doesn\'t fit in an int256'
|
||||
'SafeCast: value doesn\'t fit in an int256',
|
||||
);
|
||||
});
|
||||
|
||||
it(`reverts when casting UINT256_MAX (${maxUint256})`, async function () {
|
||||
await expectRevert(
|
||||
this.safeCast.toInt256(maxUint256),
|
||||
'SafeCast: value doesn\'t fit in an int256'
|
||||
'SafeCast: value doesn\'t fit in an int256',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user