-
Notifications
You must be signed in to change notification settings - Fork 74
Fix - Ethersjs library page now using EVM #1241
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.
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
.binbytecode files instead of.polkavmfiles - 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'; |
Copilot
AI
Nov 17, 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 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';| const mnemonic = 'evoke moment pluck misery cheese boy era fresh useful frame resemble cinnamon'; | |
| const mnemonic = process.env.MNEMONIC || 'INSERT_MNEMONIC'; |
| 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'; |
Copilot
AI
Nov 17, 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 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';| const contractAddress = '0x83e43892a98f924706E9DB7917244897dC8b8126'; | |
| const contractAddress = 'INSERT_CONTRACT_ADDRESS'; |
| }; | ||
|
|
||
| const mnemonic = 'INSERT_MNEMONIC'; | ||
| const mnemonic = 'evoke moment pluck misery cheese boy era fresh useful frame resemble cinnamon'; |
Copilot
AI
Nov 17, 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 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';| const mnemonic = 'evoke moment pluck misery cheese boy era fresh useful frame resemble cinnamon'; | |
| const mnemonic = 'INSERT_MNEMONIC'; |
|
|
||
| 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 |
Copilot
AI
Nov 17, 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.
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 readyEither complete the change or remove the TODO comment.
| 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', |
|
|
||
| ```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' |
Copilot
AI
Nov 17, 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.
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.
| --8<-- 'code/smart-contracts/libraries/ethers-js/deploy.js4:92' | |
| --8<-- 'code/smart-contracts/libraries/ethers-js/deploy.js:84:92' |
|
|
||
| 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 |
Copilot
AI
Nov 17, 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.
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 readyTo:
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 | |
| rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io', // TODO: replace to `https://services.polkadothub-rpc.com/testnet` when ready |
β¦address; revise documentation to reflect these changes and remove unnecessary placeholder instructions.
π 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