11// SPDX-License-Identifier: Apache-2.0
22pragma solidity 0.8.20 ;
33
4+ // FIXME
5+ import { console2 as console } from "forge-std/console2.sol " ;
6+
47import { Test } from "forge-std/Test.sol " ;
58import { ERC4626Hyperdrive } from "contracts/src/instances/erc4626/ERC4626Hyperdrive.sol " ;
69import { ERC4626Target0 } from "contracts/src/instances/erc4626/ERC4626Target0.sol " ;
@@ -53,24 +56,25 @@ contract EtchingUtils is Test {
5356 // Ensure that the contract's version matches.
5457 IHyperdrive hyperdrive = IHyperdrive (_hyperdrive);
5558 string memory version = hyperdrive.version ();
56- if (! hyperdrive.version ().eq (VERSION)) {
57- revert (
58- vm.replace (
59- vm.replace (
60- "EtchingUtils: The checked-out version is %0 but the target version is %1. Consider checking out the target version " ,
61- "%0 " ,
62- VERSION
63- ),
64- "%1 " ,
65- version
66- )
67- );
68- }
59+ // if (!hyperdrive.version().eq(VERSION)) {
60+ // revert(
61+ // vm.replace(
62+ // vm.replace(
63+ // "EtchingUtils: The checked-out version is %0 but the target version is %1. Consider checking out the target version",
64+ // "%0",
65+ // VERSION
66+ // ),
67+ // "%1",
68+ // version
69+ // )
70+ // );
71+ // }
6972
7073 // Using the name, decide which type of Hyperdrive instance needs to
7174 // be etched.
7275 string memory kind = hyperdrive.kind ();
7376 if (kind.eq (ERC4626_HYPERDRIVE_KIND )) {
77+ console.log ("erc4626 vault " );
7478 etchERC4626Hyperdrive (_hyperdrive);
7579 } else if (kind.eq (EZETH_HYPERDRIVE_KIND)) {
7680 etchEzETHHyperdrive (_hyperdrive);
@@ -98,44 +102,15 @@ contract EtchingUtils is Test {
98102 // used to load immutables that will be used during the etching process.
99103 IHyperdrive hyperdrive = IHyperdrive (_hyperdrive);
100104
101- // Etch the base contract.
102- {
103- ERC20Mintable target = ERC20Mintable (hyperdrive.baseToken ());
104- ERC20Mintable template = new ERC20Mintable (
105- target.name (),
106- target.symbol (),
107- target.decimals (),
108- address (0 ),
109- target.isCompetitionMode (),
110- target.maxMintAmount ()
111- );
112- vm.etch (address (target), address (template).code);
113- }
114-
115- // TODO: Remove this once we leave testnet.
116- //
117- // Etch the vault contract.
118- {
119- MockERC4626 target = MockERC4626 (hyperdrive.vaultSharesToken ());
120- MockERC4626 template = new MockERC4626 (
121- ERC20Mintable (address (target.asset ())),
122- target.name (),
123- target.symbol (),
124- 0 ,
125- address (0 ),
126- target.isCompetitionMode (),
127- target.maxMintAmount ()
128- );
129- vm.etch (address (target), address (template).code);
130- }
131-
132105 // Etch the target0 contract.
106+ console.log ("etchERC4626Hyperdrive: 1 " );
133107 {
134108 ERC4626Target0 template = new ERC4626Target0 (
135109 hyperdrive.getPoolConfig ()
136110 );
137111 vm.etch (hyperdrive.target0 (), address (template).code);
138112 }
113+ console.log ("etchERC4626Hyperdrive: 2 " );
139114
140115 // Etch the target1 contract.
141116 {
@@ -144,6 +119,7 @@ contract EtchingUtils is Test {
144119 );
145120 vm.etch (hyperdrive.target1 (), address (template).code);
146121 }
122+ console.log ("etchERC4626Hyperdrive: 3 " );
147123
148124 // Etch the target2 contract.
149125 {
@@ -152,6 +128,7 @@ contract EtchingUtils is Test {
152128 );
153129 vm.etch (hyperdrive.target2 (), address (template).code);
154130 }
131+ console.log ("etchERC4626Hyperdrive: 4 " );
155132
156133 // Etch the target3 contract.
157134 {
@@ -160,6 +137,7 @@ contract EtchingUtils is Test {
160137 );
161138 vm.etch (hyperdrive.target3 (), address (template).code);
162139 }
140+ console.log ("etchERC4626Hyperdrive: 5 " );
163141
164142 // Etch the hyperdrive contract.
165143 {
@@ -175,6 +153,7 @@ contract EtchingUtils is Test {
175153 );
176154 vm.etch (address (hyperdrive), address (template).code);
177155 }
156+ console.log ("etchERC4626Hyperdrive: 6 " );
178157 }
179158
180159 function etchEzETHHyperdrive (address _hyperdrive ) internal {
0 commit comments