Skip to main content
Version: v1.4

Supported Virtual Machines & Languages

The current release of IOTA Smart Contracts has support for EVM/Solidity smart contracts, as well as experimental Wasm smart contracts, providing compatibility with existing smart contracts and tooling from other EVM based chains like Ethereum. This allows us to offer the existing ecosystem around EVM/Solidity a familiar alternative.

EVM Smart Contracts

What is EVM/Solidity?

EVM stands for "Ethereum Virtual Machine" and is currently the tried and tested virtual machine running most smart contract networks.

Solidity is the programming language of choice for the EVM. It was created for this specific purpose.

The main benefit of using EVM/Solidity is its sheer amount of resources from years of development. The IOTA Smart Contracts implementation is fully compatible with all of them. If you have experience developing on other EVM based chains, you will feel right at home. Any existing contracts you've written will need no changes to function on IOTA Smart Contracts.

How IOTA Smart Contracts Work With EVM

Every deployed ISC chain automatically includes a core contract called evm. This core contract is responsible for running EVM code and storing the EVM state.

The Wasp node also provides a standard JSON-RPC service, which allows you to interact with the EVM layer using existing tooling like MetaMask, Remix or Hardhat. Deploying EVM contracts is as easy as pointing your tools to the JSON-RPC endpoint.

EVM Compatibility

The ISC EVM layer is also designed to be as compatible as possible with existing Ethereum tools and functionalities. However, please make sure you have checked out the current properties and limitations.

Wasm VM for ISC

Experimental

The Wasm VM is in experimental state, showcasing ISC's "VM plugin" architecture.

Experiment but avoid using it for production applications; opt for EVM.

IOTA Smart Contracts (ISC) provide a sandboxed environment through an API, facilitating secure and deterministic interactions with ISC functions. This API supports any Virtual Machine (VM) aiming to build a system for smart contract code execution on ISC.

Wasp node ISC Host

You can use a WebAssembly (Wasm) VM as a compilation target, facilitated by the open-source Wasmtime runtime. This setup encourages dynamic smart contract operations compiled to Wasm code, promoting security and adaptability with different programming languages.

Wasm VM

The Wasm VM operates with self-contained WasmLib libraries linked to individual Wasm codes, optimizing the ISC sandbox functionality and smart contract state storage access.

Supported Functionalities

The ISC sandbox environment offers:

  • Smart contract metadata and state data access.
  • Request data retrieval for function calls.
  • Token management within the contract.
  • Utility functions from the host.
  • Smooth initiation of other smart contract functions.
  • Logging facility.

Supported Languages

The WasmLib started with Rust support, expanding to include Go and TypeScript with the help of respective Wasm code generators:

LanguageWasm code generator
GoTinyGo
Rustwasm-pack
TypeScriptAssemblyScript

These generators maintain a common subset of their host language, aiming for a unified coding style to simplify the initiation into smart contract creation, welcoming developers with a C-style language background to quickly adapt.