Skip to content

Commit

Permalink
Standardise payment key directory structure in example directory
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed May 24, 2022
1 parent c81119e commit b549aaf
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 10 deletions.
15 changes: 15 additions & 0 deletions scripts/byron-to-alonzo/mkfiles.sh
Expand Up @@ -353,6 +353,21 @@ cardano-cli stake-address key-gen \
--verification-key-file shelley/utxo-keys/utxo2-stake.vkey \
--signing-key-file shelley/utxo-keys/utxo2-stake.skey

# Create a symlink to all the payment keys in utxo-keys directory
mkdir -p utxo-keys

for x in $(find shelley/utxo-keys -type f); do
if cat "$x" | jq -e 'select(
false
or .type == "GenesisUTxOVerificationKey_ed25519"
or .type == "GenesisUTxOSigningKey_ed25519"
or .type == "PaymentSigningKeyShelley_ed25519"
or .type == "PaymentVerificationKeyShelley_ed25519"
)' > /dev/null; then
ln -sf "../$x" "utxo-keys/$(basename "$x")"
fi
done

echo "====================================================================="
echo "Generated genesis keys and genesis files:"
echo
Expand Down
4 changes: 2 additions & 2 deletions scripts/plutus/always-fails.sh
Expand Up @@ -10,8 +10,8 @@ export BASE="${BASE:-.}"
export CARDANO_CLI="${CARDANO_CLI:-cardano-cli}"
export CARDANO_NODE_SOCKET_PATH="${CARDANO_NODE_SOCKET_PATH:-example/node-bft1/node.sock}"
export TESTNET_MAGIC="${TESTNET_MAGIC:-42}"
export UTXO_VKEY="${UTXO_VKEY:-example/shelley/utxo-keys/utxo1.vkey}"
export UTXO_SKEY="${UTXO_SKEY:-example/shelley/utxo-keys/utxo1.skey}"
export UTXO_VKEY="${UTXO_VKEY:-example/utxo-keys/utxo1.vkey}"
export UTXO_SKEY="${UTXO_SKEY:-example/utxo-keys/utxo1.skey}"
export RESULT_FILE="${RESULT_FILE:-$WORK/result.out}"

echo "Socket path: $CARDANO_NODE_SOCKET_PATH"
Expand Down
4 changes: 2 additions & 2 deletions scripts/plutus/example-txin-locking-plutus-script.sh
Expand Up @@ -10,8 +10,8 @@ export BASE="${BASE:-.}"
export CARDANO_CLI="${CARDANO_CLI:-cardano-cli}"
export CARDANO_NODE_SOCKET_PATH="${CARDANO_NODE_SOCKET_PATH:-example/node-bft1/node.sock}"
export TESTNET_MAGIC="${TESTNET_MAGIC:-42}"
export UTXO_VKEY="${UTXO_VKEY:-example/shelley/utxo-keys/utxo1.vkey}"
export UTXO_SKEY="${UTXO_SKEY:-example/shelley/utxo-keys/utxo1.skey}"
export UTXO_VKEY="${UTXO_VKEY:-example/utxo-keys/utxo1.vkey}"
export UTXO_SKEY="${UTXO_SKEY:-example/utxo-keys/utxo1.skey}"
export RESULT_FILE="${RESULT_FILE:-$WORK/result.out}"

echo "Socket path: $CARDANO_NODE_SOCKET_PATH"
Expand Down
4 changes: 2 additions & 2 deletions scripts/plutus/script-context-equivalance-test.sh
Expand Up @@ -10,8 +10,8 @@ export BASE="${BASE:-.}"
export CARDANO_CLI="${CARDANO_CLI:-cardano-cli}"
export CARDANO_NODE_SOCKET_PATH="${CARDANO_NODE_SOCKET_PATH:-example/node-bft1/node.sock}"
export TESTNET_MAGIC="${TESTNET_MAGIC:-42}"
export UTXO_VKEY="${UTXO_VKEY:-example/shelley/utxo-keys/utxo1.vkey}"
export UTXO_SKEY="${UTXO_SKEY:-example/shelley/utxo-keys/utxo1.skey}"
export UTXO_VKEY="${UTXO_VKEY:-example/utxo-keys/utxo1.vkey}"
export UTXO_SKEY="${UTXO_SKEY:-example/utxo-keys/utxo1.skey}"
export RESULT_FILE="${RESULT_FILE:-$WORK/result.out}"

echo "Socket path: $CARDANO_NODE_SOCKET_PATH"
Expand Down
4 changes: 2 additions & 2 deletions scripts/plutus/script-context-equivalence-test-minting.sh
Expand Up @@ -20,8 +20,8 @@ export CARDANO_NODE_SOCKET_PATH="${CARDANO_NODE_SOCKET_PATH:-example/node-bft1/n
mkdir -p "$WORKD"
plutusscriptinuse=scripts/plutus/scripts/minting-context-equivalance-test.plutus

utxovkey=example/shelley/utxo-keys/utxo1.vkey
utxoskey=example/shelley/utxo-keys/utxo1.skey
utxovkey=example/utxo-keys/utxo1.vkey
utxoskey=example/utxo-keys/utxo1.skey
utxoaddr=$(cardano-cli address build --testnet-magic 42 --payment-verification-key-file $utxovkey)
cardano-cli query utxo --address $utxoaddr --cardano-mode --testnet-magic 42 --out-file utxo.json
txin=$(jq -r 'keys[]' utxo.json)
Expand Down
4 changes: 2 additions & 2 deletions scripts/plutus/simple-minting-policy.sh
Expand Up @@ -19,8 +19,8 @@ mkdir -p $work
export CARDANO_NODE_SOCKET_PATH="${CARDANO_NODE_SOCKET_PATH:-example/node-bft1/node.sock}"
plutusscriptinuse=scripts/plutus/scripts/anyone-can-mint.plutus

utxovkey=example/shelley/utxo-keys/utxo1.vkey
utxoskey=example/shelley/utxo-keys/utxo1.skey
utxovkey=example/utxo-keys/utxo1.vkey
utxoskey=example/utxo-keys/utxo1.skey
utxoaddr=$(cardano-cli address build --testnet-magic 42 --payment-verification-key-file $utxovkey)
cardano-cli query utxo --address $utxoaddr --cardano-mode --testnet-magic 42 --out-file utxo.json
txin=$(jq -r 'keys[]' utxo.json)
Expand Down

0 comments on commit b549aaf

Please sign in to comment.