For Westend Asset Hub (rpc: https://westend-asset-hub-eth-rpc.polkadot.io ) which now supports EVM-compatible smart contracts, we would like to ensure that the most commonly developer tooling works out of the box. The list below is non-exhaustive but is our scope for now as these are the most important for new developers wanting to work with SCs on Polkadot. Once these have automated testing in place, we can move onto the hardhat plugin.
- web3.js
- ethers.js
Since these are libraries it would be good to start out with some research on how to approach testing for these (most common use-cases in the form of test dapps- see https://github.com/MetaMask/test-dapp for inspiration). There may be some overlap with the already existing RPC compatibility tests https://github.com/bee344/evm-tests (from @IkerAlus 's team) so we'll want to make sure there isn't any duplicated work here and perhaps it's possible to leverage some of their work.
Deliverables here would be a test dapp for both web3.js and ethers.js, which is able to run automated tests on to ensure compatibility.
The primary objective is to develop and implement automated compatibility testing for web3.js and ethers.js with Westend Asset Hub's EVM-compatible smart contracts.
- Develop test DApps for web3.js and ethers.js.
- Create automated test suites for both libraries.
- Research and planning.
- Development of test DApps.
- Implementation of automated tests.
- Integration and optimization of the testing framework.
The research phase focuses on conducting a market analysis of existing tools and frameworks in other ecosystems to derive insights and inspiration for the development of this testing framework.
The current emphasis is on adapting Foundry to work with the Parity Virtual Machine (PVM). This will enable developers to compile smart contracts for the PVM. Much of this work will be inspired by the Foundry zkSync project.
Several components need to be developed to adapt Foundry to the PVM:
- New CLI commands will be introduced to support compiling with revive or Solidity compatibility for the PVM.
- Example: CLI commands in Foundry zkSync.
- These options will be integrated across all Foundry CLI arguments, as shown in the build options.
- The following areas of Foundry functionality will be extended:
- Compilation: Adding functionality to build contracts using revive, similar to this approach in Foundry zkSync.
- Contract Verification: Implementing a verification flow, as seen in Foundry zkSync’s contract verification module.
- Testing: Setting up testing environments, including in-memory nodes, as demonstrated in this testing utility.
- Additional insights will be gathered to understand the purpose of the zksync folder.
- The Foundry compiler backend will require updates to support a custom Solidity compiler, similar to zkSync’s zksolc implementation.
- Reference: Compiler adaptations in Foundry zkSync.
The planning phase will establish a roadmap for integrating the above functionalities into the testing framework.
(Details to be added based on progress.)
(Details to be added based on progress.)
(Details to be added based on progress.)