From c80b9697db03b2ba77fd08134e1b1288223ca248 Mon Sep 17 00:00:00 2001 From: AlienTornadosaurusHex <> Date: Thu, 29 Jun 2023 20:58:37 +0000 Subject: [PATCH] finalize deployment configuration with hardhat Signed-off-by: AlienTornadosaurusHex <> --- README.md | 2 ++ .../deployFeeOracleManager.js | 0 .../deployInfrastructureUpgradeProposal.js | 0 .../deployInstanceRegistry.js | 0 .../deployRelayerRegistry.js | 0 .../deployRouter.js | 0 .../deployStaking.js | 0 .../deployUniswapFeeOracle.js | 0 hardhat.config.js | 35 +++++++++++++++---- ...{Deploys.sol => DeprecatedDeployments.sol} | 0 10 files changed, 31 insertions(+), 6 deletions(-) rename script/DeployFeeOracleManager.js => deploys/deployFeeOracleManager.js (100%) rename script/DeployInfrastructureUpgradeProposal.js => deploys/deployInfrastructureUpgradeProposal.js (100%) rename script/DeployInstanceRegistry.js => deploys/deployInstanceRegistry.js (100%) rename script/DeployRelayerRegistry.js => deploys/deployRelayerRegistry.js (100%) rename script/DeployRouter.js => deploys/deployRouter.js (100%) rename script/DeployStaking.js => deploys/deployStaking.js (100%) rename script/DeployUniswapFeeOracle.js => deploys/deployUniswapFeeOracle.js (100%) rename script/{Deploys.sol => DeprecatedDeployments.sol} (100%) diff --git a/README.md b/README.md index e85462b..5212db6 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ The `infrastructure-upgrade` repository. This contains `relayer-registry` contra * [Storage Layout](./storage/) * [Deployment Scripts](./script/) +Please note that deployments only work via Hardhat, and only with the specified configuration. It seems that Forge outputs different bytecode than Etherscan, and that Hardhat also outputs for some contracts different bytecode than Etherscan if optimizations are not disabled. + ## Install ```bash diff --git a/script/DeployFeeOracleManager.js b/deploys/deployFeeOracleManager.js similarity index 100% rename from script/DeployFeeOracleManager.js rename to deploys/deployFeeOracleManager.js diff --git a/script/DeployInfrastructureUpgradeProposal.js b/deploys/deployInfrastructureUpgradeProposal.js similarity index 100% rename from script/DeployInfrastructureUpgradeProposal.js rename to deploys/deployInfrastructureUpgradeProposal.js diff --git a/script/DeployInstanceRegistry.js b/deploys/deployInstanceRegistry.js similarity index 100% rename from script/DeployInstanceRegistry.js rename to deploys/deployInstanceRegistry.js diff --git a/script/DeployRelayerRegistry.js b/deploys/deployRelayerRegistry.js similarity index 100% rename from script/DeployRelayerRegistry.js rename to deploys/deployRelayerRegistry.js diff --git a/script/DeployRouter.js b/deploys/deployRouter.js similarity index 100% rename from script/DeployRouter.js rename to deploys/deployRouter.js diff --git a/script/DeployStaking.js b/deploys/deployStaking.js similarity index 100% rename from script/DeployStaking.js rename to deploys/deployStaking.js diff --git a/script/DeployUniswapFeeOracle.js b/deploys/deployUniswapFeeOracle.js similarity index 100% rename from script/DeployUniswapFeeOracle.js rename to deploys/deployUniswapFeeOracle.js diff --git a/hardhat.config.js b/hardhat.config.js index ced6f03..2a1fd72 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -1,16 +1,15 @@ -require('dotenv').config() +require("dotenv").config(); require("@nomicfoundation/hardhat-ethers"); require("@nomicfoundation/hardhat-foundry"); require("@nomicfoundation/hardhat-verify"); - /** @type import('hardhat/config').HardhatUserConfig */ module.exports = { solidity: { compilers: [ { - version: '0.6.12', + version: "0.6.12", settings: { optimizer: { enabled: true, @@ -20,8 +19,33 @@ module.exports = { }, ], overrides: { - 'src/proposals/*.sol': { - version: '0.6.12', + "src/v2/FeeOracleManager.sol": { + version: "0.6.12", + settings: { + optimizer: { + enabled: false, + }, + }, + }, + "src/v2/UniswapFeeOracle.sol": { + version: "0.6.12", + settings: { + optimizer: { + enabled: false, + }, + }, + }, + "src/proposals/CRVUSDInstancesProposal.sol.sol": { + version: "0.6.12", + settings: { + optimizer: { + enabled: true, + runs: 1, + }, + }, + }, + "src/proposals/InfrastructureUpgradeProposal.sol": { + version: "0.6.12", settings: { optimizer: { enabled: true, @@ -47,4 +71,3 @@ module.exports = { apiKey: `${process.env.ETHERSCAN_KEY}`, }, }; - diff --git a/script/Deploys.sol b/script/DeprecatedDeployments.sol similarity index 100% rename from script/Deploys.sol rename to script/DeprecatedDeployments.sol