How to Migrate Pirate (ARRR) from sprout address to sapling address

ParrotGotMeEye edited this page Dec 19, 2018 · 8 revisions

There is no need to wait for zmigrate if you are up to doing a few manual transactions. This is fine if you have less than 5000 PIRATE as it would just look like the final part of a zmigrate sequence. If you have a large amount, you would want to break it up into smaller, if only to enable it to finish processing.

Step 1: Fund preparation

First you need a new sprout (zc) address to send all the existing sprout funds to. So make a new sprout address and z_exportkey to get its privkey. Now, send all funds other than 0.0001 to the new sprout address. This will likely take a long long time if you have many z_utxo. It might even get an error if it takes too long, in that case just send partial amounts, like 500.0002

Important: Each time you send a private transaction, please wait for it to confirm before issuing the next one. If your transaction is unconfirmed state, you will not see actual balance and next operation may not work. To find a details of displayed opid use the following command. The opid will show you the details of that specific z transaction along with txid which you can search on Pirate explorer.

./pirate z_getoperationstatus [\"opid-84a07937-1a46-41fb-9cf3-80c7d422d373\"]

Replace the opid with the one displayed in your console after each z_sendmany call.

Generate a new sprout address

./komodo-cli -ac_name=PIRATE z_getnewaddress sprout

This will printout a new sprout address starting with zc.

Send funds to your new sprout address with small uniformed amount

Add 0.0002 for every 500 or 5000 chunks. This will be used as fee for 2 transactions.

./komodo-cli -ac_name=PIRATE z_sendmany currentsproutzaddr "[{\"address\": \"newsproutzaddr\",\"amount\": 500.0002}]"

Check balance of new sprout address after confirmation

Ok, so now all your sprout funds are in the new sprout address. You can get your exact balance with:

./komodo-cli -ac_name=PIRATE z_getbalance newsproutzaddr

Step 2: Migrate

Generate a new onetime use t address

You now need to generate a onetime use taddr for the migration

./komodo-cli -ac_name=PIRATE getnewaddress

This will printout a taddr starting with R.

Send funds from new sprout address to t address

Send all newsprout funds other than 0.0001, so if it has 500.0002 send 500.0001

./komodo-cli -ac_name=PIRATE z_sendmany newsproutzaddr "[{\"address\": \"taddr\",\"amount\": 500.0001}]"

Generate a new sapling address

You now need to generate a sapling address to send the funds as final destination.

./komodo-cli -ac_name=PIRATE z_getnewaddress

This will printout a saplingaddr starting with zs.

Send funds to sapling address

And here we can finally get the funds into a sapling address!

./komodo-cli -ac_name=PIRATE z_sendmany taddr "[{\"address\": \"saplingaddr\",\"amount\": 500}]"

zmigrate dAPP

The above is the core of what zmigrate is doing automatically. You can type only one line code to do the same with zmigrate dApp. Make sure Pirate wallet daemon is running before using the following commands.

cd ~/komodo/src
./cc/dapps/makedapps
./zmigrate PIRATE saplingaddr

That is all you need to do for zmigrate. If that is too hard, you will need to wait until GUI comes out.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.