investPairETH

function investPairETH(
    address _token,
    uint _amountTokenDesired,
    uint _amountTokenMin,
    uint _amountETHMin,
    uint _deadline
)external payable ensure(_deadline)

토큰+코인 Staking ν•  λ•Œ μ‚¬μš©(LP+Staking)

Parameters

Example

const overrides = {
  gasLimit: 9999999,
  value : ethers.utils.parseEther("50.0")
}

// 토큰 κ±°λž˜μ— λŒ€ν•œ ν—ˆμš©
await mockToken0Contract.approve(routerContract.address, MaxUint256)

// Staking(LP+Staking)
await routerContract.investPairETH(
    mockToken0Contract.address,
    ethers.utils.parseEther("20.0"),
    0,
    0,
    MaxUint256,
    overrides
)

2022.12.22

Last updated