mainnet-fork with multiple upstream providers
See original GitHub issueOverview
Provide a simple overview of what you wish to see added. Please include:
- What you are trying to do
I would like to be able to do the following:
ape test --network ethereum:mainnet-fork:hardhat:geth
...
and
ape test --network ethereum:mainnet-fork:hardhat:alchemy
- Why Ape’s current functionality is inadequate to address your goal This makes it easier for one to use their local node for local tests and CICD tests with alchemy
Specification
Describe the syntax and semantics of how you would like to see this feature implemented. The more detailed the better!
Remember, your feature is much more likely to be included if it does not involve any breaking changes.
ape-config.yaml
would allow more flexbility in choosing upstream provider for mainnet-fork, if one could set up their configurations in the following manner:
plugins:
- vyper
- alchemy
- hardhat
ethereum:
default_network: mainnet-fork
mainnet_fork:
default_provider: hardhat
hardhat:
default_upstream_provider: geth
geth:
fork:
ethereum:
mainnet
alchemy:
fork:
ethereum:
mainnet
geth:
ethereum:
mainnet:
uri: http://localhost:9090
Dependencies
Include links to any open issues that must be resolved before this feature can be implemented.
I don’t foresee any open issues blocking this, but it looks like a breaking change to me.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Forking other networks | Ethereum development ... - Hardhat
You can start an instance of Hardhat Network that forks mainnet. This means that it will simulate having the same state as mainnet, ......
Read more >ApeWorX/ape-hardhat: Hardhat network provider for Ape
Specify the upstream archive-data provider in your ape-config.yaml : hardhat: fork: ethereum: mainnet: upstream_provider: alchemy.
Read more >Using Fork on Hardhat in testing - Ethereum Stack Exchange
I am able to successfully query the node from a web3 application. When I try to run tests with "npx hardhat test" it...
Read more >Chain identification & aliasing for The Graph Protocol
Graph Node, and The Graph Network currently relies on a freeform string label to match subgraph manifests with the correct upstream providers ......
Read more >ape-ganache - PyPI
This is useful for multiprocessing and starting up multiple providers. Mainnet Fork. The ape-ganache plugin also includes a mainnet fork provider. It requires ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is one idea we had but in a slightly different way, basically provide fail-over functionality with how providers are chosen, so instead of one default that it tries to use or fails, you describe a preference order and it will keep trying for a connection down your preference list until it gets one (or times out)
This way, you can spend less time configuring your providers, and just describe what networks you want to connect to instead. For fork mode, upstream providers would be a subset of that list for it to cycle through.
How does this sound?
More accurate: