Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 6 additions & 81 deletions deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we getting rid of these deployers and LPMath?

"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",
Expand Down Expand Up @@ -1295,6 +1215,11 @@
"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"
}
},
"base": {
Expand Down Expand Up @@ -1744,4 +1669,4 @@
"timestamp": "2024-10-30T18:12:24.607Z"
}
}
}
}
1 change: 1 addition & 0 deletions tasks/factory/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from "./remove-coordinator";
export * from "./update-governance";
65 changes: 65 additions & 0 deletions tasks/factory/update-governance.ts
Original file line number Diff line number Diff line change
@@ -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<UpdateGovernanceParams>,
{ 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()} ...`,
);
},
);