forked from OffchainLabs/nitro-testnode
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
E2E smoke test with nitro components running separately
- Loading branch information
Showing
2 changed files
with
29 additions
and
12 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,22 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
# no-simple runs a full | ||
./test-node.bash --espresso --latest-espresso-image --validate --tokenbridge --init-force --detach --no-simple | ||
|
||
# Sending L2 transaction | ||
./test-node.bash script send-l2 --ethamount 100 --to user_l2user --wait | ||
|
||
rollupAddress=$(docker compose run --entrypoint sh poster -c "jq -r '.[0].rollup.rollup' /config/deployed_chain_info.json | tail -n 1 | tr -d '\r\n'") | ||
while true; do | ||
confirmed=$(cast call --rpc-url http://localhost:8545 $rollupAddress 'latestConfirmed()(uint256)') | ||
echo "Number of confirmed staking nodes: $confirmed" | ||
if [ "$confirmed" -gt 0 ]; then | ||
break | ||
else | ||
echo "Waiting for more confirmed nodes ..." | ||
fi | ||
sleep 5 | ||
done | ||
|
||
docker compose down |