You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: llms.txt
+56Lines changed: 56 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6830,6 +6830,9 @@ These block explorers provide essential capabilities for interacting with smart
6830
6830
6831
6831
The following block explorers are available for PolkaVM smart contracts, providing specialized tools for monitoring and analyzing contract activity within the Polkadot ecosystem:
6832
6832
6833
+
!!! warning "PolkaVM is in Alpha"
6834
+
Smart contracts built with PolkaVM are still experimental, handle with care.
6835
+
6833
6836
<!-- ### Subscan
6834
6837
6835
6838
Subscan is the flagship Polkadot ecosystem block explorer with comprehensive support for PolkaVM smart contracts. It provides robust transaction indexing, account analysis, and monitoring tools specifically optimized for Polkadot SDK-based networks.
@@ -7633,6 +7636,9 @@ Choose a parachain if:
7633
7636
7634
7637
Polkadot Hub uses [PolkaVM](/polkadot-protocol/smart-contract-basics/polkavm-design){target=\_blank} instead of traditional EVM:
7635
7638
7639
+
!!! warning "PolkaVM is in Alpha"
7640
+
Smart contracts built with PolkaVM are still experimental, handle with care.
7641
+
7636
7642
- **Performance**: RISC-V register-based architecture vs. stack-based EVM.
7637
7643
- **Resource metering**: Three dimensions (`ref_time`, `proof_size`, `storage_deposit`) vs. single gas metric.
7638
7644
- **Memory management**: Hard memory limits per contract vs. gas-based soft limits.
@@ -7764,6 +7770,9 @@ Follow this step-by-step process to develop and deploy smart contracts in the Po
Smart contracts built with PolkaVM are still experimental, handle with care.
7775
+
7767
7776
## Additional Resources
7768
7777
<div class="grid cards" markdown>
7769
7778
@@ -9352,6 +9361,9 @@ npm init -y
9352
9361
9353
9362
Install viem along with other necessary dependencies, including [@parity/revive](https://www.npmjs.com/package/@parity/revive){target=\_blank}, which enables to compile smart contracts to [PolkaVM](/polkadot-protocol/smart-contract-basics/polkavm-design/#polkavm){target=\_blank} bytecode:
9354
9363
9364
+
!!! warning "PolkaVM is in Alpha"
9365
+
Smart contracts built with PolkaVM are still experimental, handle with care.
9366
+
9355
9367
```bash
9356
9368
# Install viem and Revive
9357
9369
npm install viem @parity/revive
@@ -10407,6 +10419,9 @@ main();
10407
10419
10408
10420
Polkadot Hub requires contracts to be compiled to [PolkaVM](/polkadot-protocol/smart-contract-basics/polkavm-design/){target=\_blank} bytecode. This is achieved using the [`revive`](https://github.com/paritytech/revive){target=\_blank} compiler. Install the [`@parity/revive`](https://github.com/paritytech/js-revive){target=\_blank} library as a development dependency:
10409
10421
10422
+
!!! warning "PolkaVM is in Alpha"
10423
+
Smart contracts built with PolkaVM are still experimental, handle with care.
10424
+
10410
10425
```bash
10411
10426
npm install --save-dev @parity/revive
10412
10427
```
@@ -10789,6 +10804,9 @@ Before deploying your contracts, make sure you've compiled them and obtained two
10789
10804
- An ABI (.json) file, which provides a JSON interface describing the contract's functions and how to interact with it
10790
10805
- A bytecode (.polkavm) file, which contains the low-level machine code executable on [PolkaVM](/polkadot-protocol/smart-contract-basics/polkavm-design#polkavm){target=\_blank} that represents the compiled smart contract ready for blockchain deployment
10791
10806
10807
+
!!! warning "PolkaVM is in Alpha"
10808
+
Smart contracts built with PolkaVM are still experimental, handle with care.
10809
+
10792
10810
To follow this guide, you can use the following solidity contract as an example:
10793
10811
10794
10812
```solidity title="Storage.sol"
@@ -11179,6 +11197,9 @@ These guides explore the diverse smart contract options available in the Polkado
11179
11197
11180
11198
Polkadot Hub enables smart contract deployment and execution through PolkaVM, a cutting-edge virtual machine designed specifically for the Polkadot ecosystem. This native integration allows developers to deploy smart contracts directly on Polkadot's system chain while maintaining compatibility with Ethereum development tools and workflows.
11181
11199
11200
+
!!! warning "PolkaVM is in Alpha"
11201
+
Smart contracts built with PolkaVM are still experimental, handle with care.
11202
+
11182
11203
### Smart Contract Development
11183
11204
11184
11205
The smart contract platform on Polkadot Hub combines _Polkadot's robust security and scalability_ with the extensive Ethereum development ecosystem. Developers can utilize familiar Ethereum libraries for contract interactions and leverage industry-standard development environments for writing and testing smart contracts.
@@ -11296,6 +11317,9 @@ flowchart LR
11296
11317
classDef edgeLabel background:#eceff3;
11297
11318
```
11298
11319
11320
+
!!! warning "PolkaVM is in Alpha"
11321
+
Smart contracts built with PolkaVM are still experimental, handle with care.
11322
+
11299
11323
## Standard Precompiles in Polkadot Hub
11300
11324
11301
11325
Revive implements the standard set of Ethereum precompiles:
While [PolkaVM](/polkadot-protocol/smart-contract-basics/polkavm-design/){target=\_blank} strives for maximum Ethereum compatibility, several fundamental design decisions create necessary divergences from the [EVM](https://ethereum.org/en/developers/docs/evm/){target=\_blank}. These differences represent trade-offs that enhance performance and resource management while maintaining accessibility for Solidity developers.
24160
24184
24185
+
!!! warning "PolkaVM is in Alpha"
24186
+
Smart contracts built with PolkaVM are still experimental, handle with care.
24187
+
24161
24188
## Core Virtual Machine Architecture
24162
24189
24163
24190
The most significant departure from Ethereum comes from PolkaVM's foundation itself. Rather than implementing the EVM, PolkaVM utilizes a RISC-V instruction set. For most Solidity developers, this architectural change remains transparent thanks to the [Revive compiler's](https://github.com/paritytech/revive){target=\_blank} complete Solidity support, including inline assembler functionality.
@@ -24431,6 +24458,9 @@ Explore foundational concepts that shape smart contract functionality on Polkado
24431
24458
- **Networks** – an overview of smart contract-enabled networks within the Polkadot ecosystem
24432
24459
- **Blocks, transactions, and fees** – understanding transaction lifecycle, execution fees, and resource management
24433
24460
24461
+
!!! warning "PolkaVM is in Alpha"
24462
+
Smart contracts built with PolkaVM are still experimental, handle with care.
24463
+
24434
24464
## In This Section
24435
24465
24436
24466
:::INSERT_IN_THIS_SECTION:::
@@ -24540,6 +24570,9 @@ This guide outlines the primary approaches to developing smart contracts in the
24540
24570
- **EVM-compatible contracts** - which support languages like [Solidity](https://soliditylang.org/){target=\_blank} and [Vyper](https://vyperlang.org/){target=\_blank}, offering compatibility with popular Ethereum tools and wallets
24541
24571
- **Wasm-based smart contracts** - using [ink!](https://use.ink/){target=\_blank}, a Rust-based embedded domain-specific language (eDSL), enabling developers to leverage Rust’s safety and tooling
24542
24572
24573
+
!!! warning "PolkaVM is in Alpha"
24574
+
Smart contracts built with PolkaVM are still experimental, handle with care.
24575
+
24543
24576
You'll explore the key differences between these development paths, along with considerations for parachain developers integrating smart contract functionality.
24544
24577
24545
24578
!!!note "Parachain Developer?"
@@ -24694,6 +24727,9 @@ The Asset Hub smart contracts solution includes multiple components to ensure Et
24694
24727
24695
24728
The interpreter remains particularly beneficial for contracts with minimal code execution, as it eliminates JIT compilation overhead and enables immediate code execution through lazy interpretation.
24696
24729
24730
+
!!! warning "PolkaVM is in Alpha"
24731
+
Smart contracts built with PolkaVM are still experimental, handle with care.
24732
+
24697
24733
## Architecture
24698
24734
24699
24735
The smart contract solution consists of the following key components that work together to enable Ethereum compatibility on Polkadot-based chains:
@@ -35072,6 +35108,9 @@ Let's start by cloning the Uniswap V2 project:
35072
35108
cd polkavm-hardhat-examples/uniswap-v2-polkadot/
35073
35109
```
35074
35110
35111
+
!!! warning "PolkaVM is in Alpha"
35112
+
Smart contracts built with PolkaVM are still experimental, handle with care.
35113
+
35075
35114
2. Install the required dependencies:
35076
35115
35077
35116
```bash
@@ -35316,6 +35355,9 @@ tutorial_badge: Beginner
35316
35355
35317
35356
[ERC-20](https://eips.ethereum.org/EIPS/eip-20){target=\_blank} tokens are fungible tokens commonly used for creating cryptocurrencies, governance tokens, and staking mechanisms. Polkadot Hub enables easy token deployment with Ethereum-compatible smart contracts via PolkaVM.
35318
35357
35358
+
!!! warning "PolkaVM is in Alpha"
35359
+
Smart contracts built with PolkaVM are still experimental, handle with care.
35360
+
35319
35361
This tutorial covers deploying an ERC-20 contract on the Polkadot Hub TestNet using [Polkadot Remix IDE](https://remix.polkadot.io){target=\_blank}, a web-based development tool. [OpenZeppelin's ERC-20 contracts]({{ dependencies.repositories.open_zeppelin_contracts.repository_url}}/tree/{{ dependencies.repositories.open_zeppelin_contracts.version}}/contracts/token/ERC20){target=\_blank} are used for security and compliance.
35320
35362
35321
35363
## Prerequisites
@@ -35479,6 +35521,9 @@ tutorial_badge: Beginner
35479
35521
35480
35522
Non-Fungible Tokens (NFTs) represent unique digital assets commonly used for digital art, collectibles, gaming, and identity verification. Polkadot Hub supports Ethereum-compatible smart contracts through PolkaVM, enabling straightforward NFT deployment.
35481
35523
35524
+
!!! warning "PolkaVM is in Alpha"
35525
+
Smart contracts built with PolkaVM are still experimental, handle with care.
35526
+
35482
35527
This tutorial guides you through deploying an [ERC-721](https://eips.ethereum.org/EIPS/eip-721){target=\_blank} NFT contract on the Polkadot Hub TestNet using the [Polkadot Remix IDE](https://remix.polkadot.io){target=\_blank}, a web-based development environment. To ensure security and standard compliance, it uses [OpenZeppelin's NFT contracts]({{ dependencies.repositories.open_zeppelin_contracts.repository_url}}/tree/{{ dependencies.repositories.open_zeppelin_contracts.version}}){target=\_blank} implementation.
35483
35528
35484
35529
## Prerequisites
@@ -35655,6 +35700,9 @@ Jump into the tutorials and learn how to:
35655
35700
35656
35701
Choose a tutorial below and start coding today!
35657
35702
35703
+
!!! warning "PolkaVM is in Alpha"
35704
+
Smart contracts built with PolkaVM are still experimental, handle with care.
35705
+
35658
35706
## In This Section
35659
35707
35660
35708
:::INSERT_IN_THIS_SECTION:::
@@ -36489,6 +36537,8 @@ To get started right away with a working example, you can clone the repository a
0 commit comments