SyncSwapRouterV2
ScrollAdd Liquidity
(addLiquidity)
payable
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});