withdraw

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

Example

import { withdraw } from "thirdweb/extensions/erc20";
const transaction = withdraw({
contract,
amount: ...,
overrides: {
...
}
});
// Send the transaction
...
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.