πŸ“š
Open Polkadot Bootcamp
  • πŸ“š About the Bootcamp
    • πŸ“– Additional Resources
    • πŸ‘ Ask For Support
  • πŸ“– Curriculum
  • πŸ“•Rust Programming Language
    • Basic Rust
      • Introduction to Rust
        • πŸ§‘β€πŸ’» Excercises
      • Common Programming Concepts
        • πŸ§‘β€πŸ’» Excercises
      • Program Life Cycle
        • πŸ§‘β€πŸ’» Excercises
      • Ownership & Borrow Checker
      • Common Data Structures
    • Advanced Rust
      • Generic types, Trait extension and Advanced types
      • Lifetime Notation
      • Smart pointers & Macros
      • Common design patterns in Rust
      • Package management & How to structure your Rust project
      • Overview of the Rust ecosystem
  • πŸ“˜Building a blockchain with Polkadot SDK
    • Polkadot
      • Additional Reads
        • Why do you want to build a blockchain on Polkadot?
        • Understanding the sharded network design of Polkadot
      • Development on Polkadot
    • Polkadot SDK
      • Substrate
        • Create a new blockchain
          • πŸ§‘β€πŸ’» Exercise: Clone the minimal template
          • Understanding the architecture
          • Break down the node architecture
          • Introducing to Pop CLI tool
        • Adding a custom logic to runtime
          • πŸ§‘β€πŸ’» Exercise: Rust State Machine
          • Components of a Pallet
          • Hooks
          • Weights & Benchmarking
          • Extensions
            • Signed Extensions
            • Transaction Extensions
        • Common runtime modules
          • πŸ“•Example: System Pallet
          • πŸ“•Example: Contracts Pallet
          • πŸ“•Example: Assets Pallet
          • πŸ“•Example: Utility Pallet
        • Runtime API and RPC
        • Runtime upgrade
        • Bump Polkadot SDK versions
      • Cumulus
        • Introduction to Cumulus
          • Parachain from scratch
          • πŸ§‘β€πŸ’» Exercise: Build a parachain from scratch
        • Running a local relaychain network
          • Register & reserve a parachain
          • Launch the network & run a collator node
          • Launch the network with Pop CLI
        • Agile Coretime
    • Polkadot Hub
  • πŸ“’Smart Contract Development
    • Introduction
      • Introduction to PolkaVM
      • Getting started with Solidity development
      • Solidity File Structure
      • Contract Structure
    • Basic Solidity
      • Value types
      • Reference Types
      • Mapping Types
      • Simple Storage
    • Advanced Solidity
      • Units
      • Global Variables
      • Expression and Control Structures
      • Advanced Storage
      • Contract Tests
      • Contracts
Powered by GitBook
On this page
  • Overview
  • PolkaVM
  • What is smart contract?
  • Transaction and how to sign a Transaction
  1. Smart Contract Development
  2. Introduction

Introduction to PolkaVM

Overview

PolkaVM

PolkaVM, short for Polka Virtual Machine, is a decentralized virtual machine environment running on the Polkadot blockchain network. PolkaVM enables the execution of smart contracts, which are programs that automatically execute transactions or specific actions based on pre-coded conditions. Smart contracts are written in programming languages ​​such as Solidity, then compiled into bytecode that KLVM can understand and execute. PolkaVM is compatible with Ethereum's EVM, so it fully supports current development tools, opcode, and source code.

What is smart contract?

A smart contract is a type of computer program designed to automatically execute, control, or confirm events and actions according to pre-programmed terms. They exist and operate on PolkaVM, ensuring high transparency and security as they cannot be modified once deployed. Smart contracts help automate processes, reduce the need for intermediaries and minimize the risk of fraud or errors. They are versatile and can be used in a variety of fields, from finance and insurance to supply chain management and real estate. The development of smart contracts is ushering in a new era in the way we interact and conduct digital transactions, bringing greater efficiency, transparency and autonomy to users.

Transaction and how to sign a Transaction

In the Asset Hub network, a "transaction" or transaction is an action performed by a user to transfer DOT (Polakdot native token) or Asset Hub based tokens from one address to another, or to interact with contracts. smart contract. Each transaction includes information such as source address, destination address, amount of money transferred, gas (transaction fee), and optional data if the transaction interacts with a smart contract.

When making transactions on Asset Hub, signing the transaction using a crypto wallet like MetaMask is an important step to ensure safety and security. Specifically, this process takes place as follows:

  1. Create Transaction: User enters necessary information for the transaction such as receiving address, amount of DOT or tokens to transfer, and gas. In MetaMask, for example, users can adjust gas levels so transactions are processed faster.

  2. Transaction Signing: Once the transaction information is entered, the wallet generates a digital transaction signed with the user's private key. Signing this transaction proves that the user has the right to use the address from which the transaction was sent without revealing their private key.

  3. Sending Transaction: The signed transaction is then sent to the Asset Hub network via a wallet such as MetaMask. The network will confirm the transaction and execute it, transfer funds or interact with the smart contract as requested.

  4. Transaction Confirmation: Finally, the transaction will be confirmed by the network, and information about it will be recorded on the blockchain. Users can track the status of transactions through online tools such as Subscan.

This process not only helps ensure transactions are carried out securely, but also helps prevent tampering or unauthorized alteration of transactions, thanks to the transparency and immutability of the blockchain.

PreviousIntroductionNextGetting started with Solidity development

Last updated 5 months ago

πŸ“’