Skip to content

Commit e42a92a

Browse files
authored
Update @OpenZeppelin/contracts dependency and migrate to hardhat-predeploy (#203)
1 parent 70653e2 commit e42a92a

19 files changed

+270
-80
lines changed

hardhat.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ require('@nomicfoundation/hardhat-chai-matchers');
3030
require('@nomicfoundation/hardhat-ethers');
3131
require('hardhat-exposed');
3232
require('hardhat-gas-reporter');
33+
require('hardhat-predeploy');
3334
require('solidity-coverage');
3435
require('solidity-docgen');
3536
require('./hardhat/remappings');
36-
require('@openzeppelin/contracts/hardhat/common-contracts');
3737

3838
module.exports = {
3939
solidity: {

lib/@openzeppelin-contracts

package-lock.json

Lines changed: 173 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/account/AccountWebAuthn.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { ethers, entrypoint } = require('hardhat');
1+
const { ethers, predeploy } = require('hardhat');
22
const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers');
33

44
const { getDomain } = require('@openzeppelin/contracts/test/helpers/eip712');
@@ -26,7 +26,7 @@ async function fixture() {
2626
const helper = new ERC4337Helper();
2727

2828
// ERC-4337 Entrypoint domain
29-
const entrypointDomain = await getDomain(entrypoint.v08);
29+
const entrypointDomain = await getDomain(predeploy.entrypoint.v08);
3030

3131
// domain cannot be fetched using getDomain(mock) before the mock is deployed
3232
const domain = {

test/account/modules/ERC7579DelayedExecutor.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { ethers, entrypoint } = require('hardhat');
1+
const { ethers, predeploy } = require('hardhat');
22
const { expect } = require('chai');
33
const { loadFixture, time } = require('@nomicfoundation/hardhat-network-helpers');
44

@@ -34,7 +34,7 @@ async function fixture() {
3434
// ERC-7579 account
3535
const mockAccount = await helper.newAccount('$AccountERC7579');
3636
const mockFromAccount = await impersonate(mockAccount.address).then(asAccount => mock.connect(asAccount));
37-
const mockAccountFromEntrypoint = await impersonate(entrypoint.v08.target).then(asEntrypoint =>
37+
const mockAccountFromEntrypoint = await impersonate(predeploy.entrypoint.v08.target).then(asEntrypoint =>
3838
mockAccount.connect(asEntrypoint),
3939
);
4040

test/account/modules/ERC7579Executor.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { ethers, entrypoint } = require('hardhat');
1+
const { ethers, predeploy } = require('hardhat');
22
const { expect } = require('chai');
33
const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers');
44

@@ -33,7 +33,7 @@ async function fixture() {
3333
const moduleType = MODULE_TYPE_EXECUTOR;
3434

3535
await mockAccount.deploy();
36-
await impersonate(entrypoint.v08.target).then(asEntrypoint =>
36+
await impersonate(predeploy.entrypoint.v08.target).then(asEntrypoint =>
3737
mockAccount.connect(asEntrypoint).installModule(moduleType, mock.target, installData),
3838
);
3939

test/account/modules/ERC7579Multisig.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { ethers, entrypoint } = require('hardhat');
1+
const { ethers, predeploy } = require('hardhat');
22
const { expect } = require('chai');
33
const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers');
44

@@ -41,7 +41,7 @@ async function fixture() {
4141
// ERC-7579 account
4242
const mockAccount = await helper.newAccount('$AccountERC7579');
4343
const mockFromAccount = await impersonate(mockAccount.address).then(asAccount => mock.connect(asAccount));
44-
const mockAccountFromEntrypoint = await impersonate(entrypoint.v08.target).then(asEntrypoint =>
44+
const mockAccountFromEntrypoint = await impersonate(predeploy.entrypoint.v08.target).then(asEntrypoint =>
4545
mockAccount.connect(asEntrypoint),
4646
);
4747

test/account/modules/ERC7579MultisigConfirmation.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { ethers, entrypoint } = require('hardhat');
1+
const { ethers, predeploy } = require('hardhat');
22
const { expect } = require('chai');
33
const { loadFixture, time } = require('@nomicfoundation/hardhat-network-helpers');
44

@@ -30,7 +30,7 @@ async function fixture() {
3030
// ERC-7579 account
3131
const mockAccount = await helper.newAccount('$AccountERC7579');
3232
const mockFromAccount = await impersonate(mockAccount.address).then(asAccount => mock.connect(asAccount));
33-
const mockAccountFromEntrypoint = await impersonate(entrypoint.v08.target).then(asEntrypoint =>
33+
const mockAccountFromEntrypoint = await impersonate(predeploy.entrypoint.v08.target).then(asEntrypoint =>
3434
mockAccount.connect(asEntrypoint),
3535
);
3636

test/account/modules/ERC7579MultisigStorage.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { ethers, entrypoint } = require('hardhat');
1+
const { ethers, predeploy } = require('hardhat');
22
const { expect } = require('chai');
33
const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers');
44
const { impersonate } = require('@openzeppelin/contracts/test/helpers/account');
@@ -40,7 +40,7 @@ async function fixture() {
4040
// ERC-7579 account
4141
const mockAccount = await helper.newAccount('$AccountERC7579');
4242
const mockFromAccount = await impersonate(mockAccount.address).then(asAccount => mock.connect(asAccount));
43-
const mockAccountFromEntrypoint = await impersonate(entrypoint.v08.target).then(asEntrypoint =>
43+
const mockAccountFromEntrypoint = await impersonate(predeploy.entrypoint.v08.target).then(asEntrypoint =>
4444
mockAccount.connect(asEntrypoint),
4545
);
4646

0 commit comments

Comments
 (0)