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
  • Generate a random private key
  • Determine your wallet address
  • Get some sETH for your wallet
  1. DEVELOPERS
  2. [QVM] Multi-language smart contracts
  3. Generic workflow

Setting up your workspace

A workspace is nothing else but a folder which will be mounted into the qvm-compiler-* and qvmctl docker containers.

It will contain:

  • A private key used for deployment and contract calls

  • The smart contract binary to be deployed

To create the workspace create the ws directory in your current directory like this:

mkdir ws && cd ws

Generate a random private key

First you need a random secp256k1 private key, which is (almost) any random 32 byte sequence in a hexadecimal format with 0x prepended to it. If you have OpenSSL installed (most likely you have it if you are running Linux or macOS) then you can generate one easily with the following command:

echo "0x"$(openssl rand -hex 32) > privkey.txt

Determine your wallet address

Based on the randomly generated key you will end up with a wallet address. Run the following command in your terminal:

docker run --rm -v $(pwd):/ws qanplatform/qvmctl deploy --privkey privkey.txt .

Mind the dot (".") at the end of the command!

If you did it correctly you will receive a message like "Connected to QVM Repository with 0xYOURADDRESS". The message is followed by an insufficient balance notification, which is of course normal.

Get some sETH for your wallet

As stated previously, QVM is tested as a Layer2 smart contract execution engine on the Sepolia Ethereum testnet. First you will need at least 1 sETH so you can play around with QVM, because fees related to the operations must be paid on the testnet as well.

You can get some sETH for your wallet on these Faucet websites for example:

Enter the wallet address you obtained in the previous step and wait for your sETH to arrive.

PreviousInstalling qvmctlNextWriting a smart contract

Last updated 2 years ago

https://sepolia-faucet.pk910.de
https://grabteeth.xyz
https://fauceth.komputing.org