createUnsignedUserOp
Creates an unsigned user operation from a prepared transaction.
import { createUnsignedUserOp } from "thirdweb/wallets/smart"; const transaction = prepareContractCall(...); const userOp = await createUnsignedUserOp({ transaction, factoryContract, accountContract, adminAddress, sponsorGas, overrides,});
function createUnsignedUserOp(args: {  adminAddress: string;  overrides?: {    accountAddress?: string;    accountSalt?: string;    bundlerUrl?: string;    createAccount?: (    entrypointAddress?: string;    erc20Paymaster?: { address: string; token: string };    execute?: (      transaction: SendTransactionOption,    executeBatch?: (      transactions: Array<SendTransactionOption>,    predictAddress?: (    ) => Promise<string>;  };  sponsorGas: boolean;
The prepared transaction and options
let args: {  adminAddress: string;  overrides?: {    accountAddress?: string;    accountSalt?: string;    bundlerUrl?: string;    createAccount?: (    entrypointAddress?: string;    erc20Paymaster?: { address: string; token: string };    execute?: (      transaction: SendTransactionOption,    executeBatch?: (      transactions: Array<SendTransactionOption>,    predictAddress?: (    ) => Promise<string>;  };  sponsorGas: boolean;};
The unsigned user operation