Skip to content

Commit

Permalink
feat: simplify deallocation now that only 1 max alloc/dealloc
Browse files Browse the repository at this point in the history
  • Loading branch information
ypatil12 committed Aug 29, 2024
1 parent c8997db commit a21eb41
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/contracts/core/AVSDirectory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -688,13 +688,7 @@ contract AVSDirectory is
// Newly configured magnitude is less than current value.
// Therefore we handle this as a deallocation

// 1. update and decrement current and future queued amounts in case any pending allocations exist
_magnitudeUpdate[operator][allocation.strategy][operatorSetKey].decrementAtAndFutureCheckpoints({
key: uint32(block.timestamp),
decrementValue: uint64(currentMagnitude) - allocation.magnitudes[i]
});

// 2. push PendingFreeMagnitude and respective array index into (op,opSet,Strategy) queued deallocations
// 1. push PendingFreeMagnitude and respective array index into (op,opSet,Strategy) queued deallocations
uint256 index = _pendingFreeMagnitude[operator][allocation.strategy].length;
_pendingFreeMagnitude[operator][allocation.strategy].push(
PendingFreeMagnitude({
Expand Down

0 comments on commit a21eb41

Please sign in to comment.