Overview
The Ethereum Virtual Machine (EVM) is the runtime environment for smart contracts, enabling compatibility with Ethereum-based dApps. Sei is an EVM compatible blockchain. Sei’s parallelized EVM ensures high performance and efficiency.- Turing Completeness: The EVM is Turing complete, meaning it can execute any computable function. This allows developers to write complex smart contracts.
- Gas: Transactions and contract executions on the EVM compatible network consume gas. Gas is a measure of computational work, and users pay for it in usei on Sei networks. Gas ensures that malicious or inefficient code doesn’t overload the network.
- Bytecode Execution: Smart contracts are compiled into bytecode (low-level machine-readable instructions) and deployed to the EVM compatible network. The EVM executes this bytecode.
Try it: deploy without any setup
You don’t need a local toolchain to ship a contract to Sei. First confirm the network is live, then compile and deploy a minimalCounter.sol to testnet straight from the browser.
Add Sei testnet to your wallet, then deploy from Remix below — compile under Solidity Compiler, then Deploy & Run with Environment set to Injected Provider — MetaMask:
Smart contract languages
The two most popular languages for developing smart contracts on the EVM are Solidity and Vyper.Solidity
- Object-oriented, high-level language for implementing smart contracts.
- Curly-bracket language that has been most profoundly influenced by C++.
- Statically typed (the type of a variable is known at compile time).
- Supports:
- Inheritance (you can extend other contracts).
- Libraries (you can create reusable code that you can call from different contracts – like static functions in a static class in other object oriented programming languages).
- Complex user-defined types.
Example solidity contract
Vyper
- Pythonic programming language
- Strong typing
- Small and understandable compiler code
- Efficient bytecode generation
- Deliberately has less features than Solidity with the aim of making contracts
more secure and easier to audit. Vyper does not support:
- Modifiers
- Inheritance
- Inline assembly
- Function overloading
- Operator overloading
- Recursive calling
- Infinite-length loops
- Binary fixed points