Introduction to the Wasm VM for ISC
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.
We offer a VM example utilizing WebAssembly (Wasm) 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.
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.
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
|Language||Wasm code generator|
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.