Withdraw Assets

Withdrawing assets requires you to have a balance of tokens in the canister book. To view your balance go here #view-token-balance. Once you know you have a book balance, withdraw using these functions.

The balance you will receive will be the amount - the specific fee of the token.

In all functions listed:

type Token = principal 

And the _accountId, _account, _address are the desired accounts you want to send your withdrawn tokens to.

💰Withdrawing ICP

- Using Motoko

withdraw_icp(_amount: Nat, _accountId: Text) : async T.WithdrawReceipt

💰Withdrawing ICRC1

- Using Motoko

withdraw_icrc1(_token:T.Token,_amount:Nat, _account:Icrc1.Account): async T.WithdrawReceipt

💰Withdrawing DIP20

- Using Motoko

withdraw_dip(_token: T.Token, _amount: Nat, _address: Principal) : async T.WithdrawReceipt

Last updated