@@ -8,22 +8,49 @@ const TARGETS: &[&str] = &[
88 // Interfaces
99 "IERC20" ,
1010 "IERC4626Hyperdrive" ,
11+ "IStETHHyperdrive" ,
1112 "IHyperdrive" ,
13+ "IHyperdriveFactory" ,
1214 // Tokens
1315 "ERC20Mintable" ,
14- // Hyperdrive
16+ "ERC20ForwarderFactory" ,
17+ // Hyperdrive Factory
18+ "HyperdriveFactory" ,
19+ // ERC4626 Hyperdrive
1520 "ERC4626Hyperdrive" ,
21+ "ERC4626HyperdriveCoreDeployer" ,
22+ "ERC4626HyperdriveDeployerCoordinator" ,
1623 "ERC4626Target0" ,
1724 "ERC4626Target1" ,
1825 "ERC4626Target2" ,
1926 "ERC4626Target3" ,
2027 "ERC4626Target4" ,
28+ "ERC4626Target0Deployer" ,
29+ "ERC4626Target1Deployer" ,
30+ "ERC4626Target2Deployer" ,
31+ "ERC4626Target3Deployer" ,
32+ "ERC4626Target4Deployer" ,
33+ // stETH Hyperdrive
34+ "StETHHyperdrive" ,
35+ "StETHHyperdriveDeployerCoordinator" ,
36+ "StETHHyperdriveCoreDeployer" ,
37+ "StETHTarget0" ,
38+ "StETHTarget1" ,
39+ "StETHTarget2" ,
40+ "StETHTarget3" ,
41+ "StETHTarget4" ,
42+ "StETHTarget0Deployer" ,
43+ "StETHTarget1Deployer" ,
44+ "StETHTarget2Deployer" ,
45+ "StETHTarget3Deployer" ,
46+ "StETHTarget4Deployer" ,
2147 // Test Contracts
2248 "ERC20Mintable" ,
2349 "EtchingVault" ,
2450 "MockERC4626" ,
2551 "MockFixedPointMath" ,
2652 "MockHyperdriveMath" ,
53+ "MockLido" ,
2754 "MockLPMath" ,
2855 "MockYieldSpaceMath" ,
2956] ;
@@ -76,12 +103,30 @@ fn main() -> Result<()> {
76103 artifacts. sort_by ( |a, b| a. 1 . cmp ( & b. 1 ) ) ;
77104 artifacts. dedup_by ( |a, b| a. 1 . eq ( & b. 1 ) ) ;
78105 for ( source, name) in artifacts {
106+ let target = name
107+ // Ensure that `StETH` is converted to `steth` in snake case.
108+ . replace ( "StETH" , "STETH" )
109+ // Ensure that `IHyperdrive` is converted to `ihyperdrive` in snake case.
110+ . replace ( "IHyperdrive" , "IHYPERDRIVE" )
111+ . to_snake_case ( ) ;
112+
79113 // Write the generated contract wrapper.
80- let target = name. to_snake_case ( ) ;
81114 let target_file = generated. join ( format ! ( "{}.rs" , target) ) ;
82115 Abigen :: new ( name, source) ?
83116 . add_derive ( "serde::Serialize" ) ?
84117 . add_derive ( "serde::Deserialize" ) ?
118+ // Alias the `IHyperdriveDeployerCoordinator.deploy()` to
119+ // `deploy_hyperdrive()` to avoid conflicts with the builtin
120+ // `deploy()` in the wrapper used to call the constructor.
121+ . add_method_alias ( "deploy(bytes32,(address,address,bytes32,uint256,uint256,uint256,uint256,uint256,address,address,(uint256,uint256,uint256,uint256)),bytes,bytes32)" , "deploy_hyperdrive" )
122+ // Alias the `IHyperdriveCoreDeployer.deploy()` to
123+ // `deploy_hyperdrive()` to avoid conflicts with the builtin
124+ // `deploy()` in the wrapper used to call the constructor.
125+ . add_method_alias ( "deploy((address,address,bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,(uint256,uint256,uint256,uint256)),bytes,address,address,address,address,address,bytes32)" , "deploy_hyperdrive" )
126+ // Alias the `IHyperdriveTarget.deploy()` to `deploy_target()`
127+ // to avoid conflicts with the builtin `deploy()` in the wrapper
128+ // used to call the constructor.
129+ . add_method_alias ( "deploy((address,address,bytes32,uint256,uint256,uint256,uint256,uint256,uint256,address,address,(uint256,uint256,uint256,uint256)),bytes,bytes32)" , "deploy_target" )
85130 . generate ( ) ?
86131 . write_to_file ( target_file) ?;
87132
0 commit comments