Skip to content
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

Testing on forked chains #1164

Open
wants to merge 2 commits into
base: feat/fork-evm-testing
Choose a base branch
from

Conversation

Alderian
Copy link

Problem:

  • Current TestHelper creates various endpoints, but the are all created on the same network
  • The emulate message sending, but never leave the current network
  • There is no way to test omnichain applications using already deployed contracts on forked chains

Solution:

The solution we came up with @shankars99 have these advantages:

1- It let you create and configure one endpoints for each fork you want to test
2- ensures oapps wires up thru the forks
3- It will let ppl test messaging and interact with already deployed contracts

Example usage:

  • There is a MyOapp.t.sol that works
  • Production example could be if you want a messaging system and you need to use Oracles or usa Uniswap to exchange, or any other contract that is already deployed and you want to test with those contracts.

Next steps:

  1. Add something similar with hardhat (its possible to use the hardhat-switch-network plugin or similar
  2. Add documentation on how to use this
  3. Add the possibility to have more endpoints by fork

- One Price feed for each network
- Ensure using correct fork for endpoint setup and OApp wireup
- Reorder sendMessage test to ensure we get correct fork contracts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant