Dual VM System
EVM and WASM contract execution
Selendra runs both EVM and WASM contracts on the same network with shared accounts.
EVM
- Full Ethereum compatibility via Frontier
- Solidity contracts work unchanged
- Hardhat, Truffle, Remix, MetaMask supported
- Standard gas costs
WASM
- Rust contracts via ink! framework
- Better performance, smaller size
- Lower gas for complex logic
- More flexible than EVM
When to Use
| Use EVM | Use WASM |
|---|---|
| Porting Solidity contracts | Performance-critical logic |
| Using OpenZeppelin | Fine-grained control |
| Team knows Solidity | Team knows Rust |
| Quick prototyping | Long-term projects |
Shared Features
- Same accounts - One address for both VMs
- Same network - No bridges needed
- Same security - Equal finality guarantees
Gas Models
- EVM: Standard Ethereum gas
- WASM: Weight-based (generally lower for complex ops)
Interoperability
- WASM can call EVM contracts
- EVM calling WASM: under development
- Workaround: shared storage layer
Development
| EVM | WASM |
|---|---|
| JavaScript/TypeScript | Rust |
| Solidity | ink! |
| Web3.js/ethers.js | Polkadot.js |
Contribute
Found an issue or want to contribute?
Help us improve this documentation by editing this page on GitHub.
