withdrawPair

function withdrawPair( 
    address _tokenA,
    address _tokenB,
    uint256 _liquidity, 
    uint256 _amountAMin, 
    uint256 _amountBMin,
    uint _deadline
) external ensure(_deadline) returns (uint amountA, uint amountB)

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

β€» 리턴 μ‚¬μš© μ•ˆν•¨

Parameters

TypeValueDescription

address

_tokenA

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

address

_tokenB

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

uint256

_liquidity

μ–ΈμŠ€ν…Œμ΄ν‚Ή ν•  토큰 개수 (μœ λ™μ„± 토큰)

uint256

_amountMinA

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

uint256

_amountMinB

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

uint256

_deadline

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

Example

// 토큰+토큰 좜금
await routerContract.withdraw(
    mockToken0Contract.address,
    mockToken1Contract.address,
    100000,
    0,
    0,
    MaxUint256
) 

2022.12.22

Last updated