@@ -320,12 +320,7 @@ impl TestChain {
320320 let hyperdrive = IERC4626Hyperdrive :: new ( addresses. hyperdrive , client. clone ( ) ) ;
321321
322322 // Get the contract addresses of the vault and the data provider.
323- //
324- // HACK(jalextowle): This getter is new, so we hardcode the address
325- // to the competition's data provider until the v0.0.17 release.
326- // let data_provider_address = hyperdrive.data_provider().call().await?;
327- let data_provider_address =
328- "0x9bd03768a7DCc129555dE410FF8E85528A4F88b5" . parse :: < Address > ( ) ?;
323+ let data_provider_address = hyperdrive. data_provider ( ) . call ( ) . await ?;
329324 let vault_address = hyperdrive. pool ( ) . call ( ) . await ?;
330325
331326 // Deploy templates for each of the contracts that should be etched and
@@ -336,31 +331,36 @@ impl TestChain {
336331 let etch_pairs = {
337332 let mut pairs = Vec :: new ( ) ;
338333
339- // TODO: We should set `isCompetitionMode` to the real value.
340- //
341334 // Deploy the base token template.
342335 let base = ERC20Mintable :: new ( addresses. base , client. clone ( ) ) ;
343336 let name = base. name ( ) . call ( ) . await ?;
344337 let symbol = base. symbol ( ) . call ( ) . await ?;
345338 let decimals = base. decimals ( ) . call ( ) . await ?;
339+ let is_competition_mode = base. is_competition_mode ( ) . call ( ) . await ?;
346340 let base_template = ERC20Mintable :: deploy (
347341 client. clone ( ) ,
348- ( name, symbol, decimals, Address :: zero ( ) , false ) ,
342+ ( name, symbol, decimals, Address :: zero ( ) , is_competition_mode ) ,
349343 ) ?
350344 . send ( )
351345 . await ?;
352346 pairs. push ( ( addresses. base , base_template. address ( ) ) ) ;
353347
354- // TODO: We should set `isCompetitionMode` to the real value.
355- //
356348 // Deploy the vault template.
357349 let vault = MockERC4626 :: new ( vault_address, client. clone ( ) ) ;
358350 let asset = vault. asset ( ) . call ( ) . await ?;
359351 let name = vault. name ( ) . call ( ) . await ?;
360352 let symbol = vault. symbol ( ) . call ( ) . await ?;
353+ let is_competition_mode = vault. is_competition_mode ( ) . call ( ) . await ?;
361354 let vault_template = MockERC4626 :: deploy (
362355 client. clone ( ) ,
363- ( asset, name, symbol, uint256 ! ( 0 ) , Address :: zero ( ) , false ) ,
356+ (
357+ asset,
358+ name,
359+ symbol,
360+ uint256 ! ( 0 ) ,
361+ Address :: zero ( ) ,
362+ is_competition_mode,
363+ ) ,
364364 ) ?
365365 . send ( )
366366 . await ?;
0 commit comments