Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
478 changes: 6 additions & 472 deletions .ai/categories/smart-contracts.md

Large diffs are not rendered by default.

37 changes: 6 additions & 31 deletions .ai/categories/tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -10991,7 +10991,7 @@ Page Title: Use Hardhat with Polkadot Hub

Building on Polkadot Hub often starts with a Solidity codebase, and Hardhat keeps that workflow familiar while giving teams repeatable scripts, rich debugging, and CLI automation suited to the network's Ethereum-compatible execution layer.

Hardhat is a comprehensive development environment for building, testing, and deploying smart contracts. It provides developers with a complete toolkit including compilation, local testing nodes, debugging tools, and deployment automation.
Hardhat is a comprehensive development environment for building, testing, and deploying smart contracts. It provides developers with a complete toolkit, including compilation, local testing nodes, debugging tools, and deployment automation.

## Hardhat Workflow

Expand Down Expand Up @@ -11035,36 +11035,11 @@ A freshly initialized Hardhat project keeps code, configuration, and automation

## Core Functionalities

### Project Setup

Hardhat provides a structured project initialization with organized folders for contracts, tests, deployment scripts, and automation. Scaffold a workspace quickly and keep configuration in a single `hardhat.config.js` file.

- Learn more in the [Install and Configure](/smart-contracts/dev-environments/hardhat/install-and-config/){target=\_blank} guide.

### Contract Compilation

Compile your Solidity smart contracts with configurable compiler versions and optimization settings. Hardhat captures build artifactsβ€”ABI, bytecode, metadataβ€”so you can deploy or interact with contracts from scripts and frontends.

- Deep dive into compilation in [Compile Smart Contracts](/smart-contracts/dev-environments/hardhat/compile-and-test/){target=\_blank}.

### Testing Environment

Run automated tests against a local Hardhat node, simulate transactions, and debug contract behavior before deploying to public networks. The built-in testing stack uses familiar JavaScript tooling such as Mocha and Chai.

- Master testing capabilities in [Test Your Smart Contracts](/smart-contracts/dev-environments/hardhat/compile-and-test/){target=\_blank}.

### Deployment

Ship your contracts with reusable deployment scripts or Hardhat Ignition modules. Manage credentials securely, target multiple networks, and repeat deployments with confidence.

- Follow deployment steps in [Deploy Smart Contracts](/smart-contracts/dev-environments/hardhat/deploy-a-contract/){target=\_blank}.

### Contract Interaction

Create scripts to interact with deployed contracts, read state, execute transactions, and automate maintenance tasks using your generated ABI.

- See practical tips in [Interact with Smart Contracts](/smart-contracts/dev-environments/hardhat/interact-with-a-contract/){target=\_blank}.

- **Project structure**: Organizes contracts, tests, scripts, and configuration into a consistent workspace. Provides a clear folder layout and a single configuration file (`hardhat.config.js`) to manage compilers, networks, and tooling.
- **Compilation**: Compiles Solidity sources, supports multiple compiler versions, and generates ABI and bytecode artifacts.
- **Local testing**: Runs tests written in JavaScript or TypeScript against an integrated local network, enabling fast feedback when validating contract behavior.
- **Task automation**: Automates deployments, maintenance operations, and recurring workflows through custom scripts and Hardhat tasks.
- **Contract interaction**: Enables reading contract state, sending transactions, and calling contract functions.

## Where to Go Next

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ url: https://docs.polkadot.com/smart-contracts/dev-environments/hardhat/get-star

Building on Polkadot Hub often starts with a Solidity codebase, and Hardhat keeps that workflow familiar while giving teams repeatable scripts, rich debugging, and CLI automation suited to the network's Ethereum-compatible execution layer.

Hardhat is a comprehensive development environment for building, testing, and deploying smart contracts. It provides developers with a complete toolkit including compilation, local testing nodes, debugging tools, and deployment automation.
Hardhat is a comprehensive development environment for building, testing, and deploying smart contracts. It provides developers with a complete toolkit, including compilation, local testing nodes, debugging tools, and deployment automation.

## Hardhat Workflow

Expand Down Expand Up @@ -55,36 +55,11 @@ A freshly initialized Hardhat project keeps code, configuration, and automation

## Core Functionalities

### Project Setup

Hardhat provides a structured project initialization with organized folders for contracts, tests, deployment scripts, and automation. Scaffold a workspace quickly and keep configuration in a single `hardhat.config.js` file.

- Learn more in the [Install and Configure](/smart-contracts/dev-environments/hardhat/install-and-config/){target=\_blank} guide.

### Contract Compilation

