forked from OffchainLabs/nitro-testnode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add smoke test for altlayer config (OffchainLabs#59)
* Add smoke test for altlayer config * add docker compose down * update docker compose * cleanup * address comments * use full node as l2 url * re-run ci
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/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 |