SyncSwapRouter

Scroll
Scrollscan

Add Liquidity

(addLiquidity)

payable


pool

inputs

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

data

minLiquidity

callback

callbackData


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)[] inputs, bytes data, uint256 minLiquidity, address callback, bytes callbackData) payable returns (uint256 liquidity)",
params: [pool, inputs, data, minLiquidity, callback, callbackData]
});
const { transactionHash } = await sendTransaction({
transaction,
account
});