thirdweb

SyncSwapRouterV2

Linea
EtherscanBlockscout

Add Liquidity

(addLiquidity)

payable

pool

inputs

Input should be passed in JSON format - Ex: [{ "token": "0x...", "amount": "0", "useVault": true }]

data

minLiquidity

callback

callbackData

staking


The native currency value (in Ether) to send with this transaction (ex: 0.01 to send 0.01 native currency).

Sign in

Use this function in your app


import { prepareContractCall, sendTransaction } from "thirdweb"; const transaction = await prepareContractCall({ contract, method: "function addLiquidity(address pool, (address token, uint256 amount, bool useVault)[] inputs, bytes data, uint256 minLiquidity, address callback, bytes callbackData, address staking) payable returns (uint256 liquidity)", params: [pool, inputs, data, minLiquidity, callback, callbackData, staking] }); const { transactionHash } = await sendTransaction({ transaction, account });