CLI Wallet Users
Guide for Electroneum CLI Wallet Users: Transitioning to the New Smart Chain
Introduction: For those who manage their ETN through the CLI wallet, or those who have a paper wallet, this comprehensive guide is designed to ensure a seamless migration to the new Electroneum Smart Chain. Let’s dive into the steps:
1 🗄️ Set up your Legacy Chain Blockchain Node
1. 1 🔽 Download the Programs Required
Make sure you're using a sufficient version of the Electroneum Flow programs (5.0.0.4 or greater). If you haven’t updated yet, visit the official Electroneum GitHub repository to get the final versions of the legacy programs. Here, you can get advice on compiling from source or you can go to the releases page to download the pre-compiled programs (easier for a newcomer).
Once you've downloaded the programs, extract them to a directory of your choosing and make note of the absolute path of this directory. You must then open the 'Terminal' program if you are using OSX or Linux and if instead you are a Windows user you should open the command prompt (cmd). You can search for these programs in the start menu of the operating systems. Open the relevant one for your OS and then follow the steps below.
1. 2 🗃️ (Optional) Import a copy of the blockchain up to a recent block height to save time
We have a recent copy of blockchain data that is available to download and then import into the node; this can save you time during the synchronisation process. You can download the mainnet blockchain file from our website, and then import the blockchain file into your node by running our import program:
On Windows this is going to be:
On macOS or Linux, this is going to be
Once the import says it has completed, it will automatically close.
1.2 🤝 Synchronise your node with the network
Firstly, make sure that you are in the directory that the blockchain programs are in
The migration can be performed with a combination of the electroneum daemon aka node (electroneumd) and either the cli wallet program (electroneum-wallet-cli) or the RPC wallet program (electroneum-wallet-rpc). First we must ensure that the blockchain node is fully synchronised with the network up until the most recent block, The blockchain daemon/node can be started simply with this command on Windows
and f you are using Linux or OSX:
After the program starts up, you should wait for the node to fully synchronise with the network, for which the confirmation will look like this
You are now synchronized with the network. You may now start electroneum-wallet-cli.
Use the "help" command to see the list of available commands.
** After the synchroisation is complete, please leave your node running whilst you complete the rest of the steps **
2 📂 Configure your Legacy Blockchain Wallet
2.1 📜 (Optional) Import Paper Wallet in CLI: Now, whilst remaining in the directory of the blockchain programs, if you have a paper wallet and you need to create a CLI wallet, you can do so by starting the CLI Wallet with the command below for Windows
and this command for Linux/OSX
and then following the prompts that the program gives you for various bits of information, all of which we will discuss below.
Your paper wallet should look like this:
First you will be prompted for your standard address and this is the address under 'Public Wallet' on your paper wallet; then you will be prompted for the secret spend key and this is the 'Private Spend' key on your paper wallet; then you will be prompted for the secret view key and this is the 'Private View' on your paper wallet; then you will be prompted for a password of your choosing for the wallet that you are creating; finally you will be asked for the height or date at which you want to restore the wallet from and unless you are certain of the first height that the wallet received funds, you can just press enter when asked this question and it will rescan the entire blockchain, however please be aware that this can take a while. The wallet program will then communicate with your node and will create and populate your wallet. You should leave your new wallet open after your import. If your balance is zero, do not worry, as this is normal and is explained in the next step.
2.2 🔄 Synchronise an Existing CLI Wallet If you have performed step 2.1a, then your wallet should already be synchronised at this point. If you already have a CLI wallet that you created a while ago, ensure that your wallet is synchronised with the blockchain. This is accomplished by simply opening the wallet after up and waiting for the auto refresh to complete. The command to open the wallet in Windows is
and Linux/OSX is:
Whether you're a new paper wallet importer or a long time cli wallet user, if you know your wallet had ETN belonging to it and your balance shows zero after the synchronisation and refresh, do not worry! This is more likely a GOOD sign, as it usually means means that your wallet has automatically migrated your balance to the PoR fork and/or bridge. More on this in the next step.
If you prefer to use the wallet-RPC to open and use your wallet (advanced users), you can migrate your wallet simply by opening it as you normally would and allowing the migration to perform automatically after your first refresh - the wallet rpc program will tell you what is going on. You can then check your migration transactions with an RPC call with method 'get_transfers' or similar.
3. 🌉 Crossing the Bridge:
Firstly it's important to be very clear in that the migration transaction(s) that you will be required to send to migrate over to the smartchain will be done automatically by the wallet. You will not have to construct these transactions manually yourself.
If you have already performed the previous steps, the wallet software should have already picked up on the readiness of the wallet and begun required migration transactions, meaning that if you made it here, your transactions should already be in motion or even completed! However, let's elaborate below for clarity.
3.1 ⛵ (Conditional) Migrating to the Public Version of the Legacy Blockchain
If your paper wallet or CLI wallet is very old, specifically meaning that you received some funds before Electroneum forked to the Public Blockchain (aka Proof of Responsibility Blockchain), and you haven't imported the paper wallet once yet or synchronised your existing cli wallet past the PoR hard fork, you will first need to allow the wallet to perform an automatic migration to the PoR blockchain before the wallet will automatically migrate your balance to the Smartchain. After you complete your wallet sync/refresh as detailed in previous steps, the PoR migration will first take place. Your PoR migration transaction will take 5 block confirmations to settle, and the status of it can be checked by typing into your wallet:
You can see further information on this transfer by taking the transaction hash listed next to the transaction and writing it into our legacy blockchain explorer. Once the five confirmations have taken place, the wallet will proceed to automatically migrating your PoR balance to the smartchain bridge address. More on that next.
3.2 🚤 Migrate your balance to the Smartchain Bridge Address Once you are migrated to the PoR blockchain, your wallet should automatically refresh and automatically migrated your balance to the Smartchain Bridge address, which is required for you to receive your funds on the Smart Chain. When the smart chain migration is taking place, the wallet will tell you that it is doing this. Again, when you are told by the wallet that your migration has happened, you may check the status of the transaction by writing
and this will give you a transaction hash that you can plug into the legacy blockchain explorer to explorer further details about the transaction. This transaction will take another five confirmations on chain to settle.
Here's what happens behind the scenes once the bridge transfer has taken place:
Your wallet will automatically migrate your balances to the bridge portal address during the aforementioned wallet synchronisation, and if for some reason this has not happened, then it should certainly happen after the next wallet refresh, which will happen automatically. The migration transaction transports your ETN to the bridge portal (address) and simultaneously logs a record of your new Smart Chain address on the legacy blockchain (Electroneum Flow), mapping your funds to your new address. You may check the status of your transaction using show_transfers as usual, and/or check the block explorer by typing your wallet address into the search bar at the top https://blockexplorer.electroneum.com/ It should look something like this. Note the 'Smartchain Address'. This is your new public wallet address for the Electroneum Smartchain.
Electroneum's bridge oracle will monitor the bridge portal address for inbound migration transactions from wallets like yours.
Once your migration transaction receives five confirmations, the oracle takes action and dispatches a Smart Chain transaction (on the new smart chain) to your new Smart Chain address. You can now take your Smartchain address and paste it into the new smartchain block explorer and you should see your balance reflected for your new address!
4. 🔐 Accessing Your New Smart Chain Wallet
Upon successfully migrating your ETN balances to the new Smart Chain, accessing and managing your ETN directly is essential. Here are the primary methods:
4A 🎭 Via Chainlist.wtf & Metamask (The best option if you're new to manually operating your wallet, eg if you were a paper wallet user with less technical skills)
Add Electroneum Smart Chain network to Metamask:
Visit chainlist.wtf and search for "Electroneum Mainnet"
Confirm the Chain ID 52014
Press "Connect Wallet", select "Metamask" and allow chainlist.wtf to add a custom network to your Metamask
Importing Your Private Key
Preparation: Ensure your computer is free from malware and key loggers. Disconnecting from the internet during the next steps might be advisable.
In Metamask: In the Accounts tab, select "Add account or hardware wallet" -> "Import Account" -> Type in your private key and select "Import"
B 💻 Via Command Line/ETN-SC Client (recommended for the more tech savvy people who wish to rely on no third party software ie Metamask)
Setting Up the Environment:
Download and install the Smart Chain (
etn-sc
) node client appropriate for your OS from the Electroneum GitHub repository. This acts as the command-line interface for running a full Electroneum node.Again, you may compile the programs yourself using the guide or you may just download the programs yourself from the official releases page if you wish to save effort and time.
Ensure that your node is synchronised with the blockchain network.
Importing Your Private Key:
Preparation: Ensure your computer is free from malware and key loggers. Disconnecting from the internet during the next steps might be advisable.
Paste your private key into a txt file: Copy the raw hex private key of your legacy Electroneum Flow wallet into a text file.
Private Key to Keystore File: Convert your raw private key into a key store file.
Open a terminal or command prompt.
Use the following command:
This will prompt you to set a password, and the
etn-sc
client will then create a new keystore file (inside directory <>) associated with the imported private key.
Accessing and Using Your Wallet:
Start the
etn-sc
client with:Once synchronised, you can use the
etn-sc
console or attach to a running instance to initiate transactions or check your balance.
If you have the
etn-sc
client already running, you can attach to this running instance. To do this:Open your terminal or command prompt.
Enter the command:
This will open the
etn-sc
console, allowing you to interact directly with the blockchain and your accounts.To view all the accounts associated with your
etn-sc
client, use the command:This will display a list of all the addresses you have in your client. If you've only
imported one private key, you'll likely see just one address starting with "0x...". This is your new Smart Chain address where your migrated funds reside.
To check the balance for an account:
Identify the index number of your account. For instance, if it's the first address in the list, it will be indexed as
[0]
.Use the following command to check the balance for the first account:
This will show the balance in the smallest unit of the cryptocurrency, being the Wei unit. 1 Electroneum (ETN) is equivalent to 1,000,000,000,000,000,000 Wei. If you want to see the balance in a more familiar denomination, you'd typically use
web3
to convert it. Web3.js is a widely used programmatic javascript tool used to interact with the blockchain and has blockchain related utilities like converting units. However, withoutweb3
, users might need to manually make the conversion or simply be aware they're seeing the balance in the base unit.Rather than attaching in the way that we have done, you can also interact with the wallet using the Electroneum Wallet RPC, a guide for which is found here JSON-RPC Server
4C ⛓️ Via local ETN-SC Client & Metamask (for those who still want to run their own node, but prefer to use Metamask for their wallet software rather than the electroneum smartchain proprietary wallet)
Setting Up the Environment:
Download and install the Smart Chain (
etn-sc
) client appropriate for your OS from the Electroneum GitHub repository. This acts as the command-line interface for running a full Electroneum node.Alternatively, obtain official pre compiled binary releases from the same Github repository.
Ensure that your node is synchronised with the blockchain network.
Add a Custom Network to Metamask
With ETN-SC running, add a custom network in Metamask using the following data:
Network Name: Electroneum SmartChain
RPC URL: http://localhost:8545
Chain ID: 52014
Currency Symbol: ETN
Block Explorer URL: https://blockexplorer.electroneum.com
Importing Your Private Key
Preparation: Ensure your computer is free from malware and key loggers. Disconnecting from the internet during the next steps might be advisable.
In Metamask: In the Accounts tab, select "Add account or hardware wallet" -> "Import Account" -> Type in your private key and select "Import"
✍️ Logs & Notifications: During migration, the CLI wallet will keep a log of all significant activities, ensuring you remain informed throughout the process.
📢 Note on Post-Fork Actions & Restrictions:
Zero Fee Transactions: Both the migration transactions to the bridge address on Electroneum Flow, and the subsequent Smart Chain transaction from the oracle, carry no fees. This ensures users are made whole as they migrate.
Post-Fork Constraints: Following the definitive hard fork on the legacy chain, wallets will only support transactions to the bridge, barring any other addresses. The only exception to this rule is migration transactions associated with the previous hard fork in which we migrated to a totally publicised blockchain (in which users balances are swept back to the same wallet); this is necessary so that older wallets can cross the Smart Chain bridge.
Last updated