Skip to content

Commit 1dce4ed

Browse files
committed
chore: additional registration checks
1 parent d5396c1 commit 1dce4ed

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

script/releases/v1.1.1-slashing/3-execute.s.sol

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,17 @@ contract Execute is Queue {
140140
IAllocationManagerTypes.RegisterParams memory registerParams =
141141
IAllocationManagerTypes.RegisterParams({avs: avs, operatorSetIds: operatorSetIds, data: emptyData});
142142
allocationManager.registerForOperatorSets(operator, registerParams);
143+
// check that the operator is registered to the OpSet
144+
OperatorSet memory operatorSet = OperatorSet(avs, 0);
145+
assertTrue(allocationManager.isMemberOfOperatorSet(operator, operatorSet), "operator not registered to OpSet");
143146

144147
// deregister operator from OpSet
145148
IAllocationManagerTypes.DeregisterParams memory deregisterParams =
146149
IAllocationManagerTypes.DeregisterParams({operator: operator, avs: avs, operatorSetIds: operatorSetIds});
147150
allocationManager.deregisterFromOperatorSets(deregisterParams);
148-
151+
// check that the operator is not registered to the OpSet
152+
assertFalse(allocationManager.isMemberOfOperatorSet(operator, operatorSet), "operator still registered to OpSet");
153+
149154
vm.stopPrank();
150155
}
151156
}

0 commit comments

Comments
 (0)