Skip to content

Commit

Permalink
feat: refactor directory structure by moving cardano/chains to root-l…
Browse files Browse the repository at this point in the history
…evel chains directory
  • Loading branch information
dtkhanh-smartosc committed May 8, 2024
1 parent 9ed88b9 commit 08eb7f1
Show file tree
Hide file tree
Showing 33 changed files with 22 additions and 52 deletions.
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,13 @@ chains/osmosis/configuration/.osmosis-local/config/client.toml
chains/osmosis/configuration/.osmosis-local/config/node_key.json
chains/osmosis/configuration/.osmosis-local/config/priv_validator_key.json
chains/osmosis/configuration/.osmosis-local/wasm/wasm/cache
chains/osmosis/configuration/.osmosis-local/wasm/wasm/state/wasm
chains/osmosis/configuration/.osmosis-local/wasm/wasm/state/wasm



chains/cardano/devnet/
chains/cardano/kupo-db/
chains/cardano/db-sync-data/
chains/cardano/postgres/
chains/cardano/baseinfo/
chains/cardano/persistence/
18 changes: 0 additions & 18 deletions build.sh

This file was deleted.

5 changes: 3 additions & 2 deletions cardano/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ if [[ "$USER" = "jenkins" ]] ; then
DENO="/var/lib/jenkins/.deno/bin/deno"
fi

cd ../chains
cd ../../chains/cardano
./run-docker.sh

# $GATEWAY_DIR="$SCRIPT_DIR/../gateway"

cd ../
cd ../../cardano
cp .env.example .env
${AIKEN} build --trace-level verbose
${DENO} run -A ./aiken-to-lucid/src/main.ts
Expand Down
4 changes: 2 additions & 2 deletions cardano/scripts/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ else
DOCKER_COMPOSE_CMD="docker-compose"
fi

cd ../chains
cd ../../chains/cardano
${DOCKER_COMPOSE_CMD} down

cd ../gateway
cd ../../cardano/gateway
${DOCKER_COMPOSE_CMD} down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ echo "{\"Epoch0Nonce\": ${Epoch0Nonce}, \"poolParams\": ${PoolParams}}" > "$BASE

echo "Epoch0Nonce: ${Epoch0Nonce}"

cd ../gateway
cd ../../cardano/gateway
sed -i.bak "s/CARDANO_EPOCH_NONCE_GENESIS=.*/CARDANO_EPOCH_NONCE_GENESIS=${Epoch0Nonce}/g" ".env.example"
rm .env.example.bak

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
# "up-to-date" genesis files. If the directory exists, it is wiped out.
set -e

BASEDIR=$(realpath $(dirname $(realpath $0))/..)
BASEDIR=$(realpath $(dirname $(realpath $0)))
echo "BASEDIR" $BASEDIR
TARGETDIR="devnet"
KUPODBDIR="kupo-db"
DBSYNCDATADIR="db-sync-data"
Expand All @@ -22,9 +23,9 @@ fi
[ -d "$POSTGRESDIR" ] && { echo "Cleaning up directory $POSTGRESDIR" ; ${SUDO} rm -r $POSTGRESDIR ; }
[ -d "$BASEINFODIR" ] && { echo "Cleaning up directory $BASEINFODIR" ; ${SUDO} rm -r $BASEINFODIR ; }

cp -af "$BASEDIR/chains/config/devnet/" "$TARGETDIR"
cp -af "$BASEDIR/chains/config/credentials" "$TARGETDIR"
cp -af "$BASEDIR/chains/config/protocol-parameters.json" "$TARGETDIR"
cp -af "$BASEDIR/config/devnet/" "$TARGETDIR"
cp -af "$BASEDIR/config/credentials" "$TARGETDIR"
cp -af "$BASEDIR/config/protocol-parameters.json" "$TARGETDIR"
echo '{"Producers": []}' > "$TARGETDIR/topology.json"
sed -i.bak "s/\"startTime\": [0-9]*/\"startTime\": $(date +%s)/" "$TARGETDIR/genesis-byron.json" && \
sed -i.bak "s/\"systemStart\": \".*\"/\"systemStart\": \"$(date -u +%FT%TZ)\"/" "$TARGETDIR/genesis-shelley.json"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
set -e

SCRIPT_DIR=$(dirname $(realpath $0))

# SCRIPT_DIR=$SCRIPT_DIR/../../cardano/
cd ${SCRIPT_DIR}

DOCKER_COMPOSE_CMD=
Expand Down
File renamed without changes.
23 changes: 0 additions & 23 deletions start_cardano.sh

This file was deleted.

0 comments on commit 08eb7f1

Please sign in to comment.