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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions .ai/categories/smart-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -9840,8 +9840,6 @@ Page Title: Wagmi for Polkadot Hub Smart Contracts

# Wagmi

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

[Wagmi](https://wagmi.sh/){target=\_blank} is a collection of [React Hooks](https://wagmi.sh/react/api/hooks){target=\_blank} for interacting with Ethereum-compatible blockchains, focusing on developer experience, feature richness, and reliability.
Expand All @@ -9853,25 +9851,23 @@ This guide demonstrates how to use Wagmi to interact with and deploy smart contr
To start working with Wagmi, create a new React project and initialize it by running the following commands in your terminal:

```bash
# Create a new React project using Next.js
npx create-next-app@latest wagmi-asset-hub
cd wagmi-asset-hub
npx create-next-app@latest wagmi-polkadot-hub
cd wagmi-polkadot-hub
```

## Install Dependencies

Install Wagmi and its peer dependencies:

```bash
# Install Wagmi and its dependencies
npm install wagmi viem @tanstack/react-query
```

## Configure Wagmi for Polkadot Hub

Create a configuration file to initialize Wagmi with Polkadot Hub. In your project, create a file named `src/lib/wagmi.ts` and add the code below. Be sure to replace `INSERT_RPC_URL`, `INSERT_CHAIN_ID`, `INSERT_CHAIN_NAME`, `INSERT_NETWORK_NAME`, `INSERT_CHAIN_DECIMALS`, `INSERT_CURRENCY_NAME`, and `INSERT_CURRENCY_SYMBOL` with your specific values.

```typescript title="src/lib/wagmi.ts"
```typescript title="app/lib/wagmi.ts"
import { http, createConfig } from 'wagmi'

// Configure the Polkadot Hub chain
Expand Down Expand Up @@ -9917,7 +9913,7 @@ export const config = createConfig({
},
rpcUrls: {
default: {
http: ['https://testnet-passet-hub-eth-rpc.polkadot.io'],
http: ['https://testnet-passet-hub-eth-rpc.polkadot.io'], // TODO: change to paseo asset hub once ready
},
},
} as const;
Expand Down Expand Up @@ -10057,7 +10053,7 @@ This component uses the following React hooks:

## Interact with Deployed Contract

This guide uses a simple Storage contract already deployed to the Polkadot Hub TestNet (`0x58053f0e8ede1a47a1af53e43368cd04ddcaf66f`). The code of that contract is:
This guide uses a simple Storage contract already deployed to the Polkadot Hub TestNet. The code of that contract is:

??? code "Storage.sol"

Expand Down Expand Up @@ -10085,7 +10081,7 @@ This guide uses a simple Storage contract already deployed to the Polkadot Hub T
}
```

Create a component to interact with your deployed contract. Create a file named `app/components/StorageContract.tsx`:
Create a component to interact with your deployed contract. Create a file named `components/StorageContract.tsx`:

```typescript title="app/components/StorageContract.tsx"
"use client";
Expand All @@ -10098,7 +10094,7 @@ import {
} from "wagmi";

const CONTRACT_ADDRESS =
"0xabBd46Ef74b88E8B1CDa49BeFb5057710443Fd29" as `0x${string}`;
"INSERT_CONTRACT_ADDRESS" as `0x${string}`;

