Migrate to Hardhat (#2397)
This commit is contained in:
committed by
GitHub
parent
0c27ecc536
commit
f06738828b
@ -1,22 +1,20 @@
|
||||
const { contract, web3 } = require('@openzeppelin/test-environment');
|
||||
|
||||
const { BN, expectRevert, expectEvent, constants } = require('@openzeppelin/test-helpers');
|
||||
const { ZERO_ADDRESS } = constants;
|
||||
const { toChecksumAddress, keccak256 } = require('ethereumjs-util');
|
||||
|
||||
const { expect } = require('chai');
|
||||
|
||||
const Proxy = contract.fromArtifact('Proxy');
|
||||
const Implementation1 = contract.fromArtifact('Implementation1');
|
||||
const Implementation2 = contract.fromArtifact('Implementation2');
|
||||
const Implementation3 = contract.fromArtifact('Implementation3');
|
||||
const Implementation4 = contract.fromArtifact('Implementation4');
|
||||
const MigratableMockV1 = contract.fromArtifact('MigratableMockV1');
|
||||
const MigratableMockV2 = contract.fromArtifact('MigratableMockV2');
|
||||
const MigratableMockV3 = contract.fromArtifact('MigratableMockV3');
|
||||
const InitializableMock = contract.fromArtifact('InitializableMock');
|
||||
const DummyImplementation = contract.fromArtifact('DummyImplementation');
|
||||
const ClashingImplementation = contract.fromArtifact('ClashingImplementation');
|
||||
const Proxy = artifacts.require('Proxy');
|
||||
const Implementation1 = artifacts.require('Implementation1');
|
||||
const Implementation2 = artifacts.require('Implementation2');
|
||||
const Implementation3 = artifacts.require('Implementation3');
|
||||
const Implementation4 = artifacts.require('Implementation4');
|
||||
const MigratableMockV1 = artifacts.require('MigratableMockV1');
|
||||
const MigratableMockV2 = artifacts.require('MigratableMockV2');
|
||||
const MigratableMockV3 = artifacts.require('MigratableMockV3');
|
||||
const InitializableMock = artifacts.require('InitializableMock');
|
||||
const DummyImplementation = artifacts.require('DummyImplementation');
|
||||
const ClashingImplementation = artifacts.require('ClashingImplementation');
|
||||
|
||||
const IMPLEMENTATION_LABEL = 'eip1967.proxy.implementation';
|
||||
const ADMIN_LABEL = 'eip1967.proxy.admin';
|
||||
@ -409,7 +407,7 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy (createPro
|
||||
await proxy.upgradeTo(instance4.address, { from: proxyAdminAddress });
|
||||
const proxyInstance4 = new Implementation4(proxy.address);
|
||||
|
||||
const data = '';
|
||||
const data = '0x';
|
||||
await web3.eth.sendTransaction({ to: proxy.address, from: anotherAccount, data });
|
||||
|
||||
const res = await proxyInstance4.getValue();
|
||||
@ -423,7 +421,7 @@ module.exports = function shouldBehaveLikeTransparentUpgradeableProxy (createPro
|
||||
const instance2 = await Implementation2.new();
|
||||
await proxy.upgradeTo(instance2.address, { from: proxyAdminAddress });
|
||||
|
||||
const data = '';
|
||||
const data = '0x';
|
||||
await expectRevert.unspecified(
|
||||
web3.eth.sendTransaction({ to: proxy.address, from: anotherAccount, data }),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user