File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -619,6 +619,29 @@ contract StakeRegistryUnitTests_Config is StakeRegistryUnitTests {
619619 }
620620 event StakeTypeSet (StakeType newStakeType );
621621
622+ function test_initializeDelegatedStakeQuorum () public {
623+ uint8 quorumNumber = nextQuorum;
624+ uint96 minimumStake = 0 ;
625+ IStakeRegistry.StrategyParams[] memory strategyParams =
626+ new IStakeRegistry.StrategyParams [](1 );
627+ strategyParams[0 ] = IStakeRegistry.StrategyParams (
628+ IStrategy (address (uint160 (uint256 (keccak256 (abi.encodePacked (quorumNumber)))))),
629+ uint96 (WEIGHTING_DIVISOR)
630+ );
631+
632+ cheats.prank (address (registryCoordinator));
633+ cheats.expectEmit (true , true , true , true );
634+ emit StakeTypeSet (StakeType.TOTAL_DELEGATED);
635+ stakeRegistry.initializeDelegatedStakeQuorum (
636+ quorumNumber,
637+ minimumStake,
638+ strategyParams
639+ );
640+
641+ StakeType stakeType = stakeRegistry.stakeTypePerQuorum (quorumNumber);
642+ assertEq (uint8 (stakeType), uint8 (StakeType.TOTAL_DELEGATED), "invalid stake type " );
643+ }
644+
622645 function test_initializeSlashableStakeQuorum () public {
623646 uint8 quorumNumber = nextQuorum;
624647 uint96 minimumStake = 0 ;
You can’t perform that action at this time.
0 commit comments