Skip to content

Commit

Permalink
mainnet fork image
Browse files Browse the repository at this point in the history
  • Loading branch information
mcclurejt committed Jun 3, 2024
1 parent bda42b0 commit bc73c36
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
69 changes: 69 additions & 0 deletions docker-compose.fork.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
services:
anvil:
image: ${FORK_IMAGE}
command: |
'anvil --fork-url ${MAINNET_RPC_URL} --chain-id 42069 --host 0.0.0.0'
ports:
- 8545:8545
env_file:
- .env
networks:
- fork

deployer:
image: ${FORK_IMAGE}
command: |
'make deploy-fork'
restart: on-failure
env_file:
- .env
volumes:
- artifacts:/src/artifacts/
networks:
- fork

artifacts:
image: ${FORK_IMAGE}
volumes:
- artifacts:/var/www/artifacts/
depends_on:
deployer:
condition: service_completed_successfully
networks:
- fork

checkpoint-bot:
image: ${FORK_IMAGE}
command: |
'cp /src/artifacts/deployments.local.json /src/deployments.local.json && npx hardhat fork:create-checkpoints --network mainnet_fork --config hardhat.config.mainnet_fork.ts --show-stack-traces'
restart: unless-stopped
env_file:
- .env
volumes:
- artifacts:/src/artifacts/
depends_on:
deployer:
condition: service_completed_successfully
networks:
- fork

rate-bot:
image: ${FORK_IMAGE}
command: |
'cp /src/artifacts/deployments.local.json /src/deployments.local.json && npx hardhat fork:maintain-rate --network mainnet_fork --config hardhat.config.mainnet_fork.ts --show-stack-traces'
restart: unless-stopped
env_file:
- .env
volumes:
- artifacts:/src/artifacts/
depends_on:
deployer:
condition: service_completed_successfully
networks:
- fork

volumes:
artifacts:

networks:
fork:
1 change: 1 addition & 0 deletions env/env.images
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Anvil
DEVNET_IMAGE=ghcr.io/delvtech/hyperdrive/devnet:1.0.1
TESTNET_IMAGE=ghcr.io/delvtech/hyperdrive/testnet:1.0.1
FORK_IMAGE=ghcr.io/delvtech/hyperdrive/mainnet_fork:1.0.9

# Infra
ARTIFACTS_IMAGE=ghcr.io/delvtech/infra/artifacts:0.0.8
Expand Down

0 comments on commit bc73c36

Please sign in to comment.