Skip to content

Commit

Permalink
Merge branch 'main' into ci/add-test
Browse files Browse the repository at this point in the history
  • Loading branch information
HashMapsData2Value committed Oct 25, 2024
2 parents 8a0f600 + 554cea8 commit 252b021
Show file tree
Hide file tree
Showing 33 changed files with 1,419 additions and 425 deletions.
10 changes: 0 additions & 10 deletions .docker/algod_config.json

This file was deleted.

52 changes: 0 additions & 52 deletions .docker/algod_network_template.json

This file was deleted.

251 changes: 0 additions & 251 deletions .docker/run.sh

This file was deleted.

16 changes: 16 additions & 0 deletions .docker/start_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

set -e

if [ "$DEBUG" = "1" ]; then
set -x
fi

if [ "$ALGORAND_DATA" != "/algod/data" ]; then
echo "Do not override 'ALGORAND_DATA' environment variable."
exit 1
fi

/node/run/start_empty.sh &
/node/run/start_fast_catchup.sh &
/node/run/start_dev.sh
49 changes: 49 additions & 0 deletions .docker/start_dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env bash

set -e

if [ "$DEBUG" = "1" ]; then
set -x
fi

if [ "$ALGORAND_DATA" != "/algod/data" ]; then
echo "Do not override 'ALGORAND_DATA' environment variable."
exit 1
fi

# Configure the participation node
if [ -d "$ALGORAND_DATA" ]; then
if [ -f "$ALGORAND_DATA/genesis.json" ]; then
if [ "$TOKEN" != "" ]; then
echo "$TOKEN" >"$EMPTY_DATA/algod.token"
fi
if [ "$ADMIN_TOKEN" != "" ]; then
echo "$ADMIN_TOKEN" >"$EMPTY_DATA/algod.admin.token"
fi
algod -o -d "$ALGORAND_DATA" -l "0.0.0.0:8080"
else
sed -i "s/NUM_ROUNDS/${NUM_ROUNDS:-30000}/" "/node/run/template.json"
sed -i "s/\"NetworkName\": \"\"/\"NetworkName\": \"hack-tui\"/" "/node/run/template.json"
goal network create --noclean -n tuinet -r "${ALGORAND_DATA}/.." -t "/node/run/template.json"

# Cycle Network
goal network start -r "${ALGORAND_DATA}/.."
goal node stop

# Update Tokens
if [ "$TOKEN" != "" ]; then
echo "$TOKEN" >"$ALGORAND_DATA/algod.token"
fi
if [ "$ADMIN_TOKEN" != "" ]; then
echo "$ADMIN_TOKEN" >"$ALGORAND_DATA/algod.admin.token"
fi
# Import wallet
goal account import -m "artefact exist coil life turtle edge edge inside punch glance recycle teach melody diet method pause slam dumb race interest amused side learn able heavy"

algod -o -d "$ALGORAND_DATA" -l "0.0.0.0:8080"
fi

else
echo "$ALGORAND_DATA" does not exist
exit 1
fi
Loading

0 comments on commit 252b021

Please sign in to comment.