Skip to content

Fix keys in plutus tutorial #200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/source/guides/plutus.rst
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ Taker/Unlocker provides collateral. Collateral has been introduced in Alonzo tra

>>> builder.collaterals.append(non_nft_utxo)

>>> signed_tx = builder.build_and_sign([self.extended_payment_skey], taker_address)
>>> signed_tx = builder.build_and_sign([payment_skey_2], taker_address)


Uh oh! That failed. We forgot to add the taker as a `required` signer, so that the contract knows
Expand All @@ -217,7 +217,7 @@ that they will sign the transaction::

Now lets try to resubmit this::

>>> signed_tx = builder.build_and_sign([self.extended_payment_skey], taker_address)
>>> signed_tx = builder.build_and_sign([payment_skey_2], taker_address)

>>> context.submit_tx(signed_tx.to_cbor())

Expand Down Expand Up @@ -264,7 +264,7 @@ With reference script, actual script doesn't need to be included in the transact
>>> builder.add_script_input(utxo_to_spend, datum=datum, redeemer=redeemer)
>>> take_output = TransactionOutput(taker_address, 25123456)
>>> builder.add_output(take_output)
>>> signed_tx = builder.build_and_sign([extended_payment_skey], taker_address)
>>> signed_tx = builder.build_and_sign([payment_skey], taker_address)

Again, with the same example, we show that you can send funds to script address with inline datums directly::

Expand All @@ -288,6 +288,6 @@ With inline datum, we no longer have to include a datum within our transaction f
>>> builder.add_script_input(utxo_to_spend, redeemer=redeemer)
>>> take_output = TransactionOutput(taker_address, 25123456)
>>> builder.add_output(take_output)
>>> signed_tx = builder.build_and_sign([extended_payment_skey], taker_address)
>>> signed_tx = builder.build_and_sign([payment_skey], taker_address)