Skip to content

Commit efbbf60

Browse files
committed
chore: update certain parts
1 parent 7ba5c65 commit efbbf60

File tree

3 files changed

+17
-20
lines changed

3 files changed

+17
-20
lines changed

src/contracts/core/DelegationManager.sol

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ contract DelegationManager is
9696
function registerAsOperator(
9797
address initDelegationApprover,
9898
uint32 allocationDelay,
99-
string memory metadataURI
99+
string calldata metadataURI
100100
) external nonReentrant {
101101
require(!isDelegated(msg.sender), ActivelyDelegated());
102102

@@ -120,7 +120,7 @@ contract DelegationManager is
120120
}
121121

122122
/// @inheritdoc IDelegationManager
123-
function updateOperatorMetadataURI(address operator, string memory metadataURI) external checkCanCall(operator) {
123+
function updateOperatorMetadataURI(address operator, string calldata metadataURI) external checkCanCall(operator) {
124124
require(isOperator(operator), OperatorNotRegistered());
125125
emit OperatorMetadataURIUpdated(operator, metadataURI);
126126
}
@@ -179,7 +179,7 @@ contract DelegationManager is
179179

180180
/// @inheritdoc IDelegationManager
181181
function queueWithdrawals(
182-
QueuedWithdrawalParams[] memory params
182+
QueuedWithdrawalParams[] calldata params
183183
) external onlyWhenNotPaused(PAUSED_ENTER_WITHDRAWAL_QUEUE) nonReentrant returns (bytes32[] memory) {
184184
bytes32[] memory withdrawalRoots = new bytes32[](params.length);
185185
address operator = delegatedTo[msg.sender];
@@ -207,18 +207,18 @@ contract DelegationManager is
207207

208208
/// @inheritdoc IDelegationManager
209209
function completeQueuedWithdrawal(
210-
Withdrawal memory withdrawal,
211-
IERC20[] memory tokens,
210+
Withdrawal calldata withdrawal,
211+
IERC20[] calldata tokens,
212212
bool receiveAsTokens
213213
) external onlyWhenNotPaused(PAUSED_EXIT_WITHDRAWAL_QUEUE) nonReentrant {
214214
_completeQueuedWithdrawal(withdrawal, tokens, receiveAsTokens);
215215
}
216216

217217
/// @inheritdoc IDelegationManager
218218
function completeQueuedWithdrawals(
219-
Withdrawal[] memory withdrawals,
220-
IERC20[][] memory tokens,
221-
bool[] memory receiveAsTokens
219+
Withdrawal[] calldata withdrawals,
220+
IERC20[][] calldata tokens,
221+
bool[] calldata receiveAsTokens
222222
) external onlyWhenNotPaused(PAUSED_EXIT_WITHDRAWAL_QUEUE) nonReentrant {
223223
uint256 n = withdrawals.length;
224224
for (uint256 i; i < n; ++i) {
@@ -529,7 +529,7 @@ contract DelegationManager is
529529

530530
pendingWithdrawals[withdrawalRoot] = true;
531531
_queuedWithdrawals[withdrawalRoot] = withdrawal;
532-
_stakerQueuedWithdrawalRoots[withdrawal.staker].add(withdrawalRoot);
532+
_stakerQueuedWithdrawalRoots[staker].add(withdrawalRoot);
533533

534534
emit SlashingWithdrawalQueued(withdrawalRoot, withdrawal, withdrawableShares);
535535
return withdrawalRoot;
@@ -546,7 +546,7 @@ contract DelegationManager is
546546
*/
547547
function _completeQueuedWithdrawal(
548548
Withdrawal memory withdrawal,
549-
IERC20[] memory tokens,
549+
IERC20[] calldata tokens,
550550
bool receiveAsTokens
551551
) internal {
552552
require(tokens.length == withdrawal.strategies.length, InputArrayLengthMismatch());
@@ -688,7 +688,7 @@ contract DelegationManager is
688688
}
689689

690690
/// @dev If `operator` has configured a `delegationApprover`, check that `signature` and `salt`
691-
/// are a valid appfroval for `staker` delegating to `operator`.
691+
/// are a valid approval for `staker` delegating to `operator`.
692692
function _checkApproverSignature(
693693
address staker,
694694
address operator,
@@ -1063,4 +1063,4 @@ contract DelegationManager is
10631063
)
10641064
);
10651065
}
1066-
}
1066+
}

src/contracts/interfaces/IDelegationManager.sol

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,6 @@ interface IDelegationManagerEvents is IDelegationManagerTypes {
174174

175175
/// @notice Emitted whenever an operator's shares are slashed for a given strategy
176176
event OperatorSharesSlashed(address indexed operator, IStrategy strategy, uint256 totalSlashedShares);
177-
178-
/// @notice Emitted when a redistribution is queued
179-
event RedistributionQueued(bytes32 withdrawalRoot, Withdrawal withdrawal);
180177
}
181178

182179
/**
@@ -570,4 +567,4 @@ interface IDelegationManager is ISignatureUtilsMixin, IDelegationManagerErrors,
570567

571568
/// @notice The EIP-712 typehash for the DelegationApproval struct used by the contract
572569
function DELEGATION_APPROVAL_TYPEHASH() external view returns (bytes32);
573-
}
570+
}

src/test/unit/StrategyManagerUnit.t.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,9 +1336,9 @@ contract StrategyManagerUnitTests_clearBurnOrRedistributableShares is StrategyMa
13361336
emit BurnOrRedistributableSharesIncreased(defaultOperatorSet, defaultSlashId, strategy, sharesToRemove);
13371337
strategyManager.increaseBurnOrRedistributableShares(defaultOperatorSet, defaultSlashId, strategy, sharesToRemove);
13381338

1339-
// // Now set token to be contract that reverts simulating an upgrade
1340-
// cheats.etch(address(token), address(revertToken).code);
1341-
// ERC20_SetTransferReverting_Mock(address(token)).setTransfersRevert(true);
1339+
// Now set token to be contract that reverts simulating an upgrade
1340+
cheats.etch(address(token), address(revertToken).code);
1341+
ERC20_SetTransferReverting_Mock(address(token)).setTransfersRevert(true);
13421342

13431343
cheats.expectRevert("SafeERC20: low-level call failed");
13441344
cheats.prank(address(delegationManagerMock));
@@ -1509,4 +1509,4 @@ contract StrategyManagerUnitTests_removeStrategiesFromDepositWhitelist is Strate
15091509
}
15101510
}
15111511
}
1512-
}
1512+
}

0 commit comments

Comments
 (0)