function userInfo(
address _tokenA,
address _tokenB,
address _to
) external view returns(
uint256 liquidity,
uint256 reward,
uint256 cumulativeReward,
uint256 feeCollect0,
uint256 feeCollect1
)
ํ์ด ์คํ
์ดํน ๊ธ์ก ๋ฐ ์๋ น ๋ฐ์ ์ ์๋ ๋ฆฌ์๋ ์ป์ ๋ ์ฌ์ฉ
// ์ ์ ์ ๋ณด (์์น๊ธ+๋ฆฌ์๋ ์๋ น์ก)
await routerContract.userInfo(
mockToken0Contract.address,
mockToken1Contract.address,
accounts[1].address
)
// ๊ฒฐ๊ณผ
[ BigNumber { value: "3535" }, BigNumber { value: "9999" }, BigNumber { value: "0" },
BigNumber { value: "0" }, BigNumber { value: "2999999999999999" } ]
// ์ ์ ์ ๋ณด (์์น๊ธ+๋ฆฌ์๋ ์๋ น์ก)
await routerContract.connect(accounts[1]).userInfo(
mockToken0Contract.address,
WMATICContract.address,
accounts[1].address
)
// ๊ฒฐ๊ณผ
[ BigNumber { value: "7071" }, BigNumber { value: "9999" }, BigNumber { value: "0" },
BigNumber { value: "0" }, BigNumber { value: "2999999999999999" } ]