withdraw

Prepares a transaction to call the "withdraw" function on the contract.

Example

import { sendTransaction } from "thirdweb";
import { withdraw } from "thirdweb/extensions/erc4626";
const transaction = withdraw({
contract,
assets: ...,
receiver: ...,
owner: ...,
overrides: {
...
}
});
// Send the transaction
await sendTransaction({ transaction, account });
function withdraw(
WithdrawParams | { asyncParams: () => Promise<WithdrawParams> }
>,

Parameters

The options for the "withdraw" function.

Type

WithdrawParams | { asyncParams: () => Promise<WithdrawParams> }
>;

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.