Cryptocurrency

How to Send Komodo or Any Smart Chain Funds from Your Address Without Rescanning the Wallet?

Rescan can take a long time to finish if you have thousands of transactions in your wallet. This is the case mostly for Komodo Notary Nodes. Notary Nodes are making transactions every seconds and wallet.dat size builds up over the time. It can grow couple of GB in an entire season. To maintain performance Notary Node operators resets wallet or uses cleanwallettransaction RPC call which cleans up transactions for them.

This guide is aimed at Notary Node operators who wish to salvage or retrieve funds from their wallet without rescanning the full blockchain. Also can be used for other users who does not wish to spend time with rescanning. The guide works for transparent R address on Komodo or on any other Smart Chains (SC) except PIRATE as this chain uses private address only by default. I will be showing example of how to do it for Komodo.

This method uses an Insight explorer to fetch all transaction contains to the given address inside the script while filtering out unspent txs and matching vouts based on the filter from the script. You can customize the script to not use any vouts of any size.

Important Notes:

  • You can create the raw transaction in any computer with internet connection using the output from the script.
  • You need to have your private key imported to sign the transaction (not needed if you are using your NN which already has the key).
  • You can also use offline computer to sign the transaction.
  • If you are using a computer and want to import the key, make sure to set rescan to false. Otherwise, the daemon will start rescanning the entire blockchain. (i.e.: ./komodo-cli importprivkey Uxxxxxxxxxxxxx "" false) replace Uxxxxxxxxxxxxx with your actual private key which is otherwise known as WIF (Wallet Import Format) key.
  • For broadcasting the signed transaction HEX, you can use the daemon from your NN. If you are using an offline computer, you can use an insight based explorer to broadcast the tx.

The script

Thanks to IT Expert DeckerSU for this awesome script. You can get the script from here and customize it to your need – https://github.com/DeckerSU/komodo_scripts/blob/master/sendfromaddress.sh

How to use this script?

  • Change the FROM_ADDRESS and the address in the last line to where you want to send
  • Issue the script which will generate output to createrawtransaction
  • Then, use komodo-cli and paste the output fully from above
  • Then, use komodo-cli signrawtransaction with the output from createrawtransaction call
  • Then, use komodo-cli sendrawtransaction with the signed hex or broadcast the hex using an explorer which supports broadcasting

Example of using the script including output

My script for this is called sendmined.sh and here is a full screenshot of all the steps I’ve taken to recover my KMD which were not visible to getinfo or getbalance call.

This was the resulting transaction ID 18bde489c2f20bb711b3cef07da758e7e764e6ab3f26ed1c91e916def85709ee

And, we are done spending funds without rescanning a blockchain. If you want to do this with your Smart Chain you just need to change the URL of insight explorer for your coin. (Note: You can’t use it with PIRATE or any shielded address)

If you find this article helpful please show us some love by sharing it with your friends in need. You can support us by donating any KMD or Smart Chain at this address RG839yyK53NSJMsVURNZm95YkVpjYxNoob . Thank you!

TLHD

Tech blogger, web developer. Using Android from January 2009 when I got my first T-Mobile G1. Since then used a handful amount of Android smartphones and tablets. Also, rooting and using custom ROM & MODs on my phones and tablets. Photography is my passion along with Cryptocurrency. Taking pictures with my Samsung NX1 & Canon 70D during free times. Enjoy reading anything interesting happening with technology. Currently using a Galaxy S7 Edge, OnePlus 3, Nexus 5X, Galaxy Tab PRO 12.2.

Recent Posts

UK Granted Huawei A Limited Role In 5G Network

The British government has introduced that it will continue to give Huawei minimal role… Read More

4 years ago

Use Komodo’s DEXP2P Tech for Live Streaming [How-to]

Introduction Komodo's lead developer/founder James Lee "jl777" recently started working on an exciting new tech… Read More

4 years ago

AtomicDEX Mobile Decentralised Exchange is Out for Public Beta Testing

Komodo, the pioneer of decentralised cross-chain Atomic Swap has released their new version of mobile… Read More

5 years ago

How to Check Your VerusCoin Mining Balance, Hash Power & Estimated Average Time to Mine Block

This script and guide is for users who checks their VerusCoin mining node often and… Read More

6 years ago

Claim BTG and Convert to BCH in Quick & Easy to Follow Guide

This is a step-by-step guide to claim your Bitcoin Gold (BTG) and convert them into… Read More

6 years ago

How to Claim Komodo (KMD) Reward from Ledger Nano S?

Ledger Nano S is one of the most secured HW wallet out there. HW wallets… Read More

6 years ago