|
2 | 2 | pragma solidity ^0.8.27;
|
3 | 3 |
|
4 | 4 | import "../../src/interfaces/IRegistryCoordinator.sol";
|
5 |
| - |
6 |
| -contract RegistryCoordinatorMock is IRegistryCoordinator { |
7 |
| - function blsApkRegistry() external view returns (IBLSApkRegistry) {} |
8 |
| - |
9 |
| - function ejectOperator(address operator, bytes calldata quorumNumbers) external {} |
10 |
| - |
11 |
| - function getOperatorSetParams( |
12 |
| - uint8 quorumNumber |
13 |
| - ) external view returns (OperatorSetParam memory) {} |
14 |
| - |
15 |
| - function indexRegistry() external view returns (IIndexRegistry) {} |
16 |
| - |
17 |
| - function stakeRegistry() external view returns (IStakeRegistry) {} |
18 |
| - |
19 |
| - function quorumCount() external view returns (uint8) {} |
20 |
| - /// @notice Returns the bitmap of the quorums the operator is registered for. |
21 |
| - function operatorIdToQuorumBitmap( |
22 |
| - bytes32 pubkeyHash |
23 |
| - ) external view returns (uint256) {} |
24 |
| - |
25 |
| - function getOperator( |
26 |
| - address operator |
27 |
| - ) external view returns (OperatorInfo memory) {} |
28 |
| - |
29 |
| - /// @notice Returns the stored id for the specified `operator`. |
30 |
| - function getOperatorId( |
31 |
| - address operator |
32 |
| - ) external view returns (bytes32) {} |
33 |
| - |
34 |
| - /// @notice Returns the operator address for the given `operatorId` |
35 |
| - function getOperatorFromId( |
36 |
| - bytes32 operatorId |
37 |
| - ) external view returns (address) {} |
38 |
| - |
39 |
| - /// @notice Returns the status for the given `operator` |
40 |
| - function getOperatorStatus( |
41 |
| - address operator |
42 |
| - ) external view returns (IRegistryCoordinator.OperatorStatus) {} |
43 |
| - |
44 |
| - /// @notice Returns task number from when `operator` has been registered. |
45 |
| - function getFromTaskNumberForOperator( |
46 |
| - address operator |
47 |
| - ) external view returns (uint32) {} |
48 |
| - |
49 |
| - function getQuorumBitmapIndicesAtBlockNumber( |
50 |
| - uint32 blockNumber, |
51 |
| - bytes32[] memory operatorIds |
52 |
| - ) external view returns (uint32[] memory) {} |
53 |
| - |
54 |
| - /// @notice Returns the quorum bitmap for the given `operatorId` at the given `blockNumber` via the `index` |
55 |
| - function getQuorumBitmapAtBlockNumberByIndex( |
56 |
| - bytes32 operatorId, |
57 |
| - uint32 blockNumber, |
58 |
| - uint256 index |
59 |
| - ) external view returns (uint192) {} |
60 |
| - |
61 |
| - /// @notice Returns the `index`th entry in the operator with `operatorId`'s bitmap history |
62 |
| - function getQuorumBitmapUpdateByIndex( |
63 |
| - bytes32 operatorId, |
64 |
| - uint256 index |
65 |
| - ) external view returns (QuorumBitmapUpdate memory) {} |
66 |
| - |
67 |
| - /// @notice Returns the current quorum bitmap for the given `operatorId` |
68 |
| - function getCurrentQuorumBitmap( |
69 |
| - bytes32 operatorId |
70 |
| - ) external view returns (uint192) {} |
71 |
| - |
72 |
| - /// @notice Returns the length of the quorum bitmap history for the given `operatorId` |
73 |
| - function getQuorumBitmapHistoryLength( |
74 |
| - bytes32 operatorId |
75 |
| - ) external view returns (uint256) {} |
76 |
| - |
77 |
| - function numRegistries() external view returns (uint256) {} |
78 |
| - |
79 |
| - function registries( |
80 |
| - uint256 |
81 |
| - ) external view returns (address) {} |
82 |
| - |
83 |
| - function registerOperator(bytes memory quorumNumbers, bytes calldata) external {} |
84 |
| - |
85 |
| - function deregisterOperator(bytes calldata quorumNumbers, bytes calldata) external {} |
86 |
| - |
87 |
| - function pubkeyRegistrationMessageHash( |
88 |
| - address operator |
89 |
| - ) public view returns (BN254.G1Point memory) { |
| 5 | +import "../../src/libraries/BN254.sol"; |
| 6 | + |
| 7 | +abstract contract RegistryCoordinatorMock is IRegistryCoordinator { |
| 8 | + // Add missing function declarations from interface |
| 9 | + function OPERATOR_CHURN_APPROVAL_TYPEHASH() external pure virtual returns (bytes32); |
| 10 | + function PUBKEY_REGISTRATION_TYPEHASH() external pure virtual returns (bytes32); |
| 11 | + function allocationManager() external view virtual returns (IAllocationManager); |
| 12 | + function calculateOperatorChurnApprovalDigestHash( |
| 13 | + address registeringOperator, |
| 14 | + bytes32 registeringOperatorId, |
| 15 | + OperatorKickParam[] memory operatorKickParams, |
| 16 | + bytes32 salt, |
| 17 | + uint256 expiry |
| 18 | + ) external view virtual returns (bytes32); |
| 19 | + function churnApprover() external view virtual returns (address); |
| 20 | + function createSlashableStakeQuorum( |
| 21 | + OperatorSetParam memory operatorSetParams, |
| 22 | + uint96 minimumStake, |
| 23 | + IStakeRegistry.StrategyParams[] memory strategyParams, |
| 24 | + uint32 lookAheadPeriod |
| 25 | + ) external virtual; |
| 26 | + function createTotalDelegatedStakeQuorum( |
| 27 | + OperatorSetParam memory operatorSetParams, |
| 28 | + uint96 minimumStake, |
| 29 | + IStakeRegistry.StrategyParams[] memory strategyParams |
| 30 | + ) external virtual; |
| 31 | + function deregisterOperator(address operator, uint32[] memory operatorSetIds) external virtual; |
| 32 | + function ejectionCooldown() external view virtual returns (uint256); |
| 33 | + function ejector() external view virtual returns (address); |
| 34 | + function enableOperatorSets() external virtual; |
| 35 | + function initialize( |
| 36 | + address _initialOwner, |
| 37 | + address _churnApprover, |
| 38 | + address _ejector, |
| 39 | + uint256 _initialPausedStatus, |
| 40 | + OperatorSetParam[] memory _operatorSetParams, |
| 41 | + uint96[] memory _minimumStakes, |
| 42 | + IStakeRegistry.StrategyParams[][] memory _strategyParams, |
| 43 | + StakeType[] memory _stakeTypes, |
| 44 | + uint32[] memory _lookAheadPeriods |
| 45 | + ) external virtual; |
| 46 | + function isChurnApproverSaltUsed(bytes32 salt) external view virtual returns (bool); |
| 47 | + function isUsingOperatorSets() external view virtual returns (bool); |
| 48 | + function lastEjectionTimestamp(address operator) external view virtual returns (uint256); |
| 49 | + function registerOperator( |
| 50 | + address operator, |
| 51 | + uint32[] memory operatorSetIds, |
| 52 | + bytes memory data |
| 53 | + ) external virtual; |
| 54 | + function registerOperator( |
| 55 | + bytes memory quorumNumbers, |
| 56 | + string memory socket, |
| 57 | + IBLSApkRegistry.PubkeyRegistrationParams memory params, |
| 58 | + ISignatureUtils.SignatureWithSaltAndExpiry memory operatorSignature |
| 59 | + ) external virtual; |
| 60 | + function registerOperatorWithChurn( |
| 61 | + bytes calldata quorumNumbers, |
| 62 | + string memory socket, |
| 63 | + IBLSApkRegistry.PubkeyRegistrationParams memory params, |
| 64 | + OperatorKickParam[] memory operatorKickParams, |
| 65 | + ISignatureUtils.SignatureWithSaltAndExpiry memory churnApproverSignature, |
| 66 | + ISignatureUtils.SignatureWithSaltAndExpiry memory operatorSignature |
| 67 | + ) external virtual; |
| 68 | + function setChurnApprover(address _churnApprover) external virtual; |
| 69 | + function setEjectionCooldown(uint256 _ejectionCooldown) external virtual; |
| 70 | + function setEjector(address _ejector) external virtual; |
| 71 | + function setOperatorSetParams( |
| 72 | + uint8 quorumNumber, |
| 73 | + OperatorSetParam memory operatorSetParams |
| 74 | + ) external virtual; |
| 75 | + function updateOperators(address[] memory operators) external virtual; |
| 76 | + function updateOperatorsForQuorum( |
| 77 | + address[][] memory operatorsPerQuorum, |
| 78 | + bytes calldata quorumNumbers |
| 79 | + ) external virtual; |
| 80 | + function updateSocket(string memory socket) external virtual; |
| 81 | + |
| 82 | + // Keep existing implementations |
| 83 | + function blsApkRegistry() external view virtual returns (IBLSApkRegistry) {} |
| 84 | + function ejectOperator(address operator, bytes calldata quorumNumbers) external virtual {} |
| 85 | + function getOperatorSetParams(uint8 quorumNumber) external view virtual returns (OperatorSetParam memory) {} |
| 86 | + function indexRegistry() external view virtual returns (IIndexRegistry) {} |
| 87 | + function stakeRegistry() external view virtual returns (IStakeRegistry) {} |
| 88 | + function quorumCount() external view virtual returns (uint8) {} |
| 89 | + function getOperator(address operator) external view virtual returns (OperatorInfo memory) {} |
| 90 | + function getOperatorId(address operator) external view virtual returns (bytes32) {} |
| 91 | + function getOperatorFromId(bytes32 operatorId) external view virtual returns (address) {} |
| 92 | + function getOperatorStatus(address operator) external view virtual returns (OperatorStatus) {} |
| 93 | + function getQuorumBitmapIndicesAtBlockNumber(uint32 blockNumber, bytes32[] memory operatorIds) external view virtual returns (uint32[] memory) {} |
| 94 | + function getQuorumBitmapAtBlockNumberByIndex(bytes32 operatorId, uint32 blockNumber, uint256 index) external view virtual returns (uint192) {} |
| 95 | + function getQuorumBitmapUpdateByIndex(bytes32 operatorId, uint256 index) external view virtual returns (QuorumBitmapUpdate memory) {} |
| 96 | + function getCurrentQuorumBitmap(bytes32 operatorId) external view virtual returns (uint192) {} |
| 97 | + function getQuorumBitmapHistoryLength(bytes32 operatorId) external view virtual returns (uint256) {} |
| 98 | + function numRegistries() external view virtual returns (uint256) {} |
| 99 | + function registries(uint256) external view virtual returns (address) {} |
| 100 | + function deregisterOperator(bytes calldata quorumNumbers) external virtual {} |
| 101 | + function pubkeyRegistrationMessageHash(address operator) public view virtual returns (BN254.G1Point memory) { |
90 | 102 | return BN254.hashToG1(keccak256(abi.encode(operator)));
|
91 | 103 | }
|
92 |
| - |
93 |
| - function quorumUpdateBlockNumber( |
94 |
| - uint8 quorumNumber |
95 |
| - ) external view returns (uint256) {} |
96 |
| - |
97 |
| - function owner() external view returns (address) {} |
98 |
| - |
99 |
| - function serviceManager() external view returns (IServiceManager) {} |
100 |
| - |
101 |
| - function isM2Quorum( |
102 |
| - uint8 quorumNumber |
103 |
| - ) external view returns (bool) { |
| 104 | + function quorumUpdateBlockNumber(uint8 quorumNumber) external view virtual returns (uint256) {} |
| 105 | + function owner() external view virtual returns (address) {} |
| 106 | + function serviceManager() external view virtual returns (IServiceManager) {} |
| 107 | + function isM2Quorum(uint8 quorumNumber) external view virtual returns (bool) { |
104 | 108 | return false;
|
105 | 109 | }
|
106 |
| - |
107 |
| - function isOperatorSetAVS() external view returns (bool) { |
| 110 | + function isOperatorSetAVS() external view virtual returns (bool) { |
108 | 111 | return false;
|
109 | 112 | }
|
110 | 113 | }
|
0 commit comments