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 17, 2025
Copilot AI review requested due to automatic review settings November 17, 2025 12:38
@nhussein11 nhussein11 requested a review from a team as a code owner November 17, 2025 12:38
Copilot finished reviewing on behalf of nhussein11 November 17, 2025 12:40
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 transitions the Ethers.js library documentation from using PolkaVM compilation (via @parity/resolc) to standard EVM compilation (via solc). This change aligns the documentation with Polkadot Hub's Ethereum JSON-RPC endpoint support, making the tooling more familiar for Ethereum developers.

Key Changes:

  • Replaced PolkaVM/Revive compiler references with standard Solidity compiler (solc 0.8.33)
  • Updated compilation scripts to generate .bin bytecode files instead of .polkavm files
  • Added new contract size advisory noting Ethereum's 24 KiB limit (EIP-170)

Reviewed Changes

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

Show a summary per file
File Description
variables.yml Added solc dependency configuration (version 0.8.33)
text/smart-contracts/code-size.md New snippet file documenting EVM contract size limits
smart-contracts/libraries/ethers-js.md Updated guide to use solc instead of resolc, revised compilation instructions and file paths
.snippets/code/smart-contracts/libraries/ethers-js/deploy.js Refactored deployment script to work with EVM bytecode and updated directory structure
.snippets/code/smart-contracts/libraries/ethers-js/compile.js Complete rewrite to use solc compiler with proper EVM output format
.snippets/code/smart-contracts/libraries/ethers-js/checkStorage.js Updated artifact paths to match new directory structure
code/smart-contracts/libraries/ethers-js/Storage.sol New Solidity contract example file
llms.txt, llms-full.jsonl, .ai/* Regenerated AI documentation files reflecting the content changes

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

};

const mnemonic = 'INSERT_MNEMONIC';
const mnemonic = 'evoke moment pluck misery cheese boy era fresh useful frame resemble cinnamon';
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The mnemonic phrase is hardcoded in the deployment script. This is a security risk as it exposes private keys in the codebase. The placeholder INSERT_MNEMONIC should be kept instead, or the script should read from environment variables.

Replace:

const mnemonic = 'evoke moment pluck misery cheese boy era fresh useful frame resemble cinnamon';

With:

const mnemonic = 'INSERT_MNEMONIC';

Or better yet, use environment variables:

const mnemonic = process.env.MNEMONIC || 'INSERT_MNEMONIC';
Suggested change
const mnemonic = 'evoke moment pluck misery cheese boy era fresh useful frame resemble cinnamon';
const mnemonic = process.env.MNEMONIC || 'INSERT_MNEMONIC';

Copilot uses AI. Check for mistakes.
const mnemonic = 'evoke moment pluck misery cheese boy era fresh useful frame resemble cinnamon';
const contractName = 'Storage';
const contractAddress = 'INSERT_CONTRACT_ADDRESS';
const contractAddress = '0x83e43892a98f924706E9DB7917244897dC8b8126';
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The contract address is hardcoded in the example script. This should remain as a placeholder INSERT_CONTRACT_ADDRESS since it's meant to be documentation that users should customize.

Replace:

const contractAddress = '0x83e43892a98f924706E9DB7917244897dC8b8126';

With:

const contractAddress = 'INSERT_CONTRACT_ADDRESS';
Suggested change
const contractAddress = '0x83e43892a98f924706E9DB7917244897dC8b8126';
const contractAddress = 'INSERT_CONTRACT_ADDRESS';

Copilot uses AI. Check for mistakes.
};

const mnemonic = 'INSERT_MNEMONIC';
const mnemonic = 'evoke moment pluck misery cheese boy era fresh useful frame resemble cinnamon';
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The mnemonic phrase is hardcoded in the interaction script. This is a security risk as it exposes private keys in the codebase. The placeholder INSERT_MNEMONIC should be kept instead.

Replace:

const mnemonic = 'evoke moment pluck misery cheese boy era fresh useful frame resemble cinnamon';

With:

const mnemonic = 'INSERT_MNEMONIC';
Suggested change
const mnemonic = 'evoke moment pluck misery cheese boy era fresh useful frame resemble cinnamon';
const mnemonic = 'INSERT_MNEMONIC';

Copilot uses AI. Check for mistakes.

const providerConfig = {
rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io',
rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io', #TODO: replace to `https://services.polkadothub-rpc.com/testnet` when ready
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

There's a TODO comment left in production code that should be addressed or removed before merging. If the URL change is pending, consider documenting this separately or creating a follow-up issue.

The line reads:

rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io', #TODO: replace to `https://services.polkadothub-rpc.com/testnet` when ready

Either complete the change or remove the TODO comment.

Suggested change
rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io', #TODO: replace to `https://services.polkadothub-rpc.com/testnet` when ready
rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io',

Copilot uses AI. Check for mistakes.

```js title="scripts/deploy.js"
--8<-- 'code/smart-contracts/libraries/ethers-js/deploy.js:87:95'
--8<-- 'code/smart-contracts/libraries/ethers-js/deploy.js4:92'
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

There's a syntax error in the line number reference. Line 178 has a malformed snippet reference:

--8<-- 'code/smart-contracts/libraries/ethers-js/deploy.js4:92'

Should be:

--8<-- 'code/smart-contracts/libraries/ethers-js/deploy.js:84:92'

The : separator is missing between the file path and line numbers.

Suggested change
--8<-- 'code/smart-contracts/libraries/ethers-js/deploy.js4:92'
--8<-- 'code/smart-contracts/libraries/ethers-js/deploy.js:84:92'

Copilot uses AI. Check for mistakes.

const providerConfig = {
rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io',
rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io', #TODO: replace to `https://services.polkadothub-rpc.com/testnet` when ready
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

In JavaScript, this should use // for comments instead of #. The current syntax is invalid JavaScript.

Change:

rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io', #TODO: replace to `https://services.polkadothub-rpc.com/testnet` when ready

To:

rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io', // TODO: replace to `https://services.polkadothub-rpc.com/testnet` when ready
Suggested change
rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io', #TODO: replace to `https://services.polkadothub-rpc.com/testnet` when ready
rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io', // TODO: replace to `https://services.polkadothub-rpc.com/testnet` when ready

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