EVM Smart Contract
Utilizing the Ethereum Virtual Machine (EVM) Smart Contract module as well as our prebuilt core runtime modules, developers can build The Root Network dapps with smart contracts.
The EVM integration ensures extensive support for smart contracts, dapps, and existing Ethereum asset collections, facilitating interoperable development and the effortless transition of Ethereum functionality to The Root Network with bidirectional communication. With the integrated EVM, developers can further enhance The Root Network's capabilities by deploying their own smart contracts, fostering deep connectivity to ROOT's native runtimes for an enriched developer and user experience.
Smart Contract Module
EVM is the mechanism developers must use to run smart contracts on the Ethereum blockchain. The EVM mechanism reads smart contracts written in Solidity.
To integrate smart contracts into The Root Network blockchain, we built our very own EVM mechanism within our blockchain runtime. This EVM runs within The Root Network blockchain protocol and is able to read Solidity smart contracts and execute them on The Root Network. This gives The Root Network developers access to smart contract functionality and also means that any code previously written for Ethereum can now run on The Root Network blockchain natively.
Benefits of Smart Contract Module
The Root Network’s EVM support has a few important implications:
Access Ethereum code and infrastructure: The Root Network dapp developers can take advantage of the code and infrastructure built by the Ethereum ecosystem when building The Root Network dapps.
Easy dapp migration: Ethereum dapp developers can easily migrate their dapps to The Root Network for faster transaction speeds and lower transaction fees.
Speak your language: Solidity developers can keep using their favourite tools when developing on The Root Network.
Smart contracts on The Root Network: The EVM module allows you to call The Root Network modules from your smart contract code. This means you can create custom on-chain logic on top of The Root Network runtime modules.
Choosing Between the EVM Module and Runtime Module
The EVM module now gives dapp developers a choice of building methods. You can implement your dapp using smart contracts through the EVM module or runtime modules. Depending on what you are looking to build, choose one of the methods:
The runtime modules are the most efficient and cost-effective method of developing on The Root Network. All runtime modules are written in Rust, which makes them highly optimised on the blockchain’s protocol. The runtime modules also provide a selection of standard dapp functionalities made easily accessible through a simple JavaScript API. This helpful resource can save you a good amount of development time. We recommend developers explore the modules to check if the problem you are addressing has already been sorted by the provided functionalities before writing your custom smart contract.
The EVM module offers more flexibility. You can create your own custom logic to be deployed at any time. The EVM also allows you to use Solidity and tooling from Ethereum, which you may be more familiar with. You can also call The Root Network modules from your Smart Contracts to combine the power of The Root Network modules with existing Ethereum dapps.
For more information, see Building with EVM API.
Next Steps
To get building your dapp using the EVM module:
Check out the EVM API section
Check out the curated EVM code examples
Last updated