Skip to content

Commit 3aa2b79

Browse files
committed
Apply suggestions from code review
1 parent 6c00479 commit 3aa2b79

File tree

5 files changed

+176
-180
lines changed

5 files changed

+176
-180
lines changed

contracts/staking/IApplicationWithDecreaseDelay.sol

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ import "./IApplication.sol";
1919

2020
/// @title Interface for Threshold Network applications with delay after decrease request
2121
interface IApplicationWithDecreaseDelay is IApplication {
22+
/// @notice Approves the previously registered authorization decrease
23+
/// request. Reverts if authorization decrease delay has not passed
24+
/// yet or if the authorization decrease was not requested for the
25+
/// given staking provider.
26+
function approveAuthorizationDecrease(address stakingProvider) external;
27+
2228
/// @notice Returns authorization-related parameters of the application.
2329
/// @dev The minimum authorization is also returned by `minimumAuthorization()`
2430
/// function, as a requirement of `IApplication` interface.
@@ -48,21 +54,13 @@ interface IApplicationWithDecreaseDelay is IApplication {
4854
/// @notice Returns the amount of stake that is pending authorization
4955
/// decrease for the given staking provider. If no authorization
5056
/// decrease has been requested, returns zero.
51-
function pendingAuthorizationDecrease(address _stakingProvider)
52-
external
53-
view
54-
returns (uint96);
57+
function pendingAuthorizationDecrease(
58+
address _stakingProvider
59+
) external view returns (uint96);
5560

5661
/// @notice Returns the remaining time in seconds that needs to pass before
5762
/// the requested authorization decrease can be approved.
58-
function remainingAuthorizationDecreaseDelay(address stakingProvider)
59-
external
60-
view
61-
returns (uint64);
62-
63-
/// @notice Approves the previously registered authorization decrease
64-
/// request. Reverts if authorization decrease delay has not passed
65-
/// yet or if the authorization decrease was not requested for the
66-
/// given staking provider.
67-
function approveAuthorizationDecrease(address stakingProvider) external;
63+
function remainingAuthorizationDecreaseDelay(
64+
address stakingProvider
65+
) external view returns (uint64);
6866
}

contracts/staking/IApplicationWithOperator.sol

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,6 @@ import "./IApplication.sol";
1919

2020
/// @title Interface for Threshold Network applications with operator role
2121
interface IApplicationWithOperator is IApplication {
22-
/// @notice Returns operator registered for the given staking provider.
23-
function stakingProviderToOperator(address stakingProvider)
24-
external
25-
view
26-
returns (address);
27-
28-
/// @notice Returns staking provider of the given operator.
29-
function operatorToStakingProvider(address operator)
30-
external
31-
view
32-
returns (address);
33-
3422
/// @notice Used by staking provider to set operator address that will
3523
/// operate a node. The operator address must be unique.
3624
/// Reverts if the operator is already set for the staking provider
@@ -40,4 +28,14 @@ interface IApplicationWithOperator is IApplication {
4028
/// if function reverts if there is a pending authorization decrease for
4129
/// the staking provider.
4230
function registerOperator(address operator) external;
31+
32+
/// @notice Returns operator registered for the given staking provider.
33+
function stakingProviderToOperator(
34+
address stakingProvider
35+
) external view returns (address);
36+
37+
/// @notice Returns staking provider of the given operator.
38+
function operatorToStakingProvider(
39+
address operator
40+
) external view returns (address);
4341
}

0 commit comments

Comments
 (0)