Prepares a transaction to call the "approve" function on the contract.
import { sendTransaction } from "thirdweb";import { approve } from "thirdweb/extensions/erc721"; const transaction = approve({ contract, to: ..., tokenId: ..., overrides: { ... }}); // Send the transactionawait sendTransaction({ transaction, account });
function approve( options: BaseTransactionOptions< ApproveParams | { asyncParams: () => Promise<ApproveParams> } >,): PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>;
The options for the "approve" function.
let options: BaseTransactionOptions< ApproveParams | { asyncParams: () => Promise<ApproveParams> }>;
let returnType: PreparedTransaction< any, AbiFunction, PrepareTransactionOptions>;
A prepared transaction object.