-
Notifications
You must be signed in to change notification settings - Fork 10
Issue #336 Multi-chain support - run a second instance of ganache-cli with Chain Id #1 #482
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
Conversation
elpiel
commented
Mar 28, 2022
- scripts - ethereum - Dockerfile - add CHAIN_ID env. var
- scripts - ethereum - add snapshot_contracts_{CHAIN_ID} snapshots
- scropts - ethereum - ganache-cli - use CHAIN_ID env. var.
- docker-compose.harness.yml - run second instance of ganache-cli
- test_harness - Makefile - start second ganache-cli service
- test_harness - add deployment for contracts on second chain
- test_harness - Setup - add logger & logging
- scripts - ethereum - Dockerfile add CHAIN_ID env. var - scripts - ethereum - add snapshot_contracts_{CHAIN_ID} snapshots - scropts - ethereum - ganache-cli - use CHAIN_ID env. var. - docker-compose.harness.yml - run second instance of ganache-cli - test_harness - Makefile - start second ganache-cli service - test_harness - add deployment for contracts on second chain - test_harness - Setup - add logger & logging
scripts - ethereum - use snapshot folder based on CHAIN_ID
@@ -28,7 +29,7 @@ pub mod deposits; | |||
/// NOTE: Current the snapshot and test setup use a single Chain. | |||
/// | |||
/// Uses Chain #1337 from the [`GANACHE_CONFIG`] static to init the contracts | |||
pub static SNAPSHOT_CONTRACTS: Lazy<Contracts> = Lazy::new(|| { | |||
pub static SNAPSHOT_CONTRACTS_1337: Lazy<Contracts> = Lazy::new(|| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should think of better way to setup and test when using multi-chain. This is sufficient for the time being.
# The Chain Id that will be passed to `ganache-cli` | ||
ENV CHAIN_ID= | ||
# The snapshot contracts directory that will be used | ||
ARG SNAPSHOT_CONTRACTS= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Env. variables cannot be used in COPY
, this is why we are passing a build argument of the snapshot directory that will be loaded by Ganache-cli