@@ -42,7 +42,7 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
4242 ) external initializer {
4343 _transferOwnership (initialOwner);
4444 _setPausedStatus (initialPausedStatus);
45- _setGlobalBurnOrRedistributionDelay (initialGlobalDelayBlocks);
45+ _setGlobalEscrowDelay (initialGlobalDelayBlocks);
4646 }
4747
4848 /**
@@ -72,14 +72,14 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
7272
7373 // Set the start block for the slash ID.
7474 _slashIdToStartBlock[operatorSet.key ()][slashId] = uint32 (block .number );
75- emit StartBurnOrRedistribution (operatorSet, slashId, strategy, uint32 (block .number ));
75+ emit StartEscrow (operatorSet, slashId, strategy, uint32 (block .number ));
7676 }
7777
7878 /// @inheritdoc ISlashEscrowFactory
7979 function releaseSlashEscrow (
8080 OperatorSet calldata operatorSet ,
8181 uint256 slashId
82- ) external virtual onlyWhenNotPaused (PAUSED_BURN_OR_REDISTRIBUTE_SHARES ) {
82+ ) external virtual onlyWhenNotPaused (PAUSED_RELEASE_ESCROW ) {
8383 address redistributionRecipient = allocationManager.getRedistributionRecipient (operatorSet);
8484
8585 // If the redistribution recipient is not the default burn address...
@@ -88,10 +88,10 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
8888 }
8989
9090 // Assert that the slash ID is not paused
91- require (! isBurnOrRedistributionPaused (operatorSet, slashId), IPausable.CurrentlyPaused ());
91+ require (! isEscrowPaused (operatorSet, slashId), IPausable.CurrentlyPaused ());
9292
9393 // Assert that the escrow delay has elapsed
94- require (block .number >= getBurnOrRedistributionCompleteBlock (operatorSet, slashId), EscrowDelayNotElapsed ());
94+ require (block .number >= getEscrowCompleteBlock (operatorSet, slashId), EscrowDelayNotElapsed ());
9595
9696 // Calling `decreaseBurnOrRedistributableShares` will transfer the underlying tokens to the `SlashEscrow`.
9797 // NOTE: While `decreaseBurnOrRedistributableShares` may have already been called, we call it again to ensure that the
@@ -127,17 +127,17 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
127127 */
128128
129129 /// @inheritdoc ISlashEscrowFactory
130- function pauseRedistribution (OperatorSet calldata operatorSet , uint256 slashId ) external virtual onlyPauser {
130+ function pauseEscrow (OperatorSet calldata operatorSet , uint256 slashId ) external virtual onlyPauser {
131131 _checkNewPausedStatus (operatorSet, slashId, true );
132132 _paused[operatorSet.key ()][slashId] = true ;
133- emit RedistributionPaused (operatorSet, slashId);
133+ emit EscrowPaused (operatorSet, slashId);
134134 }
135135
136136 /// @inheritdoc ISlashEscrowFactory
137- function unpauseRedistribution (OperatorSet calldata operatorSet , uint256 slashId ) external virtual onlyUnpauser {
137+ function unpauseEscrow (OperatorSet calldata operatorSet , uint256 slashId ) external virtual onlyUnpauser {
138138 _checkNewPausedStatus (operatorSet, slashId, false );
139139 _paused[operatorSet.key ()][slashId] = false ;
140- emit RedistributionUnpaused (operatorSet, slashId);
140+ emit EscrowUnpaused (operatorSet, slashId);
141141 }
142142
143143 /**
@@ -147,16 +147,16 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
147147 */
148148
149149 /// @inheritdoc ISlashEscrowFactory
150- function setGlobalBurnOrRedistributionDelay (
150+ function setGlobalEscrowDelay (
151151 uint32 delay
152152 ) external onlyOwner {
153- _setGlobalBurnOrRedistributionDelay (delay);
153+ _setGlobalEscrowDelay (delay);
154154 }
155155
156156 /// @inheritdoc ISlashEscrowFactory
157- function setStrategyBurnOrRedistributionDelay (IStrategy strategy , uint32 delay ) external onlyOwner {
158- _strategyBurnOrRedistributionDelayBlocks [address (strategy)] = delay;
159- emit StrategyBurnOrRedistributionDelaySet (strategy, delay);
157+ function setStrategyEscrowDelay (IStrategy strategy , uint32 delay ) external onlyOwner {
158+ _strategyEscrowDelayBlocks [address (strategy)] = delay;
159+ emit StrategyEscrowDelaySet (strategy, delay);
160160 }
161161
162162 /**
@@ -184,7 +184,7 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
184184 address strategy = pendingStrategiesForSlashId.at (i - 1 );
185185
186186 // Burn or redistribute the underlying tokens for the strategy.
187- slashEscrow.burnOrRedistributeUnderlyingTokens (
187+ slashEscrow.releaseTokens (
188188 ISlashEscrowFactory (address (this )),
189189 slashEscrowImplementation,
190190 operatorSet,
@@ -195,7 +195,7 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
195195
196196 // Remove the strategy and underlying amount from the pending burn or redistributions map.
197197 pendingStrategiesForSlashId.remove (strategy);
198- emit BurnOrRedistributionComplete (operatorSet, slashId, IStrategy (strategy), redistributionRecipient);
198+ emit EscrowComplete (operatorSet, slashId, IStrategy (strategy), redistributionRecipient);
199199 }
200200
201201 // Remove the slash ID from the pending slash IDs set.
@@ -210,12 +210,12 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
210210 }
211211 }
212212
213- /// @notice Sets the global burn or redistribution delay.
214- function _setGlobalBurnOrRedistributionDelay (
213+ /// @notice Sets the global escrow delay.
214+ function _setGlobalEscrowDelay (
215215 uint32 delay
216216 ) internal {
217- _globalBurnOrRedistributionDelayBlocks = delay;
218- emit GlobalBurnOrRedistributionDelaySet (delay);
217+ _globalEscrowDelayBlocks = delay;
218+ emit GlobalEscrowDelaySet (delay);
219219 }
220220
221221 /// @notice Checks that the new paused status is not the same as the current paused status.
@@ -300,7 +300,7 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
300300 // For each slashId, get the complete block.
301301 completeBlocks[i] = new uint32 [](slashIds[i].length );
302302 for (uint256 j = 0 ; j < slashIds[i].length ; j++ ) {
303- completeBlocks[i][j] = getBurnOrRedistributionCompleteBlock (operatorSets[i], slashIds[i][j]);
303+ completeBlocks[i][j] = getEscrowCompleteBlock (operatorSets[i], slashIds[i][j]);
304304 }
305305 }
306306 }
@@ -362,55 +362,46 @@ contract SlashEscrowFactory is Initializable, SlashEscrowFactoryStorage, Ownable
362362 }
363363
364364 /// @inheritdoc ISlashEscrowFactory
365- function isBurnOrRedistributionPaused (
366- OperatorSet calldata operatorSet ,
367- uint256 slashId
368- ) public view returns (bool ) {
365+ function isEscrowPaused (OperatorSet calldata operatorSet , uint256 slashId ) public view returns (bool ) {
369366 return _paused[operatorSet.key ()][slashId];
370367 }
371368
372369 /// @inheritdoc ISlashEscrowFactory
373- function getBurnOrRedistributionStartBlock (
374- OperatorSet memory operatorSet ,
375- uint256 slashId
376- ) public view returns (uint256 ) {
370+ function getEscrowStartBlock (OperatorSet memory operatorSet , uint256 slashId ) public view returns (uint256 ) {
377371 return _slashIdToStartBlock[operatorSet.key ()][slashId];
378372 }
379373
380374 /// @inheritdoc ISlashEscrowFactory
381- function getBurnOrRedistributionCompleteBlock (
382- OperatorSet memory operatorSet ,
383- uint256 slashId
384- ) public view returns (uint32 ) {
375+ function getEscrowCompleteBlock (OperatorSet memory operatorSet , uint256 slashId ) public view returns (uint32 ) {
385376 IStrategy[] memory strategies = getPendingStrategiesForSlashId (operatorSet, slashId);
386377
387378 // Loop through all strategies and return the max delay
388379 uint32 maxStrategyDelay;
389380 for (uint256 i = 0 ; i < strategies.length ; ++ i) {
390- uint32 delay = getStrategyBurnOrRedistributionDelay (IStrategy (address (strategies[i])));
381+ uint32 delay = getStrategyEscrowDelay (IStrategy (address (strategies[i])));
391382 if (delay > maxStrategyDelay) {
392383 maxStrategyDelay = delay;
393384 }
394385 }
395386
396387 // The escrow can be released once the max strategy delay has elapsed.
397- return uint32 (getBurnOrRedistributionStartBlock (operatorSet, slashId) + maxStrategyDelay + 1 );
388+ return uint32 (getEscrowStartBlock (operatorSet, slashId) + maxStrategyDelay + 1 );
398389 }
399390
400391 /// @inheritdoc ISlashEscrowFactory
401- function getStrategyBurnOrRedistributionDelay (
392+ function getStrategyEscrowDelay (
402393 IStrategy strategy
403394 ) public view returns (uint32 ) {
404- uint32 globalDelay = _globalBurnOrRedistributionDelayBlocks ;
405- uint32 strategyDelay = _strategyBurnOrRedistributionDelayBlocks [address (strategy)];
395+ uint32 globalDelay = _globalEscrowDelayBlocks ;
396+ uint32 strategyDelay = _strategyEscrowDelayBlocks [address (strategy)];
406397
407398 // Return whichever delay is greater.
408399 return strategyDelay > globalDelay ? strategyDelay : globalDelay;
409400 }
410401
411402 /// @inheritdoc ISlashEscrowFactory
412- function getGlobalBurnOrRedistributionDelay () external view returns (uint32 ) {
413- return _globalBurnOrRedistributionDelayBlocks ;
403+ function getGlobalEscrowDelay () external view returns (uint32 ) {
404+ return _globalEscrowDelayBlocks ;
414405 }
415406
416407 /// @inheritdoc ISlashEscrowFactory
0 commit comments