Skip to content

Commit 252ce51

Browse files
committed
chore: redundant comments
1 parent 048d397 commit 252ce51

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

test/unit/InstantSlasher.t.sol

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,16 @@ contract InstantSlasherTest is Test {
3131
mockStrategy = IStrategy(address(0x5));
3232
slashingRegistryCoordinator = address(0x6);
3333

34-
// Deploy proxy admin
3534
vm.startPrank(proxyAdminOwner);
3635
proxyAdmin = new ProxyAdmin();
3736
emptyContract = new EmptyContract();
3837

39-
// Deploy instant slasher behind proxy
4038
instantSlasher = InstantSlasher(
4139
address(
4240
new TransparentUpgradeableProxy(address(emptyContract), address(proxyAdmin), "")
4341
)
4442
);
4543

46-
// Deploy implementation and upgrade
4744
instantSlasherImplementation = new InstantSlasher(
4845
IAllocationManager(allocationManager),
4946
ISlashingRegistryCoordinator(slashingRegistryCoordinator),
@@ -56,7 +53,6 @@ contract InstantSlasherTest is Test {
5653
);
5754
vm.stopPrank();
5855

59-
// Initialize
6056
instantSlasher.initialize(slasher);
6157
}
6258

test/unit/VetoableSlasher.t.sol

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,16 @@ contract VetoableSlasherTest is Test {
3535
mockStrategy = IStrategy(address(0x5));
3636
slashingRegistryCoordinator = address(0x6);
3737

38-
// Deploy proxy admin
3938
vm.startPrank(proxyAdminOwner);
4039
proxyAdmin = new ProxyAdmin();
4140
emptyContract = new EmptyContract();
4241

43-
// Deploy vetoable slasher behind proxy
4442
vetoableSlasher = VetoableSlasher(
4543
address(
4644
new TransparentUpgradeableProxy(address(emptyContract), address(proxyAdmin), "")
4745
)
4846
);
4947

50-
// Deploy implementation and upgrade
5148
vetoableSlasherImplementation = new VetoableSlasher(
5249
IAllocationManager(allocationManager),
5350
ISlashingRegistryCoordinator(slashingRegistryCoordinator)
@@ -59,7 +56,6 @@ contract VetoableSlasherTest is Test {
5956
);
6057
vm.stopPrank();
6158

62-
// Initialize
6359
vetoableSlasher.initialize(vetoCommittee, slasher);
6460
}
6561

@@ -96,7 +92,6 @@ contract VetoableSlasherTest is Test {
9692
vm.prank(slasher);
9793
vetoableSlasher.queueSlashingRequest(params);
9894

99-
// Get the request from storage and verify
10095
(IAllocationManagerTypes.SlashingParams memory resultParams, uint256 requestTimestamp, ISlasherTypes.SlashingStatus status) = vetoableSlasher.slashingRequests(0);
10196
ISlasherTypes.SlashingRequest memory request = ISlasherTypes.SlashingRequest(params, requestTimestamp, status);
10297
assertEq(resultParams.operator, operator);
@@ -108,57 +103,47 @@ contract VetoableSlasherTest is Test {
108103
}
109104

110105
function test_cancelSlashingRequest_revert_notVetoCommittee() public {
111-
// First queue a request
112106
IAllocationManagerTypes.SlashingParams memory params = _createMockSlashingParams();
113107

114108
vm.prank(slasher);
115109
vetoableSlasher.queueSlashingRequest(params);
116110

117-
// Try to cancel from non-veto committee
118111
vm.expectRevert(ISlasherErrors.OnlyVetoCommittee.selector);
119112
vetoableSlasher.cancelSlashingRequest(0);
120113
}
121114

122115
function test_cancelSlashingRequest_revert_afterVetoPeriod() public {
123-
// First queue a request
124116
IAllocationManagerTypes.SlashingParams memory params = _createMockSlashingParams();
125117

126118
vm.prank(slasher);
127119
vetoableSlasher.queueSlashingRequest(params);
128120

129-
// Move time past veto period
130121
vm.warp(block.timestamp + VETO_PERIOD + 1);
131122

132-
// Try to cancel
133123
vm.prank(vetoCommittee);
134124
vm.expectRevert(ISlasherErrors.VetoPeriodPassed.selector);
135125
vetoableSlasher.cancelSlashingRequest(0);
136126
}
137127

138128
function test_cancelSlashingRequest() public {
139-
// First queue a request
140129
IAllocationManagerTypes.SlashingParams memory params = _createMockSlashingParams();
141130

142131
vm.prank(slasher);
143132
vetoableSlasher.queueSlashingRequest(params);
144133

145-
// Cancel within veto period
146134
vm.prank(vetoCommittee);
147135
vetoableSlasher.cancelSlashingRequest(0);
148136

149-
// Verify request is cancelled
150137
(IAllocationManagerTypes.SlashingParams memory resultParams, uint256 requestTimestamp, ISlasherTypes.SlashingStatus status) = vetoableSlasher.slashingRequests(0);
151138
assertEq(uint8(status), uint8(ISlasherTypes.SlashingStatus.Cancelled));
152139
}
153140

154141
function test_fulfillSlashingRequest_revert_beforeVetoPeriod() public {
155-
// First queue a request
156142
IAllocationManagerTypes.SlashingParams memory params = _createMockSlashingParams();
157143

158144
vm.prank(slasher);
159145
vetoableSlasher.queueSlashingRequest(params);
160146

161-
// Try to fulfill before veto period
162147
vm.prank(slasher);
163148
vm.expectRevert(ISlasherErrors.VetoPeriodNotPassed.selector);
164149
vetoableSlasher.fulfillSlashingRequest(0);

0 commit comments

Comments
 (0)