From eaad20af019625d8e08b131b948adef97acf33a1 Mon Sep 17 00:00:00 2001 From: Christoph Waffler Date: Sun, 9 Apr 2023 15:05:33 +0200 Subject: [PATCH 1/3] add missing TransactionOutput import --- docs/source/guides/plutus.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/guides/plutus.rst b/docs/source/guides/plutus.rst index 834297e0..970d73b6 100644 --- a/docs/source/guides/plutus.rst +++ b/docs/source/guides/plutus.rst @@ -133,6 +133,7 @@ Create script address:: ... plutus_script_hash, ... Transaction, ... TransactionBuilder, + ... TransactionOutput, ... PlutusData, ... Redeemer, ... PlutusV2Script, From efb9537d304840288e5bb3404f5fbc71e47ab7dd Mon Sep 17 00:00:00 2001 From: Christoph Waffler Date: Sun, 9 Apr 2023 15:11:07 +0200 Subject: [PATCH 2/3] add missing import for datum_hash --- docs/source/guides/plutus.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/guides/plutus.rst b/docs/source/guides/plutus.rst index 970d73b6..fde8090e 100644 --- a/docs/source/guides/plutus.rst +++ b/docs/source/guides/plutus.rst @@ -138,6 +138,7 @@ Create script address:: ... Redeemer, ... PlutusV2Script, ... Network, + ... datum_hash, ... ) >>> # This artifact was generated in step 2 From b2c512625c451803e58bc5995b603681473e4e05 Mon Sep 17 00:00:00 2001 From: Christoph Waffler Date: Sun, 9 Apr 2023 16:22:21 +0200 Subject: [PATCH 3/3] fix the numbering of the steps --- docs/source/guides/plutus.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/guides/plutus.rst b/docs/source/guides/plutus.rst index fde8090e..9a088733 100644 --- a/docs/source/guides/plutus.rst +++ b/docs/source/guides/plutus.rst @@ -121,7 +121,7 @@ Similar to `Transaction guide <../guides/transaction.html>`_, we build a chain c >>> from pycardano import BlockFrostChainContext >>> context = BlockFrostChainContext("your_blockfrost_project_id", base_url=ApiUrls.preprod.value) -Step 2 +Step 4 Create script address:: @@ -150,7 +150,7 @@ Create script address:: >>> network = Network.TESTNET >>> script_address = Address(script_hash, network=network) -Step 3 +Step 5 Giver/Locker sends funds to script address. We will attach the public key hash of a receiver address as datum to the utxo. @@ -180,7 +180,7 @@ Build, sign and submit the transaction: >>> signed_tx = builder.build_and_sign([payment_skey], giver_address) >>> context.submit_tx(signed_tx.to_cbor()) -Step 4 +Step 6 Taker/Unlocker sends transaction to consume funds. Here we specify the redeemer tag as spend and pass in no special redeemer, as it is being ignored by the contract.::