From e01edeef52236dc2127e29a688e145cec443960b Mon Sep 17 00:00:00 2001 From: y0sher Date: Sun, 3 Nov 2024 13:07:18 +0200 Subject: [PATCH 01/12] use ethers instead of viem --- tasks/deploy.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tasks/deploy.ts b/tasks/deploy.ts index 9c784cc12..13dc11559 100644 --- a/tasks/deploy.ts +++ b/tasks/deploy.ts @@ -126,7 +126,10 @@ subtask('deploy:mock-token', 'Deploys / fetch SSV Token').setAction(async ({}, h if (tokenAddress) return tokenAddress; // Local networks, deploy mock token - const ssvToken = await hre.viem.deployContract('SSVToken'); + // const ssvToken = await hre.viem.deployContract('SSVToken'); + const ssvTokenFactory = await ethers.getContractFactory('SSVTokenMock'); + const ssvToken = await ssvTokenFactory.deploy(); + await ssvToken.waitForDeployment(); return ssvToken.address; }); @@ -149,7 +152,9 @@ subtask('deploy:impl', 'Deploys an implementation contract') await hre.run('compile'); // Deploy implemetation contract - const contractImpl = await hre.viem.deployContract(contract); + const contractFactory = await ethers.getContractFactory(contract); + const contractImpl = await contractFactory.deploy(); + await contractImpl.waitForDeployment(); console.log(`${contract} implementation deployed to: ${contractImpl.address}`); return contractImpl.address; From f76ce4dee1ee61c94125a90526dbd19397cc30e1 Mon Sep 17 00:00:00 2001 From: y0sher Date: Sun, 3 Nov 2024 17:44:40 +0200 Subject: [PATCH 02/12] add option to deploy contracts with machine readable output (json) --- hardhat.config.ts | 29 +++++++++++- tasks/deploy.ts | 116 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 107 insertions(+), 38 deletions(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index aac45bb0e..fd8d828f3 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -3,7 +3,6 @@ import { NetworkUserConfig } from 'hardhat/types'; import 'dotenv/config'; -import '@nomicfoundation/hardhat-toolbox-viem'; import '@nomicfoundation/hardhat-chai-matchers'; import '@openzeppelin/hardhat-upgrades'; @@ -54,7 +53,10 @@ const config: HardhatUserConfig = { }, }, etherscan: { - apiKey: process.env.ETHERSCAN_KEY, + apiKey: { + 'holesky': process.env.ETHERSCAN_KEY, + 'devnet': 'x', + }, customChains: [ { network: 'holesky', @@ -64,6 +66,14 @@ const config: HardhatUserConfig = { browserURL: 'https://holesky.etherscan.io', }, }, + { + network: 'devnet', + chainId: 3151908, + urls: { + apiURL: `${process.env.BLOCKSCOUT_URL}/api`, + browserURL: process.env.BLOCKSCOUT_URL, + }, + } ], }, contractSizer: { @@ -86,6 +96,7 @@ const config: HardhatUserConfig = { }, }; + if (process.env.HOLESKY_ETH_NODE_URL && process.env.HOLESKY_OWNER_PRIVATE_KEY) { const sharedConfig = { url: `${process.env.HOLESKY_ETH_NODE_URL}${process.env.NODE_PROVIDER_KEY}`, @@ -135,4 +146,18 @@ if (process.env.FORK_TESTING_ENABLED) { }; } +if (process.env.DEVNET_ETH_NODE_URL) { + config.networks = { + devnet: { + chainId: 3151908, + url: `${process.env.DEVNET_ETH_NODE_URL}`, + accounts: [ + "39725efee3fb28614de3bacaffe4cc4bd8c436257e2c8bb887c4b5c4be45e76d", + ], + gasPrice: +(process.env.GAS_PRICE || ''), + gas: +(process.env.GAS || ''), + } as NetworkUserConfig, + }; +} + export default config; diff --git a/tasks/deploy.ts b/tasks/deploy.ts index 13dc11559..f7ad1e433 100644 --- a/tasks/deploy.ts +++ b/tasks/deploy.ts @@ -1,6 +1,7 @@ import { task, subtask, types } from 'hardhat/config'; import { SSVModules } from './config'; + /** @title Hardhat task to deploy all required contracts for SSVNetwork. This task deploys the main SSVNetwork and SSVNetworkViews contracts, along with their associated modules. @@ -15,18 +16,25 @@ The deployer account used will be the first one returned by ethers.getSigners(). Therefore, it should be appropriately configured in your Hardhat network configuration. This task assumes that the SSVModules enum and deployment tasks for individual contracts have been properly defined. */ -task('deploy:all', 'Deploy SSVNetwork, SSVNetworkViews and module contracts').setAction(async ({}, hre) => { - // Triggering compilation - await hre.run('compile'); +task('deploy:all', 'Deploy SSVNetwork, SSVNetworkViews and module contracts') +.addOptionalParam('machine', 'outputs the machine readable output', false, types.boolean) +.setAction(async (args, hre) => { + if (!args.machine) { + // Triggering compilation if this is manual + await hre.run('compile'); + } - const [deployer] = await ethers.getSigners(); - console.log(`Deploying contracts with the account:${deployer.address}`); + if (!args.machine){ + const [deployer] = await ethers.getSigners(); + deployer.address = deployer.address.toLowerCase(); + console.log(`Deploying contracts with the account:${deployer.address}`); + } - const ssvTokenAddress = await hre.run('deploy:mock-token'); - const operatorsModAddress = await hre.run('deploy:module', { module: SSVModules[SSVModules.SSVOperators] }); - const clustersModAddress = await hre.run('deploy:module', { module: SSVModules[SSVModules.SSVClusters] }); - const daoModAddress = await hre.run('deploy:module', { module: SSVModules[SSVModules.SSVDAO] }); - const viewsModAddress = await hre.run('deploy:module', { module: SSVModules[SSVModules.SSVViews] }); + const ssvTokenAddress = await hre.run('deploy:token', { machine: args.machine }); + const operatorsModAddress = await hre.run('deploy:module', { module: SSVModules[SSVModules.SSVOperators], machine: args.machine }); + const clustersModAddress = await hre.run('deploy:module', { module: SSVModules[SSVModules.SSVClusters], machine: args.machine }); + const daoModAddress = await hre.run('deploy:module', { module: SSVModules[SSVModules.SSVDAO], machine: args.machine }); + const viewsModAddress = await hre.run('deploy:module', { module: SSVModules[SSVModules.SSVViews], machine: args.machine }); const { ssvNetworkProxyAddress: ssvNetworkAddress } = await hre.run('deploy:ssv-network', { operatorsModAddress, @@ -34,11 +42,25 @@ task('deploy:all', 'Deploy SSVNetwork, SSVNetworkViews and module contracts').se daoModAddress, viewsModAddress, ssvTokenAddress, + machine: args.machine, }); await hre.run('deploy:ssv-network-views', { ssvNetworkAddress, + machine: args.machine, }); + + if (args.machine) { + const jsonData = { + ssvTokenAddress, + operatorsModAddress, + clustersModAddress, + daoModAddress, + viewsModAddress, + ssvNetworkAddress, + } + console.log(JSON.stringify(jsonData)); + } }); /** @@ -92,27 +114,35 @@ This subtask uses the "deploy:impl" subtask for the actual deployment. */ subtask('deploy:module', 'Deploys a new module contract') .addParam('module', 'SSV Module', null, types.string) - .setAction(async ({ module }, hre) => { + .addOptionalParam('machine', 'outputs the machine readable output', false, types.boolean) + .setAction(async ({ module, machine }, hre) => { const moduleValues = Object.values(SSVModules); if (!moduleValues.includes(module)) { throw new Error(`Invalid SSVModule: ${module}. Expected one of: ${moduleValues.join(', ')}`); } - const moduleAddress = await hre.run('deploy:impl', { contract: module }); + const moduleAddress = await hre.run('deploy:impl', { contract: module, machine: machine }); return moduleAddress; }); -task('deploy:token', 'Deploys SSV Token').setAction(async ({}, hre) => { - // Triggering compilation - await hre.run('compile'); - - console.log('Deploying SSV Network Token'); +task('deploy:token', 'Deploys SSV Token') +.addOptionalParam('machine', 'outputs the machine readable output', false, types.boolean) +.setAction(async (args, hre) => { + if (!args.machine){ + // Triggering compilation if this is manual + await hre.run('compile'); + console.log('Deploying SSV Network Token'); + } const ssvTokenFactory = await ethers.getContractFactory('SSVToken'); const ssvToken = await ssvTokenFactory.deploy(); - await ssvToken.deployed(); + await ssvToken.waitForDeployment(); - console.log(`SSV Network Token deployed to: ${ssvToken.address}`); + if (!args.machine){ + console.log(`SSV Network Token deployed to: ${ssvToken.address}`); + } + + return await ssvToken.getAddress() }); /** @@ -127,11 +157,11 @@ subtask('deploy:mock-token', 'Deploys / fetch SSV Token').setAction(async ({}, h // Local networks, deploy mock token // const ssvToken = await hre.viem.deployContract('SSVToken'); - const ssvTokenFactory = await ethers.getContractFactory('SSVTokenMock'); - const ssvToken = await ssvTokenFactory.deploy(); + const ssvTokenFactory = await ethers.getContractFactory('SSVToken'); + const ssvToken = await ssvTokenFactory.deployContract(); await ssvToken.waitForDeployment(); - return ssvToken.address; + return await ssvToken.getAddress(); }); /** @@ -147,17 +177,22 @@ The contract specified should be already compiled and exist in the 'artifacts' d */ subtask('deploy:impl', 'Deploys an implementation contract') .addParam('contract', 'New contract implemetation', null, types.string) - .setAction(async ({ contract }, hre) => { - // Triggering compilation - await hre.run('compile'); - + .addOptionalParam('machine', 'outputs the machine readable output', false, types.boolean) + .setAction(async (args, hre) => { + if (!args.machine){ + // Triggering compilation if this is manual + await hre.run('compile'); + } // Deploy implemetation contract - const contractFactory = await ethers.getContractFactory(contract); + const contractFactory = await ethers.getContractFactory(args.contract); const contractImpl = await contractFactory.deploy(); await contractImpl.waitForDeployment(); - console.log(`${contract} implementation deployed to: ${contractImpl.address}`); - return contractImpl.address; + if (!args.machine){ + console.log(`${args.contract} implementation deployed to: ${await contractImpl.getAddress()}`); + } + + return await contractImpl.getAddress(); }); /** @@ -183,11 +218,15 @@ subtask('deploy:ssv-network', 'Deploys SSVNetwork contract') .addPositionalParam('daoModAddress', 'DAO module address', null, types.string) .addPositionalParam('viewsModAddress', 'Views module address', null, types.string) .addPositionalParam('ssvTokenAddress', 'SSV Token address', null, types.string) - .setAction(async ({ operatorsModAddress, clustersModAddress, daoModAddress, viewsModAddress, ssvTokenAddress }) => { + .addOptionalParam('machine', 'outputs the machine readable output', false, types.boolean) + .setAction(async ({ operatorsModAddress, clustersModAddress, daoModAddress, viewsModAddress, ssvTokenAddress, machine }) => { const ssvNetworkFactory = await ethers.getContractFactory('SSVNetwork'); // deploy SSVNetwork - console.log(`Deploying SSVNetwork with ssvToken ${ssvTokenAddress}`); + if (!machine){ + console.log(`Deploying SSVNetwork with ssvToken ${ssvTokenAddress}`); + } + const ssvNetwork = await upgrades.deployProxy( ssvNetworkFactory, [ @@ -212,8 +251,10 @@ subtask('deploy:ssv-network', 'Deploys SSVNetwork contract') const ssvNetworkProxyAddress = await ssvNetwork.getAddress(); const ssvNetworkImplAddress = await upgrades.erc1967.getImplementationAddress(ssvNetworkProxyAddress); - console.log(`SSVNetwork proxy deployed to: ${ssvNetworkProxyAddress}`); - console.log(`SSVNetwork implementation deployed to: ${ssvNetworkImplAddress}`); + if (!machine) { + console.log(`SSVNetwork proxy deployed to: ${ssvNetworkProxyAddress}`); + console.log(`SSVNetwork implementation deployed to: ${ssvNetworkImplAddress}`); + } return { ssvNetworkProxyAddress, ssvNetworkImplAddress }; }); @@ -231,7 +272,8 @@ The 'SSVNetworkViews' contract specified should be already compiled and exist in */ subtask('deploy:ssv-network-views', 'Deploys SSVNetworkViews contract') .addParam('ssvNetworkAddress', 'SSVNetwork address', null, types.string) - .setAction(async ({ ssvNetworkAddress }) => { + .addOptionalParam('machine', 'outputs the machine readable output', false, types.boolean) + .setAction(async ({ ssvNetworkAddress, machine }) => { const ssvNetworkViewsFactory = await ethers.getContractFactory('SSVNetworkViews'); // deploy SSVNetwork @@ -243,8 +285,10 @@ subtask('deploy:ssv-network-views', 'Deploys SSVNetworkViews contract') const ssvNetworkViewsProxyAddress = await ssvNetworkViews.getAddress(); const ssvNetworkViewsImplAddress = await upgrades.erc1967.getImplementationAddress(ssvNetworkViewsProxyAddress); - console.log(`SSVNetworkViews proxy deployed to: ${ssvNetworkViewsProxyAddress}`); - console.log(`SSVNetworkViews implementation deployed to: ${ssvNetworkViewsImplAddress}`); + if (!machine){ + console.log(`SSVNetworkViews proxy deployed to: ${ssvNetworkViewsProxyAddress}`); + console.log(`SSVNetworkViews implementation deployed to: ${ssvNetworkViewsImplAddress}`); + } return { ssvNetworkViewsProxyAddress, ssvNetworkViewsImplAddress }; }); From c6279bc6659d21b5c22b0d2e4fb256c9de3f795d Mon Sep 17 00:00:00 2001 From: y0sher Date: Tue, 18 Feb 2025 17:55:06 +0200 Subject: [PATCH 03/12] update config --- hardhat.config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index fd8d828f3..d70d5eeae 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -55,7 +55,7 @@ const config: HardhatUserConfig = { etherscan: { apiKey: { 'holesky': process.env.ETHERSCAN_KEY, - 'devnet': 'x', + 'kurtosis': 'x', }, customChains: [ { @@ -67,7 +67,7 @@ const config: HardhatUserConfig = { }, }, { - network: 'devnet', + network: 'kurtosis', chainId: 3151908, urls: { apiURL: `${process.env.BLOCKSCOUT_URL}/api`, @@ -148,7 +148,7 @@ if (process.env.FORK_TESTING_ENABLED) { if (process.env.DEVNET_ETH_NODE_URL) { config.networks = { - devnet: { + kurtosis: { chainId: 3151908, url: `${process.env.DEVNET_ETH_NODE_URL}`, accounts: [ From f7e34e1c6184c687e4822130a4f414ddf7298e9e Mon Sep 17 00:00:00 2001 From: y0sher Date: Tue, 18 Feb 2025 19:35:23 +0200 Subject: [PATCH 04/12] more config adjustments --- hardhat.config.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index d70d5eeae..df25c191c 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -25,13 +25,7 @@ const config: HardhatUserConfig = { solidity: { compilers: [ { - version: '0.8.4', - }, - { - version: '0.8.18', - }, - { - version: '0.8.24', + version: '0.8.20', settings: { optimizer: { enabled: true, @@ -55,7 +49,7 @@ const config: HardhatUserConfig = { etherscan: { apiKey: { 'holesky': process.env.ETHERSCAN_KEY, - 'kurtosis': 'x', + 'kurtosis': 'empty', }, customChains: [ { From eaeefdee2781844c673ac5da1e3692d587a7e7fd Mon Sep 17 00:00:00 2001 From: y0sher Date: Tue, 18 Feb 2025 20:01:05 +0200 Subject: [PATCH 05/12] hh cfg --- hardhat.config.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index df25c191c..c2ff19025 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -25,12 +25,15 @@ const config: HardhatUserConfig = { solidity: { compilers: [ { - version: '0.8.20', + version: '0.8.4', + }, + { + version: '0.8.24', settings: { - optimizer: { - enabled: true, - runs: 10000, - }, + // optimizer: { + // enabled: true, + // runs: 10000, + // }, evmVersion: 'cancun', }, }, From a62e12c547602c33377290231486862503c33f72 Mon Sep 17 00:00:00 2001 From: y0sher Date: Tue, 18 Feb 2025 20:04:32 +0200 Subject: [PATCH 06/12] remove deprecated --- contracts/deprecated/RegisterAuth.sol | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 contracts/deprecated/RegisterAuth.sol diff --git a/contracts/deprecated/RegisterAuth.sol b/contracts/deprecated/RegisterAuth.sol deleted file mode 100644 index 48cc836d6..000000000 --- a/contracts/deprecated/RegisterAuth.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity 0.8.18; - -struct Authorization { - bool registerOperator; - bool registerValidator; -} - -/// @notice Deprecated. Notice that if the library is used again, -/// all the values in AuthData.authorization will still be available. -library RegisterAuth { - uint256 private constant SSV_STORAGE_POSITION = uint256(keccak256("ssv.network.storage.auth")) - 1; - - struct AuthData { - mapping(address => Authorization) authorization; - } - - function load() internal pure returns (AuthData storage ad) { - uint256 position = SSV_STORAGE_POSITION; - assembly { - ad.slot := position - } - } -} From 0fa05f40a752e9ac1e3d977f6842b27351b32023 Mon Sep 17 00:00:00 2001 From: y0sher Date: Wed, 19 Feb 2025 10:33:29 +0200 Subject: [PATCH 07/12] same as before --- hardhat.config.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index c2ff19025..837d4b38a 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -30,10 +30,10 @@ const config: HardhatUserConfig = { { version: '0.8.24', settings: { - // optimizer: { - // enabled: true, - // runs: 10000, - // }, + optimizer: { + enabled: true, + runs: 10000 + }, evmVersion: 'cancun', }, }, From ec2e46951ae0604a3b6f009c25ebd571bf0619d8 Mon Sep 17 00:00:00 2001 From: y0sher Date: Wed, 19 Feb 2025 14:15:59 +0200 Subject: [PATCH 08/12] Revert "remove deprecated" This reverts commit a62e12c547602c33377290231486862503c33f72. --- contracts/deprecated/RegisterAuth.sol | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 contracts/deprecated/RegisterAuth.sol diff --git a/contracts/deprecated/RegisterAuth.sol b/contracts/deprecated/RegisterAuth.sol new file mode 100644 index 000000000..48cc836d6 --- /dev/null +++ b/contracts/deprecated/RegisterAuth.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity 0.8.18; + +struct Authorization { + bool registerOperator; + bool registerValidator; +} + +/// @notice Deprecated. Notice that if the library is used again, +/// all the values in AuthData.authorization will still be available. +library RegisterAuth { + uint256 private constant SSV_STORAGE_POSITION = uint256(keccak256("ssv.network.storage.auth")) - 1; + + struct AuthData { + mapping(address => Authorization) authorization; + } + + function load() internal pure returns (AuthData storage ad) { + uint256 position = SSV_STORAGE_POSITION; + assembly { + ad.slot := position + } + } +} From 513b0a78076f03ea0111147caf40c46d9f8e78ef Mon Sep 17 00:00:00 2001 From: y0sher Date: Wed, 19 Feb 2025 14:17:33 +0200 Subject: [PATCH 09/12] bring back old file --- hardhat.config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index 837d4b38a..a90dd03d2 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -27,7 +27,10 @@ const config: HardhatUserConfig = { { version: '0.8.4', }, - { + { + version: '0.8.18' + }, + { version: '0.8.24', settings: { optimizer: { From 9253943d6e682b453a59d653f31ac70ec48250bd Mon Sep 17 00:00:00 2001 From: y0sher Date: Thu, 20 Feb 2025 16:34:38 +0200 Subject: [PATCH 10/12] including ssv keys and scanner --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a248d6ba1..f967e4d82 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,8 @@ "hardhat-abi-exporter": "^2.10.1", "hardhat-contract-sizer": "^2.10.0", "solidity-coverage": "^0.8.12", - "ssv-keys": "github:bloxapp/ssv-keys#v1.0.4" + "ssv-keys": "github:bloxapp/ssv-keys#v1.0.4", + "ssv-scanner": "^1.0.4" + } } From 8f46499781dbe24647c4121e70acfc2d85f63389 Mon Sep 17 00:00:00 2001 From: y0sher Date: Wed, 5 Mar 2025 14:50:41 +0200 Subject: [PATCH 11/12] Add Docker support with Dockerfile and .dockerignore --- .dockerignore | 1 + Dockerfile | 20 ++++++++++++++++++++ package.json | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..4b904442b --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +./node_modules diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..eb158ca36 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM node:18-alpine + +COPY . /usr/src/app + +WORKDIR /usr/src/app + +RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python + +RUN apk add git + +RUN apk add make g++ py3-pip + +RUN yarn global add ts-node + +RUN yarn install + +RUN yarn add --save-dev "@nomicfoundation/hardhat-network-helpers@^1.0.0" "@nomicfoundation/hardhat-chai-matchers@^1.0.0" "@nomiclabs/hardhat-etherscan@^3.0.0" "@typechain/ethers-v5@^10.1.0" "@typechain/hardhat@^6.1.2" "chai@^4.2.0" "hardhat-gas-reporter@^1.0.8" "solidity-coverage@^0.8.1" "typechain@^8.1.0" + + +ENTRYPOINT ["sleep", "999999"] diff --git a/package.json b/package.json index f967e4d82..d1bd10d1f 100644 --- a/package.json +++ b/package.json @@ -49,9 +49,9 @@ "hardhat": "^2.22.4", "hardhat-abi-exporter": "^2.10.1", "hardhat-contract-sizer": "^2.10.0", + "hardhat-storage-layout": "^0.1.7", "solidity-coverage": "^0.8.12", "ssv-keys": "github:bloxapp/ssv-keys#v1.0.4", "ssv-scanner": "^1.0.4" - } } From 0e1bb01284bb25bc17e20ce681a04a53dddc76e3 Mon Sep 17 00:00:00 2001 From: y0sher Date: Wed, 5 Mar 2025 14:50:59 +0200 Subject: [PATCH 12/12] Add hardhat-storage-layout support and include storage layout output in compiler settings --- hardhat.config.ts | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index a90dd03d2..19f04b17b 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -10,6 +10,8 @@ import 'hardhat-abi-exporter'; import 'hardhat-contract-sizer'; import 'solidity-coverage'; +import 'hardhat-storage-layout'; + import './tasks/deploy'; import './tasks/update-module'; import './tasks/upgrade'; @@ -26,9 +28,25 @@ const config: HardhatUserConfig = { compilers: [ { version: '0.8.4', + settings: { + // Include storage layout output + outputSelection: { + "*": { + "*": ["storageLayout"] + } + } + } }, { - version: '0.8.18' + version: '0.8.18', + settings: { + // Include storage layout output + outputSelection: { + "*": { + "*": ["storageLayout"] + } + } + } }, { version: '0.8.24', @@ -37,6 +55,11 @@ const config: HardhatUserConfig = { enabled: true, runs: 10000 }, + outputSelection: { + "*": { + "*": ["storageLayout"] + } + }, evmVersion: 'cancun', }, },