Skip to content

Commit 051a72b

Browse files
authored
Merge pull request #99 from threshold-network/ackchyually
Staking `requestAuthorizationDecrease` function contract update
2 parents d11ed98 + 631989e commit 051a72b

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

contracts/staking/IApplication.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ interface IApplication {
4848
/// pending decrease and respond to the staking contract with
4949
/// `approveAuthorizationDecrease` at its discretion. It may
5050
/// happen right away but it also may happen several months later.
51+
/// If there is already a pending authorization decrease request
52+
/// for the application, and the application does not agree for
53+
/// overwriting it, the function should revert.
5154
function authorizationDecreaseRequested(
5255
address stakingProvider,
5356
uint96 fromAmount,

contracts/staking/IStaking.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ interface IStaking {
110110
/// it happens depends on the application. Can only be called by the
111111
/// given staking provider’s authorizer. Overwrites pending
112112
/// authorization decrease for the given staking provider and
113-
/// application.
113+
/// application if the application agrees for that. If the
114+
/// application does not agree for overwriting, the function
115+
/// reverts.
114116
/// @dev Calls `authorizationDecreaseRequested(address stakingProvider, uint256 amount)`
115117
/// on the given application. See `IApplication`.
116118
function requestAuthorizationDecrease(

contracts/staking/TokenStaking.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1281,7 +1281,9 @@ contract TokenStaking is Initializable, IStaking, Checkpoints {
12811281
/// it happens depends on the application. Can only be called by the
12821282
/// given staking provider’s authorizer. Overwrites pending
12831283
/// authorization decrease for the given staking provider and
1284-
/// application.
1284+
/// application if the application agrees for that. If the
1285+
/// application does not agree for overwriting, the function
1286+
/// reverts.
12851287
/// @dev Calls `authorizationDecreaseRequested` callback on the given
12861288
/// application. See `IApplication`.
12871289
function requestAuthorizationDecrease(

0 commit comments

Comments
 (0)