Beginner’s Guide to EOS and Basic Smart Contracts

Table of Contents

Read Time: 5 minutes

1. What is Eosio?

Eosio is software that introduces a blockchain architecture and claims to be a decentralized operating system which supports Dapps, it has developed under an open-source MIT software license. has built the eosio software, it is a leading blockchain solution company that provides high-performance blockchain solution.

The software provides accounts, authentication, databases, asynchronous communication and the scheduling of applications across multiple CPU cores and/or clusters.

2. How Eosio is different from other Blockchain (mainly Ethereum)?

Eosio is more scalable as it claims to manage millions of transaction per second, they are claiming this because they use DPOS(delegated proof of stake) consensus mechanism.
EOS provides parallel processing of smart contracts through horizontal scalability, they achieve horizontal scalability by adding more system to the resource pool.
They are planning to completely remove transaction fees, Eos works on an ownership model whereby users own and are entitled to use resources proportional to their stake, rather than having to pay for every transaction.

Prior knowledge required:

C/C++ intermediate experience
Blockchain Conceptual knowledge
Linux or command line tool

Architecture of EOSIO

All the terms in the architecture diagram will be explained later on when it is required don’t get confused with the diagram.

Firstly you need to setup the environment and have to install all the dependencies and contract development toolkit to create wallet and accounts on EOS blockchain.

3. Setup Environment

3.1) Download dependencies:


3.2) Setup a development directory

Command :

Mkdir EOStest

Cd EOStest

3.3) Get the Dockers image

The below statement will download an Ubuntu image which contains the compiled software.

docker pull eosio/eos:v1.4.2

3.4) Boot node and Wallet

Command :

docker run — name eosio 
 — publish 8888:8888 
 — publish 
 — volume /home/abhi_21094/Desktop/EOStest:/home/abhi_21094/Desktop/EOStest 
 — detach 
/bin/bash -c 
“keosd — http-server-address= & exec nodeos -e -p eosio — plugin eosio::producer_plugin — plugin eosio::chain_api_plugin — plugin eosio::history_plugin — plugin eosio::history_api_plugin — plugin eosio::http_plugin -d /mnt/dev/data — config-dir /mnt/dev/config — http-server-address= — access-control-allow-origin=* — contracts-console — http-validate-host=false — filter-on=’*’”

These settings accomplish the following:

  1. Forward port 8888 and 5555 to host machine
  2. Alias a work volume on your local drive to the docker container.
  3. Run the Nodeos startup in bash. This command loads all the basic plugins, set the server address, enable CORS and add some contract debugging.
  4. Enable CORS with no restrictions (*)

3.5) Check the Installation

Command :

docker logs — tail 10 eosio

3.6) Check the Wallet

Open a new tab in the terminal

Command :

docker exec -it eosio bash
cleos — wallet-url wallet list

As now keosd is running successfully, now you should know the following terms that we will use during installation and also while developing.

What is Cleos?

(cli + eos = cleos) — command line interface to interact with the blockchain and to manage wallets.

What is Nodeos?

nodeos (node + eos = nodeos) — the core EOSIO node daemon that can be configured with plugins to run a node.

What is Keosd?

(key + eos = keosd) — component that securely stores EOSIO keys in wallets.

3.7) Check Nodeos endpoints

This will check that RPC API working correctly

curl http://localhost:7777/v1/chain/get_info

You can also check this in your Browser provide by chain_api_plugin


3.8) Aliasing Cleos

We don’t need to enter in dockers container bash every time we interact with keosd so a solution for this we can alias it

alias cleos=’docker exec -it eosio /opt/eosio/bin/cleos — url — wallet-url'

Execute this command in your terminal or add this to your .bashrc file , you can find .bashrc file at home it may be a hidden file , use shortcut cntrl + h to show hidden files.

4. Contract Development Toolkit(Install CDT)

CDT for short, is a collection of tools related to contract compilation, use CDT primarily for compiling contracts and generating ABIs.

Install Command :

Wget .rpm
sudo yum install ./eosio.cdt-1.3.2.x86_64–0.x86_64.rpm

Copy this command and execute in your terminal you will get the following result

Till now you have successfully setup the environment and installed Contract development toolkit. Now you will going setup wallet and account that really very interesting part of EOS

blockchain .

5. Create Development Wallet

5.1) create a wallet

To create a wallet you need to enter in a docker container bash by using the following command

Command :

sudo docker exec -it eosio bash

After that enter wallet creation command

cleos wallet create — to-console

— to — console is used because we are using only for development purpose not production for production use — to — file as it will return your wallet private.

Wallets are closed by default

Command :

