How to swap SCRT to sSCRT

peteblank
3 min readNov 9, 2020

--

In case you don’t know, scrt(secret) is a cryptocurrency that allows you to create secret contracts. It also allows you to create secret tokens, in this case sSCRT which can be swapped 1:1 back and forth.

Before we begin you’re going to need the secretcli. You can install it on Windows, Mac or Linux. I’m using Linux. If you do use Linux you should ideally use Debian or Ubuntu.

Secretcli is a terminal program that transforms SCRT into sSCRT.

To install the secretcli go to https://github.com/enigmampc/SecretNetwork/blob/master/docs/light-client-mainnet.md download the secretcli, then change folders on the terminal to where it is located. Then write on the terminal

sudo dpkg -i secret*.deb

Great, now you’ve installed the secretcli. Now configure it.

secretcli config chain-id secret-2
secretcli config output json
secretcli config indent true
secretcli config node tcp://secret-2.node.enigma.co:26657
secretcli config trust-node true

Now check the installation.

secretcli status

Next you’ll want to create a math wallet. The reason why I’m picking math wallet is because it lets you export the private keys and Mnemonic phrases.

You can get the math wallet at: https://mathwallet.org/

Great now type

secretcli keys add key address “insert-your-private-key-here’ — recover — legacy-hd-path

add you Mnemonic phrases and password.

Then deposit SCRT:

secretcli tx snip20 deposit sscrt --amount 3000000uscrt --from <account>

1 uSCRT is one millionth of a secret, so in this case 3000000 uSCRT would be 3 SCRT.

To see your account # you should type in

secretcli keys list

It should appear as name:your account #

Now to create a viewing key type

secretcli tx snip20 create-viewing-key sscrt --from <account> --gas 3000000

The recommended amount for gas is 3 SCRT but don’t worry, you’ll probably spend less than that.

It should give you a tx_hash, now to see the viewing key type:

secretcli q compute tx <tx_hash>

After you do that find the api key

and then type:

secretcli q snip20 balance sscrt <account-address> <viewing-key>

The account address is your math wallet address and your viewing key is your api key.

To convert sSCRT back to SCRT all you have to do is type:

secretcli tx snip20 redeem sscrt <amount-to-redeem> --from <account>

And that will transform the sSCRT back into SCRT in your math wallet.

To send sSCRT to your keplr wallet just type:

secretcli tx snip20 transfer sscrt <your_secret_wallet_address> <the amount of usSCRT you want to send> — from <account number>

Remember usSCRT is measured as one millionth sSCRT, so 2 sSCRT would be 2 million usSCRT.

To see how to add sSCRT to your keplr wallet see the article at: https://johnniecosmos.medium.com/guide-for-enabling-sscrt-on-keplr-f2d2df7f68e0

You can get the keplr wallet at the chrome web store.

If you come across any issues feel free to post a comment.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response