File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ export CARDANO_NODE_SOCKET_PATH=./testnet-data/socket/node1/sock
3
+ export CARDANO_NODE_NETWORK_ID=42
4
+ SRC_ADDR=$( cat testnet-data/utxo-keys/utxo1/utxo.addr)
5
+ SRC_UTXO=$( cabal run cardano-cli -- latest query utxo --address $SRC_ADDR | jq -r ' keys' [0])
6
+ cabal run cardano-cli -- latest transaction build --tx-in $SRC_UTXO --tx-out $1 +$2 --change-address $SRC_ADDR --out-file funding.txbody
7
+ cabal run cardano-cli -- latest transaction sign --tx-body-file funding.txbody --signing-key-file testnet-data/utxo-keys/utxo1/utxo.skey --out-file funding.tx
8
+ cabal run cardano-cli -- latest transaction submit --tx-file funding.tx
9
+ rm -f funding.txbody funding.tx
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ rm -fr ./testnet-data
3
+ rm -fr ../cardano-api/rpc.socket
4
+ cabal build cardano-node cardano-cli cardano-testnet
5
+ (
6
+ tries=0
7
+ while [ $tries -lt 60 ]; do
8
+ if [ -S ./testnet-data/socket/node1/rpc.sock ]; then
9
+ break
10
+ fi
11
+ sleep 1
12
+ tries=$(( tries + 1 ))
13
+ done
14
+
15
+ if [ $tries -eq 60 ]; then
16
+ echo " Timeout: Socket not found in 60 seconds." >&2
17
+ exit 1
18
+ fi
19
+
20
+ ln -sf ./testnet-data/socket/node1/rpc.sock ../cardano-api/rpc.socket
21
+ ) & cabal run cardano-testnet -- cardano --testnet-magic 42 --enable-grpc --output-dir ./testnet-data
You can’t perform that action at this time.
0 commit comments