Skip to content

Commit c8b9ece

Browse files
authored
EzETH and RETH redeployments (#1098)
* Bump the version * Added configuration files for the renzo and rocket pool yield sources * Removed fixmes * Fixed the issues in the deployment scripts * Deployed the EzETH and RETH deployer coordinators and pools * Fixed a bug in `convertToBase` and `convertToShares` * FIXME: Temporarily updated deployment.json and deploy.sh * Redeployed the pools * Added a script to remove old depoyer coordinators
1 parent c6aaf87 commit c8b9ece

6 files changed

Lines changed: 108 additions & 55 deletions

File tree

‎contracts/src/external/HyperdriveTarget0.sol‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ abstract contract HyperdriveTarget0 is
430430
function convertToBase(
431431
uint256 _shareAmount
432432
) external view returns (uint256) {
433-
return _convertToBase(_shareAmount);
433+
_revert(abi.encode(_convertToBase(_shareAmount)));
434434
}
435435

436436
/// @notice Convert an amount of base to an amount of vault shares.
@@ -439,7 +439,7 @@ abstract contract HyperdriveTarget0 is
439439
function convertToShares(
440440
uint256 _baseAmount
441441
) external view returns (uint256) {
442-
return _convertToShares(_baseAmount);
442+
_revert(abi.encode(_convertToShares(_baseAmount)));
443443
}
444444

445445
/// @notice Gets an account's balance of a sub-token.

‎deployments.json‎

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -509,133 +509,133 @@
509509
},
510510
"ElementDAO ezETH Hyperdrive Deployer Coordinator_EzETHHyperdriveCoreDeployer": {
511511
"contract": "EzETHHyperdriveCoreDeployer",
512-
"address": "0xbaa863b62c69993143b013fe7b8af278fd52f76b",
513-
"timestamp": "2024-07-15T21:27:04.164Z"
512+
"address": "0x82629da7b2c14933982e5de9ff97f505ff98a1f3",
513+
"timestamp": "2024-07-16T23:33:52.996Z"
514514
},
515515
"ElementDAO ezETH Hyperdrive Deployer Coordinator_EzETHTarget0Deployer": {
516516
"contract": "EzETHTarget0Deployer",
517-
"address": "0x68ba944d89d7481f3a9d73dcb75b7e6c7db5562b",
518-
"timestamp": "2024-07-15T21:27:16.212Z"
517+
"address": "0xe841b3f7864ba9d13726aa2ee2027a2e0e486b55",
518+
"timestamp": "2024-07-16T23:34:02.482Z"
519519
},
520520
"ElementDAO ezETH Hyperdrive Deployer Coordinator_EzETHTarget1Deployer": {
521521
"contract": "EzETHTarget1Deployer",
522-
"address": "0xb7c320cef81f0f9abb726590ef5105f551816d76",
523-
"timestamp": "2024-07-15T21:27:31.131Z"
522+
"address": "0xc81b84995414bdc462da45b9a16e3f71e1ed860d",
523+
"timestamp": "2024-07-16T23:34:17.370Z"
524524
},
525525
"ElementDAO ezETH Hyperdrive Deployer Coordinator_EzETHTarget2Deployer": {
526526
"contract": "EzETHTarget2Deployer",
527-
"address": "0x8d6d5d48f881bcccd6c09256724692b3a971b87b",
528-
"timestamp": "2024-07-15T21:27:40.077Z"
527+
"address": "0xfc91a2083ba5067165d5ecd632465a8b514b2b9c",
528+
"timestamp": "2024-07-16T23:34:27.879Z"
529529
},
530530
"ElementDAO ezETH Hyperdrive Deployer Coordinator_EzETHTarget3Deployer": {
531531
"contract": "EzETHTarget3Deployer",
532-
"address": "0xe670f140dedcdf142e15ce198e1a99fecd67d21c",
533-
"timestamp": "2024-07-15T21:27:52.397Z"
532+
"address": "0xc0dc10957777ba5aaeec5d1df351a5bea64f0fb3",
533+
"timestamp": "2024-07-16T23:34:39.873Z"
534534
},
535535
"ElementDAO ezETH Hyperdrive Deployer Coordinator_EzETHTarget4Deployer": {
536536
"contract": "EzETHTarget4Deployer",
537-
"address": "0xb8bd93848aa71887e447642299b1f2a5cf898a9b",
538-
"timestamp": "2024-07-15T21:28:03.822Z"
537+
"address": "0x6940c108b1bee27600e8bb46d9710b46f60ff3ac",
538+
"timestamp": "2024-07-16T23:34:54.710Z"
539539
},
540540
"ElementDAO ezETH Hyperdrive Deployer Coordinator": {
541541
"contract": "EzETHHyperdriveDeployerCoordinator",
542-
"address": "0xf74085c4404fd08e7d636f151b734a580f44100f",
543-
"timestamp": "2024-07-15T21:28:15.251Z"
542+
"address": "0x95b379ad131412e702cc6c9a52bcaaf07785349b",
543+
"timestamp": "2024-07-16T23:35:02.894Z"
544544
},
545545
"ElementDAO rETH Hyperdrive Deployer Coordinator_RETHHyperdriveCoreDeployer": {
546546
"contract": "RETHHyperdriveCoreDeployer",
547-
"address": "0xea21fbc9eb872c025959d82383bc898540334484",
548-
"timestamp": "2024-07-15T21:28:40.644Z"
547+
"address": "0x3df8476a3fdf2636dcf47b1e066f7691f9ef931d",
548+
"timestamp": "2024-07-16T23:35:25.821Z"
549549
},
550550
"ElementDAO rETH Hyperdrive Deployer Coordinator_RETHTarget0Deployer": {
551551
"contract": "RETHTarget0Deployer",
552-
"address": "0x02d668b32fc23f223464f3daf9df6e518cf1e9ee",
553-
"timestamp": "2024-07-15T21:28:51.918Z"
552+
"address": "0xfd892a8581184288f32d71238c95fb95b6fdb5de",
553+
"timestamp": "2024-07-16T23:35:40.603Z"
554554
},
555555
"ElementDAO rETH Hyperdrive Deployer Coordinator_RETHTarget1Deployer": {
556556
"contract": "RETHTarget1Deployer",
557-
"address": "0x7d78ee16d314f14e01e222ee6dd839689bd294ca",
558-
"timestamp": "2024-07-15T21:29:02.895Z"
557+
"address": "0x5718e9228e4582076fc514ba329203518e4824ef",
558+
"timestamp": "2024-07-16T23:35:55.587Z"
559559
},
560560
"ElementDAO rETH Hyperdrive Deployer Coordinator_RETHTarget2Deployer": {
561561
"contract": "RETHTarget2Deployer",
562-
"address": "0xc6fe0b1a0d145c67ec87bffc1536a7b5da727662",
563-
"timestamp": "2024-07-15T21:29:15.773Z"
562+
"address": "0x8c6603500d8dfd110283db082e329d2165005aa7",
563+
"timestamp": "2024-07-16T23:38:03.247Z"
564564
},
565565
"ElementDAO rETH Hyperdrive Deployer Coordinator_RETHTarget3Deployer": {
566566
"contract": "RETHTarget3Deployer",
567-
"address": "0xe8307bcb57ea61981ad8c9da7931116863e5f4ab",
568-
"timestamp": "2024-07-15T21:29:28.956Z"
567+
"address": "0xd259875f89ca9db95974d06a6cd6d92195278bee",
568+
"timestamp": "2024-07-16T23:38:18.066Z"
569569
},
570570
"ElementDAO rETH Hyperdrive Deployer Coordinator_RETHTarget4Deployer": {
571571
"contract": "RETHTarget4Deployer",
572-
"address": "0x9a2f15a6941d13719abae15c03dde580098c1fbd",
573-
"timestamp": "2024-07-15T21:29:38.468Z"
572+
"address": "0xa62de3ff524502e3ac3d3bca4fea32defa3c37b0",
573+
"timestamp": "2024-07-16T23:38:26.310Z"
574574
},
575575
"ElementDAO rETH Hyperdrive Deployer Coordinator": {
576576
"contract": "RETHHyperdriveDeployerCoordinator",
577-
"address": "0xac0e15075afeb2e130ac2cac24cbafdc236cdd1e",
578-
"timestamp": "2024-07-15T21:29:51.448Z"
577+
"address": "0x6027d51985cf01f5df8fb2bb56ea0e69a487ff2e",
578+
"timestamp": "2024-07-16T23:38:41.134Z"
579579
},
580580
"ElementDAO 182 Day ezETH Hyperdrive_EzETHTarget0": {
581581
"contract": "EzETHTarget0",
582-
"address": "0x5fB355EFDb7d62C81AB17E77FBee5514946A8AB2",
583-
"timestamp": "2024-07-15T21:35:04.561Z"
582+
"address": "0x0E8d8c4ae326084cc9ddaCC2e65F28B31089bE2d",
583+
"timestamp": "2024-07-16T23:40:14.926Z"
584584
},
585585
"ElementDAO 182 Day ezETH Hyperdrive_EzETHTarget1": {
586586
"contract": "EzETHTarget1",
587-
"address": "0x180031Bc954729846227DdD4D5768dAF92A0ca63",
588-
"timestamp": "2024-07-15T21:34:20.055Z"
587+
"address": "0xE0d88c12FBdE02bF2675eB27Da2aFE68E16A74D6",
588+
"timestamp": "2024-07-16T23:39:28.278Z"
589589
},
590590
"ElementDAO 182 Day ezETH Hyperdrive_EzETHTarget2": {
591591
"contract": "EzETHTarget2",
592-
"address": "0xB2B0e423e714f07716D73d300eA1710933e1b89f",
593-
"timestamp": "2024-07-15T21:34:28.492Z"
592+
"address": "0xf129352F6A592becE51122bD5c2d087f286cD1Ec",
593+
"timestamp": "2024-07-16T23:39:43.374Z"
594594
},
595595
"ElementDAO 182 Day ezETH Hyperdrive_EzETHTarget3": {
596596
"contract": "EzETHTarget3",
597-
"address": "0x48FB89CE982e8B2fa7441d0D41A9a02aAE32Bfca",
598-
"timestamp": "2024-07-15T21:34:44.646Z"
597+
"address": "0x0B854187370C558682dd56D97d3114ef8bcEE719",
598+
"timestamp": "2024-07-16T23:39:51.670Z"
599599
},
600600
"ElementDAO 182 Day ezETH Hyperdrive_EzETHTarget4": {
601601
"contract": "EzETHTarget4",
602-
"address": "0x98944608ed92b9a21D8C3bCADFf46760b297112B",
603-
"timestamp": "2024-07-15T21:34:49.430Z"
602+
"address": "0xA74b93bB431F159fa3e2b624abB8Eaf0a2FBba56",
603+
"timestamp": "2024-07-16T23:40:06.503Z"
604604
},
605605
"ElementDAO 182 Day ezETH Hyperdrive": {
606606
"contract": "EzETHHyperdrive",
607-
"address": "0x4b5ad00f6868295840f38e9e146233F14BD81342",
608-
"timestamp": "2024-07-15T21:35:04.409Z"
607+
"address": "0x4c3054e51b46BE3191be9A05e73D73F1a2147854",
608+
"timestamp": "2024-07-16T23:40:14.792Z"
609609
},
610610
"ElementDAO 182 Day rETH Hyperdrive_RETHTarget0": {
611611
"contract": "RETHTarget0",
612-
"address": "0xA6769BD1C44d158bd89535A4dE1F8c93408AcF5d",
613-
"timestamp": "2024-07-15T21:36:30.817Z"
612+
"address": "0x463Ba5f41413b5F318fbf6256c8Aa78E5d382455",
613+
"timestamp": "2024-07-16T23:41:53.903Z"
614614
},
615615
"ElementDAO 182 Day rETH Hyperdrive_RETHTarget1": {
616616
"contract": "RETHTarget1",
617-
"address": "0x3e86cD9Ec3dD09BF7d1c42AC8ACf1833b3C0825b",
618-
"timestamp": "2024-07-15T21:35:43.385Z"
617+
"address": "0x1dCAcD117101161D4BeB63F61443Fa03059aE9dC",
618+
"timestamp": "2024-07-16T23:41:07.293Z"
619619
},
620620
"ElementDAO 182 Day rETH Hyperdrive_RETHTarget2": {
621621
"contract": "RETHTarget2",
622-
"address": "0xB005fA01E3Fec5B12f555388A03e6CAFcd8F4Ab7",
623-
"timestamp": "2024-07-15T21:35:51.916Z"
622+
"address": "0xB83c81797c7036479fe1beBafEFF1a7490126AF0",
623+
"timestamp": "2024-07-16T23:41:15.618Z"
624624
},
625625
"ElementDAO 182 Day rETH Hyperdrive_RETHTarget3": {
626626
"contract": "RETHTarget3",
627-
"address": "0x7aA82daC89C01Bd2f7420703125D3142885af5a5",
628-
"timestamp": "2024-07-15T21:36:07.125Z"
627+
"address": "0x93ed390C959b561E98A2343A74BCcd7a77Ae5dC8",
628+
"timestamp": "2024-07-16T23:41:30.411Z"
629629
},
630630
"ElementDAO 182 Day rETH Hyperdrive_RETHTarget4": {
631631
"contract": "RETHTarget4",
632-
"address": "0xC86B4a6fA9b2BE0295C03E0c3a89c7DFbDcb6542",
633-
"timestamp": "2024-07-15T21:36:15.646Z"
632+
"address": "0x00A3093d7F16c8CD58bB0bdC9F998b8389182B4F",
633+
"timestamp": "2024-07-16T23:41:38.657Z"
634634
},
635635
"ElementDAO 182 Day rETH Hyperdrive": {
636636
"contract": "RETHHyperdrive",
637-
"address": "0x0eC94959365f682dD6d9fD382C421D4Ef7F9d998",
638-
"timestamp": "2024-07-15T21:36:30.678Z"
637+
"address": "0xca5dB9Bb25D09A9bF3b22360Be3763b5f2d13589",
638+
"timestamp": "2024-07-16T23:41:53.768Z"
639639
}
640640
}
641-
}
641+
}

