diff --git a/yarn-project/canary/scripts/docker-compose.yml b/yarn-project/canary/scripts/docker-compose.yml index 9dba10f56cd..9839b101560 100644 --- a/yarn-project/canary/scripts/docker-compose.yml +++ b/yarn-project/canary/scripts/docker-compose.yml @@ -34,4 +34,5 @@ services: ETHEREUM_HOST: http://fork:8545 CHAIN_ID: 31337 PXE_URL: http://sandbox:8080 + SEARCH_START_BLOCK: ${FORK_BLOCK_NUMBER:-0} command: ${TEST:-./src/uniswap_trade_on_l1_from_l2.test.ts} diff --git a/yarn-project/canary/scripts/run_tests b/yarn-project/canary/scripts/run_tests index dd330d5fef2..959822fe3ef 100755 --- a/yarn-project/canary/scripts/run_tests +++ b/yarn-project/canary/scripts/run_tests @@ -7,8 +7,9 @@ set -eu export TEST=$1 export IMAGE=${2:-canary} export COMPOSE_FILE=${3:-./scripts/docker-compose.yml} - -if [ "$TEST" = "uniswap_trade_on_l1_from_l2.test.ts" ]; then +: +# if test name ends with uniswap_trade_on_l1_from_l2.test.ts, use the forked mainnet +if [[ "$TEST" == *"uniswap_trade_on_l1_from_l2.test.ts" ]]; then export FORK_URL=https://mainnet.infura.io/v3/9928b52099854248b3a096be07a6b23c export FORK_BLOCK_NUMBER=17514288 fi