Skip to content

Commit

Permalink
e2e tests: fix all tests to export the resolver address
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelwedler committed Sep 7, 2023
1 parent 93b9249 commit f5dbb75
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docker/base/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,15 @@ e2e_test() {
relayer=$(get_relayer_binary)
l2_rpc=http://localhost:9545
password=""
resolver=$(jq -r '.base.Resolver.address' ${ARTIFACTS_DIR}/base.deployment.json)

e2e_test_fill $ARTIFACTS_DIR $l2_rpc $KEYFILE "${password}"
echo Sending Proof

e2e_test_op_proof http://localhost:8545 $l2_rpc $KEYFILE $e2e_test_l2_txhash
echo L1 Resolve

export RESOLVER=$resolver
timeout 1m bash -c "until ${relayer} relay \
--l1-rpc-url http://localhost:8545 \
--l2-relay-to-rpc-url $l2_rpc \
Expand All @@ -87,6 +90,7 @@ e2e_test_fallback() {
relayer=$(get_relayer_binary)
l2_rpc=http://localhost:9545
password=""
resolver=$(jq -r '.base.Resolver.address' ${ARTIFACTS_DIR}/base.deployment.json)

export SOURCE_CHAIN_ID=123
e2e_test_fill $ARTIFACTS_DIR $l2_rpc $KEYFILE "${password}"
Expand All @@ -95,6 +99,8 @@ e2e_test_fallback() {
e2e_test_op_proof http://localhost:8545 $l2_rpc $KEYFILE $e2e_test_l2_txhash
echo L1 Resolve
sleep 15

export RESOLVER=$resolver
# we need this relay call to fail
if ${relayer} relay \
--l1-rpc-url http://localhost:8545 \
Expand Down
6 changes: 6 additions & 0 deletions docker/optimism/optimism.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,15 @@ e2e_test() {
relayer=$(get_relayer_binary)
l2_rpc=http://localhost:9545
password=""
resolver=$(jq -r '.base.Resolver.address' ${ARTIFACTS_DIR}/base.deployment.json)

e2e_test_fill $ARTIFACTS_DIR $l2_rpc $KEYFILE "${password}"
echo Sending Proof

e2e_test_op_proof http://localhost:8545 $l2_rpc $KEYFILE $e2e_test_l2_txhash
echo L1 Resolve

export RESOLVER=$resolver
timeout 1m bash -c "until ${relayer} relay \
--l1-rpc-url http://localhost:8545 \
--l2-relay-to-rpc-url $l2_rpc \
Expand All @@ -83,6 +86,7 @@ e2e_test_fallback() {
relayer=$(get_relayer_binary)
l2_rpc=http://localhost:9545
password=""
resolver=$(jq -r '.base.Resolver.address' ${ARTIFACTS_DIR}/base.deployment.json)

export SOURCE_CHAIN_ID=123
e2e_test_fill $ARTIFACTS_DIR $l2_rpc $KEYFILE "${password}"
Expand All @@ -91,6 +95,8 @@ e2e_test_fallback() {
e2e_test_op_proof http://localhost:8545 $l2_rpc $KEYFILE $e2e_test_l2_txhash
echo L1 Resolve
sleep 15

export RESOLVER=$resolver
# we need this relay call to fail
if ${relayer} relay \
--l1-rpc-url http://localhost:8545 \
Expand Down
3 changes: 3 additions & 0 deletions docker/polygon_zkevm/polygon_zkevm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ up() {
e2e_test() {
l2_rpc=http://localhost:8123
password=""
resolver=$(jq -r '.base.Resolver.address' ${ARTIFACTS_DIR}/base.deployment.json)

network_file="${CACHE_DIR}/network.json"
echo Copying contract addresses to $network_file
Expand All @@ -98,6 +99,8 @@ e2e_test() {
}
EOF
e2e_test_fill $ARTIFACTS_DIR $l2_rpc $KEYFILE "${password}"

export RESOLVER=$resolver
e2e_test_relayer http://localhost:8545 $l2_rpc $network_file $KEYFILE $e2e_test_l2_txhash
e2e_test_verify $ARTIFACTS_DIR $l2_rpc $ADDRESS $e2e_test_request_id
}
Expand Down

0 comments on commit f5dbb75

Please sign in to comment.