‎tasks/deploy/verify.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ task(
240240
await ihyperdrive.read.target1(),
241241
await ihyperdrive.read.target2(),
242242
await ihyperdrive.read.target3(),
243+
await ihyperdrive.read.target4(),
243244
];
244245
console.log("args", ...args.slice(1));
245246
console.log("targets", ...targets);

‎tasks/factory/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./remove-coordinator";
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import { task } from "hardhat/config";
2+
import { Address } from "viem";
3+
import {
4+
HyperdriveDeployNamedTask,
5+
HyperdriveDeployNamedTaskParams,
6+
} from "../deploy";
7+
8+
HyperdriveDeployNamedTask(
9+
task(
10+
"factory:remove-coordinator",
11+
"adds the specified hyperdrive instance to the registry",
12+
),
13+
).setAction(
14+
async (
15+
{ name }: Required<HyperdriveDeployNamedTaskParams>,
16+
{ viem, hyperdriveDeploy: { deployments }, network },
17+
) => {
18+
// Get the factory contract.
19+
let deployment = deployments.byName(name);
20+
if (!deployment.contract.endsWith("HyperdriveDeployerCoordinator"))
21+
throw new Error("not a hyperdrive deployer coordinator");
22+
console.log(
23+
`removing ${name} ${deployment.contract} at ${deployment.address} from the factory ...`,
24+
);
25+
let factoryAddress = deployments.byName("ElementDAO Hyperdrive Factory")
26+
.address as Address;
27+
const factoryContract = await viem.getContractAt(
28+
"IHyperdriveFactory",
29+
factoryAddress,
30+
);
31+
32+
// Find the index of the deployer coordinator to remove.
33+
const coordinators =
34+
await factoryContract.read.getDeployerCoordinatorsInRange([
35+
0n,
36+
await factoryContract.read.getNumberOfDeployerCoordinators(),
37+
]);
38+
const index = coordinators.findIndex(
39+
(c) => c.toLowerCase() === deployment.address.toLowerCase(),
40+
);
41+
42+
// Remove the deployer coordinator.
43+
let tx = await factoryContract.write.removeDeployerCoordinator([
44+
deployment.address as Address,
45+
BigInt(index),
46+
]);
47+
let pc = await viem.getPublicClient();
48+
await pc.waitForTransactionReceipt({ hash: tx });
49+
},
50+
);

‎tasks/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export * from "./deploy";
2+
export * from "./factory";
23
export * from "./fork";
34
export * from "./market-state";
45
export * from "./registry";

0 commit comments

Comments
 (0)