# Polkadot Developer Documentation (LLMS Format) This file contains documentation for Polkadot (https://polkadot.network). Polkadot unites the world's innovators and changemakers, building and using the most transformative apps and blockchains. Access tools, guides, and resources to quickly start building custom chains, deploying smart contracts, and creating dApps. It is intended for use with large language models (LLMs) to support developers working with Polkadot. The content includes selected pages from the official docs, organized by section. This file includes documentation related to the product: Smart Contracts ## AI Prompt Template You are an AI developer assistant for Polkadot (https://polkadot.network). Your task is to assist developers in understanding and using the product described in this file. - Provide accurate answers based on the included documentation. - Do not assume undocumented features, behaviors, or APIs. - If unsure, respond with βNot specified in the documentation. ## List of doc pages: Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/develop/smart-contracts/block-explorers.md [type: develop] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/develop/smart-contracts/connect-to-polkadot.md [type: develop] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/develop/smart-contracts/dev-environments/hardhat.md [type: develop] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/develop/smart-contracts/dev-environments/remix.md [type: develop] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/develop/smart-contracts/faqs.md [type: develop] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/develop/smart-contracts/libraries/ethers-js.md [type: develop] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/develop/smart-contracts/libraries/viem.md [type: develop] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/develop/smart-contracts/libraries/wagmi.md [type: develop] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/develop/smart-contracts/libraries/web3-js.md [type: develop] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/develop/smart-contracts/libraries/web3-py.md [type: develop] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/develop/smart-contracts/local-development-node.md [type: develop] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/develop/smart-contracts/overview.md [type: develop] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/develop/smart-contracts/precompiles/interact-with-precompiles.md [type: develop] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/develop/smart-contracts/precompiles/xcm-precompile.md [type: develop] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/develop/smart-contracts/wallets.md [type: develop] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/tutorials/smart-contracts/deploy-erc20.md [type: tutorials] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/tutorials/smart-contracts/deploy-nft.md [type: tutorials] Doc-Page: https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/refs/heads/main/tutorials/smart-contracts/launch-your-first-project/create-contracts.md [type: tutorials] ## Full content for each doc page Doc-Content: https://docs.polkadot.com/develop/smart-contracts/block-explorers/ --- BEGIN CONTENT --- --- title: Block Explorers description: Access PolkaVM explorers like Subscan, BlockScout, and Routescan to track transactions, analyze contracts, and view on-chain data from smart contracts. categories: Smart Contracts, Tooling --- # Block Explorers !!! smartcontract "PolkaVM Preview Release" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**. ## Introduction Block explorers serve as comprehensive blockchain analytics platforms that provide access to on-chain data. These web applications function as search engines for blockchain networks, allowing users to query, visualize, and analyze blockchain data in real time through intuitive interfaces. ## Core Functionality These block explorers provide essential capabilities for interacting with smart contracts in Polkadot Hub: - **Transaction tracking** - monitor transaction status, confirmations, fees, and metadata - **Address analysis** - view account balances, transaction history, and associated contracts - **Block information** - examine block contents - **Smart contract interaction** - review contract code, verification status, and interaction history - **Token tracking** - monitor ERC-20, ERC-721, and other token standards with transfer history and holder analytics - **Network statistics** - access metrics on transaction volume, gas usage, and other network parameters ## Available Block Explorers The following block explorers are available for PolkaVM smart contracts, providing specialized tools for monitoring and analyzing contract activity within the Polkadot ecosystem: ### BlockScout BlockScout is an open-source explorer platform with a user-friendly interface adapted for PolkaVM contracts. It excels at detailed contract analytics and provides developers with comprehensive API access. - [Polkadot Hub TestNet BlockScout](https://blockscout-passet-hub.parity-testnet.parity.io/){target=\_blank}  --- END CONTENT --- Doc-Content: https://docs.polkadot.com/develop/smart-contracts/connect-to-polkadot/ --- BEGIN CONTENT --- --- title: Connect to Polkadot description: Explore how to connect to Polkadot Hub, configure your wallet, and obtain test tokens for developing and testing smart contracts. categories: Smart Contracts --- # Connect to Polkadot !!! smartcontract "PolkaVM Preview Release" PolkaVM smart contracts with Ethereum compatibility are in **early-stage development and may be unstable or incomplete**.
For more information about how to connect to Polkadot Hub, please check the [Wallets for Polkadot Hub](/develop/smart-contracts/wallets/){target=\_blank} guide. ## Networks Details Developers can leverage smart contracts across diverse networks, from TestNets to MainNet. This section outlines the network specifications and connection details for each environment. === "Polkadot Hub TestNet" Network name ```text Polkadot Hub TestNet ``` --- Currency symbol ```text PAS ``` --- Chain ID ```text 420420422 ``` --- RPC URL ```text https://testnet-passet-hub-eth-rpc.polkadot.io ``` --- Block explorer URL ```text https://blockscout-passet-hub.parity-testnet.parity.io/ ``` ## Test Tokens You 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: 1. 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 2. Copy your address linked to the TestNet and paste it into the designated field  3. Click the **Get Some PASs** button to request free test PAS tokens. These tokens will be sent to your wallet shortly  Now 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. ## Where to Go Next For your next steps, explore the various smart contract guides demonstrating how to use and integrate different tools and development environments into your workflow.Current Block: {blockNumber?.toString() || "Loading..."}
{address && balance && (Balance:{" "} {( BigInt(balance.value) / BigInt(10 ** balance.decimals) ).toLocaleString()}{" "} {balance.symbol}
)}Contract Address: {CONTRACT_ADDRESS}
Current Stored Number: {storedNumber?.toString() || "Loading..."}
Network launched ππ | ||
---|---|---|
Namespace | zombie-75a01b93c92d571f6198a67bcb380fcd | |
Provider | native | |
Node Information | ||
Name | alice | |
Direct Link | https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:55308#explorer | |
Prometheus Link | http://127.0.0.1:55310/metrics | |
Log Cmd | tail -f /tmp/zombie-794af21178672e1ff32c612c3c7408dc_-2397036-6717MXDxcS55/alice.log | |
Node Information | ||
Name | bob | |
Direct Link | https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:55312#explorer | |
Prometheus Link | http://127.0.0.1:50634/metrics | |
Log Cmd | tail -f /tmp/zombie-794af21178672e1ff32c612c3c7408dc_-2397036-6717MXDxcS55/bob.log | |
Node Information | ||
Name | collator01 | |
Direct Link | https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:55316#explorer | |
Prometheus Link | http://127.0.0.1:55318/metrics | |
Log Cmd | tail -f /tmp/zombie-794af21178672e1ff32c612c3c7408dc_-2397036-6717MXDxcS55/collator01.log | |
Parachain ID | 100 | |
ChainSpec Path | /tmp/zombie-794af21178672e1ff32c612c3c7408dc_-2397036-6717MXDxcS55/100-rococo-local.json |
{ execution_result: { success: true, value: { actual_weight: undefined, pays_fee: { type: 'Yes', value: undefined } } }, emitted_events: [ { type: 'Balances', value: { type: 'Transfer', value: { from: '12pGtwHPL4tUAUcyeCoJ783NKRspztpWmXv4uxYRwiEnYNET', to: '13YMK2ePPKQeW7ynqLozB65WYjMnNgffQ9uR4AzyGmqnKeLq', amount: 120000000000n } } }, { type: 'Balances', value: { type: 'Issued', value: { amount: 0n } } }, { type: 'XcmPallet', value: { type: 'Attempted', value: { outcome: { type: 'Complete', value: { used: { ref_time: 251861000n, proof_size: 6196n } } } } } }, { type: 'Balances', value: { type: 'Burned', value: { who: '12pGtwHPL4tUAUcyeCoJ783NKRspztpWmXv4uxYRwiEnYNET', amount: 397000000n } } }, { type: 'Balances', value: { type: 'Minted', value: { who: '13UVJyLnbVp9RBZYFwFGyDvVd1y27Tt8tkntv6Q7JVPhFsTB', amount: 397000000n } } }, { type: 'XcmPallet', value: { type: 'FeesPaid', value: { paying: { parents: 0, interior: { type: 'X1', value: { type: 'AccountId32', value: { network: { type: 'Polkadot', value: undefined }, id: FixedSizeBinary { asText: [Function (anonymous)], asHex: [Function (anonymous)], asOpaqueHex: [Function (anonymous)], asBytes: [Function (anonymous)], asOpaqueBytes: [Function (anonymous)] } } } } }, fees: [ { id: { parents: 0, interior: { type: 'Here', value: undefined } }, fun: { type: 'Fungible', value: 397000000n } } ] } } }, { type: 'XcmPallet', value: { type: 'Sent', value: { origin: { parents: 0, interior: { type: 'X1', value: { type: 'AccountId32', value: { network: { type: 'Polkadot', value: undefined }, id: FixedSizeBinary { asText: [Function (anonymous)], asHex: [Function (anonymous)], asOpaqueHex: [Function (anonymous)], asBytes: [Function (anonymous)], asOpaqueBytes: [Function (anonymous)] } } } } }, destination: { parents: 0, interior: { type: 'X1', value: { type: 'Parachain', value: 4001 } } }, message: [ { type: 'ReserveAssetDeposited', value: [ { id: { parents: 1, interior: { type: 'Here', value: undefined } }, fun: { type: 'Fungible', value: 120000000000n } } ] }, { type: 'ClearOrigin', value: undefined }, { type: 'BuyExecution', value: { fees: { id: { parents: 1, interior: { type: 'Here', value: undefined } }, fun: { type: 'Fungible', value: 120000000000n } }, weight_limit: { type: 'Unlimited', value: undefined } } }, { type: 'DepositAsset', value: { assets: { type: 'Wild', value: { type: 'AllCounted', value: 1 } }, beneficiary: { parents: 0, interior: { type: 'X1', value: { type: 'AccountId32', value: { network: undefined, id: FixedSizeBinary { asText: [Function (anonymous)], asHex: [Function (anonymous)], asOpaqueHex: [Function (anonymous)], asBytes: [Function (anonymous)], asOpaqueBytes: [Function (anonymous)] } } } } } } } ], message_id: FixedSizeBinary { asText: [Function (anonymous)], asHex: [Function (anonymous)], asOpaqueHex: [Function (anonymous)], asBytes: [Function (anonymous)], asOpaqueBytes: [Function (anonymous)] } } } } ], local_xcm: undefined, destination: { type: 'V4', value: { parents: 0, interior: { type: 'X1', value: { type: 'Parachain', value: 4001 } } } }, remote_xcm: { type: 'V3', value: [ { type: 'ReserveAssetDeposited', value: [ { id: { type: 'Concrete', value: { parents: 1, interior: { type: 'Here', value: undefined } } }, fun: { type: 'Fungible', value: 120000000000n } } ] }, { type: 'ClearOrigin', value: undefined }, { type: 'BuyExecution', value: { fees: { id: { type: 'Concrete', value: { parents: 1, interior: { type: 'Here', value: undefined } } }, fun: { type: 'Fungible', value: 120000000000n } }, weight_limit: { type: 'Unlimited', value: undefined } } }, { type: 'DepositAsset', value: { assets: { type: 'Wild', value: { type: 'AllCounted', value: 1 } }, beneficiary: { parents: 0, interior: { type: 'X1', value: { type: 'AccountId32', value: { network: undefined, id: FixedSizeBinary { asText: [Function (anonymous)], asHex: [Function (anonymous)], asOpaqueHex: [Function (anonymous)], asBytes: [Function (anonymous)], asOpaqueBytes: [Function (anonymous)] } } } } } } }, { type: 'SetTopic', value: FixedSizeBinary { asText: [Function (anonymous)], asHex: [Function (anonymous)], asOpaqueHex: [Function (anonymous)], asBytes: [Function (anonymous)], asOpaqueBytes: [Function (anonymous)] } } ] } }
{ execution_result: { success: true, value: { actual_weight: undefined, pays_fee: { type: 'Yes', value: undefined } } }, emitted_events: [ { type: 'Balances', value: { type: 'Transfer', value: { from: '12pGtwHPL4tUAUcyeCoJ783NKRspztpWmXv4uxYRwiEnYNET', to: '13YMK2ePPKQeW7ynqLozB65WYjMnNgffQ9uR4AzyGmqnKeLq', amount: 120000000000n } } }, { type: 'Balances', value: { type: 'Issued', value: { amount: 0n } } }, { type: 'XcmPallet', value: { type: 'Attempted', value: { outcome: { type: 'Complete', value: { used: { ref_time: 251861000n, proof_size: 6196n } } } } } }, { type: 'Balances', value: { type: 'Burned', value: { who: '12pGtwHPL4tUAUcyeCoJ783NKRspztpWmXv4uxYRwiEnYNET', amount: 397000000n } } }, { type: 'Balances', value: { type: 'Minted', value: { who: '13UVJyLnbVp9RBZYFwFGyDvVd1y27Tt8tkntv6Q7JVPhFsTB', amount: 397000000n } } }, { type: 'XcmPallet', value: { type: 'FeesPaid', value: { paying: { parents: 0, interior: { type: 'X1', value: { type: 'AccountId32', value: { network: { type: 'Polkadot', value: undefined }, id: FixedSizeBinary { asText: [Function (anonymous)], asHex: [Function (anonymous)], asOpaqueHex: [Function (anonymous)], asBytes: [Function (anonymous)], asOpaqueBytes: [Function (anonymous)] } } } } }, fees: [ { id: { parents: 0, interior: { type: 'Here', value: undefined } }, fun: { type: 'Fungible', value: 397000000n } } ] } } }, { type: 'XcmPallet', value: { type: 'Sent', value: { origin: { parents: 0, interior: { type: 'X1', value: { type: 'AccountId32', value: { network: { type: 'Polkadot', value: undefined }, id: FixedSizeBinary { asText: [Function (anonymous)], asHex: [Function (anonymous)], asOpaqueHex: [Function (anonymous)], asBytes: [Function (anonymous)], asOpaqueBytes: [Function (anonymous)] } } } } }, destination: { parents: 0, interior: { type: 'X1', value: { type: 'Parachain', value: 4001 } } }, message: [ { type: 'ReserveAssetDeposited', value: [ { id: { parents: 1, interior: { type: 'Here', value: undefined } }, fun: { type: 'Fungible', value: 120000000000n } } ] }, { type: 'ClearOrigin', value: undefined }, { type: 'BuyExecution', value: { fees: { id: { parents: 1, interior: { type: 'Here', value: undefined } }, fun: { type: 'Fungible', value: 120000000000n } }, weight_limit: { type: 'Unlimited', value: undefined } } }, { type: 'DepositAsset', value: { assets: { type: 'Wild', value: { type: 'AllCounted', value: 1 } }, beneficiary: { parents: 0, interior: { type: 'X1', value: { type: 'AccountId32', value: { network: undefined, id: FixedSizeBinary { asText: [Function (anonymous)], asHex: [Function (anonymous)], asOpaqueHex: [Function (anonymous)], asBytes: [Function (anonymous)], asOpaqueBytes: [Function (anonymous)] } } } } } } } ], message_id: FixedSizeBinary { asText: [Function (anonymous)], asHex: [Function (anonymous)], asOpaqueHex: [Function (anonymous)], asBytes: [Function (anonymous)], asOpaqueBytes: [Function (anonymous)] } } } } ], local_xcm: undefined, destination: { type: 'V4', value: { parents: 0, interior: { type: 'X1', value: { type: 'Parachain', value: 4001 } } } }, remote_xcm: { type: 'V3', value: [ { type: 'ReserveAssetDeposited', value: [ { id: { type: 'Concrete', value: { parents: 1, interior: { type: 'Here', value: undefined } } }, fun: { type: 'Fungible', value: 120000000000n } } ] }, { type: 'ClearOrigin', value: undefined }, { type: 'BuyExecution', value: { fees: { id: { type: 'Concrete', value: { parents: 1, interior: { type: 'Here', value: undefined } } }, fun: { type: 'Fungible', value: 120000000000n } }, weight_limit: { type: 'Unlimited', value: undefined } } }, { type: 'DepositAsset', value: { assets: { type: 'Wild', value: { type: 'AllCounted', value: 1 } }, beneficiary: { parents: 0, interior: { type: 'X1', value: { type: 'AccountId32', value: { network: undefined, id: FixedSizeBinary { asText: [Function (anonymous)], asHex: [Function (anonymous)], asOpaqueHex: [Function (anonymous)], asBytes: [Function (anonymous)], asOpaqueBytes: [Function (anonymous)] } } } } } } }, { type: 'SetTopic', value: FixedSizeBinary { asText: [Function (anonymous)], asHex: [Function (anonymous)], asOpaqueHex: [Function (anonymous)], asBytes: [Function (anonymous)], asOpaqueBytes: [Function (anonymous)] } } ] } }
{ execution_result: { type: 'Complete', value: { used: { ref_time: 15574200000n, proof_size: 359300n } } }, emitted_events: [ { type: 'System', value: { type: 'NewAccount', value: { account: '12pGtwHPL4tUAUcyeCoJ783NKRspztpWmXv4uxYRwiEnYNET' } } }, { type: 'Balances', value: { type: 'Endowed', value: { account: '12pGtwHPL4tUAUcyeCoJ783NKRspztpWmXv4uxYRwiEnYNET', free_balance: 10203500000n } } }, { type: 'Balances', value: { type: 'Minted', value: { who: '12pGtwHPL4tUAUcyeCoJ783NKRspztpWmXv4uxYRwiEnYNET', amount: 10203500000n } } }, { type: 'Balances', value: { type: 'Issued', value: { amount: 1796500000n } } }, { type: 'Balances', value: { type: 'Deposit', value: { who: '13UVJyLgBASGhE2ok3TvxUfaQBGUt88JCcdYjHvUhvQkFTTx', amount: 1796500000n } } } ], forwarded_xcms: [ [ { type: 'V4', value: { parents: 1, interior: { type: 'Here', value: undefined } } }, [] ] ] }
[ { type: 'V3', value: { type: 'Concrete', value: { parents: 1, interior: { type: 'Here', value: undefined } } } } ]
{ type: 'V3', value: [ { id: { type: 'Concrete', value: { parents: 0, interior: { type: 'Here', value: undefined } } }, fun: { type: 'Fungible', value: 396000000n } } ] }