From 252638869d43cec3d5ead4fc00a27ac99b8c8169 Mon Sep 17 00:00:00 2001 From: Artyom Veremeenko Date: Wed, 7 Feb 2024 13:43:53 +0300 Subject: [PATCH] refactor: clean up after sepolia deployment --- .../SignatureUtilsConsumer_0_4_24.sol | 2 +- .../SignatureUtilsConsumer_0_8_9.sol | 2 +- ...deploy-sepolia-deposit-contract-adapter.js | 8 +----- scripts/scratch/dao-sepolia-deploy.sh | 2 +- scripts/scratch/verify-contracts-code.sh | 22 +++++++-------- test/0.8.9/sepolia-deployment.test.js | 27 ------------------- 6 files changed, 15 insertions(+), 48 deletions(-) delete mode 100644 test/0.8.9/sepolia-deployment.test.js diff --git a/contracts/common/test_helpers/SignatureUtilsConsumer_0_4_24.sol b/contracts/common/test_helpers/SignatureUtilsConsumer_0_4_24.sol index a0bb017e1..6d6ab5666 100644 --- a/contracts/common/test_helpers/SignatureUtilsConsumer_0_4_24.sol +++ b/contracts/common/test_helpers/SignatureUtilsConsumer_0_4_24.sol @@ -6,7 +6,7 @@ pragma solidity 0.4.24; import {SignatureUtils} from "../lib/SignatureUtils.sol"; -contract SignatureUtilsConsumer_0_4_24 { +contract SignatureUtilsConsumer_0_4_24 { // solhint-disable-line contract-name-camelcase function isValidSignature( address signer, diff --git a/contracts/common/test_helpers/SignatureUtilsConsumer_0_8_9.sol b/contracts/common/test_helpers/SignatureUtilsConsumer_0_8_9.sol index 5a47d21fd..1e358d5f6 100644 --- a/contracts/common/test_helpers/SignatureUtilsConsumer_0_8_9.sol +++ b/contracts/common/test_helpers/SignatureUtilsConsumer_0_8_9.sol @@ -6,7 +6,7 @@ pragma solidity 0.8.9; import {SignatureUtils} from "../lib/SignatureUtils.sol"; -contract SignatureUtilsConsumer_0_8_9 { +contract SignatureUtilsConsumer_0_8_9 { // solhint-disable-line contract-name-camelcase function isValidSignature( address signer, diff --git a/scripts/deploy-sepolia-deposit-contract-adapter.js b/scripts/deploy-sepolia-deposit-contract-adapter.js index 1086d6af5..339ceb7e6 100644 --- a/scripts/deploy-sepolia-deposit-contract-adapter.js +++ b/scripts/deploy-sepolia-deposit-contract-adapter.js @@ -4,12 +4,6 @@ const { deployBehindOssifiableProxy } = require('./helpers/deploy') const DEPLOYER = process.env.DEPLOYER || '' async function deployNewContracts({ web3, artifacts }) { - // const netId = await web3.eth.net.getId() - // logWideSplitter() - // log(`Network ID:`, yl(netId)) - // let state = readNetworkState(network.name, netId) - // assertRequiredNetworkState(state, REQUIRED_NET_STATE) - if (!DEPLOYER) { throw new Error('Deployer is not specified') } @@ -18,7 +12,7 @@ async function deployNewContracts({ web3, artifacts }) { const depositAdapterProxyOwner = "0x6885E36BFcb68CB383DfE90023a462C03BCB2AE5" const constructorArgs = [sepoliaDepositContract] - const contract = await deployBehindOssifiableProxy(null, "SepoliaDepositAdapter", depositAdapterProxyOwner, DEPLOYER, + const contract = await deployBehindOssifiableProxy(null, "SepoliaDepositAdapter", depositAdapterProxyOwner, DEPLOYER, constructorArgs, null) console.log(contract) diff --git a/scripts/scratch/dao-sepolia-deploy.sh b/scripts/scratch/dao-sepolia-deploy.sh index d51bbb46b..326882776 100755 --- a/scripts/scratch/dao-sepolia-deploy.sh +++ b/scripts/scratch/dao-sepolia-deploy.sh @@ -19,7 +19,7 @@ export NETWORK_STATE_DEFAULTS_FILE="deployed-testnet-defaults.json" # Sepolia params: https://github.com/eth-clients/sepolia/blob/main/README.md export GENESIS_TIME=1655733600 -# EOA +# EOA export DSM_PREDEFINED_ADDRESS="0x6885E36BFcb68CB383DfE90023a462C03BCB2AE5" export GAS_PRIORITY_FEE="${GAS_PRIORITY_FEE:=1}" diff --git a/scripts/scratch/verify-contracts-code.sh b/scripts/scratch/verify-contracts-code.sh index b2437e649..9f260adaf 100644 --- a/scripts/scratch/verify-contracts-code.sh +++ b/scripts/scratch/verify-contracts-code.sh @@ -31,7 +31,7 @@ function verify { # NB: Although most of the contracts listed below would be verified by running # this bash script as it is, some might require some manual tweaking. # Sometimes first attempt to verify fails without observable reason. -# Part of the contract require a workaround see SCRATCH_DEPLOY.md section +# Part of the contract require a workaround see scratch-deploy.md section # "Issues with verification of part of the contracts deployed from factories". verify dummyEmptyContract @@ -62,25 +62,25 @@ verify app:aragon-finance.implementation verify app:aragon-agent.implementation verify oracleDaemonConfig verify oracleReportSanityChecker -# verify fakeAppProxyPinned +verify fakeAppProxyPinned verify app:lido.proxy -# verify depositSecurityModule +verify depositSecurityModule verify withdrawalQueueERC721.implementation verify aragon-kernel.implementation verify aragon-acl.implementation verify aragon-kernel.proxy verify ldo verify callsScript -# verify aragon-evm-script-registry.proxy -# verify aragon-apm-registry.implementation -# verify aragon-apm-registry.factory -# verify aragon-app-repo-lido.implementation -# verify aragon-app-repo-node-operators-registry.implementation +verify aragon-evm-script-registry.proxy +verify aragon-apm-registry.implementation +verify aragon-apm-registry.factory +verify aragon-app-repo-lido.implementation +verify aragon-app-repo-node-operators-registry.implementation # NB: App Repos of lido, oracle, node-operators-registry, finance, agent, token-manager, voting # share same implementation of Repo contract -# verify aragon-evm-script-registry.proxy -# verify aragon-evm-script-registry.implementation -# verify app:simple-dvt.proxy +verify aragon-evm-script-registry.proxy +verify aragon-evm-script-registry.implementation +verify app:simple-dvt.proxy verify app:aragon-token-manager.proxy verify app:oracle.proxy verify app:node-operators-registry.proxy diff --git a/test/0.8.9/sepolia-deployment.test.js b/test/0.8.9/sepolia-deployment.test.js deleted file mode 100644 index 4a35ac8d8..000000000 --- a/test/0.8.9/sepolia-deployment.test.js +++ /dev/null @@ -1,27 +0,0 @@ -const { artifacts, contract, ethers } = require('hardhat') - -const { EvmSnapshot } = require('../helpers/blockchain') - -const SepoliaDepositAdapter = artifacts.require('SepoliaDepositAdapter') - -contract('SepoliaDepositAdapter', ([deployer]) => { - let depositAdapter - let snapshot - - before('deploy lido with dao', async () => { - depositAdapter = await SepoliaDepositAdapter.new(deployer, { from: deployer }) - const dna = await depositAdapter.TEST_VALUE() - console.log(dna) - - snapshot = new EvmSnapshot(ethers.provider) - await snapshot.make() - }) - - afterEach(async () => { - await snapshot.rollback() - }) - - describe('SepoliaDepositAdapter Logic', () => { - it(`state after deployment`, async () => {}) - }) -})