Cleos wallet open
Cleos wallet list

If you will get the following result then your wallet is created and opened successfully.

By default your cleos wallet is locked you need to unlock it by using the command : cleos wallet unlock, you can see the difference between locked and unlocked wallet when you execute a command cleos wallet list it will return default for now without asterisk when it is locked, after

executing unlock command you can see the asterisk sign which shows now wallet is unlocked.

Now we have to import the key in the wallet

cleos wallet create_key

Result: Created a new private key with a public key of: “EOS8PEJ…GDJQY5Y”

By executing this command you will get the public key as shown below copy that key.

5.2) Import Development Key

cleos wallet import

Now enter eosio development key provided below:


The default wallet is now unlocked and a key has been loaded. You are ready to proceed.

Use case: Deploy, Issue and transfer Tokens

We are implementing a token contract to issue token and transfer to any account/user.

Source Code is available at EOSIO’S GitHub:

Command :

git clone — branch v1.4.0 — single-branch

Make sure you are in the eosio contract directory:

cd eosio.contracts/eosio.token

6) Create Account

An account is a collection of authorizations, stored on the blockchain, and used to identify a sender/recipient.

cleos create account eosio eosio.token EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV

6.1) Compile Contract

eosio-cpp -I include -o eosio.token.wasm src/eosio.token.cpp — abigen

6.2) Deploy Contract

cleos set contract eosio.token /home/abhi_21094/Desktop/EOStest/eosio.contracts/eosio.token — abi eosio.token.abi -p [email protected]

6.3) Create Token

cleos push action eosio.token create ‘[ “eosio”, “1000000000.0000 SYS”]’ -p [email protected]

6.4) Issue Token

cleos push action eosio.token create ‘{“issuer”:”eosio”, “maximum_supply”:”1000000000.0000 SYS”}’ -p [email protected]

6.5) Transfer Tokens from one account to another account

cleos push action eosio.token transfer ‘[ “alice”, “bob”, “25.0000 SYS”, “m” ]’ -p [email protected]

6.6) Return a Transaction in JSON

cleos push action eosio.token issue ‘[“alice”, “100.0000 SYS”, “memo”]’ -p [email protected] -d -j

6.7) To check the balance of any account using the account name

cleos get currency balance eosio.token bob SYS
25.00 SYS
cleos get currency balance eosio.token alice SYS
75.00 SYS

Well Done You have successfully Set Up Environment, Created Wallet, Accounts, compiled and Deployed Smart Contract of Token on EOSIO Blockchain.

We’re available for EOS smart contract development and security auditing work. You can fill this form to get in touch.

Thanks for reading. Also, do check out our earlier blog posts.

At QuillHash, we understand the Potential of Blockchain and have a good team of developers who can develop any blockchain applications like Smart Contracts, dApps,Smart Coins, DeFi, DEX on the any Blockchain Platform like EthereumEOS and Hyperledger.

To be up to date with our work, Join Our Community :-

Telegram | Twitter | Facebook | LinkedIn


Related Articles

View All


Due to the fact that Web3 technology is still in its infancy, new types of attacks are possible. Some attacks, like ice phishing, are specific to Web3, while others resemble credential phishing attacks.




The $BEVO NFT Art Token (BEVO) on BSC was exploited, resulting in a $45,000 loss.

The root cause of the exploit is that BEVO is a deflationary token. By invoking function deliver(), the value _rTotal will decrease.

QuillAudits 🤝 Gamestarter

@Gamestarter is a complete Web3 ecosystem including an IDO launchpad, game development studio, accelerator, incubator, and soon NFT marketplace, gaming guild and metaverse.

QuillAudits extends its partnership with Gamestarter.


Thoreum Finance on the BNB chain was exploited on January 18, 2023. The exploit resulted in the protocol losing approximately 2261 BNB (~$680K).

✔ Check out our latest article to learn more about how it happens.👇


#web3 #Security #Audit


phyProxy on BSC was attacked, resulting in a loss of 1.2K BUSD.

The root cause is a forced investment due to the delegate calls unverified input in the public delegateCallSwap function.

Load More

Amidst FTX Saga, Hacker Swept More Than $25 Million in 2nd week of November

The contract reinvested (the earn function was not called) before the user pledged (depositAll function) without settling the reward, which means that when the user pledged, the contract did not settle the previous reward and instead conducted a new investment.

Become a Quiffiliate!
Join our mission to safeguard web3

Sounds Interesting, Right? All you have to do is:


Refer QuillAudits to Web3 projects for audits.


Earn rewards as we conclude the audits.


Thereby help us Secure web3 ecosystem.

Total Rewards Shared Out: $190K+