Withdraw Funds from Escrow
Command
To withdraw funds deposited previously to an escrow account associated to a chainlet, you will need the chain-id
associated to the chainlet.
To withdraw funds from an escrow account, use
Withdrawal Example
Let us step through the withdrawal with the help of an example.
Let us assume that we have a chainlet with a chain-id
of magicwarriors_1679599719-1
.
Prior to making the withdrawal, this chainlet had access to funds from two separate accounts i.e. one belonging to the chainlet owner, and the other belonging to a different user with a key named fundkey
.
Now, the user with the key fundkey
wishes to withdraw his/her contribution of 2000tsaga
tokens from the chainlet's escrow.
Checking the Account Balance Pre-Withdrawal
Before we process this withdrawal, let us take a look at the account balance associated with the key fundkey
:
Account saga14hyhswxf0shnpzup406yvjejmfsrjnvzq897re
(associated with key fundkey
) has a balance of 8000tsaga
tokens.
Process Escrow Withdrawal
Now, we will process an escrow withdrawal from chainlet magicwarriors_1679599719-1
To do so, we will execute a withdraw-escrow
transaction in the following manner:
As can be seen from the output above, the withdrawal returned the funds to the account with the key fundkey
whose account address is saga14hyhswxf0shnpzup406yvjejmfsrjnvzq897re
.
Checking the Account Post-Withdrawal
We can also check whether the account address saga14hyhswxf0shnpzup406yvjejmfsrjnvzq897re
received the funds back and that its account balance was updated:
Yes, the account saga14hyhswxf0shnpzup406yvjejmfsrjnvzq897re
received all of the funds (2000tsaga
tokens) from the escrow, and its balance was correctly updated.
IMPORTANT: Withdrawing all of the funds in a chainlet escrow account, on behalf of all funders, will change the escrow account balance to zero which will instruct the SAGA Platform to stop running the chainlet and its related RPC and Chainlet Explorer infrastructure and services. In order to keep your chainlet live, make sure the chainlet escrow account has always enough funds to pay for the epoch fees.
Further Details
For further details and options on escrow withdrawal, please see
Last updated