From 32b7084a61190fffeaa7fef4cfe2a3e1e2440e4b Mon Sep 17 00:00:00 2001 From: sajanrajdev Date: Mon, 11 Mar 2024 09:57:03 -0700 Subject: [PATCH 1/7] feat: modify deployment params --- .../eBTCDeploymentParams.mainnet.js | 14 +++++++++----- .../eBTCDeploymentParams.sepolia.js | 8 ++++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/contracts/mainnetDeployment/eBTCDeploymentParams.mainnet.js b/packages/contracts/mainnetDeployment/eBTCDeploymentParams.mainnet.js index ef2dc4f8c..b9527f2c9 100644 --- a/packages/contracts/mainnetDeployment/eBTCDeploymentParams.mainnet.js +++ b/packages/contracts/mainnetDeployment/eBTCDeploymentParams.mainnet.js @@ -3,10 +3,10 @@ const externalAddress = { "collEthCLFeed": "0x86392dC19c0b719886221c78AB11eb8Cf5c52812",//mainnet "btcUsdCLFeed": "0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c", "ethUsdCLFeed": "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419", - "authorityOwner": "",// security multisig - "securityMultisig": "", //mainnet - "cdpTechOpsMultisig": "", //mainnet - "feeRecipientMultisig": "", //mainnet + "authorityOwner": "", // Leave empty for deployer, required for atomic governance wireup. + "securityMultisig": "0xB3d3B6482fb50C82aa042A710775c72dfa23F7B4", //mainnet + "cdpTechOpsMultisig": "0x690C74AF48BE029e763E61b4aDeB10E06119D3ba", //mainnet + "feeRecipientMultisig": "0x2CEB95D4A67Bf771f1165659Df3D11D8871E906f", //mainnet "treasuryVaultMultisig": "", //mainnet } @@ -27,6 +27,9 @@ const LOWSEC_MIN_DELAY = 172800 // 2 days const ADDITIONAL_HIGHSEC_ADMIN = "" const ADDITIONAL_LOWSEC_ADMIN = "" +// Toggle if reusing Timelocks already configured or if configuration is handled manually +const SKIP_TIMELOCK_CONFIG = true + module.exports = { OUTPUT_FILE, DEPLOY_WAIT, @@ -39,5 +42,6 @@ module.exports = { HIGHSEC_MIN_DELAY, LOWSEC_MIN_DELAY, ADDITIONAL_HIGHSEC_ADMIN, - ADDITIONAL_LOWSEC_ADMIN + ADDITIONAL_LOWSEC_ADMIN, + SKIP_TIMELOCK_CONFIG }; diff --git a/packages/contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js b/packages/contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js index a20a86618..d878f5e2a 100644 --- a/packages/contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js +++ b/packages/contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js @@ -3,7 +3,7 @@ const externalAddress = { "btcUsdCLFeed": "", "ethUsdCLFeed": "", "chainlinkAdapter": "", - "authorityOwner": "0xC8A7768D2a9EE15437c981a7130268622083c2BD",// security multisig + "authorityOwner": "", // Leave empty for deployer, required for atomic governance wireup. "collateral": "0x97BA9AA7B7DC74f7a74864A62c4fF93b2b22f015", //sepolia "securityMultisig": "0xC8A7768D2a9EE15437c981a7130268622083c2BD", //sepolia "cdpTechOpsMultisig": "0x664F43229dDa9fdEE00e723753f88f3Ba81967F6", //sepolia @@ -28,6 +28,9 @@ const LOWSEC_MIN_DELAY = 300 // 5 mins const ADDITIONAL_HIGHSEC_ADMIN = "0xC8A7768D2a9EE15437c981a7130268622083c2BD" // security msig const ADDITIONAL_LOWSEC_ADMIN = "0xC8A7768D2a9EE15437c981a7130268622083c2BD" // security msig +// Toggle if reusing Timelocks already configured or if configuration is handled manually +const SKIP_TIMELOCK_CONFIG = true + module.exports = { OUTPUT_FILE, DEPLOY_WAIT, @@ -40,5 +43,6 @@ module.exports = { HIGHSEC_MIN_DELAY, LOWSEC_MIN_DELAY, ADDITIONAL_HIGHSEC_ADMIN, - ADDITIONAL_LOWSEC_ADMIN + ADDITIONAL_LOWSEC_ADMIN, + SKIP_TIMELOCK_CONFIG }; From 68ef9ff3d355418a4a814a416d06a49279ce13ff Mon Sep 17 00:00:00 2001 From: sajanrajdev Date: Mon, 11 Mar 2024 09:57:48 -0700 Subject: [PATCH 2/7] feat: only timelocks on output --- .../eBTCMainnetDeploymentOutput.json | 10 ++++ .../eBTCSepoliaDeploymentOutput.json | 56 ------------------- 2 files changed, 10 insertions(+), 56 deletions(-) create mode 100644 packages/contracts/mainnetDeployment/eBTCMainnetDeploymentOutput.json diff --git a/packages/contracts/mainnetDeployment/eBTCMainnetDeploymentOutput.json b/packages/contracts/mainnetDeployment/eBTCMainnetDeploymentOutput.json new file mode 100644 index 000000000..edffc4916 --- /dev/null +++ b/packages/contracts/mainnetDeployment/eBTCMainnetDeploymentOutput.json @@ -0,0 +1,10 @@ +{ + "highSecTimelock": { + "address": "0xaDDeE229Bd103bb5B10C3CdB595A01c425dd3264", + "verification": "https://etherscan.io/address/0xaDDeE229Bd103bb5B10C3CdB595A01c425dd3264#code" + }, + "lowSecTimelock": { + "address": "0xE2F2D9e226e5236BeC4531FcBf1A22A7a2bD0602", + "verification": "https://etherscan.io/address/0xE2F2D9e226e5236BeC4531FcBf1A22A7a2bD0602#code" + } + } \ No newline at end of file diff --git a/packages/contracts/mainnetDeployment/eBTCSepoliaDeploymentOutput.json b/packages/contracts/mainnetDeployment/eBTCSepoliaDeploymentOutput.json index 5c70366ca..3221223c6 100644 --- a/packages/contracts/mainnetDeployment/eBTCSepoliaDeploymentOutput.json +++ b/packages/contracts/mainnetDeployment/eBTCSepoliaDeploymentOutput.json @@ -1,8 +1,4 @@ { - "eBTCDeployer": { - "address": "0x21D4211d6125B40bA6049308204B091A8efE3452", - "verification": "https://sepolia.etherscan.io/address/0x21D4211d6125B40bA6049308204B091A8efE3452#code" - }, "highSecTimelock": { "address": "0x0393846e97ab5Ec1DC8CB7A59Ee8505F72A6aEEb", "verification": "https://sepolia.etherscan.io/address/0x0393846e97ab5Ec1DC8CB7A59Ee8505F72A6aEEb#code" @@ -10,57 +6,5 @@ "lowSecTimelock": { "address": "0xaADf07C98E2420E4d995Ba41Db53399648f50076", "verification": "https://sepolia.etherscan.io/address/0xaADf07C98E2420E4d995Ba41Db53399648f50076#code" - }, - "authority": { - "address": "0x85A074FF5adDf47fD66c94C780E7596922B3d1D9", - "verification": "https://sepolia.etherscan.io/address/0x85A074FF5adDf47fD66c94C780E7596922B3d1D9#code" - }, - "liquidationLibrary": { - "address": "0x64B22874Bdc9F2e98C11b1bd6BA5527cf42Ef5c9", - "verification": "https://sepolia.etherscan.io/address/0x64B22874Bdc9F2e98C11b1bd6BA5527cf42Ef5c9#code" - }, - "cdpManager": { - "address": "0x39D6613ABEDd78a0b8edEEfE62cDEc85FCbe08c0", - "verification": "https://sepolia.etherscan.io/address/0x39D6613ABEDd78a0b8edEEfE62cDEc85FCbe08c0#code" - }, - "borrowerOperations": { - "address": "0x3D6697c8Cfcc36b68a3077d0a94385B8904B1299", - "verification": "https://sepolia.etherscan.io/address/0x3D6697c8Cfcc36b68a3077d0a94385B8904B1299#code" - }, - "eBTCToken": { - "address": "0xeA2D83AA5e7da0668AdbddADAAc28e51318DDd86", - "verification": "https://sepolia.etherscan.io/address/0xeA2D83AA5e7da0668AdbddADAAc28e51318DDd86#code" - }, - "priceFeed": { - "address": "0xd2Bdc5Acb219ECeEE3578DA86774BBE4dd85665E", - "verification": "https://sepolia.etherscan.io/address/0xd2Bdc5Acb219ECeEE3578DA86774BBE4dd85665E#code" - }, - "ebtcFeed": { - "address": "0x14BBa0A866f49D1ef33096557e661bE20BeBADA0", - "verification": "https://sepolia.etherscan.io/address/0x14BBa0A866f49D1ef33096557e661bE20BeBADA0#code" - }, - "activePool": { - "address": "0x8EbA6a17Fcd480A96a87308C560170206186D3EA", - "verification": "https://sepolia.etherscan.io/address/0x8EbA6a17Fcd480A96a87308C560170206186D3EA#code" - }, - "collSurplusPool": { - "address": "0x6a6Ee2146f851fA745016B9e5592379f775b4ff3", - "verification": "https://sepolia.etherscan.io/address/0x6a6Ee2146f851fA745016B9e5592379f775b4ff3#code" - }, - "sortedCdps": { - "address": "0x0ADF592E25ba775b89cA37e0Fc01420CA96563C8", - "verification": "https://sepolia.etherscan.io/address/0x0ADF592E25ba775b89cA37e0Fc01420CA96563C8#code" - }, - "hintHelpers": { - "address": "0x6AAB2e5f4bA902890197e5F60EB1aA420F2c079F", - "verification": "https://sepolia.etherscan.io/address/0x6AAB2e5f4bA902890197e5F60EB1aA420F2c079F#code" - }, - "feeRecipient": { - "address": "0xed072C4DaA8c3068eAda19B17ec63172975Abe7e", - "verification": "https://sepolia.etherscan.io/address/0xed072C4DaA8c3068eAda19B17ec63172975Abe7e#code" - }, - "multiCdpGetter": { - "address": "0xBdd15a507945557ef039c847FB70d31f65522150", - "verification": "https://sepolia.etherscan.io/address/0xBdd15a507945557ef039c847FB70d31f65522150#code" } } \ No newline at end of file From 721b6b17155cc6ba1a17075d69b76d4638008e5e Mon Sep 17 00:00:00 2001 From: sajanrajdev Date: Mon, 11 Mar 2024 09:58:16 -0700 Subject: [PATCH 3/7] feat: skip timelock config and sepolia default --- .../mainnetDeployment/eBTCDeployScript.js | 178 +++++++++--------- 1 file changed, 92 insertions(+), 86 deletions(-) diff --git a/packages/contracts/mainnetDeployment/eBTCDeployScript.js b/packages/contracts/mainnetDeployment/eBTCDeployScript.js index 45940d67f..50e8a8de5 100644 --- a/packages/contracts/mainnetDeployment/eBTCDeployScript.js +++ b/packages/contracts/mainnetDeployment/eBTCDeployScript.js @@ -52,6 +52,8 @@ class EBTCDeployerScript { this.highSecDelay = configParams.HIGHSEC_MIN_DELAY; // Deployment should fail if null this.lowSecDelay = configParams.LOWSEC_MIN_DELAY; // Deployment should fail if null + this.skipTimelockConfig = configPArams.SKIP_TIMELOCK_CONFIG + this.collEthCLFeed = checkValidItem(configParams.externalAddress['collEthCLFeed']) ? configParams.externalAddress['collEthCLFeed'] : deployerWallet.address; this.ethBtcCLFeed = checkValidItem(configParams.externalAddress['ethBtcCLFeed']) ? configParams.externalAddress['ethBtcCLFeed'] : deployerWallet.address; this.chainlinkAdapter = checkValidItem(configParams.externalAddress['chainlinkAdapter']) ? configParams.externalAddress['chainlinkAdapter'] : deployerWallet.address; @@ -357,91 +359,95 @@ class EBTCDeployerScript { let tx; const authority = coreContracts.authority; - // === Timelocks Configuration === // - - const PROPOSER_ROLE = await this.highSecTimelock.PROPOSER_ROLE(); - const EXECUTOR_ROLE = await this.highSecTimelock.EXECUTOR_ROLE(); - const CANCELLER_ROLE = await this.highSecTimelock.CANCELLER_ROLE(); - const TIMELOCK_ADMIN_ROLE = await this.highSecTimelock.TIMELOCK_ADMIN_ROLE(); - - // HIGHSEC TIMELOCK - // ========================== - // PROPOSERS: Security - // CANCELLERS: Security - // EXECUTORS: Security - // Admin: Only Timelock - // Delay: 7 days (mainnet) - // ========================== - - assert.isTrue(await this.highSecTimelock.getMinDelay() == configParams.HIGHSEC_MIN_DELAY); - - assert.isTrue(await this.highSecTimelock.getRoleMemberCount(PROPOSER_ROLE) == 1); - assert.isTrue(await this.highSecTimelock.getRoleMemberCount(EXECUTOR_ROLE) == 1); - assert.isTrue(await this.highSecTimelock.getRoleMemberCount(CANCELLER_ROLE) == 1); - - assert.isTrue(await this.highSecTimelock.hasRole(PROPOSER_ROLE, this.securityMultisig)); - assert.isTrue(await this.highSecTimelock.hasRole(EXECUTOR_ROLE, this.securityMultisig)); - assert.isTrue(await this.highSecTimelock.hasRole(CANCELLER_ROLE, this.securityMultisig)); - - // Only after confirming that the Timelock has admin role on itself, we revoke it from the deployer - assert.isTrue(await this.highSecTimelock.hasRole(TIMELOCK_ADMIN_ROLE, this.highSecTimelock.address)); - if (await this.highSecTimelock.hasRole(TIMELOCK_ADMIN_ROLE, _deployer.address)) { - tx = await this.highSecTimelock.revokeRole(TIMELOCK_ADMIN_ROLE, _deployer.address); - await tx.wait(); - console.log("Revoked TIMELOCK_ADMIN_ROLE of deployer on highSecTimelock"); - } - assert.isFalse(await this.highSecTimelock.hasRole(TIMELOCK_ADMIN_ROLE, _deployer.address)); - assert.isTrue(await this.highSecTimelock.getRoleMemberCount(TIMELOCK_ADMIN_ROLE) == 1); - - // Print out final state for sanity check - console.log(chalk.cyan("HIGH SEC TIMELOCK CONFIGURATION")) - await printOutTimelockState(this.highSecTimelock); - - // LOWSEC TIMELOCK - // ========================== - // PROPOSERS: Security and CDP TechOps - // CANCELLERS: Security - // EXECUTORS: Security and CDP TechOps - // Admin: Only Timelock - // Delay: 2 days (mainnet) - // ========================== - - assert.isTrue(await this.lowSecTimelock.getMinDelay() == configParams.LOWSEC_MIN_DELAY); - - console.log(await this.lowSecTimelock.getRoleMemberCount(PROPOSER_ROLE)) - console.log(await this.lowSecTimelock.getRoleMemberCount(EXECUTOR_ROLE)) - - assert.isTrue(await this.lowSecTimelock.getRoleMemberCount(PROPOSER_ROLE) == 2); - assert.isTrue(await this.lowSecTimelock.getRoleMemberCount(EXECUTOR_ROLE) == 2); - - assert.isTrue(await this.lowSecTimelock.hasRole(PROPOSER_ROLE, this.securityMultisig)); - assert.isTrue(await this.lowSecTimelock.hasRole(PROPOSER_ROLE, this.cdpTechOpsMultisig)); - assert.isTrue(await this.lowSecTimelock.hasRole(EXECUTOR_ROLE, this.securityMultisig)); - assert.isTrue(await this.lowSecTimelock.hasRole(EXECUTOR_ROLE, this.cdpTechOpsMultisig)); - assert.isTrue(await this.lowSecTimelock.hasRole(CANCELLER_ROLE, this.securityMultisig)); - - // We remove the canceller from TechOps - if (await this.lowSecTimelock.hasRole(CANCELLER_ROLE, this.cdpTechOpsMultisig)) { - tx = await this.lowSecTimelock.revokeRole(CANCELLER_ROLE, this.cdpTechOpsMultisig); - await tx.wait(); - console.log("Revoked CANCELLER_ROLE of cdpTechOpsMultisig on lowSecTimelock"); - } - assert.isFalse(await this.lowSecTimelock.hasRole(CANCELLER_ROLE, this.cdpTechOpsMultisig)); - assert.isTrue(await this.lowSecTimelock.getRoleMemberCount(CANCELLER_ROLE) == 1); // Only Security should be canceller - - // Only after confirming that the Timelock has admin role on itself, we revoke it from the deployer - assert.isTrue(await this.lowSecTimelock.hasRole(TIMELOCK_ADMIN_ROLE, this.lowSecTimelock.address)); - if (await this.lowSecTimelock.hasRole(TIMELOCK_ADMIN_ROLE, _deployer.address)) { - tx = await this.lowSecTimelock.revokeRole(TIMELOCK_ADMIN_ROLE, _deployer.address); - await tx.wait(); - console.log("Revoked TIMELOCK_ADMIN_ROLE of deployer on lowSecTimelock"); - } - assert.isFalse(await this.lowSecTimelock.hasRole(TIMELOCK_ADMIN_ROLE, _deployer.address)); - assert.isTrue(await this.lowSecTimelock.getRoleMemberCount(TIMELOCK_ADMIN_ROLE) == 1); // Only timelock should be admin + if (!this.skipTimelockConfig) { + + // === Timelocks Configuration === // + + const PROPOSER_ROLE = await this.highSecTimelock.PROPOSER_ROLE(); + const EXECUTOR_ROLE = await this.highSecTimelock.EXECUTOR_ROLE(); + const CANCELLER_ROLE = await this.highSecTimelock.CANCELLER_ROLE(); + const TIMELOCK_ADMIN_ROLE = await this.highSecTimelock.TIMELOCK_ADMIN_ROLE(); + + // HIGHSEC TIMELOCK + // ========================== + // PROPOSERS: Security + // CANCELLERS: Security + // EXECUTORS: Security + // Admin: Only Timelock + // Delay: 7 days (mainnet) + // ========================== + + assert.isTrue(await this.highSecTimelock.getMinDelay() == configParams.HIGHSEC_MIN_DELAY); + + assert.isTrue(await this.highSecTimelock.getRoleMemberCount(PROPOSER_ROLE) == 1); + assert.isTrue(await this.highSecTimelock.getRoleMemberCount(EXECUTOR_ROLE) == 1); + assert.isTrue(await this.highSecTimelock.getRoleMemberCount(CANCELLER_ROLE) == 1); + + assert.isTrue(await this.highSecTimelock.hasRole(PROPOSER_ROLE, this.securityMultisig)); + assert.isTrue(await this.highSecTimelock.hasRole(EXECUTOR_ROLE, this.securityMultisig)); + assert.isTrue(await this.highSecTimelock.hasRole(CANCELLER_ROLE, this.securityMultisig)); - // Print out final state for sanity check - console.log(chalk.cyan("LOW SEC TIMELOCK CONFIGURATION")) - await printOutTimelockState(this.lowSecTimelock); + // Only after confirming that the Timelock has admin role on itself, we revoke it from the deployer + assert.isTrue(await this.highSecTimelock.hasRole(TIMELOCK_ADMIN_ROLE, this.highSecTimelock.address)); + if (await this.highSecTimelock.hasRole(TIMELOCK_ADMIN_ROLE, _deployer.address)) { + tx = await this.highSecTimelock.revokeRole(TIMELOCK_ADMIN_ROLE, _deployer.address); + await tx.wait(); + console.log("Revoked TIMELOCK_ADMIN_ROLE of deployer on highSecTimelock"); + } + assert.isFalse(await this.highSecTimelock.hasRole(TIMELOCK_ADMIN_ROLE, _deployer.address)); + assert.isTrue(await this.highSecTimelock.getRoleMemberCount(TIMELOCK_ADMIN_ROLE) == 1); + + // Print out final state for sanity check + console.log(chalk.cyan("HIGH SEC TIMELOCK CONFIGURATION")) + await printOutTimelockState(this.highSecTimelock); + + // LOWSEC TIMELOCK + // ========================== + // PROPOSERS: Security and CDP TechOps + // CANCELLERS: Security + // EXECUTORS: Security and CDP TechOps + // Admin: Only Timelock + // Delay: 2 days (mainnet) + // ========================== + + assert.isTrue(await this.lowSecTimelock.getMinDelay() == configParams.LOWSEC_MIN_DELAY); + + console.log(await this.lowSecTimelock.getRoleMemberCount(PROPOSER_ROLE)) + console.log(await this.lowSecTimelock.getRoleMemberCount(EXECUTOR_ROLE)) + + assert.isTrue(await this.lowSecTimelock.getRoleMemberCount(PROPOSER_ROLE) == 2); + assert.isTrue(await this.lowSecTimelock.getRoleMemberCount(EXECUTOR_ROLE) == 2); + + assert.isTrue(await this.lowSecTimelock.hasRole(PROPOSER_ROLE, this.securityMultisig)); + assert.isTrue(await this.lowSecTimelock.hasRole(PROPOSER_ROLE, this.cdpTechOpsMultisig)); + assert.isTrue(await this.lowSecTimelock.hasRole(EXECUTOR_ROLE, this.securityMultisig)); + assert.isTrue(await this.lowSecTimelock.hasRole(EXECUTOR_ROLE, this.cdpTechOpsMultisig)); + assert.isTrue(await this.lowSecTimelock.hasRole(CANCELLER_ROLE, this.securityMultisig)); + + // We remove the canceller from TechOps + if (await this.lowSecTimelock.hasRole(CANCELLER_ROLE, this.cdpTechOpsMultisig)) { + tx = await this.lowSecTimelock.revokeRole(CANCELLER_ROLE, this.cdpTechOpsMultisig); + await tx.wait(); + console.log("Revoked CANCELLER_ROLE of cdpTechOpsMultisig on lowSecTimelock"); + } + assert.isFalse(await this.lowSecTimelock.hasRole(CANCELLER_ROLE, this.cdpTechOpsMultisig)); + assert.isTrue(await this.lowSecTimelock.getRoleMemberCount(CANCELLER_ROLE) == 1); // Only Security should be canceller + + // Only after confirming that the Timelock has admin role on itself, we revoke it from the deployer + assert.isTrue(await this.lowSecTimelock.hasRole(TIMELOCK_ADMIN_ROLE, this.lowSecTimelock.address)); + if (await this.lowSecTimelock.hasRole(TIMELOCK_ADMIN_ROLE, _deployer.address)) { + tx = await this.lowSecTimelock.revokeRole(TIMELOCK_ADMIN_ROLE, _deployer.address); + await tx.wait(); + console.log("Revoked TIMELOCK_ADMIN_ROLE of deployer on lowSecTimelock"); + } + assert.isFalse(await this.lowSecTimelock.hasRole(TIMELOCK_ADMIN_ROLE, _deployer.address)); + assert.isTrue(await this.lowSecTimelock.getRoleMemberCount(TIMELOCK_ADMIN_ROLE) == 1); // Only timelock should be admin + + // Print out final state for sanity check + console.log(chalk.cyan("LOW SEC TIMELOCK CONFIGURATION")) + await printOutTimelockState(this.lowSecTimelock); + + } // === CDP Authority Configuration === // @@ -628,8 +634,8 @@ async function main() { let useMockCollateral = false; let useMockPriceFeed = true; - let configParams = configParamsLocal; - // let configParams = configParamsSepolia; + // let configParams = configParamsLocal; + let configParams = configParamsSepolia; // let configParams = configParamsMainnet; // let configParams = configParamsGoerli; From caf793d99702b98a46839b12b189429a3dfe612e Mon Sep 17 00:00:00 2001 From: sajanrajdev Date: Mon, 11 Mar 2024 10:12:33 -0700 Subject: [PATCH 4/7] fix: skip config flag usage Signed-off-by: sajanrajdev --- packages/contracts/mainnetDeployment/eBTCDeployScript.js | 4 +--- .../mainnetDeployment/eBTCDeploymentParams.goerli.js | 6 +++++- .../mainnetDeployment/eBTCDeploymentParams.local.js | 6 +++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/contracts/mainnetDeployment/eBTCDeployScript.js b/packages/contracts/mainnetDeployment/eBTCDeployScript.js index 50e8a8de5..0c28dff8a 100644 --- a/packages/contracts/mainnetDeployment/eBTCDeployScript.js +++ b/packages/contracts/mainnetDeployment/eBTCDeployScript.js @@ -52,8 +52,6 @@ class EBTCDeployerScript { this.highSecDelay = configParams.HIGHSEC_MIN_DELAY; // Deployment should fail if null this.lowSecDelay = configParams.LOWSEC_MIN_DELAY; // Deployment should fail if null - this.skipTimelockConfig = configPArams.SKIP_TIMELOCK_CONFIG - this.collEthCLFeed = checkValidItem(configParams.externalAddress['collEthCLFeed']) ? configParams.externalAddress['collEthCLFeed'] : deployerWallet.address; this.ethBtcCLFeed = checkValidItem(configParams.externalAddress['ethBtcCLFeed']) ? configParams.externalAddress['ethBtcCLFeed'] : deployerWallet.address; this.chainlinkAdapter = checkValidItem(configParams.externalAddress['chainlinkAdapter']) ? configParams.externalAddress['chainlinkAdapter'] : deployerWallet.address; @@ -359,7 +357,7 @@ class EBTCDeployerScript { let tx; const authority = coreContracts.authority; - if (!this.skipTimelockConfig) { + if (!configParams.SKIP_TIMELOCK_CONFIG) { // === Timelocks Configuration === // diff --git a/packages/contracts/mainnetDeployment/eBTCDeploymentParams.goerli.js b/packages/contracts/mainnetDeployment/eBTCDeploymentParams.goerli.js index abde445a0..e042c035a 100644 --- a/packages/contracts/mainnetDeployment/eBTCDeploymentParams.goerli.js +++ b/packages/contracts/mainnetDeployment/eBTCDeploymentParams.goerli.js @@ -23,6 +23,9 @@ const LOWSEC_MIN_DELAY = "300" // 5 mins const ADDITIONAL_HIGHSEC_ADMIN = "" const ADDITIONAL_LOWSEC_ADMIN = "" +// Toggle if reusing Timelocks already configured or if configuration is handled manually +const SKIP_TIMELOCK_CONFIG = true + module.exports = { OUTPUT_FILE, DEPLOY_WAIT, @@ -35,5 +38,6 @@ module.exports = { HIGHSEC_MIN_DELAY, LOWSEC_MIN_DELAY, ADDITIONAL_HIGHSEC_ADMIN, - ADDITIONAL_LOWSEC_ADMIN + ADDITIONAL_LOWSEC_ADMIN, + SKIP_TIMELOCK_CONFIG }; diff --git a/packages/contracts/mainnetDeployment/eBTCDeploymentParams.local.js b/packages/contracts/mainnetDeployment/eBTCDeploymentParams.local.js index f58c2ec4c..8fe8880ab 100644 --- a/packages/contracts/mainnetDeployment/eBTCDeploymentParams.local.js +++ b/packages/contracts/mainnetDeployment/eBTCDeploymentParams.local.js @@ -18,6 +18,9 @@ const LOWSEC_MIN_DELAY = 300 // 5 mins const ADDITIONAL_HIGHSEC_ADMIN = "" const ADDITIONAL_LOWSEC_ADMIN = "" +// Toggle if reusing Timelocks already configured or if configuration is handled manually +const SKIP_TIMELOCK_CONFIG = true + module.exports = { OUTPUT_FILE, DEPLOY_WAIT, @@ -29,5 +32,6 @@ module.exports = { HIGHSEC_MIN_DELAY, LOWSEC_MIN_DELAY, ADDITIONAL_HIGHSEC_ADMIN, - ADDITIONAL_LOWSEC_ADMIN + ADDITIONAL_LOWSEC_ADMIN, + SKIP_TIMELOCK_CONFIG }; From 367eaf1dce9921ce797716c8ec34433fb3045682 Mon Sep 17 00:00:00 2001 From: dapp-whisperer Date: Mon, 11 Mar 2024 15:48:14 -0400 Subject: [PATCH 5/7] add sepolia feed addresses --- .../mainnetDeployment/eBTCDeploymentParams.sepolia.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js b/packages/contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js index d878f5e2a..8fd28d612 100644 --- a/packages/contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js +++ b/packages/contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js @@ -1,9 +1,9 @@ const externalAddress = { "collEthCLFeed": "0x007C2f192D648cBe79Ef3CC5A3DaB43D7D8c893e", - "btcUsdCLFeed": "", - "ethUsdCLFeed": "", - "chainlinkAdapter": "", - "authorityOwner": "", // Leave empty for deployer, required for atomic governance wireup. + "btcUsdCLFeed": "0x95ed2698f28c1038846b133a409Ae2Aaf0571EEa", + "ethUsdCLFeed": "0x2Cf513b4ba3725F88bf599029Ae1A7930c84d485", + "chainlinkAdapter": "0x7a2ed89C0E2E5acF20ccf3284A012ABbfac36D62", + "authorityOwner": "0xC8A7768D2a9EE15437c981a7130268622083c2BD",// security multisig "collateral": "0x97BA9AA7B7DC74f7a74864A62c4fF93b2b22f015", //sepolia "securityMultisig": "0xC8A7768D2a9EE15437c981a7130268622083c2BD", //sepolia "cdpTechOpsMultisig": "0x664F43229dDa9fdEE00e723753f88f3Ba81967F6", //sepolia @@ -43,6 +43,5 @@ module.exports = { HIGHSEC_MIN_DELAY, LOWSEC_MIN_DELAY, ADDITIONAL_HIGHSEC_ADMIN, - ADDITIONAL_LOWSEC_ADMIN, - SKIP_TIMELOCK_CONFIG + ADDITIONAL_LOWSEC_ADMIN }; From fc4c080fd1f610dfe4f158e03e33220df7cd60b7 Mon Sep 17 00:00:00 2001 From: sajanrajdev Date: Mon, 11 Mar 2024 14:01:37 -0700 Subject: [PATCH 6/7] feat: default owner to deployer --- .../contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js b/packages/contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js index 8fd28d612..b8beaab6e 100644 --- a/packages/contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js +++ b/packages/contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js @@ -3,7 +3,7 @@ const externalAddress = { "btcUsdCLFeed": "0x95ed2698f28c1038846b133a409Ae2Aaf0571EEa", "ethUsdCLFeed": "0x2Cf513b4ba3725F88bf599029Ae1A7930c84d485", "chainlinkAdapter": "0x7a2ed89C0E2E5acF20ccf3284A012ABbfac36D62", - "authorityOwner": "0xC8A7768D2a9EE15437c981a7130268622083c2BD",// security multisig + "authorityOwner": "", // Leave empty for deployer, required for atomic governance wireup. "collateral": "0x97BA9AA7B7DC74f7a74864A62c4fF93b2b22f015", //sepolia "securityMultisig": "0xC8A7768D2a9EE15437c981a7130268622083c2BD", //sepolia "cdpTechOpsMultisig": "0x664F43229dDa9fdEE00e723753f88f3Ba81967F6", //sepolia From ac251777d69a4d204d644f828861bfbfb0002a07 Mon Sep 17 00:00:00 2001 From: wtj2021 Date: Thu, 14 Mar 2024 15:22:59 -0700 Subject: [PATCH 7/7] sepolia addresses --- .../mainnetDeployment/eBTCDeployScript.js | 6 +- .../eBTCDeploymentParams.sepolia.js | 3 +- .../eBTCSepoliaDeploymentOutput.json | 56 +++++++++++++++++++ 3 files changed, 61 insertions(+), 4 deletions(-) diff --git a/packages/contracts/mainnetDeployment/eBTCDeployScript.js b/packages/contracts/mainnetDeployment/eBTCDeployScript.js index 0c28dff8a..0a2a421c7 100644 --- a/packages/contracts/mainnetDeployment/eBTCDeployScript.js +++ b/packages/contracts/mainnetDeployment/eBTCDeployScript.js @@ -630,10 +630,10 @@ async function main() { // Flag if useMockCollateral and useMockPriceFeed // also specify which parameter config file to use let useMockCollateral = false; - let useMockPriceFeed = true; + let useMockPriceFeed = false; - // let configParams = configParamsLocal; - let configParams = configParamsSepolia; + let configParams = configParamsLocal; + // let configParams = configParamsSepolia; // let configParams = configParamsMainnet; // let configParams = configParamsGoerli; diff --git a/packages/contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js b/packages/contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js index b8beaab6e..0820e5578 100644 --- a/packages/contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js +++ b/packages/contracts/mainnetDeployment/eBTCDeploymentParams.sepolia.js @@ -43,5 +43,6 @@ module.exports = { HIGHSEC_MIN_DELAY, LOWSEC_MIN_DELAY, ADDITIONAL_HIGHSEC_ADMIN, - ADDITIONAL_LOWSEC_ADMIN + ADDITIONAL_LOWSEC_ADMIN, + SKIP_TIMELOCK_CONFIG }; diff --git a/packages/contracts/mainnetDeployment/eBTCSepoliaDeploymentOutput.json b/packages/contracts/mainnetDeployment/eBTCSepoliaDeploymentOutput.json index 3221223c6..cc213c6bf 100644 --- a/packages/contracts/mainnetDeployment/eBTCSepoliaDeploymentOutput.json +++ b/packages/contracts/mainnetDeployment/eBTCSepoliaDeploymentOutput.json @@ -6,5 +6,61 @@ "lowSecTimelock": { "address": "0xaADf07C98E2420E4d995Ba41Db53399648f50076", "verification": "https://sepolia.etherscan.io/address/0xaADf07C98E2420E4d995Ba41Db53399648f50076#code" + }, + "eBTCDeployer": { + "address": "0xb52022369F2DF47054c08BF3eee4e5A802e46080", + "verification": "https://sepolia.etherscan.io/address/0xb52022369F2DF47054c08BF3eee4e5A802e46080#code" + }, + "authority": { + "address": "0x68Aa57A7b02c02f53A99e8Fd451CaE761210C5d2", + "verification": "https://sepolia.etherscan.io/address/0x68Aa57A7b02c02f53A99e8Fd451CaE761210C5d2#code" + }, + "liquidationLibrary": { + "address": "0xD036320bf778651684415AB372c7ab58acB5f3d8", + "verification": "https://sepolia.etherscan.io/address/0xD036320bf778651684415AB372c7ab58acB5f3d8#code" + }, + "cdpManager": { + "address": "0xe89A0378237c21B94126f77eD5Fa0FDd2eDE2b36", + "verification": "https://sepolia.etherscan.io/address/0xe89A0378237c21B94126f77eD5Fa0FDd2eDE2b36#code" + }, + "borrowerOperations": { + "address": "0x58aa3dE50CfeF7450657C52766dD43da8747285e", + "verification": "https://sepolia.etherscan.io/address/0x58aa3dE50CfeF7450657C52766dD43da8747285e#code" + }, + "eBTCToken": { + "address": "0xa78F78Aba222d20cE82eA4868a9E00c954e469c0", + "verification": "https://sepolia.etherscan.io/address/0xa78F78Aba222d20cE82eA4868a9E00c954e469c0#code" + }, + "priceFeed": { + "address": "0x240E4141E13c6613bBBC53049dFEc0dAC70D692e", + "verification": "https://sepolia.etherscan.io/address/0x240E4141E13c6613bBBC53049dFEc0dAC70D692e#code" + }, + "ebtcFeed": { + "address": "0xF08F9Ae30e19f2CA9b0876a7Dc57E6695010dE40", + "verification": "https://sepolia.etherscan.io/address/0xF08F9Ae30e19f2CA9b0876a7Dc57E6695010dE40#code" + }, + "activePool": { + "address": "0x7e0A97660B477a79C2e9f472bbFCFd8A715D9E6f", + "verification": "https://sepolia.etherscan.io/address/0x7e0A97660B477a79C2e9f472bbFCFd8A715D9E6f#code" + }, + "collSurplusPool": { + "address": "0xd5E6e5c5F46fa1A038b62B0625e21B97a4897F8F", + "verification": "https://sepolia.etherscan.io/address/0xd5E6e5c5F46fa1A038b62B0625e21B97a4897F8F#code" + }, + "sortedCdps": { + "address": "0xbc79539670992A4E1948dAdB737472a2FaD7CEcf", + "verification": "https://sepolia.etherscan.io/address/0xbc79539670992A4E1948dAdB737472a2FaD7CEcf#code" + }, + "hintHelpers": { + "address": "0xD4612689dC45a84dE503dc375eAE348d034e7df1", + "verification": "https://sepolia.etherscan.io/address/0xD4612689dC45a84dE503dc375eAE348d034e7df1#code" + }, + "feeRecipient": { + "address": "0x76Fb3d53Dc44eE733d8fD7b1581b35B7C76349F8", + "verification": "https://sepolia.etherscan.io/address/0x76Fb3d53Dc44eE733d8fD7b1581b35B7C76349F8#code" + }, + "multiCdpGetter": { + "address": "0x1a951f87347bD16a7aD2B44add9B4522E6452af6", + "verification": "https://sepolia.etherscan.io/address/0x1a951f87347bD16a7aD2B44add9B4522E6452af6#code" } } \ No newline at end of file