Use Prettier for JS files (#3913)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
@ -7,7 +7,7 @@ const shouldBehaveLikeClone = require('./Clones.behaviour');
|
||||
const Clones = artifacts.require('$Clones');
|
||||
|
||||
contract('Clones', function (accounts) {
|
||||
const [ deployer ] = accounts;
|
||||
const [deployer] = accounts;
|
||||
|
||||
describe('clone', function () {
|
||||
shouldBehaveLikeClone(async (implementation, initData, opts = {}) => {
|
||||
@ -34,15 +34,9 @@ contract('Clones', function (accounts) {
|
||||
const salt = web3.utils.randomHex(32);
|
||||
const factory = await Clones.new();
|
||||
// deploy once
|
||||
expectEvent(
|
||||
await factory.$cloneDeterministic(implementation, salt),
|
||||
'return$cloneDeterministic',
|
||||
);
|
||||
expectEvent(await factory.$cloneDeterministic(implementation, salt), 'return$cloneDeterministic');
|
||||
// deploy twice
|
||||
await expectRevert(
|
||||
factory.$cloneDeterministic(implementation, salt),
|
||||
'ERC1167: create2 failed',
|
||||
);
|
||||
await expectRevert(factory.$cloneDeterministic(implementation, salt), 'ERC1167: create2 failed');
|
||||
});
|
||||
|
||||
it('address prediction', async function () {
|
||||
@ -57,17 +51,11 @@ contract('Clones', function (accounts) {
|
||||
'5af43d82803e903d91602b57fd5bf3',
|
||||
].join('');
|
||||
|
||||
expect(computeCreate2Address(
|
||||
salt,
|
||||
creationCode,
|
||||
factory.address,
|
||||
)).to.be.equal(predicted);
|
||||
expect(computeCreate2Address(salt, creationCode, factory.address)).to.be.equal(predicted);
|
||||
|
||||
expectEvent(
|
||||
await factory.$cloneDeterministic(implementation, salt),
|
||||
'return$cloneDeterministic',
|
||||
{ instance: predicted },
|
||||
);
|
||||
expectEvent(await factory.$cloneDeterministic(implementation, salt), 'return$cloneDeterministic', {
|
||||
instance: predicted,
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user