Skip to content

Conversation

@nhussein11
Copy link
Collaborator

@nhussein11 nhussein11 commented Oct 16, 2025

Closes 1022

πŸ“ 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 Oct 16, 2025
@nhussein11 nhussein11 requested a review from a team as a code owner October 16, 2025 12:54
@nhussein11 nhussein11 added B0 - Needs Review Pull request is ready for review C1 - Medium Medium priority task A0 - New Content Pull request contains new content pages labels Oct 16, 2025
Comment on lines 17 to 23
- 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
Copy link
Contributor

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?

Copy link
Collaborator Author

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
Copy link
Contributor

Choose a reason for hiding this comment

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

Link to TestNet please

Copilot AI review requested due to automatic review settings October 28, 2025 13:21
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 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)
Copy link

Copilot AI Oct 28, 2025

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.

Suggested change
- ED is around 0.01 DOT (varies by network)
- ED is around 1 DOT (varies by network)

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

Copilot AI Oct 28, 2025

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.'

Suggested change
- **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.

Copilot uses AI. Check for mistakes.
Comment on lines +15 to +23
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)
Copy link

Copilot AI Oct 28, 2025

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.

Suggested change
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 *

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

Copilot AI Oct 28, 2025

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.

Suggested change
- 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)

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

A0 - New Content Pull request contains new content pages 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