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