-
Notifications
You must be signed in to change notification settings - Fork 74
FIX - Wagmi refactor to evm #1250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging/product-ia
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated style guide suggestions (1-2 of 2)
| ## 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue: Use "Testnet" instead of "TestNet" for consistency with Polkadot branding.
| This guide uses a simple Storage contract already deployed to the Polkadot Hub TestNet. 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: |
| ``` | ||
|
|
||
| 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`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue: Include the reader explicitly for clarity.
| Create a component to interact with your deployed contract. Create a file named `components/StorageContract.tsx`: | |
| Create a component so you can interact with your deployed contract. Create a file named `components/StorageContract.tsx`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the Wagmi documentation to align with Polkadot Hub naming conventions and improve code examples. The main changes standardize project naming from "asset-hub" to "polkadot-hub" and enhance documentation clarity by removing redundant content.
- Renamed project references from
wagmi-asset-hubtowagmi-polkadot-hub - Replaced hardcoded contract address with
INSERT_CONTRACT_ADDRESSplaceholder - Removed PolkaVM preview warning and cleaned up code comments
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| smart-contracts/libraries/wagmi.md | Updated project name to wagmi-polkadot-hub, removed PolkaVM warning, cleaned up code comments, updated file paths in code blocks |
| llms-full.jsonl | Regenerated to reflect markdown changes |
| .snippets/code/smart-contracts/libraries/wagmi/wagmi-testnet.ts | Added TODO comment for future Paseo Asset Hub migration |
| .snippets/code/smart-contracts/libraries/wagmi/StorageContract.tsx | Changed hardcoded contract address to placeholder |
| .ai/site-index.json | Regenerated with updated content metadata |
| .ai/pages/smart-contracts-libraries-wagmi.md | Regenerated to reflect source markdown changes |
| .ai/categories/tooling.md | Regenerated category index with updated content |
| .ai/categories/smart-contracts.md | Regenerated category index with updated content |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ## 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. |
Copilot
AI
Nov 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file path mentioned in the instruction (src/lib/wagmi.ts) is inconsistent with the code block title (app/lib/wagmi.ts). Since the code block uses the Next.js app router structure (as evidenced by app/layout.tsx later), the instruction should reference app/lib/wagmi.ts instead of src/lib/wagmi.ts.
| 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. | |
| Create a configuration file to initialize Wagmi with Polkadot Hub. In your project, create a file named `app/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. |
| ``` | ||
|
|
||
| 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`: |
Copilot
AI
Nov 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The instruction text says to create a file named components/StorageContract.tsx, but the code block title shows app/components/StorageContract.tsx. For consistency with the Next.js app router structure used throughout this guide, the instruction should specify app/components/StorageContract.tsx.
| Create a component to interact with your deployed contract. Create a file named `components/StorageContract.tsx`: | |
| Create a component to interact with your deployed contract. Create a file named `app/components/StorageContract.tsx`: |
| 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 |
Copilot
AI
Nov 18, 2025
There was a problem hiding this comment.
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").
| 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 |
π Description
Provide a clear and concise description of your changes.
π Review Preference
Choose one:
π€ AI-Ready Docs
If content changed, regenerate AI files:
python3 scripts/generate_llms.pyβ Checklist