export function StorageContract() {
const [number, setNumber] = useState<string>("42");
Expand Down
18 changes: 7 additions & 11 deletions .ai/categories/tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -11850,8 +11850,6 @@ Page Title: Wagmi for Polkadot Hub Smart Contracts

# Wagmi

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

[Wagmi](https://wagmi.sh/){target=\_blank} is a collection of [React Hooks](https://wagmi.sh/react/api/hooks){target=\_blank} for interacting with Ethereum-compatible blockchains, focusing on developer experience, feature richness, and reliability.
Expand All @@ -11863,25 +11861,23 @@ This guide demonstrates how to use Wagmi to interact with and deploy smart contr
To start working with Wagmi, create a new React project and initialize it by running the following commands in your terminal:

```bash
# Create a new React project using Next.js
npx create-next-app@latest wagmi-asset-hub
cd wagmi-asset-hub
npx create-next-app@latest wagmi-polkadot-hub
cd wagmi-polkadot-hub
```

## Install Dependencies

Install Wagmi and its peer dependencies:

```bash
# Install Wagmi and its dependencies
npm install wagmi viem @tanstack/react-query
```

## Configure Wagmi for Polkadot Hub

Create a configuration file to initialize Wagmi with Polkadot Hub. In your project, create a file named `src/lib/wagmi.ts` and add the code below. Be sure to replace `INSERT_RPC_URL`, `INSERT_CHAIN_ID`, `INSERT_CHAIN_NAME`, `INSERT_NETWORK_NAME`, `INSERT_CHAIN_DECIMALS`, `INSERT_CURRENCY_NAME`, and `INSERT_CURRENCY_SYMBOL` with your specific values.

```typescript title="src/lib/wagmi.ts"
```typescript title="app/lib/wagmi.ts"
import { http, createConfig } from 'wagmi'

// Configure the Polkadot Hub chain
Expand Down Expand Up @@ -11927,7 +11923,7 @@ export const config = createConfig({
},
rpcUrls: {
default: {
http: ['https://testnet-passet-hub-eth-rpc.polkadot.io'],
http: ['https://testnet-passet-hub-eth-rpc.polkadot.io'], // TODO: change to paseo asset hub once ready
},
},
} as const;
Expand Down Expand Up @@ -12067,7 +12063,7 @@ This component uses the following React hooks:

## Interact with Deployed Contract

This guide uses a simple Storage contract already deployed to the Polkadot Hub TestNet (`0x58053f0e8ede1a47a1af53e43368cd04ddcaf66f`). The code of that contract is:
This guide uses a simple Storage contract already deployed to the Polkadot Hub TestNet. The code of that contract is:

??? code "Storage.sol"

Expand Down Expand Up @@ -12095,7 +12091,7 @@ This guide uses a simple Storage contract already deployed to the Polkadot Hub T
}
```

Create a component to interact with your deployed contract. Create a file named `app/components/StorageContract.tsx`:
Create a component to interact with your deployed contract. Create a file named `components/StorageContract.tsx`:

```typescript title="app/components/StorageContract.tsx"
"use client";
Expand All @@ -12108,7 +12104,7 @@ import {
} from "wagmi";

const CONTRACT_ADDRESS =
"0xabBd46Ef74b88E8B1CDa49BeFb5057710443Fd29" as `0x${string}`;
"INSERT_CONTRACT_ADDRESS" as `0x${string}`;

export function StorageContract() {
const [number, setNumber] = useState<string>("42");
Expand Down
18 changes: 7 additions & 11 deletions .ai/pages/smart-contracts-libraries-wagmi.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ url: https://docs.polkadot.com/smart-contracts/libraries/wagmi/

# Wagmi

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

[Wagmi](https://wagmi.sh/){target=\_blank} is a collection of [React Hooks](https://wagmi.sh/react/api/hooks){target=\_blank} for interacting with Ethereum-compatible blockchains, focusing on developer experience, feature richness, and reliability.
Expand All @@ -20,25 +18,23 @@ This guide demonstrates how to use Wagmi to interact with and deploy smart contr
To start working with Wagmi, create a new React project and initialize it by running the following commands in your terminal:

```bash
# Create a new React project using Next.js
npx create-next-app@latest wagmi-asset-hub
cd wagmi-asset-hub
npx create-next-app@latest wagmi-polkadot-hub
cd wagmi-polkadot-hub
```

## Install Dependencies

Install Wagmi and its peer dependencies:

```bash
# Install Wagmi and its dependencies
npm install wagmi viem @tanstack/react-query
```

## Configure Wagmi for Polkadot Hub

Create a configuration file to initialize Wagmi with Polkadot Hub. In your project, create a file named `src/lib/wagmi.ts` and add the code below. Be sure to replace `INSERT_RPC_URL`, `INSERT_CHAIN_ID`, `INSERT_CHAIN_NAME`, `INSERT_NETWORK_NAME`, `INSERT_CHAIN_DECIMALS`, `INSERT_CURRENCY_NAME`, and `INSERT_CURRENCY_SYMBOL` with your specific values.

```typescript title="src/lib/wagmi.ts"
```typescript title="app/lib/wagmi.ts"
import { http, createConfig } from 'wagmi'

// Configure the Polkadot Hub chain
Expand Down Expand Up @@ -84,7 +80,7 @@ export const config = createConfig({
},
rpcUrls: {
default: {
http: ['https://testnet-passet-hub-eth-rpc.polkadot.io'],
http: ['https://testnet-passet-hub-eth-rpc.polkadot.io'], // TODO: change to paseo asset hub once ready
},
},
} as const;
Expand Down Expand Up @@ -224,7 +220,7 @@ This component uses the following React hooks:

## Interact with Deployed Contract

This guide uses a simple Storage contract already deployed to the Polkadot Hub TestNet (`0x58053f0e8ede1a47a1af53e43368cd04ddcaf66f`). The code of that contract is:
This guide uses a simple Storage contract already deployed to the Polkadot Hub TestNet. The code of that contract is:

??? code "Storage.sol"

Expand Down Expand Up @@ -252,7 +248,7 @@ This guide uses a simple Storage contract already deployed to the Polkadot Hub T
}
```

Create a component to interact with your deployed contract. Create a file named `app/components/StorageContract.tsx`:
Create a component to interact with your deployed contract. Create a file named `components/StorageContract.tsx`:

```typescript title="app/components/StorageContract.tsx"
"use client";
Expand All @@ -265,7 +261,7 @@ import {
} from "wagmi";

const CONTRACT_ADDRESS =
"0xabBd46Ef74b88E8B1CDa49BeFb5057710443Fd29" as `0x${string}`;
"INSERT_CONTRACT_ADDRESS" as `0x${string}`;

export function StorageContract() {
const [number, setNumber] = useState<string>("42");
Expand Down
10 changes: 5 additions & 5 deletions .ai/site-index.json
Original file line number Diff line number Diff line change
Expand Up @@ -8626,7 +8626,7 @@
],
"raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/smart-contracts-libraries-wagmi.md",
"html_url": "https://docs.polkadot.com/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",
"preview": "[Wagmi](https://wagmi.sh/){target=\\_blank} is a collection of [React Hooks](https://wagmi.sh/react/api/hooks){target=\\_blank} for interacting with Ethereum-compatible blockchains, focusing on developer experience, feature richness, and reliability.",
"outline": [
{
"depth": 2,
Expand Down Expand Up @@ -8680,12 +8680,12 @@
}
],
"stats": {
"chars": 13604,
"words": 1515,
"chars": 13336,
"words": 1487,
"headings": 10,
"estimated_token_count_total": 3250
"estimated_token_count_total": 3238
},
"hash": "sha256:bc771f912627fa09cad64adab1bc81c052f650d6c5a3b4f0c91883a98f6628da",
"hash": "sha256:79acad3dd784fbf0f6704b74a3d2df2b7ede33f4a157cc28683c0f710a5236b2",
"token_estimator": "heuristic-v1"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from "wagmi";

const CONTRACT_ADDRESS =
"0xabBd46Ef74b88E8B1CDa49BeFb5057710443Fd29" as `0x${string}`;
"INSERT_CONTRACT_ADDRESS" as `0x${string}`;

export function StorageContract() {
const [number, setNumber] = useState<string>("42");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const assetHub = {
},
rpcUrls: {
default: {
http: ['https://testnet-passet-hub-eth-rpc.polkadot.io'],
http: ['https://testnet-passet-hub-eth-rpc.polkadot.io'], // TODO: change to paseo asset hub once ready
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This TODO comment will be visible to users in the documentation example code. Consider whether this implementation note should be in the user-facing code example, or if it should be tracked internally instead. If it needs to remain, consider making it clearer for end users (e.g., "Note: This URL will be updated to Paseo Asset Hub when available").

Suggested change
http: ['https://testnet-passet-hub-eth-rpc.polkadot.io'], // TODO: change to paseo asset hub once ready
http: ['https://testnet-passet-hub-eth-rpc.polkadot.io'], // Note: This URL will be updated to Paseo Asset Hub when available

Copilot uses AI. Check for mistakes.
},
},
} as const;
Expand Down
Loading
Loading