Skip to content

Commit

Permalink
Merge pull request #16 from symbioticfi/new-delegator-support
Browse files Browse the repository at this point in the history
Support new delegator type
  • Loading branch information
alrxy authored Jan 7, 2025
2 parents a880d2f + 6833457 commit a002fa9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 237 deletions.
110 changes: 0 additions & 110 deletions src/extensions/operators/ApprovalRegisterOperators.sol

This file was deleted.

61 changes: 0 additions & 61 deletions src/extensions/operators/ForcePauseApprovalRegisterOperators.sol

This file was deleted.

63 changes: 0 additions & 63 deletions src/interfaces/extensions/operators/IApprovalRegisterOperators.sol

This file was deleted.

10 changes: 7 additions & 3 deletions src/managers/VaultManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ abstract contract VaultManager is NetworkStorage, SlashingWindowStorage, Capture
enum DelegatorType {
FULL_RESTAKE,
NETWORK_RESTAKE,
OPERATOR_SPECIFIC
OPERATOR_SPECIFIC,
OPERATOR_NETWORK_SPECIFIC
}

// keccak256(abi.encode(uint256(keccak256("symbiotic.storage.VaultManager")) - 1)) & ~bytes32(uint256(0xff))
Expand Down Expand Up @@ -732,9 +733,12 @@ abstract contract VaultManager is NetworkStorage, SlashingWindowStorage, Capture

function _validateOperatorVault(address operator, address vault) internal view {
address delegator = IVault(vault).delegator();
uint64 delegatorType = IEntity(delegator).TYPE();
if (
IEntity(delegator).TYPE() != uint64(DelegatorType.OPERATOR_SPECIFIC)
|| IOperatorSpecificDelegator(delegator).operator() != operator
(
delegatorType != uint64(DelegatorType.OPERATOR_SPECIFIC)
&& delegatorType != uint64(DelegatorType.OPERATOR_NETWORK_SPECIFIC)
) || IOperatorSpecificDelegator(delegator).operator() != operator
) {
revert NotOperatorSpecificVault();
}
Expand Down

0 comments on commit a002fa9

Please sign in to comment.