Skip to content

Commit

Permalink
Allow threshold staking contract to update authorization.
Browse files Browse the repository at this point in the history
  • Loading branch information
derekpierre committed Sep 23, 2023
1 parent 01c22bd commit 0f72500
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions contracts/contracts/testnet/LynxSet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,27 @@ contract LynxRootApplication is Ownable, ITACoChildToRoot {
function withdrawRewards(address stakingProvider) external {}

function authorizationIncreased(
address stakingProvider,
uint96 fromAmount,
uint96 toAmount // solhint-disable-next-line no-empty-blocks
) external {}
address _stakingProvider,
// solhint-disable-next-line no-unused-vars
uint96 _fromAmount,
uint96 _toAmount
) external {
require(
_stakingProvider != address(0) && _toAmount > 0,
"Input parameters must be specified"
);
require(_toAmount >= minimumAuthorization, "Authorization must be greater than minimum");

StakingProviderInfo storage info = stakingProviderInfo[_stakingProvider];
require(
_stakingProviderFromOperator[_stakingProvider] == address(0) ||
_stakingProviderFromOperator[_stakingProvider] == _stakingProvider,
"A provider can't be an operator for another provider"
);

info.authorized = _toAmount;
childApplication.updateAuthorization(_stakingProvider, _toAmount);
}

function authorizationDecreaseRequested(
address stakingProvider,
Expand Down

0 comments on commit 0f72500

Please sign in to comment.