Smart Contracts on peaq are used to execute all sorts of business logic, varying according to use case. They run on-chain for maximum trust and enabling Smart Contract to Smart Contract calls. Smart Contracts on peaq can be programmed in any programming language compiled with WASM (WebAssembly) such as Python, Go, Rust, Java and C. WASM is continually developed by major companies such as Google, Apple, Microsoft and Mozilla. Additional benefits of WASM include:
Memory-safe, Sandboxed, and platform-independent.
Floating point operations can be removed to make Smart Contracts deterministic.
64 and 32-bit integer operation support. Maps one-to-one with CPU instructions.
Supported by the LLVM compiler infrastructure project. WASM benefits from over 10 years of LLVM’s compiler optimisation.