Build
Frontend Tutorials
toolkit
Function.withdraw

@zetachain/toolkit / withdraw

withdraw(this, options): Promise<any>

Initiates a withdraw transaction of a ZRC-20 token from ZetaChain to a connected chain as a native gas or ERC-20 token.

this: ZetaChainClient

ZetaChainClient instance.

options

Withdrawal options.

options.amount: string

Amount to be withdrawn in human readable form.

options.recipient: string

Recipient address for the withdrawal. If not provided, the withdrawal is made to the signer's address.

options.zrc20: string

ZRC-20 token contract address.

Promise<any>

A promise that resolves with the transaction details upon success.

withdraw.ts:19 (opens in a new tab)