From 8d413af3a6a57e96d22c3c0fd92a39fec871b8a7 Mon Sep 17 00:00:00 2001 From: Alexander Movsunov Date: Wed, 18 Dec 2024 22:21:37 +0400 Subject: [PATCH] chore: fmt --- script/CuratorCheck.s.sol | 4 +++- src/Curator.sol | 7 ++----- test/Curator.t.sol | 3 ++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/script/CuratorCheck.s.sol b/script/CuratorCheck.s.sol index f11da46..7090270 100644 --- a/script/CuratorCheck.s.sol +++ b/script/CuratorCheck.s.sol @@ -11,7 +11,9 @@ contract CuratorCheckScript is Script { address _curatorAddress = 0xDB259fa7d7f9F68aE3ffC3c748516ba9567a7576; Curator _curator = Curator(_curatorAddress); - _curator.optIn(0xa0Ee7A142d267C1f36714E4a8F75612F20a79720, 0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f, 1, 1, 1, 10); + _curator.optIn( + 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720, 0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f, 1, 1, 1, 10 + ); vm.stopBroadcast(); } diff --git a/src/Curator.sol b/src/Curator.sol index 3d853dc..7583f02 100644 --- a/src/Curator.sol +++ b/src/Curator.sol @@ -48,7 +48,7 @@ contract Curator { uint256 keysRangeEnd; } - address immutable public stakingRouterAddress; + address public immutable stakingRouterAddress; address public owner; mapping(address => RegisteredOperator) public operators; @@ -81,10 +81,7 @@ contract Curator { // Проверяем, не превышает ли количество ключей лимит для модуля uint256 totalKeys = keysRangeEnd - keysRangeStart + 1; - require( - totalKeys <= maxValidatorsForModule[moduleId], - "Validator limit exceeded for module" - ); + require(totalKeys <= maxValidatorsForModule[moduleId], "Validator limit exceeded for module"); operators[rewardAddress] = RegisteredOperator({ eoa: eoa, diff --git a/test/Curator.t.sol b/test/Curator.t.sol index d956439..7c1b0c5 100644 --- a/test/Curator.t.sol +++ b/test/Curator.t.sol @@ -66,7 +66,8 @@ contract CuratorTest is Test { curator.optIn(address(0xabc), address(0xdef), 1, 1, 1, 10); // Проверяем, что оператор зарегистрирован - (address eoa, uint256 moduleId, uint256 operatorId, uint256 keysRangeStart, uint256 keysRangeEnd) = curator.operators(address(0xabc)); + (address eoa, uint256 moduleId, uint256 operatorId, uint256 keysRangeStart, uint256 keysRangeEnd) = + curator.operators(address(0xabc)); assertEq(eoa, address(0xdef), "EOA not set correctly"); assertEq(moduleId, 1, "Module ID not set correctly");