Skip to content

Commit

Permalink
Update babbage-script-example.md to include a reference script at our
Browse files Browse the repository at this point in the history
target read only reference input
  • Loading branch information
Jimbo4350 committed Jun 21, 2022
1 parent a2b6b94 commit 1d1ec89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/reference/plutus/babbage-script-example.md
Expand Up @@ -77,6 +77,7 @@ cardano-cli transaction build \
--change-address "$utxoaddr" \
--tx-in "$txin" \
--tx-out "$readonlyaddress+$lovelaceattxindiv6" \
--tx-out-reference-script-file "$plutusstakescript" \
--tx-out-inline-datum-file "$datumfilepath" \
--tx-out "$utxoaddr+$lovelace" \
--tx-out "$plutusspendingscriptaddr+$lovelace" \
Expand Down
4 changes: 3 additions & 1 deletion scripts/plutus/example-babbage-script-usage.sh
Expand Up @@ -21,6 +21,7 @@ ls -al "$CARDANO_NODE_SOCKET_PATH"

plutusspendingscript="$BASE/scripts/plutus/scripts/v2/required-redeemer.plutus"
plutusmintingscript="$BASE/scripts/plutus/scripts/v2/minting-script.plutus"
plutusstakescript="scripts/plutus/scripts/v2/stake-script.plutus"
mintpolicyid=$(cardano-cli transaction policyid --script-file $plutusmintingscript)
## This datum hash is the hash of the untyped 42
scriptdatumhash="9e1199a988ba72ffd6e9c269cadb3b53b5f360ff99f112d9b2ee30c4d74ad88b"
Expand Down Expand Up @@ -65,6 +66,7 @@ $CARDANO_CLI transaction build \
--change-address "$utxoaddr" \
--tx-in "$txin" \
--tx-out "$readonlyaddress+$lovelaceattxindiv6" \
--tx-out-reference-script-file "$plutusstakescript" \
--tx-out-inline-datum-file "$datumfilepath" \
--tx-out "$utxoaddr+$lovelaceattxindiv6" \
--tx-out "$plutusspendingscriptaddr+$lovelaceattxindiv6" \
Expand Down Expand Up @@ -161,7 +163,7 @@ $CARDANO_CLI transaction build \
--cardano-mode \
--testnet-magic "$TESTNET_MAGIC" \
--change-address "$utxoaddr" \
--read-only-tx-in-reference "$readonlyrefinput" \
--read-only-tx-in-reference "$readonlyrefinput" \
--tx-in "$txin1" \
--tx-in-collateral "$txinCollateral" \
--out-file "$WORK/test-alonzo-ref-script.body" \
Expand Down

0 comments on commit 1d1ec89

Please sign in to comment.