Update foundry description#1375
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the foundry-polkadot documentation to reflect new features in version 1.5.0 and later, including support for testing with forge test and local development with anvil-polkadot. The documentation now provides a more complete picture of the toolset's capabilities.
Key changes:
- Added comprehensive testing documentation with backend selection support (EVM and PVM)
- Added documentation for
anvil-polkadotlocal development node - Updated feature descriptions to reflect current support and limitations
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | `eth_getBlockByHash` | ✅ | Returns information about a block by hash | | ||
| | `eth_getBlockByNumber` | ✅ | Returns information about a block by number | | ||
| | `eth_getBlockReceipts` | ❌ | Returns all transaction receipts for a given block | | ||
|
|
There was a problem hiding this comment.
We should probably add here eth_getBlockTransactionCountByNumber, eth_getBlockTransactionCountByHash
| | `eth_getCode` | ✅ | Returns code at a given address | | ||
| | `eth_getProof` | ❌ | Returns the account and storage values including the Merkle proof | | ||
| | `eth_getTransactionCount` | ✅ | Returns the number of transactions sent from an address | | ||
| | `eth_getTransactionCountByHash` | ✅ | Returns the number of transactions in a block by block hash | |
There was a problem hiding this comment.
These are actually eth_getBlockTransactionCountByNumber, eth_getBlockTransactionCountByHash and are block-related RPCs
| | `debug_traceTransaction` | ✅ | Returns a full trace of a transaction's execution | | ||
| | `debug_traceCall` | ✅ | Returns a full trace of a call's execution | | ||
| | `debug_getRawTransaction` | ❌ | Returns the raw transaction data | | ||
| | `debug_codeByHash` | ❌ | Returns the code for a given code hash | |
There was a problem hiding this comment.
We have also implemented debug_traceBlockByNumber
| - **Gas Model**: The gas metering in `foundry-polkadot` is not fully aligned with Polkadot's production gas model. Tests relying on precise gas checks may fail. | ||
| - **Balance Types**: Ethereum uses `u256` for balances, while Polkadot uses `u128`. Tests involving amounts exceeding `u128::MAX` will fail in the Polkadot runtime. | ||
| - **PVM Integration Maturity**: The PVM backend is experimental. Tests may not work when using libraries or proxy patterns. | ||
|
|
There was a problem hiding this comment.
Do we want to add something about the tx pool checks that are stricter on Polkadot, so some transaction could be included and then cause a revert on Ethereum, while they cannot be included in the tx pool on Polkadot ?
| Start a local development node with: | ||
|
|
||
| ```bash | ||
| anvil-polkadot |
There was a problem hiding this comment.
What do you think of adding the docker usage?
PROs: it does not require rust installed locally and it's super fast
CONs: different versions available - if you reference the latest image published on master, you may get an unstable version. But do we have any stable version to suggest? I guess no
Co-authored-by: Giuseppe Re <giuseppe.re@parity.io>
Co-authored-by: Giuseppe Re <giuseppe.re@parity.io>
Co-authored-by: Giuseppe Re <giuseppe.re@parity.io>
Co-authored-by: Giuseppe Re <giuseppe.re@parity.io>
Co-authored-by: Giuseppe Re <giuseppe.re@parity.io>
Co-authored-by: Giuseppe Re <giuseppe.re@parity.io>
Co-authored-by: Giuseppe Re <giuseppe.re@parity.io>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Hey @smiasojed @re-gius, thank you very much for this! We'll work on the foundry page soon. The first version of the docs focused mainly on regular EVM tools, so I haven't touched this PR yet. As soon as we start adding content for PVM tools, like Foundry Polkadot, I'll get back to this PR. Just wanted to give you guys a heads-up so you know this PR is on our radar 👍 |
|
@nhussein11 it is for EVM mainly not PVM |
Yeah, for the first iteration, we covered regular EVM tools. We'll get on PVM/EVM tools soon |
| | `anvil_setIntervalMining` | ✅ | Set the mining interval | | ||
| | `anvil_getIntervalMining` | ✅ | Get the current mining interval | | ||
| | `evm_mine` | ✅ | Mine a single block | | ||
| | `evm_mineDetailed` | ✅ | Mine a single block and return detailed information | |
There was a problem hiding this comment.
| | `evm_mineDetailed` | ✅ | Mine a single block and return detailed information | | |
| | `evm_mine_detailed` | ✅ | Mine a single block and return detailed information | |
📝 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