mirror of
https://github.com/Instadapp/dsa-resolvers-deprecated.git
synced 2024-07-29 22:38:16 +00:00
adding totalSupply for staked and token
This commit is contained in:
parent
b91bdda63b
commit
1f7e2984dd
|
|
@ -9,6 +9,7 @@ interface TokenInterface {
|
|||
|
||||
interface IStakingRewards {
|
||||
function balanceOf(address) external view returns (uint256);
|
||||
function totalSupply() external view returns (uint256) {
|
||||
function earned(address) external view returns (uint256);
|
||||
}
|
||||
|
||||
|
|
@ -36,14 +37,18 @@ contract Resolver is CurveStakingHelpers {
|
|||
|
||||
function getPosition(address user, string memory stakingPoolName) public view returns (
|
||||
uint stakedBal,
|
||||
uint stakedTotalSupply,
|
||||
uint rewardsEarned,
|
||||
uint tokenBal
|
||||
uint tokenBal,
|
||||
uint tokenTotalSupply
|
||||
) {
|
||||
Staking staking = Staking(getStakingAddr());
|
||||
(IStakingRewards stakingContract, TokenInterface stakingToken, bytes32 stakingType) = staking.getStakingData(stakingPoolName);
|
||||
stakedBal = stakingContract.balanceOf(user);
|
||||
stakedBal = stakingContract.totalSupply();
|
||||
rewardsEarned = stakingContract.earned(user);
|
||||
tokenBal = stakingToken.balanceOf(user);
|
||||
tokenBal = stakingToken.totalSupply();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user