Difference between revisions of "How to "rescue" stuck DFI"
(Created page with "How to "rescue" stuck DFI Do this on console. Check getbalance that it is less than the DFI Now we need to convert the token DFI into UTXO DFI. Use listaccounts to list all...") |
|||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | '''Disclaimer: Console should be used in care. We are not responsible if the wrong commands are issued resulting in lost coins!''' | |
− | + | If you have problems sending your DFI from the Wallet try the following '''step-by-step instruction''' | |
− | |||
− | + | ==Step 1: Checking DFI-coin vs. DFI-token== | |
+ | Before starting we should check, if a DFI-sending problem is caused by "unwrapped" DFI | ||
− | + | [[File:DFI_Wallet.webp|DFI-amount showed in the wallet]] | |
− | + | Your DFI-Wallet is showing an DFI amount. To see, how many coins and tokens you have, you need the following 2 commands: | |
− | + | <span style="color:#FF0000"> getbalance </span> | |
+ | <br><span style="color:#FF0000"> gettokenbalances {} true true</span> | ||
− | |||
− | + | [[File:DFI-coins vs. DFI-token.webp|checking DFI-coins vs. DFI-token]] | |
− | + | <br>In the above picture you see, most DFI are Token and not Coins. These Tokens cannot be transferred to another address. | |
+ | |||
+ | <b>HINT : You may need some DFI-coins (see getbalance) to execute commands from Step 4.</b> | ||
+ | |||
+ | |||
+ | |||
+ | ==Step 2: Find addresses holding DFI-Token== | ||
+ | The above shown DFI-amount are hold by one or more addresses. To find out, which one are hold the token, use the following command: | ||
+ | |||
+ | <span style="color:#FF0000"> listaccounts {} false false true </span> | ||
+ | |||
+ | You are getting a list of entries, which should look like this: | ||
+ | |||
+ | [[File:Address with DFI-token.webp|address with DFI-token]] | ||
+ | |||
+ | |||
+ | |||
+ | ==Step 3: Checking all tokens on relevant address== | ||
+ | Before changing token to coin, please check the amount and all the other tokens on this address with: | ||
+ | |||
+ | <span style="color:#FF0000"> getaccount <i>address_from_command_before</i> </span> | ||
+ | |||
+ | You should get the following result: | ||
+ | |||
+ | [[File:Tokens on address.webp|List of tokens on the address]] | ||
+ | |||
+ | |||
+ | |||
+ | ==Step 4: Converting token to coin== | ||
+ | Now, we come to the last, essential step. This will convert an amount of token into coins. Use the command: | ||
+ | |||
+ | <span style="color:#FF0000"> accounttoutxos <i>address_from_above</i> {"<i>adress_from_above</i>":"<i>DFI_amount_to_convert</i>@DFI"} </span> | ||
+ | |||
+ | |||
+ | ===Error=== | ||
+ | <strong>If you execute the command from Step 4, you may get the following error:</strong> | ||
+ | |||
+ | [[File:Error changing token to coin.webp|Error when changing token to coin]] | ||
+ | |||
+ | Then you need additional steps: | ||
+ | |||
+ | |||
+ | ====Step 4.1: Sending DFI-coin to Token-adress==== | ||
+ | Send a small amount of DFI to this address! | ||
+ | |||
+ | [[File:Result Tx-Hash.webp|Sending DFI-coin to address with token, result is a Tx-hash]] | ||
+ | |||
+ | You will get an Tx-Hash as a result. | ||
+ | |||
+ | |||
+ | ====Step 4.2: Check Confirmation==== | ||
+ | Please go to https://explorer.defichain.io/#/DFI/mainnet/home to check, if it is confirmed before you proceed. | ||
+ | |||
+ | [[File:Check Confirmation.webp|Confirmations after exection of command]] | ||
+ | |||
+ | |||
+ | ====Step 4.3: Converting token to coin==== | ||
+ | Now, you can run the accounttoutxos command from above again. If it is successful, you will get an Tx-hash, which can be checked in the explorer again (Step 5) | ||
+ | |||
+ | [[File:Token-to-Coin conversion.webp|Successful execution of Token-to-Coin conversion]] | ||
+ | |||
+ | |||
+ | |||
+ | ==Step 5: Check conversion== | ||
+ | Just to be sure, everythin worked, you can run the commands <span style="color:#FF0000"> getaccount <i>address</i> </span> and <span style="color:#FF0000"> getbalance </span> again. | ||
+ | <br>In the following Picture, you see that the DFI-coin amount is now increased by 2DFI. The token were converted. | ||
+ | |||
+ | [[File:New Balance.webp|New token and coin balance]] | ||
+ | |||
+ | |||
+ | |||
+ | ==Source== | ||
+ | Daniel Zirkel: https://www.reddit.com/r/defiblockchain/comments/kb10d3/stepbystep_changing_dfitoken_to_dficoin/?utm_medium=android_app&utm_source=share |
Latest revision as of 20:20, 16 December 2020
Disclaimer: Console should be used in care. We are not responsible if the wrong commands are issued resulting in lost coins!
If you have problems sending your DFI from the Wallet try the following step-by-step instruction
Step 1: Checking DFI-coin vs. DFI-token
Before starting we should check, if a DFI-sending problem is caused by "unwrapped" DFI
Your DFI-Wallet is showing an DFI amount. To see, how many coins and tokens you have, you need the following 2 commands:
getbalance
gettokenbalances {} true true
In the above picture you see, most DFI are Token and not Coins. These Tokens cannot be transferred to another address.
HINT : You may need some DFI-coins (see getbalance) to execute commands from Step 4.
Step 2: Find addresses holding DFI-Token
The above shown DFI-amount are hold by one or more addresses. To find out, which one are hold the token, use the following command:
listaccounts {} false false true
You are getting a list of entries, which should look like this:
Step 3: Checking all tokens on relevant address
Before changing token to coin, please check the amount and all the other tokens on this address with:
getaccount address_from_command_before
You should get the following result:
Step 4: Converting token to coin
Now, we come to the last, essential step. This will convert an amount of token into coins. Use the command:
accounttoutxos address_from_above {"adress_from_above":"DFI_amount_to_convert@DFI"}
Error
If you execute the command from Step 4, you may get the following error:
Then you need additional steps:
Step 4.1: Sending DFI-coin to Token-adress
Send a small amount of DFI to this address!
You will get an Tx-Hash as a result.
Step 4.2: Check Confirmation
Please go to https://explorer.defichain.io/#/DFI/mainnet/home to check, if it is confirmed before you proceed.
Step 4.3: Converting token to coin
Now, you can run the accounttoutxos command from above again. If it is successful, you will get an Tx-hash, which can be checked in the explorer again (Step 5)
Step 5: Check conversion
Just to be sure, everythin worked, you can run the commands getaccount address and getbalance again.
In the following Picture, you see that the DFI-coin amount is now increased by 2DFI. The token were converted.