From 6b92cb051a342e0c2f42824bfe1437060fcc9f67 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Mon, 13 Nov 2023 15:50:54 -0500 Subject: [PATCH 1/7] Add createFactoryAddress option for Defender (#920) --- packages/plugin-hardhat/CHANGELOG.md | 6 ++++ .../plugin-hardhat/src/defender/deploy.ts | 32 ++++++++++------- packages/plugin-hardhat/src/utils/options.ts | 1 + .../plugin-hardhat/test/defender-deploy.js | 36 +++++++++++++++++++ 4 files changed, 63 insertions(+), 12 deletions(-) diff --git a/packages/plugin-hardhat/CHANGELOG.md b/packages/plugin-hardhat/CHANGELOG.md index 36512332e..a712a890d 100644 --- a/packages/plugin-hardhat/CHANGELOG.md +++ b/packages/plugin-hardhat/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +- Add `createFactoryAddress` option for Defender deployments. ([#920](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/920)) + +**Note**: OpenZeppelin Defender deployments is in beta and its functionality is subject to change. + ## 2.3.3 (2023-10-12) - Update OpenZeppelin Defender deployments to use Defender SDK ([#888](https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/888)) diff --git a/packages/plugin-hardhat/src/defender/deploy.ts b/packages/plugin-hardhat/src/defender/deploy.ts index e69c5cbc5..a751a89c1 100644 --- a/packages/plugin-hardhat/src/defender/deploy.ts +++ b/packages/plugin-hardhat/src/defender/deploy.ts @@ -3,7 +3,7 @@ import { CompilerInput, CompilerOutputContract, HardhatRuntimeEnvironment } from import { parseFullyQualifiedName } from 'hardhat/utils/contract-names'; -import { DeploymentResponse, SourceCodeLicense } from '@openzeppelin/defender-sdk-deploy-client'; +import { DeploymentResponse, SourceCodeLicense, DeployContractRequest } from '@openzeppelin/defender-sdk-deploy-client'; import { Deployment, RemoteDeploymentId, @@ -54,6 +54,11 @@ type CompilerOutputWithMetadata = CompilerOutputContract & { metadata?: string; }; +type DeployRequest = DeployContractRequest & { + // TODO: remove this when defender-sdk-deploy-client dependency is updated + createFactoryAddress?: string; +}; + export async function defenderDeploy( hre: HardhatRuntimeEnvironment, factory: ContractFactory, @@ -80,19 +85,22 @@ export async function defenderDeploy( debug(`Salt: ${opts.salt}`); } + const deploymentRequest: DeployRequest = { + contractName: contractInfo.contractName, + contractPath: contractInfo.sourceName, + network: network, + artifactPayload: JSON.stringify(contractInfo.buildInfo), + licenseType: license as SourceCodeLicense | undefined, // cast without validation but catch error from API below + constructorInputs: constructorArgs, + verifySourceCode: verifySourceCode, + relayerId: opts.relayerId, + salt: opts.salt, + createFactoryAddress: opts.createFactoryAddress, + }; + let deploymentResponse: DeploymentResponse; try { - deploymentResponse = await client.deployContract({ - contractName: contractInfo.contractName, - contractPath: contractInfo.sourceName, - network: network, - artifactPayload: JSON.stringify(contractInfo.buildInfo), - licenseType: license as SourceCodeLicense | undefined, // cast without validation but catch error from API below - constructorInputs: constructorArgs, - verifySourceCode: verifySourceCode, - relayerId: opts.relayerId, - salt: opts.salt, - }); + deploymentResponse = await client.deployContract(deploymentRequest); } catch (e: any) { if (e.response?.data?.message?.includes('licenseType should be equal to one of the allowed values')) { throw new UpgradesError( diff --git a/packages/plugin-hardhat/src/utils/options.ts b/packages/plugin-hardhat/src/utils/options.ts index fd1bb90df..1b706f37d 100644 --- a/packages/plugin-hardhat/src/utils/options.ts +++ b/packages/plugin-hardhat/src/utils/options.ts @@ -63,6 +63,7 @@ export type DefenderDeployOptions = DefenderDeploy & { verifySourceCode?: boolean; relayerId?: string; salt?: string; + createFactoryAddress?: string; }; /** diff --git a/packages/plugin-hardhat/test/defender-deploy.js b/packages/plugin-hardhat/test/defender-deploy.js index ecc8709d3..09ca2ad7c 100644 --- a/packages/plugin-hardhat/test/defender-deploy.js +++ b/packages/plugin-hardhat/test/defender-deploy.js @@ -19,6 +19,7 @@ const TX_RESPONSE = 'mocked response'; const ETHERSCAN_API_KEY = 'fakeKey'; const RELAYER_ID = '123-abc'; const SALT = 'customsalt'; +const CREATE_FACTORY = '0x0000000000000000000000000000000000000010'; const LOGIC_ADDRESS = '0x0000000000000000000000000000000000000003'; const ADMIN_ADDRESS = '0x0000000000000000000000000000000000000004'; @@ -99,6 +100,7 @@ test('calls defender deploy', async t => { verifySourceCode: true, relayerId: undefined, salt: undefined, + createFactoryAddress: undefined, }); assertResult(t, result); @@ -124,6 +126,7 @@ test('calls defender deploy with relayerId', async t => { verifySourceCode: true, relayerId: RELAYER_ID, salt: undefined, + createFactoryAddress: undefined, }); assertResult(t, result); @@ -149,6 +152,33 @@ test('calls defender deploy with salt', async t => { verifySourceCode: true, relayerId: undefined, salt: SALT, + createFactoryAddress: undefined, + }); + + assertResult(t, result); +}); + +test('calls defender deploy with createFactoryAddress', async t => { + const { spy, deploy, fakeHre, fakeChainId } = t.context; + + const contractPath = 'contracts/Greeter.sol'; + const contractName = 'Greeter'; + + const factory = await ethers.getContractFactory(contractName); + const result = await deploy.defenderDeploy(fakeHre, factory, { createFactoryAddress: CREATE_FACTORY }); + + const buildInfo = await hre.artifacts.getBuildInfo(`${contractPath}:${contractName}`); + sinon.assert.calledWithExactly(spy, { + contractName: contractName, + contractPath: contractPath, + network: fakeChainId, + artifactPayload: JSON.stringify(buildInfo), + licenseType: 'None', + constructorInputs: [], + verifySourceCode: true, + relayerId: undefined, + salt: undefined, + createFactoryAddress: CREATE_FACTORY, }); assertResult(t, result); @@ -174,6 +204,7 @@ test('calls defender deploy with license', async t => { verifySourceCode: true, relayerId: undefined, salt: undefined, + createFactoryAddress: undefined, }); assertResult(t, result); @@ -199,6 +230,7 @@ test('calls defender deploy with constructor args', async t => { verifySourceCode: true, relayerId: undefined, salt: undefined, + createFactoryAddress: undefined, }); assertResult(t, result); @@ -224,6 +256,7 @@ test('calls defender deploy with verify false', async t => { verifySourceCode: false, relayerId: undefined, salt: undefined, + createFactoryAddress: undefined, }); assertResult(t, result); @@ -249,6 +282,7 @@ test('calls defender deploy with ERC1967Proxy', async t => { verifySourceCode: true, relayerId: undefined, salt: undefined, + createFactoryAddress: undefined, }); }); @@ -272,6 +306,7 @@ test('calls defender deploy with BeaconProxy', async t => { verifySourceCode: true, relayerId: undefined, salt: undefined, + createFactoryAddress: undefined, }); }); @@ -295,5 +330,6 @@ test('calls defender deploy with TransparentUpgradeableProxy', async t => { verifySourceCode: true, relayerId: undefined, salt: undefined, + createFactoryAddress: undefined, }); }); From a452ae131e17dd3b59b2434be4041b39e37a3253 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Mon, 13 Nov 2023 15:52:48 -0500 Subject: [PATCH 2/7] Remove plugin-defender-hardhat from test matrix --- .github/workflows/checks.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 9f09be468..1ef10d172 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -29,7 +29,6 @@ jobs: - core - plugin-hardhat - plugin-truffle - - plugin-defender-hardhat runs-on: ubuntu-latest From 55eae3917c31c2aa867859b1536021fddd76bbc7 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Mon, 13 Nov 2023 16:02:53 -0500 Subject: [PATCH 3/7] Publish @openzeppelin/hardhat-upgrades@2.4.0 --- packages/plugin-hardhat/CHANGELOG.md | 2 +- packages/plugin-hardhat/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugin-hardhat/CHANGELOG.md b/packages/plugin-hardhat/CHANGELOG.md index a712a890d..cf00b6deb 100644 --- a/packages/plugin-hardhat/CHANGELOG.md +++ b/packages/plugin-hardhat/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## Unreleased +## 2.4.0 (2023-11-13) - Add `createFactoryAddress` option for Defender deployments. ([#920](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/920)) diff --git a/packages/plugin-hardhat/package.json b/packages/plugin-hardhat/package.json index 9f52b163d..c4848149e 100644 --- a/packages/plugin-hardhat/package.json +++ b/packages/plugin-hardhat/package.json @@ -1,6 +1,6 @@ { "name": "@openzeppelin/hardhat-upgrades", - "version": "2.3.3", + "version": "2.4.0", "description": "", "repository": "https://github.com/OpenZeppelin/openzeppelin-upgrades/tree/master/packages/plugin-hardhat", "license": "MIT", From 9078b9d291b151d5cd9db03229fda154e4132ab9 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 14 Nov 2023 13:47:02 -0500 Subject: [PATCH 4/7] Update Defender SDK (#924) --- .github/workflows/checks.yml | 1 - packages/plugin-hardhat/CHANGELOG.md | 7 +++ packages/plugin-hardhat/package.json | 8 +-- .../src/defender-v1/propose-upgrade.ts | 4 +- .../plugin-hardhat/src/defender/deploy.ts | 23 ++++++--- packages/plugin-hardhat/tsconfig.json | 3 +- yarn.lock | 51 +++++++++++-------- 7 files changed, 63 insertions(+), 34 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 1ef10d172..9847444ee 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -28,7 +28,6 @@ jobs: package: - core - plugin-hardhat - - plugin-truffle runs-on: ubuntu-latest diff --git a/packages/plugin-hardhat/CHANGELOG.md b/packages/plugin-hardhat/CHANGELOG.md index cf00b6deb..81b72e7da 100644 --- a/packages/plugin-hardhat/CHANGELOG.md +++ b/packages/plugin-hardhat/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## Unreleased + +- Update Defender SDK. ([#924](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/924)) +- Throw error if not using a relayer for deployments, until other types of deployments are supported. + +**Note**: OpenZeppelin Defender deployments is in beta and its functionality is subject to change. + ## 2.4.0 (2023-11-13) - Add `createFactoryAddress` option for Defender deployments. ([#920](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/920)) diff --git a/packages/plugin-hardhat/package.json b/packages/plugin-hardhat/package.json index c4848149e..5181dfd7a 100644 --- a/packages/plugin-hardhat/package.json +++ b/packages/plugin-hardhat/package.json @@ -36,10 +36,10 @@ "sinon": "^17.0.0" }, "dependencies": { - "@openzeppelin/defender-admin-client": "^1.48.0", - "@openzeppelin/defender-base-client": "^1.48.0", - "@openzeppelin/defender-sdk-base-client": "^1.2.0", - "@openzeppelin/defender-sdk-deploy-client": "^1.2.0", + "@openzeppelin/defender-admin-client": "^1.52.0", + "@openzeppelin/defender-base-client": "^1.52.0", + "@openzeppelin/defender-sdk-base-client": "^1.5.0", + "@openzeppelin/defender-sdk-deploy-client": "^1.5.0", "@openzeppelin/upgrades-core": "^1.30.1", "chalk": "^4.1.0", "debug": "^4.1.1", diff --git a/packages/plugin-hardhat/src/defender-v1/propose-upgrade.ts b/packages/plugin-hardhat/src/defender-v1/propose-upgrade.ts index 4d7b2a7a2..9d33ffa2c 100644 --- a/packages/plugin-hardhat/src/defender-v1/propose-upgrade.ts +++ b/packages/plugin-hardhat/src/defender-v1/propose-upgrade.ts @@ -5,7 +5,7 @@ import { isTransparentOrUUPSProxy, isTransparentProxy, } from '@openzeppelin/upgrades-core'; -import { ProposalResponse } from '@openzeppelin/defender-admin-client'; +import { ProposalResponse, CreateProposalRequest } from '@openzeppelin/defender-admin-client'; import { ContractFactory, getCreateAddress, ethers } from 'ethers'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; import { getAdminClient, getNetwork } from './utils'; @@ -28,7 +28,7 @@ export interface ProposalOptions extends UpgradeOptions { description?: string; proxyAdmin?: string; multisig?: string; - multisigType?: 'Gnosis Safe' | 'Gnosis Multisig' | 'EOA'; + multisigType?: CreateProposalRequest['viaType']; bytecodeVerificationReferenceUrl?: string; } diff --git a/packages/plugin-hardhat/src/defender/deploy.ts b/packages/plugin-hardhat/src/defender/deploy.ts index a751a89c1..1687374d9 100644 --- a/packages/plugin-hardhat/src/defender/deploy.ts +++ b/packages/plugin-hardhat/src/defender/deploy.ts @@ -54,11 +54,6 @@ type CompilerOutputWithMetadata = CompilerOutputContract & { metadata?: string; }; -type DeployRequest = DeployContractRequest & { - // TODO: remove this when defender-sdk-deploy-client dependency is updated - createFactoryAddress?: string; -}; - export async function defenderDeploy( hre: HardhatRuntimeEnvironment, factory: ContractFactory, @@ -85,7 +80,7 @@ export async function defenderDeploy( debug(`Salt: ${opts.salt}`); } - const deploymentRequest: DeployRequest = { + const deploymentRequest: DeployContractRequest = { contractName: contractInfo.contractName, contractPath: contractInfo.sourceName, network: network, @@ -112,6 +107,22 @@ export async function defenderDeploy( } } + if (deploymentResponse.address === undefined) { + throw new UpgradesError( + `Deployment response with id ${deploymentResponse.deploymentId} does not include a contract address`, + () => + 'The Hardhat Upgrades plugin is not currently compatible with this type of deployment. Use a relayer for your default deploy approval process in Defender.', + ); + } + + if (deploymentResponse.txHash === undefined) { + throw new UpgradesError( + `Deployment response with id ${deploymentResponse.deploymentId} does not include a transaction hash`, + () => + 'The Hardhat Upgrades plugin is not currently compatible with this type of deployment. Use a relayer for your default deploy approval process in Defender.', + ); + } + const txResponse = (await hre.ethers.provider.getTransaction(deploymentResponse.txHash)) ?? undefined; const checksumAddress = hre.ethers.getAddress(deploymentResponse.address); return { diff --git a/packages/plugin-hardhat/tsconfig.json b/packages/plugin-hardhat/tsconfig.json index be52e0236..c42543bee 100644 --- a/packages/plugin-hardhat/tsconfig.json +++ b/packages/plugin-hardhat/tsconfig.json @@ -4,7 +4,8 @@ "composite": true, "outDir": "dist", "rootDir": "src", - "resolveJsonModule": true + "resolveJsonModule": true, + "skipLibCheck": true, }, "include": [ "src/**/*" diff --git a/yarn.lock b/yarn.lock index 9fe013ebe..cda223750 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2393,21 +2393,21 @@ resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.8.3.tgz#cbef3146bfc570849405f59cba18235da95a252a" integrity sha512-bQHV8R9Me8IaJoJ2vPG4rXcL7seB7YVuskr4f+f5RyOStSZetwzkWtoqDMl5erkBJy0lDRUnIR2WIkPiC0GJlg== -"@openzeppelin/defender-admin-client@^1.48.0": - version "1.48.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/defender-admin-client/-/defender-admin-client-1.48.0.tgz#acb8d6677a0b1bca463f9017aefaf4b6720123e1" - integrity sha512-MN29JD6jA3PgOxF2tG0aZbMIwOCieYWkK9UbHCq1UzGPrMgGV9NVMUyVdqpv7Ynplwsjp5ZTBDOyttwvTlchHg== +"@openzeppelin/defender-admin-client@^1.52.0": + version "1.52.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-admin-client/-/defender-admin-client-1.52.0.tgz#9788dc839ae1d31c82c57d3e277c1c1ecb149740" + integrity sha512-CKs5mMLL7+nXyugsHaAw0aPfLwFNA+vq7ftuJ3sWUKdbQRZsJ+/189HAwp2/BJC64yUbarEeWqOh3jNpaKRJLw== dependencies: - "@openzeppelin/defender-base-client" "1.48.0" + "@openzeppelin/defender-base-client" "1.52.0" axios "^1.4.0" ethers "^5.7.2" lodash "^4.17.19" node-fetch "^2.6.0" -"@openzeppelin/defender-base-client@1.48.0", "@openzeppelin/defender-base-client@^1.48.0": - version "1.48.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/defender-base-client/-/defender-base-client-1.48.0.tgz#9103b1b036db0451b52d7899a277bf24db4c4b06" - integrity sha512-HFO87s010hRrMjyh2xYOCEAkLe21BfIbho7n5/kikA6A1ZgXi7MsEiqnQv1zP4bxMJgxGZ5b3t4tt6fWrakbag== +"@openzeppelin/defender-base-client@1.52.0", "@openzeppelin/defender-base-client@^1.52.0": + version "1.52.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-base-client/-/defender-base-client-1.52.0.tgz#7a000eeba9705c75e6be5de5d32e07d377aed55d" + integrity sha512-VFNu/pjVpAnFKIfuKT1cn9dRpbcO8FO8EAmVZ2XrrAsKXEWDZ3TNBtACxmj7fAu0ad/TzRkb66o5rMts7Fv7jw== dependencies: amazon-cognito-identity-js "^6.0.1" async-retry "^1.3.3" @@ -2415,21 +2415,21 @@ lodash "^4.17.19" node-fetch "^2.6.0" -"@openzeppelin/defender-sdk-base-client@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/defender-sdk-base-client/-/defender-sdk-base-client-1.2.0.tgz#4ed527939e3b8f0db1bd8a8b35f39effb795c3c8" - integrity sha512-v/nzOABW4RH4wqVPG8gUICV48eZeO0kf6ZvNsd1aUP4i7NyCPv80gErjtW08SFzR/sTqsDN6PS3D+les8mGXvg== +"@openzeppelin/defender-sdk-base-client@^1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-sdk-base-client/-/defender-sdk-base-client-1.5.0.tgz#82d2b45c84822dfadaba8b7cfe215df7ac3c4bec" + integrity sha512-8aN4sEE15/6LctA14ADr8c6QvEzEXfAtFlxo/Ys0N6UVfp8lRAYqDOpHd4mb8dMfkRzq5izMCuMYgAjC9GFflQ== dependencies: - amazon-cognito-identity-js "^6.0.1" + amazon-cognito-identity-js "^6.3.6" async-retry "^1.3.3" -"@openzeppelin/defender-sdk-deploy-client@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/defender-sdk-deploy-client/-/defender-sdk-deploy-client-1.2.0.tgz#76381c8f3c2821ec2856e70d1d562d3fbfe7c88d" - integrity sha512-kUBRKMSQiTZ8urP236L68k5X8Eg1ys2FDYMeuJ22GhXFAC2M1l6OaXNFolFBSzmS5t/x8BkJU6+RCyoCqO2qxg== +"@openzeppelin/defender-sdk-deploy-client@^1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-sdk-deploy-client/-/defender-sdk-deploy-client-1.5.0.tgz#b0bdadc0f00a44c49a3f96e85673394f94f99d6c" + integrity sha512-DbE4Rpa90vSN7o5/sim5qzAVVsSWkZBJ+Z9yjkc8qPRheh2dRk6oe2GhVoQfXI/04XwMb2uNvtfU1VAH8AzgaQ== dependencies: - "@ethersproject/abi" "^5.6.3" - "@openzeppelin/defender-sdk-base-client" "^1.2.0" + "@ethersproject/abi" "^5.7.0" + "@openzeppelin/defender-sdk-base-client" "^1.5.0" axios "^1.4.0" lodash "^4.17.21" @@ -3636,6 +3636,17 @@ amazon-cognito-identity-js@^6.0.1: isomorphic-unfetch "^3.0.0" js-cookie "^2.2.1" +amazon-cognito-identity-js@^6.3.6: + version "6.3.7" + resolved "https://registry.yarnpkg.com/amazon-cognito-identity-js/-/amazon-cognito-identity-js-6.3.7.tgz#65c3d7ee4e0c0a1ffea01927248989c5bd1d1868" + integrity sha512-tSjnM7KyAeOZ7UMah+oOZ6cW4Gf64FFcc7BE2l7MTcp7ekAPrXaCbpcW2xEpH1EiDS4cPcAouHzmCuc2tr72vQ== + dependencies: + "@aws-crypto/sha256-js" "1.2.2" + buffer "4.9.2" + fast-base64-decode "^1.0.0" + isomorphic-unfetch "^3.0.0" + js-cookie "^2.2.1" + ansi-colors@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" From 142c919ca7f33093e13fac1fbf8098391442efb3 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 14 Nov 2023 13:48:07 -0500 Subject: [PATCH 5/7] Publish @openzeppelin/hardhat-upgrades@2.4.1 --- packages/plugin-hardhat/CHANGELOG.md | 2 +- packages/plugin-hardhat/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugin-hardhat/CHANGELOG.md b/packages/plugin-hardhat/CHANGELOG.md index 81b72e7da..e42063672 100644 --- a/packages/plugin-hardhat/CHANGELOG.md +++ b/packages/plugin-hardhat/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## Unreleased +## 2.4.1 (2023-11-14) - Update Defender SDK. ([#924](https://github.com/OpenZeppelin/openzeppelin-upgrades/pull/924)) - Throw error if not using a relayer for deployments, until other types of deployments are supported. diff --git a/packages/plugin-hardhat/package.json b/packages/plugin-hardhat/package.json index 5181dfd7a..9a1848a09 100644 --- a/packages/plugin-hardhat/package.json +++ b/packages/plugin-hardhat/package.json @@ -1,6 +1,6 @@ { "name": "@openzeppelin/hardhat-upgrades", - "version": "2.4.0", + "version": "2.4.1", "description": "", "repository": "https://github.com/OpenZeppelin/openzeppelin-upgrades/tree/master/packages/plugin-hardhat", "license": "MIT", From 93c9e6fecfe33d318e5a9bdb5d53df6c4d0eaae4 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Tue, 21 Nov 2023 08:43:38 -0500 Subject: [PATCH 6/7] Test modified compile with multiple namespaces (#927) --- .github/workflows/checks.yml | 1 + .../contracts/test/NamespacedToModify.sol | 6 ++++++ .../core/src/utils/make-namespaced.test.ts | 4 +++- .../core/src/utils/make-namespaced.test.ts.md | 6 ++++++ .../src/utils/make-namespaced.test.ts.snap | Bin 1013 -> 1035 bytes 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 9847444ee..cc26540f6 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -28,6 +28,7 @@ jobs: package: - core - plugin-hardhat + fail-fast: false runs-on: ubuntu-latest diff --git a/packages/core/contracts/test/NamespacedToModify.sol b/packages/core/contracts/test/NamespacedToModify.sol index 91863fc3b..c8c1d0e75 100644 --- a/packages/core/contracts/test/NamespacedToModify.sol +++ b/packages/core/contracts/test/NamespacedToModify.sol @@ -8,6 +8,12 @@ contract Example { uint256 y; } + /// @custom:storage-location erc7201:example.secondary + struct SecondaryStorage { + uint256 a; + uint256 b; + } + /// @notice some natspec function foo() public {} diff --git a/packages/core/src/utils/make-namespaced.test.ts b/packages/core/src/utils/make-namespaced.test.ts index da02b8418..6dbbe56ae 100644 --- a/packages/core/src/utils/make-namespaced.test.ts +++ b/packages/core/src/utils/make-namespaced.test.ts @@ -49,7 +49,9 @@ async function testMakeNamespaced( function normalizeStateVariableNames(input: SolcInput): void { for (const source of Object.values(input.sources)) { if (source.content !== undefined) { - source.content = source.content.replace(/\$MainStorage_\d{1,6};/g, '$MainStorage_random;'); + source.content = source.content + .replace(/\$MainStorage_\d{1,6};/g, '$MainStorage_random;') + .replace(/\$SecondaryStorage_\d{1,6}/g, '$SecondaryStorage_random'); } } } diff --git a/packages/core/src/utils/make-namespaced.test.ts.md b/packages/core/src/utils/make-namespaced.test.ts.md index bdcf08b29..83a23e9aa 100644 --- a/packages/core/src/utils/make-namespaced.test.ts.md +++ b/packages/core/src/utils/make-namespaced.test.ts.md @@ -37,6 +37,12 @@ Generated by [AVA](https://avajs.dev). uint256 x;␊ uint256 y;␊ } MainStorage $MainStorage_random;␊ + ␊ + /// @custom:storage-location erc7201:example.secondary␊ + struct SecondaryStorage {␊ + uint256 a;␊ + uint256 b;␊ + } SecondaryStorage $SecondaryStorage_random;␊ ␊ ␊ ␊ diff --git a/packages/core/src/utils/make-namespaced.test.ts.snap b/packages/core/src/utils/make-namespaced.test.ts.snap index 760ce4135a3d057f59ab08d0d02979f71be5092b..de4bc1ff70b3c9ccb195c1000e2568c2ab735d25 100644 GIT binary patch literal 1035 zcmV+m1oZnsRzV`l`j)?4?rEwp$rDpIVO|0Htf( z(c$3sMjwj^00000000B!RZWi@H5eYxWRo<|W-Cxn9IT~<%|bpJ)Lpb&P|JS6O8bFG zD#3-7GvjRC%-E6bX*X00f&&Lm94dsk6>)-}fZ)QVzXLd+a^WZNjx$LnGaGGJYPm3y zXKcUE`}%op&+|U)c6{OX)ED1V&9qO$fb=NlB%rEKTT-m zei)KNI-Y0=pLt9VEOY^(Zz1B?qNvu4A1Y({Enz7r5lWY;h>-Ib4F5oT4yDN0(`1Us zejOmqG_086Y?}ocnk;xu^fe3ECsZ2KgM_IpLJiy2qCP}mf}04)zQeTq8fM6A07W{Fe_GYcwSSyuA8;duONYM8wzF)%d)FI*xH&j{#tMCGM zT7~ORqBFu&x+~4b)m1ulsRe{_*lp(e6*IC8Vsk7r#vqw z1_zRGPXxgC%;Xe>6g?sbNrtV_Z432H+jm8LpXTxejr{fXaz=7PGz|s`fn*2hJoa4>MCp?)=i`5ShYX-f#AWvgpICR{nuEBxxKUflmSE@6|FQ)4 zW|!b^o~#7_l7PK>Y6)(vjEnG};P@C?@$@2m1t71TUWDHU$i{zGg#WhBT!g>0&RT@w zuGW@8f1j?*nf<@ySk_C>s?HONzzruQ0@TTfz*jK!wR4IH`~ZL-oo6Ki{{jryJp6?V F0067+{1*TK literal 1013 zcmVRzV{cK`<{7tTHP?Rc|Z?nLN5ZOnuSf}V3z^%Ru*>ZsJti6YMOG= z^{HpZb|s^ok|9@SFl9fmQfdEO7^jWq4;7Q1qurof$76fPX*6*A`s(|&4dzm=Xl>mC zHR~}dm++tiN7wHJ8if!;Qsj`y?3n6yGUh_!{8xiW@2|f+c9c zoYvs_ljw{vmF{Azd0~l;OzHt)+*m0sLvXbTykb!K1aH&PPr>QIv2+?H&&iY z=XkDK#Wj2Z+L!UC-67n>i><__x!>zmtIO$tQmxrfE;O7Ega^s^f=BG3)quLWQ~+#1 z#GpJ8BO3Gbqph1y`2a08%oM8{$85|&>a5=(>RQOngEI$I&ggd(5J!SwDsKSj!@~os zC>o8gNlFh<#>41U3yI&r(N)VCtZZ+!J6E?lyF2amt+#jEYa44To$YsHxX-$h$RXZf z-O-xaC|AHw7*ILZ9v9ib4^`*3h#lt=6>^oyh<`q&Dz%iMli%Pu{t5D^kRgD=F~m1h zOx~|$CR)YG2Mvt!9!z~$j2#xPN=b&}UZqkopj!aAodHcxfXap%o{gv>S-~MnAFY{* z-|+?+0_nz8Y#$$4#^9O*SGc%YU(8oD=fVH7qVenjYc3`=?RPMI z2vRz^rkw}Kt0&jAHvzKxpVhR#?5D12Us_LF)8MYw7l42NS(-EZ|AJ##XF+Pt6OzCc jCqn|%$&tWUF!i-_0tx&GfS;Uyiv%766wNAS)CvFq$ Date: Wed, 22 Nov 2023 13:56:54 -0500 Subject: [PATCH 7/7] Update dev dependencies on hardhat and hardhat-ethers (#928) --- .github/workflows/checks.yml | 1 - packages/core/hardhat.config.js | 2 +- packages/core/package.json | 4 +- .../core/src/utils/make-namespaced.test.ts.md | 1 + .../src/utils/make-namespaced.test.ts.snap | Bin 1035 -> 1077 bytes packages/plugin-hardhat/package.json | 4 +- yarn.lock | 205 +++++++++--------- 7 files changed, 108 insertions(+), 109 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index cc26540f6..9847444ee 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -28,7 +28,6 @@ jobs: package: - core - plugin-hardhat - fail-fast: false runs-on: ubuntu-latest diff --git a/packages/core/hardhat.config.js b/packages/core/hardhat.config.js index 4e28f5f8c..37fccdb01 100644 --- a/packages/core/hardhat.config.js +++ b/packages/core/hardhat.config.js @@ -27,7 +27,7 @@ function getNamespacedOverrides() { const overrides = {}; for (const c of namespacedContracts) { if (c !== 'NamespacedToModify07.sol') { - overrides[`contracts/test/${c}`] = { version: '0.8.20', settings }; + overrides[`contracts/test/${c}`] = { version: '0.8.20', settings: { ...settings, evmVersion: 'paris' } }; } } return overrides; diff --git a/packages/core/package.json b/packages/core/package.json index facdc6bfb..eb4d32798 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@ava/typescript": "^4.0.0", - "@nomicfoundation/hardhat-ethers": "^3.0.0", + "@nomicfoundation/hardhat-ethers": "^3.0.5", "@openzeppelin/contracts": "4.8.3", "@openzeppelin/contracts-upgradeable": "4.8.3", "@types/cbor": "^5.0.0", @@ -50,7 +50,7 @@ "ava": "^5.0.0", "dotenv": "^16.0.0", "fgbg": "^0.1.4", - "hardhat": "^2.0.2", + "hardhat": "^2.19.1", "rimraf": "^5.0.0", "typescript": "^4.0.0" }, diff --git a/packages/core/src/utils/make-namespaced.test.ts.md b/packages/core/src/utils/make-namespaced.test.ts.md index 83a23e9aa..0256c911a 100644 --- a/packages/core/src/utils/make-namespaced.test.ts.md +++ b/packages/core/src/utils/make-namespaced.test.ts.md @@ -11,6 +11,7 @@ Generated by [AVA](https://avajs.dev). { language: 'Solidity', settings: { + evmVersion: 'paris', optimizer: { enabled: true, runs: 200, diff --git a/packages/core/src/utils/make-namespaced.test.ts.snap b/packages/core/src/utils/make-namespaced.test.ts.snap index de4bc1ff70b3c9ccb195c1000e2568c2ab735d25..b89e403192b22f7421084300310d60bfcbb7928a 100644 GIT binary patch literal 1077 zcmV-51j_qCRzVW4OmWgzcZF7;J@h=H z$p;1LSOqJ3P!Z);;r9(_6xyfIo4AkVA@mJI99tCCn(-rLEI%hK1tmi1Qe_DJ0fxVzJ&!DF4W$U# z(}ar1z73E&X;^VC?-IQiyicWKf{&&a`b4rJxd&)M?twzx%o zSP3GTm5_n`mVjMz1=o_eTGcdFy4D;YQCsW@k97xCCHyEG=aLO>&>D6sBPWyiK0prA zuv`Xq7a%+hyO7x*JGDOr%1Otko*CQalr<+quFN23KeiHSKgdtgMk^!3bmV9^DA)1W z&gW`1+~5B{>QRR`JEcck0#GtBv|bsWjSHynRf9 zzEAP}5{9P+5pTGm(jr)g7r4_3d@3Y5BTS{c)~H`!r$d)&Ko~b(O3M&J?ZLP;bc(}8 zPsq4#ytayuH!@R$;nc~L=hejEP!jHm0QjDpoT8ATN8}*Mur->TO_OA4c1AQa?pM<@ z(}ahwv%ATC18>v0ZV<$Q;zTOl_JVUDVlvL7f=#W8}ZtOKA&#|T~#8;x&CN=GOY zVJJgF;x}>hZDbra_nWQu&1U=XptaL{`>?gWyS>@oe=mmntRvwD;9b@ku9;@J330-J z%87Lrv%Vjy_D3QPoJmy3EhZzuyhl}HDWiXnKtFzh_DepcSPN$<76{JiL~txKQ7%j? z5J=#wFtuKY11{W@k_;xja=C0kO#rl0pu!ZWWVGz*NXy16I7I2QEf?c&dzTELO2j4l z7@t|A;hKZExwu|k%a&{B@&BP*|2U&uJEvgy6WUYrOZCeDY0NLx!-MV3F2P?vSqc6j z0ef+739he=i}0`DcnYmJzX)Fg$V>B!@LK@c`p=5+@AkQi@E6v3i!j{P>MH2(KPz)) v|DSW<-ygJ!^MoRB!%2w%buuFGB}{$g%n^a_0Pwx@Z;8O)Iv?Y-u?qkIRzC)X literal 1035 zcmV+m1oZnsRzV`l`j)?4?rEwp$rDpIVO|0Htf( z(c$3sMjwj^00000000B!RZWi@H5eYxWRo<|W-Cxn9IT~<%|bpJ)Lpb&P|JS6O8bFG zD#3-7GvjRC%-E6bX*X00f&&Lm94dsk6>)-}fZ)QVzXLd+a^WZNjx$LnGaGGJYPm3y zXKcUE`}%op&+|U)c6{OX)ED1V&9qO$fb=NlB%rEKTT-m zei)KNI-Y0=pLt9VEOY^(Zz1B?qNvu4A1Y({Enz7r5lWY;h>-Ib4F5oT4yDN0(`1Us zejOmqG_086Y?}ocnk;xu^fe3ECsZ2KgM_IpLJiy2qCP}mf}04)zQeTq8fM6A07W{Fe_GYcwSSyuA8;duONYM8wzF)%d)FI*xH&j{#tMCGM zT7~ORqBFu&x+~4b)m1ulsRe{_*lp(e6*IC8Vsk7r#vqw z1_zRGPXxgC%;Xe>6g?sbNrtV_Z432H+jm8LpXTxejr{fXaz=7PGz|s`fn*2hJoa4>MCp?)=i`5ShYX-f#AWvgpICR{nuEBxxKUflmSE@6|FQ)4 zW|!b^o~#7_l7PK>Y6)(vjEnG};P@C?@$@2m1t71TUWDHU$i{zGg#WhBT!g>0&RT@w zuGW@8f1j?*nf<@ySk_C>s?HONzzruQ0@TTfz*jK!wR4IH`~ZL-oo6Ki{{jryJp6?V F0067+{1*TK diff --git a/packages/plugin-hardhat/package.json b/packages/plugin-hardhat/package.json index 9a1848a09..bae12ed33 100644 --- a/packages/plugin-hardhat/package.json +++ b/packages/plugin-hardhat/package.json @@ -21,7 +21,7 @@ "version": "node ../../scripts/bump-changelog.js" }, "devDependencies": { - "@nomicfoundation/hardhat-ethers": "^3.0.0", + "@nomicfoundation/hardhat-ethers": "^3.0.5", "@nomicfoundation/hardhat-verify": "^1.1.0", "@openzeppelin/contracts": "4.8.3", "@openzeppelin/contracts-5.0": "npm:@openzeppelin/contracts@^5.0.0-rc.0", @@ -29,7 +29,7 @@ "@types/mocha": "^7.0.2", "ava": "^5.0.0", "fgbg": "^0.1.4", - "hardhat": "^2.0.2", + "hardhat": "^2.19.1", "promisified": "^0.5.0", "proxyquire": "^2.1.3", "rimraf": "^5.0.0", diff --git a/yarn.lock b/yarn.lock index cda223750..e8d68f11f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1828,31 +1828,31 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@nomicfoundation/ethereumjs-block@5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.1.tgz#6f89664f55febbd723195b6d0974773d29ee133d" - integrity sha512-u1Yioemi6Ckj3xspygu/SfFvm8vZEO8/Yx5a1QLzi6nVU0jz3Pg2OmHKJ5w+D9Ogk1vhwRiqEBAqcb0GVhCyHw== - dependencies: - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" +"@nomicfoundation/ethereumjs-block@5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.2.tgz#13a7968f5964f1697da941281b7f7943b0465d04" + integrity sha512-hSe6CuHI4SsSiWWjHDIzWhSiAVpzMUcDRpWYzN0T9l8/Rz7xNn3elwVOJ/tAyS0LqL6vitUD78Uk7lQDXZun7Q== + dependencies: + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-trie" "6.0.2" + "@nomicfoundation/ethereumjs-tx" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" ethereum-cryptography "0.1.3" ethers "^5.7.1" -"@nomicfoundation/ethereumjs-blockchain@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.1.tgz#80e0bd3535bfeb9baa29836b6f25123dab06a726" - integrity sha512-NhzndlGg829XXbqJEYrF1VeZhAwSPgsK/OB7TVrdzft3y918hW5KNd7gIZ85sn6peDZOdjBsAXIpXZ38oBYE5A== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-ethash" "3.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" +"@nomicfoundation/ethereumjs-blockchain@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.2.tgz#45323b673b3d2fab6b5008535340d1b8fea7d446" + integrity sha512-8UUsSXJs+MFfIIAKdh3cG16iNmWzWC/91P40sazNvrqhhdR/RtGDlFk2iFTGbBAZPs2+klZVzhRX8m2wvuvz3w== + dependencies: + "@nomicfoundation/ethereumjs-block" "5.0.2" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-ethash" "3.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-trie" "6.0.2" + "@nomicfoundation/ethereumjs-tx" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" abstract-level "^1.0.3" debug "^4.3.3" ethereum-cryptography "0.1.3" @@ -1860,112 +1860,112 @@ lru-cache "^5.1.1" memory-level "^1.0.0" -"@nomicfoundation/ethereumjs-common@4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.1.tgz#4702d82df35b07b5407583b54a45bf728e46a2f0" - integrity sha512-OBErlkfp54GpeiE06brBW/TTbtbuBJV5YI5Nz/aB2evTDo+KawyEzPjBlSr84z/8MFfj8wS2wxzQX1o32cev5g== +"@nomicfoundation/ethereumjs-common@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.2.tgz#a15d1651ca36757588fdaf2a7d381a150662a3c3" + integrity sha512-I2WGP3HMGsOoycSdOTSqIaES0ughQTueOsddJ36aYVpI3SN8YSusgRFLwzDJwRFVIYDKx/iJz0sQ5kBHVgdDwg== dependencies: - "@nomicfoundation/ethereumjs-util" "9.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.2" crc-32 "^1.2.0" -"@nomicfoundation/ethereumjs-ethash@3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.1.tgz#65ca494d53e71e8415c9a49ef48bc921c538fc41" - integrity sha512-KDjGIB5igzWOp8Ik5I6QiRH5DH+XgILlplsHR7TEuWANZA759G6krQ6o8bvj+tRUz08YygMQu/sGd9mJ1DYT8w== +"@nomicfoundation/ethereumjs-ethash@3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.2.tgz#da77147f806401ee996bfddfa6487500118addca" + integrity sha512-8PfoOQCcIcO9Pylq0Buijuq/O73tmMVURK0OqdjhwqcGHYC2PwhbajDh7GZ55ekB0Px197ajK3PQhpKoiI/UPg== dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" + "@nomicfoundation/ethereumjs-block" "5.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" abstract-level "^1.0.3" bigint-crypto-utils "^3.0.23" ethereum-cryptography "0.1.3" -"@nomicfoundation/ethereumjs-evm@2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.1.tgz#f35681e203363f69ce2b3d3bf9f44d4e883ca1f1" - integrity sha512-oL8vJcnk0Bx/onl+TgQOQ1t/534GKFaEG17fZmwtPFeH8S5soiBYPCLUrvANOl4sCp9elYxIMzIiTtMtNNN8EQ== +"@nomicfoundation/ethereumjs-evm@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.2.tgz#4c2f4b84c056047102a4fa41c127454e3f0cfcf6" + integrity sha512-rBLcUaUfANJxyOx9HIdMX6uXGin6lANCulIm/pjMgRqfiCRMZie3WKYxTSd8ZE/d+qT+zTedBF4+VHTdTSePmQ== dependencies: "@ethersproject/providers" "^5.7.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-tx" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" debug "^4.3.3" ethereum-cryptography "0.1.3" mcl-wasm "^0.7.1" rustbn.js "~0.2.0" -"@nomicfoundation/ethereumjs-rlp@5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.1.tgz#0b30c1cf77d125d390408e391c4bb5291ef43c28" - integrity sha512-xtxrMGa8kP4zF5ApBQBtjlSbN5E2HI8m8FYgVSYAnO6ssUoY5pVPGy2H8+xdf/bmMa22Ce8nWMH3aEW8CcqMeQ== +"@nomicfoundation/ethereumjs-rlp@5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.2.tgz#4fee8dc58a53ac6ae87fb1fca7c15dc06c6b5dea" + integrity sha512-QwmemBc+MMsHJ1P1QvPl8R8p2aPvvVcKBbvHnQOKBpBztEo0omN0eaob6FeZS/e3y9NSe+mfu3nNFBHszqkjTA== -"@nomicfoundation/ethereumjs-statemanager@2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.1.tgz#8824a97938db4471911e2d2f140f79195def5935" - integrity sha512-B5ApMOnlruVOR7gisBaYwFX+L/AP7i/2oAahatssjPIBVDF6wTX1K7Qpa39E/nzsH8iYuL3krkYeUFIdO3EMUQ== +"@nomicfoundation/ethereumjs-statemanager@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.2.tgz#3ba4253b29b1211cafe4f9265fee5a0d780976e0" + integrity sha512-dlKy5dIXLuDubx8Z74sipciZnJTRSV/uHG48RSijhgm1V7eXYFC567xgKtsKiVZB1ViTP9iFL4B6Je0xD6X2OA== dependencies: - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" debug "^4.3.3" ethereum-cryptography "0.1.3" ethers "^5.7.1" js-sdsl "^4.1.4" -"@nomicfoundation/ethereumjs-trie@6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.1.tgz#662c55f6b50659fd4b22ea9f806a7401cafb7717" - integrity sha512-A64It/IMpDVODzCgxDgAAla8jNjNtsoQZIzZUfIV5AY6Coi4nvn7+VReBn5itlxMiL2yaTlQr9TRWp3CSI6VoA== +"@nomicfoundation/ethereumjs-trie@6.0.2": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.2.tgz#9a6dbd28482dca1bc162d12b3733acab8cd12835" + integrity sha512-yw8vg9hBeLYk4YNg5MrSJ5H55TLOv2FSWUTROtDtTMMmDGROsAu+0tBjiNGTnKRi400M6cEzoFfa89Fc5k8NTQ== dependencies: - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" "@types/readable-stream" "^2.3.13" ethereum-cryptography "0.1.3" readable-stream "^3.6.0" -"@nomicfoundation/ethereumjs-tx@5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.1.tgz#7629dc2036b4a33c34e9f0a592b43227ef4f0c7d" - integrity sha512-0HwxUF2u2hrsIM1fsasjXvlbDOq1ZHFV2dd1yGq8CA+MEYhaxZr8OTScpVkkxqMwBcc5y83FyPl0J9MZn3kY0w== +"@nomicfoundation/ethereumjs-tx@5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.2.tgz#117813b69c0fdc14dd0446698a64be6df71d7e56" + integrity sha512-T+l4/MmTp7VhJeNloMkM+lPU3YMUaXdcXgTGCf8+ZFvV9NYZTRLFekRwlG6/JMmVfIfbrW+dRRJ9A6H5Q/Z64g== dependencies: "@chainsafe/ssz" "^0.9.2" "@ethersproject/providers" "^5.7.2" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" ethereum-cryptography "0.1.3" -"@nomicfoundation/ethereumjs-util@9.0.1": - version "9.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.1.tgz#530cda8bae33f8b5020a8f199ed1d0a2ce48ec89" - integrity sha512-TwbhOWQ8QoSCFhV/DDfSmyfFIHjPjFBj957219+V3jTZYZ2rf9PmDtNOeZWAE3p3vlp8xb02XGpd0v6nTUPbsA== +"@nomicfoundation/ethereumjs-util@9.0.2": + version "9.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.2.tgz#16bdc1bb36f333b8a3559bbb4b17dac805ce904d" + integrity sha512-4Wu9D3LykbSBWZo8nJCnzVIYGvGCuyiYLIJa9XXNVt1q1jUzHdB+sJvx95VGCpPkCT+IbLecW6yfzy3E1bQrwQ== dependencies: "@chainsafe/ssz" "^0.10.0" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" ethereum-cryptography "0.1.3" -"@nomicfoundation/ethereumjs-vm@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.1.tgz#7d035e0993bcad10716c8b36e61dfb87fa3ca05f" - integrity sha512-rArhyn0jPsS/D+ApFsz3yVJMQ29+pVzNZ0VJgkzAZ+7FqXSRtThl1C1prhmlVr3YNUlfpZ69Ak+RUT4g7VoOuQ== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-blockchain" "7.0.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-evm" "2.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-statemanager" "2.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" +"@nomicfoundation/ethereumjs-vm@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.2.tgz#3b0852cb3584df0e18c182d0672a3596c9ca95e6" + integrity sha512-Bj3KZT64j54Tcwr7Qm/0jkeZXJMfdcAtRBedou+Hx0dPOSIgqaIr0vvLwP65TpHbak2DmAq+KJbW2KNtIoFwvA== + dependencies: + "@nomicfoundation/ethereumjs-block" "5.0.2" + "@nomicfoundation/ethereumjs-blockchain" "7.0.2" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-evm" "2.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-statemanager" "2.0.2" + "@nomicfoundation/ethereumjs-trie" "6.0.2" + "@nomicfoundation/ethereumjs-tx" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" debug "^4.3.3" ethereum-cryptography "0.1.3" mcl-wasm "^0.7.1" rustbn.js "~0.2.0" -"@nomicfoundation/hardhat-ethers@^3.0.0": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.4.tgz#6f0df2424e687e26d6574610de7a36bd69485cc1" - integrity sha512-k9qbLoY7qn6C6Y1LI0gk2kyHXil2Tauj4kGzQ8pgxYXIGw8lWn8tuuL72E11CrlKaXRUvOgF0EXrv/msPI2SbA== +"@nomicfoundation/hardhat-ethers@^3.0.5": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.5.tgz#0422c2123dec7c42e7fb2be8e1691f1d9708db56" + integrity sha512-RNFe8OtbZK6Ila9kIlHp0+S80/0Bu/3p41HUpaRIoHLm6X3WekTd83vob3rE54Duufu1edCiBDxspBzi2rxHHw== dependencies: debug "^4.1.1" lodash.isequal "^4.5.0" @@ -3457,7 +3457,7 @@ abbrev@1, abbrev@^1.0.0: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -abort-controller@3.0.0, abort-controller@^3.0.0: +abort-controller@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== @@ -7180,28 +7180,27 @@ hard-rejection@^2.1.0: resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== -hardhat@^2.0.2: - version "2.17.0" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.17.0.tgz#574478790fa4f4a45c5ccf162e82e54f36671749" - integrity sha512-CaEGa13tkJNe2/rdaBiive4pmdNShwxvdWVhr1zfb6aVpRhQt9VNO0l/UIBt/zzajz38ZFjvhfM2bj8LDXo9gw== +hardhat@^2.19.1: + version "2.19.1" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.19.1.tgz#5e09e8070ecfc6109ba9d3a4a117ec2b0643032a" + integrity sha512-bsWa63g1GB78ZyMN08WLhFElLPA+J+pShuKD1BFO2+88g3l+BL3R07vj9deIi9dMbssxgE714Gof1dBEDGqnCw== dependencies: "@ethersproject/abi" "^5.1.2" "@metamask/eth-sig-util" "^4.0.0" - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-blockchain" "7.0.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-evm" "2.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-statemanager" "2.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - "@nomicfoundation/ethereumjs-vm" "7.0.1" + "@nomicfoundation/ethereumjs-block" "5.0.2" + "@nomicfoundation/ethereumjs-blockchain" "7.0.2" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-evm" "2.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-statemanager" "2.0.2" + "@nomicfoundation/ethereumjs-trie" "6.0.2" + "@nomicfoundation/ethereumjs-tx" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" + "@nomicfoundation/ethereumjs-vm" "7.0.2" "@nomicfoundation/solidity-analyzer" "^0.1.0" "@sentry/node" "^5.18.1" "@types/bn.js" "^5.1.0" "@types/lru-cache" "^5.1.0" - abort-controller "^3.0.0" adm-zip "^0.4.16" aggregate-error "^3.0.0" ansi-escapes "^4.3.0"