withdrawPairETH

function withdrawPairETH( 
    address _token,
    uint _liquidity,
    uint _amountTokenMin,
    uint _amountETHMin,
    uint _deadline
) external ensure(_deadline)

토큰+코인 μ–ΈμŠ€ν…Œμ΄ν‚Ή ν•  λ•Œ μ‚¬μš© (λ¦¬μ›Œλ“œ μžλ™ νšλ“)

Parameters

TypeValueDescription

address

_token

μŠ€ν…Œμ΄ν‚Ή 된 토큰 μ£Όμ†Œ

uint256

_liquidity

μ–ΈμŠ€ν…Œμ΄ν‚Ή ν•  토큰 개수

uint256

_amountMin

μŠ€ν…Œμ΄ν‚Ή ν•  토큰 μ΅œμ†Œ 개수 (Slippage κ°’ 이용)

uint256

_amountETHMin

μŠ€ν…Œμ΄ν‚Ή ν•  코인 μ΅œμ†Œ 개수 (Slippage κ°’ 이용)

uint256

_deadline

νŠΈλžœμž­μ…˜ μ΅œλŒ€ μ‹œκ°„ (ν˜„μž¬μ‹œκ°„+μ’…λ£Œμ‹œκ°„, sec단)

Example

// 토큰+코인 좜금
await routerContract.withdrawPairETH(
    mockToken0Contract.address,
    100000,
    0,
    0,
    MaxUint256
) 

2022.12.22

Last updated