Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: David Núñez <[email protected]>
  • Loading branch information
vzotova and cygnusv committed Sep 9, 2024
1 parent 63bcfc3 commit 9d5daff
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
16 changes: 16 additions & 0 deletions contracts/staking/TokenStaking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,22 @@ contract TokenStaking is Initializable, IStaking, Checkpoints {
.authorized;
}

/// @notice Returns staked amount of T for the specified staking provider.
/// @dev Method is deprecated. Use `stakeAmount` instead
function stakes(address stakingProvider)
external
view
returns (
uint96 tStake,
uint96 keepInTStake,
uint96 nuInTStake
)
{
tStake = stakingProviders[stakingProvider].tStake;
keepInTStake = 0;
nuInTStake = 0;
}

/// @notice Returns staked amount of T for the specified staking provider.
function stakeAmount(address stakingProvider)
external
Expand Down
7 changes: 6 additions & 1 deletion docs/rfc-1-staking-contract.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,11 @@ each affected application.

Returns the authorized stake amount of the staking provider for the application.

==== `stakes(address stakingProvider) external view returns (uint96 tStake, uint96 keepInTStake, uint96 nuInTStake)`

Returns staked amount of T for the specified staking provider.
Method is deprecated. Use `stakeAmount` instead.

==== `stakeAmount(address stakingProvider) external view returns (uint96)`

Returns staked amount of T for the specified staking provider.
Expand Down Expand Up @@ -372,7 +377,7 @@ Returns length of slashing queue

==== `getMaxAuthorization(address stakingProvider) external view returns (uint96)`

Returns the maximum application authorization
Returns the maximum application authorization.

==== `getAvailableToAuthorize(address stakingProvider, address application) external view returns (uint96)`

Expand Down

0 comments on commit 9d5daff

Please sign in to comment.