investPair

function investPair(
    address _tokenA,
    address _tokenB,
    uint256 _amountADesired,
    uint256 _amountBDesired, 
    uint256 _amountAMin, 
    uint256 _amountBMin,
    uint _deadline
)external ensure(_deadline)

ํ† ํฐ+ํ† ํฐ Staking ํ•  ๋•Œ ์‚ฌ์šฉ(LP+Staking)

Parameters

Example

// ํ† ํฐ ๊ฑฐ๋ž˜์— ๋Œ€ํ•œ ํ—ˆ์šฉ
await mockToken0Contract.approve(routerContract.address, MaxUint256)
await mockToken1Contract.approve(routerContract.address, MaxUint256)

// Staking(LP+Staking)
await routerContract.investPair(
    mockToken0Contract.address,
    mockToken1Contract.address,
    10000,
    5000,
    0,
    0,
    MaxUint256
)

2022.12.22

Last updated