diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index 9eb5933..310c34a 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -25,6 +25,7 @@ jobs: ./smoke-test-nitro-simple.bash, ./smoke-test-full-node.bash, ./smoke-test-espresso-finality-node.bash, + ./smoke-test-altlayer.bash, ] runs-on: ubuntu-24.04 diff --git a/smoke-test-altlayer.bash b/smoke-test-altlayer.bash new file mode 100755 index 0000000..c4875ec --- /dev/null +++ b/smoke-test-altlayer.bash @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +set -euo pipefail + + +# Run altlayer config with batch poster, sequencer, full node and validator +./test-node.bash --init-force --validate --batchposters 1 --latest-espresso-image --detach + +docker compose up -d full-node --detach + +# Sending L2 transaction through the full-node's api +user=user_l2user +./test-node.bash script send-l2 --l2url ws://full-node:8548 --ethamount 100 --to $user --wait + +# Check the balance from full-node's api +userAddress=$(docker compose run scripts print-address --account $user | tail -n 1 | tr -d '\r\n') + +while true; do + balance=$(cast balance $userAddress --rpc-url http://127.0.0.1:8947) + if [ ${#balance} -gt 0 ]; then + break + fi + sleep 1 +done + +echo "Smoke test succeeded." +docker compose down