Compile your Solidity smart contracts with configurable compiler versions and optimization settings. Hardhat captures build artifactsβ€”ABI, bytecode, metadataβ€”so you can deploy or interact with contracts from scripts and frontends.

- Deep dive into compilation in [Compile Smart Contracts](/smart-contracts/dev-environments/hardhat/compile-and-test/){target=\_blank}.

### Testing Environment

Run automated tests against a local Hardhat node, simulate transactions, and debug contract behavior before deploying to public networks. The built-in testing stack uses familiar JavaScript tooling such as Mocha and Chai.

- Master testing capabilities in [Test Your Smart Contracts](/smart-contracts/dev-environments/hardhat/compile-and-test/){target=\_blank}.

### Deployment

Ship your contracts with reusable deployment scripts or Hardhat Ignition modules. Manage credentials securely, target multiple networks, and repeat deployments with confidence.

- Follow deployment steps in [Deploy Smart Contracts](/smart-contracts/dev-environments/hardhat/deploy-a-contract/){target=\_blank}.

### Contract Interaction

Create scripts to interact with deployed contracts, read state, execute transactions, and automate maintenance tasks using your generated ABI.

- See practical tips in [Interact with Smart Contracts](/smart-contracts/dev-environments/hardhat/interact-with-a-contract/){target=\_blank}.

- **Project structure**: Organizes contracts, tests, scripts, and configuration into a consistent workspace. Provides a clear folder layout and a single configuration file (`hardhat.config.js`) to manage compilers, networks, and tooling.
- **Compilation**: Compiles Solidity sources, supports multiple compiler versions, and generates ABI and bytecode artifacts.
- **Local testing**: Runs tests written in JavaScript or TypeScript against an integrated local network, enabling fast feedback when validating contract behavior.
- **Task automation**: Automates deployments, maintenance operations, and recurring workflows through custom scripts and Hardhat tasks.
- **Contract interaction**: Enables reading contract state, sending transactions, and calling contract functions.

## Where to Go Next

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ url: https://docs.polkadot.com/smart-contracts/dev-environments/local-dev-node/

# Local Development Node

!!! smartcontract "PolkaVM Preview Release"
PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
## Introduction

A local development node provides an isolated blockchain environment where you can deploy, test, and debug smart contracts without incurring network fees or waiting for block confirmations. This guide demonstrates how to set up a local Polkadot SDK-based node with smart contract capabilities.
Expand All @@ -31,7 +29,6 @@ The Polkadot SDK repository contains both the [Revive Dev node](https://github.c
```bash
git clone https://github.com/paritytech/polkadot-sdk.git
cd polkadot-sdk
git checkout 8e2b6f742a38bb13688e12abacded0aab2dbbb23
```

Next, you need to compile the two essential components for your development environment. The Substrate node provides the core blockchain runtime with smart contract support, while the ETH-RPC adapter enables Ethereum JSON-RPC compatibility for existing tooling:
Expand Down
4 changes: 2 additions & 2 deletions .ai/pages/smart-contracts-for-eth-devs-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ You typically don't need to do anything special, but be aware:
Yes. Both backends support:

- **Wallets**: [MetaMask](https://metamask.io/){target=\_blank}, [Talisman](https://talisman.xyz/){target=\_blank}, [SubWallet](https://www.subwallet.app/){target=\_blank}
- **Development frameworks**: [Hardhat](/smart-contracts/cookbook/smart-contracts/deploy-basic/hardhat/){target=\_blank}, [Foundry](/smart-contracts/cookbook/smart-contracts/deploy-basic/foundry/){target=\_blank}, [Remix](/smart-contracts/cookbook/smart-contracts/deploy-basic/remix/){target=\_blank} (just consider that for PVM bytecode, you will use the Polkadot version of the tooling)
- **Libraries**: [ethers.js](/smart-contracts/libraries/ethers-js/){target=\_blank}, [web3.js](/smart-contracts/libraries/web3-js/){target=\_blank}, [viem](/smart-contracts/libraries/viem/){target=\_blank}
- **Development frameworks**: [Hardhat](/smart-contracts/cookbook/smart-contracts/deploy-basic/hardhat/){target=\_blank}, [Remix](/smart-contracts/cookbook/smart-contracts/deploy-basic/remix/){target=\_blank}
- **Libraries**: [Ethers.js](/smart-contracts/libraries/ethers-js/){target=\_blank}, [Web3.js](/smart-contracts/libraries/web3-js/){target=\_blank}, [viem](/smart-contracts/libraries/viem/){target=\_blank}
- **Testing tools**: Your existing test suites work

Connect to Polkadot Hub's Ethereum JSON-RPC endpoint and use your familiar workflow.
Expand Down
Loading