Quick Overview
EOSIO/eos is an open-source blockchain platform designed for high performance, scalability, and flexibility. It aims to enable the development and deployment of decentralized applications (dApps) and smart contracts. EOSIO is known for its fast transaction speeds and fee-less model for users.
Pros
- High transaction throughput and low latency
- Fee-less transactions for end-users (resource costs are paid by dApp developers)
- Flexible permissions system and account recovery options
- Strong community support and active development
Cons
- Centralization concerns due to the limited number of block producers
- Steep learning curve for developers new to blockchain technology
- Resource allocation system (CPU, NET, RAM) can be complex for users to understand
- Potential for network congestion during high-demand periods
Code Examples
// Creating a simple smart contract
#include <eosio/eosio.hpp>
class [[eosio::contract]] hello : public eosio::contract {
public:
using eosio::contract::contract;
[[eosio::action]]
void hi(name user) {
print("Hello, ", user);
}
};
This example demonstrates a basic EOSIO smart contract with a simple "hello" action.
// Implementing a token transfer action
[[eosio::action]]
void transfer(name from, name to, asset quantity, string memo) {
check(from != to, "Cannot transfer to self");
check(quantity.is_valid(), "Invalid quantity");
check(quantity.amount > 0, "Must transfer positive quantity");
check(memo.size() <= 256, "Memo has more than 256 bytes");
sub_balance(from, quantity);
add_balance(to, quantity, from);
}
This code snippet shows how to implement a token transfer action in an EOSIO smart contract.
// Reading from and writing to a multi-index table
[[eosio::action]]
void addproduct(name user, string product_name, uint64_t price) {
require_auth(user);
products_index products(get_self(), get_self().value);
products.emplace(user, [&](auto& row) {
row.id = products.available_primary_key();
row.owner = user;
row.product_name = product_name;
row.price = price;
});
}
This example demonstrates how to add a new record to a multi-index table in an EOSIO smart contract.
Getting Started
To get started with EOSIO development:
-
Install EOSIO:
wget https://github.com/EOSIO/eos/releases/download/v2.1.0/eosio_2.1.0-1-ubuntu-18.04_amd64.deb sudo apt install ./eosio_2.1.0-1-ubuntu-18.04_amd64.deb
-
Install CDT (Contract Development Toolkit):
wget https://github.com/EOSIO/eosio.cdt/releases/download/v1.7.0/eosio.cdt_1.7.0-1-ubuntu-18.04_amd64.deb sudo apt install ./eosio.cdt_1.7.0-1-ubuntu-18.04_amd64.deb
-
Create and compile a smart contract:
eosio-cpp -abigen hello.cpp -o hello.wasm
-
Deploy the contract using cleos (EOSIO command-line tool):
cleos set contract myaccount ./hello -p myaccount@active
For more detailed instructions, refer to the official EOSIO documentation.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
EOSIO - The Most Powerful Infrastructure for Decentralized Applications
Welcome to the EOSIO source code repository! This software enables businesses to rapidly build and deploy high-performance and high-security blockchain-based applications.
Some of the groundbreaking features of EOSIO include:
- Free Rate Limited Transactions
- Low Latency Block confirmation (0.5 seconds)
- Low-overhead Byzantine Fault Tolerant Finality
- Designed for optional high-overhead, low-latency BFT finality
- Smart contract platform powered by WebAssembly
- Designed for Sparse Header Light Client Validation
- Scheduled Recurring Transactions
- Time Delay Security
- Hierarchical Role Based Permissions
- Support for Biometric Hardware Secured Keys (e.g. Apple Secure Enclave)
- Designed for Parallel Execution of Context Free Validation Logic
- Designed for Inter Blockchain Communication
Disclaimer
Block.one is neither launching nor operating any initial public blockchains based upon the EOSIO software. This release refers only to version 1.0 of our open source software. We caution those who wish to use blockchains built on EOSIO to carefully vet the companies and organizations launching blockchains based on EOSIO before disclosing any private keys to their derivative software.
Official Testnet
Supported Operating Systems
EOSIO currently supports the following operating systems:
- Amazon Linux 2
- CentOS 7
- CentOS 7.x
- CentOS 8
- Ubuntu 16.04
- Ubuntu 18.04
- Ubuntu 20.04
- MacOS 10.14 (Mojave)
- MacOS 10.15 (Catalina)
Note: It may be possible to install EOSIO on other Unix-based operating systems. This is not officially supported, though.
Software Installation
If you are new to EOSIO, it is recommended that you install the EOSIO Prebuilt Binaries, then proceed to the Getting Started Guide. If you are an advanced developer, a block producer, or no binaries are available for your platform, you may need to Build EOSIO from source.
Note: If you used our scripts to build/install EOSIO, please run the Uninstall Script before using our prebuilt binary packages.
Prebuilt Binaries
Prebuilt EOSIO software packages are available for the operating systems below. Find and follow the instructions for your OS:
Mac OS X:
Mac OS X Brew Install
brew tap eosio/eosio
brew install eosio
Note: On MacOS 10.15 (Catalina), there is a chance to face the linking error below which prevents successful installation of EOSIO:
Reinstalling 1 broken dependent from source:
eosio/eosio/eosio
The following Homebrew commands will resolve this issue:
brew link eosio
Mac OS X Brew Uninstall
brew remove eosio
Ubuntu Linux:
Ubuntu 20.04 Package Install
wget https://github.com/eosio/eos/releases/download/v2.1.0/eosio_2.1.0-1-ubuntu-20.04_amd64.deb
sudo apt install ./eosio_2.1.0-1-ubuntu-20.04_amd64.deb
Ubuntu 18.04 Package Install
wget https://github.com/eosio/eos/releases/download/v2.1.0/eosio_2.1.0-1-ubuntu-18.04_amd64.deb
sudo apt install ./eosio_2.1.0-1-ubuntu-18.04_amd64.deb
Ubuntu 16.04 Package Install
wget https://github.com/eosio/eos/releases/download/v2.1.0/eosio_2.1.0-1-ubuntu-16.04_amd64.deb
sudo apt install ./eosio_2.1.0-1-ubuntu-16.04_amd64.deb
Ubuntu Package Uninstall
sudo apt remove eosio
RPM-based (CentOS, Amazon Linux, etc.):
RPM Package Install CentOS 7
wget https://github.com/eosio/eos/releases/download/v2.1.0/eosio-2.1.0-1.el7.x86_64.rpm
sudo yum install ./eosio-2.1.0-1.el7.x86_64.rpm
RPM Package Install CentOS 8
wget https://github.com/eosio/eos/releases/download/v2.1.0/eosio-2.1.0-1.el8.x86_64.rpm
sudo yum install ./eosio-2.1.0-1.el8.x86_64.rpm
RPM Package Uninstall
sudo yum remove eosio
Uninstall Script
To uninstall the EOSIO built/installed binaries and dependencies, run:
./scripts/eosio_uninstall.sh
Documentation
Resources
- Website
- Blog
- Developer Portal
- StackExchange for Q&A
- Community Telegram Group
- Developer Telegram Group
- White Paper
- Roadmap
Getting Started
Instructions detailing the process of getting the software, building it, running a simple test network that produces blocks, account creation and uploading a sample contract to the blockchain can be found in the Getting Started Guide.
Contributing
License
EOSIO is released under the open source MIT license and is offered âAS ISâ without warranty of any kind, express or implied. Any security provided by the EOSIO software depends in part on how it is used, configured, and deployed. EOSIO is built upon many third-party libraries such as WABT (Apache License) and WAVM (BSD 3-clause) which are also provided âAS ISâ without warranty of any kind. Without limiting the generality of the foregoing, Block.one makes no representation or guarantee that EOSIO or any third-party libraries will perform as intended or will be free of errors, bugs or faulty code. Both may fail in large or small ways that could completely or partially limit functionality or compromise computer systems. If you use or implement EOSIO, you do so at your own risk. In no event will Block.one be liable to any party for any damages whatsoever, even if it had been advised of the possibility of damage.
Important
See LICENSE for copyright and license terms.
All repositories and other materials are provided subject to the terms of this IMPORTANT notice and you must familiarize yourself with its terms. The notice contains important information, limitations and restrictions relating to our software, publications, trademarks, third-party resources, and forward-looking statements. By accessing any of our repositories and other materials, you accept and agree to the terms of the notice.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot