Skip to content

Commit 9d5daff

Browse files
vzotovacygnusv
andcommitted
Apply suggestions from code review
Co-authored-by: David Núñez <[email protected]>
1 parent 63bcfc3 commit 9d5daff

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

contracts/staking/TokenStaking.sol

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,22 @@ contract TokenStaking is Initializable, IStaking, Checkpoints {
822822
.authorized;
823823
}
824824

825+
/// @notice Returns staked amount of T for the specified staking provider.
826+
/// @dev Method is deprecated. Use `stakeAmount` instead
827+
function stakes(address stakingProvider)
828+
external
829+
view
830+
returns (
831+
uint96 tStake,
832+
uint96 keepInTStake,
833+
uint96 nuInTStake
834+
)
835+
{
836+
tStake = stakingProviders[stakingProvider].tStake;
837+
keepInTStake = 0;
838+
nuInTStake = 0;
839+
}
840+
825841
/// @notice Returns staked amount of T for the specified staking provider.
826842
function stakeAmount(address stakingProvider)
827843
external

docs/rfc-1-staking-contract.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,11 @@ each affected application.
342342

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

345+
==== `stakes(address stakingProvider) external view returns (uint96 tStake, uint96 keepInTStake, uint96 nuInTStake)`
346+
347+
Returns staked amount of T for the specified staking provider.
348+
Method is deprecated. Use `stakeAmount` instead.
349+
345350
==== `stakeAmount(address stakingProvider) external view returns (uint96)`
346351

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

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

375-
Returns the maximum application authorization
380+
Returns the maximum application authorization.
376381

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

0 commit comments

Comments
 (0)