Liquidity adder ETH
Last updated
Last updated
[blockchain/ethereum/Uniswap/v2/Liquidity adder ETH]
Add liquidity to a pool. If the pool doesn't exists it will be created.
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
ETH:
Receives parameters for ETH.
desiredAmount: the (maximal) amount we want to add to the liquidity pool in ETH
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
to address: string
Receives the address that will get the minted liquidity token.
deadline: number
Receives the unix timestamp of the deadline until the operation should be completed or will be reverted.
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 the operation in case of success
error: {"error": string}
Sends out any error that occured during the liquidity addition process.