Skip to content

Commit 33c0b4b

Browse files
fix minor inaccuracies in the plutus smart contract tutorial (#196)
* add missing TransactionOutput import * add missing import for datum_hash * fix the numbering of the steps
1 parent e89599f commit 33c0b4b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/source/guides/plutus.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Similar to `Transaction guide <../guides/transaction.html>`_, we build a chain c
121121
>>> from pycardano import BlockFrostChainContext
122122
>>> context = BlockFrostChainContext("your_blockfrost_project_id", base_url=ApiUrls.preprod.value)
123123

124-
Step 2
124+
Step 4
125125

126126
Create script address::
127127

@@ -133,10 +133,12 @@ Create script address::
133133
... plutus_script_hash,
134134
... Transaction,
135135
... TransactionBuilder,
136+
... TransactionOutput,
136137
... PlutusData,
137138
... Redeemer,
138139
... PlutusV2Script,
139140
... Network,
141+
... datum_hash,
140142
... )
141143

142144
>>> # This artifact was generated in step 2
@@ -148,7 +150,7 @@ Create script address::
148150
>>> network = Network.TESTNET
149151
>>> script_address = Address(script_hash, network=network)
150152

151-
Step 3
153+
Step 5
152154

153155
Giver/Locker sends funds to script address.
154156
We will attach the public key hash of a receiver address as datum to the utxo.
@@ -178,7 +180,7 @@ Build, sign and submit the transaction:
178180
>>> signed_tx = builder.build_and_sign([payment_skey], giver_address)
179181
>>> context.submit_tx(signed_tx.to_cbor())
180182

181-
Step 4
183+
Step 6
182184

183185
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.::
184186

0 commit comments

Comments
 (0)