userInfo

function userInfo( 
    address _token, 
    address _to
) external view returns(
    uint256 liquidity, 
    uint256 reward, 
    uint256 cumulativeReward,
    uint256 endTime
)

μŠ€ν…Œμ΄ν‚Ή κΈˆμ•‘ 및 수령 받을 수 μžˆλŠ” λ¦¬μ›Œλ“œ 얻을 λ•Œ μ‚¬μš©

Parameters

TypeValueDescription

address

_token

μŠ€ν…Œμ΄ν‚Ή 된 토큰 μ£Όμ†Œ

address

_user

확인 ν•  μ‚¬μš©μž μ£Όμ†Œ

Return Values

TypeValueDescription

uint256

liquidity

μŠ€ν…Œμ΄ν‚Ή 된 토큰 개수

uint256

reward

λ¦¬μ›Œλ“œ 수령 κ°€λŠ₯ 개수

uint256

cumulativeReward

λˆ„μ  λ¦¬μ›Œλ“œ 보상

uint256

endTime

μŠ€ν…Œμ΄ν‚Ή 락업 ν•΄μ œ μ‹œκ°„

Example

// μœ μ €μ •λ³΄ 
userInfo = await stakingRouterContract.userInfo(
    mockToken0Contract.address,
    accounts[0].address
)

// κ²°κ³Ό
[
  BigNumber { value: "100000000000000000000" },
  BigNumber { value: "23148100000000" },
  BigNumber { value: "0" },
  BigNumber { value: "1672967510" },
  liquidity: BigNumber { value: "100000000000000000000" },
  reward: BigNumber { value: "23148100000000" },
  cumulativeReward: BigNumber { value: "0" },
  endTime: BigNumber { value: "1672967510" }
]

2023.01.06

Last updated