@@ -21,7 +21,7 @@ contract AllocationManager is
2121 SplitContractMixin ,
2222 PermissionControllerMixin ,
2323 SemVerMixin ,
24- IAllocationManagerActions
24+ IAllocationManager
2525{
2626 using DoubleEndedQueue for DoubleEndedQueue.Bytes32Deque;
2727 using Snapshots for Snapshots.DefaultWadHistory;
@@ -642,6 +642,101 @@ contract AllocationManager is
642642 // TODO: Inherit doc
643643 // TODO: Make commonly used getters internal methods that can be easily shared between Actions and View contracts.
644644
645+ /**
646+ *
647+ * VIEW FUNCTIONS
648+ *
649+ */
650+
651+ /// @inheritdoc IAllocationManagerView
652+ function getOperatorSetCount (
653+ address avs
654+ ) external view returns (uint256 ) {
655+ _delegateView (secondHalf);
656+ }
657+
658+ /// @inheritdoc IAllocationManagerView
659+ function getAllocatedSets (
660+ address operator
661+ ) external view returns (OperatorSet[] memory ) {
662+ _delegateView (secondHalf);
663+ }
664+
665+ /// @inheritdoc IAllocationManagerView
666+ function getAllocatedStrategies (
667+ address operator ,
668+ OperatorSet memory operatorSet
669+ ) external view returns (IStrategy[] memory ) {
670+ _delegateView (secondHalf);
671+ }
672+
673+ /// @inheritdoc IAllocationManagerView
674+ function getAllocation (
675+ address operator ,
676+ OperatorSet memory operatorSet ,
677+ IStrategy strategy
678+ ) external view returns (Allocation memory ) {
679+ _delegateView (secondHalf);
680+ }
681+
682+ /// @inheritdoc IAllocationManagerView
683+ function getAllocations (
684+ address [] memory operators ,
685+ OperatorSet memory operatorSet ,
686+ IStrategy strategy
687+ ) external view returns (Allocation[] memory ) {
688+ _delegateView (secondHalf);
689+ }
690+
691+ /// @inheritdoc IAllocationManagerView
692+ function getStrategyAllocations (
693+ address operator ,
694+ IStrategy strategy
695+ ) external view returns (OperatorSet[] memory , Allocation[] memory ) {
696+ _delegateView (secondHalf);
697+ }
698+
699+ /// @inheritdoc IAllocationManagerView
700+ function getEncumberedMagnitude (address operator , IStrategy strategy ) external view returns (uint64 ) {
701+ _delegateView (secondHalf);
702+ }
703+
704+ /// @inheritdoc IAllocationManagerView
705+ function getAllocatableMagnitude (address operator , IStrategy strategy ) external view returns (uint64 ) {
706+ _delegateView (secondHalf);
707+ }
708+
709+ /// @inheritdoc IAllocationManagerView
710+ function getMaxMagnitude (address operator , IStrategy strategy ) external view returns (uint64 ) {
711+ _delegateView (secondHalf);
712+ }
713+
714+ /// @inheritdoc IAllocationManagerView
715+ function getMaxMagnitudes (
716+ address operator ,
717+ IStrategy[] calldata strategies
718+ ) external view returns (uint64 [] memory ) {
719+ _delegateView (secondHalf);
720+ }
721+
722+ /// @inheritdoc IAllocationManagerView
723+ function getMaxMagnitudes (
724+ address [] calldata operators ,
725+ IStrategy strategy
726+ ) external view returns (uint64 [] memory ) {
727+ _delegateView (secondHalf);
728+ }
729+
730+ /// @inheritdoc IAllocationManagerView
731+ function getMaxMagnitudesAtBlock (
732+ address operator ,
733+ IStrategy[] calldata strategies ,
734+ uint32 blockNumber
735+ ) external view returns (uint64 [] memory ) {
736+ _delegateView (secondHalf);
737+ }
738+
739+ /// @inheritdoc IAllocationManagerView
645740 function getAllocationDelay (
646741 address operator
647742 ) public view returns (bool , uint32 ) {
@@ -659,6 +754,40 @@ contract AllocationManager is
659754 return (isSet, delay);
660755 }
661756
757+ /// @inheritdoc IAllocationManagerView
758+ function getRegisteredSets (
759+ address operator
760+ ) external view returns (OperatorSet[] memory operatorSets ) {
761+ _delegateView (secondHalf);
762+ }
763+
764+ /// @inheritdoc IAllocationManagerView
765+ function isMemberOfOperatorSet (address operator , OperatorSet memory operatorSet ) external view returns (bool ) {
766+ _delegateView (secondHalf);
767+ }
768+
769+ /// @inheritdoc IAllocationManagerView
770+ function isOperatorSet (
771+ OperatorSet memory operatorSet
772+ ) external view returns (bool ) {
773+ _delegateView (secondHalf);
774+ }
775+
776+ /// @inheritdoc IAllocationManagerView
777+ function getMembers (
778+ OperatorSet memory operatorSet
779+ ) external view returns (address [] memory operators ) {
780+ _delegateView (secondHalf);
781+ }
782+
783+ /// @inheritdoc IAllocationManagerView
784+ function getMemberCount (
785+ OperatorSet memory operatorSet
786+ ) external view returns (uint256 ) {
787+ _delegateView (secondHalf);
788+ }
789+
790+ /// @inheritdoc IAllocationManagerView
662791 function getAVSRegistrar (
663792 address avs
664793 ) public view returns (IAVSRegistrar) {
@@ -667,6 +796,33 @@ contract AllocationManager is
667796 return address (registrar) == address (0 ) ? IAVSRegistrar (avs) : registrar;
668797 }
669798
799+ /// @inheritdoc IAllocationManagerView
800+ function getStrategiesInOperatorSet (
801+ OperatorSet memory operatorSet
802+ ) external view returns (IStrategy[] memory strategies ) {
803+ _delegateView (secondHalf);
804+ }
805+
806+ /// @inheritdoc IAllocationManagerView
807+ function getMinimumSlashableStake (
808+ OperatorSet memory operatorSet ,
809+ address [] memory operators ,
810+ IStrategy[] memory strategies ,
811+ uint32 futureBlock
812+ ) external view returns (uint256 [][] memory slashableStake ) {
813+ _delegateView (secondHalf);
814+ }
815+
816+ /// @inheritdoc IAllocationManagerView
817+ function getAllocatedStake (
818+ OperatorSet memory operatorSet ,
819+ address [] memory operators ,
820+ IStrategy[] memory strategies
821+ ) external view returns (uint256 [][] memory slashableStake ) {
822+ _delegateView (secondHalf);
823+ }
824+
825+ /// @inheritdoc IAllocationManagerView
670826 function isOperatorSlashable (address operator , OperatorSet memory operatorSet ) public view returns (bool ) {
671827 RegistrationStatus memory status = registrationStatus[operator][operatorSet.key ()];
672828
@@ -675,6 +831,7 @@ contract AllocationManager is
675831 return status.registered || block .number <= status.slashableUntil;
676832 }
677833
834+ /// @inheritdoc IAllocationManagerView
678835 function getRedistributionRecipient (
679836 OperatorSet memory operatorSet
680837 ) public view returns (address ) {
@@ -683,9 +840,24 @@ contract AllocationManager is
683840 return redistributionRecipient == address (0 ) ? DEFAULT_BURN_ADDRESS : redistributionRecipient;
684841 }
685842
843+ /// @inheritdoc IAllocationManagerView
686844 function isRedistributingOperatorSet (
687845 OperatorSet memory operatorSet
688846 ) public view returns (bool ) {
689847 return getRedistributionRecipient (operatorSet) != DEFAULT_BURN_ADDRESS;
690848 }
849+
850+ /// @inheritdoc IAllocationManagerView
851+ function getSlashCount (
852+ OperatorSet memory operatorSet
853+ ) external view returns (uint256 ) {
854+ _delegateView (secondHalf);
855+ }
856+
857+ /// @inheritdoc IAllocationManagerView
858+ function isOperatorRedistributable (
859+ address operator
860+ ) external view returns (bool ) {
861+ _delegateView (secondHalf);
862+ }
691863}
0 commit comments