Filter by category:

Knowledge hub home

 The EVM Smart Contract Module

EVM smart contract module

Translations can be found here: 

Smart contracts are coming to CENNZnet! Our newest module means that as well as utilising our prebuilt core runtime modules, developers can build CENNZnet DApps with smart contracts.

Even better, our EVM smart contract module implements the EVM specification described in the Ethereum Yellowpaper. This means that CENNZnet can now read smart contracts written in Solidity, making it super easy to transfer DApps from Ethereum to CENNZnet. Alongside the Emery bridge, the EVM module smoothly integrates CENNZnet with the large community of Ethereum users making CENNZnet an EVM compatible blockchain.


What is the EVM smart contract module?

EVM stands for Ethereum Virtual Machine. EVM is the mechanism developers are required to use to run smart contracts on the Ethereum blockchain. The EVM mechanism reads smart contracts written in Solidity or Vyper.

In order to adopt smart contracts on the CENNZnet blockchain, the CENNZnet team built our very own EVM mechanism within our blockchain runtime. This EVM runs within the CENNZnet blockchain protocol and is able to read Solidity smart contracts and execute them on CENNZnet. This gives CENNZnet developers access to smart contract functionality and also means that any code previously written for Ethereum can now run on the CENNZnet blockchain natively. 


Why did we choose EVM functionality to enable smart contracts on CENNZnet?

There are many ways to bring smart contract functionality to CENNZnet, so why did we choose an EVM mechanism? 

There are a few clear reasons. Firstly it gives CENNZnet users battle-tested smart contracts. While there are some technically better smart contract mechanisms out there, none have the same level of security testing e.g. the $320 mill hack on Solana happened because it has its own smart contract system that hasn’t been through as much rigorous testing as the EVM. The nature of smart contracts means they hold a lot of sensitive information, so tight security is absolutely key. 

EVM compatibility also has huge advantages for blockchain developers. It gives DApp builders familiar access to existing mature tooling such as wallets and libraries from Ethereum. These tools or even a whole smart contract/ DApp can be used as-is and deployed on CENNZnet using the EVM module. This easy DApp and tool migration is really useful for boosting CENNZnet’s user base and allows for exciting cross-blockchain DApps.


The benefits of the EVM smart contract module

In list form CENNZnet’s EVM support has a few important implications:

  • Access Ethereum code & infrastructure: CENNZnet DApp developers can now take advantage of the code and infrastructure built by the Ethereum ecosystem when building CENNZnet DApps.
  • Easy DApp migration: Ethereum DApp developers can easily migrate their DApps to CENNZnet for faster transaction speeds and lower transaction fees.
  • Speak your language: Solidity developers can keep using their favourite tools when developing on CENNZnet.
  • Smart contracts on CENNZnet: The EVM module allows you to call CENNZnet modules from your smart contract code. This means you can create custom on-chain logic on top of the CENNZnet runtime modules.


Choosing between the EVM module and runtime modules

The EVM module now gives DApp developers a choice of building methods. You can now implement your DApp using smart contracts through the EVM module or runtime modules. So which should you choose? 

In short, it depends on what you are looking for.

The runtime modules are the most efficient and cost-effective method of developing on CENNZnet. All runtime modules are written in Rust which makes them highly optimised on the blockchain’s protocol. The runtime modules also offer a selection of common DApp functionalities made easily accessible through a simple JavaScript API. (A list of the CENNZnet runtime module functionalities can be found here.) This can save you a good amount of development time, so we would advise all devs to search through the modules to see if the problem has already been solved before writing your own smart contract.

The EVM smart contract 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 that you may be more familiar with. You can also call CENNZnet modules from your Smart Contracts, so you can combine the power of CENNZnet modules with existing Ethereum DApps.


How can you get started with the EVM smart contract module?

To get building your smart contracts on CENNZnet follow our smart contract guide here.