collect

function collect(
    address _tokenA,
    address _tokenB,
    uint _deadline
) public ensure(_deadline) returns(uint256 collect0, uint256 collect1)

μŠ€ν…Œμ΄ν‚Ή 이후 LP Swap 수수료만 받을 λ•Œ μ‚¬μš©

Parameters

TypeValueDescription

address

_tokenA

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

address

_tokenB

μŠ€ν…Œμ΄ν‚Ή 된 토큰B μ£Όμ†Œ (μ½”μΈμ˜ 경우 WETHμ£Όμ†Œ)

uint

_deadline

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

Return Values

TypeValueDescription

uint256

collect0

μˆ˜λ Ήν•œ tokenA swap 수수료

uint256

collect1

μˆ˜λ Ήν•œ tokenB swap 수수료

Example

await routerContract.collect(
    mockToken0Contract.address,
    mockToken1Contract.address,
    MaxUint256
) 

// κ²°κ³Ό
[ BigNumber { value: "2999999999999999" }, BigNumber { value: "0" } ]

2022.12.22

Last updated