Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix demo for conway #1623

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions demo/seed-devnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,23 @@ function seedFaucet() {
echo >&2 "Seeding a UTXO from faucet to ${ACTOR} with ${AMOUNT}Ł"

# Determine faucet address and just the **first** txin addressed to it
FAUCET_ADDR=$(ccli address build --payment-verification-key-file ${DEVNET_DIR}/credentials/faucet.vk)
FAUCET_TXIN=$(ccli query utxo --address ${FAUCET_ADDR} --out-file /dev/stdout | jq -r 'keys[0]')
FAUCET_ADDR=$(ccli conway address build --payment-verification-key-file ${DEVNET_DIR}/credentials/faucet.vk)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a pity that we need this. The cardano-cli becomes harder to use by the day :(

FAUCET_TXIN=$(ccli conway query utxo --address ${FAUCET_ADDR} --out-file /dev/stdout | jq -r 'keys[0]')

ACTOR_ADDR=$(ccli address build --payment-verification-key-file ${DEVNET_DIR}/credentials/${ACTOR}.vk)
ACTOR_ADDR=$(ccli conway address build --payment-verification-key-file ${DEVNET_DIR}/credentials/${ACTOR}.vk)

ccli transaction build --babbage-era --cardano-mode \
ccli conway transaction build --cardano-mode \
--change-address ${FAUCET_ADDR} \
--tx-in ${FAUCET_TXIN} \
--tx-out ${ACTOR_ADDR}+${AMOUNT} \
--out-file ${DEVNET_DIR}/seed-${ACTOR}.draft >&2
ccli transaction sign \
ccli conway transaction sign \
--tx-body-file ${DEVNET_DIR}/seed-${ACTOR}.draft \
--signing-key-file ${DEVNET_DIR}/credentials/faucet.sk \
--out-file ${DEVNET_DIR}/seed-${ACTOR}.signed >&2
SEED_TXID=$(ccli_ transaction txid --tx-file ${DEVNET_DIR}/seed-${ACTOR}.signed | tr -d '\r')
SEED_TXID=$(ccli_ conway transaction txid --tx-file ${DEVNET_DIR}/seed-${ACTOR}.signed | tr -d '\r')
SEED_TXIN="${SEED_TXID}#0"
ccli transaction submit --tx-file ${DEVNET_DIR}/seed-${ACTOR}.signed >&2
ccli conway transaction submit --tx-file ${DEVNET_DIR}/seed-${ACTOR}.signed >&2

echo -n >&2 "Waiting for utxo ${SEED_TXIN}.."

Expand All @@ -86,4 +86,4 @@ seedFaucet "alice-funds" 100000000 # 100 Ada to commit
seedFaucet "bob-funds" 50000000 # 50 Ada to commit
seedFaucet "carol-funds" 25000000 # 25 Ada to commit

./export-tx-id-and-pparams.sh
./demo/export-tx-id-and-pparams.sh $CCLI_CMD $HYDRA_NODE_CMD
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not more correct than before and will fail if someone runs this script from within demo/, which is even what we instruct users to do here: https://hydra.family/head-protocol/docs/getting-started#preparation

If I follow the instructions of our user manual this fails with:

./seed-devnet.sh: line 89: ./demo/export-tx-id-and-pparams.sh: No such file or directory

Should: use the SCRIPT_DIR to robustly refer to other scripts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like

./$SCRIPT_DIR/export-tx-id-and-pparams.sh $CCLI_CMD $HYDRA_NODE_CMD

That doesn't work.

Loading