Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
feat: run standalone node test (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
atanmarko committed Sep 15, 2023
1 parent f5da198 commit 75601ad
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docker/local-topos/polygon-edge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,25 @@ case "$1" in
|| echo "Predeployment of ConstAddressDeployer failed with error code $?"
;;

"standalone-test")
echo "Cleaning up previous execution..."
rm -rf genesis.json data-1
echo "Generating node secrets..."
NODE_ID=`$POLYGON_EDGE_BIN secrets init --insecure --num 1 --data-dir data-1 | grep Node | awk '{ print $4}'`
echo "Boot node id: " $NODE_ID
echo "Validator private key:" `cat data-1/consensus/validator.key`
echo "Generating genesis script..."
"$POLYGON_EDGE_BIN" genesis --dir genesis.json \
--consensus ibft \
--ibft-validators-prefix-path data- \
--validator-set-size=1 \
--premine=0x4AAb25B4fAd0Beaac466050f3A7142A502f4Cf0a:1000000000000000000000 \
--bootnode /ip4/127.0.0.1/tcp/10001/p2p/$NODE_ID

echo "Executing polygon-edge standalone node..."
exec "$POLYGON_EDGE_BIN" server --data-dir ./data-1 --chain genesis.json
;;

*)
echo "Executing polygon-edge..."
exec "$POLYGON_EDGE_BIN" "$@"
Expand Down

0 comments on commit 75601ad

Please sign in to comment.