Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
91 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#! /usr/bin/env bash | ||
# shellcheck shell=bash | ||
|
||
set -euo pipefail | ||
|
||
NETWORK=preprod | ||
|
||
WALLET_PORT=${WALLET_PORT:=8090} | ||
DATA_DIR=${DATA_DIR:="/node/preprod"}/${NETWORK} | ||
WALLET_DB=${DATA_DIR}/cardano-wallet.db | ||
CARDANO_NODE_SOCKET_PATH=${DATA_DIR}/node.socket | ||
CONFIGS=${CONFIGS:="configs/cardano/${NETWORK}"} | ||
|
||
trap ctrl_c INT | ||
|
||
cabal run -O0 cardano-wallet-api:exe:cardano-wallet -- serve \ | ||
--port ${WALLET_PORT} \ | ||
--database ${WALLET_DB} \ | ||
--node-socket ${CARDANO_NODE_SOCKET_PATH} \ | ||
--testnet ${CONFIGS}/byron-genesis.json \ | ||
--listen-address 0.0.0.0 \ | ||
--trace-wallet-engine DEBUG \ | ||
--trace-ntp-client DEBUG |
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,47 @@ | ||
#! /usr/bin/env -S nix shell '.#cardano-node' --command bash | ||
# shellcheck shell=bash | ||
|
||
set -euo pipefail | ||
|
||
NETWORK=sanchonet | ||
|
||
WALLET_PORT=${WALLET_PORT:=8090} | ||
DATA_DIR=${DATA_DIR:="ignore-me"}/${NETWORK} | ||
WALLET_DB=${DATA_DIR}/cardano-wallet.db | ||
NODE_DB=${DATA_DIR}/node.db | ||
CARDANO_NODE_SOCKET_PATH=${DATA_DIR}/node.socket | ||
CONFIGS=${CONFIGS:="configs/cardano/${NETWORK}"} | ||
|
||
trap ctrl_c INT | ||
|
||
cabal run -O0 cardano-wallet:exe:cardano-wallet -- serve \ | ||
--port ${WALLET_PORT} \ | ||
--database ${WALLET_DB} \ | ||
--node-socket ${CARDANO_NODE_SOCKET_PATH} \ | ||
--testnet ${CONFIGS}/byron-genesis.json \ | ||
--listen-address 0.0.0.0 & | ||
|
||
|
||
WALLET_ID=$! | ||
|
||
cardano-node run \ | ||
--topology ${CONFIGS}/topology.json \ | ||
--database-path ${NODE_DB}\ | ||
--socket-path ${CARDANO_NODE_SOCKET_PATH} \ | ||
--config ${CONFIGS}/config.json & | ||
|
||
NODE_ID=$! | ||
function ctrl | ||
_c() { | ||
kill "${NODE_ID}" | ||
kill "${WALLET_ID}" | ||
kill "${APP_ID}" | ||
echo "DATA_DIR: ${DATA_DIR}" | ||
echo "WALLET_DB: ${WALLET_DB}" | ||
echo "NODE_DB: ${NODE_DB}" | ||
echo "CARDANO_NODE_SOCKET_PATH: ${CARDANO_NODE_SOCKET_PATH}" | ||
echo "CONFIGS: ${CONFIGS}" | ||
echo "WALLET_PORT: ${WALLET_PORT}" | ||
} | ||
|
||
while :; do sleep 2073600; done |
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,21 @@ | ||
#! /usr/bin/env bash | ||
# shellcheck shell=bash | ||
|
||
set -euo pipefail | ||
|
||
NETWORK=sanchonet | ||
|
||
WALLET_PORT=${WALLET_PORT:=8090} | ||
DATA_DIR=${DATA_DIR:="ignore-me"}/${NETWORK} | ||
WALLET_DB=${DATA_DIR}/cardano-wallet.db | ||
CARDANO_NODE_SOCKET_PATH=${DATA_DIR}/node.socket | ||
CONFIGS=${CONFIGS:="configs/cardano/${NETWORK}"} | ||
|
||
trap ctrl_c INT | ||
|
||
cabal run -O0 cardano-wallet-api:exe:cardano-wallet -- serve \ | ||
--port ${WALLET_PORT} \ | ||
--database ${WALLET_DB} \ | ||
--node-socket ${CARDANO_NODE_SOCKET_PATH} \ | ||
--testnet ${CONFIGS}/byron-genesis.json \ | ||
--listen-address 0.0.0.0 |