Getting Started
Root Network is a public blockchain network built on Substrate, a general-purpose blockchain framework that provides the essential building blocks for blockchain logic. Whether you're new to blockchain development or experienced in the space, The Root Network simplifies dapp development through pre-built modules, runtime pallets, and seamless integration with Ethereum tooling.
Runtime Pallets
The Root Network makes dapp development easy via pre-built runtime modules. These work a bit like plug-and-play components that sit within the blockchain's runtime. Developers can leverage these core pallets, rather than having to code their own essential parts from scratch. Developers can opt to use all, some, or none of these modules within their dapps.
Ethereum VM Layer
One of the core runtime pallets provided by The Root Network is the evm
pallet, which provides the environment to deploy and run Ethereum Smart Contracts natively on The Root Network. This gives web3 developers access to smart contract functionality and also means that any code previously written for Ethereum can now run on The Root Network blockchain with minimal changes.
The Root Network also exposes functionalities of certain pallets as "precompiles", which allows users/tooling to query/transact with the pallet functions as if they are Solidity functions. This allows native network currencies and NFTs to appear as regular ERC-20s and ERC-721s to Ethereum tooling and contracts alongside other functionality to supercharge contract development, such as Decentralised Exchange (DEX), ERC-1155.
Native API vs EVM API
When building a dapp on The Root Network, developers have the option to either utilize the native Native API, which interacts with the runtime pallets, or they can choose to use the EVM API, which is compatible with several well-known libraries such as ethers.js
.
What are the pros and cons of each approach?
The native Native API offers the best efficiency and lower costs than smart contracts. This is because the runtime pallets are written in Rust and are highly optimized. Using the runtime pallets also saves development time because the functionalities are easily accessible through a simple JavaScript API. When designing a new dapp, we recommend searching through the pallets first to check if the problem you are addressing has already been sorted by the provided functionalities.
The EVM pallet and smart contracts offer more flexibility. You can create your custom logic and deploy it at any time. You can also use Solidity and other tools that you may be more familiar with.
Installation
To get started with building on The Root Network, you’ll need to install the appropriate tools depending on whether you're using the Native API or the EVM API. Follow the steps in the provided documentation to correctly set up your development environment.
Additional Resources
Last updated