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
+34-33Lines changed: 34 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -9337,6 +9337,9 @@ description: This guide covers deploying and interacting with contracts on Polka
9337
9337
9338
9338
[viem](https://viem.sh/){target=\_blank} is a lightweight TypeScript library designed for interacting with Ethereum-compatible blockchains. This comprehensive guide will walk you through using viem to interact with and deploy smart contracts to Polkadot Hub.
9339
9339
9340
+
!!! smartcontract "PolkaVM Alpha Release"
9341
+
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
9342
+
9340
9343
## Prerequisites
9341
9344
9342
9345
Before getting started, ensure you have the following installed:
@@ -9381,9 +9384,6 @@ npm init -y
9381
9384
9382
9385
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:
9383
9386
9384
-
!!! smartcontract "PolkaVM Alpha Release"
9385
-
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
9386
-
9387
9387
```bash
9388
9388
# Install viem and Revive
9389
9389
npm install viem @parity/revive
@@ -10320,6 +10320,9 @@ Interacting with blockchains typically requires an interface between your applic
10320
10320
10321
10321
This guide is intended for developers who are familiar with JavaScript and want to interact with the Polkadot Hub using Web3.js.
10322
10322
10323
+
!!! smartcontract "PolkaVM Alpha Release"
10324
+
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
10325
+
10323
10326
## Prerequisites
10324
10327
10325
10328
Before getting started, ensure you have the following installed:
@@ -10442,9 +10445,6 @@ main();
10442
10445
10443
10446
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:
10444
10447
10445
-
!!! smartcontract "PolkaVM Alpha Release"
10446
-
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
10447
-
10448
10448
```bash
10449
10449
npm install --save-dev @parity/revive
10450
10450
```
@@ -10742,6 +10742,9 @@ Interacting with blockchains typically requires an interface between your applic
10742
10742
10743
10743
This guide illustrates how to utilize Web3.py for interactions with Polkadot Hub.
10744
10744
10745
+
!!! smartcontract "PolkaVM Alpha Release"
10746
+
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
10747
+
10745
10748
## Set Up the Project
10746
10749
10747
10750
1. To start working with Web3.py, begin by initializing your project:
@@ -10827,9 +10830,6 @@ Before deploying your contracts, make sure you've compiled them and obtained two
10827
10830
- An ABI (.json) file, which provides a JSON interface describing the contract's functions and how to interact with it
10828
10831
- 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
10829
10832
10830
-
!!! smartcontract "PolkaVM Alpha Release"
10831
-
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
10832
-
10833
10833
To follow this guide, you can use the following solidity contract as an example:
10834
10834
10835
10835
```solidity title="Storage.sol"
@@ -11317,6 +11317,9 @@ Precompiles serve a dual purpose in the Polkadot ecosystem: they not only enable
11317
11317
11318
11318
This article explores how Polkadot leverages precompiles within the Revive pallet to enhance efficiency and how they will extend functionality for developers in the future, including planned access to native features like Cross-Consensus Messaging (XCM).
11319
11319
11320
+
!!! smartcontract "PolkaVM Alpha Release"
11321
+
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
11322
+
11320
11323
## What are Precompiles?
11321
11324
11322
11325
Precompiles are special contract implementations that run directly at the runtime level rather than as on-chain PolkaVM contracts. In typical EVM environments, precompiles provide essential cryptographic and utility functionality at addresses that start with specific patterns. Revive follows this design pattern but with its own implementation optimized for PolkaVM.
@@ -11343,9 +11346,6 @@ flowchart LR
11343
11346
classDef edgeLabel background:#eceff3;
11344
11347
```
11345
11348
11346
-
!!! smartcontract "PolkaVM Alpha Release"
11347
-
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
11348
-
11349
11349
## Standard Precompiles in Polkadot Hub
11350
11350
11351
11351
Revive implements the standard set of Ethereum precompiles:
@@ -24757,6 +24757,9 @@ description: Discover PolkaVM, a high-performance smart contract VM for Polkadot
24757
24757
24758
24758
The Asset Hub smart contracts solution includes multiple components to ensure Ethereum compatibility and high performance. Its architecture allows for integration with current Ethereum tools, while its innovative virtual machine design enhances performance characteristics.
24759
24759
24760
+
!!! smartcontract "PolkaVM Alpha Release"
24761
+
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
24762
+
24760
24763
## PolkaVM
24761
24764
24762
24765
[**PolkaVM**](https://github.com/paritytech/polkavm){target=\_blank} is a custom virtual machine optimized for performance with [RISC-V-based](https://en.wikipedia.org/wiki/RISC-V){target=\_blank} architecture, supporting Solidity and additional high-performance languages. It serves as the core execution environment, integrated directly within the runtime. It features:
@@ -24768,9 +24771,6 @@ The Asset Hub smart contracts solution includes multiple components to ensure Et
24768
24771
24769
24772
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.
24770
24773
24771
-
!!! smartcontract "PolkaVM Alpha Release"
24772
-
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
24773
-
24774
24774
## Architecture
24775
24775
24776
24776
The smart contract solution consists of the following key components that work together to enable Ethereum compatibility on Polkadot-based chains:
@@ -35128,6 +35128,9 @@ Decentralized exchanges (DEXs) are a cornerstone of the DeFi ecosystem, allowing
35128
35128
35129
35129
This tutorial will guide you through how Uniswap V2 works so you can take advantage of it in your projects deployed to Polkadot Hub. By understanding these contracts, you'll gain hands-on experience with one of the most influential DeFi protocols and understand how it functions across blockchain ecosystems.
35130
35130
35131
+
!!! smartcontract "PolkaVM Alpha Release"
35132
+
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
35133
+
35131
35134
## Prerequisites
35132
35135
35133
35136
Before starting, make sure you have:
@@ -35149,9 +35152,6 @@ Let's start by cloning the Uniswap V2 project:
35149
35152
cd polkavm-hardhat-examples/uniswap-v2-polkadot/
35150
35153
```
35151
35154
35152
-
!!! smartcontract "PolkaVM Alpha Release"
35153
-
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
[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.
35401
35401
35402
+
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.
35403
+
35402
35404
!!! smartcontract "PolkaVM Alpha Release"
35403
35405
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
35404
35406
35405
-
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.
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.
35567
35567
35568
+
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.
35569
+
35568
35570
!!! smartcontract "PolkaVM Alpha Release"
35569
35571
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
35570
35572
35571
-
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.
35572
-
35573
35573
## Prerequisites
35574
35574
35575
35575
Before starting, make sure you have:
@@ -35728,6 +35728,9 @@ template: index-page.html
35728
35728
35729
35729
Get started with deploying and interacting with smart contracts on Polkadot through practical, hands-on tutorials. Whether you're a beginner or an experienced developer, these guides will help you navigate the entire development lifecycle.
35730
35730
35731
+
!!! smartcontract "PolkaVM Alpha Release"
35732
+
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
35733
+
35731
35734
## What to Expect from These Tutorials
35732
35735
35733
35736
- **Beginner to advanced** – suitable for developers of all levels
@@ -35744,9 +35747,6 @@ Jump into the tutorials and learn how to:
35744
35747
35745
35748
Choose a tutorial below and start coding today!
35746
35749
35747
-
!!! smartcontract "PolkaVM Alpha Release"
35748
-
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
35749
-
35750
35750
## In This Section
35751
35751
35752
35752
:::INSERT_IN_THIS_SECTION:::
@@ -35964,6 +35964,9 @@ Decentralized applications (dApps) have become a cornerstone of the Web3 ecosyst
35964
35964
35965
35965
In this tutorial, you'll build a complete dApp that interacts with a smart contract deployed on the Polkadot Hub TestNet. It will use [Ethers.js](/develop/smart-contracts/libraries/ethers-js){target=\_blank} to interact with the blockchain and [Next.js](https://nextjs.org/){target=\_blank} as the frontend framework. By the end of this tutorial, you'll have a functional dApp that allows users to connect their wallets, read data from the blockchain, and execute transactions.
35966
35966
35967
+
!!! smartcontract "PolkaVM Alpha Release"
35968
+
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
35969
+
35967
35970
## Prerequisites
35968
35971
35969
35972
Before you begin, make sure you have:
@@ -36584,8 +36587,6 @@ To get started right away with a working example, you can clone the repository a
@@ -36602,6 +36603,9 @@ Decentralized applications (dApps) are a key component of the Web3 ecosystem, en
36602
36603
36603
36604
This tutorial will guide you through building a fully functional dApp that interacts with a smart contract on Polkadot Hub. You'll use [Viem](https://viem.sh/){target=\_blank} for blockchain interactions and [Next.js](https://nextjs.org/){target=\_blank} for the frontend. By the end, you'll have a dApp that lets users connect their wallets, retrieve on-chain data, and execute transactions.
36604
36605
36606
+
!!! smartcontract "PolkaVM Alpha Release"
36607
+
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
36608
+
36605
36609
## Prerequisites
36606
36610
36607
36611
Before getting started, ensure you have the following:
After creating a smart contract, the next crucial steps are testing and deployment. Proper testing ensures your contract behaves as expected, while deployment makes your contract available on the blockchain. This tutorial will guide you through using Hardhat, a popular development environment, to test and deploy the `Storage.sol` contract you created in the [Create a Smart Contract](/tutorials/smart-contracts/launch-your-first-project/create-contracts/){target=\_blank} tutorial. For more information about Hardhat usage, check the [Hardhat guide](/develop/smart-contracts/dev-environments/hardhat/){target=\_blank}.
37461
37462
37463
+
!!! smartcontract "PolkaVM Alpha Release"
37464
+
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
37465
+
37462
37466
## Prerequisites
37463
37467
37464
37468
Before starting, make sure you have:
@@ -37556,9 +37560,6 @@ module.exports = {
37556
37560
- `localNode` - runs a PolkaVM instance on `http://127.0.0.1:8545` for local development and testing
37557
37561
- `passetHub` - connects to the the Polkadot Hub TestNet network using a predefined RPC URL and a private key stored in environment variables
37558
37562
37559
-
!!! smartcontract "PolkaVM Alpha Release"
37560
-
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
37561
-
37562
37563
7. Export your private key and save it in your Hardhat environment:
0 commit comments