Cleos is a powerful command line tool that interfaces with API and interacts with blockchains based on EOSIO and smart contracts.
In this tutorial we will learn how to install cleos and create a local wallet. This is a good way to start understanding how a blockchain works.
Further on, as a practical lesson for handling the tool, we will perform a simple voting command on the Telos blockchain.
Legal disclaimer: we are not financial advisors. The tutorials in this website are not financial advices.
You can follow these tutorials at your own risk and nobody can guarantee your results. Cryptocurrency investment is risky, please be cautious.
Different countries have different rules for cryptocurrency.
It’s very important for your own security that before continuing with this tutorial you know the importance of your private key of your account. Keep your device safe. If your device is compromised, the wallet can be compromised too. Ignoring this step will highly increase the chances of your funds being lost or stolen, in which case we won’t be able to help you.
WARNING: following this tutorial means that You And Only You are Responsible For Your Security.
### So, let's start! ###
Requirements:
- Linux Ubuntu 18.04 or Windows 10 with a Linux console installed
Note: in Windows 10, by enabling WSL, you can open a Linux console; to do that, first enable WSL, then launch Ubuntu 18.04 by following these procedures:
Windows 10 how to enable WSL
Install a Linux distro on Windows
- Telos account
Those who have not an account on Telos blockchain can follow one of these procedures:
Create Telos account
or
Another way to create Telos account
mkdir ~/blockchain
cd ~/blockchain
wget https://github.com/EOSIO/eos/releases/download/v2.0.9/eosio_2.0.9-1-ubuntu-18.04_amd64.deb
chmod +x eosio_2.0.9-1-ubuntu-18.04_amd64.deb
sudo apt install ./eosio_2.0.9-1-ubuntu-18.04_amd64.deb
cleos version client
cleos wallet create --to-console
cleos wallet open
cleos wallet unlock
cleos wallet import --private-key
cleos wallet keys
cleos -u API_SERVER_HERE push transaction '{"delay_sec":0,"max_cpu_usage_ms":0,"actions":[{"account":"eosio","name":"voteproducer","data":{"voter":"YOUR_ACCOUNT_HERE","proxy":"vote2telosbp","producers":[]},"authorization":[{"actor":"YOUR_ACCOUNT_HERE","permission":"active"}]}]}'
cleos wallet lock_all
cleos wallet stop
cleos -u API_SERVER_HERE get account YOUR_ACCOUNT_HERE