AddLiquidity
Last updated
Last updated
[blockchain/ethereum/Uniswap/v2/Router/AddLiquidity]
Calls "addLiquidity" method on Uniswap V2 Router contract
tokenA:
Receives parameters for tokenA.
address: the address of the token
desiredAmount: the (maximal) amount we want to add to the liquidity pool in tokenA
minimalAmount: the minimal amount we want to add to the liquidity pool in tokenA, if the current exchange ratio implies an amount smaller than that, the operation should fail
tokenB:
Receives parameters for tokenB.
address: the address of the token
desiredAmount: the (maximal) amount we want to add to the liquidity pool in tokenB
minimalAmount: the minimal amount we want to add to the liquidity pool in tokenB, if the current exchange ratio implies an amount smaller than that, the operation should fail
liquidity token to: string
Receives address to send liquidity tokens to
deadline: number
Receives deadline for the transaction (future unix timestamp)
router contract: {"address": string, "abi": {string: any}[]}
Receives parameters of the Uniswap V2 Router contract to interact with
credentials:
Receives credentials for the operation
result: any
Sends out the result of addLiquiditiy call.
error: {"error": string}
Sends out any error that happened during addLiquidity call.