getShareOfPool

function getShareOfPool(
    address _token, 
    uint _amountDesired,  
    bool _owned
)external view returns (uint poolRatio)

์Šคํ…Œ์ดํ‚น ์ง€๋ถ„์œจ ๊ตฌํ•  ๋•Œ ์‚ฌ์šฉ

Parameters

Return Values

Example

// ์ง€๋ถ„์œจ ์–ป๊ธฐ(๊ฐ’์— ์˜ํ•œ)
await stakingRouterContract.getShareOfPool(
    mockToken0Contract.address,
    ethers.utils.parseEther("0.1"),
    false
)

// ๊ฒฐ๊ณผ (0.99%์˜ ์˜ํ–ฅ๋„)
BigNumber { value: "99" }

// ์ง€๋ถ„์œจ ์–ป๊ธฐ(์†Œ์œ ์ค‘์ธ)
await stakingRouterContract.getShareOfPool(
    mockToken0Contract.address,
    0,
    true
)

// ๊ฒฐ๊ณผ (100%์˜ ์˜ํ–ฅ๋„)
BigNumber { value: "10000" }

2022.12.23

Last updated