-
Couldn't load subscription status.
- Fork 71
Add migration guide for Ethereum contracts (new IA) #1114
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
| - Standard ERC-20, ERC-721, ERC-1155 tokens work without changes | ||
| - DeFi protocols, DEXs, and AMMs migrate seamlessly | ||
| - DAOs and governance contracts are fully compatible | ||
| - Most Solidity contracts deploy identically to Ethereum | ||
| - Factory contracts on PolkaVM need pre-uploaded dependencies | ||
| - Contracts using `EXTCODECOPY` for runtime manipulation require review | ||
| - Replace `transfer()` and `send()` with proper reentrancy guards |
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.
Since this guide is stating that it is for EVM and PVM migration. Does this hold true for PVM?
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.
Good point; it actually holds true only for PVM. With REVM, allegedly, we have all the opcodes of a normal EVM available. Let me update this sentence so it's super clear. Thankss
| - Replace `transfer()` with `.call{value}("")` and use reentrancy guards | ||
| - PolkaVM factory contracts need pre-uploaded dependencies | ||
| - Don't hardcode gas values | ||
| - Test thoroughly on TestNet before mainnet deployment |
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.
Link to TestNet please
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 adds a comprehensive migration guide for Ethereum developers moving smart contracts to Polkadot Hub. The guide covers both REVM and PolkaVM backends, explaining when to use each and what changes may be required.
Key changes:
- New migration guide document covering FAQs and considerations for Ethereum contract migration
- Documentation of backend-specific requirements (REVM vs. PolkaVM)
- Guidance on factory contracts, gas costs, and development tooling
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| smart-contracts/for-eth-devs/migration.md | New migration guide replacing TODO placeholder with comprehensive content on migrating Ethereum contracts to Polkadot Hub |
| llms.txt | Updated to include new migration guide entry and removed erroneous Python package license reference |
| llms-full.txt | Regenerated AI file with full migration guide content and removed Python package license content |
| llms-files/llms-smart-contracts.txt | Regenerated smart contracts AI file with migration guide content |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| You typically don't need to do anything special, but be aware: | ||
| - Accounts below ED threshold are automatically deleted | ||
| - ED is around 0.01 DOT (varies by network) |
Copilot
AI
Oct 28, 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.
Inconsistency in existential deposit value. This line states '0.01 DOT' but line 29574 in llms-full.txt states '1 DOT'. These values should be consistent across all documentation files.
| - ED is around 0.01 DOT (varies by network) | |
| - ED is around 1 DOT (varies by network) |
| Yes! Both backends support: | ||
| - **Wallets**: MetaMask, Talisman, SubWallet | ||
| - **Development frameworks**: Hardhat, Foundry, Remix (just consider that for PVM bytecode, you will use the Polkadot version of the tooling) |
Copilot
AI
Oct 28, 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] The parenthetical remark '(just consider that for PVM bytecode, you will use the Polkadot version of the tooling)' is awkwardly phrased and unclear. Consider rewording to: 'Note: When using PVM bytecode, you'll need the Polkadot-specific versions of these tools.'
| - **Development frameworks**: Hardhat, Foundry, Remix (just consider that for PVM bytecode, you will use the Polkadot version of the tooling) | |
| - **Development frameworks**: Hardhat, Foundry, Remix. Note: When using PVM bytecode, you'll need the Polkadot-specific versions of these tools. |
| Before migrating your contracts, review this checklist: | ||
|
|
||
| - Standard ERC-20, ERC-721, ERC-1155 tokens work without changes | ||
| - DeFi protocols, DEXs, and AMMs migrate seamlessly | ||
| - DAOs and governance contracts are fully compatible | ||
| - Most Solidity contracts deploy identically to Ethereum | ||
| - Factory contracts using PVM bytecode need pre-uploaded dependencies | ||
| - Contracts using `EXTCODECOPY` for runtime manipulation require review (for projects that will use PVM bytecode, not EVM bytecode) | ||
| - Replace `transfer()` and `send()` with proper reentrancy guards (for projects that will use PVM bytecode, not EVM bytecode) |
Copilot
AI
Oct 28, 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] The parenthetical clarifications '(for projects that will use PVM bytecode, not EVM bytecode)' are verbose and repetitive. Consider adding a single note at the beginning of the checklist stating 'Note: Items marked with * apply only to PolkaVM (PVM bytecode) deployments' and then marking these items with an asterisk.
| Before migrating your contracts, review this checklist: | |
| - Standard ERC-20, ERC-721, ERC-1155 tokens work without changes | |
| - DeFi protocols, DEXs, and AMMs migrate seamlessly | |
| - DAOs and governance contracts are fully compatible | |
| - Most Solidity contracts deploy identically to Ethereum | |
| - Factory contracts using PVM bytecode need pre-uploaded dependencies | |
| - Contracts using `EXTCODECOPY` for runtime manipulation require review (for projects that will use PVM bytecode, not EVM bytecode) | |
| - Replace `transfer()` and `send()` with proper reentrancy guards (for projects that will use PVM bytecode, not EVM bytecode) | |
| Note: Items marked with * apply only to PolkaVM (PVM bytecode) deployments. | |
| - Standard ERC-20, ERC-721, ERC-1155 tokens work without changes | |
| - DeFi protocols, DEXs, and AMMs migrate seamlessly | |
| - DAOs and governance contracts are fully compatible | |
| - Most Solidity contracts deploy identically to Ethereum | |
| - Factory contracts using PVM bytecode need pre-uploaded dependencies | |
| - Contracts using `EXTCODECOPY` for runtime manipulation require review * | |
| - Replace `transfer()` and `send()` with proper reentrancy guards * |
| Most Ethereum contracts migrate to Polkadot Hub with minimal or no changes. Use REVM for seamless compatibility or PolkaVM for enhanced performance. The key differences to remember: | ||
| - Replace `transfer()` with `.call{value}("")` and use reentrancy guards (for projects that will use PVM bytecode, not EVM bytecode) |
Copilot
AI
Oct 28, 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.
This recommendation contradicts the guidance in the checklist (line 23) which uses different wording. The conclusion should reference both transfer() and send() consistently with earlier sections, or clarify why only transfer() is mentioned here.
| - Replace `transfer()` with `.call{value}("")` and use reentrancy guards (for projects that will use PVM bytecode, not EVM bytecode) | |
| - Replace `transfer()` and `send()` with `.call{value}("")` and use reentrancy guards (for projects that will use PVM bytecode, not EVM bytecode) |
Closes 1022
π 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