From 6fcbcd146e3d70445acae736b41124a138366cb9 Mon Sep 17 00:00:00 2001 From: Alex Towle Date: Mon, 18 Nov 2024 15:42:06 -1000 Subject: [PATCH 1/3] Started the re-deployment of the Linea factory --- deployments.json | 95 +++++------------------------- tasks/factory/index.ts | 1 + tasks/factory/update-governance.ts | 65 ++++++++++++++++++++ 3 files changed, 81 insertions(+), 80 deletions(-) create mode 100644 tasks/factory/update-governance.ts diff --git a/deployments.json b/deployments.json index 0e174c4ee..84c6dd004 100644 --- a/deployments.json +++ b/deployments.json @@ -1156,86 +1156,6 @@ "address": "0xc7822a469436dc786e88cca48f6e194d2b8c0e03", "timestamp": "2024-09-09T18:18:34.017Z" }, - "ElementDAO Hyperdrive Factory": { - "contract": "HyperdriveFactory", - "address": "0xfbabc73b6241df6453d88ac13b556ba643f9a6ad", - "timestamp": "2024-09-09T18:18:39.056Z" - }, - "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaHyperdriveCoreDeployer": { - "contract": "EzETHLineaHyperdriveCoreDeployer", - "address": "0xe61fb0f6a265f614ca6bf2ee83bbc463cb34da38", - "timestamp": "2024-09-09T20:31:41.948Z" - }, - "LPMath": { - "contract": "LPMath", - "address": "0xd9400ab142b4ad18c181538b76522334e0cd8d37", - "timestamp": "2024-09-09T20:31:46.740Z" - }, - "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaTarget0Deployer": { - "contract": "EzETHLineaTarget0Deployer", - "address": "0xbe082293b646cb619a638d29e8eff7cf2f46aa3a", - "timestamp": "2024-09-09T20:31:52.026Z" - }, - "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaTarget1Deployer": { - "contract": "EzETHLineaTarget1Deployer", - "address": "0x08b40647714ac1e5742633fc2d83c20d61a199d2", - "timestamp": "2024-09-09T20:31:57.021Z" - }, - "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaTarget2Deployer": { - "contract": "EzETHLineaTarget2Deployer", - "address": "0xf95b98256edb861be389b9807f6656e8be2dc488", - "timestamp": "2024-09-09T20:32:01.931Z" - }, - "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaTarget3Deployer": { - "contract": "EzETHLineaTarget3Deployer", - "address": "0xdf5d682404b0611f46f2626d9d5a37eb6a6fd27d", - "timestamp": "2024-09-09T20:32:06.773Z" - }, - "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaTarget4Deployer": { - "contract": "EzETHLineaTarget4Deployer", - "address": "0xd9bdabb0f87e46af44063d251eb07edfe260d9f1", - "timestamp": "2024-09-09T20:32:11.533Z" - }, - "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator": { - "contract": "EzETHLineaHyperdriveDeployerCoordinator", - "address": "0x2bbf0716fb1ac91169b0dbecff232c7bf1b7e701", - "timestamp": "2024-09-09T20:32:16.455Z" - }, - "ElementDAO KelpDAO rsETH Hyperdrive Deployer Coordinator_RsETHLineaHyperdriveCoreDeployer": { - "contract": "RsETHLineaHyperdriveCoreDeployer", - "address": "0x0fb305a458b1008faee03147b700b3975bea03fd", - "timestamp": "2024-09-09T20:32:26.534Z" - }, - "ElementDAO KelpDAO rsETH Hyperdrive Deployer Coordinator_RsETHLineaTarget0Deployer": { - "contract": "RsETHLineaTarget0Deployer", - "address": "0xd8ee8f39c42ee9b005582e4dc0d530c7de6f1471", - "timestamp": "2024-09-09T20:32:31.372Z" - }, - "ElementDAO KelpDAO rsETH Hyperdrive Deployer Coordinator_RsETHLineaTarget1Deployer": { - "contract": "RsETHLineaTarget1Deployer", - "address": "0xb2f17302ed12fe72d883fcc2b66f1b844fbb7964", - "timestamp": "2024-09-09T20:32:36.154Z" - }, - "ElementDAO KelpDAO rsETH Hyperdrive Deployer Coordinator_RsETHLineaTarget2Deployer": { - "contract": "RsETHLineaTarget2Deployer", - "address": "0xe441e793f7d6f7b0d633a770554d8924103a30b4", - "timestamp": "2024-09-09T20:32:40.940Z" - }, - "ElementDAO KelpDAO rsETH Hyperdrive Deployer Coordinator_RsETHLineaTarget3Deployer": { - "contract": "RsETHLineaTarget3Deployer", - "address": "0xe8dc5073b02d062388db8e50762a8c9a1c823540", - "timestamp": "2024-09-09T20:32:45.714Z" - }, - "ElementDAO KelpDAO rsETH Hyperdrive Deployer Coordinator_RsETHLineaTarget4Deployer": { - "contract": "RsETHLineaTarget4Deployer", - "address": "0xe0da47a1a6ceb80bb945652cb96a821fa5d91327", - "timestamp": "2024-09-09T20:32:50.678Z" - }, - "ElementDAO KelpDAO rsETH Hyperdrive Deployer Coordinator": { - "contract": "RsETHLineaHyperdriveDeployerCoordinator", - "address": "0x279c0504575639131be082923c21289d553d7c08", - "timestamp": "2024-09-09T20:32:55.517Z" - }, "ElementDAO 182 Day Renzo xezETH Hyperdrive_EzETHLineaTarget0": { "contract": "EzETHLineaTarget0", "address": "0xA1bFB507067CeB2c08abB72D0A49a76564CE4587", @@ -1295,6 +1215,21 @@ "contract": "RsETHLineaHyperdrive", "address": "0xB56e0Bf37c4747AbbC3aA9B8084B0d9b9A336777", "timestamp": "2024-09-09T20:34:07.406Z" + }, + "ElementDAO Hyperdrive Factory": { + "contract": "HyperdriveFactory", + "address": "0xd917235d89a58af93302e9a998d62735740c8117", + "timestamp": "2024-11-19T01:15:49.334Z" + }, + "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaHyperdriveCoreDeployer": { + "contract": "EzETHLineaHyperdriveCoreDeployer", + "address": "0x77644b188a5d1d58246a233761273c74b0f9d88d", + "timestamp": "2024-11-19T01:15:55.121Z" + }, + "LPMath": { + "contract": "LPMath", + "address": "0xbaa863b62c69993143b013fe7b8af278fd52f76b", + "timestamp": "2024-11-19T01:16:00.797Z" } }, "base": { diff --git a/tasks/factory/index.ts b/tasks/factory/index.ts index 722febba7..43aa87cfd 100644 --- a/tasks/factory/index.ts +++ b/tasks/factory/index.ts @@ -1 +1,2 @@ export * from "./remove-coordinator"; +export * from "./update-governance"; diff --git a/tasks/factory/update-governance.ts b/tasks/factory/update-governance.ts new file mode 100644 index 000000000..f54f573ab --- /dev/null +++ b/tasks/factory/update-governance.ts @@ -0,0 +1,65 @@ +import { task, types } from "hardhat/config"; +import { Address, parseEther } from "viem"; +import { + HyperdriveDeployBaseTask, + HyperdriveDeployBaseTaskParams, +} from "../deploy"; + +export type UpdateGovernanceParams = HyperdriveDeployBaseTaskParams & { + governance: Address; +}; + +HyperdriveDeployBaseTask( + task("factory:update-governance", "updates governance on the factory"), +) + .addParam("governance", "new governance address", undefined, types.string) + .setAction( + async ( + { governance }: Required, + { viem, hyperdriveDeploy: { deployments } }, + ) => { + // Get the factory contract. + let factoryAddress = deployments.byName( + "ElementDAO Hyperdrive Factory", + ).address as Address; + const factoryContract = await viem.getContractAt( + "IHyperdriveFactory", + factoryAddress, + ); + + // Update the max time stretch to 20%. + console.log( + `current max time stretch ${await factoryContract.read.maxTimeStretchAPR()} ...`, + ); + let pc = await viem.getPublicClient(); + let tx = await factoryContract.write.updateMaxTimeStretchAPR([ + parseEther("0.2"), + ]); + await pc.waitForTransactionReceipt({ hash: tx }); + console.log( + `new max time stretch ${await factoryContract.read.maxTimeStretchAPR()} ...`, + ); + + // Update the max fixed rate to 50%. + console.log( + `current max fixed rate ${await factoryContract.read.maxFixedAPR()} ...`, + ); + tx = await factoryContract.write.updateMaxFixedAPR([ + parseEther("0.5"), + ]); + await pc.waitForTransactionReceipt({ hash: tx }); + console.log( + `new max fixed rate ${await factoryContract.read.maxFixedAPR()} ...`, + ); + + // Update the governance to the new address. + console.log( + `current governance address ${await factoryContract.read.governance()} ...`, + ); + tx = await factoryContract.write.updateGovernance([governance]); + await pc.waitForTransactionReceipt({ hash: tx }); + console.log( + `new governance address ${await factoryContract.read.governance()} ...`, + ); + }, + ); From 954286dfeb76503df4cda1354d74cb47052fbf8b Mon Sep 17 00:00:00 2001 From: Alex Towle Date: Mon, 18 Nov 2024 16:37:28 -1000 Subject: [PATCH 2/3] Continued deploying the new Linea factory --- deployments.json | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/deployments.json b/deployments.json index 84c6dd004..7dea08e8d 100644 --- a/deployments.json +++ b/deployments.json @@ -1230,6 +1230,41 @@ "contract": "LPMath", "address": "0xbaa863b62c69993143b013fe7b8af278fd52f76b", "timestamp": "2024-11-19T01:16:00.797Z" + }, + "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaTarget0Deployer": { + "contract": "EzETHLineaTarget0Deployer", + "address": "0x68ba944d89d7481f3a9d73dcb75b7e6c7db5562b", + "timestamp": "2024-11-19T01:58:37.312Z" + }, + "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaTarget1Deployer": { + "contract": "EzETHLineaTarget1Deployer", + "address": "0xb8bd93848aa71887e447642299b1f2a5cf898a9b", + "timestamp": "2024-11-19T02:23:24.476Z" + }, + "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaTarget2Deployer": { + "contract": "EzETHLineaTarget2Deployer", + "address": "0xf74085c4404fd08e7d636f151b734a580f44100f", + "timestamp": "2024-11-19T02:23:30.224Z" + }, + "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaTarget3Deployer": { + "contract": "EzETHLineaTarget3Deployer", + "address": "0x57858abb2773fa20de1bac61eda8283a8b1ecea3", + "timestamp": "2024-11-19T02:23:35.990Z" + }, + "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaTarget4Deployer": { + "contract": "EzETHLineaTarget4Deployer", + "address": "0xea21fbc9eb872c025959d82383bc898540334484", + "timestamp": "2024-11-19T02:23:42.058Z" + }, + "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator": { + "contract": "EzETHLineaHyperdriveDeployerCoordinator", + "address": "0x02d668b32fc23f223464f3daf9df6e518cf1e9ee", + "timestamp": "2024-11-19T02:23:47.745Z" + }, + "ElementDAO KelpDAO rsETH Hyperdrive Deployer Coordinator_RsETHLineaHyperdriveCoreDeployer": { + "contract": "RsETHLineaHyperdriveCoreDeployer", + "address": "0xc6fe0b1a0d145c67ec87bffc1536a7b5da727662", + "timestamp": "2024-11-19T02:23:59.903Z" } }, "base": { From 8351728ffad5d4b8538f2efff1a8d7eae6f365e1 Mon Sep 17 00:00:00 2001 From: Alex Towle Date: Tue, 19 Nov 2024 13:45:03 -1000 Subject: [PATCH 3/3] Deployed the factory and transferred it to the GSC --- deployments.json | 47 +---------------------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/deployments.json b/deployments.json index 7dea08e8d..dfb491f91 100644 --- a/deployments.json +++ b/deployments.json @@ -1220,51 +1220,6 @@ "contract": "HyperdriveFactory", "address": "0xd917235d89a58af93302e9a998d62735740c8117", "timestamp": "2024-11-19T01:15:49.334Z" - }, - "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaHyperdriveCoreDeployer": { - "contract": "EzETHLineaHyperdriveCoreDeployer", - "address": "0x77644b188a5d1d58246a233761273c74b0f9d88d", - "timestamp": "2024-11-19T01:15:55.121Z" - }, - "LPMath": { - "contract": "LPMath", - "address": "0xbaa863b62c69993143b013fe7b8af278fd52f76b", - "timestamp": "2024-11-19T01:16:00.797Z" - }, - "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaTarget0Deployer": { - "contract": "EzETHLineaTarget0Deployer", - "address": "0x68ba944d89d7481f3a9d73dcb75b7e6c7db5562b", - "timestamp": "2024-11-19T01:58:37.312Z" - }, - "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaTarget1Deployer": { - "contract": "EzETHLineaTarget1Deployer", - "address": "0xb8bd93848aa71887e447642299b1f2a5cf898a9b", - "timestamp": "2024-11-19T02:23:24.476Z" - }, - "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaTarget2Deployer": { - "contract": "EzETHLineaTarget2Deployer", - "address": "0xf74085c4404fd08e7d636f151b734a580f44100f", - "timestamp": "2024-11-19T02:23:30.224Z" - }, - "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaTarget3Deployer": { - "contract": "EzETHLineaTarget3Deployer", - "address": "0x57858abb2773fa20de1bac61eda8283a8b1ecea3", - "timestamp": "2024-11-19T02:23:35.990Z" - }, - "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator_EzETHLineaTarget4Deployer": { - "contract": "EzETHLineaTarget4Deployer", - "address": "0xea21fbc9eb872c025959d82383bc898540334484", - "timestamp": "2024-11-19T02:23:42.058Z" - }, - "ElementDAO Renzo xezETH Hyperdrive Deployer Coordinator": { - "contract": "EzETHLineaHyperdriveDeployerCoordinator", - "address": "0x02d668b32fc23f223464f3daf9df6e518cf1e9ee", - "timestamp": "2024-11-19T02:23:47.745Z" - }, - "ElementDAO KelpDAO rsETH Hyperdrive Deployer Coordinator_RsETHLineaHyperdriveCoreDeployer": { - "contract": "RsETHLineaHyperdriveCoreDeployer", - "address": "0xc6fe0b1a0d145c67ec87bffc1536a7b5da727662", - "timestamp": "2024-11-19T02:23:59.903Z" } }, "base": { @@ -1714,4 +1669,4 @@ "timestamp": "2024-10-30T18:12:24.607Z" } } -} \ No newline at end of file +}