QANplatform
qanplatform.comIntro to QANplatformTechnology FeaturesQANX TokenDev Docs
  • qanplatform.com
  • Welcome
  • Community
    • Social media
    • Newsletter
  • TECHNOLOGY
    • 🟢Intro to QANplatform
    • Technology Features
      • Hybrid blockchain
      • Multi-language Smart Contracts | Hyperpolyglot
      • Ethereum EVM Compatibility
      • Integrations
      • Proof-of-Randomness (PoR) consensus algorithm
      • Transaction per second (TPS)
      • Developer Royalty Fees
      • Mobile Phone Validation
      • Low-cost fixed transaction fees
      • Quantum-resistant Security
    • Use Cases
    • Blockchain 101
      • Blockchain Basics
      • Crypto Wallets
      • Coin and Token Types
      • Blockchain Transactions
  • QANX Token
    • What is QANX?
    • How to Buy QANX?
      • Buy QANX on PancakeSwap
      • Buy QANX on Uniswap
      • Buy QANX on Gate.io
      • Buy QANX on BitMart
      • Buy QANX on BingX
    • How to Store QANX
      • Store QANX in MetaMask
        • How to add QANX token to MetaMask
      • Store QANX in Trust Wallet
        • How to add QANX token to Trust Wallet
      • Store QANX in MEW
        • How to add QANX token to MEW
      • Other wallets
  • DEVELOPERS
    • QAN Private Blockchain
    • QAN TestNet
    • [QVM] Multi-language smart contracts
      • Generic workflow
        • Common API
        • Installing qvmctl
        • Setting up your workspace
        • Writing a smart contract
        • Compiling a smart contract
        • Deploying a smart contract
        • Calling a smart contract function
        • Reading smart contract storage
      • DOCs for supported languages
        • JavaScript (JS) smart contract
          • Writing a smart contract in JavaScript (JS)
          • Compiling a smart contract in JavaScript (JS)
        • Java smart contract
          • Writing a smart contract in Java
          • Compiling a smart contract in Java
        • Python smart contract
          • Writing a smart contract in Python
          • Compiling a smart contract in Python
        • TypeScript (TS) smart contract
          • Writing a smart contract in TypeScript (TS)
          • Compiling a smart contract in TypeScript (TS)
        • C# (C-Sharp) smart contract
          • Writing a smart contract in C# (C-Sharp)
          • Compiling a smart contract in C# (C-Sharp)
        • C++ smart contract
          • Writing a smart contract in C++
          • Compiling a smart contract in C++
        • C smart contract
          • Writing a smart contract in C
          • Compiling a smart contract in C
        • Golang (Go) smart contract
          • Writing a smart contract in Golang (Go)
          • Compiling a smart contract in Golang (Go)
        • Rust smart contract
          • Writing a smart contract in Rust
          • Compiling a smart contract in Rust
        • Kotlin smart contract
          • Writing a smart contract in Kotlin
          • Compiling a smart contract in Kotlin
      • [QVM] Versions & Changelog
        • V0.0.1
        • V0.0.2
    • Smart Contract Developers
    • Validators
    • Node Providers
  • ABOUT US
    • Company
    • Roadmap
    • Press kit & Media assets
    • Media mentions
    • Blog
  • Papers
    • White Paper
    • Pitch Deck
    • Onepager
    • Ebooks
      • Quantum-computing and Blockchain: The Definitive Guide
      • Blockchain's Energy Consumption: The Definitive Guide
      • Blockchain's Transaction Speed: The Definitive Guide
  • Audits
    • QANX Bridge Audit
    • QANX Token Audit
    • QAN TestNet Audit
  • Disclaimers
    • Disclaimer
      • Validation
      • Privacy Policy
      • Cookie Policy
Powered by GitBook
On this page
  • What is QVM (QAN Virtual Machine)?
  • Example QVM runtime patches
  • Architecture
  • Supported languages
  1. DEVELOPERS

[QVM] Multi-language smart contracts

PreviousQAN TestNetNextGeneric workflow

Last updated 4 months ago

This section describes what QVM (QAN Virtual Machine) is and how it works in general on a high level to get familiar with the architecture before you start building on it.

What is QVM (QAN Virtual Machine)?

QVM (QAN Virtual Machine) is the world's first blockchain Virtual Machine which is capable of executing statically linked ELF Linux binaries in a deterministic way so that they can be used for smart contracts. Such smart contract instances are launched inside a hardware separated sandbox through CPU level virtualization and are exposed to a synthetic Linux kernel which translate non-determininistic syscalls to patched variants which provide output compatible with a vanilla kernel.

Example QVM runtime patches

  • Requesting random bytes would return a byte sequence derived from the previous block's hash. While this is not random, it is deterministic and compatible with the getrandom() syscall.

  • Getting the current time via the time() syscall would always return the previous block's timestamp. Again, while this does provide the exact time (as it will mostly be a couple seconds late), but it will be also deterministic all across the entire planet on each and every executing node.

The key is that developers:

  • Do not need to deal with any such quirks and workarounds when they are writing contracts

  • Feel like they are just writing regular CLI applications

  • Can build contracts in any language which can be compiled to a statically linked binary which runs on Linux. This is pretty much any language by the way!

Architecture

Supported languages

What does it mean that a language is "supported" by QVM? Doesn't it support ALL languages?

The answer is yes, QVM supports ALL languages which can be compiled to a static ELF binary compatible with Linux. However, there is a continously expanding list of languages officially supported by QANplatform development team.

This means that for these languages there will be official tutorials and optimized compilers made available to ensure that contracts written in these languages run as efficient as possible and consume as little fees as absolutely required.

QVM is currently implemented during its testing phase as a Layer2 smart contract execution engine. Currently the only supported network is "".

Ethereum Testnet
Sepolia
DOCs for supported languages