Skip to content

Commit 547e398

Browse files
committed
Cast gift script to PlutusV2
1 parent 3b54ec9 commit 547e398

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/source/guides/plutus.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,13 @@ Create script address::
131131
... TransactionBuilder,
132132
... PlutusData,
133133
... Redeemer,
134+
... PlutusV2Script,
134135
... )
135136

136137
>>> # This artifact was generated in step 2
137138
>>> with open("gift/script.cbor", "r") as f:
138139
>>> script_hex = f.read()
139-
>>> gift_script = bytes.fromhex(script_hex)
140+
>>> gift_script = PlutusV2Script(bytes.fromhex(script_hex))
140141

141142
>>> script_hash = plutus_script_hash(gift_script)
142143
>>> script_address = Address(script_hash, network=network)

0 commit comments

Comments
 (0)