Skip to content

Commit e4be353

Browse files
committed
chore: forge fmt
1 parent 268fc63 commit e4be353

10 files changed

+714
-333
lines changed

src/RegistryCoordinator.sol

Lines changed: 53 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,9 @@ contract RegistryCoordinator is
238238
}
239239

240240
/// @inheritdoc IRegistryCoordinator
241-
function deregisterOperator(bytes memory quorumNumbers)
242-
external
243-
onlyWhenNotPaused(PAUSED_DEREGISTER_OPERATOR)
244-
{
241+
function deregisterOperator(
242+
bytes memory quorumNumbers
243+
) external onlyWhenNotPaused(PAUSED_DEREGISTER_OPERATOR) {
245244
// Check that either:
246245
// 1. The AVS hasn't migrated to operator sets yet (!isOperatorSetAVS), or
247246
// 2. The AVS has migrated but this is an M2 quorum
@@ -275,7 +274,11 @@ contract RegistryCoordinator is
275274
address operator,
276275
uint32[] memory operatorSetIds,
277276
bytes memory data
278-
) external override(IRegistryCoordinator, AVSRegistrar) onlyWhenNotPaused(PAUSED_REGISTER_OPERATOR) {
277+
)
278+
external
279+
override(IRegistryCoordinator, AVSRegistrar)
280+
onlyWhenNotPaused(PAUSED_REGISTER_OPERATOR)
281+
{
279282
require(isUsingOperatorSets(), OperatorSetsNotEnabled());
280283
for (uint256 i = 0; i < operatorSetIds.length; i++) {
281284
require(!isM2Quorum[uint8(operatorSetIds[i])], OperatorSetsNotSupported());
@@ -306,7 +309,11 @@ contract RegistryCoordinator is
306309
function deregisterOperator(
307310
address operator,
308311
uint32[] memory operatorSetIds
309-
) external override(IRegistryCoordinator, AVSRegistrar) onlyWhenNotPaused(PAUSED_REGISTER_OPERATOR) {
312+
)
313+
external
314+
override(IRegistryCoordinator, AVSRegistrar)
315+
onlyWhenNotPaused(PAUSED_REGISTER_OPERATOR)
316+
{
310317
require(isUsingOperatorSets(), OperatorSetsNotEnabled());
311318
for (uint256 i = 0; i < operatorSetIds.length; i++) {
312319
require(!isM2Quorum[uint8(operatorSetIds[i])], OperatorSetsNotSupported());
@@ -321,10 +328,9 @@ contract RegistryCoordinator is
321328
}
322329

323330
/// @inheritdoc IRegistryCoordinator
324-
function updateOperators(address[] memory operators)
325-
external
326-
onlyWhenNotPaused(PAUSED_UPDATE_OPERATOR)
327-
{
331+
function updateOperators(
332+
address[] memory operators
333+
) external onlyWhenNotPaused(PAUSED_UPDATE_OPERATOR) {
328334
for (uint256 i = 0; i < operators.length; i++) {
329335
address operator = operators[i];
330336
OperatorInfo memory operatorInfo = _operatorInfo[operator];
@@ -393,11 +399,10 @@ contract RegistryCoordinator is
393399
}
394400

395401
/// @inheritdoc IRegistryCoordinator
396-
function updateSocket(string memory socket) external override(IRegistryCoordinator, ISocketUpdater) {
397-
require(
398-
_operatorInfo[msg.sender].status == OperatorStatus.REGISTERED,
399-
NotRegistered()
400-
);
402+
function updateSocket(
403+
string memory socket
404+
) external override(IRegistryCoordinator, ISocketUpdater) {
405+
require(_operatorInfo[msg.sender].status == OperatorStatus.REGISTERED, NotRegistered());
401406
emit OperatorSocketUpdate(_operatorInfo[msg.sender].operatorId, socket);
402407
}
403408

@@ -465,17 +470,23 @@ contract RegistryCoordinator is
465470
}
466471

467472
/// @inheritdoc IRegistryCoordinator
468-
function setChurnApprover(address _churnApprover) external onlyOwner {
473+
function setChurnApprover(
474+
address _churnApprover
475+
) external onlyOwner {
469476
_setChurnApprover(_churnApprover);
470477
}
471478

472479
/// @inheritdoc IRegistryCoordinator
473-
function setEjector(address _ejector) external onlyOwner {
480+
function setEjector(
481+
address _ejector
482+
) external onlyOwner {
474483
_setEjector(_ejector);
475484
}
476485

477486
/// @inheritdoc IRegistryCoordinator
478-
function setEjectionCooldown(uint256 _ejectionCooldown) external onlyOwner {
487+
function setEjectionCooldown(
488+
uint256 _ejectionCooldown
489+
) external onlyOwner {
479490
ejectionCooldown = _ejectionCooldown;
480491
}
481492

@@ -484,7 +495,6 @@ contract RegistryCoordinator is
484495
* INTERNAL FUNCTIONS
485496
*
486497
*/
487-
488498
struct RegisterResults {
489499
uint32[] numOperatorsPerQuorum;
490500
uint96[] operatorStakes;
@@ -931,35 +941,37 @@ contract RegistryCoordinator is
931941
*/
932942

933943
/// @inheritdoc IRegistryCoordinator
934-
function getOperatorSetParams(uint8 quorumNumber)
935-
external
936-
view
937-
returns (OperatorSetParam memory)
938-
{
944+
function getOperatorSetParams(
945+
uint8 quorumNumber
946+
) external view returns (OperatorSetParam memory) {
939947
return _quorumParams[quorumNumber];
940948
}
941949

942950
/// @inheritdoc IRegistryCoordinator
943-
function getOperator(address operator) external view returns (OperatorInfo memory) {
951+
function getOperator(
952+
address operator
953+
) external view returns (OperatorInfo memory) {
944954
return _operatorInfo[operator];
945955
}
946956

947957
/// @inheritdoc IRegistryCoordinator
948-
function getOperatorId(address operator) external view returns (bytes32) {
958+
function getOperatorId(
959+
address operator
960+
) external view returns (bytes32) {
949961
return _operatorInfo[operator].operatorId;
950962
}
951963

952964
/// @inheritdoc IRegistryCoordinator
953-
function getOperatorFromId(bytes32 operatorId) external view returns (address) {
965+
function getOperatorFromId(
966+
bytes32 operatorId
967+
) external view returns (address) {
954968
return blsApkRegistry.getOperatorFromPubkeyHash(operatorId);
955969
}
956970

957971
/// @inheritdoc IRegistryCoordinator
958-
function getOperatorStatus(address operator)
959-
external
960-
view
961-
returns (IRegistryCoordinator.OperatorStatus)
962-
{
972+
function getOperatorStatus(
973+
address operator
974+
) external view returns (IRegistryCoordinator.OperatorStatus) {
963975
return _operatorInfo[operator].status;
964976
}
965977

@@ -993,12 +1005,16 @@ contract RegistryCoordinator is
9931005
}
9941006

9951007
/// @inheritdoc IRegistryCoordinator
996-
function getCurrentQuorumBitmap(bytes32 operatorId) external view returns (uint192) {
1008+
function getCurrentQuorumBitmap(
1009+
bytes32 operatorId
1010+
) external view returns (uint192) {
9971011
return _currentOperatorBitmap(operatorId);
9981012
}
9991013

10001014
/// @inheritdoc IRegistryCoordinator
1001-
function getQuorumBitmapHistoryLength(bytes32 operatorId) external view returns (uint256) {
1015+
function getQuorumBitmapHistoryLength(
1016+
bytes32 operatorId
1017+
) external view returns (uint256) {
10021018
return _operatorBitmapHistory[operatorId].length;
10031019
}
10041020

@@ -1031,11 +1047,9 @@ contract RegistryCoordinator is
10311047
}
10321048

10331049
/// @inheritdoc IRegistryCoordinator
1034-
function pubkeyRegistrationMessageHash(address operator)
1035-
public
1036-
view
1037-
returns (BN254.G1Point memory)
1038-
{
1050+
function pubkeyRegistrationMessageHash(
1051+
address operator
1052+
) public view returns (BN254.G1Point memory) {
10391053
return BN254.hashToG1(
10401054
_hashTypedDataV4(keccak256(abi.encode(PUBKEY_REGISTRATION_TYPEHASH, operator)))
10411055
);

0 commit comments

Comments
 (0)