diff --git a/.ai/categories/tooling.md b/.ai/categories/tooling.md index 88d0f63bc..41ae91e34 100644 --- a/.ai/categories/tooling.md +++ b/.ai/categories/tooling.md @@ -25695,3 +25695,934 @@ Key features include: - **Comprehensive documentation**: Includes usage guides and API references for both packages. For detailed usage examples and API documentation, visit the [official Moonbeam XCM SDK documentation](https://moonbeam-foundation.github.io/xcm-sdk/latest/){target=\_blank}. + + +--- + +Page Title: Zero to Hero Smart Contract DApp + +- Source (raw): https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-dapps-zero-to-hero.md +- Canonical (HTML): https://docs.polkadot.com/smart-contracts/cookbook/dapps/zero-to-hero/ +- Summary: Learn how to build a decentralized application on Polkadot Hub using Viem and Next.js by creating a simple dApp that interacts with a smart contract. + +# Zero to Hero Smart Contract DApp + +Decentralized applications (dApps) are a key component of the Web3 ecosystem, enabling developers to build applications that communicate directly with blockchain networks. Polkadot Hub, a blockchain with smart contract support, serves as a robust platform for deploying and interacting with dApps. + +This tutorial will guide you through building a fully functional dApp that interacts with a smart contract on Polkadot Hub. You'll create and deploy a smart contract with Hardhat, and then 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. + +## Prerequisites + +Before getting started, ensure you have the following: + +- [Node.js](https://nodejs.org/en){target=\_blank} v22.10.0 or later installed on your system. +- A crypto wallet (such as MetaMask) funded with test tokens. Refer to the [Connect to Polkadot](/smart-contracts/connect){target=\_blank} guide for more details. +- A basic understanding of React and JavaScript. +- Some familiarity with blockchain fundamentals and Solidity (helpful but not required). + +## Project Overview + +This dApp will interact with a basic Storage contract that you will create and deploy with Hardhat. The contract will allow you to: + +- Store a number on the blockchain. +- Retrieve the stored number from the blockchain. +- Update the stored number with a new value. + +Your project directory will be organized as follows: + +```bash +polkadot-hub-tutorial/ +├── storage-contract/ # Hardhat project for smart contract +│ ├── contracts/ +│ │ └── Storage.sol +│ ├── scripts/ +│ │ └── deploy.ts +│ ├── artifacts/ +│ │ └── contracts/ +│ │ └── Storage.sol/ +│ │ └── Storage.json +│ ├── hardhat.config.ts +│ ├── .env +│ └── package.json +│ +└── dapp/ # Next.js dApp project + ├── abis/ + │ └── Storage.json + └── app/ + ├── components/ + │ ├── ReadContract.tsx + │ ├── WalletConnect.tsx + │ └── WriteContract.tsx + ├── utils/ + │ ├── contract.ts + │ └── viem.ts + ├── favicon.ico + ├── globals.css + ├── layout.tsx + └── page.tsx +``` + +Create the main folder for the project: + +```bash +mkdir polkadot-hub-tutorial +cd polkadot-hub-tutorial +``` + +## Create and Deploy the Storage Contract + +Before building the dApp, you'll need to create and deploy the Storage smart contract. This section will guide you through using Hardhat to write, compile, and deploy the contract to Polkadot Hub TestNet. + +### Set Up Hardhat Project + +First, create a new directory for your Hardhat project and initialize it: + +```bash +mkdir storage-contract +cd storage-contract +npm init -y +``` + +Install Hardhat and its dependencies: + +```bash +npm install --save-dev hardhat@3.0.9 +``` + +Initialize a new Hardhat project: + +```bash +npx hardhat --init +``` + +Select **Create a TypeScript project** and accept the default options. + +### Create the Storage Contract + +In the `contracts` directory, create a new file called `Storage.sol` and add the following code: + +```solidity title="Storage.sol" +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +contract Storage { + uint256 private storedNumber; + + event NumberStored(uint256 newNumber); + + function setNumber(uint256 _number) public { + storedNumber = _number; + emit NumberStored(_number); + } +} +``` + +This simple contract stores a single number and provides functions to read and update it. + +### Configure Hardhat for Polkadot Hub + +Update your `hardhat.config.ts` file to include the Polkadot Hub TestNet configuration: + +```typescript title="hardhat.config.ts" hl_lines="39-44" +import type { HardhatUserConfig } from "hardhat/config"; + +import hardhatToolboxViemPlugin from "@nomicfoundation/hardhat-toolbox-viem"; +import { configVariable } from "hardhat/config"; + +const config: HardhatUserConfig = { + plugins: [hardhatToolboxViemPlugin], + solidity: { + profiles: { + default: { + version: "0.8.28", + }, + production: { + version: "0.8.28", + settings: { + optimizer: { + enabled: true, + runs: 200, + }, + }, + }, + }, + }, + networks: { + hardhatMainnet: { + type: "edr-simulated", + chainType: "l1", + }, + hardhatOp: { + type: "edr-simulated", + chainType: "op", + }, + sepolia: { + type: "http", + chainType: "l1", + url: configVariable("SEPOLIA_RPC_URL"), + accounts: [configVariable("SEPOLIA_PRIVATE_KEY")], + }, + polkadotTestNet: { + type: "http", + chainType: "l1", + url: 'http://127.0.0.1:8545', + accounts: [process.env.PRIVATE_KEY || ''], + }, + }, +}; + +export default config; +``` + +Create a `.env` file in the root of your Hardhat project: + +```text title=".env" +PRIVATE_KEY=INSERT_PRIVATE_KEY_HERE +``` + +Replace `INSERT_PRIVATE_KEY_HERE` with your actual private key. You can get this by exporting the private key from your wallet (e.g., MetaMask). + +!!! warning + Never commit your private key to version control. Use environment variables or a `.env` file (and add it to `.gitignore`) to manage sensitive information. Keep your private key safe, and never share it with anyone. If it is compromised, your funds can be stolen. + + +### Compile the Contract + +Compile your Storage contract: + +```bash +npx hardhat compile +``` + +You should see output indicating successful compilation. + +### Deploy the Contract + +Create a deployment script in the `ignition/modules` directory called `Storage.ts`: + +```typescript title="Storage.ts" +import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; + +export default buildModule("StorageModule", (m) => { + const storage = m.contract("Storage"); + + return { storage }; +}); +``` + +Deploy the contract to Polkadot Hub TestNet: + +```bash +npx hardhat ignition deploy ./ignition/modules/Storage.ts --network polkadotHub +``` + +You should see output similar to: + +
+ npx hardhat ignition deploy ./ignition/modules/Storage.ts --network polkadotTestNet + WARNING: You are using Node.js 23.11.0 which is not supported by Hardhat. + Please upgrade to 22.10.0 or a later LTS version (even major version number) + ✔ Confirm deploy to network polkadotTestNet (420420420)? … yes + Hardhat Ignition 🚀 + Deploying [ StorageModule ] + Batch #1 + Executed StorageModule#Storage + [ StorageModule ] successfully deployed 🚀 + Deployed Addresses + StorageModule#Storage - 0xc01Ee7f10EA4aF4673cFff62710E1D7792aBa8f3 +
+ +!!! note + Save the deployed contract address - you'll need it when building your dApp. In the following sections, we'll reference a pre-deployed contract at `0xc01Ee7f10EA4aF4673cFff62710E1D7792aBa8f3`, but you can use your own deployed contract address instead. + +### Export the Contract ABI + +After deployment, you'll need the contract's Application Binary Interface (ABI) for your dApp. You can find it in the `artifacts/contracts/Storage.sol/Storage.json` file generated by Hardhat. You'll use this in the next section when setting up your dApp. + +Now that you have your contract deployed, you're ready to build the dApp that will interact with it! + +## Set Up the dApp Project + +Navigate to the root of the project, and create a new Next.js project called `dapp`: + +```bash +npx create-next-app dapp --ts --eslint --tailwind --app --yes +cd dapp +``` + +## Install Dependencies + +Install viem and related packages: + +```bash +npm install viem@2.38.5 +npm install --save-dev typescript@5.9.3 @types/node@22.19.24 +``` + +## Connect to Polkadot Hub + +To interact with Polkadot Hub, you need to set up a [Public Client](https://viem.sh/docs/clients/public#public-client){target=\_blank} that connects to the blockchain. In this example, you will interact with the Polkadot Hub TestNet, to experiment safely. Start by creating a new file called `utils/viem.ts` and add the following code: + +```typescript title="viem.ts" +import { createPublicClient, http, createWalletClient, custom } from 'viem' +import 'viem/window'; + +const transport = http('http://127.0.0.1:8545') // TODO: change to the paseo asset hub RPC URL when it's available + +// Configure the Polkadot Testnet Hub chain +export const polkadotTestnet = { + id: 420420420, + name: 'Polkadot Testnet', + network: 'polkadot-testnet', + nativeCurrency: { + decimals: 18, + name: 'PAS', + symbol: 'PAS', + }, + rpcUrls: { + default: { + http: ['http://127.0.0.1:8545'], // TODO: change to the paseo asset hub RPC URL + }, + }, +} as const + +// Create a public client for reading data +export const publicClient = createPublicClient({ + chain: polkadotTestnet, + transport +}) + +// Create a wallet client for signing transactions +export const getWalletClient = async () => { + if (typeof window !== 'undefined' && window.ethereum) { + const [account] = await window.ethereum.request({ method: 'eth_requestAccounts' }); + return createWalletClient({ + chain: polkadotTestnet, + transport: custom(window.ethereum), + account, + }); + } + throw new Error('No Ethereum browser provider detected'); +}; +``` + +This file initializes a viem client, providing helper functions for obtaining a Public Client and a [Wallet Client](https://viem.sh/docs/clients/wallet#wallet-client){target=\_blank}. The Public Client enables reading blockchain data, while the Wallet Client allows users to sign and send transactions. Also, note that by importing `viem/window` the global `window.ethereum` will be typed as an `EIP1193Provider`, check the [`window` Polyfill](https://viem.sh/docs/typescript#window-polyfill){target=\_blank} reference for more information. + +## Set Up the Smart Contract Interface + +For this dApp, you'll use a simple [Storage contract](/tutorials/smart-contracts/launch-your-first-project/create-contracts){target=\_blank} that's already deployed in the Polkadot Hub TestNet: `0xc01Ee7f10EA4aF4673cFff62710E1D7792aBa8f3`. To interact with it, you need to define the contract interface. + +Create a folder called `abis` at the root of your project, then create a file named `Storage.json` and paste the corresponding ABI of the Storage contract. You can copy and paste the following: + +```bash +cp ./storage-contract/artifacts/contracts/Storage.sol/Storage.json ./dapp/abis/Storage.json +``` + +Next, create a file called `utils/contract.ts`: + +```typescript title="contract.ts" +import { getContract } from 'viem'; +import { publicClient, getWalletClient } from './viem'; +import StorageABI from '../abis/Storage.json'; + +export const CONTRACT_ADDRESS = '0xc01Ee7f10EA4aF4673cFff62710E1D7792aBa8f3'; // TODO: change when the paseo asset hub RPC URL is available, and the contract is redeployed +export const CONTRACT_ABI = StorageABI.abi; + +// Create a function to get a contract instance for reading +export const getContractInstance = () => { + return getContract({ + address: CONTRACT_ADDRESS, + abi: CONTRACT_ABI, + client: publicClient, + }); +}; + +// Create a function to get a contract instance with a signer for writing +export const getSignedContract = async () => { + const walletClient = await getWalletClient(); + return getContract({ + address: CONTRACT_ADDRESS, + abi: CONTRACT_ABI, + client: walletClient, + }); +}; +``` + +This file defines the contract address, ABI, and functions to create a viem [contract instance](https://viem.sh/docs/contract/getContract#contract-instances){target=\_blank} for reading and writing operations. viem's contract utilities enable more efficient, type-safe interaction with smart contracts. + +## Create the Wallet Connection Component + +Now, let's create a component to handle wallet connections. Create a new file called `components/WalletConnect.tsx`: + +```typescript title="WalletConnect.tsx" +"use client"; + +import React, { useState, useEffect } from "react"; +import { polkadotTestnet } from "../utils/viem"; + +interface WalletConnectProps { + onConnect: (account: string) => void; +} + +const WalletConnect: React.FC = ({ onConnect }) => { + const [account, setAccount] = useState(null); + const [chainId, setChainId] = useState(null); + const [error, setError] = useState(null); + + useEffect(() => { + // Check if user already has an authorized wallet connection + const checkConnection = async () => { + if (typeof window !== 'undefined' && window.ethereum) { + try { + // eth_accounts doesn't trigger the wallet popup + const accounts = await window.ethereum.request({ + method: 'eth_accounts', + }) as string[]; + + if (accounts.length > 0) { + setAccount(accounts[0]); + const chainIdHex = await window.ethereum.request({ + method: 'eth_chainId', + }) as string; + setChainId(parseInt(chainIdHex, 16)); + onConnect(accounts[0]); + } + } catch (err) { + console.error('Error checking connection:', err); + setError('Failed to check wallet connection'); + } + } + }; + + checkConnection(); + + if (typeof window !== 'undefined' && window.ethereum) { + // Setup wallet event listeners + window.ethereum.on('accountsChanged', (accounts: string[]) => { + setAccount(accounts[0] || null); + if (accounts[0]) onConnect(accounts[0]); + }); + + window.ethereum.on('chainChanged', (chainIdHex: string) => { + setChainId(parseInt(chainIdHex, 16)); + }); + } + + return () => { + // Cleanup event listeners + if (typeof window !== 'undefined' && window.ethereum) { + window.ethereum.removeListener('accountsChanged', () => {}); + window.ethereum.removeListener('chainChanged', () => {}); + } + }; + }, [onConnect]); + + const connectWallet = async () => { + if (typeof window === 'undefined' || !window.ethereum) { + setError( + 'MetaMask not detected! Please install MetaMask to use this dApp.' + ); + return; + } + + try { + // eth_requestAccounts triggers the wallet popup + const accounts = await window.ethereum.request({ + method: 'eth_requestAccounts', + }) as string[]; + + setAccount(accounts[0]); + + const chainIdHex = await window.ethereum.request({ + method: 'eth_chainId', + }) as string; + + const currentChainId = parseInt(chainIdHex, 16); + setChainId(currentChainId); + + // Prompt user to switch networks if needed + if (currentChainId !== polkadotTestnet.id) { + await switchNetwork(); + } + + onConnect(accounts[0]); + } catch (err) { + console.error('Error connecting to wallet:', err); + setError('Failed to connect wallet'); + } + }; + + const switchNetwork = async () => { + console.log('Switch network') + try { + await window.ethereum.request({ + method: 'wallet_switchEthereumChain', + params: [{ chainId: `0x${polkadotTestnet.id.toString(16)}` }], + }); + } catch (switchError: any) { + // Error 4902 means the chain hasn't been added to MetaMask + if (switchError.code === 4902) { + try { + await window.ethereum.request({ + method: 'wallet_addEthereumChain', + params: [ + { + chainId: `0x${polkadotTestnet.id.toString(16)}`, + chainName: polkadotTestnet.name, + rpcUrls: [polkadotTestnet.rpcUrls.default.http[0]], + nativeCurrency: { + name: polkadotTestnet.nativeCurrency.name, + symbol: polkadotTestnet.nativeCurrency.symbol, + decimals: polkadotTestnet.nativeCurrency.decimals, + }, + }, + ], + }); + } catch (addError) { + setError('Failed to add network to wallet'); + } + } else { + setError('Failed to switch network'); + } + } + }; + + // UI-only disconnection - MetaMask doesn't support programmatic disconnection + const disconnectWallet = () => { + setAccount(null); + }; + + return ( +
+ {error &&

{error}

} + + {!account ? ( + + ) : ( +
+ + {`${account.substring(0, 6)}...${account.substring(38)}`} + + + {chainId !== polkadotTestnet.id && ( + + )} +
+ )} +
+ ); +}; + +export default WalletConnect; +``` + +This component handles connecting to the wallet, switching networks if necessary, and keeping track of the connected account. It provides a button for users to connect their wallet and displays the connected account address once connected. + +## Create the Read Contract Component + +Now, let's create a component to read data from the contract. Create a file called `components/ReadContract.tsx`: + +```typescript title="ReadContract.tsx" +'use client'; + +import React, { useState, useEffect } from 'react'; +import { publicClient } from '../utils/viem'; +import { CONTRACT_ADDRESS, CONTRACT_ABI } from '../utils/contract'; + +const ReadContract: React.FC = () => { + const [storedNumber, setStoredNumber] = useState(null); + const [loading, setLoading] = useState(true); + const [error, setError] = useState(null); + + useEffect(() => { + // Function to read data from the blockchain + const fetchData = async () => { + try { + setLoading(true); + // Call the smart contract's storedNumber function + const number = await publicClient.readContract({ + address: CONTRACT_ADDRESS, + abi: CONTRACT_ABI, + functionName: 'storedNumber', + args: [], + }) as bigint; + + setStoredNumber(number.toString()); + setError(null); + } catch (err) { + console.error('Error fetching stored number:', err); + setError('Failed to fetch data from the contract'); + } finally { + setLoading(false); + } + }; + + fetchData(); + + // Poll for updates every 10 seconds to keep UI in sync with blockchain + const interval = setInterval(fetchData, 10000); + + // Clean up interval on component unmount + return () => clearInterval(interval); + }, []); + + return ( +
+

Contract Data

+ {loading ? ( +
+
+
+ ) : error ? ( +

{error}

+ ) : ( +
+

+ Stored Number: {storedNumber} +

+
+ )} +
+ ); +}; + +export default ReadContract; +``` + +This component reads the `storedNumber` value from the contract and displays it to the user. It also sets up a polling interval to refresh the data periodically, ensuring that the UI stays in sync with the blockchain state. + +## Create the Write Contract Component + +Finally, let's create a component that allows users to update the stored number. Create a file called `components/WriteContract.tsx`: + +```typescript title="WriteContract.tsx" +"use client"; + +import React, { useState, useEffect } from "react"; +import { publicClient, getWalletClient } from '../utils/viem'; +import { CONTRACT_ADDRESS, CONTRACT_ABI } from '../utils/contract'; + +interface WriteContractProps { + account: string | null; +} + +const WriteContract: React.FC = ({ account }) => { + const [newNumber, setNewNumber] = useState(""); + const [status, setStatus] = useState<{ + type: string | null; + message: string; + }>({ + type: null, + message: "", + }); + const [isSubmitting, setIsSubmitting] = useState(false); + const [isCorrectNetwork, setIsCorrectNetwork] = useState(true); + + // Check if the account is on the correct network + useEffect(() => { + const checkNetwork = async () => { + if (!account) return; + + try { + // Get the chainId from the public client + const chainId = await publicClient.getChainId(); + + // Get the user's current chainId from their wallet + const walletClient = await getWalletClient(); + if (!walletClient) return; + + const walletChainId = await walletClient.getChainId(); + + // Check if they match + setIsCorrectNetwork(chainId === walletChainId); + } catch (err) { + console.error("Error checking network:", err); + setIsCorrectNetwork(false); + } + }; + + checkNetwork(); + }, [account]); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + + // Validation checks + if (!account) { + setStatus({ type: "error", message: "Please connect your wallet first" }); + return; + } + + if (!isCorrectNetwork) { + setStatus({ + type: "error", + message: "Please switch to the correct network in your wallet", + }); + return; + } + + if (!newNumber || isNaN(Number(newNumber))) { + setStatus({ type: "error", message: "Please enter a valid number" }); + return; + } + + try { + setIsSubmitting(true); + setStatus({ type: "info", message: "Initiating transaction..." }); + + // Get wallet client for transaction signing + const walletClient = await getWalletClient(); + + if (!walletClient) { + setStatus({ type: "error", message: "Wallet client not available" }); + return; + } + + // Check if account matches + if ( + walletClient.account?.address.toLowerCase() !== account.toLowerCase() + ) { + setStatus({ + type: "error", + message: + "Connected wallet account doesn't match the selected account", + }); + return; + } + + // Prepare transaction and wait for user confirmation in wallet + setStatus({ + type: "info", + message: "Please confirm the transaction in your wallet...", + }); + + // Simulate the contract call first + console.log('newNumber', newNumber); + const { request } = await publicClient.simulateContract({ + address: CONTRACT_ADDRESS, + abi: CONTRACT_ABI, + functionName: "setNumber", + args: [BigInt(newNumber)], + account: walletClient.account, + }); + + // Send the transaction with wallet client + const hash = await walletClient.writeContract(request); + + // Wait for transaction to be mined + setStatus({ + type: "info", + message: "Transaction submitted. Waiting for confirmation...", + }); + + const receipt = await publicClient.waitForTransactionReceipt({ + hash, + }); + + setStatus({ + type: "success", + message: `Transaction confirmed! Transaction hash: ${receipt.transactionHash}`, + }); + + setNewNumber(""); + } catch (err: any) { + console.error("Error updating number:", err); + + // Handle specific errors + if (err.code === 4001) { + // User rejected transaction + setStatus({ type: "error", message: "Transaction rejected by user." }); + } else if (err.message?.includes("Account not found")) { + // Account not found on the network + setStatus({ + type: "error", + message: + "Account not found on current network. Please check your wallet is connected to the correct network.", + }); + } else if (err.message?.includes("JSON is not a valid request object")) { + // JSON error - specific to your current issue + setStatus({ + type: "error", + message: + "Invalid request format. Please try again or contact support.", + }); + } else { + // Other errors + setStatus({ + type: "error", + message: `Error: ${err.message || "Failed to send transaction"}`, + }); + } + } finally { + setIsSubmitting(false); + } + }; + + return ( +
+

Update Stored Number

+ + {!isCorrectNetwork && account && ( +
+ ⚠️ You are not connected to the correct network. Please switch + networks in your wallet. +
+ )} + + {status.message && ( +
+ {status.message} +
+ )} + +
+ setNewNumber(e.target.value)} + disabled={isSubmitting || !account} + className="w-full p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-pink-400" + /> + +
+ + {!account && ( +

+ Connect your wallet to update the stored number. +

+ )} +
+ ); +}; + +export default WriteContract; +``` + +This component allows users to input a new number and send a transaction to update the value stored in the contract. It provides appropriate feedback during each step of the transaction process and handles error scenarios. + +Update the `app/page.tsx` file to integrate all components: + +```typescript title="page.tsx" +"use client"; + +import { useState } from "react"; +import WalletConnect from "./components/WalletConnect"; +import ReadContract from "./components/ReadContract"; +import WriteContract from "./components/WriteContract"; + +export default function Home() { + const [account, setAccount] = useState(null); + + const handleConnect = (connectedAccount: string) => { + setAccount(connectedAccount); + }; + + return ( +
+

+ Polkadot Hub - Zero To Hero DApp +

+ + + +
+ ); +} +``` + +Run the dApp: + +```bash +npm run dev +``` + +Navigate to `http://localhost:3000` in your browser, and you should see your dApp with the wallet connection button, the stored number displayed, and the form to update the number. You should see something like this: + + + +## How It Works + +This dApp uses components to interact with the blockchain in several ways. + +### Wallet Connection + +The `WalletConnect` component uses the browser's Ethereum provider (MetaMask) to connect to the user's wallet and handles network switching to ensure the user is connected to the Polkadot Hub TestNet. Once connected, it provides the user's account address to the parent component. + +### Data Reads + +The `ReadContract` component uses viem's `readContract` function to call the `storedNumber` view function and periodically poll for updates to keep the UI in sync with the blockchain state. The component also displays a loading indicator while fetching data and handles error states. + +### Data Writes + +The `WriteContract` component uses viem's `writeContract` function to send a transaction to the `setNumber` function and ensures the wallet is connected before allowing a transaction. The component shows detailed feedback during transaction submission and confirmation. After a successful transaction, the value displayed in the `ReadContract` component will update on the next poll. + +## Conclusion + +Congratulations! You've successfully built a fully functional dApp that interacts with a smart contract on Polkadot Hub using viem and Next.js. Your application can now: + +- Create a smart contract with Hardhat and deploy it to Polkadot Hub TestNet. +- Connect to a user's wallet and handle network switching. +- Read data from a smart contract and keep it updated. +- Write data to the blockchain through transactions. + +These fundamental skills provide the foundation for building more complex dApps on Polkadot Hub. With this knowledge, you can extend your application to interact with more sophisticated smart contracts and create advanced user interfaces. + +To get started right away with a working example, you can clone the repository and navigate to the implementation: + +```bash +git clone https://github.com/polkadot-developers/revm-hardhat-examples.git +cd zero-to-hero-dapp +``` + +## Where to Go Next + +
+ +- Guide __Port Ethereum Projects to Polkadot Hub__ + + --- + + Learn how to port an Ethereum project to Polkadot Hub using Hardhat and Viem. + + [:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/eth-dapps/) + +- Guide __Dive Deeper into Polkadot Precompiles__ + + --- + + Learn how to use the Polkadot precompiles to interact with the blockchain. + + [:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/polkadot-precompiles/) +
diff --git a/.ai/pages/smart-contracts-cookbook-dapps-zero-to-hero.md b/.ai/pages/smart-contracts-cookbook-dapps-zero-to-hero.md index cfeb31dfe..d2c8e9ade 100644 --- a/.ai/pages/smart-contracts-cookbook-dapps-zero-to-hero.md +++ b/.ai/pages/smart-contracts-cookbook-dapps-zero-to-hero.md @@ -1,5 +1,928 @@ --- +title: Zero to Hero Smart Contract DApp +description: Learn how to build a decentralized application on Polkadot Hub using Viem and Next.js by creating a simple dApp that interacts with a smart contract. +categories: dApp, Tooling url: https://docs.polkadot.com/smart-contracts/cookbook/dapps/zero-to-hero/ --- -TODO +# Zero to Hero Smart Contract DApp + +Decentralized applications (dApps) are a key component of the Web3 ecosystem, enabling developers to build applications that communicate directly with blockchain networks. Polkadot Hub, a blockchain with smart contract support, serves as a robust platform for deploying and interacting with dApps. + +This tutorial will guide you through building a fully functional dApp that interacts with a smart contract on Polkadot Hub. You'll create and deploy a smart contract with Hardhat, and then 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. + +## Prerequisites + +Before getting started, ensure you have the following: + +- [Node.js](https://nodejs.org/en){target=\_blank} v22.10.0 or later installed on your system. +- A crypto wallet (such as MetaMask) funded with test tokens. Refer to the [Connect to Polkadot](/smart-contracts/connect){target=\_blank} guide for more details. +- A basic understanding of React and JavaScript. +- Some familiarity with blockchain fundamentals and Solidity (helpful but not required). + +## Project Overview + +This dApp will interact with a basic Storage contract that you will create and deploy with Hardhat. The contract will allow you to: + +- Store a number on the blockchain. +- Retrieve the stored number from the blockchain. +- Update the stored number with a new value. + +Your project directory will be organized as follows: + +```bash +polkadot-hub-tutorial/ +├── storage-contract/ # Hardhat project for smart contract +│ ├── contracts/ +│ │ └── Storage.sol +│ ├── scripts/ +│ │ └── deploy.ts +│ ├── artifacts/ +│ │ └── contracts/ +│ │ └── Storage.sol/ +│ │ └── Storage.json +│ ├── hardhat.config.ts +│ ├── .env +│ └── package.json +│ +└── dapp/ # Next.js dApp project + ├── abis/ + │ └── Storage.json + └── app/ + ├── components/ + │ ├── ReadContract.tsx + │ ├── WalletConnect.tsx + │ └── WriteContract.tsx + ├── utils/ + │ ├── contract.ts + │ └── viem.ts + ├── favicon.ico + ├── globals.css + ├── layout.tsx + └── page.tsx +``` + +Create the main folder for the project: + +```bash +mkdir polkadot-hub-tutorial +cd polkadot-hub-tutorial +``` + +## Create and Deploy the Storage Contract + +Before building the dApp, you'll need to create and deploy the Storage smart contract. This section will guide you through using Hardhat to write, compile, and deploy the contract to Polkadot Hub TestNet. + +### Set Up Hardhat Project + +First, create a new directory for your Hardhat project and initialize it: + +```bash +mkdir storage-contract +cd storage-contract +npm init -y +``` + +Install Hardhat and its dependencies: + +```bash +npm install --save-dev hardhat@3.0.9 +``` + +Initialize a new Hardhat project: + +```bash +npx hardhat --init +``` + +Select **Create a TypeScript project** and accept the default options. + +### Create the Storage Contract + +In the `contracts` directory, create a new file called `Storage.sol` and add the following code: + +```solidity title="Storage.sol" +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +contract Storage { + uint256 private storedNumber; + + event NumberStored(uint256 newNumber); + + function setNumber(uint256 _number) public { + storedNumber = _number; + emit NumberStored(_number); + } +} +``` + +This simple contract stores a single number and provides functions to read and update it. + +### Configure Hardhat for Polkadot Hub + +Update your `hardhat.config.ts` file to include the Polkadot Hub TestNet configuration: + +```typescript title="hardhat.config.ts" hl_lines="39-44" +import type { HardhatUserConfig } from "hardhat/config"; + +import hardhatToolboxViemPlugin from "@nomicfoundation/hardhat-toolbox-viem"; +import { configVariable } from "hardhat/config"; + +const config: HardhatUserConfig = { + plugins: [hardhatToolboxViemPlugin], + solidity: { + profiles: { + default: { + version: "0.8.28", + }, + production: { + version: "0.8.28", + settings: { + optimizer: { + enabled: true, + runs: 200, + }, + }, + }, + }, + }, + networks: { + hardhatMainnet: { + type: "edr-simulated", + chainType: "l1", + }, + hardhatOp: { + type: "edr-simulated", + chainType: "op", + }, + sepolia: { + type: "http", + chainType: "l1", + url: configVariable("SEPOLIA_RPC_URL"), + accounts: [configVariable("SEPOLIA_PRIVATE_KEY")], + }, + polkadotTestNet: { + type: "http", + chainType: "l1", + url: 'http://127.0.0.1:8545', + accounts: [process.env.PRIVATE_KEY || ''], + }, + }, +}; + +export default config; +``` + +Create a `.env` file in the root of your Hardhat project: + +```text title=".env" +PRIVATE_KEY=INSERT_PRIVATE_KEY_HERE +``` + +Replace `INSERT_PRIVATE_KEY_HERE` with your actual private key. You can get this by exporting the private key from your wallet (e.g., MetaMask). + +!!! warning + Never commit your private key to version control. Use environment variables or a `.env` file (and add it to `.gitignore`) to manage sensitive information. Keep your private key safe, and never share it with anyone. If it is compromised, your funds can be stolen. + + +### Compile the Contract + +Compile your Storage contract: + +```bash +npx hardhat compile +``` + +You should see output indicating successful compilation. + +### Deploy the Contract + +Create a deployment script in the `ignition/modules` directory called `Storage.ts`: + +```typescript title="Storage.ts" +import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; + +export default buildModule("StorageModule", (m) => { + const storage = m.contract("Storage"); + + return { storage }; +}); +``` + +Deploy the contract to Polkadot Hub TestNet: + +```bash +npx hardhat ignition deploy ./ignition/modules/Storage.ts --network polkadotHub +``` + +You should see output similar to: + +
+ npx hardhat ignition deploy ./ignition/modules/Storage.ts --network polkadotTestNet + WARNING: You are using Node.js 23.11.0 which is not supported by Hardhat. + Please upgrade to 22.10.0 or a later LTS version (even major version number) + ✔ Confirm deploy to network polkadotTestNet (420420420)? … yes + Hardhat Ignition 🚀 + Deploying [ StorageModule ] + Batch #1 + Executed StorageModule#Storage + [ StorageModule ] successfully deployed 🚀 + Deployed Addresses + StorageModule#Storage - 0xc01Ee7f10EA4aF4673cFff62710E1D7792aBa8f3 +
+ +!!! note + Save the deployed contract address - you'll need it when building your dApp. In the following sections, we'll reference a pre-deployed contract at `0xc01Ee7f10EA4aF4673cFff62710E1D7792aBa8f3`, but you can use your own deployed contract address instead. + +### Export the Contract ABI + +After deployment, you'll need the contract's Application Binary Interface (ABI) for your dApp. You can find it in the `artifacts/contracts/Storage.sol/Storage.json` file generated by Hardhat. You'll use this in the next section when setting up your dApp. + +Now that you have your contract deployed, you're ready to build the dApp that will interact with it! + +## Set Up the dApp Project + +Navigate to the root of the project, and create a new Next.js project called `dapp`: + +```bash +npx create-next-app dapp --ts --eslint --tailwind --app --yes +cd dapp +``` + +## Install Dependencies + +Install viem and related packages: + +```bash +npm install viem@2.38.5 +npm install --save-dev typescript@5.9.3 @types/node@22.19.24 +``` + +## Connect to Polkadot Hub + +To interact with Polkadot Hub, you need to set up a [Public Client](https://viem.sh/docs/clients/public#public-client){target=\_blank} that connects to the blockchain. In this example, you will interact with the Polkadot Hub TestNet, to experiment safely. Start by creating a new file called `utils/viem.ts` and add the following code: + +```typescript title="viem.ts" +import { createPublicClient, http, createWalletClient, custom } from 'viem' +import 'viem/window'; + +const transport = http('http://127.0.0.1:8545') // TODO: change to the paseo asset hub RPC URL when it's available + +// Configure the Polkadot Testnet Hub chain +export const polkadotTestnet = { + id: 420420420, + name: 'Polkadot Testnet', + network: 'polkadot-testnet', + nativeCurrency: { + decimals: 18, + name: 'PAS', + symbol: 'PAS', + }, + rpcUrls: { + default: { + http: ['http://127.0.0.1:8545'], // TODO: change to the paseo asset hub RPC URL + }, + }, +} as const + +// Create a public client for reading data +export const publicClient = createPublicClient({ + chain: polkadotTestnet, + transport +}) + +// Create a wallet client for signing transactions +export const getWalletClient = async () => { + if (typeof window !== 'undefined' && window.ethereum) { + const [account] = await window.ethereum.request({ method: 'eth_requestAccounts' }); + return createWalletClient({ + chain: polkadotTestnet, + transport: custom(window.ethereum), + account, + }); + } + throw new Error('No Ethereum browser provider detected'); +}; +``` + +This file initializes a viem client, providing helper functions for obtaining a Public Client and a [Wallet Client](https://viem.sh/docs/clients/wallet#wallet-client){target=\_blank}. The Public Client enables reading blockchain data, while the Wallet Client allows users to sign and send transactions. Also, note that by importing `viem/window` the global `window.ethereum` will be typed as an `EIP1193Provider`, check the [`window` Polyfill](https://viem.sh/docs/typescript#window-polyfill){target=\_blank} reference for more information. + +## Set Up the Smart Contract Interface + +For this dApp, you'll use a simple [Storage contract](/tutorials/smart-contracts/launch-your-first-project/create-contracts){target=\_blank} that's already deployed in the Polkadot Hub TestNet: `0xc01Ee7f10EA4aF4673cFff62710E1D7792aBa8f3`. To interact with it, you need to define the contract interface. + +Create a folder called `abis` at the root of your project, then create a file named `Storage.json` and paste the corresponding ABI of the Storage contract. You can copy and paste the following: + +```bash +cp ./storage-contract/artifacts/contracts/Storage.sol/Storage.json ./dapp/abis/Storage.json +``` + +Next, create a file called `utils/contract.ts`: + +```typescript title="contract.ts" +import { getContract } from 'viem'; +import { publicClient, getWalletClient } from './viem'; +import StorageABI from '../abis/Storage.json'; + +export const CONTRACT_ADDRESS = '0xc01Ee7f10EA4aF4673cFff62710E1D7792aBa8f3'; // TODO: change when the paseo asset hub RPC URL is available, and the contract is redeployed +export const CONTRACT_ABI = StorageABI.abi; + +// Create a function to get a contract instance for reading +export const getContractInstance = () => { + return getContract({ + address: CONTRACT_ADDRESS, + abi: CONTRACT_ABI, + client: publicClient, + }); +}; + +// Create a function to get a contract instance with a signer for writing +export const getSignedContract = async () => { + const walletClient = await getWalletClient(); + return getContract({ + address: CONTRACT_ADDRESS, + abi: CONTRACT_ABI, + client: walletClient, + }); +}; +``` + +This file defines the contract address, ABI, and functions to create a viem [contract instance](https://viem.sh/docs/contract/getContract#contract-instances){target=\_blank} for reading and writing operations. viem's contract utilities enable more efficient, type-safe interaction with smart contracts. + +## Create the Wallet Connection Component + +Now, let's create a component to handle wallet connections. Create a new file called `components/WalletConnect.tsx`: + +```typescript title="WalletConnect.tsx" +"use client"; + +import React, { useState, useEffect } from "react"; +import { polkadotTestnet } from "../utils/viem"; + +interface WalletConnectProps { + onConnect: (account: string) => void; +} + +const WalletConnect: React.FC = ({ onConnect }) => { + const [account, setAccount] = useState(null); + const [chainId, setChainId] = useState(null); + const [error, setError] = useState(null); + + useEffect(() => { + // Check if user already has an authorized wallet connection + const checkConnection = async () => { + if (typeof window !== 'undefined' && window.ethereum) { + try { + // eth_accounts doesn't trigger the wallet popup + const accounts = await window.ethereum.request({ + method: 'eth_accounts', + }) as string[]; + + if (accounts.length > 0) { + setAccount(accounts[0]); + const chainIdHex = await window.ethereum.request({ + method: 'eth_chainId', + }) as string; + setChainId(parseInt(chainIdHex, 16)); + onConnect(accounts[0]); + } + } catch (err) { + console.error('Error checking connection:', err); + setError('Failed to check wallet connection'); + } + } + }; + + checkConnection(); + + if (typeof window !== 'undefined' && window.ethereum) { + // Setup wallet event listeners + window.ethereum.on('accountsChanged', (accounts: string[]) => { + setAccount(accounts[0] || null); + if (accounts[0]) onConnect(accounts[0]); + }); + + window.ethereum.on('chainChanged', (chainIdHex: string) => { + setChainId(parseInt(chainIdHex, 16)); + }); + } + + return () => { + // Cleanup event listeners + if (typeof window !== 'undefined' && window.ethereum) { + window.ethereum.removeListener('accountsChanged', () => {}); + window.ethereum.removeListener('chainChanged', () => {}); + } + }; + }, [onConnect]); + + const connectWallet = async () => { + if (typeof window === 'undefined' || !window.ethereum) { + setError( + 'MetaMask not detected! Please install MetaMask to use this dApp.' + ); + return; + } + + try { + // eth_requestAccounts triggers the wallet popup + const accounts = await window.ethereum.request({ + method: 'eth_requestAccounts', + }) as string[]; + + setAccount(accounts[0]); + + const chainIdHex = await window.ethereum.request({ + method: 'eth_chainId', + }) as string; + + const currentChainId = parseInt(chainIdHex, 16); + setChainId(currentChainId); + + // Prompt user to switch networks if needed + if (currentChainId !== polkadotTestnet.id) { + await switchNetwork(); + } + + onConnect(accounts[0]); + } catch (err) { + console.error('Error connecting to wallet:', err); + setError('Failed to connect wallet'); + } + }; + + const switchNetwork = async () => { + console.log('Switch network') + try { + await window.ethereum.request({ + method: 'wallet_switchEthereumChain', + params: [{ chainId: `0x${polkadotTestnet.id.toString(16)}` }], + }); + } catch (switchError: any) { + // Error 4902 means the chain hasn't been added to MetaMask + if (switchError.code === 4902) { + try { + await window.ethereum.request({ + method: 'wallet_addEthereumChain', + params: [ + { + chainId: `0x${polkadotTestnet.id.toString(16)}`, + chainName: polkadotTestnet.name, + rpcUrls: [polkadotTestnet.rpcUrls.default.http[0]], + nativeCurrency: { + name: polkadotTestnet.nativeCurrency.name, + symbol: polkadotTestnet.nativeCurrency.symbol, + decimals: polkadotTestnet.nativeCurrency.decimals, + }, + }, + ], + }); + } catch (addError) { + setError('Failed to add network to wallet'); + } + } else { + setError('Failed to switch network'); + } + } + }; + + // UI-only disconnection - MetaMask doesn't support programmatic disconnection + const disconnectWallet = () => { + setAccount(null); + }; + + return ( +
+ {error &&

{error}

} + + {!account ? ( + + ) : ( +
+ + {`${account.substring(0, 6)}...${account.substring(38)}`} + + + {chainId !== polkadotTestnet.id && ( + + )} +
+ )} +
+ ); +}; + +export default WalletConnect; +``` + +This component handles connecting to the wallet, switching networks if necessary, and keeping track of the connected account. It provides a button for users to connect their wallet and displays the connected account address once connected. + +## Create the Read Contract Component + +Now, let's create a component to read data from the contract. Create a file called `components/ReadContract.tsx`: + +```typescript title="ReadContract.tsx" +'use client'; + +import React, { useState, useEffect } from 'react'; +import { publicClient } from '../utils/viem'; +import { CONTRACT_ADDRESS, CONTRACT_ABI } from '../utils/contract'; + +const ReadContract: React.FC = () => { + const [storedNumber, setStoredNumber] = useState(null); + const [loading, setLoading] = useState(true); + const [error, setError] = useState(null); + + useEffect(() => { + // Function to read data from the blockchain + const fetchData = async () => { + try { + setLoading(true); + // Call the smart contract's storedNumber function + const number = await publicClient.readContract({ + address: CONTRACT_ADDRESS, + abi: CONTRACT_ABI, + functionName: 'storedNumber', + args: [], + }) as bigint; + + setStoredNumber(number.toString()); + setError(null); + } catch (err) { + console.error('Error fetching stored number:', err); + setError('Failed to fetch data from the contract'); + } finally { + setLoading(false); + } + }; + + fetchData(); + + // Poll for updates every 10 seconds to keep UI in sync with blockchain + const interval = setInterval(fetchData, 10000); + + // Clean up interval on component unmount + return () => clearInterval(interval); + }, []); + + return ( +
+

Contract Data

+ {loading ? ( +
+
+
+ ) : error ? ( +

{error}

+ ) : ( +
+

+ Stored Number: {storedNumber} +

+
+ )} +
+ ); +}; + +export default ReadContract; +``` + +This component reads the `storedNumber` value from the contract and displays it to the user. It also sets up a polling interval to refresh the data periodically, ensuring that the UI stays in sync with the blockchain state. + +## Create the Write Contract Component + +Finally, let's create a component that allows users to update the stored number. Create a file called `components/WriteContract.tsx`: + +```typescript title="WriteContract.tsx" +"use client"; + +import React, { useState, useEffect } from "react"; +import { publicClient, getWalletClient } from '../utils/viem'; +import { CONTRACT_ADDRESS, CONTRACT_ABI } from '../utils/contract'; + +interface WriteContractProps { + account: string | null; +} + +const WriteContract: React.FC = ({ account }) => { + const [newNumber, setNewNumber] = useState(""); + const [status, setStatus] = useState<{ + type: string | null; + message: string; + }>({ + type: null, + message: "", + }); + const [isSubmitting, setIsSubmitting] = useState(false); + const [isCorrectNetwork, setIsCorrectNetwork] = useState(true); + + // Check if the account is on the correct network + useEffect(() => { + const checkNetwork = async () => { + if (!account) return; + + try { + // Get the chainId from the public client + const chainId = await publicClient.getChainId(); + + // Get the user's current chainId from their wallet + const walletClient = await getWalletClient(); + if (!walletClient) return; + + const walletChainId = await walletClient.getChainId(); + + // Check if they match + setIsCorrectNetwork(chainId === walletChainId); + } catch (err) { + console.error("Error checking network:", err); + setIsCorrectNetwork(false); + } + }; + + checkNetwork(); + }, [account]); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + + // Validation checks + if (!account) { + setStatus({ type: "error", message: "Please connect your wallet first" }); + return; + } + + if (!isCorrectNetwork) { + setStatus({ + type: "error", + message: "Please switch to the correct network in your wallet", + }); + return; + } + + if (!newNumber || isNaN(Number(newNumber))) { + setStatus({ type: "error", message: "Please enter a valid number" }); + return; + } + + try { + setIsSubmitting(true); + setStatus({ type: "info", message: "Initiating transaction..." }); + + // Get wallet client for transaction signing + const walletClient = await getWalletClient(); + + if (!walletClient) { + setStatus({ type: "error", message: "Wallet client not available" }); + return; + } + + // Check if account matches + if ( + walletClient.account?.address.toLowerCase() !== account.toLowerCase() + ) { + setStatus({ + type: "error", + message: + "Connected wallet account doesn't match the selected account", + }); + return; + } + + // Prepare transaction and wait for user confirmation in wallet + setStatus({ + type: "info", + message: "Please confirm the transaction in your wallet...", + }); + + // Simulate the contract call first + console.log('newNumber', newNumber); + const { request } = await publicClient.simulateContract({ + address: CONTRACT_ADDRESS, + abi: CONTRACT_ABI, + functionName: "setNumber", + args: [BigInt(newNumber)], + account: walletClient.account, + }); + + // Send the transaction with wallet client + const hash = await walletClient.writeContract(request); + + // Wait for transaction to be mined + setStatus({ + type: "info", + message: "Transaction submitted. Waiting for confirmation...", + }); + + const receipt = await publicClient.waitForTransactionReceipt({ + hash, + }); + + setStatus({ + type: "success", + message: `Transaction confirmed! Transaction hash: ${receipt.transactionHash}`, + }); + + setNewNumber(""); + } catch (err: any) { + console.error("Error updating number:", err); + + // Handle specific errors + if (err.code === 4001) { + // User rejected transaction + setStatus({ type: "error", message: "Transaction rejected by user." }); + } else if (err.message?.includes("Account not found")) { + // Account not found on the network + setStatus({ + type: "error", + message: + "Account not found on current network. Please check your wallet is connected to the correct network.", + }); + } else if (err.message?.includes("JSON is not a valid request object")) { + // JSON error - specific to your current issue + setStatus({ + type: "error", + message: + "Invalid request format. Please try again or contact support.", + }); + } else { + // Other errors + setStatus({ + type: "error", + message: `Error: ${err.message || "Failed to send transaction"}`, + }); + } + } finally { + setIsSubmitting(false); + } + }; + + return ( +
+

Update Stored Number

+ + {!isCorrectNetwork && account && ( +
+ ⚠️ You are not connected to the correct network. Please switch + networks in your wallet. +
+ )} + + {status.message && ( +
+ {status.message} +
+ )} + +
+ setNewNumber(e.target.value)} + disabled={isSubmitting || !account} + className="w-full p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-pink-400" + /> + +
+ + {!account && ( +

+ Connect your wallet to update the stored number. +

+ )} +
+ ); +}; + +export default WriteContract; +``` + +This component allows users to input a new number and send a transaction to update the value stored in the contract. It provides appropriate feedback during each step of the transaction process and handles error scenarios. + +Update the `app/page.tsx` file to integrate all components: + +```typescript title="page.tsx" +"use client"; + +import { useState } from "react"; +import WalletConnect from "./components/WalletConnect"; +import ReadContract from "./components/ReadContract"; +import WriteContract from "./components/WriteContract"; + +export default function Home() { + const [account, setAccount] = useState(null); + + const handleConnect = (connectedAccount: string) => { + setAccount(connectedAccount); + }; + + return ( +
+

+ Polkadot Hub - Zero To Hero DApp +

+ + + +
+ ); +} +``` + +Run the dApp: + +```bash +npm run dev +``` + +Navigate to `http://localhost:3000` in your browser, and you should see your dApp with the wallet connection button, the stored number displayed, and the form to update the number. You should see something like this: + + + +## How It Works + +This dApp uses components to interact with the blockchain in several ways. + +### Wallet Connection + +The `WalletConnect` component uses the browser's Ethereum provider (MetaMask) to connect to the user's wallet and handles network switching to ensure the user is connected to the Polkadot Hub TestNet. Once connected, it provides the user's account address to the parent component. + +### Data Reads + +The `ReadContract` component uses viem's `readContract` function to call the `storedNumber` view function and periodically poll for updates to keep the UI in sync with the blockchain state. The component also displays a loading indicator while fetching data and handles error states. + +### Data Writes + +The `WriteContract` component uses viem's `writeContract` function to send a transaction to the `setNumber` function and ensures the wallet is connected before allowing a transaction. The component shows detailed feedback during transaction submission and confirmation. After a successful transaction, the value displayed in the `ReadContract` component will update on the next poll. + +## Conclusion + +Congratulations! You've successfully built a fully functional dApp that interacts with a smart contract on Polkadot Hub using viem and Next.js. Your application can now: + +- Create a smart contract with Hardhat and deploy it to Polkadot Hub TestNet. +- Connect to a user's wallet and handle network switching. +- Read data from a smart contract and keep it updated. +- Write data to the blockchain through transactions. + +These fundamental skills provide the foundation for building more complex dApps on Polkadot Hub. With this knowledge, you can extend your application to interact with more sophisticated smart contracts and create advanced user interfaces. + +To get started right away with a working example, you can clone the repository and navigate to the implementation: + +```bash +git clone https://github.com/polkadot-developers/revm-hardhat-examples.git +cd zero-to-hero-dapp +``` + +## Where to Go Next + +
+ +- Guide __Port Ethereum Projects to Polkadot Hub__ + + --- + + Learn how to port an Ethereum project to Polkadot Hub using Hardhat and Viem. + + [:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/eth-dapps/) + +- Guide __Dive Deeper into Polkadot Precompiles__ + + --- + + Learn how to use the Polkadot precompiles to interact with the blockchain. + + [:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/polkadot-precompiles/) +
diff --git a/.ai/site-index.json b/.ai/site-index.json index 814768041..64e35be44 100644 --- a/.ai/site-index.json +++ b/.ai/site-index.json @@ -17,6 +17,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:10+00:00", "token_estimator": "heuristic-v1" }, { @@ -37,6 +38,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:10+00:00", "token_estimator": "heuristic-v1" }, { @@ -57,6 +59,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:10+00:00", "token_estimator": "heuristic-v1" }, { @@ -77,6 +80,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:10+00:00", "token_estimator": "heuristic-v1" }, { @@ -97,6 +101,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:10+00:00", "token_estimator": "heuristic-v1" }, { @@ -117,6 +122,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:10+00:00", "token_estimator": "heuristic-v1" }, { @@ -228,6 +234,7 @@ "estimated_token_count_total": 4830 }, "hash": "sha256:a6bf7623a535e7a9162c0913b07bd59d43c8535025ad8225fb3e5adc83084c7a", + "last_modified": "2025-10-28T14:42:10+00:00", "token_estimator": "heuristic-v1" }, { @@ -299,6 +306,7 @@ "estimated_token_count_total": 7755 }, "hash": "sha256:086a87823ab67ceac102358030e316583cd733c0ec326316e7f29061fe7f6934", + "last_modified": "2025-10-28T14:42:10+00:00", "token_estimator": "heuristic-v1" }, { @@ -319,6 +327,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:10+00:00", "token_estimator": "heuristic-v1" }, { @@ -380,6 +389,7 @@ "estimated_token_count_total": 5207 }, "hash": "sha256:91f59a76dd33641ca2b5bf6d58230f65034fa3cc5f8313525fb57e854a878a56", + "last_modified": "2025-10-28T14:42:10+00:00", "token_estimator": "heuristic-v1" }, { @@ -471,6 +481,7 @@ "estimated_token_count_total": 2132 }, "hash": "sha256:1b9efd2fe00b251d3b4054c9cfcb55f9b5a1384238eeaca81a6f1542fc36d75c", + "last_modified": "2025-10-28T14:42:10+00:00", "token_estimator": "heuristic-v1" }, { @@ -491,6 +502,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:10+00:00", "token_estimator": "heuristic-v1" }, { @@ -557,6 +569,7 @@ "estimated_token_count_total": 4063 }, "hash": "sha256:bd07cdae71bf63786994865d2f33fba5f7bf8855dce6399414ad44ab0ec6635c", + "last_modified": "2025-10-28T14:42:10+00:00", "token_estimator": "heuristic-v1" }, { @@ -613,6 +626,7 @@ "estimated_token_count_total": 2225 }, "hash": "sha256:e916033f54c2874eb5ce9a43d58af058eb935429f73b7b1acc7da1592218e0b8", + "last_modified": "2025-10-28T14:42:10+00:00", "token_estimator": "heuristic-v1" }, { @@ -660,6 +674,7 @@ "estimated_token_count_total": 1523 }, "hash": "sha256:d9d85827d2c14bff8dd6b3301617345430cf63db603e37859720713004ecafae", + "last_modified": "2025-10-28T14:42:10+00:00", "token_estimator": "heuristic-v1" }, { @@ -679,7 +694,9 @@ "headings": 0, "estimated_token_count_total": 0 }, - "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "hash": "sha256:2b017d8a89f8734b9cbb501f03612a22657d2f8d4d85c51e490e4c8ca4bf771b", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -737,6 +754,7 @@ "estimated_token_count_total": 1635 }, "hash": "sha256:46252e238b0b51105148dc622da6d8809c55ec11da7ec7b2953c35ca52f5f585", + "last_modified": "2025-10-28T14:42:10+00:00", "token_estimator": "heuristic-v1" }, { @@ -779,6 +797,7 @@ "estimated_token_count_total": 1491 }, "hash": "sha256:db37b2f5888f283b5eb5bd84a5f8c81fc66b2313e3f94f510a73dfeb310ae3f0", + "last_modified": "2025-10-28T14:42:11+00:00", "token_estimator": "heuristic-v1" }, { @@ -845,6 +864,7 @@ "estimated_token_count_total": 955 }, "hash": "sha256:72ee7394fd1308c111a8d548cb4dc63c6b9bc5b6e2bb556dd1baacbaedb92286", + "last_modified": "2025-10-28T14:42:11+00:00", "token_estimator": "heuristic-v1" }, { @@ -896,6 +916,7 @@ "estimated_token_count_total": 876 }, "hash": "sha256:d6cb22337280a19bdf24981dcba98f337d48ee4f79ce7ac040466ef1cb4b330b", + "last_modified": "2025-10-28T14:42:11+00:00", "token_estimator": "heuristic-v1" }, { @@ -977,6 +998,7 @@ "estimated_token_count_total": 2744 }, "hash": "sha256:1a2d34ccab19bd71263763bbc294977acf34f5800398f51398753594cfc7d7a6", + "last_modified": "2025-10-28T14:42:11+00:00", "token_estimator": "heuristic-v1" }, { @@ -1048,6 +1070,7 @@ "estimated_token_count_total": 608 }, "hash": "sha256:7bba6105d99721373aa6f494627d20af97b1851c19703f26be26c32f0c83524b", + "last_modified": "2025-10-28T14:42:11+00:00", "token_estimator": "heuristic-v1" }, { @@ -1114,6 +1137,7 @@ "estimated_token_count_total": 558 }, "hash": "sha256:b79fe56c9604712825bdf30d17667fd8f237fce9691be0d8d042d38691dbba7a", + "last_modified": "2025-10-28T14:42:11+00:00", "token_estimator": "heuristic-v1" }, { @@ -1165,58 +1189,7 @@ "estimated_token_count_total": 348 }, "hash": "sha256:11cd8d428fa9c3e70490da5c63ce4597cd89ec46306d2bb49b016ced6aa68c3d", - "token_estimator": "heuristic-v1" - }, - { - "id": "develop-interoperability-versions-v5", - "title": "XCMv5", - "slug": "develop-interoperability-versions-v5", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-interoperability-versions-v5.md", - "html_url": "https://docs.polkadot.com/develop/interoperability/versions/v5/", - "preview": "The latest iteration of XCM is version 5. The main RFCs defining the changes in version 5 are the following:", - "outline": [ - { - "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" - } - ], - "stats": { - "chars": 2970, - "words": 438, - "headings": 1, - "estimated_token_count_total": 12 - }, - "hash": "sha256:3821c2ef97699091b76e1de58e6d95e866df69d39fca16f2a15c156b71da5b22", - "token_estimator": "heuristic-v1" - }, - { - "id": "develop-interoperability-versions", - "title": "XCM Versions", - "slug": "develop-interoperability-versions", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-interoperability-versions.md", - "html_url": "https://docs.polkadot.com/develop/interoperability/versions/", - "preview": "XCM is a versioned language that evolves to meet the growing needs of cross-chain communication in the Polkadot ecosystem. Understanding XCM versioning is essential for developers building interoperable applications to keep up with the latest improvements.", - "outline": [ - { - "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" - } - ], - "stats": { - "chars": 835, - "words": 114, - "headings": 1, - "estimated_token_count_total": 12 - }, - "hash": "sha256:634e299f347beb8ad690697943bb7f99915d62d40cda4227179619ed18abe2ff", + "last_modified": "2025-10-28T14:42:11+00:00", "token_estimator": "heuristic-v1" }, { @@ -1264,6 +1237,7 @@ "estimated_token_count_total": 1365 }, "hash": "sha256:5f8fa89fc725c5c559975012fe2f9ae92c3b62f10024b5688dcd118331118f1a", + "last_modified": "2025-10-28T14:42:11+00:00", "token_estimator": "heuristic-v1" }, { @@ -1316,6 +1290,7 @@ "estimated_token_count_total": 4979 }, "hash": "sha256:ed3b7c8101b69f9c907cca7c5edfef67fdb5e7bc3c8df8d9fbad297f9dd3c80a", + "last_modified": "2025-10-28T14:42:11+00:00", "token_estimator": "heuristic-v1" }, { @@ -1372,6 +1347,7 @@ "estimated_token_count_total": 1781 }, "hash": "sha256:35c71a215558cd0642d363e4515ad240093995d42720e6495cd2994c859243e4", + "last_modified": "2025-10-28T14:42:11+00:00", "token_estimator": "heuristic-v1" }, { @@ -1418,6 +1394,7 @@ "estimated_token_count_total": 1447 }, "hash": "sha256:0e39aee80fbcf3dfaa19133f31d664914ed45b42a1a929270f05d8ae876b89e2", + "last_modified": "2025-10-28T14:42:11+00:00", "token_estimator": "heuristic-v1" }, { @@ -1464,6 +1441,7 @@ "estimated_token_count_total": 1082 }, "hash": "sha256:ec82957c768c2c07a272e7a28659c812b223df836e21372b1642f0bb249d7b39", + "last_modified": "2025-10-28T14:42:11+00:00", "token_estimator": "heuristic-v1" }, { @@ -1505,63 +1483,7 @@ "estimated_token_count_total": 4178 }, "hash": "sha256:d480791a76082937b47c77f7cf3794e701f193452ed347fcb1c04c3c67577bf5", - "token_estimator": "heuristic-v1" - }, - { - "id": "develop-interoperability-xcm-guides-from-apps", - "title": "From Apps", - "slug": "develop-interoperability-xcm-guides-from-apps", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-interoperability-xcm-guides-from-apps.md", - "html_url": "https://docs.polkadot.com/develop/interoperability/xcm-guides/from-apps/", - "preview": "This section shows how to interact with XCM from applications, providing practical guidance for implementing cross-chain functionality in your dApps and services.", - "outline": [ - { - "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" - } - ], - "stats": { - "chars": 511, - "words": 70, - "headings": 1, - "estimated_token_count_total": 12 - }, - "hash": "sha256:63584f5b1dab7b67b18b35b47dfc19d00ad5c013804772f0d653a11ac3fca38d", - "token_estimator": "heuristic-v1" - }, - { - "id": "develop-interoperability-xcm-guides", - "title": "XCM Guides", - "slug": "develop-interoperability-xcm-guides", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-interoperability-xcm-guides.md", - "html_url": "https://docs.polkadot.com/develop/interoperability/xcm-guides/", - "preview": "This section provides comprehensive guides for implementing XCM functionality, including application development patterns, fee management, asset transfers, and cross-chain transaction handling.", - "outline": [ - { - "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" - }, - { - "depth": 2, - "title": "Additional Resources", - "anchor": "additional-resources" - } - ], - "stats": { - "chars": 1663, - "words": 215, - "headings": 2, - "estimated_token_count_total": 340 - }, - "hash": "sha256:d4c2d7fd46ddf60f638f948c88ba3940de6d69f140923ba8df52ed787b0afede", + "last_modified": "2025-10-28T14:42:11+00:00", "token_estimator": "heuristic-v1" }, { @@ -1629,37 +1551,7 @@ "estimated_token_count_total": 6510 }, "hash": "sha256:353ad782303ef79bce1262bfa945e6f11b3c3c9ca1edf5705b778c46bada6200", - "token_estimator": "heuristic-v1" - }, - { - "id": "develop-interoperability", - "title": "Interoperability", - "slug": "develop-interoperability", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-interoperability.md", - "html_url": "https://docs.polkadot.com/develop/interoperability/", - "preview": "This section covers everything you need to know about building and implementing [Cross-Consensus Messaging (XCM)](/parachains/interoperability/get-started/){target=\\_blank} solutions in the Polkadot ecosystem. Whether you're working on establishing cross-chain channels, sending and receiving XCM messages, or testing and debugging your cross-chain configurations, you'll find the essential resources and tools here to support your interoperability needs, regardless of your development focus.", - "outline": [ - { - "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" - }, - { - "depth": 2, - "title": "Additional Resources", - "anchor": "additional-resources" - } - ], - "stats": { - "chars": 2363, - "words": 323, - "headings": 2, - "estimated_token_count_total": 402 - }, - "hash": "sha256:5da6bdeec1deee5ef3d7ab1a43f546067bcef91acdc67df4ce114ee8f8669e82", + "last_modified": "2025-10-28T14:42:12+00:00", "token_estimator": "heuristic-v1" }, { @@ -1722,19 +1614,19 @@ "estimated_token_count_total": 1520 }, "hash": "sha256:ed09ef7a6abe21204006186fd5791ada7597688fad67e30244dc449c51330309", + "last_modified": "2025-10-28T14:42:12+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-parachains-customize-parachain-overview", - "title": "Overview of FRAME", - "slug": "develop-parachains-customize-parachain-overview", + "id": "develop-parachains-customize-parachain-add-existing-pallets", + "title": "Add a Pallet to the Runtime", + "slug": "develop-parachains-customize-parachain-add-existing-pallets", "categories": [ - "Basics", "Parachains" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-parachains-customize-parachain-overview.md", - "html_url": "https://docs.polkadot.com/develop/parachains/customize-parachain/overview/", - "preview": "The runtime is the heart of any Polkadot SDK-based blockchain, handling the essential logic that governs state changes and transaction processing. With Polkadot SDK’s [FRAME (Framework for Runtime Aggregation of Modularized Entities)](/reference/glossary/#frame-framework-for-runtime-aggregation-of-modularized-entities){target=\\_bank}, developers gain access to a powerful suite of tools for building custom blockchain runtimes. FRAME offers a modular architecture, featuring reusable pallets and su", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-parachains-customize-parachain-add-existing-pallets.md", + "html_url": "https://docs.polkadot.com/develop/parachains/customize-parachain/add-existing-pallets/", + "preview": "The [Polkadot SDK Solochain Template](https://github.com/paritytech/polkadot-sdk-solochain-template){target=\\_blank} provides a functional runtime that includes default FRAME development modules (pallets) to help you get started with building a custom blockchain.", "outline": [ { "depth": 2, @@ -1743,38 +1635,91 @@ }, { "depth": 2, - "title": "FRAME Runtime Architecture", - "anchor": "frame-runtime-architecture" + "title": "Configuring Runtime Dependencies", + "anchor": "configuring-runtime-dependencies" }, { - "depth": 3, - "title": "Pallets", - "anchor": "pallets" + "depth": 2, + "title": "Dependencies for a New Pallet", + "anchor": "dependencies-for-a-new-pallet" + }, + { + "depth": 2, + "title": "Config Trait for Pallets", + "anchor": "config-trait-for-pallets" }, { "depth": 3, - "title": "Support Libraries", - "anchor": "support-libraries" + "title": "Utility Pallet Example", + "anchor": "utility-pallet-example" }, { "depth": 2, - "title": "Compose a Runtime with Pallets", - "anchor": "compose-a-runtime-with-pallets" + "title": "Parameter Configuration for Pallets", + "anchor": "parameter-configuration-for-pallets" }, { "depth": 2, - "title": "Starting from Templates", - "anchor": "starting-from-templates" + "title": "Pallet Config in the Runtime", + "anchor": "pallet-config-in-the-runtime" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 11939, + "words": 1615, + "headings": 8, + "estimated_token_count_total": 2598 + }, + "hash": "sha256:b2b3d8c048863e7760f633b12ab2a0202c741be3050ea4beafb9a7265cfe96b5", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-parachains-customize-parachain-add-pallet-instances", + "title": "Add Multiple Pallet Instances", + "slug": "develop-parachains-customize-parachain-add-pallet-instances", + "categories": [ + "Parachains" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-parachains-customize-parachain-add-pallet-instances.md", + "html_url": "https://docs.polkadot.com/develop/parachains/customize-parachain/add-pallet-instances/", + "preview": "Running multiple instances of the same pallet within a runtime is a powerful technique in Polkadot SDK development. This approach lets you reuse pallet functionality without reimplementing it, enabling diverse use cases with the same codebase. The Polkadot SDK provides developer-friendly traits for creating instantiable pallets and, in most cases, handles unique storage allocation for different instances automatically. This guide teaches you how to implement and configure multiple instances of a", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Understanding Instantiable Pallets", + "anchor": "understanding-instantiable-pallets" + }, + { + "depth": 2, + "title": "Adding Instantiable Pallets to Your Runtime", + "anchor": "adding-instantiable-pallets-to-your-runtime" }, { "depth": 3, - "title": "Solochain Templates", - "anchor": "solochain-templates" + "title": "Define Pallet Parameters", + "anchor": "define-pallet-parameters" }, { "depth": 3, - "title": "Parachain Templates", - "anchor": "parachain-templates" + "title": "Configure the Pallet Instances", + "anchor": "configure-the-pallet-instances" + }, + { + "depth": 3, + "title": "Add Pallet Instances to the Runtime", + "anchor": "add-pallet-instances-to-the-runtime" }, { "depth": 2, @@ -1783,55 +1728,69 @@ } ], "stats": { - "chars": 9427, - "words": 1267, - "headings": 9, - "estimated_token_count_total": 2019 + "chars": 6294, + "words": 729, + "headings": 7, + "estimated_token_count_total": 1219 }, - "hash": "sha256:d03ea172f2af9f4648e730d60033a80c2c1e64efa9241fed0c1ba40a5f846ae5", + "hash": "sha256:262e7a3ad3d0a0102897c52c7589e3f94c7827c441398b3b446b205f6c6753d3", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-parachains-customize-parachain", - "title": "Customize Your Parachain", - "slug": "develop-parachains-customize-parachain", + "id": "develop-parachains-customize-parachain-add-smart-contract-functionality", + "title": "Add Smart Contract Functionality", + "slug": "develop-parachains-customize-parachain-add-smart-contract-functionality", "categories": [ - "Uncategorized" + "Parachains" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-parachains-customize-parachain.md", - "html_url": "https://docs.polkadot.com/develop/parachains/customize-parachain/", - "preview": "Learn how to build a custom parachain with Polkadot SDK's FRAME framework, which includes pallet development, testing, smart contracts, and runtime customization. Pallets are modular components within the FRAME ecosystem that contain specific blockchain functionalities. This modularity grants developers increased flexibility and control around which behaviors to include in the core logic of their parachain.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-parachains-customize-parachain-add-smart-contract-functionality.md", + "html_url": "https://docs.polkadot.com/develop/parachains/customize-parachain/add-smart-contract-functionality/", + "preview": "When building your custom blockchain with the Polkadot SDK, you have the flexibility to add smart contract capabilities through specialized pallets. These pallets allow blockchain users to deploy and execute smart contracts, enhancing your chain's functionality and programmability.", "outline": [ { "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" + "title": "Introduction", + "anchor": "introduction" }, { "depth": 2, - "title": "Additional Resources", - "anchor": "additional-resources" + "title": "EVM Smart Contracts", + "anchor": "evm-smart-contracts" + }, + { + "depth": 2, + "title": "Wasm Smart Contracts", + "anchor": "wasm-smart-contracts" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 1899, - "words": 259, - "headings": 2, - "estimated_token_count_total": 335 + "chars": 3896, + "words": 523, + "headings": 4, + "estimated_token_count_total": 905 }, - "hash": "sha256:9a08b66442c564c7116c686d8914b74ad617326f450d0894b05e753462f69aac", + "hash": "sha256:ad8e6d9c77d5451c5f4d17f8e6311b21e6ad24eae8780fd4c3ae6013744822cf", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-parachains-deployment-build-deterministic-runtime", - "title": "Build a deterministic runtime", - "slug": "develop-parachains-deployment-build-deterministic-runtime", + "id": "develop-parachains-customize-parachain-make-custom-pallet", + "title": "Make a Custom Pallet", + "slug": "develop-parachains-customize-parachain-make-custom-pallet", "categories": [ "Parachains" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-parachains-deployment-build-deterministic-runtime.md", - "html_url": "https://docs.polkadot.com/develop/parachains/deployment/build-deterministic-runtime/", - "preview": "By default, the Rust compiler produces optimized Wasm binaries. These binaries are suitable for working in an isolated environment, such as local development. However, the Wasm binaries the compiler builds by default aren't guaranteed to be deterministically reproducible. Each time the compiler generates the Wasm runtime, it might produce a slightly different Wasm byte code. This is problematic in a blockchain network where all nodes must use exactly the same raw chain specification file.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-parachains-customize-parachain-make-custom-pallet.md", + "html_url": "https://docs.polkadot.com/develop/parachains/customize-parachain/make-custom-pallet/", + "preview": "FRAME provides a powerful set of tools for blockchain development, including a library of pre-built pallets. However, its true strength lies in the ability to create custom pallets tailored to your specific needs. This section will guide you through creating your own custom pallet, allowing you to extend your blockchain's functionality in unique ways.", "outline": [ { "depth": 2, @@ -1840,64 +1799,67 @@ }, { "depth": 2, - "title": "Prerequisites", - "anchor": "prerequisites" + "title": "Initial Setup", + "anchor": "initial-setup" }, { "depth": 2, - "title": "Tooling for Wasm Runtime", - "anchor": "tooling-for-wasm-runtime" + "title": "Pallet Configuration", + "anchor": "pallet-configuration" }, { "depth": 2, - "title": "Working with the Docker Container", - "anchor": "working-with-the-docker-container" + "title": "Pallet Events", + "anchor": "pallet-events" }, { "depth": 2, - "title": "Prepare the Environment", - "anchor": "prepare-the-environment" + "title": "Pallet Errors", + "anchor": "pallet-errors" }, { "depth": 2, - "title": "Start a Deterministic Build", - "anchor": "start-a-deterministic-build" + "title": "Pallet Storage", + "anchor": "pallet-storage" }, { "depth": 2, - "title": "Use srtool in GitHub Actions", - "anchor": "use-srtool-in-github-actions" + "title": "Pallet Dispatchable Extrinsics", + "anchor": "pallet-dispatchable-extrinsics" }, { "depth": 2, - "title": "Use the srtool Image via Docker Hub", - "anchor": "use-the-srtool-image-via-docker-hub" + "title": "Pallet Implementation Overview", + "anchor": "pallet-implementation-overview" }, { - "depth": 3, - "title": "Naming Convention for Images", - "anchor": "naming-convention-for-images" + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 8470, - "words": 1227, + "chars": 17824, + "words": 2311, "headings": 9, - "estimated_token_count_total": 1944 + "estimated_token_count_total": 3995 }, - "hash": "sha256:4fc8cab40e982e860b64d9aede1058fe7fa82ec321ac215b919db00c4df0a9c0", + "hash": "sha256:19997d390abf2847824024ba923f46a61106ef77544d256d50b371210816b309", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-parachains-deployment-coretime-renewal", - "title": "Coretime Renewal", - "slug": "develop-parachains-deployment-coretime-renewal", + "id": "develop-parachains-customize-parachain-overview", + "title": "Overview of FRAME", + "slug": "develop-parachains-customize-parachain-overview", "categories": [ + "Basics", "Parachains" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-parachains-deployment-coretime-renewal.md", - "html_url": "https://docs.polkadot.com/develop/parachains/deployment/coretime-renewal/", - "preview": "Coretime can be purchased in bulk for a period of 28 days, providing access to Polkadot's shared security and interoperability for Polkadot parachains. The bulk purchase of coretime includes a rent-control mechanism that keeps future purchases within a predictable price range of the initial purchase. This allows cores to be renewed at a known price without competing against other participants in the open market.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-parachains-customize-parachain-overview.md", + "html_url": "https://docs.polkadot.com/develop/parachains/customize-parachain/overview/", + "preview": "The runtime is the heart of any Polkadot SDK-based blockchain, handling the essential logic that governs state changes and transaction processing. With Polkadot SDK’s [FRAME (Framework for Runtime Aggregation of Modularized Entities)](/reference/glossary/#frame-framework-for-runtime-aggregation-of-modularized-entities){target=\\_bank}, developers gain access to a powerful suite of tools for building custom blockchain runtimes. FRAME offers a modular architecture, featuring reusable pallets and su", "outline": [ { "depth": 2, @@ -1906,23 +1868,157 @@ }, { "depth": 2, - "title": "Bulk Sale Phases", - "anchor": "bulk-sale-phases" + "title": "FRAME Runtime Architecture", + "anchor": "frame-runtime-architecture" }, { - "depth": 2, - "title": "Renewal Timing", - "anchor": "renewal-timing" + "depth": 3, + "title": "Pallets", + "anchor": "pallets" + }, + { + "depth": 3, + "title": "Support Libraries", + "anchor": "support-libraries" }, { "depth": 2, - "title": "Manual Renewal", - "anchor": "manual-renewal" + "title": "Compose a Runtime with Pallets", + "anchor": "compose-a-runtime-with-pallets" }, { "depth": 2, - "title": "Auto-Renewal", - "anchor": "auto-renewal" + "title": "Starting from Templates", + "anchor": "starting-from-templates" + }, + { + "depth": 3, + "title": "Solochain Templates", + "anchor": "solochain-templates" + }, + { + "depth": 3, + "title": "Parachain Templates", + "anchor": "parachain-templates" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 9427, + "words": 1267, + "headings": 9, + "estimated_token_count_total": 2019 + }, + "hash": "sha256:0becb82886d34e2ed23d963efd2c14120112e6e080ea4072e864531299b59753", + "last_modified": "2025-10-28T14:42:12+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-parachains-deployment-build-deterministic-runtime", + "title": "Build a deterministic runtime", + "slug": "develop-parachains-deployment-build-deterministic-runtime", + "categories": [ + "Parachains" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-parachains-deployment-build-deterministic-runtime.md", + "html_url": "https://docs.polkadot.com/develop/parachains/deployment/build-deterministic-runtime/", + "preview": "By default, the Rust compiler produces optimized Wasm binaries. These binaries are suitable for working in an isolated environment, such as local development. However, the Wasm binaries the compiler builds by default aren't guaranteed to be deterministically reproducible. Each time the compiler generates the Wasm runtime, it might produce a slightly different Wasm byte code. This is problematic in a blockchain network where all nodes must use exactly the same raw chain specification file.", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Prerequisites", + "anchor": "prerequisites" + }, + { + "depth": 2, + "title": "Tooling for Wasm Runtime", + "anchor": "tooling-for-wasm-runtime" + }, + { + "depth": 2, + "title": "Working with the Docker Container", + "anchor": "working-with-the-docker-container" + }, + { + "depth": 2, + "title": "Prepare the Environment", + "anchor": "prepare-the-environment" + }, + { + "depth": 2, + "title": "Start a Deterministic Build", + "anchor": "start-a-deterministic-build" + }, + { + "depth": 2, + "title": "Use srtool in GitHub Actions", + "anchor": "use-srtool-in-github-actions" + }, + { + "depth": 2, + "title": "Use the srtool Image via Docker Hub", + "anchor": "use-the-srtool-image-via-docker-hub" + }, + { + "depth": 3, + "title": "Naming Convention for Images", + "anchor": "naming-convention-for-images" + } + ], + "stats": { + "chars": 8470, + "words": 1227, + "headings": 9, + "estimated_token_count_total": 1944 + }, + "hash": "sha256:4fc8cab40e982e860b64d9aede1058fe7fa82ec321ac215b919db00c4df0a9c0", + "last_modified": "2025-10-28T14:42:12+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-parachains-deployment-coretime-renewal", + "title": "Coretime Renewal", + "slug": "develop-parachains-deployment-coretime-renewal", + "categories": [ + "Parachains" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-parachains-deployment-coretime-renewal.md", + "html_url": "https://docs.polkadot.com/develop/parachains/deployment/coretime-renewal/", + "preview": "Coretime can be purchased in bulk for a period of 28 days, providing access to Polkadot's shared security and interoperability for Polkadot parachains. The bulk purchase of coretime includes a rent-control mechanism that keeps future purchases within a predictable price range of the initial purchase. This allows cores to be renewed at a known price without competing against other participants in the open market.", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Bulk Sale Phases", + "anchor": "bulk-sale-phases" + }, + { + "depth": 2, + "title": "Renewal Timing", + "anchor": "renewal-timing" + }, + { + "depth": 2, + "title": "Manual Renewal", + "anchor": "manual-renewal" + }, + { + "depth": 2, + "title": "Auto-Renewal", + "anchor": "auto-renewal" }, { "depth": 3, @@ -1957,6 +2053,7 @@ "estimated_token_count_total": 3068 }, "hash": "sha256:9918593a46c12a1756552ddfaf7421ad6262600735b6f1fec030911420fe1736", + "last_modified": "2025-10-28T14:42:12+00:00", "token_estimator": "heuristic-v1" }, { @@ -2038,6 +2135,7 @@ "estimated_token_count_total": 3025 }, "hash": "sha256:a60fe36a5ba6d1cafe12eab75300afd24a46d3ace1e791087adb7e3e538afcc3", + "last_modified": "2025-10-28T14:42:12+00:00", "token_estimator": "heuristic-v1" }, { @@ -2089,6 +2187,7 @@ "estimated_token_count_total": 1289 }, "hash": "sha256:39c58dbe2ddcd542d7074d08d72f1811318dc8a3130419025480fd5cbe9fc3e7", + "last_modified": "2025-10-28T14:42:12+00:00", "token_estimator": "heuristic-v1" }, { @@ -2124,7 +2223,152 @@ "headings": 3, "estimated_token_count_total": 966 }, - "hash": "sha256:b25618dc598f4f946da06f854211645768214e0b51d06b684b0cab668b66124c", + "hash": "sha256:358ed14147b96b47deb61df9a1ea0e1103a139ea5edb78c5d50a48d5a779b80d", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-parachains-install-polkadot-sdk", + "title": "Install Polkadot SDK Dependencies", + "slug": "develop-parachains-install-polkadot-sdk", + "categories": [ + "Basics", + "Tooling" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-parachains-install-polkadot-sdk.md", + "html_url": "https://docs.polkadot.com/develop/parachains/install-polkadot-sdk/", + "preview": "This guide provides step-by-step instructions for installing the dependencies you need to work with the Polkadot SDK-based chains on macOS, Linux, and Windows. Follow the appropriate section for your operating system to ensure all necessary tools are installed and configured properly.", + "outline": [ + { + "depth": 2, + "title": "macOS", + "anchor": "macos" + }, + { + "depth": 3, + "title": "Before You Begin", + "anchor": "before-you-begin" + }, + { + "depth": 3, + "title": "Install Required Packages and Rust", + "anchor": "install-required-packages-and-rust" + }, + { + "depth": 2, + "title": "Linux", + "anchor": "linux" + }, + { + "depth": 3, + "title": "Before You Begin {: #before-you-begin-linux }", + "anchor": "before-you-begin-before-you-begin-linux" + }, + { + "depth": 3, + "title": "Install Required Packages and Rust {: #install-required-packages-and-rust-linux }", + "anchor": "install-required-packages-and-rust-install-required-packages-and-rust-linux" + }, + { + "depth": 2, + "title": "Windows (WSL)", + "anchor": "windows-wsl" + }, + { + "depth": 3, + "title": "Before You Begin {: #before-you-begin-windows }", + "anchor": "before-you-begin-before-you-begin-windows" + }, + { + "depth": 3, + "title": "Set Up Windows Subsystem for Linux", + "anchor": "set-up-windows-subsystem-for-linux" + }, + { + "depth": 3, + "title": "Install Required Packages and Rust {: #install-required-packages-and-rust-windows }", + "anchor": "install-required-packages-and-rust-install-required-packages-and-rust-windows" + }, + { + "depth": 2, + "title": "Verifying Installation", + "anchor": "verifying-installation" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 12756, + "words": 1840, + "headings": 12, + "estimated_token_count_total": 2709 + }, + "hash": "sha256:2ee5656f749b4bca445172f2bc66c7fc39af40ff173626662ae4c399f49cf909", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-parachains-intro-polkadot-sdk", + "title": "Introduction to Polkadot SDK", + "slug": "develop-parachains-intro-polkadot-sdk", + "categories": [ + "Basics", + "Tooling" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-parachains-intro-polkadot-sdk.md", + "html_url": "https://docs.polkadot.com/develop/parachains/intro-polkadot-sdk/", + "preview": "The [Polkadot SDK](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2506-2){target=\\_blank} is a powerful and versatile developer kit designed to facilitate building on the Polkadot network. It provides the necessary components for creating custom blockchains, parachains, generalized rollups, and more. Written in the Rust programming language, it puts security and robustness at the forefront of its design.", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Polkadot SDK Overview", + "anchor": "polkadot-sdk-overview" + }, + { + "depth": 3, + "title": "Substrate", + "anchor": "substrate" + }, + { + "depth": 3, + "title": "FRAME", + "anchor": "frame" + }, + { + "depth": 3, + "title": "Cumulus", + "anchor": "cumulus" + }, + { + "depth": 2, + "title": "Why Use Polkadot SDK?", + "anchor": "why-use-polkadot-sdk" + }, + { + "depth": 2, + "title": "Create a Custom Blockchain Using the SDK", + "anchor": "create-a-custom-blockchain-using-the-sdk" + } + ], + "stats": { + "chars": 8758, + "words": 1156, + "headings": 7, + "estimated_token_count_total": 1892 + }, + "hash": "sha256:74de798c287cae75729e7db54019507f03a361dbbd1f2bb58c4694605f83efab", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -2176,6 +2420,7 @@ "estimated_token_count_total": 4719 }, "hash": "sha256:bfad885d8053d052c55dbffc3c09e6196586795c3a1d07ab6ad58f9006ec3345", + "last_modified": "2025-10-28T14:42:12+00:00", "token_estimator": "heuristic-v1" }, { @@ -2237,6 +2482,7 @@ "estimated_token_count_total": 1819 }, "hash": "sha256:b0c1535fa8e969a9bdeee426a5a35a42b4649121fb8ce6fd2b15fdeba35b5d5f", + "last_modified": "2025-10-28T14:42:12+00:00", "token_estimator": "heuristic-v1" }, { @@ -2267,7 +2513,9 @@ "headings": 2, "estimated_token_count_total": 236 }, - "hash": "sha256:3b0a9e8037c7634c33ac6674170bd763599fca914855d9d2fbf490d359140130", + "hash": "sha256:07e63e1e99b9acf1cc3b5ef8fa1f06ff22182b2a801582ce800eba37d7d39408", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -2298,7 +2546,9 @@ "headings": 2, "estimated_token_count_total": 211 }, - "hash": "sha256:0ce1fe38de00827a0735b9fa8076492205c2450c61da9fbd1937d9f38cfe7825", + "hash": "sha256:55dc252fdecf1590048ce8d009b822e90231442abe81e9593cf1635944a31336", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -2329,627 +2579,2627 @@ "headings": 2, "estimated_token_count_total": 330 }, - "hash": "sha256:75a6fa2f21b67009be62e07bab01655a10b2c35a5292dc1f7ca57df846d709f3", + "hash": "sha256:f4964f894f7cd2fdfd699c017b4bd25cffc322b03a5a88a36c682cf952832ccc", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-smart-contracts-connect-to-kusama", - "title": "Connect to Kusama", - "slug": "develop-smart-contracts-connect-to-kusama", + "id": "develop-parachains-testing-benchmarking", + "title": "Benchmarking FRAME Pallets", + "slug": "develop-parachains-testing-benchmarking", "categories": [ - "Uncategorized" + "Parachains" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-connect-to-kusama.md", - "html_url": "https://docs.polkadot.com/develop/smart-contracts/connect-to-kusama/", - "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-parachains-testing-benchmarking.md", + "html_url": "https://docs.polkadot.com/develop/parachains/testing/benchmarking/", + "preview": "Benchmarking is a critical component of developing efficient and secure blockchain runtimes. In the Polkadot ecosystem, accurately benchmarking your custom pallets ensures that each extrinsic has a precise [weight](/polkadot-protocol/glossary/#weight){target=\\_blank}, representing its computational and storage demands. This process is vital for maintaining the blockchain's performance and preventing potential vulnerabilities, such as Denial of Service (DoS) attacks.", "outline": [ { "depth": 2, - "title": "Networks Details", - "anchor": "networks-details" + "title": "Introduction", + "anchor": "introduction" }, { "depth": 2, - "title": "Important Deployment Considerations", - "anchor": "important-deployment-considerations" - }, - { - "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" - } - ], - "stats": { - "chars": 3601, - "words": 476, - "headings": 3, - "estimated_token_count_total": 514 - }, - "hash": "sha256:e8ffeaa3a17e20437a59f2c95a63821eb75bf3c33001e748c23958b2b99ac3c2", - "token_estimator": "heuristic-v1" - }, - { - "id": "develop-smart-contracts-dev-environments", - "title": "Dev Environments", - "slug": "develop-smart-contracts-dev-environments", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-dev-environments.md", - "html_url": "https://docs.polkadot.com/develop/smart-contracts/dev-environments/", - "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. Explore the tools and frameworks available for building and testing smart contracts on the Polkadot network. These environments streamline the development process, from writing and compiling to testing and deploying smart contracts. The guides in this section will help you evaluate each tool's strengths, making it easier to choose t", - "outline": [ - { - "depth": 2, - "title": "What to Consider", - "anchor": "what-to-consider" - }, - { - "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" - } - ], - "stats": { - "chars": 1601, - "words": 154, - "headings": 2, - "estimated_token_count_total": 323 - }, - "hash": "sha256:5c3a10769e30b4da62e6c188e99310354e6e9af4595c7920c2977a54b8e1853c", - "token_estimator": "heuristic-v1" - }, - { - "id": "develop-smart-contracts-faqs", - "title": "Polkadot Hub Smart Contract FAQs", - "slug": "develop-smart-contracts-faqs", - "categories": [ - "Smart Contracts" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-faqs.md", - "html_url": "https://docs.polkadot.com/develop/smart-contracts/faqs/", - "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. !!! note For a list of known incompatibilities, please refer to the [Solidity and Yul IR translation incompatibilities](/polkadot-protocol/smart-contract-basics/evm-vs-polkavm/#solidity-and-yul-ir-translation-incompatibilities){target=\\_blank} section.", - "outline": [ - { - "depth": 2, - "title": "General Questions", - "anchor": "general-questions" + "title": "The Case for Benchmarking", + "anchor": "the-case-for-benchmarking" }, { "depth": 3, - "title": "What are the different types of smart contracts I can build on Polkadot?", - "anchor": "what-are-the-different-types-of-smart-contracts-i-can-build-on-polkadot" + "title": "Benchmarking and Weight", + "anchor": "benchmarking-and-weight" }, { - "depth": 3, - "title": "Should I build a smart contract or a parachain?", - "anchor": "should-i-build-a-smart-contract-or-a-parachain" + "depth": 2, + "title": "Benchmarking Process", + "anchor": "benchmarking-process" }, { "depth": 3, - "title": "What's the difference between Polkadot Hub smart contracts and other EVM chains?", - "anchor": "whats-the-difference-between-polkadot-hub-smart-contracts-and-other-evm-chains" - }, - { - "depth": 2, - "title": "Development Environment", - "anchor": "development-environment" + "title": "Prepare Your Environment", + "anchor": "prepare-your-environment" }, { "depth": 3, - "title": "Can I use my existing Ethereum development tools?", - "anchor": "can-i-use-my-existing-ethereum-development-tools" + "title": "Write Benchmark Tests", + "anchor": "write-benchmark-tests" }, { "depth": 3, - "title": "How do I set up local development?", - "anchor": "how-do-i-set-up-local-development" + "title": "Add Benchmarks to Runtime", + "anchor": "add-benchmarks-to-runtime" }, { "depth": 3, - "title": "What networks are available for testing and deployment?", - "anchor": "what-networks-are-available-for-testing-and-deployment" + "title": "Run Benchmarks", + "anchor": "run-benchmarks" }, { "depth": 2, - "title": "Technical Implementation", - "anchor": "technical-implementation" - }, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 14731, + "words": 1881, + "headings": 9, + "estimated_token_count_total": 3342 + }, + "hash": "sha256:9d6daa3f4daf149ae822b60060d14ff022bd4b3440cecdc969a48c105eb82a21", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-parachains-testing-mock-runtime", + "title": "Mock Runtime for Pallet Testing", + "slug": "develop-parachains-testing-mock-runtime", + "categories": [ + "Parachains" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-parachains-testing-mock-runtime.md", + "html_url": "https://docs.polkadot.com/develop/parachains/testing/mock-runtime/", + "preview": "Testing is essential in Polkadot SDK development to ensure your blockchain operates as intended and effectively handles various potential scenarios. This guide walks you through setting up an environment to test pallets within the [runtime](/polkadot-protocol/glossary#runtime){target=_blank}, allowing you to evaluate how different pallets, their configurations, and system components interact to ensure reliable blockchain functionality.", + "outline": [ { - "depth": 3, - "title": "How do Ethereum addresses work on Polkadot?", - "anchor": "how-do-ethereum-addresses-work-on-polkadot" + "depth": 2, + "title": "Introduction", + "anchor": "introduction" }, { - "depth": 3, - "title": "What are the key differences in the gas model?", - "anchor": "what-are-the-key-differences-in-the-gas-model" + "depth": 2, + "title": "Configuring a Mock Runtime", + "anchor": "configuring-a-mock-runtime" }, { "depth": 3, - "title": "How does contract deployment work?", - "anchor": "how-does-contract-deployment-work" + "title": "Testing Module", + "anchor": "testing-module" }, { "depth": 3, - "title": "Which Solidity features are not supported?", - "anchor": "which-solidity-features-are-not-supported" + "title": "Genesis Storage", + "anchor": "genesis-storage" }, { "depth": 3, - "title": "How do I handle the existential deposit requirement?", - "anchor": "how-do-i-handle-the-existential-deposit-requirement" + "title": "Pallet Configuration", + "anchor": "pallet-configuration" }, { "depth": 2, - "title": "Migration and Compatibility", - "anchor": "migration-and-compatibility" - }, - { - "depth": 3, - "title": "Can I migrate my existing Ethereum contracts?", - "anchor": "can-i-migrate-my-existing-ethereum-contracts" - }, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 7493, + "words": 904, + "headings": 6, + "estimated_token_count_total": 1572 + }, + "hash": "sha256:68fc67390e24741081c9a04d78951e76c7d4ff7cf6eddaba7dcbbdc1812c71d3", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-parachains-testing-pallet-testing", + "title": "Pallet Testing", + "slug": "develop-parachains-testing-pallet-testing", + "categories": [ + "Parachains" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-parachains-testing-pallet-testing.md", + "html_url": "https://docs.polkadot.com/develop/parachains/testing/pallet-testing/", + "preview": "Unit testing in the Polkadot SDK helps ensure that the functions provided by a pallet behave as expected. It also confirms that data and events associated with a pallet are processed correctly during interactions. The Polkadot SDK offers a set of APIs to create a test environment to simulate runtime and mock transaction execution for extrinsics and queries.", + "outline": [ { "depth": 2, - "title": "Troubleshooting", - "anchor": "troubleshooting" - }, - { - "depth": 3, - "title": "Why are my gas calculations different?", - "anchor": "why-are-my-gas-calculations-different" + "title": "Introduction", + "anchor": "introduction" }, { - "depth": 3, - "title": "I deployed a contract with MetaMask, and got a `code size` error - why?", - "anchor": "i-deployed-a-contract-with-metamask-and-got-a-code-size-error-why" + "depth": 2, + "title": "Writing Unit Tests", + "anchor": "writing-unit-tests" }, { "depth": 3, - "title": "I found a bug, where can I log it?", - "anchor": "i-found-a-bug-where-can-i-log-it" - }, - { - "depth": 2, - "title": "Known Issues", - "anchor": "known-issues" + "title": "Test Initialization", + "anchor": "test-initialization" }, { "depth": 3, - "title": "Runtime Behavior", - "anchor": "runtime-behavior" + "title": "Function Call Testing", + "anchor": "function-call-testing" }, { "depth": 3, - "title": "Development Tools", - "anchor": "development-tools" + "title": "Storage Testing", + "anchor": "storage-testing" }, { "depth": 3, - "title": "Contract Patterns", - "anchor": "contract-patterns" + "title": "Event Testing", + "anchor": "event-testing" }, { - "depth": 3, - "title": "Compilation", - "anchor": "compilation" + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 7480, - "words": 984, - "headings": 25, - "estimated_token_count_total": 1618 + "chars": 6871, + "words": 909, + "headings": 7, + "estimated_token_count_total": 1559 }, - "hash": "sha256:5cc63ff0a377ef0ec96a064748e13b88bc852bd1862c6e344066855a7fe93b19", + "hash": "sha256:0024f5e4c12ab7b019e5ee183e7c78d175e1125868c5458b97d3accd9fac75bc", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-smart-contracts-libraries", - "title": "Libraries", - "slug": "develop-smart-contracts-libraries", + "id": "develop-smart-contracts-connect-to-kusama", + "title": "Connect to Kusama", + "slug": "develop-smart-contracts-connect-to-kusama", "categories": [ "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-libraries.md", - "html_url": "https://docs.polkadot.com/develop/smart-contracts/libraries/", - "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. Explore the key libraries for interacting with smart contracts on Polkadot-based networks. These libraries simplify contract calls, event listening, and transaction handling.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-connect-to-kusama.md", + "html_url": "https://docs.polkadot.com/develop/smart-contracts/connect-to-kusama/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ", "outline": [ { "depth": 2, - "title": "Library Comparison", - "anchor": "library-comparison" + "title": "Networks Details", + "anchor": "networks-details" }, { "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" + "title": "Important Deployment Considerations", + "anchor": "important-deployment-considerations" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 2056, - "words": 203, - "headings": 2, - "estimated_token_count_total": 415 + "chars": 3601, + "words": 476, + "headings": 3, + "estimated_token_count_total": 514 }, - "hash": "sha256:23137f6c74412fd98c0b6aeee3ff59938e44b817ec42974c453f9b0f66e36513", + "hash": "sha256:e8ffeaa3a17e20437a59f2c95a63821eb75bf3c33001e748c23958b2b99ac3c2", + "last_modified": "2025-10-28T14:42:12+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-smart-contracts-precompiles-interact-with-precompiles", - "title": "Interact with Precompiles", - "slug": "develop-smart-contracts-precompiles-interact-with-precompiles", + "id": "develop-smart-contracts-connect-to-polkadot", + "title": "Connect to Polkadot", + "slug": "develop-smart-contracts-connect-to-polkadot", "categories": [ "Smart Contracts" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-precompiles-interact-with-precompiles.md", - "html_url": "https://docs.polkadot.com/develop/smart-contracts/precompiles/interact-with-precompiles/", - "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-connect-to-polkadot.md", + "html_url": "https://docs.polkadot.com/develop/smart-contracts/connect-to-polkadot/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ", "outline": [ { "depth": 2, - "title": "Introduction", - "anchor": "introduction" - }, - { - "depth": 2, - "title": "Basic Precompile Interaction Pattern", - "anchor": "basic-precompile-interaction-pattern" + "title": "Networks Details", + "anchor": "networks-details" }, { "depth": 2, - "title": "ECRecover (0x01)", - "anchor": "ecrecover-0x01" + "title": "Test Tokens", + "anchor": "test-tokens" }, { "depth": 2, - "title": "SHA-256 (0x02)", - "anchor": "sha-256-0x02" - }, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 3496, + "words": 482, + "headings": 3, + "estimated_token_count_total": 570 + }, + "hash": "sha256:1247dfb5f5ac040bca81cd1002153e0ee53f4052b2a3d40b623834bd7f00d065", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-smart-contracts-dev-environments-foundry", + "title": "Use Foundry with Polkadot Hub", + "slug": "develop-smart-contracts-dev-environments-foundry", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-dev-environments.md", + "html_url": "https://docs.polkadot.com/develop/smart-contracts/dev-environments/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. Explore the tools and frameworks available for building and testing smart contracts on the Polkadot network. These environments streamline the development process, from writing and compiling to testing and deploying smart contracts. The guides in this section will help you evaluate each tool's strengths, making it easier to choose t", + "outline": [ { "depth": 2, - "title": "RIPEMD-160 (0x03)", - "anchor": "ripemd-160-0x03" + "title": "What to Consider", + "anchor": "what-to-consider" }, { "depth": 2, - "title": "Identity (Data Copy) (0x04)", - "anchor": "identity-data-copy-0x04" + "title": "In This Section", + "anchor": "in-this-section" + } + ], + "stats": { + "chars": 1601, + "words": 154, + "headings": 2, + "estimated_token_count_total": 323 + }, + "hash": "sha256:72e41f816f07026d96c803f399c71852aa1151c464e79cec3e1746b282d5eaae", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-smart-contracts-dev-environments-hardhat", + "title": "Use Hardhat with Polkadot Hub", + "slug": "develop-smart-contracts-dev-environments-hardhat", + "categories": [ + "Smart Contracts", + "Tooling" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-dev-environments-hardhat.md", + "html_url": "https://docs.polkadot.com/develop/smart-contracts/dev-environments/hardhat/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
- :octicons-code-16:{ .lg .middle } __Test and Deploy with Hardhat__", + "outline": [ + { + "depth": 2, + "title": "Overview", + "anchor": "overview" }, { "depth": 2, - "title": "Modular Exponentiation (0x05)", - "anchor": "modular-exponentiation-0x05" + "title": "Prerequisites", + "anchor": "prerequisites" }, { "depth": 2, - "title": "BN128 Addition (0x06)", - "anchor": "bn128-addition-0x06" + "title": "Set Up Hardhat", + "anchor": "set-up-hardhat" }, { "depth": 2, - "title": "BN128 Scalar Multiplication (0x07)", - "anchor": "bn128-scalar-multiplication-0x07" + "title": "Compile Your Contract", + "anchor": "compile-your-contract" }, { "depth": 2, - "title": "BN128 Pairing Check (0x08)", - "anchor": "bn128-pairing-check-0x08" + "title": "Set Up a Testing Environment", + "anchor": "set-up-a-testing-environment" }, { "depth": 2, - "title": "Blake2F (0x09)", - "anchor": "blake2f-0x09" + "title": "Test Your Contract", + "anchor": "test-your-contract" }, { "depth": 2, - "title": "Conclusion", - "anchor": "conclusion" - } - ], - "stats": { - "chars": 18054, - "words": 2190, - "headings": 12, - "estimated_token_count_total": 3847 - }, - "hash": "sha256:4b705b8dbe9b0ad8d19a897d91f3c64dbc4541297dadacbea2a31b4778e50a46", - "token_estimator": "heuristic-v1" - }, - { - "id": "develop-smart-contracts", - "title": "Smart Contracts", - "slug": "develop-smart-contracts", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts.md", - "html_url": "https://docs.polkadot.com/develop/smart-contracts/", - "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. Polkadot allows scalable execution of smart contracts, offering cross-chain compatibility and lower fees than legacy L1 platforms. Polkadot provides developers with flexibility in building smart contracts, supporting both Solidity contracts executed by the [PolkaVM](/smart-contracts/for-eth-devs/#polkavm){target=\\_blank} (a Polkadot", - "outline": [ + "title": "Deploy to a Local Node", + "anchor": "deploy-to-a-local-node" + }, { "depth": 2, - "title": "Smart Contract Development Process", - "anchor": "smart-contract-development-process" + "title": "Deploying to a Live Network", + "anchor": "deploying-to-a-live-network" }, { "depth": 2, - "title": "Additional Resources", - "anchor": "additional-resources" - } - ], - "stats": { - "chars": 1867, - "words": 247, - "headings": 2, - "estimated_token_count_total": 189 - }, - "hash": "sha256:4b56a119cbc63d87de98554cf4019e48ddb4f7cee11a51553ea234f91d78f8b8", - "token_estimator": "heuristic-v1" - }, - { - "id": "develop-toolkit-api-libraries", - "title": "API Libraries", - "slug": "develop-toolkit-api-libraries", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-api-libraries.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/api-libraries/", - "preview": "Explore the powerful API libraries designed for interacting with the Polkadot network. These libraries offer developers versatile tools to build, query, and manage blockchain interactions. Whether you’re working with JavaScript, TypeScript, Python, or RESTful services, they provide the flexibility to efficiently interact with and retrieve data from Polkadot-based chains.", - "outline": [ + "title": "Interacting with Your Contract", + "anchor": "interacting-with-your-contract" + }, { "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" + "title": "Upgrading the Plugin", + "anchor": "upgrading-the-plugin" }, { "depth": 2, - "title": "Additional Resources", - "anchor": "additional-resources" + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 1082, - "words": 139, - "headings": 2, - "estimated_token_count_total": 187 + "chars": 18520, + "words": 2475, + "headings": 11, + "estimated_token_count_total": 4188 }, - "hash": "sha256:746788d1068fe3eaafc34eb461566d1682c27fcad7d448e65810b9662b45dd85", + "hash": "sha256:fe008393aa37c27bb71b4483d4e2c4fbcda94f8c1be461fdd07eff40efbb4e26", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-toolkit-integrations-storage", - "title": "Storage", - "slug": "develop-toolkit-integrations-storage", + "id": "develop-smart-contracts-dev-environments-remix", + "title": "Use the Polkadot Remix IDE", + "slug": "develop-smart-contracts-dev-environments-remix", "categories": [ - "Uncategorized" + "Smart Contracts", + "Tooling" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-integrations-storage.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/integrations/storage/", - "preview": "Polkadot offers developers a range of decentralized storage solutions to manage dApp data, host front ends, and store large files in a censorship-resistant and resilient manner. These integrations are essential for building fully decentralized applications, ensuring that all components of your dApp, from the front end to the data, are not reliant on centralized servers.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-dev-environments-remix.md", + "html_url": "https://docs.polkadot.com/develop/smart-contracts/dev-environments/remix/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
- :octicons-code-16:{ .lg .middle } __Deploy NFTs Using Remix IDE__", "outline": [ { "depth": 2, - "title": "Key Storage Solutions", - "anchor": "key-storage-solutions" + "title": "Overview", + "anchor": "overview" }, { "depth": 2, - "title": "Crust Network", - "anchor": "crust-network" + "title": "Prerequisites", + "anchor": "prerequisites" }, { - "depth": 3, - "title": "Key Features of Crust", - "anchor": "key-features-of-crust" + "depth": 2, + "title": "Accessing Remix IDE", + "anchor": "accessing-remix-ide" }, { - "depth": 3, - "title": "Use Cases", - "anchor": "use-cases" + "depth": 2, + "title": "Creating a New Contract", + "anchor": "creating-a-new-contract" }, { "depth": 2, - "title": "IPFS", - "anchor": "ipfs" + "title": "Compiling Your Contract", + "anchor": "compiling-your-contract" }, { - "depth": 3, - "title": "Using IPFS with Polkadot", - "anchor": "using-ipfs-with-polkadot" + "depth": 2, + "title": "Deploying Contracts", + "anchor": "deploying-contracts" }, { "depth": 2, - "title": "Other Solutions", - "anchor": "other-solutions" + "title": "Interacting with Contracts", + "anchor": "interacting-with-contracts" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 4369, - "words": 642, - "headings": 7, - "estimated_token_count_total": 847 + "chars": 6732, + "words": 913, + "headings": 8, + "estimated_token_count_total": 1375 }, - "hash": "sha256:a206dd86fc3d80aed22384000839ca0c9c75c69ad461abd9810d96c03cf6a3bd", + "hash": "sha256:8e6bfed5fa59bb748e80698ea702f62ce6951c48bdb955ee9ef0d3516e856887", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-toolkit-integrations-transaction-construction", - "title": "Transaction Construction", - "slug": "develop-toolkit-integrations-transaction-construction", + "id": "develop-smart-contracts-faqs", + "title": "Polkadot Hub Smart Contract FAQs", + "slug": "develop-smart-contracts-faqs", "categories": [ - "Uncategorized" + "Smart Contracts" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-integrations-transaction-construction.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/integrations/transaction-construction/", - "preview": "This page will discuss the transaction format in Polkadot and how to create, sign, and broadcast transactions, as well as highlight some of the commands and tools available for integrators.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-faqs.md", + "html_url": "https://docs.polkadot.com/develop/smart-contracts/faqs/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. !!! note For a list of known incompatibilities, please refer to the [Solidity and Yul IR translation incompatibilities](/polkadot-protocol/smart-contract-basics/evm-vs-polkavm/#solidity-and-yul-ir-translation-incompatibilities){target=\\_blank} section.", "outline": [ { "depth": 2, - "title": "Introduction", - "anchor": "introduction" + "title": "General Questions", + "anchor": "general-questions" }, { - "depth": 2, - "title": "Transaction Format", - "anchor": "transaction-format" + "depth": 3, + "title": "What are the different types of smart contracts I can build on Polkadot?", + "anchor": "what-are-the-different-types-of-smart-contracts-i-can-build-on-polkadot" }, { "depth": 3, - "title": "Mode and Metadata Hash", - "anchor": "mode-and-metadata-hash" + "title": "Should I build a smart contract or a parachain?", + "anchor": "should-i-build-a-smart-contract-or-a-parachain" }, { "depth": 3, - "title": "Serialized Transactions and Metadata", - "anchor": "serialized-transactions-and-metadata" + "title": "What's the difference between Polkadot Hub smart contracts and other EVM chains?", + "anchor": "whats-the-difference-between-polkadot-hub-smart-contracts-and-other-evm-chains" + }, + { + "depth": 2, + "title": "Development Environment", + "anchor": "development-environment" }, { "depth": 3, - "title": "Transaction Flow", - "anchor": "transaction-flow" + "title": "Can I use my existing Ethereum development tools?", + "anchor": "can-i-use-my-existing-ethereum-development-tools" }, { - "depth": 2, - "title": "Polkadot-JS Tools", - "anchor": "polkadot-js-tools" + "depth": 3, + "title": "How do I set up local development?", + "anchor": "how-do-i-set-up-local-development" }, { "depth": 3, - "title": "Creating a Transaction, Signing, and Submitting", - "anchor": "creating-a-transaction-signing-and-submitting" + "title": "What networks are available for testing and deployment?", + "anchor": "what-networks-are-available-for-testing-and-deployment" }, { "depth": 2, - "title": "Txwrapper", - "anchor": "txwrapper" + "title": "Technical Implementation", + "anchor": "technical-implementation" }, { "depth": 3, - "title": "Creating a Transaction, Signing, and Submitting", - "anchor": "creating-a-transaction-signing-and-submitting-2" + "title": "How do Ethereum addresses work on Polkadot?", + "anchor": "how-do-ethereum-addresses-work-on-polkadot" }, { - "depth": 2, - "title": "Additional Libraries for Submitting a Transaction", - "anchor": "additional-libraries-for-submitting-a-transaction" + "depth": 3, + "title": "What are the key differences in the gas model?", + "anchor": "what-are-the-key-differences-in-the-gas-model" + }, + { + "depth": 3, + "title": "How does contract deployment work?", + "anchor": "how-does-contract-deployment-work" + }, + { + "depth": 3, + "title": "Which Solidity features are not supported?", + "anchor": "which-solidity-features-are-not-supported" + }, + { + "depth": 3, + "title": "How do I handle the existential deposit requirement?", + "anchor": "how-do-i-handle-the-existential-deposit-requirement" + }, + { + "depth": 2, + "title": "Migration and Compatibility", + "anchor": "migration-and-compatibility" + }, + { + "depth": 3, + "title": "Can I migrate my existing Ethereum contracts?", + "anchor": "can-i-migrate-my-existing-ethereum-contracts" + }, + { + "depth": 2, + "title": "Troubleshooting", + "anchor": "troubleshooting" + }, + { + "depth": 3, + "title": "Why are my gas calculations different?", + "anchor": "why-are-my-gas-calculations-different" + }, + { + "depth": 3, + "title": "I deployed a contract with MetaMask, and got a `code size` error - why?", + "anchor": "i-deployed-a-contract-with-metamask-and-got-a-code-size-error-why" + }, + { + "depth": 3, + "title": "I found a bug, where can I log it?", + "anchor": "i-found-a-bug-where-can-i-log-it" + }, + { + "depth": 2, + "title": "Known Issues", + "anchor": "known-issues" + }, + { + "depth": 3, + "title": "Runtime Behavior", + "anchor": "runtime-behavior" + }, + { + "depth": 3, + "title": "Development Tools", + "anchor": "development-tools" + }, + { + "depth": 3, + "title": "Contract Patterns", + "anchor": "contract-patterns" + }, + { + "depth": 3, + "title": "Compilation", + "anchor": "compilation" + } + ], + "stats": { + "chars": 7480, + "words": 984, + "headings": 25, + "estimated_token_count_total": 1618 + }, + "hash": "sha256:5cc63ff0a377ef0ec96a064748e13b88bc852bd1862c6e344066855a7fe93b19", + "last_modified": "2025-10-28T14:42:12+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-smart-contracts-libraries", + "title": "Libraries", + "slug": "develop-smart-contracts-libraries", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-libraries.md", + "html_url": "https://docs.polkadot.com/develop/smart-contracts/libraries/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. Explore the key libraries for interacting with smart contracts on Polkadot-based networks. These libraries simplify contract calls, event listening, and transaction handling.", + "outline": [ + { + "depth": 2, + "title": "Library Comparison", + "anchor": "library-comparison" + }, + { + "depth": 2, + "title": "In This Section", + "anchor": "in-this-section" + } + ], + "stats": { + "chars": 31726, + "words": 3942, + "headings": 35, + "estimated_token_count_total": 9750 + }, + "hash": "sha256:1fb7a20bc4a799a771954720428029419ec73afa640e589590c43dd041a7e307", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-smart-contracts-libraries-ethers-js", + "title": "Deploy Contracts to Polkadot Hub with Ethers.js", + "slug": "develop-smart-contracts-libraries-ethers-js", + "categories": [ + "Smart Contracts", + "Tooling" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-libraries-ethers-js.md", + "html_url": "https://docs.polkadot.com/develop/smart-contracts/libraries/ethers-js/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Prerequisites", + "anchor": "prerequisites" + }, + { + "depth": 2, + "title": "Project Structure", + "anchor": "project-structure" + }, + { + "depth": 2, + "title": "Set Up the Project", + "anchor": "set-up-the-project" + }, + { + "depth": 2, + "title": "Install Dependencies", + "anchor": "install-dependencies" + }, + { + "depth": 2, + "title": "Set Up the Ethers.js Provider", + "anchor": "set-up-the-ethersjs-provider" + }, + { + "depth": 2, + "title": "Compile Contracts", + "anchor": "compile-contracts" + }, + { + "depth": 3, + "title": "Install the Revive Library", + "anchor": "install-the-revive-library" + }, + { + "depth": 3, + "title": "Sample Storage Smart Contract", + "anchor": "sample-storage-smart-contract" + }, + { + "depth": 3, + "title": "Compile the Smart Contract", + "anchor": "compile-the-smart-contract" + }, + { + "depth": 2, + "title": "Deploy the Compiled Contract", + "anchor": "deploy-the-compiled-contract" + }, + { + "depth": 2, + "title": "Interact with the Contract", + "anchor": "interact-with-the-contract" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 20464, + "words": 2334, + "headings": 13, + "estimated_token_count_total": 4475 + }, + "hash": "sha256:f0cee7ccb3cd294e8f909a220bb63987239ef8155c187a04f8c4864ffdcde288", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-smart-contracts-libraries-viem", + "title": "viem for Polkadot Hub Smart Contracts", + "slug": "develop-smart-contracts-libraries-viem", + "categories": [ + "Smart Contracts", + "Tooling" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-libraries-viem.md", + "html_url": "https://docs.polkadot.com/develop/smart-contracts/libraries/viem/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Prerequisites", + "anchor": "prerequisites" + }, + { + "depth": 2, + "title": "Project Structure", + "anchor": "project-structure" + }, + { + "depth": 2, + "title": "Set Up the Project", + "anchor": "set-up-the-project" + }, + { + "depth": 2, + "title": "Install Dependencies", + "anchor": "install-dependencies" + }, + { + "depth": 2, + "title": "Initialize Project", + "anchor": "initialize-project" + }, + { + "depth": 2, + "title": "Set Up the Chain Configuration", + "anchor": "set-up-the-chain-configuration" + }, + { + "depth": 2, + "title": "Set Up the viem Client", + "anchor": "set-up-the-viem-client" + }, + { + "depth": 2, + "title": "Set Up a Wallet", + "anchor": "set-up-a-wallet" + }, + { + "depth": 2, + "title": "Sample Smart Contract", + "anchor": "sample-smart-contract" + }, + { + "depth": 2, + "title": "Compile the Contract", + "anchor": "compile-the-contract" + }, + { + "depth": 2, + "title": "Deploy the Contract", + "anchor": "deploy-the-contract" + }, + { + "depth": 2, + "title": "Interact with the Contract", + "anchor": "interact-with-the-contract" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 16645, + "words": 1945, + "headings": 14, + "estimated_token_count_total": 3900 + }, + "hash": "sha256:a7541553a50a250521c0a280f997d614763c643b1028147f3fb61391950bda15", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-smart-contracts-libraries-wagmi", + "title": "Wagmi for Polkadot Hub Smart Contracts", + "slug": "develop-smart-contracts-libraries-wagmi", + "categories": [ + "Smart Contracts", + "Tooling" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-libraries-wagmi.md", + "html_url": "https://docs.polkadot.com/develop/smart-contracts/libraries/wagmi/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Set Up the Project", + "anchor": "set-up-the-project" + }, + { + "depth": 2, + "title": "Install Dependencies", + "anchor": "install-dependencies" + }, + { + "depth": 2, + "title": "Configure Wagmi for Polkadot Hub", + "anchor": "configure-wagmi-for-polkadot-hub" + }, + { + "depth": 2, + "title": "Set Up the Wagmi Provider", + "anchor": "set-up-the-wagmi-provider" + }, + { + "depth": 2, + "title": "Connect a Wallet", + "anchor": "connect-a-wallet" + }, + { + "depth": 2, + "title": "Fetch Blockchain Data", + "anchor": "fetch-blockchain-data" + }, + { + "depth": 2, + "title": "Interact with Deployed Contract", + "anchor": "interact-with-deployed-contract" + }, + { + "depth": 2, + "title": "Integrate Components", + "anchor": "integrate-components" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 13604, + "words": 1515, + "headings": 10, + "estimated_token_count_total": 3250 + }, + "hash": "sha256:bc771f912627fa09cad64adab1bc81c052f650d6c5a3b4f0c91883a98f6628da", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-smart-contracts-libraries-web3-js", + "title": "Web3.js", + "slug": "develop-smart-contracts-libraries-web3-js", + "categories": [ + "Smart Contracts", + "Tooling" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-libraries-web3-js.md", + "html_url": "https://docs.polkadot.com/develop/smart-contracts/libraries/web3-js/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. !!! warning Web3.js has been [sunset](https://blog.chainsafe.io/web3-js-sunset/){target=\\_blank}. You can find guides on using [Ethers.js](/develop/smart-contracts/libraries/ethers-js){target=\\_blank} and [viem](/develop/smart-contracts/libraries/viem){target=\\_blank} in the [Libraries](/develop/smart-contracts/libraries/){target=\\_", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Prerequisites", + "anchor": "prerequisites" + }, + { + "depth": 2, + "title": "Project Structure", + "anchor": "project-structure" + }, + { + "depth": 2, + "title": "Set Up the Project", + "anchor": "set-up-the-project" + }, + { + "depth": 2, + "title": "Install Dependencies", + "anchor": "install-dependencies" + }, + { + "depth": 2, + "title": "Set Up the Web3 Provider", + "anchor": "set-up-the-web3-provider" + }, + { + "depth": 2, + "title": "Compile Contracts", + "anchor": "compile-contracts" + }, + { + "depth": 2, + "title": "Contract Deployment", + "anchor": "contract-deployment" + }, + { + "depth": 2, + "title": "Interact with the Contract", + "anchor": "interact-with-the-contract" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 13347, + "words": 1586, + "headings": 10, + "estimated_token_count_total": 3033 + }, + "hash": "sha256:bc87533eaf42a979a0c17f50ecdc668c364889257c7e0d27b81129770660fd53", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-smart-contracts-libraries-web3-py", + "title": "Web3.py", + "slug": "develop-smart-contracts-libraries-web3-py", + "categories": [ + "Smart Contracts", + "Tooling" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-libraries-web3-py.md", + "html_url": "https://docs.polkadot.com/develop/smart-contracts/libraries/web3-py/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Set Up the Project", + "anchor": "set-up-the-project" + }, + { + "depth": 2, + "title": "Set Up the Web3 Provider", + "anchor": "set-up-the-web3-provider" + }, + { + "depth": 2, + "title": "Contract Deployment", + "anchor": "contract-deployment" + }, + { + "depth": 2, + "title": "Interact with the Contract", + "anchor": "interact-with-the-contract" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 11652, + "words": 1335, + "headings": 6, + "estimated_token_count_total": 2512 + }, + "hash": "sha256:5d13a0873a78a9802b06686d7caafbf4d23b6ba1edf7d3518943301f2b0110c4", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-smart-contracts-local-development-node", + "title": "Local Development Node", + "slug": "develop-smart-contracts-local-development-node", + "categories": [ + "Smart Contracts" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-local-development-node.md", + "html_url": "https://docs.polkadot.com/develop/smart-contracts/local-development-node/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Prerequisites", + "anchor": "prerequisites" + }, + { + "depth": 2, + "title": "Install the Revive Dev Node and ETH-RPC Adapter", + "anchor": "install-the-revive-dev-node-and-eth-rpc-adapter" + }, + { + "depth": 2, + "title": "Run the Local Node", + "anchor": "run-the-local-node" + } + ], + "stats": { + "chars": 9064, + "words": 1433, + "headings": 4, + "estimated_token_count_total": 2432 + }, + "hash": "sha256:809d0ff921587f29045df1d31a5a9fe32ee13fa7b9698aa27ff9f60b2aa7a4d8", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-smart-contracts-overview", + "title": "Smart Contracts Overview", + "slug": "develop-smart-contracts-overview", + "categories": [ + "Basics", + "Smart Contracts" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-overview.md", + "html_url": "https://docs.polkadot.com/develop/smart-contracts/overview/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Native Smart Contracts", + "anchor": "native-smart-contracts" + }, + { + "depth": 3, + "title": "Introduction", + "anchor": "introduction-2" + }, + { + "depth": 3, + "title": "Smart Contract Development", + "anchor": "smart-contract-development" + }, + { + "depth": 3, + "title": "Technical Architecture", + "anchor": "technical-architecture" + }, + { + "depth": 3, + "title": "Development Tools and Resources", + "anchor": "development-tools-and-resources" + }, + { + "depth": 3, + "title": "Cross-Chain Capabilities", + "anchor": "cross-chain-capabilities" + }, + { + "depth": 3, + "title": "Use Cases", + "anchor": "use-cases" + }, + { + "depth": 2, + "title": "Other Smart Contract Environments", + "anchor": "other-smart-contract-environments" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 6294, + "words": 802, + "headings": 10, + "estimated_token_count_total": 1118 + }, + "hash": "sha256:0468268436ffdb759cad8390a838d5fba2391118baa8fd8cd494b36397b10329", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-smart-contracts-precompiles-interact-with-precompiles", + "title": "Interact with Precompiles", + "slug": "develop-smart-contracts-precompiles-interact-with-precompiles", + "categories": [ + "Smart Contracts" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts-precompiles-interact-with-precompiles.md", + "html_url": "https://docs.polkadot.com/develop/smart-contracts/precompiles/interact-with-precompiles/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Basic Precompile Interaction Pattern", + "anchor": "basic-precompile-interaction-pattern" + }, + { + "depth": 2, + "title": "ECRecover (0x01)", + "anchor": "ecrecover-0x01" + }, + { + "depth": 2, + "title": "SHA-256 (0x02)", + "anchor": "sha-256-0x02" + }, + { + "depth": 2, + "title": "RIPEMD-160 (0x03)", + "anchor": "ripemd-160-0x03" + }, + { + "depth": 2, + "title": "Identity (Data Copy) (0x04)", + "anchor": "identity-data-copy-0x04" + }, + { + "depth": 2, + "title": "Modular Exponentiation (0x05)", + "anchor": "modular-exponentiation-0x05" + }, + { + "depth": 2, + "title": "BN128 Addition (0x06)", + "anchor": "bn128-addition-0x06" + }, + { + "depth": 2, + "title": "BN128 Scalar Multiplication (0x07)", + "anchor": "bn128-scalar-multiplication-0x07" + }, + { + "depth": 2, + "title": "BN128 Pairing Check (0x08)", + "anchor": "bn128-pairing-check-0x08" + }, + { + "depth": 2, + "title": "Blake2F (0x09)", + "anchor": "blake2f-0x09" + }, + { + "depth": 2, + "title": "Conclusion", + "anchor": "conclusion" + } + ], + "stats": { + "chars": 18054, + "words": 2190, + "headings": 12, + "estimated_token_count_total": 3847 + }, + "hash": "sha256:4b705b8dbe9b0ad8d19a897d91f3c64dbc4541297dadacbea2a31b4778e50a46", + "last_modified": "2025-10-28T14:42:13+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-smart-contracts", + "title": "Smart Contracts", + "slug": "develop-smart-contracts", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-smart-contracts.md", + "html_url": "https://docs.polkadot.com/develop/smart-contracts/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. Polkadot allows scalable execution of smart contracts, offering cross-chain compatibility and lower fees than legacy L1 platforms. Polkadot provides developers with flexibility in building smart contracts, supporting both Solidity contracts executed by the [PolkaVM](/smart-contracts/for-eth-devs/#polkavm){target=\\_blank} (a Polkadot", + "outline": [ + { + "depth": 2, + "title": "Smart Contract Development Process", + "anchor": "smart-contract-development-process" + }, + { + "depth": 2, + "title": "Additional Resources", + "anchor": "additional-resources" + } + ], + "stats": { + "chars": 1867, + "words": 247, + "headings": 2, + "estimated_token_count_total": 189 + }, + "hash": "sha256:605d2cbb7eabb2ea0fd928bc3ecdf9ee8b095e3dd9643f2b0918fef7b5a3f4a8", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-api-libraries", + "title": "API Libraries", + "slug": "develop-toolkit-api-libraries", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-api-libraries.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/api-libraries/", + "preview": "Explore the powerful API libraries designed for interacting with the Polkadot network. These libraries offer developers versatile tools to build, query, and manage blockchain interactions. Whether you’re working with JavaScript, TypeScript, Python, or RESTful services, they provide the flexibility to efficiently interact with and retrieve data from Polkadot-based chains.", + "outline": [ + { + "depth": 2, + "title": "In This Section", + "anchor": "in-this-section" + }, + { + "depth": 2, + "title": "Additional Resources", + "anchor": "additional-resources" + } + ], + "stats": { + "chars": 7299, + "words": 1047, + "headings": 6, + "estimated_token_count_total": 1638 + }, + "hash": "sha256:807cee6869059dd933905d1cf6c76e3b86e02baee3de3113f7e5b4c8697fbd22", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-api-libraries-dedot", + "title": "Dedot", + "slug": "develop-toolkit-api-libraries-dedot", + "categories": [ + "Tooling", + "Dapps" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-api-libraries-dedot.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/api-libraries/dedot/", + "preview": "[Dedot](https://github.com/dedotdev/dedot){target=\\_blank} is a next-generation JavaScript client for Polkadot and Polkadot SDK-based blockchains. Designed to elevate the dApp development experience, Dedot is built and optimized to be lightweight and tree-shakable, offering precise types and APIs suggestions for individual Polkadot SDK-based blockchains and [ink! smart contracts](https://use.ink/){target=\\_blank}.", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 3, + "title": "Key Features", + "anchor": "key-features" + }, + { + "depth": 2, + "title": "Installation", + "anchor": "installation" + }, + { + "depth": 2, + "title": "Get Started", + "anchor": "get-started" + }, + { + "depth": 3, + "title": "Initialize a Client Instance", + "anchor": "initialize-a-client-instance" + }, + { + "depth": 3, + "title": "Enable Type and API Suggestions", + "anchor": "enable-type-and-api-suggestions" + }, + { + "depth": 3, + "title": "Read On-Chain Data", + "anchor": "read-on-chain-data" + }, + { + "depth": 3, + "title": "Sign and Send Transactions", + "anchor": "sign-and-send-transactions" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 8855, + "words": 1100, + "headings": 9, + "estimated_token_count_total": 2300 + }, + "hash": "sha256:ba24e31e2ad94fbf1d73f1878da92dd2e1476db00170780bbdf0e65ab18bc961", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-api-libraries-papi", + "title": "Polkadot-API", + "slug": "develop-toolkit-api-libraries-papi", + "categories": [ + "Tooling", + "Dapps" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-api-libraries-papi.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/api-libraries/papi/", + "preview": "[Polkadot-API](https://github.com/polkadot-api/polkadot-api){target=\\_blank} (PAPI) is a set of libraries built to be modular, composable, and grounded in a “light-client first” approach. Its primary aim is to equip dApp developers with an extensive toolkit for building fully decentralized applications.", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Get Started", + "anchor": "get-started" + }, + { + "depth": 3, + "title": "API Instantiation", + "anchor": "api-instantiation" + }, + { + "depth": 3, + "title": "Reading Chain Data", + "anchor": "reading-chain-data" + }, + { + "depth": 3, + "title": "Sending Transactions", + "anchor": "sending-transactions" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 8957, + "words": 1156, + "headings": 6, + "estimated_token_count_total": 1987 + }, + "hash": "sha256:2ca93b09d3bb9159bbf53816886a9b242bb3c13b996c51fd52962e049e2d5477", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-api-libraries-polkadart", + "title": "Polkadart", + "slug": "develop-toolkit-api-libraries-polkadart", + "categories": [ + "Tooling", + "Dapps" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-api-libraries-polkadart.md", + "html_url": "https://docs.polkadot.com/reference/tools/polkadart/", + "preview": "Polkadart is the most comprehensive Dart/Flutter SDK for interacting with Polkadot, Substrate, and other compatible blockchain networks. Designed with a Dart-first approach and type-safe APIs, it provides everything developers need to build powerful decentralized applications.", + "outline": [ + { + "depth": 2, + "title": "Installation", + "anchor": "installation" + }, + { + "depth": 2, + "title": "Get Started", + "anchor": "get-started" + }, + { + "depth": 3, + "title": "Type Generation", + "anchor": "type-generation" + }, + { + "depth": 3, + "title": "Run Generator", + "anchor": "run-generator" + }, + { + "depth": 3, + "title": "Use Generated Types", + "anchor": "use-generated-types" + }, + { + "depth": 3, + "title": "Creating an API Instance", + "anchor": "creating-an-api-instance" + }, + { + "depth": 3, + "title": "Reading Chain Data", + "anchor": "reading-chain-data" + }, + { + "depth": 3, + "title": "Subscribe to New Blocks", + "anchor": "subscribe-to-new-blocks" + }, + { + "depth": 3, + "title": "Send a Transaction", + "anchor": "send-a-transaction" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 5178, + "words": 624, + "headings": 10, + "estimated_token_count_total": 1084 + }, + "hash": "sha256:7f533abe61586af8438e350c41b741d74a8edb839f9dc4139bc4619ba3748258", + "last_modified": "2025-10-28T14:15:59+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-api-libraries-polkadot-js-api", + "title": "Polkadot.js API", + "slug": "develop-toolkit-api-libraries-polkadot-js-api", + "categories": [ + "Tooling", + "Dapps" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-api-libraries-polkadot-js-api.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/api-libraries/polkadot-js-api/", + "preview": "!!! warning \"Maintenance Mode Only\" The Polkadot.js API is now in maintenance mode and is no longer actively developed. New projects should use [Dedot](/develop/toolkit/api-libraries/dedot){target=\\_blank} (TypeScript-first API) or [Polkadot API](/develop/toolkit/api-libraries/papi){target=\\_blank} (modern, type-safe API) as actively maintained alternatives.", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 3, + "title": "Dynamic API Generation", + "anchor": "dynamic-api-generation" + }, + { + "depth": 3, + "title": "Available API Categories", + "anchor": "available-api-categories" + }, + { + "depth": 2, + "title": "Installation", + "anchor": "installation" + }, + { + "depth": 2, + "title": "Get Started", + "anchor": "get-started" + }, + { + "depth": 3, + "title": "Creating an API Instance", + "anchor": "creating-an-api-instance" + }, + { + "depth": 3, + "title": "Reading Chain Data", + "anchor": "reading-chain-data" + }, + { + "depth": 3, + "title": "Sending Transactions", + "anchor": "sending-transactions" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 5042, + "words": 684, + "headings": 9, + "estimated_token_count_total": 1166 + }, + "hash": "sha256:ed3986f30880fefca5975fcdc847c68b4aca65862c63e3002b25391b0521781d", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-api-libraries-py-substrate-interface", + "title": "Python Substrate Interface", + "slug": "develop-toolkit-api-libraries-py-substrate-interface", + "categories": [ + "Tooling", + "Dapps" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-api-libraries-py-substrate-interface.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/api-libraries/py-substrate-interface/", + "preview": "The [Python Substrate Interface](https://github.com/polkascan/py-substrate-interface){target=\\_blank} is a powerful library that enables interaction with Polkadot SDK-based chains. It provides essential functionality for:", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Installation", + "anchor": "installation" + }, + { + "depth": 2, + "title": "Get Started", + "anchor": "get-started" + }, + { + "depth": 3, + "title": "Establishing Connection", + "anchor": "establishing-connection" + }, + { + "depth": 3, + "title": "Reading Chain State", + "anchor": "reading-chain-state" + }, + { + "depth": 3, + "title": "Submitting Transactions", + "anchor": "submitting-transactions" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 4302, + "words": 541, + "headings": 7, + "estimated_token_count_total": 942 + }, + "hash": "sha256:8987fc35cd28602054ee018031f773e2e3837425107c51d0e2ac68a94b86e9c0", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-api-libraries-sidecar", + "title": "Sidecar Rest API", + "slug": "develop-toolkit-api-libraries-sidecar", + "categories": [ + "Tooling", + "Dapps" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-api-libraries-sidecar.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/api-libraries/sidecar/", + "preview": "The [Sidecar Rest API](https://github.com/paritytech/substrate-api-sidecar){target=\\_blank} is a service that provides a REST interface for interacting with Polkadot SDK-based blockchains. With this API, developers can easily access a broad range of endpoints for nodes, accounts, transactions, parachains, and more.", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Prerequisites", + "anchor": "prerequisites" + }, + { + "depth": 2, + "title": "Installation", + "anchor": "installation" + }, + { + "depth": 2, + "title": "Usage", + "anchor": "usage" + }, + { + "depth": 3, + "title": "Endpoints", + "anchor": "endpoints" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 7309, + "words": 1033, + "headings": 6, + "estimated_token_count_total": 1945 + }, + "hash": "sha256:b8759f61ab57b636228b69d5770c74591998b912cd4596e89eb2ec011da7ef73", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-api-libraries-subxt", + "title": "Subxt Rust API", + "slug": "develop-toolkit-api-libraries-subxt", + "categories": [ + "Tooling", + "Dapps" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-api-libraries-subxt.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/api-libraries/subxt/", + "preview": "Subxt is a Rust library designed to interact with Polkadot SDK-based blockchains. It provides a type-safe interface for submitting transactions, querying on-chain state, and performing other blockchain interactions. By leveraging Rust's strong type system, subxt ensures that your code is validated at compile time, reducing runtime errors and improving reliability.", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Prerequisites", + "anchor": "prerequisites" + }, + { + "depth": 2, + "title": "Installation", + "anchor": "installation" + }, + { + "depth": 2, + "title": "Get Started", + "anchor": "get-started" + }, + { + "depth": 3, + "title": "Download Chain Metadata", + "anchor": "download-chain-metadata" + }, + { + "depth": 3, + "title": "Generate Type-Safe Interfaces", + "anchor": "generate-type-safe-interfaces" + }, + { + "depth": 3, + "title": "Initialize the Subxt Client", + "anchor": "initialize-the-subxt-client" + }, + { + "depth": 3, + "title": "Read Chain Data", + "anchor": "read-chain-data" + }, + { + "depth": 3, + "title": "Submit Transactions", + "anchor": "submit-transactions" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 9174, + "words": 1175, + "headings": 10, + "estimated_token_count_total": 2187 + }, + "hash": "sha256:56269d9ea47f5b4e92cd7d5a1e65ab06d181a9c380f90bb3ef285529b12299f7", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-integrations-indexers", + "title": "Indexers", + "slug": "develop-toolkit-integrations-indexers", + "categories": [ + "Tooling", + "Dapps" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-integrations-indexers.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/integrations/indexers/", + "preview": "Blockchain data is inherently sequential and distributed, with information stored chronologically across numerous blocks. While retrieving data from a single block through JSON-RPC API calls is straightforward, more complex queries that span multiple blocks present significant challenges:", + "outline": [ + { + "depth": 2, + "title": "The Challenge of Blockchain Data Access", + "anchor": "the-challenge-of-blockchain-data-access" + }, + { + "depth": 2, + "title": "What is a Blockchain Indexer?", + "anchor": "what-is-a-blockchain-indexer" + }, + { + "depth": 2, + "title": "Indexer Implementations", + "anchor": "indexer-implementations" + } + ], + "stats": { + "chars": 2230, + "words": 302, + "headings": 3, + "estimated_token_count_total": 428 + }, + "hash": "sha256:cfcc76bb24779c9b613f2c046b6f99a0f2529c25fd82287d804f6b945b936227", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-integrations-oracles", + "title": "Oracles", + "slug": "develop-toolkit-integrations-oracles", + "categories": [ + "Tooling", + "Dapps" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-integrations-oracles.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/integrations/oracles/", + "preview": "Oracles enable blockchains to access external data sources. Since blockchains operate as isolated networks, they cannot natively interact with external systems - this limitation is known as the \"blockchain oracle problem.\" Oracles solves this by extracting data from external sources (like APIs, IoT devices, or other blockchains), validating it, and submitting it on-chain.", + "outline": [ + { + "depth": 2, + "title": "What is a Blockchain Oracle?", + "anchor": "what-is-a-blockchain-oracle" + }, + { + "depth": 2, + "title": "Oracle Implementations", + "anchor": "oracle-implementations" + } + ], + "stats": { + "chars": 1343, + "words": 181, + "headings": 2, + "estimated_token_count_total": 187 + }, + "hash": "sha256:6d8e01281a5895fd2bc4438b24c170c72a496de0b838626a53e87685aea4aa25", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-integrations-storage", + "title": "Storage", + "slug": "develop-toolkit-integrations-storage", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-integrations-storage.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/integrations/storage/", + "preview": "Polkadot offers developers a range of decentralized storage solutions to manage dApp data, host front ends, and store large files in a censorship-resistant and resilient manner. These integrations are essential for building fully decentralized applications, ensuring that all components of your dApp, from the front end to the data, are not reliant on centralized servers.", + "outline": [ + { + "depth": 2, + "title": "Key Storage Solutions", + "anchor": "key-storage-solutions" + }, + { + "depth": 2, + "title": "Crust Network", + "anchor": "crust-network" + }, + { + "depth": 3, + "title": "Key Features of Crust", + "anchor": "key-features-of-crust" + }, + { + "depth": 3, + "title": "Use Cases", + "anchor": "use-cases" + }, + { + "depth": 2, + "title": "IPFS", + "anchor": "ipfs" + }, + { + "depth": 3, + "title": "Using IPFS with Polkadot", + "anchor": "using-ipfs-with-polkadot" + }, + { + "depth": 2, + "title": "Other Solutions", + "anchor": "other-solutions" + } + ], + "stats": { + "chars": 4369, + "words": 642, + "headings": 7, + "estimated_token_count_total": 847 + }, + "hash": "sha256:a206dd86fc3d80aed22384000839ca0c9c75c69ad461abd9810d96c03cf6a3bd", + "last_modified": "2025-10-28T14:42:13+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-integrations-transaction-construction", + "title": "Transaction Construction", + "slug": "develop-toolkit-integrations-transaction-construction", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-integrations-transaction-construction.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/integrations/transaction-construction/", + "preview": "This page will discuss the transaction format in Polkadot and how to create, sign, and broadcast transactions, as well as highlight some of the commands and tools available for integrators.", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Transaction Format", + "anchor": "transaction-format" + }, + { + "depth": 3, + "title": "Mode and Metadata Hash", + "anchor": "mode-and-metadata-hash" + }, + { + "depth": 3, + "title": "Serialized Transactions and Metadata", + "anchor": "serialized-transactions-and-metadata" + }, + { + "depth": 3, + "title": "Transaction Flow", + "anchor": "transaction-flow" + }, + { + "depth": 2, + "title": "Polkadot-JS Tools", + "anchor": "polkadot-js-tools" + }, + { + "depth": 3, + "title": "Creating a Transaction, Signing, and Submitting", + "anchor": "creating-a-transaction-signing-and-submitting" + }, + { + "depth": 2, + "title": "Txwrapper", + "anchor": "txwrapper" + }, + { + "depth": 3, + "title": "Creating a Transaction, Signing, and Submitting", + "anchor": "creating-a-transaction-signing-and-submitting-2" + }, + { + "depth": 2, + "title": "Additional Libraries for Submitting a Transaction", + "anchor": "additional-libraries-for-submitting-a-transaction" + } + ], + "stats": { + "chars": 27671, + "words": 2949, + "headings": 10, + "estimated_token_count_total": 6280 + }, + "hash": "sha256:9b03477d13a285fced6bf845c3827084f790a626989dc2c09ef9ff53643045f4", + "last_modified": "2025-10-28T14:42:13+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-integrations", + "title": "Integrations", + "slug": "develop-toolkit-integrations", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-integrations.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/integrations/", + "preview": "Polkadot offers a wide range of integrations that allow developers to enhance their decentralized applications (dApps) and leverage the full capabilities of the ecosystem. Whether you’re looking to extend your application’s functionality, integrate with other chains, or access specialized services, these integrations provide the tools and resources you need to build efficiently and effectively. Explore the available options to find the solutions that best suit your development needs.", + "outline": [ + { + "depth": 2, + "title": "Key Integration Solutions", + "anchor": "key-integration-solutions" + }, + { + "depth": 2, + "title": "In This Section", + "anchor": "in-this-section" + } + ], + "stats": { + "chars": 988, + "words": 135, + "headings": 2, + "estimated_token_count_total": 92 + }, + "hash": "sha256:62c5ad101282227f79eac0e30a3ba9ce3ae1bf9e358bd58c0b17ef45db29c2ff", + "last_modified": "2025-10-28T14:15:59+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-interoperability", + "title": "Interoperability", + "slug": "develop-toolkit-interoperability", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-interoperability.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/interoperability/", + "preview": "Polkadot's XCM tooling ecosystem redefines the boundaries of cross-chain communication and asset movement. With unparalleled flexibility and scalability, these advanced tools empower developers to build decentralized applications that connect parachains, relay chains, and external networks. By bridging siloed blockchains, Polkadot paves the way for a unified, interoperable ecosystem that accelerates innovation and collaboration.", + "outline": [ + { + "depth": 2, + "title": "In This Section", + "anchor": "in-this-section" + } + ], + "stats": { + "chars": 1010, + "words": 128, + "headings": 1, + "estimated_token_count_total": 12 + }, + "hash": "sha256:966ec1bcc014a454f6b837b503025d9fb89c30f6a65d0aaec82ea5ff976e53a9", + "last_modified": "2025-10-28T14:15:59+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-parachains-e2e-testing", + "title": "E2E Testing on Polkadot SDK Chains", + "slug": "develop-toolkit-parachains-e2e-testing", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-e2e-testing.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/e2e-testing/", + "preview": ":::INSERT_IN_THIS_SECTION:::", + "outline": [ + { + "depth": 2, + "title": "In This Section", + "anchor": "in-this-section" + } + ], + "stats": { + "chars": 64, + "words": 6, + "headings": 1, + "estimated_token_count_total": 12 + }, + "hash": "sha256:47328231d6ff4dc52cd93aaf1baf5d0bc2d9fc372f3d79339d87aafa0dabd1b8", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-parachains-fork-chains-chopsticks", + "title": "Chopsticks", + "slug": "develop-toolkit-parachains-fork-chains-chopsticks", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-fork-chains-chopsticks.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/fork-chains/chopsticks/", + "preview": "Chopsticks is a powerful tool that lets you create local copies of running Polkadot SDK-based networks. By forking live chains locally, you can safely test features, analyze network behavior, and simulate complex scenarios without affecting production networks.", + "outline": [ + { + "depth": 2, + "title": "What Can I Do with Chopsticks?", + "anchor": "what-can-i-do-with-chopsticks" + }, + { + "depth": 2, + "title": "In This Section", + "anchor": "in-this-section" + }, + { + "depth": 2, + "title": "Additional Resources", + "anchor": "additional-resources" + } + ], + "stats": { + "chars": 1495, + "words": 201, + "headings": 3, + "estimated_token_count_total": 291 + }, + "hash": "sha256:2c77cfb38bb2e466a8f56dabbb706fcd2e90cf1634fc9beb7f0ee95a75735653", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-parachains-fork-chains-chopsticks-get-started", + "title": "Get Started", + "slug": "develop-toolkit-parachains-fork-chains-chopsticks-get-started", + "categories": [ + "Parachains", + "Tooling" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-fork-chains-chopsticks-get-started.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/fork-chains/chopsticks/get-started/", + "preview": "[Chopsticks](https://github.com/AcalaNetwork/chopsticks/){target=\\_blank}, developed by the [Acala Foundation](https://github.com/AcalaNetwork){target=\\_blank}, is a versatile tool tailored for developers working on Polkadot SDK-based blockchains. With Chopsticks, you can fork live chains locally, replay blocks to analyze extrinsics, and simulate complex scenarios like XCM interactions all without deploying to a live network.", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Prerequisites", + "anchor": "prerequisites" + }, + { + "depth": 2, + "title": "Install Chopsticks", + "anchor": "install-chopsticks" + }, + { + "depth": 3, + "title": "Global Installation", + "anchor": "global-installation" + }, + { + "depth": 3, + "title": "Local Installation", + "anchor": "local-installation" + }, + { + "depth": 2, + "title": "Configure Chopsticks", + "anchor": "configure-chopsticks" + }, + { + "depth": 3, + "title": "Configuration File", + "anchor": "configuration-file" + }, + { + "depth": 3, + "title": "CLI Flags", + "anchor": "cli-flags" + }, + { + "depth": 2, + "title": "WebSocket Commands", + "anchor": "websocket-commands" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 10894, + "words": 1330, + "headings": 10, + "estimated_token_count_total": 2614 + }, + "hash": "sha256:4325cdd697814b8043db808da3dee86d3d9c6fc7dd523aae7fe8914d59d1b39c", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-parachains-light-clients", + "title": "develop-toolkit-parachains-light-clients", + "slug": "develop-toolkit-parachains-light-clients", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-fork-chains.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/fork-chains/", + "preview": "Explore tools for forking live blockchain networks. These tools enable you to replicate real-world conditions in a local environment for accurate testing and debugging. They also allow you to analyze network behavior, test new features, and simulate complex scenarios in a controlled environment without affecting production systems.", + "outline": [ + { + "depth": 2, + "title": "Why Fork a Live Chain?", + "anchor": "why-fork-a-live-chain" + }, + { + "depth": 2, + "title": "In This Section", + "anchor": "in-this-section" + }, + { + "depth": 2, + "title": "Additional Resources", + "anchor": "additional-resources" + } + ], + "stats": { + "chars": 1269, + "words": 173, + "headings": 3, + "estimated_token_count_total": 183 + }, + "hash": "sha256:1284c42be692167e01bcc44e2e134ec20615402675fac26df246c00aa1588d80", + "last_modified": "2025-10-28T14:15:59+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-parachains-polkadot-omni-node", + "title": "Polkadot Omni Node", + "slug": "develop-toolkit-parachains-polkadot-omni-node", + "categories": [ + "Parachains", + "Tooling" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-polkadot-omni-node.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/polkadot-omni-node/", + "preview": "The [`polkadot-omni-node`](https://crates.io/crates/polkadot-omni-node/0.7.0){target=\\_blank} crate is a versatile, pre-built binary designed to simplify running parachains in the Polkadot ecosystem. Unlike traditional node binaries that are tightly coupled to specific runtime code, the `polkadot-omni-node` operates using an external [chain specification](/polkadot-protocol/glossary#chain-specification){target=\\_blank} file, allowing it to adapt dynamically to different parachains.", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Prerequisites", + "anchor": "prerequisites" + }, + { + "depth": 2, + "title": "Install Polkadot Omni Node", + "anchor": "install-polkadot-omni-node" + }, + { + "depth": 2, + "title": "Obtain Chain Specifications", + "anchor": "obtain-chain-specifications" + }, + { + "depth": 2, + "title": "Run a Parachain Full Node", + "anchor": "run-a-parachain-full-node" + }, + { + "depth": 2, + "title": "Interact with the Node", + "anchor": "interact-with-the-node" + }, + { + "depth": 2, + "title": "Parachain Compatibility", + "anchor": "parachain-compatibility" + }, + { + "depth": 3, + "title": "Required Runtime APIs", + "anchor": "required-runtime-apis" + }, + { + "depth": 3, + "title": "Required Pallets", + "anchor": "required-pallets" + } + ], + "stats": { + "chars": 8916, + "words": 1165, + "headings": 9, + "estimated_token_count_total": 2018 + }, + "hash": "sha256:49866761ef638dd0683bb5558f5319b9568ff136295b3359580a6f478172c73f", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-parachains-quickstart-pop-cli", + "title": "Quickstart Parachain Development with Pop CLI", + "slug": "develop-toolkit-parachains-quickstart-pop-cli", + "categories": [ + "Parachains", + "Tooling" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-quickstart-pop-cli.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/quickstart/pop-cli/", + "preview": "[Pop CLI](https://onpop.io/cli/){target=\\_blank} is a powerful command-line tool designed explicitly for rapid parachain development within the Polkadot ecosystem. It addresses essential developer needs by providing streamlined commands to set up development environments, scaffold parachain templates, and manage local blockchain networks.", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 3, + "title": "Install Pop CLI", + "anchor": "install-pop-cli" + }, + { + "depth": 3, + "title": "Set Up Your Development Environment", + "anchor": "set-up-your-development-environment" + }, + { + "depth": 3, + "title": "Initialize a Project", + "anchor": "initialize-a-project" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 4236, + "words": 610, + "headings": 5, + "estimated_token_count_total": 999 + }, + "hash": "sha256:6d6c66430a7302f29113924c5208e64d7c244497e50c61ab2f45c4b5141620e4", + "last_modified": "2025-10-28T14:42:13+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-parachains-remote-proxies", + "title": "Remote Proxies", + "slug": "develop-toolkit-parachains-remote-proxies", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-remote-proxies.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/remote-proxies/", + "preview": "!!!warning \"Kusama Implementation Only\" Remote proxies are currently only available on Kusama and its parachains (such as Kusama Asset Hub). This feature is not yet deployed on Polkadot MainNet. The examples and implementations described in this guide are specific to the Kusama ecosystem.", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Remote Proxy Architecture", + "anchor": "remote-proxy-architecture" + }, + { + "depth": 2, + "title": "Implementation Workflow", + "anchor": "implementation-workflow" + }, + { + "depth": 2, + "title": "Practical Implementation", + "anchor": "practical-implementation" + }, + { + "depth": 3, + "title": "Prerequisites", + "anchor": "prerequisites" + }, + { + "depth": 3, + "title": "Installation and Setup", + "anchor": "installation-and-setup" + }, + { + "depth": 3, + "title": "Implementation Example", + "anchor": "implementation-example" + }, + { + "depth": 2, + "title": "Resources", + "anchor": "resources" + } + ], + "stats": { + "chars": 9063, + "words": 1113, + "headings": 8, + "estimated_token_count_total": 1863 + }, + "hash": "sha256:7086406b31e7aa9089b221ffaa548ee5540a3d147ec1e93136f481c883f2e434", + "last_modified": "2025-10-28T14:42:13+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "develop-toolkit-parachains-rpc-calls", + "title": "RPC Calls to Polkadot SDK chains.", + "slug": "develop-toolkit-parachains-rpc-calls", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-rpc-calls.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/rpc-calls/", + "preview": "[Remote Procedure Call](https://en.wikipedia.org/wiki/Remote_procedure_call){target=\\_blank} (RPC) interfaces are the primary way to interact programmatically with Polkadot SDK-based parachains and relay chains. RPC calls allow you to query chain state, submit transactions, and monitor network health from external applications or scripts.", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "How Do RPC Calls Work?", + "anchor": "how-do-rpc-calls-work" + }, + { + "depth": 2, + "title": "Making RPC Calls with Curl", + "anchor": "making-rpc-calls-with-curl" + }, + { + "depth": 2, + "title": "Essential RPC Methods", + "anchor": "essential-rpc-methods" + }, + { + "depth": 3, + "title": "system_health", + "anchor": "system_health" + }, + { + "depth": 3, + "title": "chain_getBlock", + "anchor": "chain_getblock" + }, + { + "depth": 3, + "title": "state_getStorage", + "anchor": "state_getstorage" + }, + { + "depth": 3, + "title": "author_submitExtrinsic", + "anchor": "author_submitextrinsic" + }, + { + "depth": 3, + "title": "state_getMetadata", + "anchor": "state_getmetadata" + }, + { + "depth": 2, + "title": "Check Available RPC Calls", + "anchor": "check-available-rpc-calls" + }, + { + "depth": 3, + "title": "Using curl", + "anchor": "using-curl" + }, + { + "depth": 3, + "title": "Using Polkadot.js Apps", + "anchor": "using-polkadotjs-apps" + }, + { + "depth": 2, + "title": "Resources", + "anchor": "resources" } ], "stats": { - "chars": 27671, - "words": 2949, - "headings": 10, - "estimated_token_count_total": 6280 + "chars": 6496, + "words": 909, + "headings": 13, + "estimated_token_count_total": 1870 }, - "hash": "sha256:9b03477d13a285fced6bf845c3827084f790a626989dc2c09ef9ff53643045f4", + "hash": "sha256:3b766e00e55a224201bc6744386a6dabc7da54ed9199b16abab3b94cff449eca", + "last_modified": "2025-10-28T14:42:13+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-toolkit-integrations", - "title": "Integrations", - "slug": "develop-toolkit-integrations", + "id": "develop-toolkit-parachains-spawn-chains-zombienet-get-started", + "title": "Get Started", + "slug": "develop-toolkit-parachains-spawn-chains-zombienet-get-started", "categories": [ - "Uncategorized" + "Parachains", + "Tooling" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-integrations.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/integrations/", - "preview": "Polkadot offers a wide range of integrations that allow developers to enhance their decentralized applications (dApps) and leverage the full capabilities of the ecosystem. Whether you’re looking to extend your application’s functionality, integrate with other chains, or access specialized services, these integrations provide the tools and resources you need to build efficiently and effectively. Explore the available options to find the solutions that best suit your development needs.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-spawn-chains-zombienet-get-started.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/spawn-chains/zombienet/get-started/", + "preview": "Zombienet is a robust testing framework designed for Polkadot SDK-based blockchain networks. It enables developers to efficiently deploy and test ephemeral blockchain environments on platforms like Kubernetes, Podman, and native setups. With its simple and versatile CLI, Zombienet provides an all-in-one solution for spawning networks, running tests, and validating performance.", "outline": [ { "depth": 2, - "title": "Key Integration Solutions", - "anchor": "key-integration-solutions" + "title": "Introduction", + "anchor": "introduction" }, { "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" + "title": "Install Zombienet", + "anchor": "install-zombienet" + }, + { + "depth": 2, + "title": "Providers", + "anchor": "providers" + }, + { + "depth": 3, + "title": "Kubernetes", + "anchor": "kubernetes" + }, + { + "depth": 3, + "title": "Podman", + "anchor": "podman" + }, + { + "depth": 3, + "title": "Local Provider", + "anchor": "local-provider" + }, + { + "depth": 2, + "title": "Configure Zombienet", + "anchor": "configure-zombienet" + }, + { + "depth": 3, + "title": "Configuration Files", + "anchor": "configuration-files" + }, + { + "depth": 3, + "title": "CLI Usage", + "anchor": "cli-usage" + }, + { + "depth": 3, + "title": "Settings", + "anchor": "settings" + }, + { + "depth": 3, + "title": "Relay Chain Configuration", + "anchor": "relay-chain-configuration" + }, + { + "depth": 3, + "title": "Parachain Configuration", + "anchor": "parachain-configuration" + }, + { + "depth": 3, + "title": "XCM Configuration", + "anchor": "xcm-configuration" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 988, - "words": 135, - "headings": 2, - "estimated_token_count_total": 92 + "chars": 41636, + "words": 4599, + "headings": 14, + "estimated_token_count_total": 9871 }, - "hash": "sha256:0de8c1655a1524784010b6cec5fa522b2f764e32f18913f0d262283e0ec0779e", + "hash": "sha256:0d7e04fd952cc9d5bd8cdbfd87cc4004c5f95e896a16bc7f89dfc4caeac8f371", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-toolkit-interoperability", - "title": "Interoperability", - "slug": "develop-toolkit-interoperability", + "id": "develop-toolkit-parachains-spawn-chains-zombienet-write-tests", + "title": "Write Tests", + "slug": "develop-toolkit-parachains-spawn-chains-zombienet-write-tests", "categories": [ - "Uncategorized" + "Parachains", + "Tooling" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-interoperability.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/interoperability/", - "preview": "Polkadot's XCM tooling ecosystem redefines the boundaries of cross-chain communication and asset movement. With unparalleled flexibility and scalability, these advanced tools empower developers to build decentralized applications that connect parachains, relay chains, and external networks. By bridging siloed blockchains, Polkadot paves the way for a unified, interoperable ecosystem that accelerates innovation and collaboration.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-spawn-chains-zombienet-write-tests.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/spawn-chains/zombienet/write-tests/", + "preview": "Testing is a critical step in blockchain development, ensuring reliability, performance, and security. Zombienet simplifies this process with its intuitive Domain Specific Language (DSL), enabling developers to write natural-language test scripts tailored to their network needs.", "outline": [ { "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Testing DSL", + "anchor": "testing-dsl" + }, + { + "depth": 2, + "title": "The Test File", + "anchor": "the-test-file" + }, + { + "depth": 3, + "title": "Name", + "anchor": "name" + }, + { + "depth": 3, + "title": "Assertions", + "anchor": "assertions" + }, + { + "depth": 3, + "title": "Commands", + "anchor": "commands" + }, + { + "depth": 2, + "title": "Running a Test", + "anchor": "running-a-test" + }, + { + "depth": 2, + "title": "Example Test Files", + "anchor": "example-test-files" } ], "stats": { - "chars": 1010, - "words": 128, - "headings": 1, - "estimated_token_count_total": 12 + "chars": 11297, + "words": 1491, + "headings": 8, + "estimated_token_count_total": 2661 }, - "hash": "sha256:c72d7d30a019fe1db8ab3993f91dfd4f1bdb4a932aaa685d3baaa0578091d5ce", + "hash": "sha256:04e85c4cddb58252f8253d78a3924bb56952dac2a3e9a057704a91a0d1f21d75", + "last_modified": "2025-10-28T14:42:13+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-toolkit-parachains-e2e-testing", - "title": "E2E Testing on Polkadot SDK Chains", - "slug": "develop-toolkit-parachains-e2e-testing", + "id": "develop-toolkit-parachains-spawn-chains-zombienet", + "title": "Zombienet", + "slug": "develop-toolkit-parachains-spawn-chains-zombienet", "categories": [ "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-e2e-testing.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/e2e-testing/", - "preview": ":::INSERT_IN_THIS_SECTION:::", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-spawn-chains-zombienet.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/spawn-chains/zombienet/", + "preview": "Zombienet is a testing framework that lets you quickly spin up ephemeral blockchain networks for development and testing. With support for multiple deployment targets, such as Kubernetes, Podman, and native environments, Zombienet makes it easy to validate your blockchain implementation in a controlled environment.", "outline": [ { "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" + "title": "What Can I Do with Zombienet?", + "anchor": "what-can-i-do-with-zombienet" + }, + { + "depth": 2, + "title": "Download LLM Files", + "anchor": "download-llm-files" } ], "stats": { - "chars": 64, - "words": 6, - "headings": 1, - "estimated_token_count_total": 12 + "chars": 7659, + "words": 777, + "headings": 2, + "estimated_token_count_total": 2073 }, - "hash": "sha256:cc49fdcc63a43247d80de2f309b9c7501d3054782746d80c003d95f3c43da90d", + "hash": "sha256:9836ab7da420e9ca8196da77dc3ff8198cb3b622548842d0505c0aa043a5f02e", + "last_modified": "2025-10-28T14:42:13+00:00", "token_estimator": "heuristic-v1" }, - { - "id": "develop-toolkit-parachains-fork-chains-chopsticks", - "title": "Chopsticks", - "slug": "develop-toolkit-parachains-fork-chains-chopsticks", + { + "id": "get-support-explore-resources", + "title": "Subscribe to Updates", + "slug": "get-support-explore-resources", "categories": [ "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-fork-chains-chopsticks.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/fork-chains/chopsticks/", - "preview": "Chopsticks is a powerful tool that lets you create local copies of running Polkadot SDK-based networks. By forking live chains locally, you can safely test features, analyze network behavior, and simulate complex scenarios without affecting production networks.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/get-support-explore-resources.md", + "html_url": "https://docs.polkadot.com/get-support/explore-resources/", + "preview": "Looking for answers beyond the documentation? These platforms are full of useful content and experienced developers sharing insights.", "outline": [ - { - "depth": 2, - "title": "What Can I Do with Chopsticks?", - "anchor": "what-can-i-do-with-chopsticks" - }, - { - "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" - }, { "depth": 2, "title": "Additional Resources", @@ -2957,29 +5207,30 @@ } ], "stats": { - "chars": 1495, - "words": 201, + "chars": 1237, + "words": 164, "headings": 3, - "estimated_token_count_total": 291 + "estimated_token_count_total": 193 }, - "hash": "sha256:b568596033cdf68e60d72bcb7ee62a794def2bd3ff5b3317ef15895f58a12c57", + "hash": "sha256:4c33d0ec5026128b3bfdb1dfc1f4b29487404eaa8043071d536e8638356c6e1f", + "last_modified": "2025-10-28T14:42:13+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-toolkit-parachains-fork-chains", - "title": "Fork Chains for Testing", - "slug": "develop-toolkit-parachains-fork-chains", + "id": "develop-toolkit-parachains-spawn-chains", + "title": "Spawn Networks for Testing", + "slug": "develop-toolkit-parachains-spawn-chains", "categories": [ "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-fork-chains.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/fork-chains/", - "preview": "Explore tools for forking live blockchain networks. These tools enable you to replicate real-world conditions in a local environment for accurate testing and debugging. They also allow you to analyze network behavior, test new features, and simulate complex scenarios in a controlled environment without affecting production systems.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-spawn-chains.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/spawn-chains/", + "preview": "Testing blockchain networks in a controlled environment is essential for development and validation. The Polkadot ecosystem provides specialized tools that enable you to spawn test networks, helping you verify functionality and catch issues before deploying to production.", "outline": [ { "depth": 2, - "title": "Why Fork a Live Chain?", - "anchor": "why-fork-a-live-chain" + "title": "Why Spawn a Network?", + "anchor": "why-spawn-a-network" }, { "depth": 2, @@ -2993,71 +5244,58 @@ } ], "stats": { - "chars": 1269, - "words": 173, + "chars": 1180, + "words": 155, "headings": 3, - "estimated_token_count_total": 183 + "estimated_token_count_total": 171 }, - "hash": "sha256:d29a845b00b24e03f9877a5331c33619918decf453657969115d5ec18033ba28", + "hash": "sha256:993e93b05c8fbdfc2f7510c61ac86bc4c2ff0f03e573695b2f260933c8b62f78", + "last_modified": "2025-10-28T14:42:13+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-toolkit-parachains-quickstart-pop-cli", - "title": "Quickstart Parachain Development with Pop CLI", - "slug": "develop-toolkit-parachains-quickstart-pop-cli", + "id": "develop-toolkit-parachains", + "title": "Parachains", + "slug": "develop-toolkit-parachains", "categories": [ - "Parachains", - "Tooling" + "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-quickstart-pop-cli.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/quickstart/pop-cli/", - "preview": "[Pop CLI](https://onpop.io/cli/){target=\\_blank} is a powerful command-line tool designed explicitly for rapid parachain development within the Polkadot ecosystem. It addresses essential developer needs by providing streamlined commands to set up development environments, scaffold parachain templates, and manage local blockchain networks.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/", + "preview": "Within the Polkadot ecosystem, you'll find a robust set of development tools that empower developers to build, test, and deploy blockchain applications efficiently. Whether you're designing a custom parachain, testing new features, or validating network configurations, these tools streamline the development process and ensure your blockchain setup is secure and optimized.", "outline": [ { "depth": 2, - "title": "Introduction", - "anchor": "introduction" - }, - { - "depth": 3, - "title": "Install Pop CLI", - "anchor": "install-pop-cli" - }, - { - "depth": 3, - "title": "Set Up Your Development Environment", - "anchor": "set-up-your-development-environment" - }, - { - "depth": 3, - "title": "Initialize a Project", - "anchor": "initialize-a-project" + "title": "Quick Links", + "anchor": "quick-links" }, { "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" + "title": "In This Section", + "anchor": "in-this-section" } ], "stats": { - "chars": 4236, - "words": 610, - "headings": 5, - "estimated_token_count_total": 999 + "chars": 986, + "words": 136, + "headings": 2, + "estimated_token_count_total": 106 }, - "hash": "sha256:6d6c66430a7302f29113924c5208e64d7c244497e50c61ab2f45c4b5141620e4", + "hash": "sha256:d84a5af1a0237a911d25a68c077f508ebbce608f673ef4f9055e8e434daa96b9", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-toolkit-parachains-quickstart", - "title": "Quickstart Parachain Development", - "slug": "develop-toolkit-parachains-quickstart", + "id": "develop-toolkit", + "title": "Toolkit", + "slug": "develop-toolkit", "categories": [ "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-quickstart.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/quickstart/", - "preview": ":::INSERT_IN_THIS_SECTION:::", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit.md", + "html_url": "https://docs.polkadot.com/develop/toolkit/", + "preview": "Explore Polkadot's core development toolkit, designed to support a variety of developers and use cases within the ecosystem. Whether you're building blockchain infrastructure, developing cross-chain applications, or integrating with external services, this section offers essential tools and resources to help you succeed.", "outline": [ { "depth": 2, @@ -3066,24 +5304,26 @@ } ], "stats": { - "chars": 85, - "words": 7, + "chars": 902, + "words": 113, "headings": 1, "estimated_token_count_total": 12 }, - "hash": "sha256:91de375b7f822ed56b5e6b4d609d0d36e806d3f77041b4e180b6679b10a3e1c8", + "hash": "sha256:abd9f939f68b068a18567b875c9f7e11d102c54fc02ca0e6ee8041c539061ed0", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-toolkit-parachains-remote-proxies", - "title": "Remote Proxies", - "slug": "develop-toolkit-parachains-remote-proxies", + "id": "develop", + "title": "Develop", + "slug": "develop", "categories": [ "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-remote-proxies.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/remote-proxies/", - "preview": "!!!warning \"Kusama Implementation Only\" Remote proxies are currently only available on Kusama and its parachains (such as Kusama Asset Hub). This feature is not yet deployed on Polkadot MainNet. The examples and implementations described in this guide are specific to the Kusama ecosystem.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop.md", + "html_url": "https://docs.polkadot.com/develop/", + "preview": "This guide is a starting point for developers who wish to build in the Polkadot ecosystem. To get the most from this section:", "outline": [ { "depth": 2, @@ -3092,146 +5332,132 @@ }, { "depth": 2, - "title": "Remote Proxy Architecture", - "anchor": "remote-proxy-architecture" - }, - { - "depth": 2, - "title": "Implementation Workflow", - "anchor": "implementation-workflow" - }, - { - "depth": 2, - "title": "Practical Implementation", - "anchor": "practical-implementation" + "title": "Development Pathways", + "anchor": "development-pathways" }, { "depth": 3, - "title": "Prerequisites", - "anchor": "prerequisites" + "title": "Parachain Developers", + "anchor": "parachain-developers" }, { "depth": 3, - "title": "Installation and Setup", - "anchor": "installation-and-setup" + "title": "Smart Contract Developers", + "anchor": "smart-contract-developers" }, { "depth": 3, - "title": "Implementation Example", - "anchor": "implementation-example" + "title": "Application Developers", + "anchor": "application-developers" }, { "depth": 2, - "title": "Resources", - "anchor": "resources" + "title": "In This Section", + "anchor": "in-this-section" } ], "stats": { - "chars": 9063, - "words": 1113, - "headings": 8, - "estimated_token_count_total": 1863 + "chars": 6923, + "words": 882, + "headings": 6, + "estimated_token_count_total": 1843 }, - "hash": "sha256:7086406b31e7aa9089b221ffaa548ee5540a3d147ec1e93136f481c883f2e434", + "hash": "sha256:0b43b452e9d709cb324bf51fd88c2fed8e6249534a7c2b852e1bd36bcb9b981a", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-toolkit-parachains-rpc-calls", - "title": "RPC Calls to Polkadot SDK chains.", - "slug": "develop-toolkit-parachains-rpc-calls", + "id": "get-support-ai-ready-docs", + "title": "AI Ready Docs", + "slug": "get-support-ai-ready-docs", "categories": [ "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-rpc-calls.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/rpc-calls/", - "preview": "[Remote Procedure Call](https://en.wikipedia.org/wiki/Remote_procedure_call){target=\\_blank} (RPC) interfaces are the primary way to interact programmatically with Polkadot SDK-based parachains and relay chains. RPC calls allow you to query chain state, submit transactions, and monitor network health from external applications or scripts.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/get-support-ai-ready-docs.md", + "html_url": "https://docs.polkadot.com/get-support/ai-ready-docs/", + "preview": "Polkadot provides files to make documentation content available in a structure optimized for use with large language models (LLMs) and AI tools. These resources help build AI assistants, power code search, or enable custom tooling trained on Polkadot’s documentation.", "outline": [ { "depth": 2, - "title": "Introduction", - "anchor": "introduction" + "title": "How to Use These Files", + "anchor": "how-to-use-these-files" }, { "depth": 2, - "title": "How Do RPC Calls Work?", - "anchor": "how-do-rpc-calls-work" - }, + "title": "Download LLM Files", + "anchor": "download-llm-files" + } + ], + "stats": { + "chars": 7998, + "words": 825, + "headings": 2, + "estimated_token_count_total": 2232 + }, + "hash": "sha256:1090b02689df5f4c59bb83f9c81436718d06e46f3b615bc655fef3c7b6c9fb02", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "get-support-explore-resources", + "title": "Subscribe to Updates", + "slug": "get-support-explore-resources", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/get-support-explore-resources.md", + "html_url": "https://docs.polkadot.com/get-support/explore-resources/", + "preview": "Looking for answers beyond the documentation? These platforms are full of useful content and experienced developers sharing insights.", + "outline": [ { "depth": 2, - "title": "Making RPC Calls with Curl", - "anchor": "making-rpc-calls-with-curl" + "title": "🧠 Stack Exchange", + "anchor": "stack-exchange" }, { "depth": 2, - "title": "Essential RPC Methods", - "anchor": "essential-rpc-methods" - }, - { - "depth": 3, - "title": "system_health", - "anchor": "system_health" - }, - { - "depth": 3, - "title": "chain_getBlock", - "anchor": "chain_getblock" - }, - { - "depth": 3, - "title": "state_getStorage", - "anchor": "state_getstorage" - }, - { - "depth": 3, - "title": "author_submitExtrinsic", - "anchor": "author_submitextrinsic" - }, - { - "depth": 3, - "title": "state_getMetadata", - "anchor": "state_getmetadata" + "title": "🧵 Reddit: r/Polkadot", + "anchor": "reddit-rpolkadot" }, { "depth": 2, - "title": "Check Available RPC Calls", - "anchor": "check-available-rpc-calls" - }, - { - "depth": 3, - "title": "Using curl", - "anchor": "using-curl" + "title": "💬 Discord (Community Threads Only)", + "anchor": "discord-community-threads-only" }, { - "depth": 3, - "title": "Using Polkadot.js Apps", - "anchor": "using-polkadotjs-apps" + "depth": 2, + "title": "🎥 YouTube: @PolkadotNetwork", + "anchor": "youtube-polkadotnetwork" }, { "depth": 2, - "title": "Resources", - "anchor": "resources" - } - ], - "stats": { - "chars": 6496, - "words": 909, - "headings": 13, - "estimated_token_count_total": 1870 + "title": "Verify Installation", + "anchor": "verify-installation" + } + ], + "stats": { + "chars": 11883, + "words": 1662, + "headings": 12, + "estimated_token_count_total": 2559 }, - "hash": "sha256:3b766e00e55a224201bc6744386a6dabc7da54ed9199b16abab3b94cff449eca", + "hash": "sha256:0857a9e83aefc6d3f04e8cb320ab82d35211bbd73d2eb2614cf7b97f8e6d36b9", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-toolkit-parachains-spawn-chains-zombienet-write-tests", - "title": "Write Tests", - "slug": "develop-toolkit-parachains-spawn-chains-zombienet-write-tests", + "id": "infrastructure-running-a-validator-onboarding-and-offboarding-start-validating", + "title": "Start Validating", + "slug": "infrastructure-running-a-validator-onboarding-and-offboarding-start-validating", "categories": [ - "Parachains", - "Tooling" + "Infrastructure" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-spawn-chains-zombienet-write-tests.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/spawn-chains/zombienet/write-tests/", - "preview": "Testing is a critical step in blockchain development, ensuring reliability, performance, and security. Zombienet simplifies this process with its intuitive Domain Specific Language (DSL), enabling developers to write natural-language test scripts tailored to their network needs.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/infrastructure-running-a-validator-onboarding-and-offboarding-start-validating.md", + "html_url": "https://docs.polkadot.com/infrastructure/running-a-validator/onboarding-and-offboarding/start-validating/", + "preview": "After configuring your node keys as shown in the [Key Management](/infrastructure/running-a-validator/onboarding-and-offboarding/key-management){target=\\_blank} section and ensuring your system is set up, you're ready to begin the validator setup process. This guide will walk you through choosing a network, synchronizing your node with the blockchain, bonding your DOT tokens, and starting your validator.", "outline": [ { "depth": 2, @@ -3240,188 +5466,164 @@ }, { "depth": 2, - "title": "Testing DSL", - "anchor": "testing-dsl" + "title": "Choose a Network", + "anchor": "choose-a-network" }, { "depth": 2, - "title": "The Test File", - "anchor": "the-test-file" + "title": "Synchronize Chain Data", + "anchor": "synchronize-chain-data" }, { "depth": 3, - "title": "Name", - "anchor": "name" + "title": "🔷 X (Twitter): Official Accounts", + "anchor": "x-twitter-official-accounts" }, { "depth": 3, - "title": "Assertions", - "anchor": "assertions" + "title": "🔁 X (Twitter): Community Accounts", + "anchor": "x-twitter-community-accounts" }, { "depth": 3, - "title": "Commands", - "anchor": "commands" + "title": "🗣️ Polkadot Forum", + "anchor": "polkadot-forum" }, { - "depth": 2, - "title": "Running a Test", - "anchor": "running-a-test" + "depth": 3, + "title": "🧑‍⚖️ Polkassembly: OpenGov", + "anchor": "polkassembly-opengov" }, { - "depth": 2, - "title": "Example Test Files", - "anchor": "example-test-files" + "depth": 3, + "title": "📸 Instagram", + "anchor": "instagram" } ], "stats": { - "chars": 11297, - "words": 1491, - "headings": 8, - "estimated_token_count_total": 2661 + "chars": 2456, + "words": 295, + "headings": 10, + "estimated_token_count_total": 579 }, - "hash": "sha256:04e85c4cddb58252f8253d78a3924bb56952dac2a3e9a057704a91a0d1f21d75", + "hash": "sha256:e2567b7d5377c87984622cf93afe4bd8cedf46b80597736cf53f26b5f31c5065", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-toolkit-parachains-spawn-chains-zombienet", - "title": "Zombienet", - "slug": "develop-toolkit-parachains-spawn-chains-zombienet", + "id": "get-support-get-in-touch", + "title": "Get in Touch", + "slug": "get-support-get-in-touch", "categories": [ "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-spawn-chains-zombienet.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/spawn-chains/zombienet/", - "preview": "Zombienet is a testing framework that lets you quickly spin up ephemeral blockchain networks for development and testing. With support for multiple deployment targets, such as Kubernetes, Podman, and native environments, Zombienet makes it easy to validate your blockchain implementation in a controlled environment.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/get-support-get-in-touch.md", + "html_url": "https://docs.polkadot.com/get-support/get-in-touch/", + "preview": "Use one of the channels below to get live technical support or ask questions.", "outline": [ { "depth": 2, - "title": "What Can I Do with Zombienet?", - "anchor": "what-can-i-do-with-zombienet" + "title": "Need Help Fast?", + "anchor": "need-help-fast" }, { "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" + "title": "📱 Telegram: Polkadot Developer Support", + "anchor": "telegram-polkadot-developer-support" }, { "depth": 2, - "title": "Additional Resources", - "anchor": "additional-resources" + "title": "🔌 Discord: Polkadot Official Server", + "anchor": "discord-polkadot-official-server" + }, + { + "depth": 2, + "title": "🧬 Matrix: Polkadot Developer Support", + "anchor": "matrix-polkadot-developer-support" } ], "stats": { - "chars": 1237, - "words": 164, - "headings": 3, - "estimated_token_count_total": 193 + "chars": 1949, + "words": 258, + "headings": 4, + "estimated_token_count_total": 557 }, - "hash": "sha256:1355969b6b0e723b42815b960c15eb128e4d936d0d707cd66e43820cff765ee3", + "hash": "sha256:9ab570299106336e5d75923b876247e8eb4a71851a77e84d68e0335e9da5e0a8", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-toolkit-parachains-spawn-chains", - "title": "Spawn Networks for Testing", - "slug": "develop-toolkit-parachains-spawn-chains", + "id": "get-support", + "title": "Support", + "slug": "get-support", "categories": [ "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains-spawn-chains.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/spawn-chains/", - "preview": "Testing blockchain networks in a controlled environment is essential for development and validation. The Polkadot ecosystem provides specialized tools that enable you to spawn test networks, helping you verify functionality and catch issues before deploying to production.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/get-support.md", + "html_url": "https://docs.polkadot.com/get-support/", + "preview": "Use one of the channels below to get live technical support or ask questions.", "outline": [ { "depth": 2, - "title": "Why Spawn a Network?", - "anchor": "why-spawn-a-network" + "title": "Need More than Just Documentation?", + "anchor": "need-more-than-just-documentation" }, { "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" + "title": "What You Can Do Here", + "anchor": "what-you-can-do-here" }, { "depth": 2, - "title": "Additional Resources", - "anchor": "additional-resources" + "title": "Help Us Improve", + "anchor": "help-us-improve" } ], "stats": { - "chars": 1180, - "words": 155, + "chars": 1658, + "words": 244, "headings": 3, - "estimated_token_count_total": 171 - }, - "hash": "sha256:f11bfd20cb9a0932ce263b2dd763729320261bb25e1fa0039a45ccc609541391", - "token_estimator": "heuristic-v1" - }, - { - "id": "develop-toolkit-parachains", - "title": "Parachains", - "slug": "develop-toolkit-parachains", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit-parachains.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/parachains/", - "preview": "Within the Polkadot ecosystem, you'll find a robust set of development tools that empower developers to build, test, and deploy blockchain applications efficiently. Whether you're designing a custom parachain, testing new features, or validating network configurations, these tools streamline the development process and ensure your blockchain setup is secure and optimized.", - "outline": [ - { - "depth": 2, - "title": "Quick Links", - "anchor": "quick-links" - }, - { - "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" - } - ], - "stats": { - "chars": 986, - "words": 136, - "headings": 2, - "estimated_token_count_total": 106 + "estimated_token_count_total": 280 }, - "hash": "sha256:88dda8aeab06294ccb773d8732d4791b052351ed0b1307d62019a637c9be341a", + "hash": "sha256:a7b5239c3be0341ced8f28146e240ff6061fded2e71094bd586beeb024684a50", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop-toolkit", - "title": "Toolkit", - "slug": "develop-toolkit", + "id": "index", + "title": "Polkadot Developer Docs", + "slug": "index", "categories": [ "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop-toolkit.md", - "html_url": "https://docs.polkadot.com/develop/toolkit/", - "preview": "Explore Polkadot's core development toolkit, designed to support a variety of developers and use cases within the ecosystem. Whether you're building blockchain infrastructure, developing cross-chain applications, or integrating with external services, this section offers essential tools and resources to help you succeed.", - "outline": [ - { - "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" - } - ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/index.md", + "html_url": "https://docs.polkadot.com/index/", + "preview": "Explore everything you need to start building on top of Polkadot, a protocol that provides parachains with shared security and interoperability using XCM.", + "outline": [], "stats": { - "chars": 902, - "words": 113, - "headings": 1, - "estimated_token_count_total": 12 + "chars": 0, + "words": 0, + "headings": 0, + "estimated_token_count_total": 0 }, - "hash": "sha256:20c667a337791538e3997f1f449bf69b248ccc4cc806e22615075f24fd3f0202", + "hash": "sha256:97655248c65e816fdf3d85dab4ace7ca0c145c50f671c25c24627cfd7660c7a6", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "develop", - "title": "Develop", - "slug": "develop", + "id": "infrastructure-running-a-validator-operational-tasks-upgrade-your-node", + "title": "Upgrade a Validator Node", + "slug": "infrastructure-running-a-validator-operational-tasks-upgrade-your-node", "categories": [ - "Uncategorized" + "Infrastructure" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/develop.md", - "html_url": "https://docs.polkadot.com/develop/", - "preview": "This guide is a starting point for developers who wish to build in the Polkadot ecosystem. To get the most from this section:", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/infrastructure-running-a-validator-operational-tasks-upgrade-your-node.md", + "html_url": "https://docs.polkadot.com/infrastructure/running-a-validator/operational-tasks/upgrade-your-node/", + "preview": "Upgrading a Polkadot validator node is essential for staying current with network updates and maintaining optimal performance. This guide covers routine and extended maintenance scenarios, including software upgrades and major server changes. Following these steps, you can manage session keys and transition smoothly between servers without risking downtime, slashing, or network disruptions. The process requires strategic planning, especially if you need to perform long-lead maintenance, ensuring", "outline": [ { "depth": 2, @@ -3430,236 +5632,213 @@ }, { "depth": 2, - "title": "Development Pathways", - "anchor": "development-pathways" + "title": "Prerequisites", + "anchor": "prerequisites" }, { - "depth": 3, - "title": "Parachain Developers", - "anchor": "parachain-developers" + "depth": 2, + "title": "Session Keys", + "anchor": "session-keys" }, { - "depth": 3, - "title": "Smart Contract Developers", - "anchor": "smart-contract-developers" + "depth": 2, + "title": "Keystore", + "anchor": "keystore" + }, + { + "depth": 2, + "title": "Upgrade Using Backup Validator", + "anchor": "upgrade-using-backup-validator" }, { "depth": 3, - "title": "Application Developers", - "anchor": "application-developers" + "title": "Session `N`", + "anchor": "session-n" }, { - "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" + "depth": 3, + "title": "Session `N+3`", + "anchor": "session-n3" } ], "stats": { - "chars": 6923, - "words": 882, - "headings": 6, - "estimated_token_count_total": 1843 + "chars": 5624, + "words": 842, + "headings": 7, + "estimated_token_count_total": 1167 }, - "hash": "sha256:1784f7b9e0552ab893c9d7d252299d53e36b6f57ef57c49cd5e36805399675ab", + "hash": "sha256:b2e8abce15fc9df106a5e972f28c64f606f9dd50ba3a256093eb53bdd5126224", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "get-support-ai-ready-docs", - "title": "AI Ready Docs", - "slug": "get-support-ai-ready-docs", + "id": "infrastructure-running-a-validator-requirements", + "title": "Validator Requirements", + "slug": "infrastructure-running-a-validator-requirements", "categories": [ - "Uncategorized" + "Infrastructure" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/get-support-ai-ready-docs.md", - "html_url": "https://docs.polkadot.com/get-support/ai-ready-docs/", - "preview": "Polkadot provides files to make documentation content available in a structure optimized for use with large language models (LLMs) and AI tools. These resources help build AI assistants, power code search, or enable custom tooling trained on Polkadot’s documentation.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/infrastructure-running-a-validator-requirements.md", + "html_url": "https://docs.polkadot.com/infrastructure/running-a-validator/requirements/", + "preview": "Running a validator in the Polkadot ecosystem is essential for maintaining network security and decentralization. Validators are responsible for validating transactions and adding new blocks to the chain, ensuring the system operates smoothly. In return for their services, validators earn rewards. However, the role comes with inherent risks, such as slashing penalties for misbehavior or technical failures. If you’re new to validation, starting on Kusama provides a lower-stakes environment to gai", "outline": [ { "depth": 2, - "title": "How to Use These Files", - "anchor": "how-to-use-these-files" + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Prerequisites", + "anchor": "prerequisites" + }, + { + "depth": 2, + "title": "Minimum Hardware Requirements", + "anchor": "minimum-hardware-requirements" + }, + { + "depth": 2, + "title": "VPS Provider List", + "anchor": "vps-provider-list" }, { "depth": 2, - "title": "Download LLM Files", - "anchor": "download-llm-files" + "title": "Minimum Bond Requirement", + "anchor": "minimum-bond-requirement" } ], "stats": { - "chars": 7998, - "words": 825, - "headings": 2, - "estimated_token_count_total": 2232 + "chars": 6838, + "words": 940, + "headings": 5, + "estimated_token_count_total": 1477 }, - "hash": "sha256:5a8da69a5cea8bd598ee4d102b9abed5d1a29153802a567e22bb4ee720410b32", + "hash": "sha256:76500d1d63f4205a84f0bc5b7f9aec945781127d41c32927280ac74bc14f0296", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "get-support-explore-resources", - "title": "Subscribe to Updates", - "slug": "get-support-explore-resources", + "id": "infrastructure-staking-mechanics-offenses-and-slashes", + "title": "Offenses and Slashes", + "slug": "infrastructure-staking-mechanics-offenses-and-slashes", "categories": [ - "Uncategorized" + "Infrastructure" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/get-support-explore-resources.md", - "html_url": "https://docs.polkadot.com/get-support/explore-resources/", - "preview": "Looking for answers beyond the documentation? These platforms are full of useful content and experienced developers sharing insights.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/infrastructure-staking-mechanics-offenses-and-slashes.md", + "html_url": "https://docs.polkadot.com/infrastructure/staking-mechanics/offenses-and-slashes/", + "preview": "In Polkadot's Nominated Proof of Stake (NPoS) system, validator misconduct is deterred through a combination of slashing, disabling, and reputation penalties. Validators and nominators who stake tokens face consequences for validator misbehavior, which range from token slashes to restrictions on network participation.", "outline": [ { "depth": 2, - "title": "🧠 Stack Exchange", - "anchor": "stack-exchange" + "title": "Introduction", + "anchor": "introduction" }, { "depth": 2, - "title": "🧵 Reddit: r/Polkadot", - "anchor": "reddit-rpolkadot" + "title": "Offenses", + "anchor": "offenses" }, { - "depth": 2, - "title": "💬 Discord (Community Threads Only)", - "anchor": "discord-community-threads-only" + "depth": 3, + "title": "Invalid Votes", + "anchor": "invalid-votes" }, { - "depth": 2, - "title": "🎥 YouTube: @PolkadotNetwork", - "anchor": "youtube-polkadotnetwork" + "depth": 3, + "title": "Equivocations", + "anchor": "equivocations" }, { "depth": 2, - "title": "Community-Led Platforms and Ecosystem Updates", - "anchor": "community-led-platforms-and-ecosystem-updates" - }, - { - "depth": 3, - "title": "🔷 X (Twitter): Official Accounts", - "anchor": "x-twitter-official-accounts" + "title": "Penalties", + "anchor": "penalties" }, { "depth": 3, - "title": "🔁 X (Twitter): Community Accounts", - "anchor": "x-twitter-community-accounts" + "title": "Slashing", + "anchor": "slashing" }, { "depth": 3, - "title": "🗣️ Polkadot Forum", - "anchor": "polkadot-forum" + "title": "Disabling", + "anchor": "disabling" }, { "depth": 3, - "title": "🧑‍⚖️ Polkassembly: OpenGov", - "anchor": "polkassembly-opengov" + "title": "Reputation Changes", + "anchor": "reputation-changes" }, { "depth": 3, - "title": "📸 Instagram", - "anchor": "instagram" + "title": "Penalties by Offense", + "anchor": "penalties-by-offense" } ], "stats": { - "chars": 2456, - "words": 295, - "headings": 10, - "estimated_token_count_total": 579 + "chars": 15427, + "words": 2103, + "headings": 9, + "estimated_token_count_total": 3409 }, - "hash": "sha256:4c33d0ec5026128b3bfdb1dfc1f4b29487404eaa8043071d536e8638356c6e1f", + "hash": "sha256:abe6bedab04f463ec07f554977b8d6355a5d2fad9bcda01cbe58568152295daa", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "get-support-get-in-touch", - "title": "Get in Touch", - "slug": "get-support-get-in-touch", + "id": "infrastructure-staking-mechanics-rewards-payout", + "title": "Rewards Payout", + "slug": "infrastructure-staking-mechanics-rewards-payout", "categories": [ - "Uncategorized" + "Infrastructure" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/get-support-get-in-touch.md", - "html_url": "https://docs.polkadot.com/get-support/get-in-touch/", - "preview": "Use one of the channels below to get live technical support or ask questions.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/infrastructure-staking-mechanics-rewards-payout.md", + "html_url": "https://docs.polkadot.com/infrastructure/staking-mechanics/rewards-payout/", + "preview": "Understanding how rewards are distributed to validators and nominators is essential for network participants. In Polkadot and Kusama, validators earn rewards based on their era points, which are accrued through actions like block production and parachain validation.", "outline": [ { "depth": 2, - "title": "Need Help Fast?", - "anchor": "need-help-fast" + "title": "Introduction", + "anchor": "introduction" }, { "depth": 2, - "title": "📱 Telegram: Polkadot Developer Support", - "anchor": "telegram-polkadot-developer-support" + "title": "Era Points", + "anchor": "era-points" }, { "depth": 2, - "title": "🔌 Discord: Polkadot Official Server", - "anchor": "discord-polkadot-official-server" + "title": "Reward Variance", + "anchor": "reward-variance" }, { "depth": 2, - "title": "🧬 Matrix: Polkadot Developer Support", - "anchor": "matrix-polkadot-developer-support" - } - ], - "stats": { - "chars": 1949, - "words": 258, - "headings": 4, - "estimated_token_count_total": 557 - }, - "hash": "sha256:993e93b05c8fbdfc2f7510c61ac86bc4c2ff0f03e573695b2f260933c8b62f78", - "token_estimator": "heuristic-v1" - }, - { - "id": "get-support", - "title": "Support", - "slug": "get-support", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/get-support.md", - "html_url": "https://docs.polkadot.com/get-support/", - "preview": "Use one of the channels below to get live technical support or ask questions.", - "outline": [ - { - "depth": 2, - "title": "Need More than Just Documentation?", - "anchor": "need-more-than-just-documentation" + "title": "Payout Scheme", + "anchor": "payout-scheme" }, { "depth": 2, - "title": "What You Can Do Here", - "anchor": "what-you-can-do-here" + "title": "Running Multiple Validators", + "anchor": "running-multiple-validators" }, { "depth": 2, - "title": "Help Us Improve", - "anchor": "help-us-improve" + "title": "Nominators and Validator Payments", + "anchor": "nominators-and-validator-payments" } ], "stats": { - "chars": 1658, - "words": 244, - "headings": 3, - "estimated_token_count_total": 280 - }, - "hash": "sha256:5bdc575ac798a971867a15651c2b4d5139bf0b1fe6854d1865deff280ae6d7f6", - "token_estimator": "heuristic-v1" - }, - { - "id": "index", - "title": "Polkadot Developer Docs", - "slug": "index", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/index.md", - "html_url": "https://docs.polkadot.com/index/", - "preview": "Explore everything you need to start building on top of Polkadot, a protocol that provides parachains with shared security and interoperability using XCM.", - "outline": [], - "stats": { - "chars": 0, - "words": 0, - "headings": 0, - "estimated_token_count_total": 0 + "chars": 11070, + "words": 1764, + "headings": 6, + "estimated_token_count_total": 2617 }, - "hash": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "hash": "sha256:7d43408276d811c96b7b081a7b9f4d884893282a230b564c9eb3be2fc7857565", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -3726,6 +5905,7 @@ "estimated_token_count_total": 1044 }, "hash": "sha256:d84a5af1a0237a911d25a68c077f508ebbce608f673ef4f9055e8e434daa96b9", + "last_modified": "2025-10-28T14:42:13+00:00", "token_estimator": "heuristic-v1" }, { @@ -3792,6 +5972,7 @@ "estimated_token_count_total": 4197 }, "hash": "sha256:b83e3f77bd30ac8c8fb00a193bbec33cd641d94f1a37ac611dea32326c3d77b0", + "last_modified": "2025-10-28T14:42:13+00:00", "token_estimator": "heuristic-v1" }, { @@ -3848,6 +6029,7 @@ "estimated_token_count_total": 1280 }, "hash": "sha256:992082e4ad87348b283f6c37ea886ae0e7bf016852b6470000876f3d169c65a4", + "last_modified": "2025-10-28T14:42:13+00:00", "token_estimator": "heuristic-v1" }, { @@ -3909,6 +6091,7 @@ "estimated_token_count_total": 1840 }, "hash": "sha256:0fb5a83835aab263c0b9aa886028c8aa8a2d6d0897d7b9fff4b5258835d30dfe", + "last_modified": "2025-10-28T14:42:13+00:00", "token_estimator": "heuristic-v1" }, { @@ -3990,6 +6173,7 @@ "estimated_token_count_total": 2592 }, "hash": "sha256:d2c1c91734bc8185057d8eeec6829ea91e0316f7ba884c5dc3922a5e5778815e", + "last_modified": "2025-10-28T14:42:13+00:00", "token_estimator": "heuristic-v1" }, { @@ -4075,7 +6259,8 @@ "headings": 13, "estimated_token_count_total": 3861 }, - "hash": "sha256:c74cfa542fe7a5235b81120f0004576aea83e0d35458201689b68d87f2969749", + "hash": "sha256:a4235e8d590033d5d54434143e0a5e23603c53ae70d4f0a9ebfe4ca9442baa8d", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -4122,6 +6307,7 @@ "estimated_token_count_total": 629 }, "hash": "sha256:0d6db361bfa7a3022849bbe39989bfdac0429537498d7f534adadec131afca98", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -4233,6 +6419,7 @@ "estimated_token_count_total": 5866 }, "hash": "sha256:81eb0fe77f05155f1ec0511cd066120fc9994961e9d91e21b6666377e65b4586", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -4284,6 +6471,7 @@ "estimated_token_count_total": 861 }, "hash": "sha256:1af153570ce57bd5b52d08493a300996765686f2a6d04519a2e0aa91191612c1", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -4340,6 +6528,7 @@ "estimated_token_count_total": 1185 }, "hash": "sha256:888230b128d8c648c4f06a18d3b1d1b06dd1bf22a0de4add1f28210ffccb2549", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -4386,6 +6575,7 @@ "estimated_token_count_total": 1485 }, "hash": "sha256:46435b97c37ef6798d2c75c69df31c5e5f07e04b218c370ec5af6b1838d43aac", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -4452,6 +6642,7 @@ "estimated_token_count_total": 3409 }, "hash": "sha256:abe6bedab04f463ec07f554977b8d6355a5d2fad9bcda01cbe58568152295daa", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -4503,6 +6694,7 @@ "estimated_token_count_total": 2588 }, "hash": "sha256:d5d6d72eb2cf10f624d84c65f2274f7df90acb5d071bf170bc8eae8d98a810a5", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -4594,6 +6786,7 @@ "estimated_token_count_total": 2724 }, "hash": "sha256:93d123cbaaccc2515b4a70be8e1327b4f75b1051d16c5e3daf5a2035af7b7ca3", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -4720,6 +6913,7 @@ "estimated_token_count_total": 3811 }, "hash": "sha256:d83e574726c524fa017236eb5e3b8a0676d598be4da1ce4fe25a60141baeee49", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -4761,6 +6955,7 @@ "estimated_token_count_total": 901 }, "hash": "sha256:f56a32d5323c371f084833b4e647f21e1d76ad242d8c4e4826bcaed467acc7cf", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -4813,6 +7008,7 @@ "estimated_token_count_total": 3091 }, "hash": "sha256:87add0ae178e4970601a27efccadb58eff1375d19819201034ba2829914f1cd5", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -4879,6 +7075,7 @@ "estimated_token_count_total": 3338 }, "hash": "sha256:915bc91edd56cdedd516e871dbe450d70c9f99fb467cc00ff231ea3a74f61d96", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -5172,73 +7369,7 @@ "estimated_token_count_total": 1563 }, "hash": "sha256:8568dfa238b9a649a4e6e60510625c2e7879b76a93187b0b8b8dccf6bc467ae6", - "token_estimator": "heuristic-v1" - }, - { - "id": "parachains-customize-runtime", - "title": "Overview of FRAME", - "slug": "parachains-customize-runtime", - "categories": [ - "Basics", - "Parachains" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/parachains-customize-runtime.md", - "html_url": "https://docs.polkadot.com/parachains/customize-runtime/", - "preview": "A blockchain runtime is more than just a fixed set of rules—it's a dynamic foundation that you can shape to match your specific needs. With Polkadot SDK's [FRAME (Framework for Runtime Aggregation of Modularized Entities)](/reference/glossary/#frame-framework-for-runtime-aggregation-of-modularized-entities){target=\\_blank}, customizing your runtime is straightforward and modular. Instead of building everything from scratch, you combine pre-built pallets with your own custom logic to create a run", - "outline": [ - { - "depth": 2, - "title": "Introduction", - "anchor": "introduction" - }, - { - "depth": 2, - "title": "Understanding Your Runtime", - "anchor": "understanding-your-runtime" - }, - { - "depth": 2, - "title": "Runtime Architecture", - "anchor": "runtime-architecture" - }, - { - "depth": 2, - "title": "Building Blocks: Pallets", - "anchor": "building-blocks-pallets" - }, - { - "depth": 3, - "title": "Pre-Built Pallets vs. Custom Pallets", - "anchor": "pre-built-pallets-vs-custom-pallets" - }, - { - "depth": 3, - "title": "Pallet Structure", - "anchor": "pallet-structure" - }, - { - "depth": 2, - "title": "How Runtime Customization Works", - "anchor": "how-runtime-customization-works" - }, - { - "depth": 2, - "title": "Starting Templates", - "anchor": "starting-templates" - }, - { - "depth": 2, - "title": "Key Customization Scenarios", - "anchor": "key-customization-scenarios" - } - ], - "stats": { - "chars": 8236, - "words": 1101, - "headings": 9, - "estimated_token_count_total": 1828 - }, - "hash": "sha256:ad58d1c942b567acc4519abc35c0a049ab3e04711c2a49089ceba6324a5aa7ea", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -5306,6 +7437,7 @@ "estimated_token_count_total": 2292 }, "hash": "sha256:759ed27cf3d473445e33141089b652082c42a2c59eb822d6b506146fd9555e13", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -5388,6 +7520,7 @@ "estimated_token_count_total": 2709 }, "hash": "sha256:2ee5656f749b4bca445172f2bc66c7fc39af40ff173626662ae4c399f49cf909", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -5425,6 +7558,7 @@ "estimated_token_count_total": 428 }, "hash": "sha256:cfcc76bb24779c9b613f2c046b6f99a0f2529c25fd82287d804f6b945b936227", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -5457,6 +7591,7 @@ "estimated_token_count_total": 245 }, "hash": "sha256:6d8e01281a5895fd2bc4438b24c170c72a496de0b838626a53e87685aea4aa25", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -5494,6 +7629,7 @@ "estimated_token_count_total": 633 }, "hash": "sha256:62c5ad101282227f79eac0e30a3ba9ce3ae1bf9e358bd58c0b17ef45db29c2ff", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -5565,6 +7701,7 @@ "estimated_token_count_total": 2285 }, "hash": "sha256:b8de1228b9976765accd18ff724038bed6f2449367f500bc3177ab2a053abe63", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -5616,6 +7753,7 @@ "estimated_token_count_total": 1427 }, "hash": "sha256:b501d99c464fb049d46676827b6a325a195c90617becc4a7db305441c115350a", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -5673,6 +7811,28 @@ "estimated_token_count_total": 1501 }, "hash": "sha256:3b26606dd5310c4b8ade5d05270ebf1e06f59afcda4ca2b985e07948215a197e", + "last_modified": "2025-10-28T14:42:14+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "parachains-launch-a-parachain-choose-a-template", + "title": "parachains-launch-a-parachain-choose-a-template", + "slug": "parachains-launch-a-parachain-choose-a-template", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/parachains-launch-a-parachain-choose-a-template.md", + "html_url": "https://docs.polkadot.com/parachains/launch-a-parachain/choose-a-template/", + "preview": "TODO", + "outline": [], + "stats": { + "chars": 5, + "words": 1, + "headings": 0, + "estimated_token_count_total": 0 + }, + "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:15:59+00:00", "token_estimator": "heuristic-v1" }, { @@ -5738,7 +7898,8 @@ "headings": 9, "estimated_token_count_total": 3296 }, - "hash": "sha256:fde940bced4380fc01b1840907059d03f6d47b6cb54bf78c95269ac57adbc99e", + "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -5820,6 +7981,7 @@ "estimated_token_count_total": 2103 }, "hash": "sha256:15154f211753665d9af70dc81d15ceb3f0954e3febf9282c68c0074881d620c6", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -5861,28 +8023,81 @@ }, { "depth": 2, - "title": "Compile the Runtime", - "anchor": "compile-the-runtime" + "title": "Compile the Runtime", + "anchor": "compile-the-runtime" + }, + { + "depth": 2, + "title": "Verify the Build", + "anchor": "verify-the-build" + }, + { + "depth": 2, + "title": "Run the Node Locally", + "anchor": "run-the-node-locally" + }, + { + "depth": 2, + "title": "Interact with the Node", + "anchor": "interact-with-the-node" + }, + { + "depth": 2, + "title": "Stop the Node", + "anchor": "stop-the-node" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" + } + ], + "stats": { + "chars": 10608, + "words": 1512, + "headings": 11, + "estimated_token_count_total": 2379 + }, + "hash": "sha256:637b9460bb65621cbc7c1bff272ea287d5181a983bc61418167959e108e21791", + "last_modified": "2025-10-28T14:42:14+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "parachains-overview", + "title": "Parachains Overview", + "slug": "parachains-overview", + "categories": [ + "Basics", + "Parachains" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/parachains-overview.md", + "html_url": "https://docs.polkadot.com/parachains/overview/", + "preview": "A parachain is a specialized blockchain that connects to the Polkadot relay chain, benefiting from shared security, interoperability, and scalability. Parachains are built using the [Polkadot SDK](https://github.com/paritytech/polkadot-sdk){target=\\_blank}, a powerful toolkit written in Rust that provides everything needed to create custom blockchain logic while integrating seamlessly with the Polkadot network.", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" }, { "depth": 2, - "title": "Verify the Build", - "anchor": "verify-the-build" + "title": "Polkadot SDK: Parachain Architecture", + "anchor": "polkadot-sdk-parachain-architecture" }, { - "depth": 2, - "title": "Run the Node Locally", - "anchor": "run-the-node-locally" + "depth": 3, + "title": "Substrate: The Foundation", + "anchor": "substrate-the-foundation" }, { - "depth": 2, - "title": "Interact with the Node", - "anchor": "interact-with-the-node" + "depth": 3, + "title": "FRAME: Building Blocks for Your Runtime", + "anchor": "frame-building-blocks-for-your-runtime" }, { - "depth": 2, - "title": "Stop the Node", - "anchor": "stop-the-node" + "depth": 3, + "title": "Cumulus: Parachain-Specific Functionality", + "anchor": "cumulus-parachain-specific-functionality" }, { "depth": 2, @@ -5891,12 +8106,13 @@ } ], "stats": { - "chars": 10608, - "words": 1512, - "headings": 11, - "estimated_token_count_total": 2379 + "chars": 8461, + "words": 1024, + "headings": 6, + "estimated_token_count_total": 1751 }, - "hash": "sha256:637b9460bb65621cbc7c1bff272ea287d5181a983bc61418167959e108e21791", + "hash": "sha256:bbef601f2645c23200a3b16bc1b8e5bcad2aafdee6d60ae860ce8b5a53122c14", + "last_modified": "2025-10-28T14:15:59+00:00", "token_estimator": "heuristic-v1" }, { @@ -5943,6 +8159,7 @@ "estimated_token_count_total": 1161 }, "hash": "sha256:ec31270001a6cd9d0a8ecb7974ad161d5c1ef4d3023d5a6af9fbc5a6ca46cbca", + "last_modified": "2025-10-28T14:42:14+00:00", "token_estimator": "heuristic-v1" }, { @@ -6014,6 +8231,7 @@ "estimated_token_count_total": 4014 }, "hash": "sha256:55dc252fdecf1590048ce8d009b822e90231442abe81e9593cf1635944a31336", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { @@ -6065,6 +8283,7 @@ "estimated_token_count_total": 2028 }, "hash": "sha256:e408d05199cc184fc6fe8bb212efb3c9aa6cb79258977e07566692176c912def", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { @@ -6137,6 +8356,7 @@ "estimated_token_count_total": 2614 }, "hash": "sha256:4325cdd697814b8043db808da3dee86d3d9c6fc7dd523aae7fe8914d59d1b39c", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { @@ -6229,6 +8449,7 @@ "estimated_token_count_total": 9871 }, "hash": "sha256:0d7e04fd952cc9d5bd8cdbfd87cc4004c5f95e896a16bc7f89dfc4caeac8f371", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { @@ -6276,6 +8497,7 @@ "estimated_token_count_total": 1125 }, "hash": "sha256:9875239c6071033a37a0f67fabca5a6e840c4a287620309f47b4f29c5a95a1cb", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { @@ -6339,6 +8561,7 @@ "estimated_token_count_total": 1861 }, "hash": "sha256:932c12e1af939698279ede2eacb2190e1f56119582adf2064d6cf86f7a4f3e3c", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { @@ -6364,7 +8587,9 @@ "headings": 1, "estimated_token_count_total": 12 }, - "hash": "sha256:3b9160b166d9b42b124f3b07eb26bdc5499fbbace6f951095009a5eee7fccbb6", + "hash": "sha256:00be43ac8d666bbe15c5c2fa5a5085697d0bb5a6f341ebbb943a209f0be355df", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -6390,19 +8615,100 @@ "headings": 1, "estimated_token_count_total": 12 }, - "hash": "sha256:c29356358f095b0d413e4c6525146b3f1b0b900853aada2168e7e55cd8dd6641", + "hash": "sha256:2d228c52844df8952520fafdd3e6f0e26bfd2f32b5ee60c6241cf7d38603643c", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "polkadot-protocol-architecture-system-chains-coretime", - "title": "Coretime Chain", - "slug": "polkadot-protocol-architecture-system-chains-coretime", + "id": "polkadot-protocol-architecture-polkadot-chain-overview", + "title": "Overview of the Polkadot Relay Chain", + "slug": "polkadot-protocol-architecture-polkadot-chain-overview", + "categories": [ + "Basics", + "Polkadot Protocol", + "Parachains" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-architecture-polkadot-chain-overview.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/architecture/polkadot-chain/overview/", + "preview": "Polkadot is a next-generation blockchain protocol designed to support a multi-chain future by enabling secure communication and interoperability between different blockchains. Built as a Layer-0 protocol, Polkadot introduces innovations like application-specific Layer-1 chains ([parachains](/polkadot-protocol/architecture/parachains/){targe=\\_blank}), shared security through [Nominated Proof of Stake (NPoS)](/polkadot-protocol/glossary/#nominated-proof-of-stake-npos){target=\\_blank}, and cross-c", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Polkadot 1.0", + "anchor": "polkadot-10" + }, + { + "depth": 3, + "title": "High-Level Architecture", + "anchor": "high-level-architecture" + }, + { + "depth": 3, + "title": "Polkadot's Additional Functionalities", + "anchor": "polkadots-additional-functionalities" + }, + { + "depth": 3, + "title": "Polkadot's Resilience", + "anchor": "polkadots-resilience" + }, + { + "depth": 3, + "title": "Polkadot's Blockspace", + "anchor": "polkadots-blockspace" + }, + { + "depth": 2, + "title": "DOT Token", + "anchor": "dot-token" + }, + { + "depth": 3, + "title": "Redenomination of DOT", + "anchor": "redenomination-of-dot" + }, + { + "depth": 3, + "title": "The Planck Unit", + "anchor": "the-planck-unit" + }, + { + "depth": 3, + "title": "Uses for DOT", + "anchor": "uses-for-dot" + }, + { + "depth": 2, + "title": "JAM and the Road Ahead", + "anchor": "jam-and-the-road-ahead" + } + ], + "stats": { + "chars": 12513, + "words": 1781, + "headings": 11, + "estimated_token_count_total": 2591 + }, + "hash": "sha256:201e7efa0ad6b24890dd06f69714e19d9700ab7f7a51a33fe6d6e0664b7170b2", + "last_modified": "2025-10-28T14:15:59+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "polkadot-protocol-architecture-polkadot-chain-pos-consensus", + "title": "Proof of Stake Consensus", + "slug": "polkadot-protocol-architecture-polkadot-chain-pos-consensus", "categories": [ "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-architecture-system-chains-coretime.md", - "html_url": "https://docs.polkadot.com/polkadot-protocol/architecture/system-chains/coretime/", - "preview": "The Coretime system chain facilitates the allocation, procurement, sale, and scheduling of bulk [coretime](/reference/glossary/#coretime){target=\\_blank}, enabling tasks (such as [parachains](/reference/glossary/#parachain){target=\\_blank}) to utilize the computation and security provided by Polkadot.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-architecture-polkadot-chain-pos-consensus.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/architecture/polkadot-chain/pos-consensus/", + "preview": "Polkadot's Proof of Stake consensus model leverages a unique hybrid approach by design to promote decentralized and secure network operations. In traditional Proof of Stake (PoS) systems, a node's ability to validate transactions is tied to its token holdings, which can lead to centralization risks and limited validator participation. Polkadot addresses these concerns through its [Nominated Proof of Stake (NPoS)](/polkadot-protocol/glossary/#nominated-proof-of-stake-npos){target=\\_blank} model a", "outline": [ { "depth": 2, @@ -6411,40 +8717,86 @@ }, { "depth": 2, - "title": "Bulk Coretime Assignment", - "anchor": "bulk-coretime-assignment" + "title": "Nominated Proof of Stake", + "anchor": "nominated-proof-of-stake" }, { "depth": 2, - "title": "On Demand Coretime", - "anchor": "on-demand-coretime" + "title": "Hybrid Consensus", + "anchor": "hybrid-consensus" }, { "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" + "title": "Block Production - BABE", + "anchor": "block-production-babe" + }, + { + "depth": 3, + "title": "Validator Participation", + "anchor": "validator-participation" + }, + { + "depth": 3, + "title": "Additional Resources", + "anchor": "additional-resources" + }, + { + "depth": 2, + "title": "Finality Gadget - GRANDPA", + "anchor": "finality-gadget-grandpa" + }, + { + "depth": 3, + "title": "Probabilistic vs. Provable Finality", + "anchor": "probabilistic-vs-provable-finality" + }, + { + "depth": 3, + "title": "Additional Resources", + "anchor": "additional-resources-2" + }, + { + "depth": 2, + "title": "Fork Choice", + "anchor": "fork-choice" + }, + { + "depth": 3, + "title": "Additional Resources", + "anchor": "additional-resources-3" + }, + { + "depth": 2, + "title": "Bridging - BEEFY", + "anchor": "bridging-beefy" + }, + { + "depth": 3, + "title": "Additional Resources", + "anchor": "additional-resources-4" } ], "stats": { - "chars": 5279, - "words": 772, - "headings": 4, - "estimated_token_count_total": 1230 + "chars": 12788, + "words": 1838, + "headings": 13, + "estimated_token_count_total": 2534 }, - "hash": "sha256:8d186fa56ccbbf4b6c85cffc5521b9a99a20e9517f3b4a435730745803cbf2e8", + "hash": "sha256:191df9b098e17e9de4597c9f8ced8abbafdfabc7e0f5c0a94d767fc2c9d7742b", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "polkadot-protocol-architecture-system-chains-overview", - "title": "Overview of Polkadot's System Chains", - "slug": "polkadot-protocol-architecture-system-chains-overview", + "id": "polkadot-protocol-architecture-system-chains-asset-hub", + "title": "Asset Hub", + "slug": "polkadot-protocol-architecture-system-chains-asset-hub", "categories": [ - "Basics", "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-architecture-system-chains-overview.md", - "html_url": "https://docs.polkadot.com/polkadot-protocol/architecture/system-chains/overview/", - "preview": "Polkadot's relay chain is designed to secure parachains and facilitate seamless inter-chain communication. However, resource-intensive—tasks like governance, asset management, and bridging are more efficiently handled by system parachains. These specialized chains offload functionality from the relay chain, leveraging Polkadot's parallel execution model to improve performance and scalability. By distributing key functionalities across system parachains, Polkadot can maximize its relay chain's bl", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-architecture-system-chains-asset-hub.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/architecture/system-chains/asset-hub/", + "preview": "The Asset Hub is a critical component in the Polkadot ecosystem, enabling the management of fungible and non-fungible assets across the network. Since the relay chain focuses on maintaining security and consensus without direct asset management, Asset Hub provides a streamlined platform for creating, managing, and using on-chain assets in a fee-efficient manner. This guide outlines the core features of Asset Hub, including how it handles asset operations, cross-chain transfers, and asset integra", "outline": [ { "depth": 2, @@ -6453,205 +8805,217 @@ }, { "depth": 2, - "title": "System Chains", - "anchor": "system-chains" + "title": "Assets Basics", + "anchor": "assets-basics" }, { "depth": 2, - "title": "Existing System Chains", - "anchor": "existing-system-chains" + "title": "Assets Pallet", + "anchor": "assets-pallet" + }, + { + "depth": 3, + "title": "Key Features", + "anchor": "key-features" + }, + { + "depth": 3, + "title": "Main Functions", + "anchor": "main-functions" + }, + { + "depth": 3, + "title": "Querying Functions", + "anchor": "querying-functions" + }, + { + "depth": 3, + "title": "Permission Models and Roles", + "anchor": "permission-models-and-roles" + }, + { + "depth": 3, + "title": "Asset Freezing", + "anchor": "asset-freezing" + }, + { + "depth": 3, + "title": "Non-Custodial Transfers (Approval API)", + "anchor": "non-custodial-transfers-approval-api" + }, + { + "depth": 2, + "title": "Foreign Assets", + "anchor": "foreign-assets" + }, + { + "depth": 3, + "title": "Handling Foreign Assets", + "anchor": "handling-foreign-assets" + }, + { + "depth": 2, + "title": "Integration", + "anchor": "integration" + }, + { + "depth": 3, + "title": "API Sidecar", + "anchor": "api-sidecar" + }, + { + "depth": 3, + "title": "TxWrapper", + "anchor": "txwrapper" + }, + { + "depth": 3, + "title": "ParaSpell", + "anchor": "paraspell" }, { "depth": 3, - "title": "Asset Hub", - "anchor": "asset-hub" + "title": "Parachain Node", + "anchor": "parachain-node" }, { - "depth": 3, - "title": "Collectives", - "anchor": "collectives" + "depth": 2, + "title": "XCM Transfer Monitoring", + "anchor": "xcm-transfer-monitoring" }, { "depth": 3, - "title": "Bridge Hub", - "anchor": "bridge-hub" + "title": "Monitor XCM Deposits", + "anchor": "monitor-xcm-deposits" }, { "depth": 3, - "title": "People Chain", - "anchor": "people-chain" + "title": "Track XCM Information Back to the Source", + "anchor": "track-xcm-information-back-to-the-source" }, { "depth": 3, - "title": "Coretime Chain", - "anchor": "coretime-chain" + "title": "Practical Monitoring Examples", + "anchor": "practical-monitoring-examples" }, { "depth": 3, - "title": "Encointer", - "anchor": "encointer" - } - ], - "stats": { - "chars": 7727, - "words": 1105, - "headings": 9, - "estimated_token_count_total": 1643 - }, - "hash": "sha256:100377787627052a29bd1173270b5ad307639b828c331e71c85d4c00bc5692d8", - "token_estimator": "heuristic-v1" - }, - { - "id": "polkadot-protocol-architecture-system-chains", - "title": "System Chains", - "slug": "polkadot-protocol-architecture-system-chains", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-architecture-system-chains.md", - "html_url": "https://docs.polkadot.com/polkadot-protocol/architecture/system-chains/", - "preview": "Explore the critical roles Polkadot’s system chains play in enhancing the network’s efficiency and scalability. From managing on-chain assets with the Asset Hub to enabling seamless Web3 integration through the Bridge Hub and facilitating coretime operations with the Coretime chain, each system chain is designed to offload specialized tasks from the relay chain, optimizing the entire ecosystem.", - "outline": [ + "title": "Monitor for Failed XCM Transfers", + "anchor": "monitor-for-failed-xcm-transfers" + }, { "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 929, - "words": 124, - "headings": 1, - "estimated_token_count_total": 12 + "chars": 20100, + "words": 2910, + "headings": 22, + "estimated_token_count_total": 4105 }, - "hash": "sha256:6ef13c197dd1865fcc1a405d67486f1d053534d576bb32fe47a442fd2c11b6cd", + "hash": "sha256:759ab6dea0ad03c3f627558ea186d9f32351fa559acde82931684efc2da59d46", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "polkadot-protocol-architecture", - "title": "Architecture", - "slug": "polkadot-protocol-architecture", + "id": "polkadot-protocol-architecture-system-chains-bridge-hub", + "title": "Bridge Hub", + "slug": "polkadot-protocol-architecture-system-chains-bridge-hub", "categories": [ - "Uncategorized" + "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-architecture.md", - "html_url": "https://docs.polkadot.com/polkadot-protocol/architecture/", - "preview": "Explore Polkadot's architecture, including the relay chain, parachains, and system chains, and discover the role each component plays in the broader ecosystem.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-architecture-system-chains-bridge-hub.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/architecture/system-chains/bridge-hub/", + "preview": "The Bridge Hub system parachain plays a crucial role in facilitating trustless interactions between Polkadot, Kusama, Ethereum, and other blockchain ecosystems. By implementing on-chain light clients and supporting protocols like BEEFY and GRANDPA, Bridge Hub ensures seamless message transmission and state verification across chains. It also provides essential [pallets](/polkadot-protocol/glossary/#pallet){target=\\_blank} for sending and receiving messages, making it a cornerstone of Polkadot’s", "outline": [ { "depth": 2, - "title": "A Brief Look at Polkadot’s Chain Ecosystem", - "anchor": "a-brief-look-at-polkadots-chain-ecosystem" + "title": "Introduction", + "anchor": "introduction" }, { "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" - } - ], - "stats": { - "chars": 990, - "words": 132, - "headings": 2, - "estimated_token_count_total": 177 - }, - "hash": "sha256:ffda04c93c70ec7204be28b642fa6e51f6bf9436d4792ecd25136696683f0902", - "token_estimator": "heuristic-v1" - }, - { - "id": "polkadot-protocol-onchain-governance", - "title": "On-Chain Governance", - "slug": "polkadot-protocol-onchain-governance", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-onchain-governance.md", - "html_url": "https://docs.polkadot.com/polkadot-protocol/onchain-governance/", - "preview": "Polkadot's on-chain governance system, OpenGov, enables decentralized decision-making across the network. It empowers stakeholders to propose, vote on, and enact changes with transparency and efficiency. This system ensures that governance is both flexible and inclusive, allowing developers to integrate custom governance solutions and mechanisms within the network. Understanding how OpenGov functions is crucial for anyone looking to engage with Polkadot’s decentralized ecosystem, whether you’re", - "outline": [ + "title": "Trustless Bridging", + "anchor": "trustless-bridging" + }, { "depth": 2, - "title": "Start Building Governance Solutions", - "anchor": "start-building-governance-solutions" + "title": "Bridging Components", + "anchor": "bridging-components" + }, + { + "depth": 3, + "title": "Ethereum-Specific Support", + "anchor": "ethereum-specific-support" }, { "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" - } - ], - "stats": { - "chars": 2114, - "words": 285, - "headings": 2, - "estimated_token_count_total": 233 - }, - "hash": "sha256:58fd5c8c092ee748c2979164f985a67071a6ccb88492e79cdad536363364c858", - "token_estimator": "heuristic-v1" - }, - { - "id": "polkadot-protocol-parachain-basics-blocks-transactions-fees", - "title": "Blocks, Transactions, and Fees", - "slug": "polkadot-protocol-parachain-basics-blocks-transactions-fees", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-parachain-basics-blocks-transactions-fees.md", - "html_url": "https://docs.polkadot.com/polkadot-protocol/parachain-basics/blocks-transactions-fees/", - "preview": "Discover the inner workings of Polkadot’s blocks and transactions, including their structure, processing, and lifecycle within the network. Learn how blocks are authored, validated, and finalized, ensuring seamless operation and consensus across the ecosystem. Dive into the various types of transactions—signed, unsigned, and inherent—and understand how they are constructed, submitted, and validated.", - "outline": [ + "title": "Deployed Bridges", + "anchor": "deployed-bridges" + }, { "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 788, - "words": 105, - "headings": 1, - "estimated_token_count_total": 12 + "chars": 5475, + "words": 775, + "headings": 6, + "estimated_token_count_total": 1218 }, - "hash": "sha256:235f33cdb64494815dbb3eb58ea98c69935098684e1b34b6d15356bc54b082ea", + "hash": "sha256:26c156146ef9743fc26c6499294ff14186f97edbc2a34f445d3366b72f7148ae", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "polkadot-protocol-parachain-basics", - "title": "Parachain Basics", - "slug": "polkadot-protocol-parachain-basics", + "id": "polkadot-protocol-architecture-system-chains-collectives", + "title": "Collectives Chain", + "slug": "polkadot-protocol-architecture-system-chains-collectives", "categories": [ - "Uncategorized" + "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-parachain-basics.md", - "html_url": "https://docs.polkadot.com/polkadot-protocol/parachain-basics/", - "preview": "This section equips developers with the essential knowledge to create, deploy, and enhance applications and blockchains within the Polkadot ecosystem. Gain a comprehensive understanding of Polkadot’s foundational components, including accounts, balances, and transactions, as well as advanced topics like data encoding and cryptographic methods. Mastering these concepts is vital for building robust and secure applications on Polkadot.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-architecture-system-chains-collectives.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/architecture/system-chains/collectives/", + "preview": "Established through [Referendum 81](https://polkadot-old.polkassembly.io/referendum/81){target=\\_blank}, the Collectives chain operates as a dedicated parachain exclusive to the Polkadot network with no counterpart on Kusama. This specialized infrastructure provides a foundation for various on-chain governance groups essential to Polkadot's ecosystem.", "outline": [ { "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Key Collectives", + "anchor": "key-collectives" } ], "stats": { - "chars": 998, - "words": 130, - "headings": 1, - "estimated_token_count_total": 12 + "chars": 2288, + "words": 293, + "headings": 2, + "estimated_token_count_total": 424 }, - "hash": "sha256:1514316acba1e9bba82ae1c82b09481e9d03d286e6f5d93b66e5a85fd4be7bca", + "hash": "sha256:59ec351fbb8d3a392e90f4f5bf6b62f58b21d6d7a900c5e367e5d2e09ecb3aca", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "polkadot-protocol-smart-contract-basics-evm-vs-polkavm", - "title": "EVM vs PolkaVM", - "slug": "polkadot-protocol-smart-contract-basics-evm-vs-polkavm", + "id": "polkadot-protocol-architecture-system-chains-coretime", + "title": "Coretime Chain", + "slug": "polkadot-protocol-architecture-system-chains-coretime", "categories": [ - "Basics", "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-smart-contract-basics-evm-vs-polkavm.md", - "html_url": "https://docs.polkadot.com/polkadot-protocol/smart-contract-basics/evm-vs-polkavm/", - "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-architecture-system-chains-coretime.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/architecture/system-chains/coretime/", + "preview": "The Coretime system chain facilitates the allocation, procurement, sale, and scheduling of bulk [coretime](/reference/glossary/#coretime){target=\\_blank}, enabling tasks (such as [parachains](/reference/glossary/#parachain){target=\\_blank}) to utilize the computation and security provided by Polkadot.", "outline": [ { "depth": 2, @@ -6660,110 +9024,41 @@ }, { "depth": 2, - "title": "Core Virtual Machine Architecture", - "anchor": "core-virtual-machine-architecture" - }, - { - "depth": 3, - "title": "High-Level Architecture Comparison", - "anchor": "high-level-architecture-comparison" - }, - { - "depth": 2, - "title": "Gas Model", - "anchor": "gas-model" - }, - { - "depth": 3, - "title": "Dynamic Gas Value Scaling", - "anchor": "dynamic-gas-value-scaling" - }, - { - "depth": 3, - "title": "Multi-Dimensional Resource Metering", - "anchor": "multi-dimensional-resource-metering" - }, - { - "depth": 2, - "title": "Memory Management", - "anchor": "memory-management" - }, - { - "depth": 3, - "title": "Current Memory Limits", - "anchor": "current-memory-limits" - }, - { - "depth": 2, - "title": "Account Management - Existential Deposit", - "anchor": "account-management-existential-deposit" - }, - { - "depth": 3, - "title": "Account Management Comparison", - "anchor": "account-management-comparison" - }, - { - "depth": 2, - "title": "Contract Deployment", - "anchor": "contract-deployment" + "title": "Bulk Coretime Assignment", + "anchor": "bulk-coretime-assignment" }, { "depth": 2, - "title": "Solidity and YUL IR Translation Incompatibilities", - "anchor": "solidity-and-yul-ir-translation-incompatibilities" - }, - { - "depth": 3, - "title": "Contract Code Structure", - "anchor": "contract-code-structure" - }, - { - "depth": 3, - "title": "Solidity-Specific Differences", - "anchor": "solidity-specific-differences" - }, - { - "depth": 3, - "title": "YUL Function Translation Differences", - "anchor": "yul-function-translation-differences" - }, - { - "depth": 3, - "title": "Unsupported Operations", - "anchor": "unsupported-operations" - }, - { - "depth": 3, - "title": "Compilation Pipeline Considerations", - "anchor": "compilation-pipeline-considerations" + "title": "On Demand Coretime", + "anchor": "on-demand-coretime" }, { - "depth": 3, - "title": "Memory Pointer Limitations", - "anchor": "memory-pointer-limitations" + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 27673, - "words": 3392, - "headings": 18, - "estimated_token_count_total": 5305 + "chars": 5279, + "words": 772, + "headings": 4, + "estimated_token_count_total": 1230 }, - "hash": "sha256:fe651be49fe0a9ae899b2cbf9c663325f407718dc63f1d2c6a2dc4931be751fa", + "hash": "sha256:8d186fa56ccbbf4b6c85cffc5521b9a99a20e9517f3b4a435730745803cbf2e8", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "polkadot-protocol-smart-contract-basics-networks", - "title": "Networks for Polkadot Hub Smart Contracts", - "slug": "polkadot-protocol-smart-contract-basics-networks", + "id": "polkadot-protocol-architecture-system-chains-overview", + "title": "Overview of Polkadot's System Chains", + "slug": "polkadot-protocol-architecture-system-chains-overview", "categories": [ "Basics", "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-smart-contract-basics-networks.md", - "html_url": "https://docs.polkadot.com/polkadot-protocol/smart-contract-basics/networks/", - "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-architecture-system-chains-overview.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/architecture/system-chains/overview/", + "preview": "Polkadot's relay chain is designed to secure parachains and facilitate seamless inter-chain communication. However, resource-intensive—tasks like governance, asset management, and bridging are more efficiently handled by system parachains. These specialized chains offload functionality from the relay chain, leveraging Polkadot's parallel execution model to improve performance and scalability. By distributing key functionalities across system parachains, Polkadot can maximize its relay chain's bl", "outline": [ { "depth": 2, @@ -6772,121 +9067,131 @@ }, { "depth": 2, - "title": "Network Overview", - "anchor": "network-overview" + "title": "System Chains", + "anchor": "system-chains" }, { "depth": 2, - "title": "Local Development", - "anchor": "local-development" + "title": "Existing System Chains", + "anchor": "existing-system-chains" }, { - "depth": 2, - "title": "Test Networks", - "anchor": "test-networks" + "depth": 3, + "title": "Asset Hub", + "anchor": "asset-hub" }, { "depth": 3, - "title": "Passet Hub", - "anchor": "passet-hub" + "title": "Collectives", + "anchor": "collectives" }, { "depth": 3, - "title": "Westend Hub", - "anchor": "westend-hub" + "title": "Bridge Hub", + "anchor": "bridge-hub" }, { - "depth": 2, - "title": "Production Networks", - "anchor": "production-networks" + "depth": 3, + "title": "People Chain", + "anchor": "people-chain" }, { "depth": 3, - "title": "Polkadot Hub", - "anchor": "polkadot-hub" + "title": "Coretime Chain", + "anchor": "coretime-chain" }, { "depth": 3, - "title": "Kusama Hub", - "anchor": "kusama-hub" + "title": "Encointer", + "anchor": "encointer" } ], "stats": { - "chars": 5108, - "words": 696, + "chars": 7727, + "words": 1105, "headings": 9, - "estimated_token_count_total": 891 + "estimated_token_count_total": 1643 }, - "hash": "sha256:b5acdc9acf0e44836b8a4518155eba7d16cc3b103c557a00970ffb1c44c3e9f6", + "hash": "sha256:100377787627052a29bd1173270b5ad307639b828c331e71c85d4c00bc5692d8", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "polkadot-protocol-smart-contract-basics-overview", - "title": "Smart Contracts Basics Overview", - "slug": "polkadot-protocol-smart-contract-basics-overview", + "id": "polkadot-protocol-architecture-system-chains", + "title": "System Chains", + "slug": "polkadot-protocol-architecture-system-chains", "categories": [ - "Basics", - "Polkadot Protocol" + "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-smart-contract-basics-overview.md", - "html_url": "https://docs.polkadot.com/polkadot-protocol/smart-contract-basics/overview/", - "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-architecture-system-chains.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/architecture/system-chains/", + "preview": "Explore the critical roles Polkadot’s system chains play in enhancing the network’s efficiency and scalability. From managing on-chain assets with the Asset Hub to enabling seamless Web3 integration through the Bridge Hub and facilitating coretime operations with the Coretime chain, each system chain is designed to offload specialized tasks from the relay chain, optimizing the entire ecosystem.", "outline": [ { "depth": 2, - "title": "Introduction", - "anchor": "introduction" - }, + "title": "In This Section", + "anchor": "in-this-section" + } + ], + "stats": { + "chars": 929, + "words": 124, + "headings": 1, + "estimated_token_count_total": 12 + }, + "hash": "sha256:8239d1e8d8642cb7c10e9e5f971c99b999e9e4a87373b50bf4a691225c1e4702", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "polkadot-protocol-architecture", + "title": "Architecture", + "slug": "polkadot-protocol-architecture", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-architecture.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/architecture/", + "preview": "Explore Polkadot's architecture, including the relay chain, parachains, and system chains, and discover the role each component plays in the broader ecosystem.", + "outline": [ { "depth": 2, - "title": "Smart Contracts Versus Parachains", - "anchor": "smart-contracts-versus-parachains" + "title": "A Brief Look at Polkadot’s Chain Ecosystem", + "anchor": "a-brief-look-at-polkadots-chain-ecosystem" }, { "depth": 2, - "title": "Building a Smart Contract", - "anchor": "building-a-smart-contract" - }, - { - "depth": 3, - "title": "PolkaVM Contracts", - "anchor": "polkavm-contracts" - }, - { - "depth": 3, - "title": "EVM Contracts", - "anchor": "evm-contracts" - }, - { - "depth": 3, - "title": "Wasm Contracts", - "anchor": "wasm-contracts" + "title": "In This Section", + "anchor": "in-this-section" } ], "stats": { - "chars": 10854, - "words": 1559, - "headings": 6, - "estimated_token_count_total": 2550 + "chars": 990, + "words": 132, + "headings": 2, + "estimated_token_count_total": 177 }, - "hash": "sha256:5d293525ce81d27e32c26938a029a6a82b137221a0630d084f528853ffaf798e", + "hash": "sha256:f0e04286eacf23b182186f23e9854c0cd251545b8a8d561d2503f962dbfe32c0", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "polkadot-protocol-smart-contract-basics", - "title": "Smart Contract Basics", - "slug": "polkadot-protocol-smart-contract-basics", + "id": "polkadot-protocol-onchain-governance", + "title": "On-Chain Governance", + "slug": "polkadot-protocol-onchain-governance", "categories": [ "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-smart-contract-basics.md", - "html_url": "https://docs.polkadot.com/polkadot-protocol/smart-contract-basics/", - "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. Gain a deep understanding of smart contracts on Polkadot, from execution environments to transaction mechanics.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-onchain-governance.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/onchain-governance/", + "preview": "Polkadot's on-chain governance system, OpenGov, enables decentralized decision-making across the network. It empowers stakeholders to propose, vote on, and enact changes with transparency and efficiency. This system ensures that governance is both flexible and inclusive, allowing developers to integrate custom governance solutions and mechanisms within the network. Understanding how OpenGov functions is crucial for anyone looking to engage with Polkadot’s decentralized ecosystem, whether you’re", "outline": [ { "depth": 2, - "title": "Key Topics", - "anchor": "key-topics" + "title": "Start Building Governance Solutions", + "anchor": "start-building-governance-solutions" }, { "depth": 2, @@ -6895,24 +9200,26 @@ } ], "stats": { - "chars": 1110, - "words": 136, + "chars": 2114, + "words": 285, "headings": 2, - "estimated_token_count_total": 148 + "estimated_token_count_total": 233 }, - "hash": "sha256:e8dac01e89b7aac4b887e962e91084c253f5ea25c1abc3a56355390d0c3201c8", + "hash": "sha256:baba9dd41091b792d09005d55d3df0bf65b35f42b40ebe63caf425a0978a22b0", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "polkadot-protocol", - "title": "Learn About the Polkadot Protocol", - "slug": "polkadot-protocol", + "id": "polkadot-protocol-parachain-basics-blocks-transactions-fees", + "title": "Blocks, Transactions, and Fees", + "slug": "polkadot-protocol-parachain-basics-blocks-transactions-fees", "categories": [ "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol.md", - "html_url": "https://docs.polkadot.com/polkadot-protocol/", - "preview": "The Polkadot protocol is designed to enable scalable, secure, and interoperable networks. It introduces a unique multichain architecture that allows independent blockchains, known as parachains, to operate seamlessly while benefiting from the shared security of the relay chain. Polkadot’s decentralized governance ensures that network upgrades and decisions are community-driven, while its cross-chain messaging and interoperability features make it a hub for multichain applications.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-parachain-basics-blocks-transactions-fees.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/parachain-basics/blocks-transactions-fees/", + "preview": "Discover the inner workings of Polkadot’s blocks and transactions, including their structure, processing, and lifecycle within the network. Learn how blocks are authored, validated, and finalized, ensuring seamless operation and consensus across the ecosystem. Dive into the various types of transactions—signed, unsigned, and inherent—and understand how they are constructed, submitted, and validated.", "outline": [ { "depth": 2, @@ -6921,375 +9228,421 @@ } ], "stats": { - "chars": 1170, - "words": 150, + "chars": 788, + "words": 105, "headings": 1, "estimated_token_count_total": 12 }, - "hash": "sha256:49be4b4b5289572086eaaaf9ccff3bee7879b534188331c9a8052b3fe5aa4933", + "hash": "sha256:62beec261e72529f70e07a641177d489d2c8872f9c9d618cbadf1ac0fd881986", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-glossary", - "title": "Glossary", - "slug": "reference-glossary", + "id": "polkadot-protocol-parachain-basics", + "title": "Parachain Basics", + "slug": "polkadot-protocol-parachain-basics", "categories": [ - "Reference" + "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-glossary.md", - "html_url": "https://docs.polkadot.com/reference/glossary/", - "preview": "Key definitions, concepts, and terminology specific to the Polkadot ecosystem are included here.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-parachain-basics.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/parachain-basics/", + "preview": "This section equips developers with the essential knowledge to create, deploy, and enhance applications and blockchains within the Polkadot ecosystem. Gain a comprehensive understanding of Polkadot’s foundational components, including accounts, balances, and transactions, as well as advanced topics like data encoding and cryptographic methods. Mastering these concepts is vital for building robust and secure applications on Polkadot.", "outline": [ { "depth": 2, - "title": "Authority", - "anchor": "authority" - }, - { - "depth": 2, - "title": "Authority Round (Aura)", - "anchor": "authority-round-aura" - }, - { - "depth": 2, - "title": "Blind Assignment of Blockchain Extension (BABE)", - "anchor": "blind-assignment-of-blockchain-extension-babe" - }, - { - "depth": 2, - "title": "Block Author", - "anchor": "block-author" - }, - { - "depth": 2, - "title": "Byzantine Fault Tolerance (BFT)", - "anchor": "byzantine-fault-tolerance-bft" - }, - { - "depth": 3, - "title": "Byzantine Failure", - "anchor": "byzantine-failure" - }, - { - "depth": 3, - "title": "Practical Byzantine Fault Tolerance (pBFT)", - "anchor": "practical-byzantine-fault-tolerance-pbft" - }, - { - "depth": 3, - "title": "Preimage", - "anchor": "preimage" - }, + "title": "In This Section", + "anchor": "in-this-section" + } + ], + "stats": { + "chars": 29648, + "words": 4201, + "headings": 15, + "estimated_token_count_total": 6521 + }, + "hash": "sha256:1f9ce923b3ce296571fe63837c0d3c3c791a339ef02db09ead6b2b92e9d1bfd5", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "polkadot-protocol-parachain-basics-blocks-transactions-fees-blocks", + "title": "Blocks", + "slug": "polkadot-protocol-parachain-basics-blocks-transactions-fees-blocks", + "categories": [ + "Basics", + "Polkadot Protocol" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-parachain-basics-blocks-transactions-fees-blocks.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/parachain-basics/blocks-transactions-fees/blocks/", + "preview": "In the Polkadot SDK, blocks are fundamental to the functioning of the blockchain, serving as containers for [transactions](/polkadot-protocol/parachain-basics/blocks-transactions-fees/transactions/){target=\\_blank} and changes to the chain's state. Blocks consist of headers and an array of transactions, ensuring the integrity and validity of operations on the network. This guide explores the essential components of a block, the process of block production, and how blocks are validated and import", + "outline": [ { "depth": 2, - "title": "Call", - "anchor": "call" + "title": "Introduction", + "anchor": "introduction" }, { "depth": 2, - "title": "Chain Specification", - "anchor": "chain-specification" + "title": "What is a Block?", + "anchor": "what-is-a-block" }, { "depth": 2, - "title": "Collator", - "anchor": "collator" + "title": "Block Production", + "anchor": "block-production" }, { - "depth": 2, - "title": "Collective", - "anchor": "collective" + "depth": 3, + "title": "Initialize Block", + "anchor": "initialize-block" }, { - "depth": 2, - "title": "Consensus", - "anchor": "consensus" + "depth": 3, + "title": "Finalize Block", + "anchor": "finalize-block" }, { "depth": 2, - "title": "Consensus Algorithm", - "anchor": "consensus-algorithm" + "title": "Block Authoring and Import", + "anchor": "block-authoring-and-import" }, { - "depth": 2, - "title": "Consensus Engine", - "anchor": "consensus-engine" + "depth": 3, + "title": "Block Import Queue", + "anchor": "block-import-queue" }, { "depth": 2, - "title": "Coretime", - "anchor": "coretime" - }, + "title": "Additional Resources", + "anchor": "additional-resources" + } + ], + "stats": { + "chars": 6266, + "words": 912, + "headings": 8, + "estimated_token_count_total": 1399 + }, + "hash": "sha256:bcad23a74d962cab72b54cdc090bf9ee0cd5ecf79f70fb642f154668c2743983", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "polkadot-protocol-parachain-basics-blocks-transactions-fees-fees", + "title": "Transactions Weights and Fees", + "slug": "polkadot-protocol-parachain-basics-blocks-transactions-fees-fees", + "categories": [ + "Basics", + "Polkadot Protocol" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-parachain-basics-blocks-transactions-fees-fees.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/parachain-basics/blocks-transactions-fees/fees/", + "preview": "When transactions are executed, or data is stored on-chain, the activity changes the chain's state and consumes blockchain resources. Because the resources available to a blockchain are limited, managing how operations on-chain consume them is important. In addition to being limited in practical terms, such as storage capacity, blockchain resources represent a potential attack vector for malicious users. For example, a malicious user might attempt to overload the network with messages to stop th", + "outline": [ { "depth": 2, - "title": "Development Phrase", - "anchor": "development-phrase" + "title": "Introductions", + "anchor": "introductions" }, { "depth": 2, - "title": "Digest", - "anchor": "digest" + "title": "How Fees are Calculated", + "anchor": "how-fees-are-calculated" }, { "depth": 2, - "title": "Dispatchable", - "anchor": "dispatchable" + "title": "Using the Transaction Payment Pallet", + "anchor": "using-the-transaction-payment-pallet" }, { - "depth": 2, - "title": "Events", - "anchor": "events" + "depth": 3, + "title": "Understanding the Inclusion Fee", + "anchor": "understanding-the-inclusion-fee" }, { - "depth": 2, - "title": "Executor", - "anchor": "executor" + "depth": 3, + "title": "Accounts with an Insufficient Balance", + "anchor": "accounts-with-an-insufficient-balance" }, { - "depth": 2, - "title": "Existential Deposit", - "anchor": "existential-deposit" + "depth": 3, + "title": "Fee Multipliers", + "anchor": "fee-multipliers" }, { "depth": 2, - "title": "Extrinsic", - "anchor": "extrinsic" + "title": "Transactions with Special Requirements", + "anchor": "transactions-with-special-requirements" }, { "depth": 2, - "title": "Fork Choice Rule/Strategy", - "anchor": "fork-choice-rulestrategy" + "title": "Default Weight Annotations", + "anchor": "default-weight-annotations" }, { - "depth": 2, - "title": "FRAME (Framework for Runtime Aggregation of Modularized Entities)", - "anchor": "frame-framework-for-runtime-aggregation-of-modularized-entities" + "depth": 3, + "title": "Weights and Database Read/Write Operations", + "anchor": "weights-and-database-readwrite-operations" }, { - "depth": 2, - "title": "Full Node", - "anchor": "full-node" + "depth": 3, + "title": "Dispatch Classes", + "anchor": "dispatch-classes" }, { - "depth": 2, - "title": "Genesis Configuration", - "anchor": "genesis-configuration" + "depth": 3, + "title": "Dynamic Weights", + "anchor": "dynamic-weights" }, { "depth": 2, - "title": "GRANDPA", - "anchor": "grandpa" + "title": "Post Dispatch Weight Correction", + "anchor": "post-dispatch-weight-correction" }, { "depth": 2, - "title": "Header", - "anchor": "header" + "title": "Custom Fees", + "anchor": "custom-fees" }, { - "depth": 2, - "title": "Hybrid Consensus", - "anchor": "hybrid-consensus" + "depth": 3, + "title": "Custom Weights", + "anchor": "custom-weights" }, { "depth": 2, - "title": "Inherent Transactions", - "anchor": "inherent-transactions" - }, + "title": "Additional Resources", + "anchor": "additional-resources" + } + ], + "stats": { + "chars": 20797, + "words": 2917, + "headings": 15, + "estimated_token_count_total": 4464 + }, + "hash": "sha256:299597c39d0e4e4902be8e45b354fff78a862aa5799e4f16d16787a97a1e3da8", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "polkadot-protocol-parachain-basics-blocks-transactions-fees-transactions", + "title": "Transactions", + "slug": "polkadot-protocol-parachain-basics-blocks-transactions-fees-transactions", + "categories": [ + "Basics", + "Polkadot Protocol" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-parachain-basics-blocks-transactions-fees-transactions.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/parachain-basics/blocks-transactions-fees/transactions/", + "preview": "Transactions are essential components of blockchain networks, enabling state changes and the execution of key operations. In the Polkadot SDK, transactions, often called extrinsics, come in multiple forms, including signed, unsigned, and inherent transactions.", + "outline": [ { "depth": 2, - "title": "JSON-RPC", - "anchor": "json-rpc" + "title": "Introduction", + "anchor": "introduction" }, { "depth": 2, - "title": "Keystore", - "anchor": "keystore" + "title": "What Is a Transaction?", + "anchor": "what-is-a-transaction" }, { - "depth": 2, - "title": "Kusama", - "anchor": "kusama" + "depth": 3, + "title": "Signed Transactions", + "anchor": "signed-transactions" }, { - "depth": 2, - "title": "libp2p", - "anchor": "libp2p" + "depth": 3, + "title": "Unsigned Transactions", + "anchor": "unsigned-transactions" }, { - "depth": 2, - "title": "Light Client", - "anchor": "light-client" + "depth": 3, + "title": "Inherent Transactions", + "anchor": "inherent-transactions" }, { "depth": 2, - "title": "Metadata", - "anchor": "metadata" + "title": "Transaction Formats", + "anchor": "transaction-formats" }, { - "depth": 2, - "title": "Nominated Proof of Stake (NPoS)", - "anchor": "nominated-proof-of-stake-npos" + "depth": 3, + "title": "Types of Transaction Formats", + "anchor": "types-of-transaction-formats" }, { - "depth": 2, - "title": "Oracle", - "anchor": "oracle" + "depth": 3, + "title": "Signed Transaction Data Structure", + "anchor": "signed-transaction-data-structure" }, { - "depth": 2, - "title": "Origin", - "anchor": "origin" + "depth": 3, + "title": "Signed Extensions", + "anchor": "signed-extensions" }, { "depth": 2, - "title": "Pallet", - "anchor": "pallet" + "title": "Transaction Construction", + "anchor": "transaction-construction" }, { - "depth": 2, - "title": "Parachain", - "anchor": "parachain" + "depth": 3, + "title": "Construct a Signed Transaction", + "anchor": "construct-a-signed-transaction" }, { - "depth": 2, - "title": "Paseo", - "anchor": "paseo" + "depth": 3, + "title": "Transaction Encoding", + "anchor": "transaction-encoding" }, { - "depth": 2, - "title": "Polkadot", - "anchor": "polkadot" + "depth": 3, + "title": "Customize Transaction Construction", + "anchor": "customize-transaction-construction" }, { "depth": 2, - "title": "Polkadot Cloud", - "anchor": "polkadot-cloud" + "title": "Lifecycle of a Transaction", + "anchor": "lifecycle-of-a-transaction" }, { - "depth": 2, - "title": "Polkadot Hub", - "anchor": "polkadot-hub" + "depth": 3, + "title": "Define Transaction Properties", + "anchor": "define-transaction-properties" }, { - "depth": 2, - "title": "PolkaVM", - "anchor": "polkavm" + "depth": 3, + "title": "Process on a Block Authoring Node", + "anchor": "process-on-a-block-authoring-node" }, { - "depth": 2, - "title": "Relay Chain", - "anchor": "relay-chain" + "depth": 3, + "title": "Validate and Queue", + "anchor": "validate-and-queue" }, { - "depth": 2, - "title": "Rococo", - "anchor": "rococo" + "depth": 3, + "title": "Transaction Ordering and Priority", + "anchor": "transaction-ordering-and-priority" + }, + { + "depth": 3, + "title": "Transaction Execution", + "anchor": "transaction-execution" }, { "depth": 2, - "title": "Runtime", - "anchor": "runtime" + "title": "Transaction Mortality", + "anchor": "transaction-mortality" }, { "depth": 2, - "title": "Slot", - "anchor": "slot" + "title": "Unique Identifiers for Extrinsics", + "anchor": "unique-identifiers-for-extrinsics" }, { "depth": 2, - "title": "Sovereign Account", - "anchor": "sovereign-account" - }, + "title": "Additional Resources", + "anchor": "additional-resources" + } + ], + "stats": { + "chars": 23604, + "words": 3333, + "headings": 22, + "estimated_token_count_total": 4705 + }, + "hash": "sha256:6675634d4c5f274a7cc69802ee0a2d259e38efd5afd1c9dacc2d0fecfb370e4c", + "last_modified": "2025-10-28T14:15:59+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "polkadot-protocol-parachain-basics-chain-data", + "title": "Chain Data", + "slug": "polkadot-protocol-parachain-basics-chain-data", + "categories": [ + "Basics", + "Polkadot Protocol" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-parachain-basics-chain-data.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/parachain-basics/chain-data/", + "preview": "Understanding and leveraging on-chain data is a fundamental aspect of blockchain development. Whether you're building frontend applications or backend systems, accessing and decoding runtime metadata is vital to interacting with the blockchain. This guide introduces you to the tools and processes for generating and retrieving metadata, explains its role in application development, and outlines the additional APIs available for interacting with a Polkadot node. By mastering these components, you", + "outline": [ { "depth": 2, - "title": "SS58 Address Format", - "anchor": "ss58-address-format" + "title": "Introduction", + "anchor": "introduction" }, { "depth": 2, - "title": "State Transition Function (STF)", - "anchor": "state-transition-function-stf" + "title": "Application Development", + "anchor": "application-development" }, { "depth": 2, - "title": "Storage Item", - "anchor": "storage-item" + "title": "Understand Metadata", + "anchor": "understand-metadata" }, { "depth": 2, - "title": "Substrate", - "anchor": "substrate" + "title": "Expose Runtime Information as Metadata", + "anchor": "expose-runtime-information-as-metadata" }, { "depth": 2, - "title": "Transaction", - "anchor": "transaction" + "title": "Generate Metadata", + "anchor": "generate-metadata" }, { "depth": 2, - "title": "Transaction Era", - "anchor": "transaction-era" + "title": "Retrieve Runtime Metadata", + "anchor": "retrieve-runtime-metadata" }, { - "depth": 2, - "title": "Trie (Patricia Merkle Tree)", - "anchor": "trie-patricia-merkle-tree" + "depth": 3, + "title": "Use Polkadot.js", + "anchor": "use-polkadotjs" }, { - "depth": 2, - "title": "Validator", - "anchor": "validator" + "depth": 3, + "title": "Use Curl", + "anchor": "use-curl" }, { - "depth": 2, - "title": "WebAssembly (Wasm)", - "anchor": "webassembly-wasm" + "depth": 3, + "title": "Use Subxt", + "anchor": "use-subxt" }, { "depth": 2, - "title": "Weight", - "anchor": "weight" + "title": "Client Applications and Metadata", + "anchor": "client-applications-and-metadata" }, { "depth": 2, - "title": "Westend", - "anchor": "westend" - } - ], - "stats": { - "chars": 24739, - "words": 3626, - "headings": 63, - "estimated_token_count_total": 5273 - }, - "hash": "sha256:40bd67811e7eabc79ca5d105eae388b19380d9f035022da17fc0d6bb173c817c", - "token_estimator": "heuristic-v1" - }, - { - "id": "reference-governance-origins-tracks", - "title": "Origins and Tracks", - "slug": "reference-governance-origins-tracks", - "categories": [ - "Polkadot Protocol" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-governance-origins-tracks.md", - "html_url": "https://docs.polkadot.com/reference/governance/origins-tracks/", - "preview": "Polkadot's OpenGov system empowers decentralized decision-making and active community participation by tailoring the governance process to the impact of proposed changes. Through a system of origins and tracks, OpenGov ensures that every referendum receives the appropriate scrutiny, balancing security, inclusivity, and efficiency.", - "outline": [ + "title": "Metadata Format", + "anchor": "metadata-format" + }, { - "depth": 2, - "title": "Introduction", - "anchor": "introduction" + "depth": 3, + "title": "Pallets", + "anchor": "pallets" }, { - "depth": 2, - "title": "Origins", - "anchor": "origins" + "depth": 3, + "title": "Extrinsic", + "anchor": "extrinsic" }, { "depth": 2, - "title": "Tracks", - "anchor": "tracks" + "title": "Included RPC APIs", + "anchor": "included-rpc-apis" }, { "depth": 2, @@ -7298,25 +9651,27 @@ } ], "stats": { - "chars": 3333, - "words": 469, - "headings": 4, - "estimated_token_count_total": 631 + "chars": 18678, + "words": 2220, + "headings": 15, + "estimated_token_count_total": 3782 }, - "hash": "sha256:baba9dd41091b792d09005d55d3df0bf65b35f42b40ebe63caf425a0978a22b0", + "hash": "sha256:eb4da21d561e9fd9333d97805318f0e263f54570120d3852ce7eba64da604cc2", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-governance", - "title": "On-Chain Governance Overview", - "slug": "reference-governance", + "id": "polkadot-protocol-parachain-basics-cryptography", + "title": "Cryptography", + "slug": "polkadot-protocol-parachain-basics-cryptography", "categories": [ "Basics", "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-governance.md", - "html_url": "https://docs.polkadot.com/reference/governance/", - "preview": "Polkadot’s governance system exemplifies decentralized decision-making, empowering its community of stakeholders to shape the network’s future through active participation. The latest evolution, OpenGov, builds on Polkadot’s foundation by providing a more inclusive and efficient governance model.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-parachain-basics-cryptography.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/parachain-basics/cryptography/", + "preview": "Cryptography forms the backbone of blockchain technology, providing the mathematical verifiability crucial for consensus systems, data integrity, and user security. While a deep understanding of the underlying mathematical processes isn't necessary for most blockchain developers, grasping the fundamental applications of cryptography is essential. This page comprehensively overviews cryptographic implementations used across Polkadot SDK-based chains and the broader blockchain ecosystem.", "outline": [ { "depth": 2, @@ -7325,65 +9680,82 @@ }, { "depth": 2, - "title": "Governance Evolution", - "anchor": "governance-evolution" + "title": "Hash Functions", + "anchor": "hash-functions" }, { - "depth": 2, - "title": "OpenGov Key Features", - "anchor": "opengov-key-features" + "depth": 3, + "title": "Key Properties of Hash Functions", + "anchor": "key-properties-of-hash-functions" }, { - "depth": 2, - "title": "Origins and Tracks", - "anchor": "origins-and-tracks" + "depth": 3, + "title": "Blake2", + "anchor": "blake2" }, { "depth": 2, - "title": "Referendums", - "anchor": "referendums" + "title": "Types of Cryptography", + "anchor": "types-of-cryptography" }, { "depth": 3, - "title": "Vote on Referendums", - "anchor": "vote-on-referendums" + "title": "Symmetric Cryptography", + "anchor": "symmetric-cryptography" }, { "depth": 3, - "title": "Delegate Voting Power", - "anchor": "delegate-voting-power" + "title": "Asymmetric Cryptography", + "anchor": "asymmetric-cryptography" }, { "depth": 3, - "title": "Cancel a Referendum", - "anchor": "cancel-a-referendum" + "title": "Trade-offs and Compromises", + "anchor": "trade-offs-and-compromises" }, { "depth": 2, - "title": "Additional Resources", - "anchor": "additional-resources" + "title": "Digital Signatures", + "anchor": "digital-signatures" + }, + { + "depth": 3, + "title": "Example of Creating a Digital Signature", + "anchor": "example-of-creating-a-digital-signature" + }, + { + "depth": 2, + "title": "Elliptic Curve", + "anchor": "elliptic-curve" + }, + { + "depth": 3, + "title": "Various Implementations", + "anchor": "various-implementations" } ], "stats": { - "chars": 7493, - "words": 1019, - "headings": 9, - "estimated_token_count_total": 1611 + "chars": 8860, + "words": 1293, + "headings": 12, + "estimated_token_count_total": 1797 }, - "hash": "sha256:62beec261e72529f70e07a641177d489d2c8872f9c9d618cbadf1ac0fd881986", + "hash": "sha256:259dcef86aadc513675258b665cc3940db65af6eb32a5db85da6ac339966fa60", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-parachains-accounts", - "title": "Polkadot SDK Accounts", - "slug": "reference-parachains-accounts", + "id": "polkadot-protocol-parachain-basics-data-encoding", + "title": "Data Encoding", + "slug": "polkadot-protocol-parachain-basics-data-encoding", "categories": [ "Basics", "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-accounts.md", - "html_url": "https://docs.polkadot.com/reference/parachains/accounts/", - "preview": "Accounts are essential for managing identity, transactions, and governance on the network in the Polkadot SDK. Understanding these components is critical for seamless development and operation on the network, whether you're building or interacting with Polkadot-based chains.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-parachain-basics-data-encoding.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/parachain-basics/data-encoding/", + "preview": "The Polkadot SDK uses a lightweight and efficient encoding/decoding mechanism to optimize data transmission across the network. This mechanism, known as the _SCALE_ codec, is used for serializing and deserializing data.", "outline": [ { "depth": 2, @@ -7392,95 +9764,72 @@ }, { "depth": 2, - "title": "Account Data Structure", - "anchor": "account-data-structure" + "title": "SCALE Codec", + "anchor": "scale-codec" }, { "depth": 3, - "title": "Account", - "anchor": "account" + "title": "Encode", + "anchor": "encode" }, { "depth": 3, - "title": "Account Info", - "anchor": "account-info" + "title": "Decode", + "anchor": "decode" }, { "depth": 3, - "title": "Account Reference Counters", - "anchor": "account-reference-counters" - }, - { - "depth": 2, - "title": "Account Balance Types", - "anchor": "account-balance-types" + "title": "CompactAs", + "anchor": "compactas" }, { "depth": 3, - "title": "Balance Types", - "anchor": "balance-types" + "title": "HasCompact", + "anchor": "hascompact" }, { "depth": 3, - "title": "Locks", - "anchor": "locks" + "title": "EncodeLike", + "anchor": "encodelike" }, { "depth": 3, - "title": "Balance Types on Polkadot.js", - "anchor": "balance-types-on-polkadotjs" + "title": "Data Types", + "anchor": "data-types" }, { "depth": 2, - "title": "Address Formats", - "anchor": "address-formats" - }, - { - "depth": 3, - "title": "Basic Format", - "anchor": "basic-format" - }, - { - "depth": 3, - "title": "Address Type", - "anchor": "address-type" - }, - { - "depth": 3, - "title": "Address Length", - "anchor": "address-length" - }, - { - "depth": 3, - "title": "Checksum Types", - "anchor": "checksum-types" + "title": "Encode and Decode Rust Trait Implementations", + "anchor": "encode-and-decode-rust-trait-implementations" }, { - "depth": 3, - "title": "Validating Addresses", - "anchor": "validating-addresses" + "depth": 2, + "title": "SCALE Codec Libraries", + "anchor": "scale-codec-libraries" } ], "stats": { - "chars": 29604, - "words": 4194, - "headings": 15, - "estimated_token_count_total": 6507 + "chars": 13629, + "words": 1314, + "headings": 10, + "estimated_token_count_total": 3213 }, - "hash": "sha256:0104a9132a69345a2faac37fca0e2853a2ded1efb009511a83a98d44509ab887", + "hash": "sha256:e448294b6e52291ac0add5fa6533572814e6cd27af42bdaccc2000b86f52d775", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-parachains-blocks-transactions-fees-blocks", - "title": "Blocks", - "slug": "reference-parachains-blocks-transactions-fees-blocks", + "id": "polkadot-protocol-parachain-basics-interoperability", + "title": "Interoperability", + "slug": "polkadot-protocol-parachain-basics-interoperability", "categories": [ "Basics", "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-blocks-transactions-fees-blocks.md", - "html_url": "https://docs.polkadot.com/reference/parachains/blocks-transactions-fees/blocks/", - "preview": "In the Polkadot SDK, blocks are fundamental to the functioning of the blockchain, serving as containers for [transactions](/reference/parachains/blocks-transactions-fees/transactions/){target=\\_blank} and changes to the chain's state. Blocks consist of headers and an array of transactions, ensuring the integrity and validity of operations on the network. This guide explores the essential components of a block, the process of block production, and how blocks are validated and imported across the", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-parachain-basics-interoperability.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/parachain-basics/interoperability/", + "preview": "Interoperability lies at the heart of the Polkadot ecosystem, enabling communication and collaboration across a diverse range of blockchains. By bridging the gaps between parachains, relay chains, and even external networks, Polkadot unlocks the potential for truly decentralized applications, efficient resource sharing, and scalable solutions.", "outline": [ { "depth": 2, @@ -7489,157 +9838,132 @@ }, { "depth": 2, - "title": "What is a Block?", - "anchor": "what-is-a-block" + "title": "Why Interoperability Matters", + "anchor": "why-interoperability-matters" }, { "depth": 2, - "title": "Block Production", - "anchor": "block-production" + "title": "Key Mechanisms for Interoperability", + "anchor": "key-mechanisms-for-interoperability" }, { "depth": 3, - "title": "Initialize Block", - "anchor": "initialize-block" + "title": "Cross-Consensus Messaging (XCM): The Backbone of Communication", + "anchor": "cross-consensus-messaging-xcm-the-backbone-of-communication" }, { "depth": 3, - "title": "Finalize Block", - "anchor": "finalize-block" + "title": "Bridges: Connecting External Networks", + "anchor": "bridges-connecting-external-networks" }, { "depth": 2, - "title": "Block Authoring and Import", - "anchor": "block-authoring-and-import" - }, - { - "depth": 3, - "title": "Block Import Queue", - "anchor": "block-import-queue" + "title": "The Polkadot Advantage", + "anchor": "the-polkadot-advantage" }, { "depth": 2, - "title": "Additional Resources", - "anchor": "additional-resources" + "title": "Looking Ahead", + "anchor": "looking-ahead" } ], "stats": { - "chars": 6252, - "words": 910, - "headings": 8, - "estimated_token_count_total": 1395 + "chars": 4657, + "words": 588, + "headings": 7, + "estimated_token_count_total": 780 }, - "hash": "sha256:424783c102bea5dae5b8749635858c6c59055563442a98f57521f0027dafa8d3", + "hash": "sha256:077e7e5bfc9509cf09f455959a5da7a74b7af69836b3c4b334692f32e306ddf1", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-parachains-blocks-transactions-fees-fees", - "title": "Transactions Weights and Fees", - "slug": "reference-parachains-blocks-transactions-fees-fees", + "id": "polkadot-protocol-parachain-basics-networks", + "title": "Networks", + "slug": "polkadot-protocol-parachain-basics-networks", "categories": [ "Basics", - "Polkadot Protocol" + "Polkadot Protocol", + "Networks" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-blocks-transactions-fees-fees.md", - "html_url": "https://docs.polkadot.com/reference/parachains/blocks-transactions-fees/fees/", - "preview": "When transactions are executed, or data is stored on-chain, the activity changes the chain's state and consumes blockchain resources. Because the resources available to a blockchain are limited, managing how operations on-chain consume them is important. In addition to being limited in practical terms, such as storage capacity, blockchain resources represent a potential attack vector for malicious users. For example, a malicious user might attempt to overload the network with messages to stop th", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-parachain-basics-networks.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/parachain-basics/networks/", + "preview": "The Polkadot ecosystem is built on a robust set of networks designed to enable secure and scalable development. Whether you are testing new features or deploying to live production, Polkadot offers several layers of networks tailored for each stage of the development process. From local environments to experimental networks like Kusama and community-run TestNets such as Paseo, developers can thoroughly test, iterate, and validate their applications. This guide will introduce you to Polkadot's va", "outline": [ { "depth": 2, - "title": "Introductions", - "anchor": "introductions" + "title": "Introduction", + "anchor": "introduction" }, { "depth": 2, - "title": "How Fees are Calculated", - "anchor": "how-fees-are-calculated" + "title": "Network Overview", + "anchor": "network-overview" }, { "depth": 2, - "title": "Using the Transaction Payment Pallet", - "anchor": "using-the-transaction-payment-pallet" - }, - { - "depth": 3, - "title": "Understanding the Inclusion Fee", - "anchor": "understanding-the-inclusion-fee" - }, - { - "depth": 3, - "title": "Accounts with an Insufficient Balance", - "anchor": "accounts-with-an-insufficient-balance" - }, - { - "depth": 3, - "title": "Fee Multipliers", - "anchor": "fee-multipliers" + "title": "Polkadot Development Networks", + "anchor": "polkadot-development-networks" }, { "depth": 2, - "title": "Transactions with Special Requirements", - "anchor": "transactions-with-special-requirements" + "title": "Kusama Network", + "anchor": "kusama-network" }, { "depth": 2, - "title": "Default Weight Annotations", - "anchor": "default-weight-annotations" - }, - { - "depth": 3, - "title": "Weights and Database Read/Write Operations", - "anchor": "weights-and-database-readwrite-operations" + "title": "Test Networks", + "anchor": "test-networks" }, { "depth": 3, - "title": "Dispatch Classes", - "anchor": "dispatch-classes" + "title": "Westend", + "anchor": "westend" }, { "depth": 3, - "title": "Dynamic Weights", - "anchor": "dynamic-weights" - }, - { - "depth": 2, - "title": "Post Dispatch Weight Correction", - "anchor": "post-dispatch-weight-correction" + "title": "Paseo", + "anchor": "paseo" }, { "depth": 2, - "title": "Custom Fees", - "anchor": "custom-fees" + "title": "Local Test Networks", + "anchor": "local-test-networks" }, { "depth": 3, - "title": "Custom Weights", - "anchor": "custom-weights" + "title": "Zombienet", + "anchor": "zombienet" }, { - "depth": 2, - "title": "Additional Resources", - "anchor": "additional-resources" + "depth": 3, + "title": "Chopsticks", + "anchor": "chopsticks" } ], "stats": { - "chars": 20800, - "words": 2917, - "headings": 15, - "estimated_token_count_total": 4464 + "chars": 7834, + "words": 1111, + "headings": 10, + "estimated_token_count_total": 1473 }, - "hash": "sha256:7d0c3fa7982b3e1843adb8f27422456397580b3a3eba5047b381da8517742536", + "hash": "sha256:695c624a1d7a3ed6fea0f4f5c19bb2100be986cec29ba58edb4598b9e9b98494", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-parachains-blocks-transactions-fees-transactions", - "title": "Transactions", - "slug": "reference-parachains-blocks-transactions-fees-transactions", + "id": "polkadot-protocol-parachain-basics-node-and-runtime", + "title": "Node and Runtime", + "slug": "polkadot-protocol-parachain-basics-node-and-runtime", "categories": [ "Basics", "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-blocks-transactions-fees-transactions.md", - "html_url": "https://docs.polkadot.com/reference/parachains/blocks-transactions-fees/transactions/", - "preview": "Transactions are essential components of blockchain networks, enabling state changes and the execution of key operations. In the Polkadot SDK, transactions, often called extrinsics, come in multiple forms, including signed, unsigned, and inherent transactions.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-parachain-basics-node-and-runtime.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/parachain-basics/node-and-runtime/", + "preview": "Every blockchain platform relies on a decentralized network of computers, called nodes, that communicate with each other about transactions and blocks. In this context, a node refers to the software running on the connected devices rather than the physical or virtual machines in the network.", "outline": [ { "depth": 2, @@ -7648,130 +9972,195 @@ }, { "depth": 2, - "title": "What Is a Transaction?", - "anchor": "what-is-a-transaction" + "title": "Architectural Principles", + "anchor": "architectural-principles" }, { "depth": 3, - "title": "Signed Transactions", - "anchor": "signed-transactions" + "title": "Advantages of this Architecture", + "anchor": "advantages-of-this-architecture" + }, + { + "depth": 2, + "title": "Node (Client)", + "anchor": "node-client" + }, + { + "depth": 2, + "title": "Runtime", + "anchor": "runtime" }, { "depth": 3, - "title": "Unsigned Transactions", - "anchor": "unsigned-transactions" + "title": "Characteristics", + "anchor": "characteristics" }, { "depth": 3, - "title": "Inherent Transactions", - "anchor": "inherent-transactions" + "title": "Key Functions", + "anchor": "key-functions" }, { "depth": 2, - "title": "Transaction Formats", - "anchor": "transaction-formats" + "title": "Communication Between Node and Runtime", + "anchor": "communication-between-node-and-runtime" }, { "depth": 3, - "title": "Types of Transaction Formats", - "anchor": "types-of-transaction-formats" + "title": "Runtime APIs", + "anchor": "runtime-apis" }, { "depth": 3, - "title": "Signed Transaction Data Structure", - "anchor": "signed-transaction-data-structure" - }, + "title": "Host Functions", + "anchor": "host-functions" + } + ], + "stats": { + "chars": 4937, + "words": 628, + "headings": 10, + "estimated_token_count_total": 914 + }, + "hash": "sha256:8122e21c149d0863cfe3b37fc5606bcdb91668e9d265f0f05451a61ff70e4e93", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "polkadot-protocol-parachain-basics-randomness", + "title": "Randomness", + "slug": "polkadot-protocol-parachain-basics-randomness", + "categories": [ + "Basics", + "Polkadot Protocol" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-parachain-basics-randomness.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/parachain-basics/randomness/", + "preview": "Randomness is crucial in Proof of Stake (PoS) blockchains to ensure a fair and unpredictable distribution of validator duties. However, computers are inherently deterministic, meaning the same input always produces the same output. What we typically refer to as \"random\" numbers on a computer are actually pseudo-random. These numbers rely on an initial \"seed,\" which can come from external sources like [atmospheric noise](https://www.random.org/randomness/){target=\\_blank}, [heart rates](https://m", + "outline": [ { - "depth": 3, - "title": "Signed Extensions", - "anchor": "signed-extensions" + "depth": 2, + "title": "Introduction", + "anchor": "introduction" }, { "depth": 2, - "title": "Transaction Construction", - "anchor": "transaction-construction" + "title": "VRF", + "anchor": "vrf" }, { "depth": 3, - "title": "Construct a Signed Transaction", - "anchor": "construct-a-signed-transaction" + "title": "How VRF Works", + "anchor": "how-vrf-works" }, { - "depth": 3, - "title": "Transaction Encoding", - "anchor": "transaction-encoding" + "depth": 2, + "title": "RANDAO", + "anchor": "randao" }, { - "depth": 3, - "title": "Customize Transaction Construction", - "anchor": "customize-transaction-construction" + "depth": 2, + "title": "VDFs", + "anchor": "vdfs" }, { "depth": 2, - "title": "Lifecycle of a Transaction", - "anchor": "lifecycle-of-a-transaction" + "title": "Additional Resources", + "anchor": "additional-resources" + } + ], + "stats": { + "chars": 6541, + "words": 1008, + "headings": 6, + "estimated_token_count_total": 1394 + }, + "hash": "sha256:217a79109aff1607594a0238fd91bfa812827620887c4f063c7e0a7a37f967d6", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "polkadot-protocol-smart-contract-basics-accounts", + "title": "Accounts in Asset Hub Smart Contracts", + "slug": "polkadot-protocol-smart-contract-basics-accounts", + "categories": [ + "Basics", + "Polkadot Protocol" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-smart-contract-basics-accounts.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/smart-contract-basics/accounts/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" }, { - "depth": 3, - "title": "Define Transaction Properties", - "anchor": "define-transaction-properties" + "depth": 2, + "title": "Address Types and Mappings", + "anchor": "address-types-and-mappings" }, { "depth": 3, - "title": "Process on a Block Authoring Node", - "anchor": "process-on-a-block-authoring-node" + "title": "Ethereum to Polkadot Mapping", + "anchor": "ethereum-to-polkadot-mapping" }, { "depth": 3, - "title": "Validate and Queue", - "anchor": "validate-and-queue" + "title": "Polkadot to Ethereum Mapping", + "anchor": "polkadot-to-ethereum-mapping" }, { "depth": 3, - "title": "Transaction Ordering and Priority", - "anchor": "transaction-ordering-and-priority" + "title": "Account Mapping for Native Polkadot Accounts", + "anchor": "account-mapping-for-native-polkadot-accounts" }, { - "depth": 3, - "title": "Transaction Execution", - "anchor": "transaction-execution" + "depth": 2, + "title": "Account Registration", + "anchor": "account-registration" }, { "depth": 2, - "title": "Transaction Mortality", - "anchor": "transaction-mortality" + "title": "Fallback Accounts", + "anchor": "fallback-accounts" }, { "depth": 2, - "title": "Unique Identifiers for Extrinsics", - "anchor": "unique-identifiers-for-extrinsics" + "title": "Contract Address Generation", + "anchor": "contract-address-generation" }, { "depth": 2, - "title": "Additional Resources", - "anchor": "additional-resources" + "title": "Security Considerations", + "anchor": "security-considerations" } ], "stats": { - "chars": 23610, - "words": 3333, - "headings": 22, - "estimated_token_count_total": 4708 + "chars": 8538, + "words": 1141, + "headings": 9, + "estimated_token_count_total": 1822 }, - "hash": "sha256:66726634d3a51cd9c471621054a6e5f09c8061dca6144b64c8bcf45626359617", + "hash": "sha256:db2b1806153242680043ced536f64fc8a2ed3c09adc1bec5aa287168b48e0994", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-parachains-chain-data", - "title": "Chain Data", - "slug": "reference-parachains-chain-data", + "id": "polkadot-protocol-smart-contract-basics-blocks-transactions-fees", + "title": "Transactions and Fees on Asset Hub", + "slug": "polkadot-protocol-smart-contract-basics-blocks-transactions-fees", "categories": [ "Basics", "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-chain-data.md", - "html_url": "https://docs.polkadot.com/reference/parachains/chain-data/", - "preview": "Understanding and leveraging on-chain data is a fundamental aspect of blockchain development. Whether you're building frontend applications or backend systems, accessing and decoding runtime metadata is vital to interacting with the blockchain. This guide introduces you to the tools and processes for generating and retrieving metadata, explains its role in application development, and outlines the additional APIs available for interacting with a Polkadot node. By mastering these components, you", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-smart-contract-basics-blocks-transactions-fees.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/smart-contract-basics/blocks-transactions-fees/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", "outline": [ { "depth": 2, @@ -7780,196 +10169,175 @@ }, { "depth": 2, - "title": "Application Development", - "anchor": "application-development" - }, - { - "depth": 2, - "title": "Understand Metadata", - "anchor": "understand-metadata" + "title": "Smart Contract Blocks", + "anchor": "smart-contract-blocks" }, { "depth": 2, - "title": "Expose Runtime Information as Metadata", - "anchor": "expose-runtime-information-as-metadata" + "title": "Smart Contract Transactions", + "anchor": "smart-contract-transactions" }, { - "depth": 2, - "title": "Generate Metadata", - "anchor": "generate-metadata" + "depth": 3, + "title": "EVM Transaction Types", + "anchor": "evm-transaction-types" }, { "depth": 2, - "title": "Retrieve Runtime Metadata", - "anchor": "retrieve-runtime-metadata" + "title": "Fees and Gas", + "anchor": "fees-and-gas" }, { "depth": 3, - "title": "Use Polkadot.js", - "anchor": "use-polkadotjs" + "title": "Gas Model Overview", + "anchor": "gas-model-overview" }, { "depth": 3, - "title": "Use Curl", - "anchor": "use-curl" + "title": "Fee Components", + "anchor": "fee-components" }, { "depth": 3, - "title": "Use Subxt", - "anchor": "use-subxt" + "title": "Gas Calculation and Conversion", + "anchor": "gas-calculation-and-conversion" + } + ], + "stats": { + "chars": 6361, + "words": 789, + "headings": 8, + "estimated_token_count_total": 1178 + }, + "hash": "sha256:9a6b3fa6c005d75c25f0f683b7d8c3b65891454743b794c12b005f910b81609c", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "polkadot-protocol-smart-contract-basics-evm-vs-polkavm", + "title": "EVM vs PolkaVM", + "slug": "polkadot-protocol-smart-contract-basics-evm-vs-polkavm", + "categories": [ + "Basics", + "Polkadot Protocol" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-smart-contract-basics-evm-vs-polkavm.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/smart-contract-basics/evm-vs-polkavm/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" }, { "depth": 2, - "title": "Client Applications and Metadata", - "anchor": "client-applications-and-metadata" + "title": "Core Virtual Machine Architecture", + "anchor": "core-virtual-machine-architecture" + }, + { + "depth": 3, + "title": "High-Level Architecture Comparison", + "anchor": "high-level-architecture-comparison" }, { "depth": 2, - "title": "Metadata Format", - "anchor": "metadata-format" + "title": "Gas Model", + "anchor": "gas-model" }, { "depth": 3, - "title": "Pallets", - "anchor": "pallets" + "title": "Dynamic Gas Value Scaling", + "anchor": "dynamic-gas-value-scaling" }, { "depth": 3, - "title": "Extrinsic", - "anchor": "extrinsic" + "title": "Multi-Dimensional Resource Metering", + "anchor": "multi-dimensional-resource-metering" }, { "depth": 2, - "title": "Included RPC APIs", - "anchor": "included-rpc-apis" + "title": "Memory Management", + "anchor": "memory-management" }, { - "depth": 2, - "title": "Additional Resources", - "anchor": "additional-resources" - } - ], - "stats": { - "chars": 18650, - "words": 2216, - "headings": 15, - "estimated_token_count_total": 3774 - }, - "hash": "sha256:49238d1e9e2c33e0fcd3a84b5e30f0d3840d7d23a783b538875e0a23f38efc1d", - "token_estimator": "heuristic-v1" - }, - { - "id": "reference-parachains-consensus-async-backing", - "title": "reference-parachains-consensus-async-backing", - "slug": "reference-parachains-consensus-async-backing", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-consensus-async-backing.md", - "html_url": "https://docs.polkadot.com/reference/parachains/consensus/async-backing/", - "preview": "TODO", - "outline": [], - "stats": { - "chars": 5, - "words": 1, - "headings": 0, - "estimated_token_count_total": 0 - }, - "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", - "token_estimator": "heuristic-v1" - }, - { - "id": "reference-parachains-consensus-elastic-scaling", - "title": "Elastic Scaling", - "slug": "reference-parachains-consensus-elastic-scaling", - "categories": [ - "Polkadot Protocol" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-consensus-elastic-scaling.md", - "html_url": "https://docs.polkadot.com/reference/parachains/consensus/elastic-scaling/", - "preview": "Polkadot's architecture delivers scalability and security through its shared security model, where the relay chain coordinates and validates multiple parallel chains.", - "outline": [ + "depth": 3, + "title": "Current Memory Limits", + "anchor": "current-memory-limits" + }, { "depth": 2, - "title": "Introduction", - "anchor": "introduction" + "title": "Account Management - Existential Deposit", + "anchor": "account-management-existential-deposit" }, { - "depth": 2, - "title": "How Elastic Scaling Works", - "anchor": "how-elastic-scaling-works" + "depth": 3, + "title": "Account Management Comparison", + "anchor": "account-management-comparison" }, { "depth": 2, - "title": "Benefits of Elastic Scaling", - "anchor": "benefits-of-elastic-scaling" + "title": "Contract Deployment", + "anchor": "contract-deployment" }, { "depth": 2, - "title": "Use Cases", - "anchor": "use-cases" + "title": "Solidity and YUL IR Translation Incompatibilities", + "anchor": "solidity-and-yul-ir-translation-incompatibilities" }, { "depth": 3, - "title": "Handling Sudden Traffic Spikes", - "anchor": "handling-sudden-traffic-spikes" + "title": "Contract Code Structure", + "anchor": "contract-code-structure" }, { "depth": 3, - "title": "Supporting Early-Stage Growth", - "anchor": "supporting-early-stage-growth" + "title": "Solidity-Specific Differences", + "anchor": "solidity-specific-differences" }, { "depth": 3, - "title": "Scaling Massive IoT Networks", - "anchor": "scaling-massive-iot-networks" + "title": "YUL Function Translation Differences", + "anchor": "yul-function-translation-differences" }, { "depth": 3, - "title": "Powering Real-Time, Low-Latency Systems", - "anchor": "powering-real-time-low-latency-systems" + "title": "Unsupported Operations", + "anchor": "unsupported-operations" + }, + { + "depth": 3, + "title": "Compilation Pipeline Considerations", + "anchor": "compilation-pipeline-considerations" + }, + { + "depth": 3, + "title": "Memory Pointer Limitations", + "anchor": "memory-pointer-limitations" } ], "stats": { - "chars": 7871, - "words": 1047, - "headings": 8, - "estimated_token_count_total": 1440 - }, - "hash": "sha256:2d228c52844df8952520fafdd3e6f0e26bfd2f32b5ee60c6241cf7d38603643c", - "token_estimator": "heuristic-v1" - }, - { - "id": "reference-parachains-consensus", - "title": "reference-parachains-consensus", - "slug": "reference-parachains-consensus", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-consensus.md", - "html_url": "https://docs.polkadot.com/reference/parachains/consensus/", - "preview": "TODO", - "outline": [], - "stats": { - "chars": 5, - "words": 1, - "headings": 0, - "estimated_token_count_total": 0 + "chars": 27673, + "words": 3392, + "headings": 18, + "estimated_token_count_total": 5305 }, - "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "hash": "sha256:fe651be49fe0a9ae899b2cbf9c663325f407718dc63f1d2c6a2dc4931be751fa", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-parachains-cryptography", - "title": "Cryptography", - "slug": "reference-parachains-cryptography", + "id": "polkadot-protocol-smart-contract-basics-networks", + "title": "Networks for Polkadot Hub Smart Contracts", + "slug": "polkadot-protocol-smart-contract-basics-networks", "categories": [ "Basics", "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-cryptography.md", - "html_url": "https://docs.polkadot.com/reference/parachains/cryptography/", - "preview": "Cryptography forms the backbone of blockchain technology, providing the mathematical verifiability crucial for consensus systems, data integrity, and user security. While a deep understanding of the underlying mathematical processes isn't necessary for most blockchain developers, grasping the fundamental applications of cryptography is essential. This page comprehensively overviews cryptographic implementations used across Polkadot SDK-based chains and the broader blockchain ecosystem.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-smart-contract-basics-networks.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/smart-contract-basics/networks/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", "outline": [ { "depth": 2, @@ -7978,80 +10346,66 @@ }, { "depth": 2, - "title": "Hash Functions", - "anchor": "hash-functions" - }, - { - "depth": 3, - "title": "Key Properties of Hash Functions", - "anchor": "key-properties-of-hash-functions" + "title": "Network Overview", + "anchor": "network-overview" }, { - "depth": 3, - "title": "Blake2", - "anchor": "blake2" + "depth": 2, + "title": "Local Development", + "anchor": "local-development" }, { "depth": 2, - "title": "Types of Cryptography", - "anchor": "types-of-cryptography" - }, - { - "depth": 3, - "title": "Symmetric Cryptography", - "anchor": "symmetric-cryptography" + "title": "Test Networks", + "anchor": "test-networks" }, { "depth": 3, - "title": "Asymmetric Cryptography", - "anchor": "asymmetric-cryptography" + "title": "Passet Hub", + "anchor": "passet-hub" }, { "depth": 3, - "title": "Trade-offs and Compromises", - "anchor": "trade-offs-and-compromises" + "title": "Westend Hub", + "anchor": "westend-hub" }, { "depth": 2, - "title": "Digital Signatures", - "anchor": "digital-signatures" + "title": "Production Networks", + "anchor": "production-networks" }, { "depth": 3, - "title": "Example of Creating a Digital Signature", - "anchor": "example-of-creating-a-digital-signature" - }, - { - "depth": 2, - "title": "Elliptic Curve", - "anchor": "elliptic-curve" + "title": "Polkadot Hub", + "anchor": "polkadot-hub" }, { "depth": 3, - "title": "Various Implementations", - "anchor": "various-implementations" + "title": "Kusama Hub", + "anchor": "kusama-hub" } ], "stats": { - "chars": 8860, - "words": 1293, - "headings": 12, - "estimated_token_count_total": 1797 + "chars": 5108, + "words": 696, + "headings": 9, + "estimated_token_count_total": 891 }, - "hash": "sha256:259dcef86aadc513675258b665cc3940db65af6eb32a5db85da6ac339966fa60", + "hash": "sha256:b5acdc9acf0e44836b8a4518155eba7d16cc3b103c557a00970ffb1c44c3e9f6", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-parachains-data-encoding", - "title": "Data Encoding", - "slug": "reference-parachains-data-encoding", + "id": "polkadot-protocol-smart-contract-basics-overview", + "title": "Smart Contracts Basics Overview", + "slug": "polkadot-protocol-smart-contract-basics-overview", "categories": [ "Basics", "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-data-encoding.md", - "html_url": "https://docs.polkadot.com/reference/parachains/data-encoding/", - "preview": "The Polkadot SDK uses a lightweight and efficient encoding/decoding mechanism to optimize data transmission across the network. This mechanism, known as the _SCALE_ codec, is used for serializing and deserializing data.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-smart-contract-basics-overview.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/smart-contract-basics/overview/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", "outline": [ { "depth": 2, @@ -8060,506 +10414,446 @@ }, { "depth": 2, - "title": "SCALE Codec", - "anchor": "scale-codec" - }, - { - "depth": 3, - "title": "Encode", - "anchor": "encode" + "title": "Smart Contracts Versus Parachains", + "anchor": "smart-contracts-versus-parachains" }, { - "depth": 3, - "title": "Decode", - "anchor": "decode" + "depth": 2, + "title": "Building a Smart Contract", + "anchor": "building-a-smart-contract" }, { "depth": 3, - "title": "CompactAs", - "anchor": "compactas" + "title": "PolkaVM Contracts", + "anchor": "polkavm-contracts" }, { "depth": 3, - "title": "HasCompact", - "anchor": "hascompact" + "title": "EVM Contracts", + "anchor": "evm-contracts" }, { "depth": 3, - "title": "EncodeLike", - "anchor": "encodelike" - }, + "title": "Wasm Contracts", + "anchor": "wasm-contracts" + } + ], + "stats": { + "chars": 10854, + "words": 1559, + "headings": 6, + "estimated_token_count_total": 2550 + }, + "hash": "sha256:e2cf14bcb483308f73a80c8e8871ce1a86fa694576d2e6e51beafc24488f4d58", + "last_modified": "2025-10-28T14:42:15+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "polkadot-protocol-smart-contract-basics", + "title": "Smart Contract Basics", + "slug": "polkadot-protocol-smart-contract-basics", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol-smart-contract-basics.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/smart-contract-basics/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. Gain a deep understanding of smart contracts on Polkadot, from execution environments to transaction mechanics.", + "outline": [ { - "depth": 3, - "title": "Data Types", - "anchor": "data-types" + "depth": 2, + "title": "Key Topics", + "anchor": "key-topics" }, { "depth": 2, - "title": "Encode and Decode Rust Trait Implementations", - "anchor": "encode-and-decode-rust-trait-implementations" - }, + "title": "In This Section", + "anchor": "in-this-section" + } + ], + "stats": { + "chars": 1110, + "words": 136, + "headings": 2, + "estimated_token_count_total": 148 + }, + "hash": "sha256:e8dac01e89b7aac4b887e962e91084c253f5ea25c1abc3a56355390d0c3201c8", + "token_estimator": "heuristic-v1" + }, + { + "id": "polkadot-protocol", + "title": "Learn About the Polkadot Protocol", + "slug": "polkadot-protocol", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/polkadot-protocol.md", + "html_url": "https://docs.polkadot.com/polkadot-protocol/", + "preview": "The Polkadot protocol is designed to enable scalable, secure, and interoperable networks. It introduces a unique multichain architecture that allows independent blockchains, known as parachains, to operate seamlessly while benefiting from the shared security of the relay chain. Polkadot’s decentralized governance ensures that network upgrades and decisions are community-driven, while its cross-chain messaging and interoperability features make it a hub for multichain applications.", + "outline": [ { "depth": 2, - "title": "SCALE Codec Libraries", - "anchor": "scale-codec-libraries" + "title": "In This Section", + "anchor": "in-this-section" } ], "stats": { - "chars": 13629, - "words": 1314, - "headings": 10, - "estimated_token_count_total": 3213 + "chars": 1170, + "words": 150, + "headings": 1, + "estimated_token_count_total": 12 }, - "hash": "sha256:e448294b6e52291ac0add5fa6533572814e6cd27af42bdaccc2000b86f52d775", + "hash": "sha256:6992c9a2d1b315b64d9782880105cf2d436750249a84577aceb95cc213863009", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-parachains-interoperability", - "title": "Interoperability", - "slug": "reference-parachains-interoperability", + "id": "reference-glossary", + "title": "Glossary", + "slug": "reference-glossary", "categories": [ - "Basics", - "Polkadot Protocol" + "Reference" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-interoperability.md", - "html_url": "https://docs.polkadot.com/reference/parachains/interoperability/", - "preview": "Interoperability lies at the heart of the Polkadot ecosystem, enabling communication and collaboration across a diverse range of blockchains. By bridging the gaps between parachains, relay chains, and even external networks, Polkadot unlocks the potential for truly decentralized applications, efficient resource sharing, and scalable solutions.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-glossary.md", + "html_url": "https://docs.polkadot.com/reference/glossary/", + "preview": "Key definitions, concepts, and terminology specific to the Polkadot ecosystem are included here.", "outline": [ { "depth": 2, - "title": "Introduction", - "anchor": "introduction" + "title": "Authority", + "anchor": "authority" }, { "depth": 2, - "title": "Why Interoperability Matters", - "anchor": "why-interoperability-matters" + "title": "Authority Round (Aura)", + "anchor": "authority-round-aura" }, { "depth": 2, - "title": "Key Mechanisms for Interoperability", - "anchor": "key-mechanisms-for-interoperability" + "title": "Blind Assignment of Blockchain Extension (BABE)", + "anchor": "blind-assignment-of-blockchain-extension-babe" + }, + { + "depth": 2, + "title": "Block Author", + "anchor": "block-author" + }, + { + "depth": 2, + "title": "Byzantine Fault Tolerance (BFT)", + "anchor": "byzantine-fault-tolerance-bft" }, { "depth": 3, - "title": "Cross-Consensus Messaging (XCM): The Backbone of Communication", - "anchor": "cross-consensus-messaging-xcm-the-backbone-of-communication" + "title": "Byzantine Failure", + "anchor": "byzantine-failure" }, { "depth": 3, - "title": "Bridges: Connecting External Networks", - "anchor": "bridges-connecting-external-networks" + "title": "Practical Byzantine Fault Tolerance (pBFT)", + "anchor": "practical-byzantine-fault-tolerance-pbft" }, { - "depth": 2, - "title": "The Polkadot Advantage", - "anchor": "the-polkadot-advantage" + "depth": 3, + "title": "Preimage", + "anchor": "preimage" }, { "depth": 2, - "title": "Looking Ahead", - "anchor": "looking-ahead" - } - ], - "stats": { - "chars": 4635, - "words": 584, - "headings": 7, - "estimated_token_count_total": 772 - }, - "hash": "sha256:11bb4f113bdda5852a3115e64d5ba47f8eccd4e3619a05ad960ab3a541f31346", - "token_estimator": "heuristic-v1" - }, - { - "id": "reference-parachains-networks", - "title": "Networks", - "slug": "reference-parachains-networks", - "categories": [ - "Basics", - "Polkadot Protocol", - "Networks" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-networks.md", - "html_url": "https://docs.polkadot.com/reference/parachains/networks/", - "preview": "The Polkadot ecosystem is built on a robust set of networks designed to enable secure and scalable development. Whether you are testing new features or deploying to live production, Polkadot offers several layers of networks tailored for each stage of the development process. From local environments to experimental networks like Kusama and community-run TestNets such as Paseo, developers can thoroughly test, iterate, and validate their applications. This guide will introduce you to Polkadot's va", - "outline": [ + "title": "Call", + "anchor": "call" + }, { "depth": 2, - "title": "Introduction", - "anchor": "introduction" + "title": "Chain Specification", + "anchor": "chain-specification" }, { "depth": 2, - "title": "Network Overview", - "anchor": "network-overview" + "title": "Collator", + "anchor": "collator" }, { "depth": 2, - "title": "Polkadot Development Networks", - "anchor": "polkadot-development-networks" + "title": "Collective", + "anchor": "collective" }, { "depth": 2, - "title": "Kusama Network", - "anchor": "kusama-network" + "title": "Consensus", + "anchor": "consensus" }, { "depth": 2, - "title": "Test Networks", - "anchor": "test-networks" + "title": "Consensus Algorithm", + "anchor": "consensus-algorithm" }, { - "depth": 3, - "title": "Westend", - "anchor": "westend" + "depth": 2, + "title": "Consensus Engine", + "anchor": "consensus-engine" }, { - "depth": 3, - "title": "Paseo", - "anchor": "paseo" + "depth": 2, + "title": "Coretime", + "anchor": "coretime" }, { "depth": 2, - "title": "Local Test Networks", - "anchor": "local-test-networks" + "title": "Development Phrase", + "anchor": "development-phrase" }, { - "depth": 3, - "title": "Zombienet", - "anchor": "zombienet" + "depth": 2, + "title": "Digest", + "anchor": "digest" }, { - "depth": 3, - "title": "Chopsticks", - "anchor": "chopsticks" - } - ], - "stats": { - "chars": 7834, - "words": 1111, - "headings": 10, - "estimated_token_count_total": 1473 - }, - "hash": "sha256:e49e063a2cc0fb5a48c6cdc3de266bb6e025a006940fea8e90cc4d5f9884900f", - "token_estimator": "heuristic-v1" - }, - { - "id": "reference-parachains-node-and-runtime", - "title": "Node and Runtime", - "slug": "reference-parachains-node-and-runtime", - "categories": [ - "Basics", - "Polkadot Protocol" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-node-and-runtime.md", - "html_url": "https://docs.polkadot.com/reference/parachains/node-and-runtime/", - "preview": "Every blockchain platform relies on a decentralized network of computers, called nodes, that communicate with each other about transactions and blocks. In this context, a node refers to the software running on the connected devices rather than the physical or virtual machines in the network.", - "outline": [ + "depth": 2, + "title": "Dispatchable", + "anchor": "dispatchable" + }, { "depth": 2, - "title": "Introduction", - "anchor": "introduction" + "title": "Events", + "anchor": "events" }, { "depth": 2, - "title": "Architectural Principles", - "anchor": "architectural-principles" + "title": "Executor", + "anchor": "executor" }, { - "depth": 3, - "title": "Advantages of this Architecture", - "anchor": "advantages-of-this-architecture" + "depth": 2, + "title": "Existential Deposit", + "anchor": "existential-deposit" }, { "depth": 2, - "title": "Node (Client)", - "anchor": "node-client" + "title": "Extrinsic", + "anchor": "extrinsic" }, { "depth": 2, - "title": "Runtime", - "anchor": "runtime" + "title": "Fork Choice Rule/Strategy", + "anchor": "fork-choice-rulestrategy" }, { - "depth": 3, - "title": "Characteristics", - "anchor": "characteristics" + "depth": 2, + "title": "FRAME (Framework for Runtime Aggregation of Modularized Entities)", + "anchor": "frame-framework-for-runtime-aggregation-of-modularized-entities" }, { - "depth": 3, - "title": "Key Functions", - "anchor": "key-functions" + "depth": 2, + "title": "Full Node", + "anchor": "full-node" }, { "depth": 2, - "title": "Communication Between Node and Runtime", - "anchor": "communication-between-node-and-runtime" + "title": "Genesis Configuration", + "anchor": "genesis-configuration" }, { - "depth": 3, - "title": "Runtime APIs", - "anchor": "runtime-apis" + "depth": 2, + "title": "GRANDPA", + "anchor": "grandpa" }, { - "depth": 3, - "title": "Host Functions", - "anchor": "host-functions" - } - ], - "stats": { - "chars": 4937, - "words": 628, - "headings": 10, - "estimated_token_count_total": 914 - }, - "hash": "sha256:8122e21c149d0863cfe3b37fc5606bcdb91668e9d265f0f05451a61ff70e4e93", - "token_estimator": "heuristic-v1" - }, - { - "id": "reference-parachains-randomness", - "title": "Randomness", - "slug": "reference-parachains-randomness", - "categories": [ - "Basics", - "Polkadot Protocol" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-randomness.md", - "html_url": "https://docs.polkadot.com/reference/parachains/randomness/", - "preview": "Randomness is crucial in Proof of Stake (PoS) blockchains to ensure a fair and unpredictable distribution of validator duties. However, computers are inherently deterministic, meaning the same input always produces the same output. What we typically refer to as \"random\" numbers on a computer are actually pseudo-random. These numbers rely on an initial \"seed,\" which can come from external sources like [atmospheric noise](https://www.random.org/randomness/){target=\\_blank}, [heart rates](https://m", - "outline": [ + "depth": 2, + "title": "Header", + "anchor": "header" + }, { "depth": 2, - "title": "Introduction", - "anchor": "introduction" + "title": "Hybrid Consensus", + "anchor": "hybrid-consensus" }, { "depth": 2, - "title": "VRF", - "anchor": "vrf" + "title": "Inherent Transactions", + "anchor": "inherent-transactions" }, { - "depth": 3, - "title": "How VRF Works", - "anchor": "how-vrf-works" + "depth": 2, + "title": "JSON-RPC", + "anchor": "json-rpc" }, { "depth": 2, - "title": "RANDAO", - "anchor": "randao" + "title": "Keystore", + "anchor": "keystore" }, { "depth": 2, - "title": "VDFs", - "anchor": "vdfs" + "title": "Kusama", + "anchor": "kusama" }, { "depth": 2, - "title": "Additional Resources", - "anchor": "additional-resources" - } - ], - "stats": { - "chars": 6503, - "words": 1005, - "headings": 6, - "estimated_token_count_total": 1388 - }, - "hash": "sha256:c7d8a5a4263fd21af458ab0bd102377104affdf2431b4fe74eeff4ebe62a4a81", - "token_estimator": "heuristic-v1" - }, - { - "id": "reference-parachains", - "title": "Parachains Overview", - "slug": "reference-parachains", - "categories": [ - "Basics", - "Parachains" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains.md", - "html_url": "https://docs.polkadot.com/reference/parachains/", - "preview": "A parachain is a specialized blockchain that connects to the Polkadot relay chain, benefiting from shared security, interoperability, and scalability. Parachains are built using the [Polkadot SDK](https://github.com/paritytech/polkadot-sdk){target=\\_blank}, a powerful toolkit written in Rust that provides everything needed to create custom blockchain logic while integrating seamlessly with the Polkadot network.", - "outline": [ + "title": "libp2p", + "anchor": "libp2p" + }, { "depth": 2, - "title": "Introduction", - "anchor": "introduction" + "title": "Light Client", + "anchor": "light-client" }, { "depth": 2, - "title": "Polkadot SDK: Parachain Architecture", - "anchor": "polkadot-sdk-parachain-architecture" + "title": "Metadata", + "anchor": "metadata" }, { - "depth": 3, - "title": "Substrate: The Foundation", - "anchor": "substrate-the-foundation" + "depth": 2, + "title": "Nominated Proof of Stake (NPoS)", + "anchor": "nominated-proof-of-stake-npos" }, { - "depth": 3, - "title": "FRAME: Building Blocks for Your Runtime", - "anchor": "frame-building-blocks-for-your-runtime" + "depth": 2, + "title": "Oracle", + "anchor": "oracle" }, { - "depth": 3, - "title": "Cumulus: Parachain-Specific Functionality", - "anchor": "cumulus-parachain-specific-functionality" + "depth": 2, + "title": "Origin", + "anchor": "origin" }, { "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" - } - ], - "stats": { - "chars": 8495, - "words": 1029, - "headings": 6, - "estimated_token_count_total": 1759 - }, - "hash": "sha256:ecb0d9459e08920db7d2d59dc7c01aba7a91ce8c9e39256bd0c3efa473dbaa17", - "token_estimator": "heuristic-v1" - }, - { - "id": "reference-polkadot-hub-assets-and-smart-contracts", - "title": "Asset Hub", - "slug": "reference-polkadot-hub-assets-and-smart-contracts", - "categories": [ - "Polkadot Protocol" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-polkadot-hub-assets-and-smart-contracts.md", - "html_url": "https://docs.polkadot.com/reference/polkadot-hub/assets-and-smart-contracts/", - "preview": "The Asset Hub is a critical component in the Polkadot ecosystem, enabling the management of fungible and non-fungible assets across the network. Since the relay chain focuses on maintaining security and consensus without direct asset management, Asset Hub provides a streamlined platform for creating, managing, and using on-chain assets in a fee-efficient manner. This guide outlines the core features of Asset Hub, including how it handles asset operations, cross-chain transfers, and asset integra", - "outline": [ + "title": "Pallet", + "anchor": "pallet" + }, { "depth": 2, - "title": "Introduction", - "anchor": "introduction" + "title": "Parachain", + "anchor": "parachain" }, { "depth": 2, - "title": "Assets Basics", - "anchor": "assets-basics" + "title": "Paseo", + "anchor": "paseo" }, { "depth": 2, - "title": "Assets Pallet", - "anchor": "assets-pallet" + "title": "Polkadot", + "anchor": "polkadot" }, { - "depth": 3, - "title": "Key Features", - "anchor": "key-features" + "depth": 2, + "title": "Polkadot Cloud", + "anchor": "polkadot-cloud" }, { - "depth": 3, - "title": "Main Functions", - "anchor": "main-functions" + "depth": 2, + "title": "Polkadot Hub", + "anchor": "polkadot-hub" }, { - "depth": 3, - "title": "Querying Functions", - "anchor": "querying-functions" + "depth": 2, + "title": "PolkaVM", + "anchor": "polkavm" }, { - "depth": 3, - "title": "Permission Models and Roles", - "anchor": "permission-models-and-roles" + "depth": 2, + "title": "Relay Chain", + "anchor": "relay-chain" }, { - "depth": 3, - "title": "Asset Freezing", - "anchor": "asset-freezing" + "depth": 2, + "title": "Rococo", + "anchor": "rococo" }, { - "depth": 3, - "title": "Non-Custodial Transfers (Approval API)", - "anchor": "non-custodial-transfers-approval-api" + "depth": 2, + "title": "Runtime", + "anchor": "runtime" }, { "depth": 2, - "title": "Foreign Assets", - "anchor": "foreign-assets" + "title": "Slot", + "anchor": "slot" }, { - "depth": 3, - "title": "Handling Foreign Assets", - "anchor": "handling-foreign-assets" + "depth": 2, + "title": "Sovereign Account", + "anchor": "sovereign-account" }, { "depth": 2, - "title": "Integration", - "anchor": "integration" + "title": "SS58 Address Format", + "anchor": "ss58-address-format" }, { - "depth": 3, - "title": "API Sidecar", - "anchor": "api-sidecar" + "depth": 2, + "title": "State Transition Function (STF)", + "anchor": "state-transition-function-stf" }, { - "depth": 3, - "title": "TxWrapper", - "anchor": "txwrapper" + "depth": 2, + "title": "Storage Item", + "anchor": "storage-item" }, { - "depth": 3, - "title": "ParaSpell", - "anchor": "paraspell" + "depth": 2, + "title": "Substrate", + "anchor": "substrate" }, { - "depth": 3, - "title": "Parachain Node", - "anchor": "parachain-node" + "depth": 2, + "title": "Transaction", + "anchor": "transaction" }, { "depth": 2, - "title": "XCM Transfer Monitoring", - "anchor": "xcm-transfer-monitoring" + "title": "Transaction Era", + "anchor": "transaction-era" }, { - "depth": 3, - "title": "Monitor XCM Deposits", - "anchor": "monitor-xcm-deposits" + "depth": 2, + "title": "Trie (Patricia Merkle Tree)", + "anchor": "trie-patricia-merkle-tree" }, { - "depth": 3, - "title": "Track XCM Information Back to the Source", - "anchor": "track-xcm-information-back-to-the-source" + "depth": 2, + "title": "Validator", + "anchor": "validator" }, { - "depth": 3, - "title": "Practical Monitoring Examples", - "anchor": "practical-monitoring-examples" + "depth": 2, + "title": "WebAssembly (Wasm)", + "anchor": "webassembly-wasm" }, { - "depth": 3, - "title": "Monitor for Failed XCM Transfers", - "anchor": "monitor-for-failed-xcm-transfers" + "depth": 2, + "title": "Weight", + "anchor": "weight" }, { "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" + "title": "Westend", + "anchor": "westend" } ], "stats": { - "chars": 20065, - "words": 2901, - "headings": 22, - "estimated_token_count_total": 4087 + "chars": 24739, + "words": 3626, + "headings": 63, + "estimated_token_count_total": 5273 }, - "hash": "sha256:73c34bb1dc80d04f765812c3ed2f247aeda6ce55598b0680d0bd157f25456b99", + "hash": "sha256:40bd67811e7eabc79ca5d105eae388b19380d9f035022da17fc0d6bb173c817c", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-polkadot-hub-bridging", - "title": "Bridge Hub", - "slug": "reference-polkadot-hub-bridging", + "id": "reference-governance-origins-tracks", + "title": "Origins and Tracks", + "slug": "reference-governance-origins-tracks", "categories": [ "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-polkadot-hub-bridging.md", - "html_url": "https://docs.polkadot.com/reference/polkadot-hub/bridging/", - "preview": "The Bridge Hub system parachain plays a crucial role in facilitating trustless interactions between Polkadot, Kusama, Ethereum, and other blockchain ecosystems. By implementing on-chain light clients and supporting protocols like BEEFY and GRANDPA, Bridge Hub ensures seamless message transmission and state verification across chains. It also provides essential [pallets](/reference/glossary/#pallet){target=\\_blank} for sending and receiving messages, making it a cornerstone of Polkadot’s interope", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-governance-origins-tracks.md", + "html_url": "https://docs.polkadot.com/reference/governance/origins-tracks/", + "preview": "Polkadot's OpenGov system empowers decentralized decision-making and active community participation by tailoring the governance process to the impact of proposed changes. Through a system of origins and tracks, OpenGov ensures that every referendum receives the appropriate scrutiny, balancing security, inclusivity, and efficiency.", "outline": [ { "depth": 2, @@ -8568,49 +10862,41 @@ }, { "depth": 2, - "title": "Trustless Bridging", - "anchor": "trustless-bridging" - }, - { - "depth": 2, - "title": "Bridging Components", - "anchor": "bridging-components" - }, - { - "depth": 3, - "title": "Ethereum-Specific Support", - "anchor": "ethereum-specific-support" + "title": "Origins", + "anchor": "origins" }, { "depth": 2, - "title": "Deployed Bridges", - "anchor": "deployed-bridges" + "title": "Tracks", + "anchor": "tracks" }, { "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" + "title": "Additional Resources", + "anchor": "additional-resources" } ], "stats": { - "chars": 5467, - "words": 776, - "headings": 6, - "estimated_token_count_total": 1220 + "chars": 3333, + "words": 469, + "headings": 4, + "estimated_token_count_total": 631 }, - "hash": "sha256:86734ba8bcdea7913f488edf666a6104bed0a18649d57abde82c149c41c2b871", + "hash": "sha256:baba9dd41091b792d09005d55d3df0bf65b35f42b40ebe63caf425a0978a22b0", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-polkadot-hub-collectives-and-daos", - "title": "Collectives Chain", - "slug": "reference-polkadot-hub-collectives-and-daos", + "id": "reference-parachains-accounts", + "title": "Polkadot SDK Accounts", + "slug": "reference-parachains-accounts", "categories": [ + "Basics", "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-polkadot-hub-collectives-and-daos.md", - "html_url": "https://docs.polkadot.com/reference/polkadot-hub/collectives-and-daos/", - "preview": "Established through [Referendum 81](https://polkadot-old.polkassembly.io/referendum/81){target=\\_blank}, the Collectives chain operates as a dedicated parachain exclusive to the Polkadot network with no counterpart on Kusama. This specialized infrastructure provides a foundation for various on-chain governance groups essential to Polkadot's ecosystem.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-accounts.md", + "html_url": "https://docs.polkadot.com/reference/parachains/accounts/", + "preview": "Accounts are essential for managing identity, transactions, and governance on the network in the Polkadot SDK. Understanding these components is critical for seamless development and operation on the network, whether you're building or interacting with Polkadot-based chains.", "outline": [ { "depth": 2, @@ -8619,75 +10905,96 @@ }, { "depth": 2, - "title": "Key Collectives", - "anchor": "key-collectives" - } - ], - "stats": { - "chars": 2288, - "words": 293, - "headings": 2, - "estimated_token_count_total": 424 - }, - "hash": "sha256:59ec351fbb8d3a392e90f4f5bf6b62f58b21d6d7a900c5e367e5d2e09ecb3aca", - "token_estimator": "heuristic-v1" - }, - { - "id": "reference-polkadot-hub-consensus-and-security-agile-coretime", - "title": "Agile Coretime", - "slug": "reference-polkadot-hub-consensus-and-security-agile-coretime", - "categories": [ - "Polkadot Protocol" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-polkadot-hub-consensus-and-security-agile-coretime.md", - "html_url": "https://docs.polkadot.com/reference/polkadot-hub/consensus-and-security/agile-coretime/", - "preview": "Agile Coretime is the [scheduling](https://en.wikipedia.org/wiki/Scheduling_(computing)){target=\\_blank} framework on Polkadot that lets parachains efficiently access cores, which comprise an active validator set tasked with parablock validation. As the first blockchain to enable a flexible scheduling system for blockspace production, Polkadot offers unparalleled adaptability for parachains.", - "outline": [ + "title": "Account Data Structure", + "anchor": "account-data-structure" + }, { - "depth": 2, - "title": "Introduction", - "anchor": "introduction" + "depth": 3, + "title": "Account", + "anchor": "account" + }, + { + "depth": 3, + "title": "Account Info", + "anchor": "account-info" + }, + { + "depth": 3, + "title": "Account Reference Counters", + "anchor": "account-reference-counters" }, { "depth": 2, - "title": "Bulk Coretime", - "anchor": "bulk-coretime" + "title": "Account Balance Types", + "anchor": "account-balance-types" }, { "depth": 3, - "title": "Coretime Interlacing", - "anchor": "coretime-interlacing" + "title": "Balance Types", + "anchor": "balance-types" }, { "depth": 3, - "title": "Coretime Splitting", - "anchor": "coretime-splitting" + "title": "Locks", + "anchor": "locks" + }, + { + "depth": 3, + "title": "Balance Types on Polkadot.js", + "anchor": "balance-types-on-polkadotjs" }, { "depth": 2, - "title": "On-Demand Coretime", - "anchor": "on-demand-coretime" + "title": "Address Formats", + "anchor": "address-formats" + }, + { + "depth": 3, + "title": "Basic Format", + "anchor": "basic-format" + }, + { + "depth": 3, + "title": "Address Type", + "anchor": "address-type" + }, + { + "depth": 3, + "title": "Address Length", + "anchor": "address-length" + }, + { + "depth": 3, + "title": "Checksum Types", + "anchor": "checksum-types" + }, + { + "depth": 3, + "title": "Validating Addresses", + "anchor": "validating-addresses" } ], "stats": { - "chars": 3028, - "words": 452, - "headings": 5, - "estimated_token_count_total": 619 + "chars": 29604, + "words": 4194, + "headings": 15, + "estimated_token_count_total": 6507 }, - "hash": "sha256:00be43ac8d666bbe15c5c2fa5a5085697d0bb5a6f341ebbb943a209f0be355df", + "hash": "sha256:0104a9132a69345a2faac37fca0e2853a2ded1efb009511a83a98d44509ab887", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-polkadot-hub-consensus-and-security-pos-consensus", - "title": "Proof of Stake Consensus", - "slug": "reference-polkadot-hub-consensus-and-security-pos-consensus", + "id": "reference-parachains-blocks-transactions-fees-blocks", + "title": "Blocks", + "slug": "reference-parachains-blocks-transactions-fees-blocks", "categories": [ + "Basics", "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-polkadot-hub-consensus-and-security-pos-consensus.md", - "html_url": "https://docs.polkadot.com/reference/polkadot-hub/consensus-and-security/pos-consensus/", - "preview": "Polkadot's Proof of Stake consensus model leverages a unique hybrid approach by design to promote decentralized and secure network operations. In traditional Proof of Stake (PoS) systems, a node's ability to validate transactions is tied to its token holdings, which can lead to centralization risks and limited validator participation. Polkadot addresses these concerns through its [Nominated Proof of Stake (NPoS)](/reference/glossary/#nominated-proof-of-stake-npos){target=\\_blank} model and a com", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-blocks-transactions-fees-blocks.md", + "html_url": "https://docs.polkadot.com/reference/parachains/blocks-transactions-fees/blocks/", + "preview": "In the Polkadot SDK, blocks are fundamental to the functioning of the blockchain, serving as containers for [transactions](/reference/parachains/blocks-transactions-fees/transactions/){target=\\_blank} and changes to the chain's state. Blocks consist of headers and an array of transactions, ensuring the integrity and validity of operations on the network. This guide explores the essential components of a block, the process of block production, and how blocks are validated and imported across the", "outline": [ { "depth": 2, @@ -8696,162 +11003,159 @@ }, { "depth": 2, - "title": "Nominated Proof of Stake", - "anchor": "nominated-proof-of-stake" - }, - { - "depth": 2, - "title": "Hybrid Consensus", - "anchor": "hybrid-consensus" - }, - { - "depth": 2, - "title": "Block Production - BABE", - "anchor": "block-production-babe" - }, - { - "depth": 3, - "title": "Validator Participation", - "anchor": "validator-participation" - }, - { - "depth": 3, - "title": "Additional Resources", - "anchor": "additional-resources" + "title": "What is a Block?", + "anchor": "what-is-a-block" }, { "depth": 2, - "title": "Finality Gadget - GRANDPA", - "anchor": "finality-gadget-grandpa" + "title": "Block Production", + "anchor": "block-production" }, { "depth": 3, - "title": "Probabilistic vs. Provable Finality", - "anchor": "probabilistic-vs-provable-finality" + "title": "Initialize Block", + "anchor": "initialize-block" }, { "depth": 3, - "title": "Additional Resources", - "anchor": "additional-resources-2" + "title": "Finalize Block", + "anchor": "finalize-block" }, { "depth": 2, - "title": "Fork Choice", - "anchor": "fork-choice" + "title": "Block Authoring and Import", + "anchor": "block-authoring-and-import" }, { "depth": 3, - "title": "Additional Resources", - "anchor": "additional-resources-3" + "title": "Block Import Queue", + "anchor": "block-import-queue" }, { "depth": 2, - "title": "Bridging - BEEFY", - "anchor": "bridging-beefy" - }, - { - "depth": 3, "title": "Additional Resources", - "anchor": "additional-resources-4" + "anchor": "additional-resources" } ], "stats": { - "chars": 12753, - "words": 1834, - "headings": 13, - "estimated_token_count_total": 2526 + "chars": 6252, + "words": 910, + "headings": 8, + "estimated_token_count_total": 1395 }, - "hash": "sha256:231fc555eefe5f910fb36e0c03945147d0fb235272850797391751f4444b0a9c", + "hash": "sha256:424783c102bea5dae5b8749635858c6c59055563442a98f57521f0027dafa8d3", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-polkadot-hub-consensus-and-security-relay-chain", - "title": "Overview of the Polkadot Relay Chain", - "slug": "reference-polkadot-hub-consensus-and-security-relay-chain", + "id": "reference-parachains-blocks-transactions-fees-fees", + "title": "Transactions Weights and Fees", + "slug": "reference-parachains-blocks-transactions-fees-fees", "categories": [ "Basics", - "Polkadot Protocol", - "Parachains" + "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-polkadot-hub-consensus-and-security-relay-chain.md", - "html_url": "https://docs.polkadot.com/reference/polkadot-hub/consensus-and-security/relay-chain/", - "preview": "Polkadot is a next-generation blockchain protocol designed to support a multi-chain future by enabling secure communication and interoperability between different blockchains. Built as a Layer-0 protocol, Polkadot introduces innovations like application-specific Layer-1 chains ([parachains](/polkadot-protocol/architecture/parachains/){targe=\\_blank}), shared security through [Nominated Proof of Stake (NPoS)](/reference/glossary/#nominated-proof-of-stake-npos){target=\\_blank}, and cross-chain int", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-blocks-transactions-fees-fees.md", + "html_url": "https://docs.polkadot.com/reference/parachains/blocks-transactions-fees/fees/", + "preview": "When transactions are executed, or data is stored on-chain, the activity changes the chain's state and consumes blockchain resources. Because the resources available to a blockchain are limited, managing how operations on-chain consume them is important. In addition to being limited in practical terms, such as storage capacity, blockchain resources represent a potential attack vector for malicious users. For example, a malicious user might attempt to overload the network with messages to stop th", "outline": [ { "depth": 2, - "title": "Introduction", - "anchor": "introduction" + "title": "Introductions", + "anchor": "introductions" }, { "depth": 2, - "title": "Polkadot 1.0", - "anchor": "polkadot-10" + "title": "How Fees are Calculated", + "anchor": "how-fees-are-calculated" }, { - "depth": 3, - "title": "High-Level Architecture", - "anchor": "high-level-architecture" + "depth": 2, + "title": "Using the Transaction Payment Pallet", + "anchor": "using-the-transaction-payment-pallet" }, { "depth": 3, - "title": "Polkadot's Additional Functionalities", - "anchor": "polkadots-additional-functionalities" + "title": "Understanding the Inclusion Fee", + "anchor": "understanding-the-inclusion-fee" }, { "depth": 3, - "title": "Polkadot's Resilience", - "anchor": "polkadots-resilience" + "title": "Accounts with an Insufficient Balance", + "anchor": "accounts-with-an-insufficient-balance" }, { "depth": 3, - "title": "Polkadot's Blockspace", - "anchor": "polkadots-blockspace" + "title": "Fee Multipliers", + "anchor": "fee-multipliers" }, { "depth": 2, - "title": "DOT Token", - "anchor": "dot-token" + "title": "Transactions with Special Requirements", + "anchor": "transactions-with-special-requirements" + }, + { + "depth": 2, + "title": "Default Weight Annotations", + "anchor": "default-weight-annotations" }, { "depth": 3, - "title": "Redenomination of DOT", - "anchor": "redenomination-of-dot" + "title": "Weights and Database Read/Write Operations", + "anchor": "weights-and-database-readwrite-operations" }, { "depth": 3, - "title": "The Planck Unit", - "anchor": "the-planck-unit" + "title": "Dispatch Classes", + "anchor": "dispatch-classes" }, { "depth": 3, - "title": "Uses for DOT", - "anchor": "uses-for-dot" + "title": "Dynamic Weights", + "anchor": "dynamic-weights" }, { "depth": 2, - "title": "JAM and the Road Ahead", - "anchor": "jam-and-the-road-ahead" + "title": "Post Dispatch Weight Correction", + "anchor": "post-dispatch-weight-correction" + }, + { + "depth": 2, + "title": "Custom Fees", + "anchor": "custom-fees" + }, + { + "depth": 3, + "title": "Custom Weights", + "anchor": "custom-weights" + }, + { + "depth": 2, + "title": "Additional Resources", + "anchor": "additional-resources" } ], "stats": { - "chars": 12430, - "words": 1771, - "headings": 11, - "estimated_token_count_total": 2571 + "chars": 20800, + "words": 2917, + "headings": 15, + "estimated_token_count_total": 4464 }, - "hash": "sha256:8a914e4309d4fe7070e62d7abe4665b6c76c8dc5ec3219332eccb16b77b0dd95", + "hash": "sha256:7d0c3fa7982b3e1843adb8f27422456397580b3a3eba5047b381da8517742536", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-polkadot-hub-people-and-identity", - "title": "People Chain", - "slug": "reference-polkadot-hub-people-and-identity", + "id": "reference-parachains-blocks-transactions-fees-transactions", + "title": "Transactions", + "slug": "reference-parachains-blocks-transactions-fees-transactions", "categories": [ + "Basics", "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-polkadot-hub-people-and-identity.md", - "html_url": "https://docs.polkadot.com/reference/polkadot-hub/people-and-identity/", - "preview": "People chain is a specialized parachain within the Polkadot ecosystem dedicated to secure, decentralized identity management.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-blocks-transactions-fees-transactions.md", + "html_url": "https://docs.polkadot.com/reference/parachains/blocks-transactions-fees/transactions/", + "preview": "Transactions are essential components of blockchain networks, enabling state changes and the execution of key operations. In the Polkadot SDK, transactions, often called extrinsics, come in multiple forms, including signed, unsigned, and inherent transactions.", "outline": [ { "depth": 2, @@ -8860,167 +11164,131 @@ }, { "depth": 2, - "title": "Identity Management System", - "anchor": "identity-management-system" + "title": "What Is a Transaction?", + "anchor": "what-is-a-transaction" }, { "depth": 3, - "title": "Sub-Identities", - "anchor": "sub-identities" + "title": "Signed Transactions", + "anchor": "signed-transactions" }, { - "depth": 2, - "title": "Verification Process", - "anchor": "verification-process" + "depth": 3, + "title": "Unsigned Transactions", + "anchor": "unsigned-transactions" }, { "depth": 3, - "title": "Judgment Requests", - "anchor": "judgment-requests" + "title": "Inherent Transactions", + "anchor": "inherent-transactions" }, { - "depth": 3, - "title": "Judgment Classifications", - "anchor": "judgment-classifications" + "depth": 2, + "title": "Transaction Formats", + "anchor": "transaction-formats" }, { "depth": 3, - "title": "Registrars", - "anchor": "registrars" + "title": "Types of Transaction Formats", + "anchor": "types-of-transaction-formats" }, { - "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" - } - ], - "stats": { - "chars": 4750, - "words": 606, - "headings": 8, - "estimated_token_count_total": 876 - }, - "hash": "sha256:8239d1e8d8642cb7c10e9e5f971c99b999e9e4a87373b50bf4a691225c1e4702", - "token_estimator": "heuristic-v1" - }, - { - "id": "reference-polkadot-hub", - "title": "reference-polkadot-hub", - "slug": "reference-polkadot-hub", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-polkadot-hub.md", - "html_url": "https://docs.polkadot.com/reference/polkadot-hub/", - "preview": "TODO", - "outline": [], - "stats": { - "chars": 5, - "words": 1, - "headings": 0, - "estimated_token_count_total": 0 - }, - "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", - "token_estimator": "heuristic-v1" - }, - { - "id": "reference-tools-chopsticks", - "title": "reference-tools-chopsticks", - "slug": "reference-tools-chopsticks", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-chopsticks.md", - "html_url": "https://docs.polkadot.com/reference/tools/chopsticks/", - "preview": "TODO", - "outline": [], - "stats": { - "chars": 5, - "words": 1, - "headings": 0, - "estimated_token_count_total": 0 - }, - "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", - "token_estimator": "heuristic-v1" - }, - { - "id": "reference-tools-dedot", - "title": "Dedot", - "slug": "reference-tools-dedot", - "categories": [ - "Tooling", - "Dapps" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-dedot.md", - "html_url": "https://docs.polkadot.com/reference/tools/dedot/", - "preview": "[Dedot](https://github.com/dedotdev/dedot){target=\\_blank} is a next-generation JavaScript client for Polkadot and Polkadot SDK-based blockchains. Designed to elevate the dApp development experience, Dedot is built and optimized to be lightweight and tree-shakable, offering precise types and APIs suggestions for individual Polkadot SDK-based blockchains and [ink! smart contracts](https://use.ink/){target=\\_blank}.", - "outline": [ - { - "depth": 2, - "title": "Introduction", - "anchor": "introduction" + "depth": 3, + "title": "Signed Transaction Data Structure", + "anchor": "signed-transaction-data-structure" }, { "depth": 3, - "title": "Key Features", - "anchor": "key-features" + "title": "Signed Extensions", + "anchor": "signed-extensions" }, { "depth": 2, - "title": "Installation", - "anchor": "installation" + "title": "Transaction Construction", + "anchor": "transaction-construction" + }, + { + "depth": 3, + "title": "Construct a Signed Transaction", + "anchor": "construct-a-signed-transaction" + }, + { + "depth": 3, + "title": "Transaction Encoding", + "anchor": "transaction-encoding" + }, + { + "depth": 3, + "title": "Customize Transaction Construction", + "anchor": "customize-transaction-construction" }, { "depth": 2, - "title": "Get Started", - "anchor": "get-started" + "title": "Lifecycle of a Transaction", + "anchor": "lifecycle-of-a-transaction" }, { "depth": 3, - "title": "Initialize a Client Instance", - "anchor": "initialize-a-client-instance" + "title": "Define Transaction Properties", + "anchor": "define-transaction-properties" }, { "depth": 3, - "title": "Enable Type and API Suggestions", - "anchor": "enable-type-and-api-suggestions" + "title": "Process on a Block Authoring Node", + "anchor": "process-on-a-block-authoring-node" }, { "depth": 3, - "title": "Read On-Chain Data", - "anchor": "read-on-chain-data" + "title": "Validate and Queue", + "anchor": "validate-and-queue" }, { "depth": 3, - "title": "Sign and Send Transactions", - "anchor": "sign-and-send-transactions" + "title": "Transaction Ordering and Priority", + "anchor": "transaction-ordering-and-priority" + }, + { + "depth": 3, + "title": "Transaction Execution", + "anchor": "transaction-execution" }, { "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" + "title": "Transaction Mortality", + "anchor": "transaction-mortality" + }, + { + "depth": 2, + "title": "Unique Identifiers for Extrinsics", + "anchor": "unique-identifiers-for-extrinsics" + }, + { + "depth": 2, + "title": "Additional Resources", + "anchor": "additional-resources" } ], "stats": { - "chars": 8855, - "words": 1100, - "headings": 9, - "estimated_token_count_total": 2300 + "chars": 23610, + "words": 3333, + "headings": 22, + "estimated_token_count_total": 4708 }, - "hash": "sha256:ba24e31e2ad94fbf1d73f1878da92dd2e1476db00170780bbdf0e65ab18bc961", + "hash": "sha256:547f062b248779f0b3e823778120c4f32e449937b6f270ddf97378bc6d795c62", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-tools-light-clients", - "title": "Light Clients", - "slug": "reference-tools-light-clients", + "id": "reference-parachains-chain-data", + "title": "Chain Data", + "slug": "reference-parachains-chain-data", "categories": [ - "Parachains", - "Tooling" + "Basics", + "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-light-clients.md", - "html_url": "https://docs.polkadot.com/reference/tools/light-clients/", - "preview": "Light clients enable secure and efficient blockchain interaction without running a full node. They provide a trust-minimized alternative to JSON-RPC by verifying data through cryptographic proofs rather than blindly trusting remote nodes.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-chain-data.md", + "html_url": "https://docs.polkadot.com/reference/parachains/chain-data/", + "preview": "Understanding and leveraging on-chain data is a fundamental aspect of blockchain development. Whether you're building frontend applications or backend systems, accessing and decoding runtime metadata is vital to interacting with the blockchain. This guide introduces you to the tools and processes for generating and retrieving metadata, explains its role in application development, and outlines the additional APIs available for interacting with a Polkadot node. By mastering these components, you", "outline": [ { "depth": 2, @@ -9029,55 +11297,116 @@ }, { "depth": 2, - "title": "Light Clients Workflow", - "anchor": "light-clients-workflow" + "title": "Application Development", + "anchor": "application-development" }, { "depth": 2, - "title": "JSON-RPC and Light Client Comparison", - "anchor": "json-rpc-and-light-client-comparison" + "title": "Understand Metadata", + "anchor": "understand-metadata" }, { "depth": 2, - "title": "Using Light Clients", - "anchor": "using-light-clients" + "title": "Expose Runtime Information as Metadata", + "anchor": "expose-runtime-information-as-metadata" + }, + { + "depth": 2, + "title": "Generate Metadata", + "anchor": "generate-metadata" + }, + { + "depth": 2, + "title": "Retrieve Runtime Metadata", + "anchor": "retrieve-runtime-metadata" }, { "depth": 3, - "title": "PAPI Light Client Support", - "anchor": "papi-light-client-support" + "title": "Use Polkadot.js", + "anchor": "use-polkadotjs" }, { "depth": 3, - "title": "Substrate Connect - Browser Extension", - "anchor": "substrate-connect-browser-extension" + "title": "Use Curl", + "anchor": "use-curl" + }, + { + "depth": 3, + "title": "Use Subxt", + "anchor": "use-subxt" }, { "depth": 2, - "title": "Resources", - "anchor": "resources" + "title": "Client Applications and Metadata", + "anchor": "client-applications-and-metadata" + }, + { + "depth": 2, + "title": "Metadata Format", + "anchor": "metadata-format" + }, + { + "depth": 3, + "title": "Pallets", + "anchor": "pallets" + }, + { + "depth": 3, + "title": "Extrinsic", + "anchor": "extrinsic" + }, + { + "depth": 2, + "title": "Included RPC APIs", + "anchor": "included-rpc-apis" + }, + { + "depth": 2, + "title": "Additional Resources", + "anchor": "additional-resources" } ], "stats": { - "chars": 6490, - "words": 870, - "headings": 7, - "estimated_token_count_total": 1430 + "chars": 18650, + "words": 2216, + "headings": 15, + "estimated_token_count_total": 3774 }, - "hash": "sha256:1284c42be692167e01bcc44e2e134ec20615402675fac26df246c00aa1588d80", + "hash": "sha256:49238d1e9e2c33e0fcd3a84b5e30f0d3840d7d23a783b538875e0a23f38efc1d", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-tools-moonwall", - "title": "E2E Testing with Moonwall", - "slug": "reference-tools-moonwall", + "id": "reference-parachains-consensus-async-backing", + "title": "reference-parachains-consensus-async-backing", + "slug": "reference-parachains-consensus-async-backing", "categories": [ - "Parachains", - "Tooling" + "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-moonwall.md", - "html_url": "https://docs.polkadot.com/reference/tools/moonwall/", - "preview": "Moonwall is an end-to-end testing framework designed explicitly for Polkadot SDK-based blockchain networks. It addresses one of the most significant challenges in blockchain development: managing complex test environments and network configurations.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-consensus-async-backing.md", + "html_url": "https://docs.polkadot.com/reference/parachains/consensus/async-backing/", + "preview": "TODO", + "outline": [], + "stats": { + "chars": 5, + "words": 1, + "headings": 0, + "estimated_token_count_total": 0 + }, + "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:15+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "reference-parachains-consensus-elastic-scaling", + "title": "Elastic Scaling", + "slug": "reference-parachains-consensus-elastic-scaling", + "categories": [ + "Polkadot Protocol" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-consensus-elastic-scaling.md", + "html_url": "https://docs.polkadot.com/reference/parachains/consensus/elastic-scaling/", + "preview": "Polkadot's architecture delivers scalability and security through its shared security model, where the relay chain coordinates and validates multiple parallel chains.", "outline": [ { "depth": 2, @@ -9086,65 +11415,61 @@ }, { "depth": 2, - "title": "Prerequisites", - "anchor": "prerequisites" + "title": "How Elastic Scaling Works", + "anchor": "how-elastic-scaling-works" }, { "depth": 2, - "title": "Install Moonwall", - "anchor": "install-moonwall" + "title": "Benefits of Elastic Scaling", + "anchor": "benefits-of-elastic-scaling" }, { - "depth": 3, - "title": "Global Installation", - "anchor": "global-installation" + "depth": 2, + "title": "Use Cases", + "anchor": "use-cases" }, { "depth": 3, - "title": "Local Installation", - "anchor": "local-installation" - }, - { - "depth": 2, - "title": "Initialize Moonwall", - "anchor": "initialize-moonwall" + "title": "Handling Sudden Traffic Spikes", + "anchor": "handling-sudden-traffic-spikes" }, { - "depth": 2, - "title": "Writing Tests", - "anchor": "writing-tests" + "depth": 3, + "title": "Supporting Early-Stage Growth", + "anchor": "supporting-early-stage-growth" }, { - "depth": 2, - "title": "Running the Tests", - "anchor": "running-the-tests" + "depth": 3, + "title": "Scaling Massive IoT Networks", + "anchor": "scaling-massive-iot-networks" }, { - "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" + "depth": 3, + "title": "Powering Real-Time, Low-Latency Systems", + "anchor": "powering-real-time-low-latency-systems" } ], "stats": { - "chars": 10240, - "words": 1295, - "headings": 9, - "estimated_token_count_total": 2453 + "chars": 7871, + "words": 1047, + "headings": 8, + "estimated_token_count_total": 1440 }, - "hash": "sha256:2c77cfb38bb2e466a8f56dabbb706fcd2e90cf1634fc9beb7f0ee95a75735653", + "hash": "sha256:2d228c52844df8952520fafdd3e6f0e26bfd2f32b5ee60c6241cf7d38603643c", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-tools-omninode", - "title": "Polkadot Omni Node", - "slug": "reference-tools-omninode", + "id": "reference-parachains-cryptography", + "title": "Cryptography", + "slug": "reference-parachains-cryptography", "categories": [ - "Parachains", - "Tooling" + "Basics", + "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-omninode.md", - "html_url": "https://docs.polkadot.com/reference/tools/omninode/", - "preview": "The [`polkadot-omni-node`](https://crates.io/crates/polkadot-omni-node/0.7.0){target=\\_blank} crate is a versatile, pre-built binary designed to simplify running parachains in the Polkadot ecosystem. Unlike traditional node binaries that are tightly coupled to specific runtime code, the `polkadot-omni-node` operates using an external [chain specification](/polkadot-protocol/glossary#chain-specification){target=\\_blank} file, allowing it to adapt dynamically to different parachains.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-cryptography.md", + "html_url": "https://docs.polkadot.com/reference/parachains/cryptography/", + "preview": "Cryptography forms the backbone of blockchain technology, providing the mathematical verifiability crucial for consensus systems, data integrity, and user security. While a deep understanding of the underlying mathematical processes isn't necessary for most blockchain developers, grasping the fundamental applications of cryptography is essential. This page comprehensively overviews cryptographic implementations used across Polkadot SDK-based chains and the broader blockchain ecosystem.", "outline": [ { "depth": 2, @@ -9153,65 +11478,81 @@ }, { "depth": 2, - "title": "Prerequisites", - "anchor": "prerequisites" + "title": "Hash Functions", + "anchor": "hash-functions" }, { - "depth": 2, - "title": "Install Polkadot Omni Node", - "anchor": "install-polkadot-omni-node" + "depth": 3, + "title": "Key Properties of Hash Functions", + "anchor": "key-properties-of-hash-functions" }, { - "depth": 2, - "title": "Obtain Chain Specifications", - "anchor": "obtain-chain-specifications" + "depth": 3, + "title": "Blake2", + "anchor": "blake2" }, { "depth": 2, - "title": "Run a Parachain Full Node", - "anchor": "run-a-parachain-full-node" + "title": "Types of Cryptography", + "anchor": "types-of-cryptography" }, { - "depth": 2, - "title": "Interact with the Node", - "anchor": "interact-with-the-node" + "depth": 3, + "title": "Symmetric Cryptography", + "anchor": "symmetric-cryptography" + }, + { + "depth": 3, + "title": "Asymmetric Cryptography", + "anchor": "asymmetric-cryptography" + }, + { + "depth": 3, + "title": "Trade-offs and Compromises", + "anchor": "trade-offs-and-compromises" }, { "depth": 2, - "title": "Parachain Compatibility", - "anchor": "parachain-compatibility" + "title": "Digital Signatures", + "anchor": "digital-signatures" }, { "depth": 3, - "title": "Required Runtime APIs", - "anchor": "required-runtime-apis" + "title": "Example of Creating a Digital Signature", + "anchor": "example-of-creating-a-digital-signature" + }, + { + "depth": 2, + "title": "Elliptic Curve", + "anchor": "elliptic-curve" }, { "depth": 3, - "title": "Required Pallets", - "anchor": "required-pallets" + "title": "Various Implementations", + "anchor": "various-implementations" } ], "stats": { - "chars": 8916, - "words": 1165, - "headings": 9, - "estimated_token_count_total": 2018 + "chars": 8860, + "words": 1293, + "headings": 12, + "estimated_token_count_total": 1797 }, - "hash": "sha256:a87815deff81936d7f50842f8600004990076c1a33e7e6b408ab954b6ce47259", + "hash": "sha256:259dcef86aadc513675258b665cc3940db65af6eb32a5db85da6ac339966fa60", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-tools-papi", - "title": "Polkadot-API", - "slug": "reference-tools-papi", + "id": "reference-parachains-data-encoding", + "title": "Data Encoding", + "slug": "reference-parachains-data-encoding", "categories": [ - "Tooling", - "Dapps" + "Basics", + "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-papi.md", - "html_url": "https://docs.polkadot.com/reference/tools/papi/", - "preview": "[Polkadot-API](https://github.com/polkadot-api/polkadot-api){target=\\_blank} (PAPI) is a set of libraries built to be modular, composable, and grounded in a “light-client first” approach. Its primary aim is to equip dApp developers with an extensive toolkit for building fully decentralized applications.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-data-encoding.md", + "html_url": "https://docs.polkadot.com/reference/parachains/data-encoding/", + "preview": "The Polkadot SDK uses a lightweight and efficient encoding/decoding mechanism to optimize data transmission across the network. This mechanism, known as the _SCALE_ codec, is used for serializing and deserializing data.", "outline": [ { "depth": 2, @@ -9220,153 +11561,130 @@ }, { "depth": 2, - "title": "Get Started", - "anchor": "get-started" + "title": "SCALE Codec", + "anchor": "scale-codec" }, { "depth": 3, - "title": "API Instantiation", - "anchor": "api-instantiation" + "title": "Encode", + "anchor": "encode" }, { "depth": 3, - "title": "Reading Chain Data", - "anchor": "reading-chain-data" + "title": "Decode", + "anchor": "decode" }, { "depth": 3, - "title": "Sending Transactions", - "anchor": "sending-transactions" + "title": "CompactAs", + "anchor": "compactas" }, { - "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" - } - ], - "stats": { - "chars": 8957, - "words": 1156, - "headings": 6, - "estimated_token_count_total": 1987 - }, - "hash": "sha256:2ca93b09d3bb9159bbf53816886a9b242bb3c13b996c51fd52962e049e2d5477", - "token_estimator": "heuristic-v1" - }, - { - "id": "reference-tools-paraspell", - "title": "ParaSpell XCM SDK", - "slug": "reference-tools-paraspell", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-paraspell.md", - "html_url": "https://docs.polkadot.com/reference/tools/paraspell/", - "preview": "[ParaSpell](https://paraspell.github.io/docs/){target=\\_blank} is a comprehensive suite of open-source tools designed to simplify cross-chain interactions within the Polkadot ecosystem. At its core, ParaSpell is dedicated to enhancing the functionality of the [XCM (Cross-Consensus Messaging)](/parachains/interoperability/get-started/){target=\\_blank} protocol by providing developers with a unified and streamlined experience for building interoperable decentralized applications (dApps).", - "outline": [ + "depth": 3, + "title": "HasCompact", + "anchor": "hascompact" + }, { - "depth": 2, - "title": "Introduction", - "anchor": "introduction" + "depth": 3, + "title": "EncodeLike", + "anchor": "encodelike" }, { "depth": 3, - "title": "ParaSpell XCM SDK", - "anchor": "paraspell-xcm-sdk" + "title": "Data Types", + "anchor": "data-types" + }, + { + "depth": 2, + "title": "Encode and Decode Rust Trait Implementations", + "anchor": "encode-and-decode-rust-trait-implementations" + }, + { + "depth": 2, + "title": "SCALE Codec Libraries", + "anchor": "scale-codec-libraries" } ], "stats": { - "chars": 3005, - "words": 433, - "headings": 2, - "estimated_token_count_total": 669 + "chars": 13629, + "words": 1314, + "headings": 10, + "estimated_token_count_total": 3213 }, - "hash": "sha256:a7f9c4a03153ee637a0557d2cea0b622c849667ce793b1294bb3299cf036197d", + "hash": "sha256:e448294b6e52291ac0add5fa6533572814e6cd27af42bdaccc2000b86f52d775", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-tools-polkadart", - "title": "Polkadart", - "slug": "reference-tools-polkadart", + "id": "reference-parachains-interoperability", + "title": "Interoperability", + "slug": "reference-parachains-interoperability", "categories": [ - "Tooling", - "Dapps" + "Basics", + "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-polkadart.md", - "html_url": "https://docs.polkadot.com/reference/tools/polkadart/", - "preview": "Polkadart is the most comprehensive Dart/Flutter SDK for interacting with Polkadot, Substrate, and other compatible blockchain networks. Designed with a Dart-first approach and type-safe APIs, it provides everything developers need to build powerful decentralized applications.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-interoperability.md", + "html_url": "https://docs.polkadot.com/reference/parachains/interoperability/", + "preview": "Interoperability lies at the heart of the Polkadot ecosystem, enabling communication and collaboration across a diverse range of blockchains. By bridging the gaps between parachains, relay chains, and even external networks, Polkadot unlocks the potential for truly decentralized applications, efficient resource sharing, and scalable solutions.", "outline": [ { "depth": 2, - "title": "Installation", - "anchor": "installation" + "title": "Introduction", + "anchor": "introduction" }, { "depth": 2, - "title": "Get Started", - "anchor": "get-started" - }, - { - "depth": 3, - "title": "Type Generation", - "anchor": "type-generation" - }, - { - "depth": 3, - "title": "Run Generator", - "anchor": "run-generator" - }, - { - "depth": 3, - "title": "Use Generated Types", - "anchor": "use-generated-types" + "title": "Why Interoperability Matters", + "anchor": "why-interoperability-matters" }, { - "depth": 3, - "title": "Creating an API Instance", - "anchor": "creating-an-api-instance" + "depth": 2, + "title": "Key Mechanisms for Interoperability", + "anchor": "key-mechanisms-for-interoperability" }, { "depth": 3, - "title": "Reading Chain Data", - "anchor": "reading-chain-data" + "title": "Cross-Consensus Messaging (XCM): The Backbone of Communication", + "anchor": "cross-consensus-messaging-xcm-the-backbone-of-communication" }, { "depth": 3, - "title": "Subscribe to New Blocks", - "anchor": "subscribe-to-new-blocks" + "title": "Bridges: Connecting External Networks", + "anchor": "bridges-connecting-external-networks" }, { - "depth": 3, - "title": "Send a Transaction", - "anchor": "send-a-transaction" + "depth": 2, + "title": "The Polkadot Advantage", + "anchor": "the-polkadot-advantage" }, { "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" + "title": "Looking Ahead", + "anchor": "looking-ahead" } ], "stats": { - "chars": 5178, - "words": 624, - "headings": 10, - "estimated_token_count_total": 1084 + "chars": 4635, + "words": 584, + "headings": 7, + "estimated_token_count_total": 772 }, - "hash": "sha256:7f533abe61586af8438e350c41b741d74a8edb839f9dc4139bc4619ba3748258", + "hash": "sha256:11bb4f113bdda5852a3115e64d5ba47f8eccd4e3619a05ad960ab3a541f31346", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-tools-polkadot-js-api", - "title": "Polkadot.js API", - "slug": "reference-tools-polkadot-js-api", + "id": "reference-parachains-networks", + "title": "Networks", + "slug": "reference-parachains-networks", "categories": [ - "Tooling", - "Dapps" + "Basics", + "Polkadot Protocol", + "Networks" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-polkadot-js-api.md", - "html_url": "https://docs.polkadot.com/reference/tools/polkadot-js-api/", - "preview": "!!! warning \"Maintenance Mode Only\" The Polkadot.js API is now in maintenance mode and is no longer actively developed. New projects should use [Dedot](/develop/toolkit/api-libraries/dedot){target=\\_blank} (TypeScript-first API) or [Polkadot API](/develop/toolkit/api-libraries/papi){target=\\_blank} (modern, type-safe API) as actively maintained alternatives.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-networks.md", + "html_url": "https://docs.polkadot.com/reference/parachains/networks/", + "preview": "The Polkadot ecosystem is built on a robust set of networks designed to enable secure and scalable development. Whether you are testing new features or deploying to live production, Polkadot offers several layers of networks tailored for each stage of the development process. From local environments to experimental networks like Kusama and community-run TestNets such as Paseo, developers can thoroughly test, iterate, and validate their applications. This guide will introduce you to Polkadot's va", "outline": [ { "depth": 2, @@ -9374,66 +11692,72 @@ "anchor": "introduction" }, { - "depth": 3, - "title": "Dynamic API Generation", - "anchor": "dynamic-api-generation" + "depth": 2, + "title": "Network Overview", + "anchor": "network-overview" }, { - "depth": 3, - "title": "Available API Categories", - "anchor": "available-api-categories" + "depth": 2, + "title": "Polkadot Development Networks", + "anchor": "polkadot-development-networks" }, { "depth": 2, - "title": "Installation", - "anchor": "installation" + "title": "Kusama Network", + "anchor": "kusama-network" }, { "depth": 2, - "title": "Get Started", - "anchor": "get-started" + "title": "Test Networks", + "anchor": "test-networks" }, { "depth": 3, - "title": "Creating an API Instance", - "anchor": "creating-an-api-instance" + "title": "Westend", + "anchor": "westend" }, { "depth": 3, - "title": "Reading Chain Data", - "anchor": "reading-chain-data" + "title": "Paseo", + "anchor": "paseo" + }, + { + "depth": 2, + "title": "Local Test Networks", + "anchor": "local-test-networks" }, { "depth": 3, - "title": "Sending Transactions", - "anchor": "sending-transactions" + "title": "Zombienet", + "anchor": "zombienet" }, { - "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" + "depth": 3, + "title": "Chopsticks", + "anchor": "chopsticks" } ], "stats": { - "chars": 5042, - "words": 684, - "headings": 9, - "estimated_token_count_total": 1166 + "chars": 7834, + "words": 1111, + "headings": 10, + "estimated_token_count_total": 1473 }, - "hash": "sha256:ed3986f30880fefca5975fcdc847c68b4aca65862c63e3002b25391b0521781d", + "hash": "sha256:e49e063a2cc0fb5a48c6cdc3de266bb6e025a006940fea8e90cc4d5f9884900f", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-tools-py-substrate-interface", - "title": "Python Substrate Interface", - "slug": "reference-tools-py-substrate-interface", + "id": "reference-parachains-node-and-runtime", + "title": "Node and Runtime", + "slug": "reference-parachains-node-and-runtime", "categories": [ - "Tooling", - "Dapps" + "Basics", + "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-py-substrate-interface.md", - "html_url": "https://docs.polkadot.com/reference/tools/py-substrate-interface/", - "preview": "The [Python Substrate Interface](https://github.com/polkascan/py-substrate-interface){target=\\_blank} is a powerful library that enables interaction with Polkadot SDK-based chains. It provides essential functionality for:", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-node-and-runtime.md", + "html_url": "https://docs.polkadot.com/reference/parachains/node-and-runtime/", + "preview": "Every blockchain platform relies on a decentralized network of computers, called nodes, that communicate with each other about transactions and blocks. In this context, a node refers to the software running on the connected devices rather than the physical or virtual machines in the network.", "outline": [ { "depth": 2, @@ -9442,55 +11766,71 @@ }, { "depth": 2, - "title": "Installation", - "anchor": "installation" + "title": "Architectural Principles", + "anchor": "architectural-principles" + }, + { + "depth": 3, + "title": "Advantages of this Architecture", + "anchor": "advantages-of-this-architecture" }, { "depth": 2, - "title": "Get Started", - "anchor": "get-started" + "title": "Node (Client)", + "anchor": "node-client" }, { - "depth": 3, - "title": "Establishing Connection", - "anchor": "establishing-connection" + "depth": 2, + "title": "Runtime", + "anchor": "runtime" }, { "depth": 3, - "title": "Reading Chain State", - "anchor": "reading-chain-state" + "title": "Characteristics", + "anchor": "characteristics" }, { "depth": 3, - "title": "Submitting Transactions", - "anchor": "submitting-transactions" + "title": "Key Functions", + "anchor": "key-functions" }, { "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" + "title": "Communication Between Node and Runtime", + "anchor": "communication-between-node-and-runtime" + }, + { + "depth": 3, + "title": "Runtime APIs", + "anchor": "runtime-apis" + }, + { + "depth": 3, + "title": "Host Functions", + "anchor": "host-functions" } ], "stats": { - "chars": 4302, - "words": 541, - "headings": 7, - "estimated_token_count_total": 942 + "chars": 4937, + "words": 628, + "headings": 10, + "estimated_token_count_total": 914 }, - "hash": "sha256:8987fc35cd28602054ee018031f773e2e3837425107c51d0e2ac68a94b86e9c0", + "hash": "sha256:8122e21c149d0863cfe3b37fc5606bcdb91668e9d265f0f05451a61ff70e4e93", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-tools-sidecar", - "title": "Sidecar REST API", - "slug": "reference-tools-sidecar", + "id": "reference-parachains-randomness", + "title": "Randomness", + "slug": "reference-parachains-randomness", "categories": [ - "Tooling", - "Dapps" + "Basics", + "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-sidecar.md", - "html_url": "https://docs.polkadot.com/reference/tools/sidecar/", - "preview": "The [Sidecar REST API](https://github.com/paritytech/substrate-api-sidecar){target=\\_blank} is a service that provides a REST interface for interacting with Polkadot SDK-based blockchains. With this API, developers can easily access a broad range of endpoints for nodes, accounts, transactions, parachains, and more.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-parachains-randomness.md", + "html_url": "https://docs.polkadot.com/reference/parachains/randomness/", + "preview": "Randomness is crucial in Proof of Stake (PoS) blockchains to ensure a fair and unpredictable distribution of validator duties. However, computers are inherently deterministic, meaning the same input always produces the same output. What we typically refer to as \"random\" numbers on a computer are actually pseudo-random. These numbers rely on an initial \"seed,\" which can come from external sources like [atmospheric noise](https://www.random.org/randomness/){target=\\_blank}, [heart rates](https://m", "outline": [ { "depth": 2, @@ -9499,50 +11839,50 @@ }, { "depth": 2, - "title": "Prerequisites", - "anchor": "prerequisites" + "title": "VRF", + "anchor": "vrf" }, { - "depth": 2, - "title": "Installation", - "anchor": "installation" + "depth": 3, + "title": "How VRF Works", + "anchor": "how-vrf-works" }, { "depth": 2, - "title": "Usage", - "anchor": "usage" + "title": "RANDAO", + "anchor": "randao" }, { - "depth": 3, - "title": "Endpoints", - "anchor": "endpoints" + "depth": 2, + "title": "VDFs", + "anchor": "vdfs" }, { "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" + "title": "Additional Resources", + "anchor": "additional-resources" } ], "stats": { - "chars": 7309, - "words": 1033, + "chars": 6503, + "words": 1005, "headings": 6, - "estimated_token_count_total": 1945 + "estimated_token_count_total": 1388 }, - "hash": "sha256:0795462182cb97256bb5c2acb035855fe0d6557185de8ac99482725ecb4f94c1", + "hash": "sha256:c7d8a5a4263fd21af458ab0bd102377104affdf2431b4fe74eeff4ebe62a4a81", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-tools-subxt", - "title": "Subxt Rust API", - "slug": "reference-tools-subxt", + "id": "reference-polkadot-hub-assets-and-smart-contracts", + "title": "Asset Hub", + "slug": "reference-polkadot-hub-assets-and-smart-contracts", "categories": [ - "Tooling", - "Dapps" + "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-subxt.md", - "html_url": "https://docs.polkadot.com/reference/tools/subxt/", - "preview": "Subxt is a Rust library designed to interact with Polkadot SDK-based blockchains. It provides a type-safe interface for submitting transactions, querying on-chain state, and performing other blockchain interactions. By leveraging Rust's strong type system, subxt ensures that your code is validated at compile time, reducing runtime errors and improving reliability.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-polkadot-hub-assets-and-smart-contracts.md", + "html_url": "https://docs.polkadot.com/reference/polkadot-hub/assets-and-smart-contracts/", + "preview": "The Asset Hub is a critical component in the Polkadot ecosystem, enabling the management of fungible and non-fungible assets across the network. Since the relay chain focuses on maintaining security and consensus without direct asset management, Asset Hub provides a streamlined platform for creating, managing, and using on-chain assets in a fee-efficient manner. This guide outlines the core features of Asset Hub, including how it handles asset operations, cross-chain transfers, and asset integra", "outline": [ { "depth": 2, @@ -9551,43 +11891,103 @@ }, { "depth": 2, - "title": "Prerequisites", - "anchor": "prerequisites" + "title": "Assets Basics", + "anchor": "assets-basics" }, { "depth": 2, - "title": "Installation", - "anchor": "installation" + "title": "Assets Pallet", + "anchor": "assets-pallet" + }, + { + "depth": 3, + "title": "Key Features", + "anchor": "key-features" + }, + { + "depth": 3, + "title": "Main Functions", + "anchor": "main-functions" + }, + { + "depth": 3, + "title": "Querying Functions", + "anchor": "querying-functions" + }, + { + "depth": 3, + "title": "Permission Models and Roles", + "anchor": "permission-models-and-roles" + }, + { + "depth": 3, + "title": "Asset Freezing", + "anchor": "asset-freezing" + }, + { + "depth": 3, + "title": "Non-Custodial Transfers (Approval API)", + "anchor": "non-custodial-transfers-approval-api" }, { "depth": 2, - "title": "Get Started", - "anchor": "get-started" + "title": "Foreign Assets", + "anchor": "foreign-assets" + }, + { + "depth": 3, + "title": "Handling Foreign Assets", + "anchor": "handling-foreign-assets" + }, + { + "depth": 2, + "title": "Integration", + "anchor": "integration" + }, + { + "depth": 3, + "title": "API Sidecar", + "anchor": "api-sidecar" + }, + { + "depth": 3, + "title": "TxWrapper", + "anchor": "txwrapper" + }, + { + "depth": 3, + "title": "ParaSpell", + "anchor": "paraspell" + }, + { + "depth": 3, + "title": "Parachain Node", + "anchor": "parachain-node" }, { - "depth": 3, - "title": "Download Chain Metadata", - "anchor": "download-chain-metadata" + "depth": 2, + "title": "XCM Transfer Monitoring", + "anchor": "xcm-transfer-monitoring" }, { "depth": 3, - "title": "Generate Type-Safe Interfaces", - "anchor": "generate-type-safe-interfaces" + "title": "Monitor XCM Deposits", + "anchor": "monitor-xcm-deposits" }, { "depth": 3, - "title": "Initialize the Subxt Client", - "anchor": "initialize-the-subxt-client" + "title": "Track XCM Information Back to the Source", + "anchor": "track-xcm-information-back-to-the-source" }, { "depth": 3, - "title": "Read Chain Data", - "anchor": "read-chain-data" + "title": "Practical Monitoring Examples", + "anchor": "practical-monitoring-examples" }, { "depth": 3, - "title": "Submit Transactions", - "anchor": "submit-transactions" + "title": "Monitor for Failed XCM Transfers", + "anchor": "monitor-for-failed-xcm-transfers" }, { "depth": 2, @@ -9596,26 +11996,25 @@ } ], "stats": { - "chars": 9174, - "words": 1175, - "headings": 10, - "estimated_token_count_total": 2187 + "chars": 20065, + "words": 2901, + "headings": 22, + "estimated_token_count_total": 4087 }, - "hash": "sha256:56269d9ea47f5b4e92cd7d5a1e65ab06d181a9c380f90bb3ef285529b12299f7", + "hash": "sha256:73c34bb1dc80d04f765812c3ed2f247aeda6ce55598b0680d0bd157f25456b99", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-tools-xcm-tools", - "title": "XCM Tools", - "slug": "reference-tools-xcm-tools", + "id": "reference-polkadot-hub-bridging", + "title": "Bridge Hub", + "slug": "reference-polkadot-hub-bridging", "categories": [ - "Basics", - "Tooling", - "Dapps" + "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-xcm-tools.md", - "html_url": "https://docs.polkadot.com/reference/tools/xcm-tools/", - "preview": "As described in the [Interoperability](/develop/interoperability){target=\\_blank} section, XCM (Cross-Consensus Messaging) is a protocol used in the Polkadot and Kusama ecosystems to enable communication and interaction between chains. It facilitates cross-chain communication, allowing assets, data, and messages to flow seamlessly across the ecosystem.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-polkadot-hub-bridging.md", + "html_url": "https://docs.polkadot.com/reference/polkadot-hub/bridging/", + "preview": "The Bridge Hub system parachain plays a crucial role in facilitating trustless interactions between Polkadot, Kusama, Ethereum, and other blockchain ecosystems. By implementing on-chain light clients and supporting protocols like BEEFY and GRANDPA, Bridge Hub ensures seamless message transmission and state verification across chains. It also provides essential [pallets](/reference/glossary/#pallet){target=\\_blank} for sending and receiving messages, making it a cornerstone of Polkadot’s interope", "outline": [ { "depth": 2, @@ -9624,151 +12023,129 @@ }, { "depth": 2, - "title": "Popular XCM Tools", - "anchor": "popular-xcm-tools" - }, - { - "depth": 3, - "title": "Moonsong Labs XCM Tools", - "anchor": "moonsong-labs-xcm-tools" + "title": "Trustless Bridging", + "anchor": "trustless-bridging" }, { - "depth": 3, - "title": "ParaSpell", - "anchor": "paraspell" + "depth": 2, + "title": "Bridging Components", + "anchor": "bridging-components" }, { "depth": 3, - "title": "Astar XCM Tools", - "anchor": "astar-xcm-tools" + "title": "Ethereum-Specific Support", + "anchor": "ethereum-specific-support" }, { - "depth": 3, - "title": "Chopsticks", - "anchor": "chopsticks" + "depth": 2, + "title": "Deployed Bridges", + "anchor": "deployed-bridges" }, { - "depth": 3, - "title": "Moonbeam XCM SDK", - "anchor": "moonbeam-xcm-sdk" + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 7524, - "words": 1043, - "headings": 7, - "estimated_token_count_total": 1700 + "chars": 5467, + "words": 776, + "headings": 6, + "estimated_token_count_total": 1220 }, - "hash": "sha256:47328231d6ff4dc52cd93aaf1baf5d0bc2d9fc372f3d79339d87aafa0dabd1b8", + "hash": "sha256:86734ba8bcdea7913f488edf666a6104bed0a18649d57abde82c149c41c2b871", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "reference-tools-zombienet", - "title": "reference-tools-zombienet", - "slug": "reference-tools-zombienet", + "id": "reference-polkadot-hub-collectives-and-daos", + "title": "Collectives Chain", + "slug": "reference-polkadot-hub-collectives-and-daos", "categories": [ - "Uncategorized" + "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-zombienet.md", - "html_url": "https://docs.polkadot.com/reference/tools/zombienet/", - "preview": "TODO", - "outline": [], - "stats": { - "chars": 5, - "words": 1, - "headings": 0, - "estimated_token_count_total": 0 - }, - "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", - "token_estimator": "heuristic-v1" - }, - { - "id": "reference", - "title": "reference", - "slug": "reference", - "categories": [ - "Uncategorized" + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-polkadot-hub-collectives-and-daos.md", + "html_url": "https://docs.polkadot.com/reference/polkadot-hub/collectives-and-daos/", + "preview": "Established through [Referendum 81](https://polkadot-old.polkassembly.io/referendum/81){target=\\_blank}, the Collectives chain operates as a dedicated parachain exclusive to the Polkadot network with no counterpart on Kusama. This specialized infrastructure provides a foundation for various on-chain governance groups essential to Polkadot's ecosystem.", + "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, + { + "depth": 2, + "title": "Key Collectives", + "anchor": "key-collectives" + } ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference.md", - "html_url": "https://docs.polkadot.com/reference/", - "preview": "TODO", - "outline": [], "stats": { - "chars": 5, - "words": 1, - "headings": 0, - "estimated_token_count_total": 0 + "chars": 2288, + "words": 293, + "headings": 2, + "estimated_token_count_total": 424 }, - "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "hash": "sha256:59ec351fbb8d3a392e90f4f5bf6b62f58b21d6d7a900c5e367e5d2e09ecb3aca", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-connect", - "title": "Connect to Polkadot", - "slug": "smart-contracts-connect", + "id": "reference-polkadot-hub-consensus-and-security-agile-coretime", + "title": "Agile Coretime", + "slug": "reference-polkadot-hub-consensus-and-security-agile-coretime", "categories": [ - "Smart Contracts" + "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-connect.md", - "html_url": "https://docs.polkadot.com/smart-contracts/connect/", - "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-polkadot-hub-consensus-and-security-agile-coretime.md", + "html_url": "https://docs.polkadot.com/reference/polkadot-hub/consensus-and-security/agile-coretime/", + "preview": "Agile Coretime is the [scheduling](https://en.wikipedia.org/wiki/Scheduling_(computing)){target=\\_blank} framework on Polkadot that lets parachains efficiently access cores, which comprise an active validator set tasked with parablock validation. As the first blockchain to enable a flexible scheduling system for blockspace production, Polkadot offers unparalleled adaptability for parachains.", "outline": [ { "depth": 2, - "title": "Networks Details", - "anchor": "networks-details" + "title": "Introduction", + "anchor": "introduction" }, { "depth": 2, - "title": "Test Tokens", - "anchor": "test-tokens" + "title": "Bulk Coretime", + "anchor": "bulk-coretime" + }, + { + "depth": 3, + "title": "Coretime Interlacing", + "anchor": "coretime-interlacing" + }, + { + "depth": 3, + "title": "Coretime Splitting", + "anchor": "coretime-splitting" }, { "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" + "title": "On-Demand Coretime", + "anchor": "on-demand-coretime" } ], "stats": { - "chars": 3459, - "words": 476, - "headings": 3, - "estimated_token_count_total": 558 - }, - "hash": "sha256:a2490223926957381913ae0ed22e2df3611a6713ec9d77a3015d1cd6a578b3f6", - "token_estimator": "heuristic-v1" - }, - { - "id": "smart-contracts-cookbook-dapps-zero-to-hero", - "title": "smart-contracts-cookbook-dapps-zero-to-hero", - "slug": "smart-contracts-cookbook-dapps-zero-to-hero", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-dapps-zero-to-hero.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/dapps/zero-to-hero/", - "preview": "TODO", - "outline": [], - "stats": { - "chars": 5, - "words": 1, - "headings": 0, - "estimated_token_count_total": 0 + "chars": 3028, + "words": 452, + "headings": 5, + "estimated_token_count_total": 619 }, - "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "hash": "sha256:00be43ac8d666bbe15c5c2fa5a5085697d0bb5a6f341ebbb943a209f0be355df", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-eth-dapps-uniswap-v2", - "title": "Deploying Uniswap V2 on Polkadot", - "slug": "smart-contracts-cookbook-eth-dapps-uniswap-v2", + "id": "reference-polkadot-hub-consensus-and-security-pos-consensus", + "title": "Proof of Stake Consensus", + "slug": "reference-polkadot-hub-consensus-and-security-pos-consensus", "categories": [ - "dApps", - "Tooling" + "Polkadot Protocol" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-eth-dapps-uniswap-v2.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/eth-dapps/uniswap-v2/", - "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-polkadot-hub-consensus-and-security-pos-consensus.md", + "html_url": "https://docs.polkadot.com/reference/polkadot-hub/consensus-and-security/pos-consensus/", + "preview": "Polkadot's Proof of Stake consensus model leverages a unique hybrid approach by design to promote decentralized and secure network operations. In traditional Proof of Stake (PoS) systems, a node's ability to validate transactions is tied to its token holdings, which can lead to centralization risks and limited validator participation. Polkadot addresses these concerns through its [Nominated Proof of Stake (NPoS)](/reference/glossary/#nominated-proof-of-stake-npos){target=\\_blank} model and a com", "outline": [ { "depth": 2, @@ -9777,54 +12154,87 @@ }, { "depth": 2, - "title": "Prerequisites", - "anchor": "prerequisites" + "title": "Nominated Proof of Stake", + "anchor": "nominated-proof-of-stake" }, { "depth": 2, - "title": "Set Up the Project", - "anchor": "set-up-the-project" + "title": "Hybrid Consensus", + "anchor": "hybrid-consensus" + }, + { + "depth": 2, + "title": "Block Production - BABE", + "anchor": "block-production-babe" + }, + { + "depth": 3, + "title": "Validator Participation", + "anchor": "validator-participation" + }, + { + "depth": 3, + "title": "Additional Resources", + "anchor": "additional-resources" + }, + { + "depth": 2, + "title": "Finality Gadget - GRANDPA", + "anchor": "finality-gadget-grandpa" + }, + { + "depth": 3, + "title": "Probabilistic vs. Provable Finality", + "anchor": "probabilistic-vs-provable-finality" + }, + { + "depth": 3, + "title": "Additional Resources", + "anchor": "additional-resources-2" }, { "depth": 2, - "title": "Understanding Uniswap V2 Architecture", - "anchor": "understanding-uniswap-v2-architecture" + "title": "Fork Choice", + "anchor": "fork-choice" }, { - "depth": 2, - "title": "Test the Contracts", - "anchor": "test-the-contracts" + "depth": 3, + "title": "Additional Resources", + "anchor": "additional-resources-3" }, { "depth": 2, - "title": "Deploy the Contracts", - "anchor": "deploy-the-contracts" + "title": "Bridging - BEEFY", + "anchor": "bridging-beefy" }, { - "depth": 2, - "title": "Conclusion", - "anchor": "conclusion" + "depth": 3, + "title": "Additional Resources", + "anchor": "additional-resources-4" } ], "stats": { - "chars": 11280, - "words": 1560, - "headings": 7, - "estimated_token_count_total": 2671 + "chars": 12753, + "words": 1834, + "headings": 13, + "estimated_token_count_total": 2526 }, - "hash": "sha256:2a42198668c759f63aa602115bf2d290ec7d03bbc3a3df20e30e85027e1b1cc3", + "hash": "sha256:231fc555eefe5f910fb36e0c03945147d0fb235272850797391751f4444b0a9c", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-.deploy-basic-pvm", - "title": "Deploy a Basic Contract to Polkadot Hub", - "slug": "smart-contracts-cookbook-smart-contracts-.deploy-basic-pvm", + "id": "reference-polkadot-hub-consensus-and-security-relay-chain", + "title": "Overview of the Polkadot Relay Chain", + "slug": "reference-polkadot-hub-consensus-and-security-relay-chain", "categories": [ - "Smart Contracts" + "Basics", + "Polkadot Protocol", + "Parachains" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-.deploy-basic-pvm.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/.deploy-basic-pvm/", - "preview": "Deploying smart contracts to [Polkadot Hub](/smart-contracts/overview/#smart-contract-development){target=\\_blank} can be accomplished through various tools and environments, each suited to different development workflows. This guide demonstrates how to deploy a basic PolkaVM (PVM) smart contract using four popular approaches: JavaScript with [Ethers.js](https://docs.ethers.org/v6/){target=\\_blank}, [Remix IDE](https://remix.live/){target=\\_blank}, [Hardhat](https://hardhat.org/){target=\\_blank}", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-polkadot-hub-consensus-and-security-relay-chain.md", + "html_url": "https://docs.polkadot.com/reference/polkadot-hub/consensus-and-security/relay-chain/", + "preview": "Polkadot is a next-generation blockchain protocol designed to support a multi-chain future by enabling secure communication and interoperability between different blockchains. Built as a Layer-0 protocol, Polkadot introduces innovations like application-specific Layer-1 chains ([parachains](/polkadot-protocol/architecture/parachains/){targe=\\_blank}), shared security through [Nominated Proof of Stake (NPoS)](/reference/glossary/#nominated-proof-of-stake-npos){target=\\_blank}, and cross-chain int", "outline": [ { "depth": 2, @@ -9833,517 +12243,579 @@ }, { "depth": 2, - "title": "JavaScript with Ethers.js", - "anchor": "javascript-with-ethersjs" - }, - { - "depth": 3, - "title": "Setup", - "anchor": "setup" - }, - { - "depth": 3, - "title": "Create and Compile Your Contract", - "anchor": "create-and-compile-your-contract" + "title": "Polkadot 1.0", + "anchor": "polkadot-10" }, { "depth": 3, - "title": "Deploy the Contract", - "anchor": "deploy-the-contract" - }, - { - "depth": 2, - "title": "Remix IDE", - "anchor": "remix-ide" + "title": "High-Level Architecture", + "anchor": "high-level-architecture" }, { "depth": 3, - "title": "Access Remix", - "anchor": "access-remix" + "title": "Polkadot's Additional Functionalities", + "anchor": "polkadots-additional-functionalities" }, { "depth": 3, - "title": "Compile", - "anchor": "compile" + "title": "Polkadot's Resilience", + "anchor": "polkadots-resilience" }, { "depth": 3, - "title": "Deploy", - "anchor": "deploy" + "title": "Polkadot's Blockspace", + "anchor": "polkadots-blockspace" }, { "depth": 2, - "title": "Hardhat", - "anchor": "hardhat" - }, - { - "depth": 3, - "title": "Setup", - "anchor": "setup-2" + "title": "DOT Token", + "anchor": "dot-token" }, { "depth": 3, - "title": "Configure Hardhat", - "anchor": "configure-hardhat" + "title": "Redenomination of DOT", + "anchor": "redenomination-of-dot" }, { "depth": 3, - "title": "Create Your Contract", - "anchor": "create-your-contract" + "title": "The Planck Unit", + "anchor": "the-planck-unit" }, { "depth": 3, - "title": "Compile", - "anchor": "compile-2" + "title": "Uses for DOT", + "anchor": "uses-for-dot" }, { - "depth": 3, - "title": "Set Up Deployment", - "anchor": "set-up-deployment" - }, + "depth": 2, + "title": "JAM and the Road Ahead", + "anchor": "jam-and-the-road-ahead" + } + ], + "stats": { + "chars": 12430, + "words": 1771, + "headings": 11, + "estimated_token_count_total": 2571 + }, + "hash": "sha256:8a914e4309d4fe7070e62d7abe4665b6c76c8dc5ec3219332eccb16b77b0dd95", + "last_modified": "2025-10-28T14:42:15+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "reference-polkadot-hub-people-and-identity", + "title": "People Chain", + "slug": "reference-polkadot-hub-people-and-identity", + "categories": [ + "Polkadot Protocol" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-polkadot-hub-people-and-identity.md", + "html_url": "https://docs.polkadot.com/reference/polkadot-hub/people-and-identity/", + "preview": "People chain is a specialized parachain within the Polkadot ecosystem dedicated to secure, decentralized identity management.", + "outline": [ { - "depth": 3, - "title": "Deploy", - "anchor": "deploy-2" + "depth": 2, + "title": "Introduction", + "anchor": "introduction" }, { "depth": 2, - "title": "Foundry", - "anchor": "foundry" + "title": "Identity Management System", + "anchor": "identity-management-system" }, { "depth": 3, - "title": "Setup", - "anchor": "setup-3" + "title": "Sub-Identities", + "anchor": "sub-identities" }, { - "depth": 3, - "title": "Configure Foundry", - "anchor": "configure-foundry" + "depth": 2, + "title": "Verification Process", + "anchor": "verification-process" }, { "depth": 3, - "title": "Create Your Contract", - "anchor": "create-your-contract-2" + "title": "Judgment Requests", + "anchor": "judgment-requests" }, { "depth": 3, - "title": "Compile", - "anchor": "compile-3" + "title": "Judgment Classifications", + "anchor": "judgment-classifications" }, { "depth": 3, - "title": "Deploy", - "anchor": "deploy-3" + "title": "Registrars", + "anchor": "registrars" }, { "depth": 2, - "title": "Conclusion", - "anchor": "conclusion" - }, - { - "depth": 3, - "title": "Next Steps", - "anchor": "next-steps" + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 13872, - "words": 1640, - "headings": 24, - "estimated_token_count_total": 3228 + "chars": 4750, + "words": 606, + "headings": 8, + "estimated_token_count_total": 876 }, - "hash": "sha256:8f29b0f0b56f8c136206211a858cdc5bc27bcd9119eab179a6cd306182d910cb", + "hash": "sha256:8239d1e8d8642cb7c10e9e5f971c99b999e9e4a87373b50bf4a691225c1e4702", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-basic-contract-deploy-basic-ethers-js", - "title": "JavaScript with Ethers.js", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-basic-contract-deploy-basic-ethers-js", + "id": "reference-tools-chopsticks", + "title": "reference-tools-chopsticks", + "slug": "reference-tools-chopsticks", "categories": [ - "Smart Contracts" + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-chopsticks.md", + "html_url": "https://docs.polkadot.com/reference/tools/chopsticks/", + "preview": "TODO", + "outline": [], + "stats": { + "chars": 5, + "words": 1, + "headings": 0, + "estimated_token_count_total": 0 + }, + "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:15+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "reference-tools-dedot", + "title": "Dedot", + "slug": "reference-tools-dedot", + "categories": [ + "Tooling", + "Dapps" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-basic-contract-deploy-basic-ethers-js.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-basic-contract/deploy-basic-ethers-js/", - "preview": "[Ethers.js](https://docs.ethers.org/v6/){target=\\_blank} provides a lightweight approach for deploying contracts using pure JavaScript. This method is ideal for developers who want programmatic control over the deployment process or need to integrate contract deployment into existing applications.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-dedot.md", + "html_url": "https://docs.polkadot.com/reference/tools/dedot/", + "preview": "[Dedot](https://github.com/dedotdev/dedot){target=\\_blank} is a next-generation JavaScript client for Polkadot and Polkadot SDK-based blockchains. Designed to elevate the dApp development experience, Dedot is built and optimized to be lightweight and tree-shakable, offering precise types and APIs suggestions for individual Polkadot SDK-based blockchains and [ink! smart contracts](https://use.ink/){target=\\_blank}.", "outline": [ + { + "depth": 2, + "title": "Introduction", + "anchor": "introduction" + }, { "depth": 3, - "title": "Setup", - "anchor": "setup" + "title": "Key Features", + "anchor": "key-features" + }, + { + "depth": 2, + "title": "Installation", + "anchor": "installation" + }, + { + "depth": 2, + "title": "Get Started", + "anchor": "get-started" }, { "depth": 3, - "title": "Create and Compile Your Contract", - "anchor": "create-and-compile-your-contract" + "title": "Initialize a Client Instance", + "anchor": "initialize-a-client-instance" }, { "depth": 3, - "title": "Deploy the Contract", - "anchor": "deploy-the-contract" + "title": "Enable Type and API Suggestions", + "anchor": "enable-type-and-api-suggestions" }, { "depth": 3, - "title": "Next Steps", - "anchor": "next-steps" + "title": "Read On-Chain Data", + "anchor": "read-on-chain-data" + }, + { + "depth": 3, + "title": "Sign and Send Transactions", + "anchor": "sign-and-send-transactions" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 6935, - "words": 767, - "headings": 4, - "estimated_token_count_total": 1490 + "chars": 8855, + "words": 1100, + "headings": 9, + "estimated_token_count_total": 2300 }, - "hash": "sha256:b0af34b460192f665ca70e7d7985e87b9f59a1a359888f6d14d651daedbcd711", + "hash": "sha256:ba24e31e2ad94fbf1d73f1878da92dd2e1476db00170780bbdf0e65ab18bc961", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-basic-contract-deploy-basic-foundry", - "title": "Foundry", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-basic-contract-deploy-basic-foundry", + "id": "reference-tools-light-clients", + "title": "Light Clients", + "slug": "reference-tools-light-clients", "categories": [ - "Smart Contracts" + "Parachains", + "Tooling" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-basic-contract-deploy-basic-foundry.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-basic-contract/deploy-basic-foundry/", - "preview": "[Foundry](https://getfoundry.sh/){target=\\_blank} offers a fast, modular toolkit written in Rust. It's perfect for developers who prefer command-line interfaces and need high-performance compilation and deployment.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-light-clients.md", + "html_url": "https://docs.polkadot.com/reference/tools/light-clients/", + "preview": "Light clients enable secure and efficient blockchain interaction without running a full node. They provide a trust-minimized alternative to JSON-RPC by verifying data through cryptographic proofs rather than blindly trusting remote nodes.", "outline": [ { - "depth": 3, - "title": "Setup", - "anchor": "setup" + "depth": 2, + "title": "Introduction", + "anchor": "introduction" }, { - "depth": 3, - "title": "Configure Foundry", - "anchor": "configure-foundry" + "depth": 2, + "title": "Light Clients Workflow", + "anchor": "light-clients-workflow" }, { - "depth": 3, - "title": "Create Your Contract", - "anchor": "create-your-contract" + "depth": 2, + "title": "JSON-RPC and Light Client Comparison", + "anchor": "json-rpc-and-light-client-comparison" }, { - "depth": 3, - "title": "Compile", - "anchor": "compile" + "depth": 2, + "title": "Using Light Clients", + "anchor": "using-light-clients" }, { "depth": 3, - "title": "Deploy", - "anchor": "deploy" + "title": "PAPI Light Client Support", + "anchor": "papi-light-client-support" }, { "depth": 3, - "title": "Next Steps", - "anchor": "next-steps" + "title": "Substrate Connect - Browser Extension", + "anchor": "substrate-connect-browser-extension" + }, + { + "depth": 2, + "title": "Resources", + "anchor": "resources" } ], "stats": { - "chars": 2125, - "words": 276, - "headings": 6, - "estimated_token_count_total": 429 + "chars": 6490, + "words": 870, + "headings": 7, + "estimated_token_count_total": 1430 }, - "hash": "sha256:f7687b9a1e80ab381cf4fb24f37cccfb98ddf139bf687e8832af99364ef0a8a9", + "hash": "sha256:1284c42be692167e01bcc44e2e134ec20615402675fac26df246c00aa1588d80", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-basic-contract-deploy-basic-hardhat", - "title": "hardhat", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-basic-contract-deploy-basic-hardhat", + "id": "reference-tools-moonwall", + "title": "E2E Testing with Moonwall", + "slug": "reference-tools-moonwall", "categories": [ - "Smart Contracts" + "Parachains", + "Tooling" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-basic-contract-deploy-basic-hardhat.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-basic-contract/deploy-basic-hardhat/", - "preview": "[Hardhat](https://hardhat.org/){target=\\_blank} provides a comprehensive development environment with built-in testing, debugging, and deployment capabilities. It's ideal for professional development workflows and team projects.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-moonwall.md", + "html_url": "https://docs.polkadot.com/reference/tools/moonwall/", + "preview": "Moonwall is an end-to-end testing framework designed explicitly for Polkadot SDK-based blockchain networks. It addresses one of the most significant challenges in blockchain development: managing complex test environments and network configurations.", "outline": [ { - "depth": 3, - "title": "Setup", - "anchor": "setup" + "depth": 2, + "title": "Introduction", + "anchor": "introduction" }, { - "depth": 3, - "title": "Configure Hardhat", - "anchor": "configure-hardhat" + "depth": 2, + "title": "Prerequisites", + "anchor": "prerequisites" }, { - "depth": 3, - "title": "Create Your Contract", - "anchor": "create-your-contract" + "depth": 2, + "title": "Install Moonwall", + "anchor": "install-moonwall" }, { "depth": 3, - "title": "Compile", - "anchor": "compile" + "title": "Global Installation", + "anchor": "global-installation" }, { "depth": 3, - "title": "Set Up Deployment", - "anchor": "set-up-deployment" + "title": "Local Installation", + "anchor": "local-installation" }, { - "depth": 3, - "title": "Deploy", - "anchor": "deploy" + "depth": 2, + "title": "Initialize Moonwall", + "anchor": "initialize-moonwall" }, { - "depth": 3, - "title": "Next Steps", - "anchor": "next-steps" + "depth": 2, + "title": "Writing Tests", + "anchor": "writing-tests" + }, + { + "depth": 2, + "title": "Running the Tests", + "anchor": "running-the-tests" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 3336, - "words": 375, - "headings": 7, - "estimated_token_count_total": 672 + "chars": 10240, + "words": 1295, + "headings": 9, + "estimated_token_count_total": 2453 }, - "hash": "sha256:93ca24da15095dd0bb03657f53d27771934aee055c11af529445a50e161f79a3", + "hash": "sha256:2c77cfb38bb2e466a8f56dabbb706fcd2e90cf1634fc9beb7f0ee95a75735653", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-basic-contract-deploy-basic-remix", - "title": "Remix IDE", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-basic-contract-deploy-basic-remix", + "id": "reference-tools-omninode", + "title": "Polkadot Omni Node", + "slug": "reference-tools-omninode", "categories": [ - "Smart Contracts" + "Parachains", + "Tooling" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-basic-contract-deploy-basic-remix.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-basic-contract/deploy-basic-remix/", - "preview": "[Remix IDE](https://remix.live/){target=\\_blank} offers a visual, browser-based environment perfect for rapid prototyping and learning. It requires no local installation and provides an intuitive interface for contract development.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-omninode.md", + "html_url": "https://docs.polkadot.com/reference/tools/omninode/", + "preview": "The [`polkadot-omni-node`](https://crates.io/crates/polkadot-omni-node/0.7.0){target=\\_blank} crate is a versatile, pre-built binary designed to simplify running parachains in the Polkadot ecosystem. Unlike traditional node binaries that are tightly coupled to specific runtime code, the `polkadot-omni-node` operates using an external [chain specification](/polkadot-protocol/glossary#chain-specification){target=\\_blank} file, allowing it to adapt dynamically to different parachains.", "outline": [ { - "depth": 3, - "title": "Access Remix", - "anchor": "access-remix" + "depth": 2, + "title": "Introduction", + "anchor": "introduction" }, { - "depth": 3, - "title": "Compile", - "anchor": "compile" + "depth": 2, + "title": "Prerequisites", + "anchor": "prerequisites" }, { - "depth": 3, - "title": "Deploy", - "anchor": "deploy" + "depth": 2, + "title": "Install Polkadot Omni Node", + "anchor": "install-polkadot-omni-node" }, { - "depth": 3, - "title": "Next Steps", - "anchor": "next-steps" - } - ], - "stats": { - "chars": 2473, - "words": 363, - "headings": 4, - "estimated_token_count_total": 527 - }, - "hash": "sha256:56d730c8a6d2ccf0324caf1c3f30929a93904f80e482cfcb457541e04482dbad", - "token_estimator": "heuristic-v1" - }, - { - "id": "smart-contracts-cookbook-smart-contracts-deploy-basic-contract-evm-deploy-basic-ethers-js", - "title": "JavaScript with Ethers.js", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-basic-contract-evm-deploy-basic-ethers-js", - "categories": [ - "Smart Contracts" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-basic-contract-evm-deploy-basic-ethers-js.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-basic-contract-evm/deploy-basic-ethers-js/", - "preview": "[Ethers.js](https://docs.ethers.org/v6/){target=\\_blank} provides a lightweight approach for deploying contracts using pure JavaScript. This method is ideal for developers who want programmatic control over the deployment process or need to integrate contract deployment into existing applications.", - "outline": [ + "depth": 2, + "title": "Obtain Chain Specifications", + "anchor": "obtain-chain-specifications" + }, { - "depth": 3, - "title": "Setup", - "anchor": "setup" + "depth": 2, + "title": "Run a Parachain Full Node", + "anchor": "run-a-parachain-full-node" }, { - "depth": 3, - "title": "Create and Compile Your Contract", - "anchor": "create-and-compile-your-contract" + "depth": 2, + "title": "Interact with the Node", + "anchor": "interact-with-the-node" + }, + { + "depth": 2, + "title": "Parachain Compatibility", + "anchor": "parachain-compatibility" }, { "depth": 3, - "title": "Deploy the Contract", - "anchor": "deploy-the-contract" + "title": "Required Runtime APIs", + "anchor": "required-runtime-apis" }, { "depth": 3, - "title": "Next Steps", - "anchor": "next-steps" + "title": "Required Pallets", + "anchor": "required-pallets" } ], "stats": { - "chars": 6935, - "words": 767, - "headings": 4, - "estimated_token_count_total": 1490 + "chars": 8916, + "words": 1165, + "headings": 9, + "estimated_token_count_total": 2018 }, - "hash": "sha256:b0af34b460192f665ca70e7d7985e87b9f59a1a359888f6d14d651daedbcd711", + "hash": "sha256:a87815deff81936d7f50842f8600004990076c1a33e7e6b408ab954b6ce47259", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-basic-contract-evm-deploy-basic-foundry", - "title": "Foundry", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-basic-contract-evm-deploy-basic-foundry", + "id": "reference-tools-papi", + "title": "Polkadot-API", + "slug": "reference-tools-papi", "categories": [ - "Smart Contracts" + "Tooling", + "Dapps" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-basic-contract-evm-deploy-basic-foundry.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-basic-contract-evm/deploy-basic-foundry/", - "preview": "[Foundry](https://getfoundry.sh/){target=\\_blank} offers a fast, modular toolkit written in Rust. It's perfect for developers who prefer command-line interfaces and need high-performance compilation and deployment.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-papi.md", + "html_url": "https://docs.polkadot.com/reference/tools/papi/", + "preview": "[Polkadot-API](https://github.com/polkadot-api/polkadot-api){target=\\_blank} (PAPI) is a set of libraries built to be modular, composable, and grounded in a “light-client first” approach. Its primary aim is to equip dApp developers with an extensive toolkit for building fully decentralized applications.", "outline": [ { - "depth": 3, - "title": "Setup", - "anchor": "setup" + "depth": 2, + "title": "Introduction", + "anchor": "introduction" }, { - "depth": 3, - "title": "Configure Foundry", - "anchor": "configure-foundry" + "depth": 2, + "title": "Get Started", + "anchor": "get-started" }, { "depth": 3, - "title": "Create Your Contract", - "anchor": "create-your-contract" + "title": "API Instantiation", + "anchor": "api-instantiation" }, { "depth": 3, - "title": "Compile", - "anchor": "compile" + "title": "Reading Chain Data", + "anchor": "reading-chain-data" }, { "depth": 3, - "title": "Deploy", - "anchor": "deploy" + "title": "Sending Transactions", + "anchor": "sending-transactions" }, { - "depth": 3, - "title": "Next Steps", - "anchor": "next-steps" + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 2125, - "words": 276, + "chars": 8957, + "words": 1156, "headings": 6, - "estimated_token_count_total": 429 + "estimated_token_count_total": 1987 }, - "hash": "sha256:f7687b9a1e80ab381cf4fb24f37cccfb98ddf139bf687e8832af99364ef0a8a9", + "hash": "sha256:2ca93b09d3bb9159bbf53816886a9b242bb3c13b996c51fd52962e049e2d5477", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-basic-contract-evm-deploy-basic-hardhat", - "title": "hardhat", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-basic-contract-evm-deploy-basic-hardhat", + "id": "reference-tools-paraspell", + "title": "ParaSpell XCM SDK", + "slug": "reference-tools-paraspell", "categories": [ - "Smart Contracts" + "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-basic-contract-evm-deploy-basic-hardhat.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-basic-contract-evm/deploy-basic-hardhat/", - "preview": "[Hardhat](https://hardhat.org/){target=\\_blank} provides a comprehensive development environment with built-in testing, debugging, and deployment capabilities. It's ideal for professional development workflows and team projects.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-paraspell.md", + "html_url": "https://docs.polkadot.com/reference/tools/paraspell/", + "preview": "[ParaSpell](https://paraspell.github.io/docs/){target=\\_blank} is a comprehensive suite of open-source tools designed to simplify cross-chain interactions within the Polkadot ecosystem. At its core, ParaSpell is dedicated to enhancing the functionality of the [XCM (Cross-Consensus Messaging)](/parachains/interoperability/get-started/){target=\\_blank} protocol by providing developers with a unified and streamlined experience for building interoperable decentralized applications (dApps).", "outline": [ { - "depth": 3, - "title": "Setup", - "anchor": "setup" - }, - { - "depth": 3, - "title": "Configure Hardhat", - "anchor": "configure-hardhat" - }, - { - "depth": 3, - "title": "Create Your Contract", - "anchor": "create-your-contract" - }, - { - "depth": 3, - "title": "Compile", - "anchor": "compile" - }, - { - "depth": 3, - "title": "Set Up Deployment", - "anchor": "set-up-deployment" - }, - { - "depth": 3, - "title": "Deploy", - "anchor": "deploy" + "depth": 2, + "title": "Introduction", + "anchor": "introduction" }, { "depth": 3, - "title": "Next Steps", - "anchor": "next-steps" + "title": "ParaSpell XCM SDK", + "anchor": "paraspell-xcm-sdk" } ], "stats": { - "chars": 3336, - "words": 375, - "headings": 7, - "estimated_token_count_total": 672 + "chars": 3005, + "words": 433, + "headings": 2, + "estimated_token_count_total": 669 }, - "hash": "sha256:93ca24da15095dd0bb03657f53d27771934aee055c11af529445a50e161f79a3", + "hash": "sha256:a7f9c4a03153ee637a0557d2cea0b622c849667ce793b1294bb3299cf036197d", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-basic-contract-evm-deploy-basic-remix", - "title": "Remix IDE", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-basic-contract-evm-deploy-basic-remix", + "id": "reference-tools-polkadart", + "title": "Polkadart", + "slug": "reference-tools-polkadart", "categories": [ - "Smart Contracts" + "Tooling", + "Dapps" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-basic-contract-evm-deploy-basic-remix.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-basic-contract-evm/deploy-basic-remix/", - "preview": "[Remix IDE](https://remix.live/){target=\\_blank} offers a visual, browser-based environment perfect for rapid prototyping and learning. It requires no local installation and provides an intuitive interface for contract development.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-polkadart.md", + "html_url": "https://docs.polkadot.com/reference/tools/polkadart/", + "preview": "Polkadart is the most comprehensive Dart/Flutter SDK for interacting with Polkadot, Substrate, and other compatible blockchain networks. Designed with a Dart-first approach and type-safe APIs, it provides everything developers need to build powerful decentralized applications.", "outline": [ + { + "depth": 2, + "title": "Installation", + "anchor": "installation" + }, + { + "depth": 2, + "title": "Get Started", + "anchor": "get-started" + }, + { + "depth": 3, + "title": "Type Generation", + "anchor": "type-generation" + }, { "depth": 3, - "title": "Access Remix", - "anchor": "access-remix" + "title": "Run Generator", + "anchor": "run-generator" }, { "depth": 3, - "title": "Compile", - "anchor": "compile" + "title": "Use Generated Types", + "anchor": "use-generated-types" }, { "depth": 3, - "title": "Deploy", - "anchor": "deploy" + "title": "Creating an API Instance", + "anchor": "creating-an-api-instance" }, { "depth": 3, - "title": "Next Steps", - "anchor": "next-steps" + "title": "Reading Chain Data", + "anchor": "reading-chain-data" + }, + { + "depth": 3, + "title": "Subscribe to New Blocks", + "anchor": "subscribe-to-new-blocks" + }, + { + "depth": 3, + "title": "Send a Transaction", + "anchor": "send-a-transaction" + }, + { + "depth": 2, + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 2473, - "words": 363, - "headings": 4, - "estimated_token_count_total": 527 + "chars": 5178, + "words": 624, + "headings": 10, + "estimated_token_count_total": 1084 }, - "hash": "sha256:56d730c8a6d2ccf0324caf1c3f30929a93904f80e482cfcb457541e04482dbad", + "hash": "sha256:7f533abe61586af8438e350c41b741d74a8edb839f9dc4139bc4619ba3748258", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-basic-ethers", - "title": "Deploy a Basic Contract with Ethers.js", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-basic-ethers", + "id": "reference-tools-polkadot-js-api", + "title": "Polkadot.js API", + "slug": "reference-tools-polkadot-js-api", "categories": [ - "Smart Contracts" + "Tooling", + "Dapps" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-basic-ethers.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-basic/ethers/", - "preview": "This guide demonstrates how to deploy a basic Solidity smart contract to Polkadot Hub using [Ethers.js](https://docs.ethers.org/v6/){target=\\_blank}, which provides a lightweight approach for deploying contracts using pure JavaScript. This method is ideal for developers who want programmatic control over the deployment process or need to integrate contract deployment into existing applications.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-polkadot-js-api.md", + "html_url": "https://docs.polkadot.com/reference/tools/polkadot-js-api/", + "preview": "!!! warning \"Maintenance Mode Only\" The Polkadot.js API is now in maintenance mode and is no longer actively developed. New projects should use [Dedot](/develop/toolkit/api-libraries/dedot){target=\\_blank} (TypeScript-first API) or [Polkadot API](/develop/toolkit/api-libraries/papi){target=\\_blank} (modern, type-safe API) as actively maintained alternatives.", "outline": [ { "depth": 2, @@ -10351,29 +12823,39 @@ "anchor": "introduction" }, { - "depth": 2, - "title": "Prerequisites", - "anchor": "prerequisites" + "depth": 3, + "title": "Dynamic API Generation", + "anchor": "dynamic-api-generation" }, { - "depth": 2, - "title": "Set Up Your Project", - "anchor": "set-up-your-project" + "depth": 3, + "title": "Available API Categories", + "anchor": "available-api-categories" }, { "depth": 2, - "title": "Create Your Contract", - "anchor": "create-your-contract" + "title": "Installation", + "anchor": "installation" }, { "depth": 2, - "title": "Compile", - "anchor": "compile" + "title": "Get Started", + "anchor": "get-started" }, { - "depth": 2, - "title": "Deploy", - "anchor": "deploy" + "depth": 3, + "title": "Creating an API Instance", + "anchor": "creating-an-api-instance" + }, + { + "depth": 3, + "title": "Reading Chain Data", + "anchor": "reading-chain-data" + }, + { + "depth": 3, + "title": "Sending Transactions", + "anchor": "sending-transactions" }, { "depth": 2, @@ -10382,24 +12864,26 @@ } ], "stats": { - "chars": 7370, - "words": 823, - "headings": 7, - "estimated_token_count_total": 1729 + "chars": 5042, + "words": 684, + "headings": 9, + "estimated_token_count_total": 1166 }, - "hash": "sha256:ff8975b44870613c3aef0907df365f1ac981de74ec83019df232fe4bda6d9dbe", + "hash": "sha256:ed3986f30880fefca5975fcdc847c68b4aca65862c63e3002b25391b0521781d", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-basic-evm", - "title": "Deploy a Basic Contract to EVM", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-basic-evm", + "id": "reference-tools-py-substrate-interface", + "title": "Python Substrate Interface", + "slug": "reference-tools-py-substrate-interface", "categories": [ - "Smart Contracts" + "Tooling", + "Dapps" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-basic-evm.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-basic-evm/", - "preview": "Deploying smart contracts to the [Polkadot Hub](/smart-contracts/overview/#smart-contract-development){target=\\_blank} can be accomplished using standard EVM development tools and workflows. This guide demonstrates how to deploy a basic smart contract using four popular EVM approaches: JavaScript with [Ethers.js](https://docs.ethers.org/v6/){target=\\_blank}, [Remix IDE](https://remix.live/){target=\\_blank}, [Hardhat](https://hardhat.org/){target=\\_blank}, and [Foundry](https://getfoundry.sh/){ta", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-py-substrate-interface.md", + "html_url": "https://docs.polkadot.com/reference/tools/py-substrate-interface/", + "preview": "The [Python Substrate Interface](https://github.com/polkascan/py-substrate-interface){target=\\_blank} is a powerful library that enables interaction with Polkadot SDK-based chains. It provides essential functionality for:", "outline": [ { "depth": 2, @@ -10408,69 +12892,28 @@ }, { "depth": 2, - "title": "Deployment options", - "anchor": "deployment-options" + "title": "Installation", + "anchor": "installation" }, { "depth": 2, - "title": "Conclusion", - "anchor": "conclusion" + "title": "Get Started", + "anchor": "get-started" }, { "depth": 3, - "title": "Next Steps", - "anchor": "next-steps" - } - ], - "stats": { - "chars": 15629, - "words": 1659, - "headings": 4, - "estimated_token_count_total": 3341 - }, - "hash": "sha256:a4fd853afb897985602e0356551edacbce77db60bbc6556de3b6ae5af3fbc9e5", - "token_estimator": "heuristic-v1" - }, - { - "id": "smart-contracts-cookbook-smart-contracts-deploy-basic-foundry", - "title": "Deploy a Basic Contract with Foundry", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-basic-foundry", - "categories": [ - "Smart Contracts" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-basic-foundry.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-basic/foundry/", - "preview": "This guide demonstrates how to deploy a basic Solidity smart contract to Polkadot Hub using [Foundry](https://getfoundry.sh/){target=\\_blank}, which offers a fast, modular toolkit written in Rust. It's perfect for developers who prefer command-line interfaces and need high-performance compilation and deployment.", - "outline": [ - { - "depth": 2, - "title": "Prerequisites", - "anchor": "prerequisites" - }, - { - "depth": 2, - "title": "Set Up Your Project", - "anchor": "set-up-your-project" - }, - { - "depth": 2, - "title": "Configure Foundry", - "anchor": "configure-foundry" - }, - { - "depth": 2, - "title": "Create Your Contract", - "anchor": "create-your-contract" + "title": "Establishing Connection", + "anchor": "establishing-connection" }, { - "depth": 2, - "title": "Compile", - "anchor": "compile" + "depth": 3, + "title": "Reading Chain State", + "anchor": "reading-chain-state" }, { - "depth": 2, - "title": "Deploy", - "anchor": "deploy" + "depth": 3, + "title": "Submitting Transactions", + "anchor": "submitting-transactions" }, { "depth": 2, @@ -10479,24 +12922,26 @@ } ], "stats": { - "chars": 2731, - "words": 355, + "chars": 4302, + "words": 541, "headings": 7, - "estimated_token_count_total": 598 + "estimated_token_count_total": 942 }, - "hash": "sha256:63defd84f302f0778c90129abbe69ecd2a5d9d83c622f2b7e5c2ffc9bcb3312f", + "hash": "sha256:8987fc35cd28602054ee018031f773e2e3837425107c51d0e2ac68a94b86e9c0", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-basic-hardhat", - "title": "Deploy a Basic Contract with Hardhat", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-basic-hardhat", + "id": "reference-tools-sidecar", + "title": "Sidecar REST API", + "slug": "reference-tools-sidecar", "categories": [ - "Smart Contracts" + "Tooling", + "Dapps" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-basic-hardhat.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-basic/hardhat/", - "preview": "This guide demonstrates how to deploy a basic Solidity smart contract to Polkadot Hub using [Hardhat](https://hardhat.org/){target=\\_blank}, which provides a comprehensive development environment with built-in testing, debugging, and deployment capabilities. It's ideal for professional development workflows and team projects.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-sidecar.md", + "html_url": "https://docs.polkadot.com/reference/tools/sidecar/", + "preview": "The [Sidecar REST API](https://github.com/paritytech/substrate-api-sidecar){target=\\_blank} is a service that provides a REST interface for interacting with Polkadot SDK-based blockchains. With this API, developers can easily access a broad range of endpoints for nodes, accounts, transactions, parachains, and more.", "outline": [ { "depth": 2, @@ -10510,33 +12955,18 @@ }, { "depth": 2, - "title": "Set Up Your Project", - "anchor": "set-up-your-project" - }, - { - "depth": 2, - "title": "Configure Hardhat", - "anchor": "configure-hardhat" - }, - { - "depth": 2, - "title": "Create Your Contract", - "anchor": "create-your-contract" - }, - { - "depth": 2, - "title": "Compile", - "anchor": "compile" + "title": "Installation", + "anchor": "installation" }, { "depth": 2, - "title": "Set Up Deployment", - "anchor": "set-up-deployment" + "title": "Usage", + "anchor": "usage" }, { - "depth": 2, - "title": "Deploy the Contract", - "anchor": "deploy-the-contract" + "depth": 3, + "title": "Endpoints", + "anchor": "endpoints" }, { "depth": 2, @@ -10545,24 +12975,26 @@ } ], "stats": { - "chars": 4051, - "words": 475, - "headings": 9, - "estimated_token_count_total": 981 + "chars": 7309, + "words": 1033, + "headings": 6, + "estimated_token_count_total": 1945 }, - "hash": "sha256:98f5c5c1a26db913e1c4c435062d214ca8c4b5f2dbed5b64d2e54c3435f06452", + "hash": "sha256:0795462182cb97256bb5c2acb035855fe0d6557185de8ac99482725ecb4f94c1", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-basic-pvm", - "title": "Deploy a Basic Contract to Polkadot Hub", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-basic-pvm", + "id": "reference-tools-subxt", + "title": "Subxt Rust API", + "slug": "reference-tools-subxt", "categories": [ - "Smart Contracts" + "Tooling", + "Dapps" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-basic-pvm.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-basic-pvm/", - "preview": "Deploying smart contracts to [Polkadot Hub](/smart-contracts/overview/#smart-contract-development){target=\\_blank} can be accomplished through various tools and environments, each suited to different development workflows. This guide demonstrates how to deploy a basic PolkaVM (PVM) smart contract using four popular approaches: JavaScript with [Ethers.js](https://docs.ethers.org/v6/){target=\\_blank}, [Remix IDE](https://remix.live/){target=\\_blank}, [Hardhat](https://hardhat.org/){target=\\_blank}", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-subxt.md", + "html_url": "https://docs.polkadot.com/reference/tools/subxt/", + "preview": "Subxt is a Rust library designed to interact with Polkadot SDK-based blockchains. It provides a type-safe interface for submitting transactions, querying on-chain state, and performing other blockchain interactions. By leveraging Rust's strong type system, subxt ensures that your code is validated at compile time, reducing runtime errors and improving reliability.", "outline": [ { "depth": 2, @@ -10571,139 +13003,72 @@ }, { "depth": 2, - "title": "JavaScript with Ethers.js", - "anchor": "javascript-with-ethersjs" - }, - { - "depth": 3, - "title": "Setup", - "anchor": "setup" - }, - { - "depth": 3, - "title": "Create and Compile Your Contract", - "anchor": "create-and-compile-your-contract" - }, - { - "depth": 3, - "title": "Deploy the Contract", - "anchor": "deploy-the-contract" - }, - { - "depth": 2, - "title": "Remix IDE", - "anchor": "remix-ide" - }, - { - "depth": 3, - "title": "Access Remix", - "anchor": "access-remix" - }, - { - "depth": 3, - "title": "Compile", - "anchor": "compile" - }, - { - "depth": 3, - "title": "Deploy", - "anchor": "deploy" - }, - { - "depth": 2, - "title": "Hardhat", - "anchor": "hardhat" - }, - { - "depth": 3, - "title": "Setup", - "anchor": "setup-2" - }, - { - "depth": 3, - "title": "Configure Hardhat", - "anchor": "configure-hardhat" - }, - { - "depth": 3, - "title": "Create Your Contract", - "anchor": "create-your-contract" - }, - { - "depth": 3, - "title": "Compile", - "anchor": "compile-2" - }, - { - "depth": 3, - "title": "Set Up Deployment", - "anchor": "set-up-deployment" + "title": "Prerequisites", + "anchor": "prerequisites" }, - { - "depth": 3, - "title": "Deploy", - "anchor": "deploy-2" + { + "depth": 2, + "title": "Installation", + "anchor": "installation" }, { "depth": 2, - "title": "Foundry", - "anchor": "foundry" + "title": "Get Started", + "anchor": "get-started" }, { "depth": 3, - "title": "Setup", - "anchor": "setup-3" + "title": "Download Chain Metadata", + "anchor": "download-chain-metadata" }, { "depth": 3, - "title": "Configure Foundry", - "anchor": "configure-foundry" + "title": "Generate Type-Safe Interfaces", + "anchor": "generate-type-safe-interfaces" }, { "depth": 3, - "title": "Create Your Contract", - "anchor": "create-your-contract-2" + "title": "Initialize the Subxt Client", + "anchor": "initialize-the-subxt-client" }, { "depth": 3, - "title": "Compile", - "anchor": "compile-3" + "title": "Read Chain Data", + "anchor": "read-chain-data" }, { "depth": 3, - "title": "Deploy", - "anchor": "deploy-3" + "title": "Submit Transactions", + "anchor": "submit-transactions" }, { "depth": 2, - "title": "Conclusion", - "anchor": "conclusion" - }, - { - "depth": 3, - "title": "Next Steps", - "anchor": "next-steps" + "title": "Where to Go Next", + "anchor": "where-to-go-next" } ], "stats": { - "chars": 13872, - "words": 1640, - "headings": 24, - "estimated_token_count_total": 3228 + "chars": 9174, + "words": 1175, + "headings": 10, + "estimated_token_count_total": 2187 }, - "hash": "sha256:8f29b0f0b56f8c136206211a858cdc5bc27bcd9119eab179a6cd306182d910cb", + "hash": "sha256:56269d9ea47f5b4e92cd7d5a1e65ab06d181a9c380f90bb3ef285529b12299f7", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-basic-remix", - "title": "Deploy a Basic Contract with Remix IDE", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-basic-remix", + "id": "reference-tools-xcm-tools", + "title": "XCM Tools", + "slug": "reference-tools-xcm-tools", "categories": [ - "Smart Contracts" + "Basics", + "Tooling", + "Dapps" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-basic-remix.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-basic/remix/", - "preview": "This guide demonstrates how to deploy a basic Solidity smart contract to Polkadot Hub using [Remix IDE](https://remix.ethereum.org/){target=\\_blank}, which offers a visual, browser-based environment perfect for rapid prototyping and learning. It requires no local installation and provides an intuitive interface for contract development.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-xcm-tools.md", + "html_url": "https://docs.polkadot.com/reference/tools/xcm-tools/", + "preview": "As described in the [Interoperability](/develop/interoperability){target=\\_blank} section, XCM (Cross-Consensus Messaging) is a protocol used in the Polkadot and Kusama ecosystems to enable communication and interaction between chains. It facilitates cross-chain communication, allowing assets, data, and messages to flow seamlessly across the ecosystem.", "outline": [ { "depth": 2, @@ -10712,48 +13077,54 @@ }, { "depth": 2, - "title": "Prerequisites", - "anchor": "prerequisites" + "title": "Popular XCM Tools", + "anchor": "popular-xcm-tools" }, { - "depth": 2, - "title": "Access Remix", - "anchor": "access-remix" + "depth": 3, + "title": "Moonsong Labs XCM Tools", + "anchor": "moonsong-labs-xcm-tools" }, { - "depth": 2, - "title": "Compile", - "anchor": "compile" + "depth": 3, + "title": "ParaSpell", + "anchor": "paraspell" }, { - "depth": 2, - "title": "Deploy", - "anchor": "deploy" + "depth": 3, + "title": "Astar XCM Tools", + "anchor": "astar-xcm-tools" }, { - "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" + "depth": 3, + "title": "Chopsticks", + "anchor": "chopsticks" + }, + { + "depth": 3, + "title": "Moonbeam XCM SDK", + "anchor": "moonbeam-xcm-sdk" } ], "stats": { - "chars": 2978, - "words": 430, - "headings": 6, - "estimated_token_count_total": 738 + "chars": 7524, + "words": 1043, + "headings": 7, + "estimated_token_count_total": 1700 }, - "hash": "sha256:0c00544ba0be9c0a6fa0c54bdb38045d64e95af714785b86e57f885a03b4b17a", + "hash": "sha256:47328231d6ff4dc52cd93aaf1baf5d0bc2d9fc372f3d79339d87aafa0dabd1b8", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-basic", - "title": "smart-contracts-cookbook-smart-contracts-deploy-basic", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-basic", + "id": "reference-tools-zombienet", + "title": "reference-tools-zombienet", + "slug": "reference-tools-zombienet", "categories": [ "Uncategorized" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-basic.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-basic/", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-zombienet.md", + "html_url": "https://docs.polkadot.com/reference/tools/zombienet/", "preview": "TODO", "outline": [], "stats": { @@ -10763,49 +13134,29 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-erc20-erc20-remix", - "title": "Deploy an ERC-20 to Polkadot Hub", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-erc20-erc20-remix", + "id": "smart-contracts-connect", + "title": "Connect to Polkadot", + "slug": "smart-contracts-connect", "categories": [ - "Basics", "Smart Contracts" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-erc20-erc20-remix.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-erc20/erc20-remix/", - "preview": "[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 and tools via the EVM backend.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-connect.md", + "html_url": "https://docs.polkadot.com/smart-contracts/connect/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ", "outline": [ { "depth": 2, - "title": "Introduction", - "anchor": "introduction" - }, - { - "depth": 2, - "title": "Prerequisites", - "anchor": "prerequisites" - }, - { - "depth": 2, - "title": "Create Your Contract", - "anchor": "create-your-contract" - }, - { - "depth": 2, - "title": "Compile", - "anchor": "compile" - }, - { - "depth": 2, - "title": "Deploy", - "anchor": "deploy" + "title": "Networks Details", + "anchor": "networks-details" }, { "depth": 2, - "title": "Interact with Your Contract", - "anchor": "interact-with-your-contract" + "title": "Test Tokens", + "anchor": "test-tokens" }, { "depth": 2, @@ -10814,32 +13165,27 @@ } ], "stats": { - "chars": 9109, - "words": 1260, - "headings": 7, - "estimated_token_count_total": 2182 + "chars": 3459, + "words": 476, + "headings": 3, + "estimated_token_count_total": 558 }, - "hash": "sha256:0cb418d465a51230ece5d3a56d64754f979bc6c4ad78f2cc3df537b99739e627", + "hash": "sha256:a2490223926957381913ae0ed22e2df3611a6713ec9d77a3015d1cd6a578b3f6", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-erc20", - "title": "Deploy an ERC-20 to Polkadot Hub", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-erc20", + "id": "smart-contracts-cookbook-dapps-zero-to-hero", + "title": "Zero to Hero Smart Contract DApp", + "slug": "smart-contracts-cookbook-dapps-zero-to-hero", "categories": [ - "Basics", - "dApps", - "Smart Contracts" + "dApp", + "Tooling" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-erc20.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-erc20/", - "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-dapps-zero-to-hero.md", + "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/dapps/zero-to-hero/", + "preview": "Decentralized applications (dApps) are a key component of the Web3 ecosystem, enabling developers to build applications that communicate directly with blockchain networks. Polkadot Hub, a blockchain with smart contract support, serves as a robust platform for deploying and interacting with dApps.", "outline": [ - { - "depth": 2, - "title": "Introduction", - "anchor": "introduction" - }, { "depth": 2, "title": "Prerequisites", @@ -10847,75 +13193,103 @@ }, { "depth": 2, - "title": "Create the ERC-20 Contract", - "anchor": "create-the-erc-20-contract" + "title": "Project Overview", + "anchor": "project-overview" }, { "depth": 2, + "title": "Create and Deploy the Storage Contract", + "anchor": "create-and-deploy-the-storage-contract" + }, + { + "depth": 3, + "title": "Set Up Hardhat Project", + "anchor": "set-up-hardhat-project" + }, + { + "depth": 3, + "title": "Create the Storage Contract", + "anchor": "create-the-storage-contract" + }, + { + "depth": 3, + "title": "Configure Hardhat for Polkadot Hub", + "anchor": "configure-hardhat-for-polkadot-hub" + }, + { + "depth": 3, "title": "Compile the Contract", "anchor": "compile-the-contract" }, { - "depth": 2, + "depth": 3, "title": "Deploy the Contract", "anchor": "deploy-the-contract" }, + { + "depth": 3, + "title": "Export the Contract ABI", + "anchor": "export-the-contract-abi" + }, { "depth": 2, - "title": "Interact with Your ERC-20 Contract", - "anchor": "interact-with-your-erc-20-contract" - } - ], - "stats": { - "chars": 8926, - "words": 1207, - "headings": 6, - "estimated_token_count_total": 2107 - }, - "hash": "sha256:296cba75b1d49aefa1b8636ba95ca20c3431b7eb0e93b0658add671ef5801732", - "token_estimator": "heuristic-v1" - }, - { - "id": "smart-contracts-cookbook-smart-contracts-deploy-nft-ethers", - "title": "Deploy an NFT to Polkadot Hub with Ethers.js", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-nft-ethers", - "categories": [ - "Basics", - "Smart Contracts" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-nft-ethers.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-nft/ethers/", - "preview": "Non-Fungible Tokens (NFTs) represent unique digital assets commonly used for digital art, collectibles, gaming, and identity verification.", - "outline": [ + "title": "Set Up the dApp Project", + "anchor": "set-up-the-dapp-project" + }, { "depth": 2, - "title": "Introduction", - "anchor": "introduction" + "title": "Install Dependencies", + "anchor": "install-dependencies" }, { "depth": 2, - "title": "Prerequisites", - "anchor": "prerequisites" + "title": "Connect to Polkadot Hub", + "anchor": "connect-to-polkadot-hub" }, { "depth": 2, - "title": "Set Up Your Project", - "anchor": "set-up-your-project" + "title": "Set Up the Smart Contract Interface", + "anchor": "set-up-the-smart-contract-interface" }, { "depth": 2, - "title": "Create Your Contract", - "anchor": "create-your-contract" + "title": "Create the Wallet Connection Component", + "anchor": "create-the-wallet-connection-component" }, { "depth": 2, - "title": "Compile", - "anchor": "compile" + "title": "Create the Read Contract Component", + "anchor": "create-the-read-contract-component" }, { "depth": 2, - "title": "Deploy", - "anchor": "deploy" + "title": "Create the Write Contract Component", + "anchor": "create-the-write-contract-component" + }, + { + "depth": 2, + "title": "How It Works", + "anchor": "how-it-works" + }, + { + "depth": 3, + "title": "Wallet Connection", + "anchor": "wallet-connection" + }, + { + "depth": 3, + "title": "Data Reads", + "anchor": "data-reads" + }, + { + "depth": 3, + "title": "Data Writes", + "anchor": "data-writes" + }, + { + "depth": 2, + "title": "Conclusion", + "anchor": "conclusion" }, { "depth": 2, @@ -10924,25 +13298,26 @@ } ], "stats": { - "chars": 8114, - "words": 912, - "headings": 7, - "estimated_token_count_total": 2015 + "chars": 31203, + "words": 3688, + "headings": 22, + "estimated_token_count_total": 6967 }, - "hash": "sha256:fdd65f6fe6d109043f11a26f1477e2bbbce1a440dbcb2b191eacfa79a28766e9", + "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-nft-foundry", - "title": "Deploy an NFT to Polkadot Hub with Foundry", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-nft-foundry", + "id": "smart-contracts-cookbook-eth-dapps-uniswap-v2", + "title": "Deploying Uniswap V2 on Polkadot", + "slug": "smart-contracts-cookbook-eth-dapps-uniswap-v2", "categories": [ - "Basics", - "Smart Contracts" + "dApps", + "Tooling" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-nft-foundry.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-nft/foundry/", - "preview": "Non-Fungible Tokens (NFTs) represent unique digital assets commonly used for digital art, collectibles, gaming, and identity verification.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-eth-dapps-uniswap-v2.md", + "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/eth-dapps/uniswap-v2/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", "outline": [ { "depth": 2, @@ -10956,55 +13331,73 @@ }, { "depth": 2, - "title": "Set Up Your Project", - "anchor": "set-up-your-project" - }, - { - "depth": 2, - "title": "Configure Foundry", - "anchor": "configure-foundry" + "title": "Set Up the Project", + "anchor": "set-up-the-project" }, { "depth": 2, - "title": "Create Your Contract", - "anchor": "create-your-contract" + "title": "Understanding Uniswap V2 Architecture", + "anchor": "understanding-uniswap-v2-architecture" }, { "depth": 2, - "title": "Compile", - "anchor": "compile" + "title": "Test the Contracts", + "anchor": "test-the-contracts" }, { "depth": 2, - "title": "Deploy", - "anchor": "deploy" + "title": "Deploy the Contracts", + "anchor": "deploy-the-contracts" }, { "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" + "title": "Conclusion", + "anchor": "conclusion" } ], "stats": { - "chars": 3489, - "words": 438, - "headings": 8, - "estimated_token_count_total": 847 + "chars": 11280, + "words": 1560, + "headings": 7, + "estimated_token_count_total": 2671 + }, + "hash": "sha256:2a42198668c759f63aa602115bf2d290ec7d03bbc3a3df20e30e85027e1b1cc3", + "last_modified": "2025-10-28T14:42:15+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "smart-contracts-cookbook-smart-contracts-deploy-basic", + "title": "smart-contracts-cookbook-smart-contracts-deploy-basic", + "slug": "smart-contracts-cookbook-smart-contracts-deploy-basic", + "categories": [ + "Uncategorized" + ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-basic.md", + "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-basic/", + "preview": "TODO", + "outline": [], + "stats": { + "chars": 5, + "words": 1, + "headings": 0, + "estimated_token_count_total": 0 }, - "hash": "sha256:c4b410125946db479b9c262a5132a31bb7730a778501c3a95910ad9d38007cf4", + "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-nft-hardhat", - "title": "Deploy an NFT to Polkadot Hub with Hardhat", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-nft-hardhat", + "id": "smart-contracts-cookbook-smart-contracts-deploy-erc20", + "title": "Deploy an ERC-20 to Polkadot Hub", + "slug": "smart-contracts-cookbook-smart-contracts-deploy-erc20", "categories": [ "Basics", + "dApps", "Smart Contracts" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-nft-hardhat.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-nft/hardhat/", - "preview": "Non-Fungible Tokens (NFTs) represent unique digital assets commonly used for digital art, collectibles, gaming, and identity verification.", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-erc20.md", + "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-erc20/", + "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", "outline": [ { "depth": 2, @@ -11018,59 +13411,45 @@ }, { "depth": 2, - "title": "Set Up Your Project", - "anchor": "set-up-your-project" - }, - { - "depth": 2, - "title": "Configure Hardhat", - "anchor": "configure-hardhat" - }, - { - "depth": 2, - "title": "Create Your Contract", - "anchor": "create-your-contract" - }, - { - "depth": 2, - "title": "Compile", - "anchor": "compile" + "title": "Create the ERC-20 Contract", + "anchor": "create-the-erc-20-contract" }, { "depth": 2, - "title": "Set Up Deployment", - "anchor": "set-up-deployment" + "title": "Compile the Contract", + "anchor": "compile-the-contract" }, { "depth": 2, - "title": "Deploy", - "anchor": "deploy" + "title": "Deploy the Contract", + "anchor": "deploy-the-contract" }, { "depth": 2, - "title": "Where to Go Next", - "anchor": "where-to-go-next" + "title": "Interact with Your ERC-20 Contract", + "anchor": "interact-with-your-erc-20-contract" } ], "stats": { - "chars": 4745, - "words": 550, - "headings": 9, - "estimated_token_count_total": 1137 + "chars": 8926, + "words": 1207, + "headings": 6, + "estimated_token_count_total": 2107 }, - "hash": "sha256:f787f9c66787c53aa5c6fccf30d622b2b617794d1292641ea256e0896d418b28", + "hash": "sha256:296cba75b1d49aefa1b8636ba95ca20c3431b7eb0e93b0658add671ef5801732", + "last_modified": "2025-10-28T14:42:15+00:00", "token_estimator": "heuristic-v1" }, { - "id": "smart-contracts-cookbook-smart-contracts-deploy-nft-remix", - "title": "Deploy an NFT to Polkadot Hub with Remix", - "slug": "smart-contracts-cookbook-smart-contracts-deploy-nft-remix", + "id": "smart-contracts-cookbook-smart-contracts-deploy-nft-ethers", + "title": "Deploy an NFT to Polkadot Hub with Ethers.js", + "slug": "smart-contracts-cookbook-smart-contracts-deploy-nft-ethers", "categories": [ "Basics", "Smart Contracts" ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-nft-remix.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-nft/remix/", + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-smart-contracts-deploy-nft-ethers.md", + "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/smart-contracts/deploy-nft/ethers/", "preview": "Non-Fungible Tokens (NFTs) represent unique digital assets commonly used for digital art, collectibles, gaming, and identity verification.", "outline": [ { @@ -11085,8 +13464,8 @@ }, { "depth": 2, - "title": "Access Remix", - "anchor": "access-remix" + "title": "Set Up Your Project", + "anchor": "set-up-your-project" }, { "depth": 2, @@ -11110,50 +13489,13 @@ } ], "stats": { - "chars": 3754, - "words": 505, + "chars": 8114, + "words": 912, "headings": 7, - "estimated_token_count_total": 928 - }, - "hash": "sha256:12a8debfbc05c5ac0e2c94daa40167adab837dc4e1b2731f5b48ae8bc9bc2c93", - "token_estimator": "heuristic-v1" - }, - { - "id": "smart-contracts-cookbook", - "title": "Smart Contracts Cookbook Index", - "slug": "smart-contracts-cookbook", - "categories": [ - "Basics", - "dApps", - "Smart Contracts" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook.md", - "html_url": "https://docs.polkadot.com/smart-contracts/cookbook/", - "preview": "Welcome to the Polkadot smart contracts cookbook index.", - "outline": [ - { - "depth": 2, - "title": "Get Tokens from the Faucet", - "anchor": "get-tokens-from-the-faucet" - }, - { - "depth": 2, - "title": "EVM/PVM Smart Contracts", - "anchor": "evmpvm-smart-contracts" - }, - { - "depth": 2, - "title": "Port Ethereum DApps", - "anchor": "port-ethereum-dapps" - } - ], - "stats": { - "chars": 1586, - "words": 204, - "headings": 3, - "estimated_token_count_total": 406 + "estimated_token_count_total": 2015 }, - "hash": "sha256:ea0d085c376117436a9cf68e786da942cf88993651d4e06550f9ee03d2e810f4", + "hash": "sha256:4e3ac6affdbe93ce9d132cbb838be1dfaf7a629b0e1f10ce4d90cc3899d656cb", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11174,6 +13516,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11194,6 +13537,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11270,6 +13614,7 @@ "estimated_token_count_total": 6228 }, "hash": "sha256:72e41f816f07026d96c803f399c71852aa1151c464e79cec3e1746b282d5eaae", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11290,6 +13635,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11310,6 +13656,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11330,6 +13677,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11350,6 +13698,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11370,6 +13719,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11447,6 +13797,7 @@ "estimated_token_count_total": 4190 }, "hash": "sha256:1729ad83ad381a90752540644d400c60add3555e5da296ab455442be81d32f8c", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11467,6 +13818,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11487,6 +13839,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11507,6 +13860,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11548,6 +13902,7 @@ "estimated_token_count_total": 2430 }, "hash": "sha256:e3d8b84cb2cee7010978582998b2269296a042aec53fb016388690ab6adf355e", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11568,6 +13923,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11630,6 +13986,7 @@ "estimated_token_count_total": 1347 }, "hash": "sha256:7589fa1dbdbf5748892ab6d42fc784d833f33e254bd3f95ee58424effcd38323", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11650,6 +14007,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11670,6 +14028,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11712,6 +14071,7 @@ "estimated_token_count_total": 309 }, "hash": "sha256:93e8a3043d65583e3d66f8f5f0ed6f4ef89a908ef85da2b6ca906a1100b7dded", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11748,6 +14108,7 @@ "estimated_token_count_total": 313 }, "hash": "sha256:c609bc98cba5efa2d2a808548cf93ad9d0a06455b35a8fd9f534daf52824f506", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11815,6 +14176,7 @@ "estimated_token_count_total": 1818 }, "hash": "sha256:f50cd1177dd4aff8eb031d6f21cb640f8187a7f2dd0edcaef5c73354a378e44d", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11877,6 +14239,7 @@ "estimated_token_count_total": 1182 }, "hash": "sha256:9542f40acae725e628f4c3155ad1e7e0e18b2eb518484856ad439a1d9f86d1f3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -11959,6 +14322,7 @@ "estimated_token_count_total": 1133 }, "hash": "sha256:0792e3956242eb8e08ab82e2d73964c381074cc8b1ea46f396d136856fa6cc07", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -12072,6 +14436,7 @@ "estimated_token_count_total": 1046 }, "hash": "sha256:dd29fab6e3c00d720b10effa4e50373a6fe9ab4b7bfd3aea892c7fa9c84318a2", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -12268,6 +14633,7 @@ "estimated_token_count_total": 9750 }, "hash": "sha256:1fb7a20bc4a799a771954720428029419ec73afa640e589590c43dd041a7e307", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -12288,6 +14654,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -12345,6 +14712,7 @@ "estimated_token_count_total": 2840 }, "hash": "sha256:224a9f69d4613a5f1afdbc1f05379add8321fe159e32c71db003bbe08ff8e976", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -12365,6 +14733,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -12385,6 +14754,7 @@ "estimated_token_count_total": 0 }, "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -12437,6 +14807,7 @@ "estimated_token_count_total": 1627 }, "hash": "sha256:65809486f62f60c6a6ac8109f9f027361683c23f639991a045ec5c057b665026", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -12524,6 +14895,7 @@ "estimated_token_count_total": 4474 }, "hash": "sha256:c74a28d8d62369591c5734535136508db3d1f7380e486fd214f98d433cafd6e7", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -12616,6 +14988,7 @@ "estimated_token_count_total": 3891 }, "hash": "sha256:e27657e4e4a14fe86f424b96631946ec36fb90d277e6010b6cbd64c4769aba8a", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -12688,6 +15061,7 @@ "estimated_token_count_total": 3250 }, "hash": "sha256:bc771f912627fa09cad64adab1bc81c052f650d6c5a3b4f0c91883a98f6628da", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -12760,6 +15134,7 @@ "estimated_token_count_total": 3035 }, "hash": "sha256:f0d36333d0d3afff7f6374a61d0f6d1fb878c9ef4c4e4c24447745661dbe59d0", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -12812,6 +15187,7 @@ "estimated_token_count_total": 2509 }, "hash": "sha256:205892e350168b3d0da7ccc280c67c3217ad1e45e87a53d124fa1dd69661aa5e", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -12884,6 +15260,7 @@ "estimated_token_count_total": 1122 }, "hash": "sha256:ee87115c828928c82937de26f5f938cecd4c3bb1225fdb61627e8092e6ea5951", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -12895,36 +15272,37 @@ ], "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-precompiles-eth-native.md", "html_url": "https://docs.polkadot.com/smart-contracts/precompiles/eth-native/", - "preview": "Ethereum-native precompiles are special contract implementations that provide essential cryptographic and utility functions at the runtime level. These precompiles are available at predefined addresses and offer optimized, native implementations of commonly used operations that would be computationally expensive or impractical to implement in pure contract code.", - "outline": [ - { - "depth": 2, - "title": "Introduction", - "anchor": "introduction" - }, - { - "depth": 2, - "title": "How to Use Precompiles", - "anchor": "how-to-use-precompiles" - }, - { - "depth": 2, - "title": "Standard Precompiles in Polkadot Hub", - "anchor": "standard-precompiles-in-polkadot-hub" - }, - { - "depth": 2, - "title": "Conclusion", - "anchor": "conclusion" - } + "preview": "TODO", + "outline": [], + "stats": { + "chars": 5, + "words": 1, + "headings": 0, + "estimated_token_count_total": 0 + }, + "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", + "token_estimator": "heuristic-v1" + }, + { + "id": "smart-contracts-precompiles-staking", + "title": "smart-contracts-precompiles-staking", + "slug": "smart-contracts-precompiles-staking", + "categories": [ + "Uncategorized" ], + "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-precompiles-staking.md", + "html_url": "https://docs.polkadot.com/smart-contracts/precompiles/staking/", + "preview": "TODO", + "outline": [], "stats": { "chars": 5232, "words": 532, "headings": 4, "estimated_token_count_total": 1192 }, - "hash": "sha256:f17db5daca8feae70ce428e03a5a4870ef87dfc8571b07376327cd80d057b759", + "hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -12990,43 +15368,8 @@ "headings": 9, "estimated_token_count_total": 2325 }, - "hash": "sha256:c084190ea7d676128e7e399e8fe88598ca150f88d684db279a687ee1c3956120", - "token_estimator": "heuristic-v1" - }, - { - "id": "smart-contracts-precompiles", - "title": "Advanced Functionalities via Precompiles", - "slug": "smart-contracts-precompiles", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-precompiles.md", - "html_url": "https://docs.polkadot.com/smart-contracts/precompiles/", - "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction", - "outline": [ - { - "depth": 2, - "title": "Introduction", - "anchor": "introduction" - }, - { - "depth": 2, - "title": "What are Precompiles?", - "anchor": "what-are-precompiles" - }, - { - "depth": 2, - "title": "Conclusion", - "anchor": "conclusion" - } - ], - "stats": { - "chars": 2525, - "words": 328, - "headings": 3, - "estimated_token_count_total": 412 - }, - "hash": "sha256:a40e3f34f70db22bfe39e40d68dc5a53a726ce47cb73b602d8605355c61ffd22", + "hash": "sha256:4856172c6356357818234a3b7f0828716bd32e6192f3609c51de0cafcc5a75e7", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -13093,6 +15436,7 @@ "estimated_token_count_total": 2249 }, "hash": "sha256:1368f6d49bccb7ba0e642cc58ea2c97ca95ae45e390cb9fa2ab11b0b41de52f4", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -13123,7 +15467,9 @@ "headings": 2, "estimated_token_count_total": 198 }, - "hash": "sha256:467765777cace42ab4e3f1bb36c94f97e655c5d2cd570e00dd747c6a3db043f7", + "hash": "sha256:96acff10be56dea76acdb5c915c1dde0eb15eb12eb95e7871eef56bab6cda273", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -13159,7 +15505,9 @@ "headings": 3, "estimated_token_count_total": 208 }, - "hash": "sha256:3a6704a6330c6e35aa98fe8d615e2e27beb870a48c68bda02c217e6ae77274d2", + "hash": "sha256:61bc251929352f2299ca1d413d05aa9c3672b914575a285d73c7ba53dbd75bff", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -13220,7 +15568,9 @@ "headings": 8, "estimated_token_count_total": 2764 }, - "hash": "sha256:a2bba0ba575bd7e3f7199282ea5994087acf2c62e828f316e6eb62c9a43449e1", + "hash": "sha256:370ed10155cee84889a6d230d0bc3476597448f88a2a271ab87ef893a3268c18", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -13246,7 +15596,9 @@ "headings": 1, "estimated_token_count_total": 12 }, - "hash": "sha256:917ce0777f8ac5a4288e54ce4086432d320b127a7fc753ade5392d766a1f3c33", + "hash": "sha256:086a87823ab67ceac102358030e316583cd733c0ec326316e7f29061fe7f6934", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -13287,7 +15639,8 @@ "headings": 4, "estimated_token_count_total": 339 }, - "hash": "sha256:9559f240b9433b496bfea92b57394a75c28bc743bb756c231f0137dfdf077e4a", + "hash": "sha256:a2bba0ba575bd7e3f7199282ea5994087acf2c62e828f316e6eb62c9a43449e1", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -13369,6 +15722,7 @@ "estimated_token_count_total": 34492 }, "hash": "sha256:bef820acfe429d4a847a8de82de6c70155ac6b3ad5ebdd574a2157923b45f688", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -13399,7 +15753,9 @@ "headings": 2, "estimated_token_count_total": 125 }, - "hash": "sha256:c675e4231537732f24d1dd93f2b248398248a77c9877860fe53926e255ed0710", + "hash": "sha256:d2f3ab658ab29514ac161b17df23e0e7c1f63a7fa4fefcef451ef80b413ab757", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -13492,6 +15848,7 @@ "estimated_token_count_total": 5338 }, "hash": "sha256:b3530f5fc5c9e916181dbc259a7fbae9c60100cb0450fc6d47bbb0d140afa075", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -13563,6 +15920,7 @@ "estimated_token_count_total": 4358 }, "hash": "sha256:87b19f6e881611329b7015e8d8187d7d85b2b2ef14b01e832c8b8e20897e3b40", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -13619,6 +15977,7 @@ "estimated_token_count_total": 2138 }, "hash": "sha256:ff2c267284959711782c0d6ecb4b439c3a6cc31f763d5e1ff2cc3b1f6efb62b2", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -13670,6 +16029,7 @@ "estimated_token_count_total": 2929 }, "hash": "sha256:df60044893f48dd7f37a11de275a16bf32adb31317ed70a789fd7fac64150e1a", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -13761,6 +16121,7 @@ "estimated_token_count_total": 4789 }, "hash": "sha256:81750202081ff24447f4e129c49230eedb315d1b44c740b677c3495a8f7adb9a", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -13842,6 +16203,7 @@ "estimated_token_count_total": 2452 }, "hash": "sha256:1eb463c6b2732ebed0d16165425cde438688d21cc302f759b40250850c2a5e83", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -13904,6 +16266,7 @@ "estimated_token_count_total": 3255 }, "hash": "sha256:fe94de6f97fb588552f6cbc6b1a4c7399e91f5f31585f61a0dee66f5f50ff8a0", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -13929,7 +16292,9 @@ "headings": 1, "estimated_token_count_total": 42 }, - "hash": "sha256:06acc146698c1d3224544987d7ee52da498e3179228f98a494e385c5786a3a2c", + "hash": "sha256:2f11054e0d31c003ebae5d990b559bd56741d190ca409f6ad060216245fa2d17", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -13965,7 +16330,9 @@ "headings": 3, "estimated_token_count_total": 107 }, - "hash": "sha256:fdd391227992c966de25b9240f5492135a9993859ec42b77952c1aa3d2e39ed9", + "hash": "sha256:a6a535f4f5e145d3e2a7518739f752ee3ed37b7745483f414e21c97792331d18", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -14006,7 +16373,9 @@ "headings": 4, "estimated_token_count_total": 400 }, - "hash": "sha256:2fc6f513fd8b269e586b754b2bdbd2af9df5178624a028fab940a385f3fee577", + "hash": "sha256:3ad540d8ad636304705cccb08bc1fdf21fe2fc7dc0f99bd509b23ae96d20e0ba", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -14042,7 +16411,8 @@ "headings": 3, "estimated_token_count_total": 211 }, - "hash": "sha256:5d45ec9f8efda8c4bc2d0c21399a036d017a03540e7efab60d4710cb7eb33eb3", + "hash": "sha256:388c988338ed84589c546bb1606d08641fb931dae307d3df92aeccd2e4986080", + "last_modified": "2025-10-28T14:15:59+00:00", "token_estimator": "heuristic-v1" }, { @@ -14111,6 +16481,7 @@ "estimated_token_count_total": 2702 }, "hash": "sha256:1f8ab387f721d865a7ca75eaa2528f1f2ebd4528a7d65ffeb27c68953100a3cb", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -14179,6 +16550,7 @@ "estimated_token_count_total": 2564 }, "hash": "sha256:97dadddf4c27f469f552875461fc54d331fa151e4656401e15d6d4173115eecf", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -14209,7 +16581,9 @@ "headings": 2, "estimated_token_count_total": 80 }, - "hash": "sha256:1dfbb8c3cfa27f92e982b4ce705415e117c50eb38f641691129863b474741da7", + "hash": "sha256:07629376480e74afc7fe4d91df539b6ab22453df0f8143df11cc51ef9a78f736", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -14245,7 +16619,9 @@ "headings": 3, "estimated_token_count_total": 256 }, - "hash": "sha256:d63121126e51c785f0dfd4ae4ecd49cb71640515d39df69a0689f30a7ab8122f", + "hash": "sha256:cf9197d6909dd8865e8838cad95e3692fefaecc3d2f4773b26809a02051d620f", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -14271,7 +16647,9 @@ "headings": 1, "estimated_token_count_total": 12 }, - "hash": "sha256:94dbafb2d78b87d5f0f0c75de002501b8210ac8d66072bc07989f685837cbac5", + "hash": "sha256:aa6371024bb78c3eeedb6820a37859670046fd0e4f756ad417b20c39fb2983b9", + "last_modified": "2025-10-27T18:04:05+00:00", + "last_modified": "2025-10-27T18:04:05+00:00", "token_estimator": "heuristic-v1" }, { @@ -14324,6 +16702,7 @@ "estimated_token_count_total": 1760 }, "hash": "sha256:9cf70459e921b8b231a3f2e7a7c1d47a4917e45f0c4d0fe873ad4062fd540a9a", + "last_modified": "2025-10-28T14:42:16+00:00", "token_estimator": "heuristic-v1" }, { @@ -14396,6 +16775,7 @@ "estimated_token_count_total": 5118 }, "hash": "sha256:de7fde61d4cac9c28634ee496dcabe116fe44b1b87408f202103290d78247c05", + "last_modified": "2025-10-28T14:42:18+00:00", "token_estimator": "heuristic-v1" }, { @@ -14478,6 +16858,7 @@ "estimated_token_count_total": 6206 }, "hash": "sha256:cb8ddb4a61f6a62182420b69382f1c7ab2adc2f4ae643f7f68c6867680afe81f", + "last_modified": "2025-10-28T14:42:19+00:00", "token_estimator": "heuristic-v1" }, { @@ -14540,114 +16921,7 @@ "estimated_token_count_total": 4135 }, "hash": "sha256:ca1d65d450f086a0eb7b81e9589e9894e04b217fe9709a1b464f09beb3ca9dc2", - "token_estimator": "heuristic-v1" - }, - { - "id": "tutorials-smart-contracts-launch-your-first-project", - "title": "Launch Your First Project", - "slug": "tutorials-smart-contracts-launch-your-first-project", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/tutorials-smart-contracts-launch-your-first-project.md", - "html_url": "https://docs.polkadot.com/tutorials/smart-contracts/launch-your-first-project/", - "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. Kickstart your journey into smart contract development with this comprehensive guide. Learn how to create, deploy, and interact with contracts on Polkadot. Whether you're new to smart contracts or refining your skills, these guides provide a structured approach to launching your project.", - "outline": [ - { - "depth": 2, - "title": "Development Pathway", - "anchor": "development-pathway" - }, - { - "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" - } - ], - "stats": { - "chars": 1211, - "words": 161, - "headings": 2, - "estimated_token_count_total": 77 - }, - "hash": "sha256:8d8fc5f794d4c793586cd3d412627f5e2fe76f182c75c3687abcf33deed5d65e", - "token_estimator": "heuristic-v1" - }, - { - "id": "tutorials-smart-contracts", - "title": "Smart Contracts", - "slug": "tutorials-smart-contracts", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/tutorials-smart-contracts.md", - "html_url": "https://docs.polkadot.com/tutorials/smart-contracts/", - "preview": "!!! smartcontract \"PolkaVM Preview Release\" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. 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.", - "outline": [ - { - "depth": 2, - "title": "What to Expect from These Tutorials", - "anchor": "what-to-expect-from-these-tutorials" - }, - { - "depth": 2, - "title": "Start Building", - "anchor": "start-building" - }, - { - "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" - } - ], - "stats": { - "chars": 1057, - "words": 145, - "headings": 3, - "estimated_token_count_total": 130 - }, - "hash": "sha256:66bc34a12c50539dde2ffc69fe66891f73d3e1a2da5833ada15e26744ff32209", - "token_estimator": "heuristic-v1" - }, - { - "id": "tutorials", - "title": "Tutorials", - "slug": "tutorials", - "categories": [ - "Uncategorized" - ], - "raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/tutorials.md", - "html_url": "https://docs.polkadot.com/tutorials/", - "preview": "Welcome to the Polkadot Tutorials hub! Whether you’re building parachains, integrating system chains, or developing decentralized applications, these step-by-step guides are designed to help you achieve your goals efficiently and effectively.", - "outline": [ - { - "depth": 2, - "title": "Polkadot Zero to Hero", - "anchor": "polkadot-zero-to-hero" - }, - { - "depth": 3, - "title": "Parachain Developers", - "anchor": "parachain-developers" - }, - { - "depth": 2, - "title": "Featured Tutorials", - "anchor": "featured-tutorials" - }, - { - "depth": 2, - "title": "In This Section", - "anchor": "in-this-section" - } - ], - "stats": { - "chars": 2501, - "words": 355, - "headings": 4, - "estimated_token_count_total": 590 - }, - "hash": "sha256:a1d7789d44e4653e98ed41b8a13ea69e7733803c598ca850c9e2fc8f27a2b410", + "last_modified": "2025-10-28T14:42:20+00:00", "token_estimator": "heuristic-v1" } ] \ No newline at end of file diff --git a/llms-full.jsonl b/llms-full.jsonl index 1ff8f8c8f..e7b3d0dd6 100644 --- a/llms-full.jsonl +++ b/llms-full.jsonl @@ -1207,6 +1207,28 @@ {"page_id": "smart-contracts-connect", "page_title": "Connect to Polkadot", "index": 0, "depth": 2, "title": "Networks Details", "anchor": "networks-details", "start_char": 951, "end_char": 1604, "estimated_token_count": 137, "token_estimator": "heuristic-v1", "text": "## Networks Details\n\nDevelopers can leverage smart contracts across diverse networks, from TestNets to MainNet. This section outlines the network specifications and connection details for each environment.\n\n=== \"Polkadot Hub TestNet\"\n\n Network name\n\n ```text\n Polkadot Hub TestNet\n ```\n\n ---\n\n Currency symbol\n \n ```text\n PAS\n ```\n\n ---\n \n Chain ID\n \n ```text\n 420420422\n ```\n\n ---\n \n RPC URL\n \n ```text\n https://testnet-passet-hub-eth-rpc.polkadot.io\n ```\n\n ---\n \n Block explorer URL\n \n ```text\n https://blockscout-passet-hub.parity-testnet.parity.io/\n ```"} {"page_id": "smart-contracts-connect", "page_title": "Connect to Polkadot", "index": 1, "depth": 2, "title": "Test Tokens", "anchor": "test-tokens", "start_char": 1604, "end_char": 2618, "estimated_token_count": 233, "token_estimator": "heuristic-v1", "text": "## Test Tokens\n\nYou will need testnet tokens to perform transactions and engage with smart contracts on any chain. Here's how to obtain Paseo (PAS) tokens for testing purposes:\n\n1. Navigate to the [Polkadot Faucet](https://faucet.polkadot.io/?parachain=1111){target=\\_blank}. If the desired network is not already selected, choose it from the Network drop-down.\n\n2. Copy your address linked to the TestNet and paste it into the designated field.\n\n ![](/images/smart-contracts/connect/connect-to-polkadot-01.webp)\n\n3. Click the **Get Some PASs** button to request free test PAS tokens. These tokens will be sent to your wallet shortly.\n\n ![](/images/smart-contracts/connect/connect-to-polkadot-02.webp)\n\nNow that you have obtained PAS tokens in your wallet, you’re ready to deploy and interact with smart contracts on Polkadot Hub TestNet! These tokens will allow you to pay for gas fees when executing transactions, deploying contracts, and testing your dApp functionality in a secure testnet environment."} {"page_id": "smart-contracts-connect", "page_title": "Connect to Polkadot", "index": 2, "depth": 2, "title": "Where to Go Next", "anchor": "where-to-go-next", "start_char": 2618, "end_char": 3459, "estimated_token_count": 188, "token_estimator": "heuristic-v1", "text": "## Where to Go Next\n\nFor your next steps, explore the various smart contract guides demonstrating how to use and integrate different tools and development environments into your workflow.\n\n
\n\n- Guide __Deploy your first contract with Remix__\n\n ---\n\n Explore the smart contract development and deployment process on Polkadot Hub using the Remix IDE.\n\n [:octicons-arrow-right-24: Build with Remix IDE](/smart-contracts/dev-environments/remix/get-started/)\n\n- Guide __Interact with the blockchain with viem__\n\n ---\n\n Use viem for interacting with Ethereum-compatible chains, to deploy and interact with smart contracts on Polkadot Hub.\n\n [:octicons-arrow-right-24: Build with viem](/smart-contracts/libraries/viem/)\n\n
"} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 0, "depth": 2, "title": "Prerequisites", "anchor": "prerequisites", "start_char": 787, "end_char": 1258, "estimated_token_count": 113, "token_estimator": "heuristic-v1", "text": "## Prerequisites\n\nBefore getting started, ensure you have the following:\n\n- [Node.js](https://nodejs.org/en){target=\\_blank} v22.10.0 or later installed on your system.\n- A crypto wallet (such as MetaMask) funded with test tokens. Refer to the [Connect to Polkadot](/smart-contracts/connect){target=\\_blank} guide for more details.\n- A basic understanding of React and JavaScript.\n- Some familiarity with blockchain fundamentals and Solidity (helpful but not required)."} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 1, "depth": 2, "title": "Project Overview", "anchor": "project-overview", "start_char": 1258, "end_char": 2446, "estimated_token_count": 296, "token_estimator": "heuristic-v1", "text": "## Project Overview\n\nThis dApp will interact with a basic Storage contract that you will create and deploy with Hardhat. The contract will allow you to:\n\n- Store a number on the blockchain.\n- Retrieve the stored number from the blockchain.\n- Update the stored number with a new value.\n\nYour project directory will be organized as follows:\n\n```bash\npolkadot-hub-tutorial/\n├── storage-contract/ # Hardhat project for smart contract\n│ ├── contracts/\n│ │ └── Storage.sol\n│ ├── scripts/\n│ │ └── deploy.ts\n│ ├── artifacts/\n│ │ └── contracts/\n│ │ └── Storage.sol/\n│ │ └── Storage.json\n│ ├── hardhat.config.ts\n│ ├── .env\n│ └── package.json\n│\n└── dapp/ # Next.js dApp project\n ├── abis/\n │ └── Storage.json\n └── app/\n ├── components/\n │ ├── ReadContract.tsx\n │ ├── WalletConnect.tsx\n │ └── WriteContract.tsx\n ├── utils/\n │ ├── contract.ts\n │ └── viem.ts\n ├── favicon.ico\n ├── globals.css\n ├── layout.tsx\n └── page.tsx\n```\n\nCreate the main folder for the project:\n\n```bash\nmkdir polkadot-hub-tutorial\ncd polkadot-hub-tutorial\n```"} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 2, "depth": 2, "title": "Create and Deploy the Storage Contract", "anchor": "create-and-deploy-the-storage-contract", "start_char": 2446, "end_char": 2695, "estimated_token_count": 48, "token_estimator": "heuristic-v1", "text": "## Create and Deploy the Storage Contract\n\nBefore building the dApp, you'll need to create and deploy the Storage smart contract. This section will guide you through using Hardhat to write, compile, and deploy the contract to Polkadot Hub TestNet."} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 3, "depth": 3, "title": "Set Up Hardhat Project", "anchor": "set-up-hardhat-project", "start_char": 2695, "end_char": 3094, "estimated_token_count": 100, "token_estimator": "heuristic-v1", "text": "### Set Up Hardhat Project\n\nFirst, create a new directory for your Hardhat project and initialize it:\n\n```bash\nmkdir storage-contract\ncd storage-contract\nnpm init -y\n```\n\nInstall Hardhat and its dependencies:\n\n```bash\nnpm install --save-dev hardhat@3.0.9\n```\n\nInitialize a new Hardhat project:\n\n```bash\nnpx hardhat --init\n```\n\nSelect **Create a TypeScript project** and accept the default options."} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 4, "depth": 3, "title": "Create the Storage Contract", "anchor": "create-the-storage-contract", "start_char": 3094, "end_char": 3633, "estimated_token_count": 112, "token_estimator": "heuristic-v1", "text": "### Create the Storage Contract\n\nIn the `contracts` directory, create a new file called `Storage.sol` and add the following code:\n\n```solidity title=\"Storage.sol\"\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract Storage {\n uint256 private storedNumber;\n\n event NumberStored(uint256 newNumber);\n\n function setNumber(uint256 _number) public {\n storedNumber = _number;\n emit NumberStored(_number);\n }\n}\n```\n\nThis simple contract stores a single number and provides functions to read and update it."} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 5, "depth": 3, "title": "Configure Hardhat for Polkadot Hub", "anchor": "configure-hardhat-for-polkadot-hub", "start_char": 3633, "end_char": 5430, "estimated_token_count": 415, "token_estimator": "heuristic-v1", "text": "### Configure Hardhat for Polkadot Hub\n\nUpdate your `hardhat.config.ts` file to include the Polkadot Hub TestNet configuration:\n\n```typescript title=\"hardhat.config.ts\" hl_lines=\"39-44\"\nimport type { HardhatUserConfig } from \"hardhat/config\";\n\nimport hardhatToolboxViemPlugin from \"@nomicfoundation/hardhat-toolbox-viem\";\nimport { configVariable } from \"hardhat/config\";\n\nconst config: HardhatUserConfig = {\n plugins: [hardhatToolboxViemPlugin],\n solidity: {\n profiles: {\n default: {\n version: \"0.8.28\",\n },\n production: {\n version: \"0.8.28\",\n settings: {\n optimizer: {\n enabled: true,\n runs: 200,\n },\n },\n },\n },\n },\n networks: {\n hardhatMainnet: {\n type: \"edr-simulated\",\n chainType: \"l1\",\n },\n hardhatOp: {\n type: \"edr-simulated\",\n chainType: \"op\",\n },\n sepolia: {\n type: \"http\",\n chainType: \"l1\",\n url: configVariable(\"SEPOLIA_RPC_URL\"),\n accounts: [configVariable(\"SEPOLIA_PRIVATE_KEY\")],\n },\n polkadotTestNet: {\n type: \"http\",\n chainType: \"l1\",\n url: 'http://127.0.0.1:8545',\n accounts: [process.env.PRIVATE_KEY || ''],\n },\n },\n};\n\nexport default config;\n```\n\nCreate a `.env` file in the root of your Hardhat project:\n\n```text title=\".env\"\nPRIVATE_KEY=INSERT_PRIVATE_KEY_HERE\n```\n\nReplace `INSERT_PRIVATE_KEY_HERE` with your actual private key. You can get this by exporting the private key from your wallet (e.g., MetaMask).\n\n!!! warning\n Never commit your private key to version control. Use environment variables or a `.env` file (and add it to `.gitignore`) to manage sensitive information. Keep your private key safe, and never share it with anyone. If it is compromised, your funds can be stolen."} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 6, "depth": 3, "title": "Compile the Contract", "anchor": "compile-the-contract", "start_char": 5430, "end_char": 5579, "estimated_token_count": 29, "token_estimator": "heuristic-v1", "text": "### Compile the Contract\n\nCompile your Storage contract:\n\n```bash\nnpx hardhat compile\n```\n\nYou should see output indicating successful compilation."} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 7, "depth": 3, "title": "Deploy the Contract", "anchor": "deploy-the-contract", "start_char": 5579, "end_char": 7212, "estimated_token_count": 416, "token_estimator": "heuristic-v1", "text": "### Deploy the Contract\n\nCreate a deployment script in the `ignition/modules` directory called `Storage.ts`:\n\n```typescript title=\"Storage.ts\"\nimport { buildModule } from \"@nomicfoundation/hardhat-ignition/modules\";\n\nexport default buildModule(\"StorageModule\", (m) => {\n const storage = m.contract(\"Storage\");\n\n return { storage };\n});\n```\n\nDeploy the contract to Polkadot Hub TestNet:\n\n```bash\nnpx hardhat ignition deploy ./ignition/modules/Storage.ts --network polkadotHub\n```\n\nYou should see output similar to:\n\n
\n npx hardhat ignition deploy ./ignition/modules/Storage.ts --network polkadotTestNet\n WARNING: You are using Node.js 23.11.0 which is not supported by Hardhat.\n Please upgrade to 22.10.0 or a later LTS version (even major version number)\n ✔ Confirm deploy to network polkadotTestNet (420420420)? … yes\n Hardhat Ignition 🚀\n Deploying [ StorageModule ]\n Batch #1\n Executed StorageModule#Storage\n [ StorageModule ] successfully deployed 🚀\n Deployed Addresses\n StorageModule#Storage - 0xc01Ee7f10EA4aF4673cFff62710E1D7792aBa8f3\n
\n\n!!! note\n Save the deployed contract address - you'll need it when building your dApp. In the following sections, we'll reference a pre-deployed contract at `0xc01Ee7f10EA4aF4673cFff62710E1D7792aBa8f3`, but you can use your own deployed contract address instead."} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 8, "depth": 3, "title": "Export the Contract ABI", "anchor": "export-the-contract-abi", "start_char": 7212, "end_char": 7599, "estimated_token_count": 89, "token_estimator": "heuristic-v1", "text": "### Export the Contract ABI\n\nAfter deployment, you'll need the contract's Application Binary Interface (ABI) for your dApp. You can find it in the `artifacts/contracts/Storage.sol/Storage.json` file generated by Hardhat. You'll use this in the next section when setting up your dApp.\n\nNow that you have your contract deployed, you're ready to build the dApp that will interact with it!"} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 9, "depth": 2, "title": "Set Up the dApp Project", "anchor": "set-up-the-dapp-project", "start_char": 7599, "end_char": 7796, "estimated_token_count": 59, "token_estimator": "heuristic-v1", "text": "## Set Up the dApp Project\n\nNavigate to the root of the project, and create a new Next.js project called `dapp`:\n\n```bash\nnpx create-next-app dapp --ts --eslint --tailwind --app --yes\ncd dapp\n```"} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 10, "depth": 2, "title": "Install Dependencies", "anchor": "install-dependencies", "start_char": 7796, "end_char": 7955, "estimated_token_count": 50, "token_estimator": "heuristic-v1", "text": "## Install Dependencies\n\nInstall viem and related packages:\n\n```bash\nnpm install viem@2.38.5\nnpm install --save-dev typescript@5.9.3 @types/node@22.19.24\n```"} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 11, "depth": 2, "title": "Connect to Polkadot Hub", "anchor": "connect-to-polkadot-hub", "start_char": 7955, "end_char": 10052, "estimated_token_count": 509, "token_estimator": "heuristic-v1", "text": "## Connect to Polkadot Hub\n\nTo interact with Polkadot Hub, you need to set up a [Public Client](https://viem.sh/docs/clients/public#public-client){target=\\_blank} that connects to the blockchain. In this example, you will interact with the Polkadot Hub TestNet, to experiment safely. Start by creating a new file called `utils/viem.ts` and add the following code:\n\n```typescript title=\"viem.ts\"\nimport { createPublicClient, http, createWalletClient, custom } from 'viem'\nimport 'viem/window';\n\nconst transport = http('http://127.0.0.1:8545') // TODO: change to the paseo asset hub RPC URL when it's available\n\n// Configure the Polkadot Testnet Hub chain\nexport const polkadotTestnet = {\n id: 420420420,\n name: 'Polkadot Testnet',\n network: 'polkadot-testnet',\n nativeCurrency: {\n decimals: 18,\n name: 'PAS',\n symbol: 'PAS',\n },\n rpcUrls: {\n default: {\n http: ['http://127.0.0.1:8545'], // TODO: change to the paseo asset hub RPC URL\n },\n },\n} as const\n\n// Create a public client for reading data\nexport const publicClient = createPublicClient({\n chain: polkadotTestnet,\n transport\n})\n\n// Create a wallet client for signing transactions\nexport const getWalletClient = async () => {\n if (typeof window !== 'undefined' && window.ethereum) {\n const [account] = await window.ethereum.request({ method: 'eth_requestAccounts' });\n return createWalletClient({\n chain: polkadotTestnet,\n transport: custom(window.ethereum),\n account,\n });\n }\n throw new Error('No Ethereum browser provider detected');\n};\n```\n\nThis file initializes a viem client, providing helper functions for obtaining a Public Client and a [Wallet Client](https://viem.sh/docs/clients/wallet#wallet-client){target=\\_blank}. The Public Client enables reading blockchain data, while the Wallet Client allows users to sign and send transactions. Also, note that by importing `viem/window` the global `window.ethereum` will be typed as an `EIP1193Provider`, check the [`window` Polyfill](https://viem.sh/docs/typescript#window-polyfill){target=\\_blank} reference for more information."} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 12, "depth": 2, "title": "Set Up the Smart Contract Interface", "anchor": "set-up-the-smart-contract-interface", "start_char": 10052, "end_char": 11943, "estimated_token_count": 415, "token_estimator": "heuristic-v1", "text": "## Set Up the Smart Contract Interface\n\nFor this dApp, you'll use a simple [Storage contract](/tutorials/smart-contracts/launch-your-first-project/create-contracts){target=\\_blank} that's already deployed in the Polkadot Hub TestNet: `0xc01Ee7f10EA4aF4673cFff62710E1D7792aBa8f3`. To interact with it, you need to define the contract interface.\n\nCreate a folder called `abis` at the root of your project, then create a file named `Storage.json` and paste the corresponding ABI of the Storage contract. You can copy and paste the following:\n\n```bash\ncp ./storage-contract/artifacts/contracts/Storage.sol/Storage.json ./dapp/abis/Storage.json\n```\n\nNext, create a file called `utils/contract.ts`:\n\n```typescript title=\"contract.ts\"\nimport { getContract } from 'viem';\nimport { publicClient, getWalletClient } from './viem';\nimport StorageABI from '../abis/Storage.json';\n\nexport const CONTRACT_ADDRESS = '0xc01Ee7f10EA4aF4673cFff62710E1D7792aBa8f3'; // TODO: change when the paseo asset hub RPC URL is available, and the contract is redeployed\nexport const CONTRACT_ABI = StorageABI.abi;\n\n// Create a function to get a contract instance for reading\nexport const getContractInstance = () => {\n return getContract({\n address: CONTRACT_ADDRESS,\n abi: CONTRACT_ABI,\n client: publicClient,\n });\n};\n\n// Create a function to get a contract instance with a signer for writing\nexport const getSignedContract = async () => {\n const walletClient = await getWalletClient();\n return getContract({\n address: CONTRACT_ADDRESS,\n abi: CONTRACT_ABI,\n client: walletClient,\n });\n};\n```\n\nThis file defines the contract address, ABI, and functions to create a viem [contract instance](https://viem.sh/docs/contract/getContract#contract-instances){target=\\_blank} for reading and writing operations. viem's contract utilities enable more efficient, type-safe interaction with smart contracts."} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 13, "depth": 2, "title": "Create the Wallet Connection Component", "anchor": "create-the-wallet-connection-component", "start_char": 11943, "end_char": 17968, "estimated_token_count": 1343, "token_estimator": "heuristic-v1", "text": "## Create the Wallet Connection Component\n\nNow, let's create a component to handle wallet connections. Create a new file called `components/WalletConnect.tsx`:\n\n```typescript title=\"WalletConnect.tsx\"\n\"use client\";\n\nimport React, { useState, useEffect } from \"react\";\nimport { polkadotTestnet } from \"../utils/viem\";\n\ninterface WalletConnectProps {\n onConnect: (account: string) => void;\n}\n\nconst WalletConnect: React.FC = ({ onConnect }) => {\n const [account, setAccount] = useState(null);\n const [chainId, setChainId] = useState(null);\n const [error, setError] = useState(null);\n\n useEffect(() => {\n // Check if user already has an authorized wallet connection\n const checkConnection = async () => {\n if (typeof window !== 'undefined' && window.ethereum) {\n try {\n // eth_accounts doesn't trigger the wallet popup\n const accounts = await window.ethereum.request({\n method: 'eth_accounts',\n }) as string[];\n \n if (accounts.length > 0) {\n setAccount(accounts[0]);\n const chainIdHex = await window.ethereum.request({\n method: 'eth_chainId',\n }) as string;\n setChainId(parseInt(chainIdHex, 16));\n onConnect(accounts[0]);\n }\n } catch (err) {\n console.error('Error checking connection:', err);\n setError('Failed to check wallet connection');\n }\n }\n };\n\n checkConnection();\n\n if (typeof window !== 'undefined' && window.ethereum) {\n // Setup wallet event listeners\n window.ethereum.on('accountsChanged', (accounts: string[]) => {\n setAccount(accounts[0] || null);\n if (accounts[0]) onConnect(accounts[0]);\n });\n\n window.ethereum.on('chainChanged', (chainIdHex: string) => {\n setChainId(parseInt(chainIdHex, 16));\n });\n }\n\n return () => {\n // Cleanup event listeners\n if (typeof window !== 'undefined' && window.ethereum) {\n window.ethereum.removeListener('accountsChanged', () => {});\n window.ethereum.removeListener('chainChanged', () => {});\n }\n };\n }, [onConnect]);\n\n const connectWallet = async () => {\n if (typeof window === 'undefined' || !window.ethereum) {\n setError(\n 'MetaMask not detected! Please install MetaMask to use this dApp.'\n );\n return;\n }\n\n try {\n // eth_requestAccounts triggers the wallet popup\n const accounts = await window.ethereum.request({\n method: 'eth_requestAccounts',\n }) as string[];\n \n setAccount(accounts[0]);\n\n const chainIdHex = await window.ethereum.request({\n method: 'eth_chainId',\n }) as string;\n \n const currentChainId = parseInt(chainIdHex, 16);\n setChainId(currentChainId);\n\n // Prompt user to switch networks if needed\n if (currentChainId !== polkadotTestnet.id) {\n await switchNetwork();\n }\n\n onConnect(accounts[0]);\n } catch (err) {\n console.error('Error connecting to wallet:', err);\n setError('Failed to connect wallet');\n }\n };\n\n const switchNetwork = async () => {\n console.log('Switch network')\n try {\n await window.ethereum.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: `0x${polkadotTestnet.id.toString(16)}` }],\n });\n } catch (switchError: any) {\n // Error 4902 means the chain hasn't been added to MetaMask\n if (switchError.code === 4902) {\n try {\n await window.ethereum.request({\n method: 'wallet_addEthereumChain',\n params: [\n {\n chainId: `0x${polkadotTestnet.id.toString(16)}`,\n chainName: polkadotTestnet.name,\n rpcUrls: [polkadotTestnet.rpcUrls.default.http[0]],\n nativeCurrency: {\n name: polkadotTestnet.nativeCurrency.name,\n symbol: polkadotTestnet.nativeCurrency.symbol,\n decimals: polkadotTestnet.nativeCurrency.decimals,\n },\n },\n ],\n });\n } catch (addError) {\n setError('Failed to add network to wallet');\n }\n } else {\n setError('Failed to switch network');\n }\n }\n };\n\n // UI-only disconnection - MetaMask doesn't support programmatic disconnection\n const disconnectWallet = () => {\n setAccount(null);\n };\n\n return (\n
\n {error &&

{error}

}\n\n {!account ? (\n \n Connect Wallet\n \n ) : (\n
\n \n {`${account.substring(0, 6)}...${account.substring(38)}`}\n \n \n Disconnect\n \n {chainId !== polkadotTestnet.id && (\n \n Switch to Polkadot Testnet\n \n )}\n
\n )}\n
\n );\n};\n\nexport default WalletConnect;\n```\n\nThis component handles connecting to the wallet, switching networks if necessary, and keeping track of the connected account. It provides a button for users to connect their wallet and displays the connected account address once connected."} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 14, "depth": 2, "title": "Create the Read Contract Component", "anchor": "create-the-read-contract-component", "start_char": 17968, "end_char": 20502, "estimated_token_count": 617, "token_estimator": "heuristic-v1", "text": "## Create the Read Contract Component\n\nNow, let's create a component to read data from the contract. Create a file called `components/ReadContract.tsx`:\n\n```typescript title=\"ReadContract.tsx\"\n'use client';\n\nimport React, { useState, useEffect } from 'react';\nimport { publicClient } from '../utils/viem';\nimport { CONTRACT_ADDRESS, CONTRACT_ABI } from '../utils/contract';\n\nconst ReadContract: React.FC = () => {\n const [storedNumber, setStoredNumber] = useState(null);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState(null);\n\n useEffect(() => {\n // Function to read data from the blockchain\n const fetchData = async () => {\n try {\n setLoading(true);\n // Call the smart contract's storedNumber function\n const number = await publicClient.readContract({\n address: CONTRACT_ADDRESS,\n abi: CONTRACT_ABI,\n functionName: 'storedNumber',\n args: [],\n }) as bigint;\n\n setStoredNumber(number.toString());\n setError(null);\n } catch (err) {\n console.error('Error fetching stored number:', err);\n setError('Failed to fetch data from the contract');\n } finally {\n setLoading(false);\n }\n };\n\n fetchData();\n\n // Poll for updates every 10 seconds to keep UI in sync with blockchain\n const interval = setInterval(fetchData, 10000);\n\n // Clean up interval on component unmount\n return () => clearInterval(interval);\n }, []);\n\n return (\n
\n

Contract Data

\n {loading ? (\n
\n
\n
\n ) : error ? (\n

{error}

\n ) : (\n
\n

\n Stored Number: {storedNumber}\n

\n
\n )}\n
\n );\n};\n\nexport default ReadContract;\n```\n\nThis component reads the `storedNumber` value from the contract and displays it to the user. It also sets up a polling interval to refresh the data periodically, ensuring that the UI stays in sync with the blockchain state."} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 15, "depth": 2, "title": "Create the Write Contract Component", "anchor": "create-the-write-contract-component", "start_char": 20502, "end_char": 28611, "estimated_token_count": 1825, "token_estimator": "heuristic-v1", "text": "## Create the Write Contract Component\n\nFinally, let's create a component that allows users to update the stored number. Create a file called `components/WriteContract.tsx`:\n\n```typescript title=\"WriteContract.tsx\"\n\"use client\";\n\nimport React, { useState, useEffect } from \"react\";\nimport { publicClient, getWalletClient } from '../utils/viem';\nimport { CONTRACT_ADDRESS, CONTRACT_ABI } from '../utils/contract';\n\ninterface WriteContractProps {\n account: string | null;\n}\n\nconst WriteContract: React.FC = ({ account }) => {\n const [newNumber, setNewNumber] = useState(\"\");\n const [status, setStatus] = useState<{\n type: string | null;\n message: string;\n }>({\n type: null,\n message: \"\",\n });\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [isCorrectNetwork, setIsCorrectNetwork] = useState(true);\n\n // Check if the account is on the correct network\n useEffect(() => {\n const checkNetwork = async () => {\n if (!account) return;\n\n try {\n // Get the chainId from the public client\n const chainId = await publicClient.getChainId();\n\n // Get the user's current chainId from their wallet\n const walletClient = await getWalletClient();\n if (!walletClient) return;\n\n const walletChainId = await walletClient.getChainId();\n\n // Check if they match\n setIsCorrectNetwork(chainId === walletChainId);\n } catch (err) {\n console.error(\"Error checking network:\", err);\n setIsCorrectNetwork(false);\n }\n };\n\n checkNetwork();\n }, [account]);\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n // Validation checks\n if (!account) {\n setStatus({ type: \"error\", message: \"Please connect your wallet first\" });\n return;\n }\n\n if (!isCorrectNetwork) {\n setStatus({\n type: \"error\",\n message: \"Please switch to the correct network in your wallet\",\n });\n return;\n }\n\n if (!newNumber || isNaN(Number(newNumber))) {\n setStatus({ type: \"error\", message: \"Please enter a valid number\" });\n return;\n }\n\n try {\n setIsSubmitting(true);\n setStatus({ type: \"info\", message: \"Initiating transaction...\" });\n\n // Get wallet client for transaction signing\n const walletClient = await getWalletClient();\n\n if (!walletClient) {\n setStatus({ type: \"error\", message: \"Wallet client not available\" });\n return;\n }\n\n // Check if account matches\n if (\n walletClient.account?.address.toLowerCase() !== account.toLowerCase()\n ) {\n setStatus({\n type: \"error\",\n message:\n \"Connected wallet account doesn't match the selected account\",\n });\n return;\n }\n\n // Prepare transaction and wait for user confirmation in wallet\n setStatus({\n type: \"info\",\n message: \"Please confirm the transaction in your wallet...\",\n });\n\n // Simulate the contract call first\n console.log('newNumber', newNumber);\n const { request } = await publicClient.simulateContract({\n address: CONTRACT_ADDRESS,\n abi: CONTRACT_ABI,\n functionName: \"setNumber\",\n args: [BigInt(newNumber)],\n account: walletClient.account,\n });\n\n // Send the transaction with wallet client\n const hash = await walletClient.writeContract(request);\n\n // Wait for transaction to be mined\n setStatus({\n type: \"info\",\n message: \"Transaction submitted. Waiting for confirmation...\",\n });\n\n const receipt = await publicClient.waitForTransactionReceipt({\n hash,\n });\n\n setStatus({\n type: \"success\",\n message: `Transaction confirmed! Transaction hash: ${receipt.transactionHash}`,\n });\n\n setNewNumber(\"\");\n } catch (err: any) {\n console.error(\"Error updating number:\", err);\n\n // Handle specific errors\n if (err.code === 4001) {\n // User rejected transaction\n setStatus({ type: \"error\", message: \"Transaction rejected by user.\" });\n } else if (err.message?.includes(\"Account not found\")) {\n // Account not found on the network\n setStatus({\n type: \"error\",\n message:\n \"Account not found on current network. Please check your wallet is connected to the correct network.\",\n });\n } else if (err.message?.includes(\"JSON is not a valid request object\")) {\n // JSON error - specific to your current issue\n setStatus({\n type: \"error\",\n message:\n \"Invalid request format. Please try again or contact support.\",\n });\n } else {\n // Other errors\n setStatus({\n type: \"error\",\n message: `Error: ${err.message || \"Failed to send transaction\"}`,\n });\n }\n } finally {\n setIsSubmitting(false);\n }\n };\n\n return (\n
\n

Update Stored Number

\n\n {!isCorrectNetwork && account && (\n
\n ⚠️ You are not connected to the correct network. Please switch\n networks in your wallet.\n
\n )}\n\n {status.message && (\n \n {status.message}\n
\n )}\n\n
\n setNewNumber(e.target.value)}\n disabled={isSubmitting || !account}\n className=\"w-full p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-pink-400\"\n />\n \n {isSubmitting ? \"Updating...\" : \"Update\"}\n \n \n\n {!account && (\n

\n Connect your wallet to update the stored number.\n

\n )}\n
\n );\n};\n\nexport default WriteContract;\n```\n\nThis component allows users to input a new number and send a transaction to update the value stored in the contract. It provides appropriate feedback during each step of the transaction process and handles error scenarios.\n\nUpdate the `app/page.tsx` file to integrate all components:\n\n```typescript title=\"page.tsx\"\n\"use client\";\n\nimport { useState } from \"react\";\nimport WalletConnect from \"./components/WalletConnect\";\nimport ReadContract from \"./components/ReadContract\";\nimport WriteContract from \"./components/WriteContract\";\n\nexport default function Home() {\n const [account, setAccount] = useState(null);\n\n const handleConnect = (connectedAccount: string) => {\n setAccount(connectedAccount);\n };\n\n return (\n
\n

\n Polkadot Hub - Zero To Hero DApp\n

\n \n \n \n
\n );\n}\n```\n\nRun the dApp:\n\n```bash\nnpm run dev\n```\n\nNavigate to `http://localhost:3000` in your browser, and you should see your dApp with the wallet connection button, the stored number displayed, and the form to update the number. You should see something like this:"} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 16, "depth": 2, "title": "How It Works", "anchor": "how-it-works", "start_char": 28611, "end_char": 28704, "estimated_token_count": 18, "token_estimator": "heuristic-v1", "text": "## How It Works\n\nThis dApp uses components to interact with the blockchain in several ways."} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 17, "depth": 3, "title": "Wallet Connection", "anchor": "wallet-connection", "start_char": 28704, "end_char": 29010, "estimated_token_count": 60, "token_estimator": "heuristic-v1", "text": "### Wallet Connection \n\nThe `WalletConnect` component uses the browser's Ethereum provider (MetaMask) to connect to the user's wallet and handles network switching to ensure the user is connected to the Polkadot Hub TestNet. Once connected, it provides the user's account address to the parent component."} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 18, "depth": 3, "title": "Data Reads", "anchor": "data-reads", "start_char": 29010, "end_char": 29311, "estimated_token_count": 57, "token_estimator": "heuristic-v1", "text": "### Data Reads\n\nThe `ReadContract` component uses viem's `readContract` function to call the `storedNumber` view function and periodically poll for updates to keep the UI in sync with the blockchain state. The component also displays a loading indicator while fetching data and handles error states."} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 19, "depth": 3, "title": "Data Writes", "anchor": "data-writes", "start_char": 29311, "end_char": 29713, "estimated_token_count": 71, "token_estimator": "heuristic-v1", "text": "### Data Writes\n\nThe `WriteContract` component uses viem's `writeContract` function to send a transaction to the `setNumber` function and ensures the wallet is connected before allowing a transaction. The component shows detailed feedback during transaction submission and confirmation. After a successful transaction, the value displayed in the `ReadContract` component will update on the next poll."} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 20, "depth": 2, "title": "Conclusion", "anchor": "conclusion", "start_char": 29713, "end_char": 30610, "estimated_token_count": 178, "token_estimator": "heuristic-v1", "text": "## Conclusion\n\nCongratulations! You've successfully built a fully functional dApp that interacts with a smart contract on Polkadot Hub using viem and Next.js. Your application can now:\n\n- Create a smart contract with Hardhat and deploy it to Polkadot Hub TestNet.\n- Connect to a user's wallet and handle network switching.\n- Read data from a smart contract and keep it updated.\n- Write data to the blockchain through transactions.\n\nThese fundamental skills provide the foundation for building more complex dApps on Polkadot Hub. With this knowledge, you can extend your application to interact with more sophisticated smart contracts and create advanced user interfaces.\n\nTo get started right away with a working example, you can clone the repository and navigate to the implementation:\n\n```bash\ngit clone https://github.com/polkadot-developers/revm-hardhat-examples.git\ncd zero-to-hero-dapp\n```"} +{"page_id": "smart-contracts-cookbook-dapps-zero-to-hero", "page_title": "Zero to Hero Smart Contract DApp", "index": 21, "depth": 2, "title": "Where to Go Next", "anchor": "where-to-go-next", "start_char": 30610, "end_char": 31203, "estimated_token_count": 147, "token_estimator": "heuristic-v1", "text": "## Where to Go Next\n\n
\n\n- Guide __Port Ethereum Projects to Polkadot Hub__\n\n ---\n\n Learn how to port an Ethereum project to Polkadot Hub using Hardhat and Viem.\n\n [:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/eth-dapps/)\n\n- Guide __Dive Deeper into Polkadot Precompiles__\n\n ---\n\n Learn how to use the Polkadot precompiles to interact with the blockchain.\n\n [:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/polkadot-precompiles/)\n
"} {"page_id": "smart-contracts-cookbook-eth-dapps-uniswap-v2", "page_title": "Deploying Uniswap V2 on Polkadot", "index": 0, "depth": 2, "title": "Introduction", "anchor": "introduction", "start_char": 191, "end_char": 857, "estimated_token_count": 131, "token_estimator": "heuristic-v1", "text": "## Introduction\n\nDecentralized exchanges (DEXs) are a cornerstone of the DeFi ecosystem, allowing for permissionless token swaps without intermediaries. [Uniswap V2](https://docs.uniswap.org/contracts/v2/overview){target=\\_blank}, with its Automated Market Maker (AMM) model, revolutionized DEXs by enabling liquidity provision for any ERC-20 token pair.\n\nThis 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."} {"page_id": "smart-contracts-cookbook-eth-dapps-uniswap-v2", "page_title": "Deploying Uniswap V2 on Polkadot", "index": 1, "depth": 2, "title": "Prerequisites", "anchor": "prerequisites", "start_char": 857, "end_char": 1357, "estimated_token_count": 124, "token_estimator": "heuristic-v1", "text": "## Prerequisites\n\nBefore starting, make sure you have:\n\n- Node.js (v16.0.0 or later) and npm installed.\n- Basic understanding of Solidity and JavaScript.\n- Familiarity with [`hardhat-polkadot`](/smart-contracts/dev-environments/hardhat/get-started/){target=\\_blank} development environment.\n- Some PAS test tokens to cover transaction fees (obtained from the [Polkadot faucet](https://faucet.polkadot.io/?parachain=1111){target=\\_blank}).\n- Basic understanding of how AMMs and liquidity pools work."} {"page_id": "smart-contracts-cookbook-eth-dapps-uniswap-v2", "page_title": "Deploying Uniswap V2 on Polkadot", "index": 2, "depth": 2, "title": "Set Up the Project", "anchor": "set-up-the-project", "start_char": 1357, "end_char": 3682, "estimated_token_count": 570, "token_estimator": "heuristic-v1", "text": "## Set Up the Project\n\nLet's start by cloning the Uniswap V2 project:\n\n1. Clone the Uniswap V2 repository:\n\n ```\n git clone https://github.com/polkadot-developers/polkavm-hardhat-examples.git -b v0.0.6\n cd polkavm-hardhat-examples/uniswap-v2-polkadot/\n ```\n\n2. Install the required dependencies:\n\n ```bash\n npm install\n ```\n\n3. Update the `hardhat.config.js` file so the paths for the Substrate node and the ETH-RPC adapter match with the paths on your machine. For more info, check the [Testing your Contract](/smart-contracts/dev-environments/hardhat/compile-and-test/){target=\\_blank} section in the Hardhat guide.\n\n ```js title=\"hardhat.config.js\"\n hardhat: {\n polkavm: true,\n nodeConfig: {\n nodeBinaryPath: '../bin/substrate-node',\n rpcPort: 8000,\n dev: true,\n },\n adapterConfig: {\n adapterBinaryPath: '../bin/eth-rpc',\n dev: true,\n },\n },\n ```\n\n4. Create a `.env` file in your project root to store your private keys (you can use as an example the `env.example` file):\n\n ```text title=\".env\"\n LOCAL_PRIV_KEY=\"INSERT_LOCAL_PRIVATE_KEY\"\n AH_PRIV_KEY=\"INSERT_AH_PRIVATE_KEY\"\n ```\n\n Ensure to replace `\"INSERT_LOCAL_PRIVATE_KEY\"` with a private key available in the local environment (you can get them from this [file](https://github.com/paritytech/hardhat-polkadot/blob/main/packages/hardhat-polkadot-node/src/constants.ts#L22){target=\\_blank}). And `\"INSERT_AH_PRIVATE_KEY\"` with the account's private key you want to use to deploy the contracts. You can get this by exporting the private key from your wallet (e.g., MetaMask).\n\n !!!warning\n Keep your private key safe, and never share it with anyone. If it is compromised, your funds can be stolen.\n\n5. Compile the contracts:\n\n ```bash\n npx hardhat compile\n ```\n\nIf the compilation is successful, you should see the following output:\n\n
\n npx hardhat compile\n Compiling 12 Solidity files\n Successfully compiled 12 Solidity files\n
\n\nAfter running the above command, you should see the compiled contracts in the `artifacts-pvm` directory. This directory contains the ABI and bytecode of your contracts."} diff --git a/llms.txt b/llms.txt index 0388f51af..002e3fd30 100644 --- a/llms.txt +++ b/llms.txt @@ -240,6 +240,7 @@ Docs: Tooling - [Sidecar REST API](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-sidecar.md): Learn about Substrate API Sidecar, a REST service that provides endpoints for interacting with Polkadot SDK-based chains and simplifies blockchain interactions. - [Subxt Rust API](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-subxt.md): Subxt is a Rust library for type-safe interaction with Polkadot SDK blockchains, enabling transactions, state queries, runtime API access, and more. - [XCM Tools](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-xcm-tools.md): Explore essential XCM tools across Polkadot, crafted to enhance cross-chain functionality and integration within the ecosystem. +- [Zero to Hero Smart Contract DApp](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-dapps-zero-to-hero.md): Learn how to build a decentralized application on Polkadot Hub using Viem and Next.js by creating a simple dApp that interacts with a smart contract. - [Deploying Uniswap V2 on Polkadot](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-eth-dapps-uniswap-v2.md): Learn how to deploy and test Uniswap V2 on Polkadot Hub using Hardhat, bringing AMM-based token swaps to the Polkadot ecosystem. - [Use Hardhat with Polkadot Hub](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-dev-environments-hardhat-get-started.md): Learn how to create, compile, test, and deploy smart contracts on Polkadot Hub using Hardhat, a powerful development environment for blockchain developers. - [Use the Polkadot Remix IDE](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-dev-environments-remix-get-started.md): Explore the smart contract development and deployment process on Asset Hub using Remix IDE, a visual IDE for blockchain developers. @@ -392,6 +393,7 @@ Docs: Uncategorized - [Tutorials](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/tutorials.md): Explore step-by-step tutorials for building in Polkadot, from parachain deployment and testing to cross-chain asset creation and XCM channel management. Docs: dApp +- [Zero to Hero Smart Contract DApp](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-cookbook-dapps-zero-to-hero.md): Learn how to build a decentralized application on Polkadot Hub using Viem and Next.js by creating a simple dApp that interacts with a smart contract. - [Create a dApp With Ethers.js](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/tutorials-smart-contracts-launch-your-first-project-create-dapp-ethers-js.md): Learn how to build a decentralized application on Polkadot Hub using Ethers.js and Next.js by creating a simple dApp that interacts with a smart contract. - [Create a dApp With Viem](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/tutorials-smart-contracts-launch-your-first-project-create-dapp-viem.md): Learn how to build a decentralized application on Polkadot Hub using Viem and Next.js by creating a simple dApp that interacts with a smart contract. - [Test and Deploy with Hardhat](https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/tutorials-smart-contracts-launch-your-first-project-test-and-deploy-with-hardhat.md): Learn how to set up a Hardhat development environment, write comprehensive tests for Solidity smart contracts, and deploy to local and Polkadot Hub networks. diff --git a/smart-contracts/cookbook/dapps/zero-to-hero.md b/smart-contracts/cookbook/dapps/zero-to-hero.md index 30404ce4c..d45dc3a05 100644 --- a/smart-contracts/cookbook/dapps/zero-to-hero.md +++ b/smart-contracts/cookbook/dapps/zero-to-hero.md @@ -1 +1,928 @@ -TODO \ No newline at end of file +--- +title: Zero to Hero Smart Contract DApp +description: Learn how to build a decentralized application on Polkadot Hub using Viem and Next.js by creating a simple dApp that interacts with a smart contract. +tutorial_badge: Intermediate +categories: dApp, Tooling +--- + +# Zero to Hero Smart Contract DApp + +Decentralized applications (dApps) are a key component of the Web3 ecosystem, enabling developers to build applications that communicate directly with blockchain networks. Polkadot Hub, a blockchain with smart contract support, serves as a robust platform for deploying and interacting with dApps. + +This tutorial will guide you through building a fully functional dApp that interacts with a smart contract on Polkadot Hub. You'll create and deploy a smart contract with Hardhat, and then 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. + +## Prerequisites + +Before getting started, ensure you have the following: + +- [Node.js](https://nodejs.org/en){target=\_blank} v22.10.0 or later installed on your system. +- A crypto wallet (such as MetaMask) funded with test tokens. Refer to the [Connect to Polkadot](/smart-contracts/connect){target=\_blank} guide for more details. +- A basic understanding of React and JavaScript. +- Some familiarity with blockchain fundamentals and Solidity (helpful but not required). + +## Project Overview + +This dApp will interact with a basic Storage contract that you will create and deploy with Hardhat. The contract will allow you to: + +- Store a number on the blockchain. +- Retrieve the stored number from the blockchain. +- Update the stored number with a new value. + +Your project directory will be organized as follows: + +```bash +polkadot-hub-tutorial/ +├── storage-contract/ # Hardhat project for smart contract +│ ├── contracts/ +│ │ └── Storage.sol +│ ├── scripts/ +│ │ └── deploy.ts +│ ├── artifacts/ +│ │ └── contracts/ +│ │ └── Storage.sol/ +│ │ └── Storage.json +│ ├── hardhat.config.ts +│ ├── .env +│ └── package.json +│ +└── dapp/ # Next.js dApp project + ├── abis/ + │ └── Storage.json + └── app/ + ├── components/ + │ ├── ReadContract.tsx + │ ├── WalletConnect.tsx + │ └── WriteContract.tsx + ├── utils/ + │ ├── contract.ts + │ └── viem.ts + ├── favicon.ico + ├── globals.css + ├── layout.tsx + └── page.tsx +``` + +Create the main folder for the project: + +```bash +mkdir polkadot-hub-tutorial +cd polkadot-hub-tutorial +``` + +## Create and Deploy the Storage Contract + +Before building the dApp, you'll need to create and deploy the Storage smart contract. This section will guide you through using Hardhat to write, compile, and deploy the contract to Polkadot Hub TestNet. + +### Set Up Hardhat Project + +First, create a new directory for your Hardhat project and initialize it: + +```bash +mkdir storage-contract +cd storage-contract +npm init -y +``` + +Install Hardhat and its dependencies: + +```bash +npm install --save-dev hardhat@3.0.9 +``` + +Initialize a new Hardhat project: + +```bash +npx hardhat --init +``` + +Select **Create a TypeScript project** and accept the default options. + +### Create the Storage Contract + +In the `contracts` directory, create a new file called `Storage.sol` and add the following code: + +```solidity title="Storage.sol" +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +contract Storage { + uint256 private storedNumber; + + event NumberStored(uint256 newNumber); + + function setNumber(uint256 _number) public { + storedNumber = _number; + emit NumberStored(_number); + } +} +``` + +This simple contract stores a single number and provides functions to read and update it. + +### Configure Hardhat for Polkadot Hub + +Update your `hardhat.config.ts` file to include the Polkadot Hub TestNet configuration: + +```typescript title="hardhat.config.ts" hl_lines="39-44" +import type { HardhatUserConfig } from "hardhat/config"; + +import hardhatToolboxViemPlugin from "@nomicfoundation/hardhat-toolbox-viem"; +import { configVariable } from "hardhat/config"; + +const config: HardhatUserConfig = { + plugins: [hardhatToolboxViemPlugin], + solidity: { + profiles: { + default: { + version: "0.8.28", + }, + production: { + version: "0.8.28", + settings: { + optimizer: { + enabled: true, + runs: 200, + }, + }, + }, + }, + }, + networks: { + hardhatMainnet: { + type: "edr-simulated", + chainType: "l1", + }, + hardhatOp: { + type: "edr-simulated", + chainType: "op", + }, + sepolia: { + type: "http", + chainType: "l1", + url: configVariable("SEPOLIA_RPC_URL"), + accounts: [configVariable("SEPOLIA_PRIVATE_KEY")], + }, + polkadotTestNet: { + type: "http", + chainType: "l1", + url: 'http://127.0.0.1:8545', + accounts: [process.env.PRIVATE_KEY || ''], + }, + }, +}; + +export default config; +``` + +Create a `.env` file in the root of your Hardhat project: + +```text title=".env" +PRIVATE_KEY=INSERT_PRIVATE_KEY_HERE +``` + +Replace `INSERT_PRIVATE_KEY_HERE` with your actual private key. You can get this by exporting the private key from your wallet (e.g., MetaMask). + +!!! warning + Never commit your private key to version control. Use environment variables or a `.env` file (and add it to `.gitignore`) to manage sensitive information. Keep your private key safe, and never share it with anyone. If it is compromised, your funds can be stolen. + + +### Compile the Contract + +Compile your Storage contract: + +```bash +npx hardhat compile +``` + +You should see output indicating successful compilation. + +### Deploy the Contract + +Create a deployment script in the `ignition/modules` directory called `Storage.ts`: + +```typescript title="Storage.ts" +import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; + +export default buildModule("StorageModule", (m) => { + const storage = m.contract("Storage"); + + return { storage }; +}); +``` + +Deploy the contract to Polkadot Hub TestNet: + +```bash +npx hardhat ignition deploy ./ignition/modules/Storage.ts --network polkadotTestNet +``` + +You should see output similar to: + +
+ npx hardhat ignition deploy ./ignition/modules/Storage.ts --network polkadotTestNet + WARNING: You are using Node.js 23.11.0 which is not supported by Hardhat. + Please upgrade to 22.10.0 or a later LTS version (even major version number) + ✔ Confirm deploy to network polkadotTestNet (420420420)? … yes + Hardhat Ignition 🚀 + Deploying [ StorageModule ] + Batch #1 + Executed StorageModule#Storage + [ StorageModule ] successfully deployed 🚀 + Deployed Addresses + StorageModule#Storage - 0xc01Ee7f10EA4aF4673cFff62710E1D7792aBa8f3 +
+ +!!! note + Save the deployed contract address - you'll need it when building your dApp. In the following sections, we'll reference a pre-deployed contract at `0xc01Ee7f10EA4aF4673cFff62710E1D7792aBa8f3`, but you can use your own deployed contract address instead. + +### Export the Contract ABI + +After deployment, you'll need the contract's Application Binary Interface (ABI) for your dApp. You can find it in the `artifacts/contracts/Storage.sol/Storage.json` file generated by Hardhat. You'll use this in the next section when setting up your dApp. + +Now that you have your contract deployed, you're ready to build the dApp that will interact with it! + +## Set Up the dApp Project + +Navigate to the root of the project, and create a new Next.js project called `dapp`: + +```bash +npx create-next-app dapp --ts --eslint --tailwind --app --yes +cd dapp +``` + +## Install Dependencies + +Install viem and related packages: + +```bash +npm install viem@2.38.5 +npm install --save-dev typescript@5.9.3 @types/node@22.19.24 +``` + +## Connect to Polkadot Hub + +To interact with Polkadot Hub, you need to set up a [Public Client](https://viem.sh/docs/clients/public#public-client){target=\_blank} that connects to the blockchain. In this example, you will interact with the Polkadot Hub TestNet, to experiment safely. Start by creating a new file called `utils/viem.ts` and add the following code: + +```typescript title="viem.ts" +import { createPublicClient, http, createWalletClient, custom } from 'viem' +import 'viem/window'; + +const transport = http('http://127.0.0.1:8545') // TODO: change to the paseo asset hub RPC URL when it's available + +// Configure the Polkadot Testnet Hub chain +export const polkadotTestnet = { + id: 420420420, + name: 'Polkadot Testnet', + network: 'polkadot-testnet', + nativeCurrency: { + decimals: 18, + name: 'PAS', + symbol: 'PAS', + }, + rpcUrls: { + default: { + http: ['http://127.0.0.1:8545'], // TODO: change to the paseo asset hub RPC URL + }, + }, +} as const + +// Create a public client for reading data +export const publicClient = createPublicClient({ + chain: polkadotTestnet, + transport +}) + +// Create a wallet client for signing transactions +export const getWalletClient = async () => { + if (typeof window !== 'undefined' && window.ethereum) { + const [account] = await window.ethereum.request({ method: 'eth_requestAccounts' }); + return createWalletClient({ + chain: polkadotTestnet, + transport: custom(window.ethereum), + account, + }); + } + throw new Error('No Ethereum browser provider detected'); +}; +``` + +This file initializes a viem client, providing helper functions for obtaining a Public Client and a [Wallet Client](https://viem.sh/docs/clients/wallet#wallet-client){target=\_blank}. The Public Client enables reading blockchain data, while the Wallet Client allows users to sign and send transactions. Also, note that by importing `viem/window` the global `window.ethereum` will be typed as an `EIP1193Provider`, check the [`window` Polyfill](https://viem.sh/docs/typescript#window-polyfill){target=\_blank} reference for more information. + +## Set Up the Smart Contract Interface + +For this dApp, you'll use a simple [Storage contract](/tutorials/smart-contracts/launch-your-first-project/create-contracts){target=\_blank} that's already deployed in the Polkadot Hub TestNet: `0xc01Ee7f10EA4aF4673cFff62710E1D7792aBa8f3`. To interact with it, you need to define the contract interface. + +Create a folder called `abis` at the root of your project, then create a file named `Storage.json` and paste the corresponding ABI of the Storage contract. You can copy and paste the following: + +```bash +cp ./storage-contract/artifacts/contracts/Storage.sol/Storage.json ./dapp/abis/Storage.json +``` + +Next, create a file called `utils/contract.ts`: + +```typescript title="contract.ts" +import { getContract } from 'viem'; +import { publicClient, getWalletClient } from './viem'; +import StorageABI from '../abis/Storage.json'; + +export const CONTRACT_ADDRESS = '0xc01Ee7f10EA4aF4673cFff62710E1D7792aBa8f3'; // TODO: change when the paseo asset hub RPC URL is available, and the contract is redeployed +export const CONTRACT_ABI = StorageABI.abi; + +// Create a function to get a contract instance for reading +export const getContractInstance = () => { + return getContract({ + address: CONTRACT_ADDRESS, + abi: CONTRACT_ABI, + client: publicClient, + }); +}; + +// Create a function to get a contract instance with a signer for writing +export const getSignedContract = async () => { + const walletClient = await getWalletClient(); + return getContract({ + address: CONTRACT_ADDRESS, + abi: CONTRACT_ABI, + client: walletClient, + }); +}; +``` + +This file defines the contract address, ABI, and functions to create a viem [contract instance](https://viem.sh/docs/contract/getContract#contract-instances){target=\_blank} for reading and writing operations. viem's contract utilities enable more efficient, type-safe interaction with smart contracts. + +## Create the Wallet Connection Component + +Now, let's create a component to handle wallet connections. Create a new file called `components/WalletConnect.tsx`: + +```typescript title="WalletConnect.tsx" +"use client"; + +import React, { useState, useEffect } from "react"; +import { polkadotTestnet } from "../utils/viem"; + +interface WalletConnectProps { + onConnect: (account: string) => void; +} + +const WalletConnect: React.FC = ({ onConnect }) => { + const [account, setAccount] = useState(null); + const [chainId, setChainId] = useState(null); + const [error, setError] = useState(null); + + useEffect(() => { + // Check if user already has an authorized wallet connection + const checkConnection = async () => { + if (typeof window !== 'undefined' && window.ethereum) { + try { + // eth_accounts doesn't trigger the wallet popup + const accounts = await window.ethereum.request({ + method: 'eth_accounts', + }) as string[]; + + if (accounts.length > 0) { + setAccount(accounts[0]); + const chainIdHex = await window.ethereum.request({ + method: 'eth_chainId', + }) as string; + setChainId(parseInt(chainIdHex, 16)); + onConnect(accounts[0]); + } + } catch (err) { + console.error('Error checking connection:', err); + setError('Failed to check wallet connection'); + } + } + }; + + checkConnection(); + + if (typeof window !== 'undefined' && window.ethereum) { + // Setup wallet event listeners + window.ethereum.on('accountsChanged', (accounts: string[]) => { + setAccount(accounts[0] || null); + if (accounts[0]) onConnect(accounts[0]); + }); + + window.ethereum.on('chainChanged', (chainIdHex: string) => { + setChainId(parseInt(chainIdHex, 16)); + }); + } + + return () => { + // Cleanup event listeners + if (typeof window !== 'undefined' && window.ethereum) { + window.ethereum.removeListener('accountsChanged', () => {}); + window.ethereum.removeListener('chainChanged', () => {}); + } + }; + }, [onConnect]); + + const connectWallet = async () => { + if (typeof window === 'undefined' || !window.ethereum) { + setError( + 'MetaMask not detected! Please install MetaMask to use this dApp.' + ); + return; + } + + try { + // eth_requestAccounts triggers the wallet popup + const accounts = await window.ethereum.request({ + method: 'eth_requestAccounts', + }) as string[]; + + setAccount(accounts[0]); + + const chainIdHex = await window.ethereum.request({ + method: 'eth_chainId', + }) as string; + + const currentChainId = parseInt(chainIdHex, 16); + setChainId(currentChainId); + + // Prompt user to switch networks if needed + if (currentChainId !== polkadotTestnet.id) { + await switchNetwork(); + } + + onConnect(accounts[0]); + } catch (err) { + console.error('Error connecting to wallet:', err); + setError('Failed to connect wallet'); + } + }; + + const switchNetwork = async () => { + console.log('Switch network') + try { + await window.ethereum.request({ + method: 'wallet_switchEthereumChain', + params: [{ chainId: `0x${polkadotTestnet.id.toString(16)}` }], + }); + } catch (switchError: any) { + // Error 4902 means the chain hasn't been added to MetaMask + if (switchError.code === 4902) { + try { + await window.ethereum.request({ + method: 'wallet_addEthereumChain', + params: [ + { + chainId: `0x${polkadotTestnet.id.toString(16)}`, + chainName: polkadotTestnet.name, + rpcUrls: [polkadotTestnet.rpcUrls.default.http[0]], + nativeCurrency: { + name: polkadotTestnet.nativeCurrency.name, + symbol: polkadotTestnet.nativeCurrency.symbol, + decimals: polkadotTestnet.nativeCurrency.decimals, + }, + }, + ], + }); + } catch (addError) { + setError('Failed to add network to wallet'); + } + } else { + setError('Failed to switch network'); + } + } + }; + + // UI-only disconnection - MetaMask doesn't support programmatic disconnection + const disconnectWallet = () => { + setAccount(null); + }; + + return ( +
+ {error &&

{error}

} + + {!account ? ( + + ) : ( +
+ + {`${account.substring(0, 6)}...${account.substring(38)}`} + + + {chainId !== polkadotTestnet.id && ( + + )} +
+ )} +
+ ); +}; + +export default WalletConnect; +``` + +This component handles connecting to the wallet, switching networks if necessary, and keeping track of the connected account. It provides a button for users to connect their wallet and displays the connected account address once connected. + +## Create the Read Contract Component + +Now, let's create a component to read data from the contract. Create a file called `components/ReadContract.tsx`: + +```typescript title="ReadContract.tsx" +'use client'; + +import React, { useState, useEffect } from 'react'; +import { publicClient } from '../utils/viem'; +import { CONTRACT_ADDRESS, CONTRACT_ABI } from '../utils/contract'; + +const ReadContract: React.FC = () => { + const [storedNumber, setStoredNumber] = useState(null); + const [loading, setLoading] = useState(true); + const [error, setError] = useState(null); + + useEffect(() => { + // Function to read data from the blockchain + const fetchData = async () => { + try { + setLoading(true); + // Call the smart contract's storedNumber function + const number = await publicClient.readContract({ + address: CONTRACT_ADDRESS, + abi: CONTRACT_ABI, + functionName: 'storedNumber', + args: [], + }) as bigint; + + setStoredNumber(number.toString()); + setError(null); + } catch (err) { + console.error('Error fetching stored number:', err); + setError('Failed to fetch data from the contract'); + } finally { + setLoading(false); + } + }; + + fetchData(); + + // Poll for updates every 10 seconds to keep UI in sync with blockchain + const interval = setInterval(fetchData, 10000); + + // Clean up interval on component unmount + return () => clearInterval(interval); + }, []); + + return ( +
+

Contract Data

+ {loading ? ( +
+
+
+ ) : error ? ( +

{error}

+ ) : ( +
+

+ Stored Number: {storedNumber} +

+
+ )} +
+ ); +}; + +export default ReadContract; +``` + +This component reads the `storedNumber` value from the contract and displays it to the user. It also sets up a polling interval to refresh the data periodically, ensuring that the UI stays in sync with the blockchain state. + +## Create the Write Contract Component + +Finally, let's create a component that allows users to update the stored number. Create a file called `components/WriteContract.tsx`: + +```typescript title="WriteContract.tsx" +"use client"; + +import React, { useState, useEffect } from "react"; +import { publicClient, getWalletClient } from '../utils/viem'; +import { CONTRACT_ADDRESS, CONTRACT_ABI } from '../utils/contract'; + +interface WriteContractProps { + account: string | null; +} + +const WriteContract: React.FC = ({ account }) => { + const [newNumber, setNewNumber] = useState(""); + const [status, setStatus] = useState<{ + type: string | null; + message: string; + }>({ + type: null, + message: "", + }); + const [isSubmitting, setIsSubmitting] = useState(false); + const [isCorrectNetwork, setIsCorrectNetwork] = useState(true); + + // Check if the account is on the correct network + useEffect(() => { + const checkNetwork = async () => { + if (!account) return; + + try { + // Get the chainId from the public client + const chainId = await publicClient.getChainId(); + + // Get the user's current chainId from their wallet + const walletClient = await getWalletClient(); + if (!walletClient) return; + + const walletChainId = await walletClient.getChainId(); + + // Check if they match + setIsCorrectNetwork(chainId === walletChainId); + } catch (err) { + console.error("Error checking network:", err); + setIsCorrectNetwork(false); + } + }; + + checkNetwork(); + }, [account]); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + + // Validation checks + if (!account) { + setStatus({ type: "error", message: "Please connect your wallet first" }); + return; + } + + if (!isCorrectNetwork) { + setStatus({ + type: "error", + message: "Please switch to the correct network in your wallet", + }); + return; + } + + if (!newNumber || isNaN(Number(newNumber))) { + setStatus({ type: "error", message: "Please enter a valid number" }); + return; + } + + try { + setIsSubmitting(true); + setStatus({ type: "info", message: "Initiating transaction..." }); + + // Get wallet client for transaction signing + const walletClient = await getWalletClient(); + + if (!walletClient) { + setStatus({ type: "error", message: "Wallet client not available" }); + return; + } + + // Check if account matches + if ( + walletClient.account?.address.toLowerCase() !== account.toLowerCase() + ) { + setStatus({ + type: "error", + message: + "Connected wallet account doesn't match the selected account", + }); + return; + } + + // Prepare transaction and wait for user confirmation in wallet + setStatus({ + type: "info", + message: "Please confirm the transaction in your wallet...", + }); + + // Simulate the contract call first + console.log('newNumber', newNumber); + const { request } = await publicClient.simulateContract({ + address: CONTRACT_ADDRESS, + abi: CONTRACT_ABI, + functionName: "setNumber", + args: [BigInt(newNumber)], + account: walletClient.account, + }); + + // Send the transaction with wallet client + const hash = await walletClient.writeContract(request); + + // Wait for transaction to be mined + setStatus({ + type: "info", + message: "Transaction submitted. Waiting for confirmation...", + }); + + const receipt = await publicClient.waitForTransactionReceipt({ + hash, + }); + + setStatus({ + type: "success", + message: `Transaction confirmed! Transaction hash: ${receipt.transactionHash}`, + }); + + setNewNumber(""); + } catch (err: any) { + console.error("Error updating number:", err); + + // Handle specific errors + if (err.code === 4001) { + // User rejected transaction + setStatus({ type: "error", message: "Transaction rejected by user." }); + } else if (err.message?.includes("Account not found")) { + // Account not found on the network + setStatus({ + type: "error", + message: + "Account not found on current network. Please check your wallet is connected to the correct network.", + }); + } else if (err.message?.includes("JSON is not a valid request object")) { + // JSON error - specific to your current issue + setStatus({ + type: "error", + message: + "Invalid request format. Please try again or contact support.", + }); + } else { + // Other errors + setStatus({ + type: "error", + message: `Error: ${err.message || "Failed to send transaction"}`, + }); + } + } finally { + setIsSubmitting(false); + } + }; + + return ( +
+

Update Stored Number

+ + {!isCorrectNetwork && account && ( +
+ ⚠️ You are not connected to the correct network. Please switch + networks in your wallet. +
+ )} + + {status.message && ( +
+ {status.message} +
+ )} + +
+ setNewNumber(e.target.value)} + disabled={isSubmitting || !account} + className="w-full p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-pink-400" + /> + +
+ + {!account && ( +

+ Connect your wallet to update the stored number. +

+ )} +
+ ); +}; + +export default WriteContract; +``` + +This component allows users to input a new number and send a transaction to update the value stored in the contract. It provides appropriate feedback during each step of the transaction process and handles error scenarios. + +Update the `app/page.tsx` file to integrate all components: + +```typescript title="page.tsx" +"use client"; + +import { useState } from "react"; +import WalletConnect from "./components/WalletConnect"; +import ReadContract from "./components/ReadContract"; +import WriteContract from "./components/WriteContract"; + +export default function Home() { + const [account, setAccount] = useState(null); + + const handleConnect = (connectedAccount: string) => { + setAccount(connectedAccount); + }; + + return ( +
+

+ Polkadot Hub - Zero To Hero DApp +

+ + + +
+ ); +} +``` + +Run the dApp: + +```bash +npm run dev +``` + +Navigate to `http://localhost:3000` in your browser, and you should see your dApp with the wallet connection button, the stored number displayed, and the form to update the number. You should see something like this: + + + +## How It Works + +This dApp uses components to interact with the blockchain in several ways. + +### Wallet Connection + +The `WalletConnect` component uses the browser's Ethereum provider (MetaMask) to connect to the user's wallet and handles network switching to ensure the user is connected to the Polkadot Hub TestNet. Once connected, it provides the user's account address to the parent component. + +### Data Reads + +The `ReadContract` component uses viem's `readContract` function to call the `storedNumber` view function and periodically poll for updates to keep the UI in sync with the blockchain state. The component also displays a loading indicator while fetching data and handles error states. + +### Data Writes + +The `WriteContract` component uses viem's `writeContract` function to send a transaction to the `setNumber` function and ensures the wallet is connected before allowing a transaction. The component shows detailed feedback during transaction submission and confirmation. After a successful transaction, the value displayed in the `ReadContract` component will update on the next poll. + +## Conclusion + +Congratulations! You've successfully built a fully functional dApp that interacts with a smart contract on Polkadot Hub using viem and Next.js. Your application can now: + +- Create a smart contract with Hardhat and deploy it to Polkadot Hub TestNet. +- Connect to a user's wallet and handle network switching. +- Read data from a smart contract and keep it updated. +- Write data to the blockchain through transactions. + +These fundamental skills provide the foundation for building more complex dApps on Polkadot Hub. With this knowledge, you can extend your application to interact with more sophisticated smart contracts and create advanced user interfaces. + +To get started right away with a working example, you can clone the repository and navigate to the implementation: + +```bash +git clone https://github.com/polkadot-developers/revm-hardhat-examples.git +cd zero-to-hero-dapp +``` + +## Where to Go Next + +
+ +- Guide __Port Ethereum Projects to Polkadot Hub__ + + --- + + Learn how to port an Ethereum project to Polkadot Hub using Hardhat and Viem. + + [:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/eth-dapps/) + +- Guide __Dive Deeper into Polkadot Precompiles__ + + --- + + Learn how to use the Polkadot precompiles to interact with the blockchain. + + [:octicons-arrow-right-24: Get Started](/smart-contracts/cookbook/polkadot-precompiles/) +
\ No newline at end of file