Skip to content

Commit

Permalink
fixup! chore: upgrade versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceahasegan committed Nov 7, 2024
1 parent 1b8e34a commit 42760cb
Show file tree
Hide file tree
Showing 9 changed files with 133 additions and 130 deletions.
8 changes: 4 additions & 4 deletions packages/e2e/local-network/scripts/make-babbage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ echo "ExperimentalHardForksEnabled: True" >> "${ROOT}/configuration.yaml"
echo "ExperimentalProtocolsEnabled: True" >> "${ROOT}/configuration.yaml"

# Copy the cost mode
cardano-cli conway genesis create-staked --genesis-dir "${ROOT}" \
cardano-cli latest genesis create-staked --genesis-dir "${ROOT}" \
--testnet-magic "${NETWORK_MAGIC}" \
--gen-pools ${NUM_SP_NODES} \
--supply ${MAX_SUPPLY} \
Expand Down Expand Up @@ -292,9 +292,9 @@ sed_i -E "s/\"startTime\": [0-9]+/\"startTime\": ${timeUnix}/" ${ROOT}/genesis/b
sed_i -E "s/\"systemStart\": \".*\"/\"systemStart\": \"${timeISO}\"/" ${ROOT}/genesis/shelley/genesis.json

byronGenesisHash=$(cardano-cli byron genesis print-genesis-hash --genesis-json ${ROOT}/genesis/byron/genesis.json)
shelleyGenesisHash=$(cardano-cli conway genesis hash --genesis ${ROOT}/genesis/shelley/genesis.json)
alonzoGenesisHash=$(cardano-cli conway genesis hash --genesis ${ROOT}/genesis/shelley/genesis.alonzo.json)
conwayGenesisHash=$(cardano-cli conway genesis hash --genesis ${ROOT}/genesis/shelley/genesis.conway.json)
shelleyGenesisHash=$(cardano-cli latest genesis hash --genesis ${ROOT}/genesis/shelley/genesis.json)
alonzoGenesisHash=$(cardano-cli latest genesis hash --genesis ${ROOT}/genesis/shelley/genesis.alonzo.json)
conwayGenesisHash=$(cardano-cli latest genesis hash --genesis ${ROOT}/genesis/shelley/genesis.conway.json)

echo "Byron genesis hash: $byronGenesisHash"
echo "Shelley genesis hash: $shelleyGenesisHash"
Expand Down
16 changes: 9 additions & 7 deletions packages/e2e/local-network/scripts/mint-handles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ cat >network-files/utxo-keys/minting-policy.json <<EOL
EOL

# Generate the policy ID from the script file and save it
policyid=$(cardano-cli conway transaction policyid --script-file network-files/utxo-keys/minting-policy.json)
policyid=$(cardano-cli latest transaction policyid --script-file network-files/utxo-keys/minting-policy.json)

