Skip to content

Conversation

@nhussein11
Copy link
Collaborator

πŸ“ Description

Provide a clear and concise description of your changes.

πŸ” Review Preference

Choose one:

  • βœ… I have time to handle formatting/style feedback myself
  • ⚑ Docs team handles formatting (check "Allow edits from maintainers")

πŸ€– AI-Ready Docs

If content changed, regenerate AI files:

  • βœ… I ran python3 scripts/generate_llms.py
  • ⚑ Docs team will regenerate (check "Allow edits from maintainers")

βœ… Checklist

@nhussein11 nhussein11 self-assigned this Nov 18, 2025
@nhussein11 nhussein11 requested a review from a team as a code owner November 18, 2025 15:22
Copilot AI review requested due to automatic review settings November 18, 2025 15:22
@nhussein11 nhussein11 added B0 - Needs Review Pull request is ready for review C1 - Medium Medium priority task A1 - Maintenance Major Pull request contains major updates to an existing page (i.e., adding a new section, reorgs, etc.) labels Nov 18, 2025
Copy link

@github-actions github-actions bot left a 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)

## Install Dependencies

Install viem along with other necessary dependencies, including [@parity/resolc](https://www.npmjs.com/package/@parity/resolc){target=\_blank}, which enables to compile smart contracts to [PolkaVM](/smart-contracts/for-eth-devs/#polkavm){target=\_blank} bytecode:
Install viem along with other necessary dependencies, including [`solc`](https://www.npmjs.com/package/solc){target=\_blank}, which enables to compile smart contracts EVM bytecode:

Choose a reason for hiding this comment

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

Issue: Sentence ends with a colon; the phrase "enables to compile" is awkward. Use a period and correct the possessive.

Suggested change
Install viem along with other necessary dependencies, including [`solc`](https://www.npmjs.com/package/solc){target=\_blank}, which enables to compile smart contracts EVM bytecode:
Install viem along with other necessary dependencies, including [`solc`](https://www.npmjs.com/package/solc){target=\_blank}, which enables compiling smart contracts' EVM bytecode.

```

After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.polkavm` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.
After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.vin` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.

Choose a reason for hiding this comment

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

Issue: The sentence is incomplete and references the wrong artifact file name.

Suggested change
After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.vin` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.
After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.bin` (containing the compiled bytecode).

Copilot finished reviewing on behalf of nhussein11 November 18, 2025 15:25
Copy link
Contributor

Copilot AI left a 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 refactors the viem library documentation to use standard EVM compilation with solc instead of PolkaVM compilation with @parity/resolc. The changes align the documentation with standard Ethereum smart contract development practices.

Key Changes:

  • Replaced @parity/resolc compiler with standard solc for EVM bytecode compilation
  • Restructured project to separate ABIs and bytecode artifacts into distinct directories (abis/ and artifacts/)
  • Updated TypeScript imports to include .ts file extensions
  • Removed PolkaVM-specific warnings and references

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
smart-contracts/libraries/viem.md Updated main documentation to reflect EVM compilation workflow with solc
.snippets/code/smart-contracts/libraries/viem/compile.ts Replaced resolc compilation with standard solc compiler implementation
.snippets/code/smart-contracts/libraries/viem/deploy.ts Updated to read bytecode from new file structure with proper path handling
.snippets/code/smart-contracts/libraries/viem/interact.ts Updated imports and file paths to match new project structure
.snippets/code/smart-contracts/libraries/viem/fetchLastBlock.ts Added TODO comments (should be removed)
llms-full.jsonl Regenerated with updated documentation content
.ai/pages/smart-contracts-libraries-viem.md Regenerated AI-formatted documentation
.ai/site-index.json Updated metadata and content hashes
.ai/categories/tooling.md Updated category file with new content
.ai/categories/smart-contracts.md Updated category file with new content

πŸ’‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

```

After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.polkavm` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.
After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.vin` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.
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.

Typo: "Storage.vin" should be "Storage.bin". The file extension for the compiled bytecode is ".bin" as shown in the project structure and throughout the code examples.

Suggested change
After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.vin` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.
After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.bin` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.

Copilot uses AI. Check for mistakes.
import { createPublicClient, http } from 'viem';

const transport = http('https://testnet-passet-hub-eth-rpc.polkadot.io');
const transport = 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.

TODO comments should not be committed to production documentation. These comments reference changing to "paseo asset hub once ready" but appear in user-facing code examples. Either remove the TODO comments or use placeholder text.

Copilot uses AI. Check for mistakes.
import { createPublicClient, http } from 'viem';

const transport = http('https://testnet-passet-hub-eth-rpc.polkadot.io');
const transport = 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.

TODO comments should not be committed to production documentation. These comments reference changing to "paseo asset hub once ready" but appear in user-facing code examples. Either remove the TODO comments or use placeholder text like INSERT_RPC_URL as done elsewhere in the documentation.

Copilot uses AI. Check for mistakes.
```

After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.polkavm` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.
After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.vin` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.
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.

Typo: "Storage.vin" should be "Storage.bin". The file extension for the compiled bytecode is ".bin" as shown in the project structure and throughout the code examples.

Suggested change
After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.vin` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.
After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.bin` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.

Copilot uses AI. Check for mistakes.
```

After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.polkavm` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.
After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.vin` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.
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.

Typo: "Storage.vin" should be "Storage.bin". The file extension for the compiled bytecode is ".bin" as shown in the project structure and throughout the code examples.

Suggested change
After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.vin` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.
After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.bin` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.

Copilot uses AI. Check for mistakes.
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.

TODO comments should not be committed to production documentation. These comments reference changing to "paseo asset hub once ready" but appear in user-facing code examples. Either remove the TODO comments or use placeholder text like INSERT_RPC_URL as done elsewhere in the documentation.

Copilot uses AI. Check for mistakes.
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.

TODO comments should not be committed to production documentation. These comments reference changing to "paseo asset hub once ready" but appear in user-facing code examples. Either remove the TODO comments or use placeholder text.

Copilot uses AI. Check for mistakes.
import { createPublicClient, http } from 'viem';

const transport = http('https://testnet-passet-hub-eth-rpc.polkadot.io');
const transport = 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.

TODO comments should not be committed to production documentation. These comments reference changing to "paseo asset hub once ready" but appear in user-facing code examples. Either remove the TODO comments or use placeholder text.

Copilot uses AI. Check for mistakes.
import { createPublicClient, http } from 'viem';

const transport = http('https://testnet-passet-hub-eth-rpc.polkadot.io');
const transport = 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.

TODO comments should not be committed to production documentation. These comments reference changing to "paseo asset hub once ready" but appear in user-facing code examples. Either remove the TODO comments or use placeholder text.

Copilot uses AI. Check for mistakes.
```

After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.polkavm` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.
After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.vin` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.
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.

Typo: "Storage.vin" should be "Storage.bin". The file extension for the compiled bytecode is ".bin" as shown in the project structure and throughout the code examples.

Suggested change
After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.vin` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.
After executing this script, you will see the compilation results including the generated `Storage.json` (containing the contract's ABI) and `Storage.bin` (containing the compiled bytecode) files in the `artifacts` folder. These files contain all the necessary information for deploying and interacting with your smart contract on Polkadot Hub.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A1 - Maintenance Major Pull request contains major updates to an existing page (i.e., adding a new section, reorgs, etc.) B0 - Needs Review Pull request is ready for review C1 - Medium Medium priority task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants