Skip to content

Commit e52ae07

Browse files
committed
perf: memory instead of calldata for codesize
1 parent 572b12b commit e52ae07

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/contracts/core/DelegationManager.sol

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ contract DelegationManager is
9393
function registerAsOperator(
9494
address initDelegationApprover,
9595
uint32 allocationDelay,
96-
string calldata metadataURI
96+
string memory metadataURI
9797
) external nonReentrant {
9898
_checkStakerNotDelegated(msg.sender);
9999

@@ -117,7 +117,7 @@ contract DelegationManager is
117117
}
118118

119119
/// @inheritdoc IDelegationManager
120-
function updateOperatorMetadataURI(address operator, string calldata metadataURI) external checkCanCall(operator) {
120+
function updateOperatorMetadataURI(address operator, string memory metadataURI) external checkCanCall(operator) {
121121
_checkOperatorRegistered(operator);
122122
emit OperatorMetadataURIUpdated(operator, metadataURI);
123123
}
@@ -176,7 +176,7 @@ contract DelegationManager is
176176

177177
/// @inheritdoc IDelegationManager
178178
function queueWithdrawals(
179-
QueuedWithdrawalParams[] calldata params
179+
QueuedWithdrawalParams[] memory params
180180
) external onlyWhenNotPaused(PAUSED_ENTER_WITHDRAWAL_QUEUE) nonReentrant returns (bytes32[] memory) {
181181
bytes32[] memory withdrawalRoots = new bytes32[](params.length);
182182
address operator = delegatedTo[msg.sender];
@@ -204,18 +204,18 @@ contract DelegationManager is
204204

205205
/// @inheritdoc IDelegationManager
206206
function completeQueuedWithdrawal(
207-
Withdrawal calldata withdrawal,
208-
IERC20[] calldata tokens,
207+
Withdrawal memory withdrawal,
208+
IERC20[] memory tokens,
209209
bool receiveAsTokens
210210
) external onlyWhenNotPaused(PAUSED_EXIT_WITHDRAWAL_QUEUE) nonReentrant {
211211
_completeQueuedWithdrawal(withdrawal, tokens, receiveAsTokens);
212212
}
213213

214214
/// @inheritdoc IDelegationManager
215215
function completeQueuedWithdrawals(
216-
Withdrawal[] calldata withdrawals,
217-
IERC20[][] calldata tokens,
218-
bool[] calldata receiveAsTokens
216+
Withdrawal[] memory withdrawals,
217+
IERC20[][] memory tokens,
218+
bool[] memory receiveAsTokens
219219
) external onlyWhenNotPaused(PAUSED_EXIT_WITHDRAWAL_QUEUE) nonReentrant {
220220
uint256 n = withdrawals.length;
221221
for (uint256 i; i < n; ++i) {
@@ -280,7 +280,7 @@ contract DelegationManager is
280280
/// @inheritdoc IDelegationManager
281281
function slashOperatorShares(
282282
address operator,
283-
OperatorSet calldata operatorSet,
283+
OperatorSet memory operatorSet,
284284
uint256 slashId,
285285
IStrategy strategy,
286286
uint64 prevMaxMagnitude,
@@ -539,8 +539,8 @@ contract DelegationManager is
539539
* and added back to the operator's delegatedShares.
540540
*/
541541
function _completeQueuedWithdrawal(
542-
Withdrawal calldata withdrawal,
543-
IERC20[] calldata tokens,
542+
Withdrawal memory withdrawal,
543+
IERC20[] memory tokens,
544544
bool receiveAsTokens
545545
) internal {
546546
_checkInputArrayLengths(tokens.length, withdrawal.strategies.length);

0 commit comments

Comments
 (0)