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