withdrawPair

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

토큰+토큰 언스테이킹 할 때 사용 (리워드 자동 획득)

※ 리턴 사용 안함

Parameters

Type
Value
Description

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