@@ -5,38 +5,38 @@ set -euo pipefail
55[ -n " ${DEBUG:- } " ] && set -x
66[ -z " ${ENV:- } " ] && { echo " ENV var must be set" ; exit 1; }
77
8- [ -z " ${RATIONALE_FILE:- } " ] && { echo " RATIONALE_FILE var must be set" ; exit 1; }
9-
108SCRIPT_PATH=$( readlink -f " $0 " )
119SCRIPT_DIR=$( dirname " $SCRIPT_PATH " )
1210
1311# shellcheck disable=SC1091
1412source " $SCRIPT_DIR /../bash-fns.sh"
1513
1614PICK_UTXO () {
17- SEND_ADDR=" $1 "
15+ ID=" $1 "
16+ SEND_ADDR=" $2 "
1817
19- echo " From the sender account the following lovelace only UTXO are available to return:"
20- cardano-cli latest query utxo --address " $SEND_ADDR "
18+ echo " From the $ID sender account the following lovelace only UTXO are available to return:"
19+ cardano-cli latest query utxo --address " $SEND_ADDR " | jq
20+ echo
2121 read -r -p " Enter the return to return: " UTXO
2222}
2323
2424RICH_ADDR=$( just sops-decrypt-binary " secrets/envs/${ENV} /utxo-keys/rich-utxo.addr" )
2525RICH_SKEY=$( just sops-decrypt-binary " secrets/envs/${ENV} /utxo-keys/rich-utxo.skey" )
2626
2727if [ -z " ${DISABLE_POOL_RETURN:- } " ]; then
28- PICK_UTXO " $( just sops-decrypt-binary " secrets/groups/${ENV} 1/no-deploy/${ENV} 1-bp-a-1-owner-payment-stake.addr" ) "
29- return-utxo " $ENV " " $RICH_ADDR " " $UTXO " " $RICH_SKEY " <( just sops-decrypt-binary " secrets/groups/${ENV} 1/no-deploy/${ENV} 1-bp-a-1-owner-stake.skey" )
28+ PICK_UTXO " pool1 " " $( just sops-decrypt-binary " secrets/groups/${ENV} 1/no-deploy/${ENV} 1-bp-a-1-owner-payment-stake.addr" ) "
29+ return-utxo " $ENV " " $RICH_ADDR " " $UTXO " <( echo " $RICH_SKEY " ) <( just sops-decrypt-binary " secrets/groups/${ENV} 1/no-deploy/${ENV} 1-bp-a-1-owner-stake.skey" )
3030
31- PICK_UTXO " $( just sops-decrypt-binary " secrets/groups/${ENV} 2/no-deploy/${ENV} 2-bp-b-1-owner-payment-stake.addr" ) "
32- return-utxo " $ENV " " $RICH_ADDR " " $UTXO " " $RICH_SKEY " <( just sops-decrypt-binary " secrets/groups/${ENV} 2/no-deploy/${ENV} 2-bp-b-1-owner-stake.skey" )
31+ PICK_UTXO " pool2 " " $( just sops-decrypt-binary " secrets/groups/${ENV} 2/no-deploy/${ENV} 2-bp-b-1-owner-payment-stake.addr" ) "
32+ return-utxo " $ENV " " $RICH_ADDR " " $UTXO " <( echo " $RICH_SKEY " ) <( just sops-decrypt-binary " secrets/groups/${ENV} 2/no-deploy/${ENV} 2-bp-b-1-owner-stake.skey" )
3333
34- PICK_UTXO " $( just sops-decrypt-binary " secrets/groups/${ENV} 3/no-deploy/${ENV} 3-bp-c-1-owner-payment-stake.addr" ) "
35- return-utxo " $ENV " " $RICH_ADDR " " $UTXO " " $RICH_SKEY " <( just sops-decrypt-binary " secrets/groups/${ENV} 3/no-deploy/${ENV} 3-bp-c-1-owner-stake.skey" )
34+ PICK_UTXO " pool3 " " $( just sops-decrypt-binary " secrets/groups/${ENV} 3/no-deploy/${ENV} 3-bp-c-1-owner-payment-stake.addr" ) "
35+ return-utxo " $ENV " " $RICH_ADDR " " $UTXO " <( echo " $RICH_SKEY " ) <( just sops-decrypt-binary " secrets/groups/${ENV} 3/no-deploy/${ENV} 3-bp-c-1-owner-stake.skey" )
3636fi
3737
3838if [ -z " ${DISABLE_DREP_RETURN:- } " ]; then
39- PICK_UTXO " $( just sops-decrypt-binary " secrets/envs/${ENV} /drep/drep.addr" ) "
39+ PICK_UTXO " drep-0 " " $( just sops-decrypt-binary " secrets/envs/${ENV} /drep/drep-0 .addr" ) "
4040 return-utxo " $ENV " " $RICH_ADDR " " $UTXO " \
4141 <( just sops-decrypt-binary " secrets/envs/$ENV /drep/pay-0.skey" ) \
4242 <( just sops-decrypt-binary " secrets/envs/$ENV /drep/stake-0.skey" )
0 commit comments