Skip to content

Commit

Permalink
chore: additional registration checks
Browse files Browse the repository at this point in the history
  • Loading branch information
8sunyuan committed Feb 18, 2025
1 parent d5396c1 commit 1dce4ed
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion script/releases/v1.1.1-slashing/3-execute.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,17 @@ contract Execute is Queue {
IAllocationManagerTypes.RegisterParams memory registerParams =
IAllocationManagerTypes.RegisterParams({avs: avs, operatorSetIds: operatorSetIds, data: emptyData});
allocationManager.registerForOperatorSets(operator, registerParams);
// check that the operator is registered to the OpSet
OperatorSet memory operatorSet = OperatorSet(avs, 0);
assertTrue(allocationManager.isMemberOfOperatorSet(operator, operatorSet), "operator not registered to OpSet");

// deregister operator from OpSet
IAllocationManagerTypes.DeregisterParams memory deregisterParams =
IAllocationManagerTypes.DeregisterParams({operator: operator, avs: avs, operatorSetIds: operatorSetIds});
allocationManager.deregisterFromOperatorSets(deregisterParams);

// check that the operator is not registered to the OpSet
assertFalse(allocationManager.isMemberOfOperatorSet(operator, operatorSet), "operator still registered to OpSet");

vm.stopPrank();
}
}

0 comments on commit 1dce4ed

Please sign in to comment.