cat >network-files/utxo-keys/handles-metadata.json <<EOL
{ "721":
Expand All @@ -54,7 +54,7 @@ utxo=$(cardano-cli query utxo --address "$addr" --testnet-magic 888 | awk 'NR ==

tokenList="1 ${policyid}.${handleHexes[0]}+1 ${policyid}.${handleHexes[1]}+2 ${policyid}.${handleHexes[2]}"

cardano-cli conway transaction build \
cardano-cli latest transaction build \
--change-address "$addr" \
--tx-in "$utxo" \
--tx-out "$destAddr"+10000000+"$tokenList" \
Expand All @@ -64,13 +64,13 @@ cardano-cli conway transaction build \
--testnet-magic 888 \
--out-file handle-tx.raw

cardano-cli conway transaction sign \
cardano-cli latest transaction sign \
--tx-body-file handle-tx.raw \
--signing-key-file network-files/utxo-keys/payment.skey \
--testnet-magic 888 \
--out-file handle-tx.signed

cardano-cli conway transaction submit --testnet-magic 888 --tx-file handle-tx.signed
cardano-cli latest transaction submit --testnet-magic 888 --tx-file handle-tx.signed
wait_tx_complete $utxo

# CIP-68 Handle
Expand Down Expand Up @@ -117,7 +117,7 @@ cat >network-files/utxo-keys/handles68-datum.json <<EOL
EOL
# (222)handle68 -> 283232322968616e646c653638
handle68tokenList="1 ${policyid}.283232322968616e646c653638"
cardano-cli conway transaction build \
cardano-cli latest transaction build \
--change-address "$addr" \
--tx-in "$utxo" \
--tx-out "$destAddr"+10000000+"$handle68tokenList" \
Expand All @@ -127,11 +127,13 @@ cardano-cli conway transaction build \
--testnet-magic 888 \
--out-file handle68-tx.raw

cardano-cli conway transaction sign \
cardano-cli latest transaction sign \
--tx-body-file handle68-tx.raw \
--signing-key-file network-files/utxo-keys/payment.skey \
--testnet-magic 888 \
--out-file handle68-tx.signed

cardano-cli conway transaction submit --testnet-magic 888 --tx-file handle68-tx.signed
cardano-cli latest transaction submit --testnet-magic 888 --tx-file handle68-tx.signed
wait_tx_complete $utxo

sync
8 changes: 4 additions & 4 deletions packages/e2e/local-network/scripts/mint-tokens.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cat >network-files/utxo-keys/minting-policy.json <<EOL
}
EOL

currencySymbol=$(cardano-cli conway transaction policyid --script-file network-files/utxo-keys/minting-policy.json)
currencySymbol=$(cardano-cli latest transaction policyid --script-file network-files/utxo-keys/minting-policy.json)
addr=$(cardano-cli address build --payment-verification-key-file network-files/utxo-keys/utxo1.vkey --testnet-magic 888)
destAddr="addr_test1qr0c3frkem9cqn5f73dnvqpena27k2fgqew6wct9eaka03agfwkvzr0zyq7nqvcj24zehrshx63zzdxv24x3a4tcnfeq9zwmn7"

Expand All @@ -46,7 +46,7 @@ for i in "${!TOKENS[@]}"; do
tokenList="${tokenList}+${AMOUNT} ${currencySymbol}.${TOKENS[i]}"
done

cardano-cli conway transaction build \
cardano-cli latest transaction build \
--change-address "$addr" \
--tx-in "$utxo" \
--tx-out "$destAddr"+10000000+"$tokenList" \
Expand All @@ -55,11 +55,11 @@ cardano-cli conway transaction build \
--testnet-magic 888 \
--out-file tx.raw

cardano-cli conway transaction sign \
cardano-cli latest transaction sign \
--tx-body-file tx.raw \
--signing-key-file network-files/utxo-keys/utxo1.skey \
--testnet-magic 888 \
--out-file tx.signed

cardano-cli conway transaction submit --testnet-magic 888 --tx-file tx.signed
cardano-cli latest transaction submit --testnet-magic 888 --tx-file tx.signed
wait_tx_complete $utxo
12 changes: 6 additions & 6 deletions packages/e2e/local-network/scripts/plutus-transaction.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,21 @@ currentBalance=$(getAddressBalance "$ALWAYS_SUCCEED_ADDR")

# LOCK FUNDS

cardano-cli conway transaction build \
cardano-cli latest transaction build \
--testnet-magic 888 \
--change-address "$genesisAddr" \
--tx-in "$utxo" \
--tx-out "$ALWAYS_SUCCEED_ADDR"+"$AMOUNT" \
--tx-out-datum-hash "$SCRIPT_DATUM_HASH" \
--out-file tx-script.build

cardano-cli conway transaction sign \
cardano-cli latest transaction sign \
--tx-body-file tx-script.build \
--signing-key-file network-files/utxo-keys/utxo2.skey \
--testnet-magic 888 \
--out-file tx-script.signed

cardano-cli conway transaction submit --testnet-magic 888 --tx-file tx-script.signed
cardano-cli latest transaction submit --testnet-magic 888 --tx-file tx-script.signed

updatedBalance=$(getAddressBalance "$ALWAYS_SUCCEED_ADDR")

Expand All @@ -78,7 +78,7 @@ utxo=$(cardano-cli query utxo --address "$genesisAddr" --testnet-magic 888 | awk
scriptUtxo=$(cardano-cli query utxo --address "$ALWAYS_SUCCEED_ADDR" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}')
currentBalance=$(getAddressBalance "$ALWAYS_SUCCEED_ADDR")

cardano-cli conway transaction build \
cardano-cli latest transaction build \
--testnet-magic 888 \
--tx-in "$scriptUtxo" \
--tx-in-script-file scripts/contracts/alwayssucceeds.plutus \
Expand All @@ -88,13 +88,13 @@ cardano-cli conway transaction build \
--change-address "$genesisAddr" \
--out-file test-alonzo.tx

cardano-cli conway transaction sign \
cardano-cli latest transaction sign \
--tx-body-file test-alonzo.tx \
--signing-key-file network-files/utxo-keys/utxo2.skey \
--testnet-magic 888 \
--out-file test-alonzo.signed

cardano-cli conway transaction submit --testnet-magic 888 --tx-file test-alonzo.signed
cardano-cli latest transaction submit --testnet-magic 888 --tx-file test-alonzo.signed

updatedBalance=$(getAddressBalance "$ALWAYS_SUCCEED_ADDR")

Expand Down
Loading

0 comments on commit 42760cb

Please sign in to comment.