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