Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandrMov committed Dec 18, 2024
1 parent d8d2932 commit 8d413af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 3 additions & 1 deletion script/CuratorCheck.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
7 changes: 2 additions & 5 deletions src/Curator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ contract Curator {
uint256 keysRangeEnd;
}

address immutable public stakingRouterAddress;
address public immutable stakingRouterAddress;
address public owner;

mapping(address => RegisteredOperator) public operators;
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion test/Curator.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 8d413af

Please sign in to comment.