diff --git a/docker-compose.env b/docker-compose.env index 8d55c77..1da9916 100644 --- a/docker-compose.env +++ b/docker-compose.env @@ -61,3 +61,4 @@ MAX_BATCH_SUBMISSION_TIME=240 L1_NODE_WEB3_URL=http://l1_chain:9545 L2_NODE_WEB3_URL=http://geth_l2:8545 +SYNTHETIX_DEPLOYER_URL=http://synthetix_deployer:8081 diff --git a/optional/synthetix.yml b/optional/synthetix.yml new file mode 100644 index 0000000..3095132 --- /dev/null +++ b/optional/synthetix.yml @@ -0,0 +1,13 @@ +version: "3" + +services: + synthetix_deployer: + image: ethereumoptimism/synthetix-deployer:${SYNTHETIX_DEPLOYER_TAG:-master} + env_file: + - docker-compose.env + environment: + # derived key from mnemonic that is seeded with ETH on L1 + - DEPLOYER_PRIVATE_KEY_2=0x23d9aeeaa08ab710a57972eb56fc711d9ab13afdecc92c89586e0150bfa380a6 + + ports: + - 8081:8081 diff --git a/test.sh b/test.sh index 7f2241e..0adcdf1 100755 --- a/test.sh +++ b/test.sh @@ -46,6 +46,8 @@ INTEGRATION_TESTS_TAG=$(echo $INTEGRATION_TESTS_TAG | sed 's/\//_/g') DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )" + function run { cmd="docker-compose -f $DIR/$DOCKERFILE" if [ -f "$DIR/optional/$PKGS-service.yml" ]; then diff --git a/up-synthetix.sh b/up-synthetix.sh new file mode 100755 index 0000000..dd49a20 --- /dev/null +++ b/up-synthetix.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# Start services without the integration tests +# The `-s` flag takes a string of services to run. +# The `-l` flag will use mounted code. + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )" +SERVICES='geth_l2 l1_chain batch_submitter deployer message_relayer synthetix_deployer' +DOCKERFILE="docker-compose.yml" + +while (( "$#" )); do + case "$1" in + -l|--local) + DOCKERFILE="docker-compose.local.yml" + shift 1 + ;; + -s|--services) + SERVICES="$2" + shift 2 + ;; + *) + echo "Unknown argument $1" >&2 + shift + ;; + esac +done + +docker-compose \ + -f $DIR/$DOCKERFILE \ + -f $DIR/optional/tx-ingestion-service.yml \ + -f $DIR/optional/synthetix.yml \ + down -v --remove-orphans + +docker-compose \ + -f $DIR/$DOCKERFILE \ + -f $DIR/optional/tx-ingestion-service.yml \ + -f $DIR/optional/synthetix.yml \ + up $SERVICES