trying to claim back the first player bet after deadline in the ZeroOneGame from ppbl gimbalabs course on pre-production_testnet I get an error when trying to build the claim transaction.

I have this Player 1 address addr_test1vpn9qvm8tuth36pm0ul70tn7hwl0rtjk6cw9k6gzw5g6pxc8cexwu

cardano-cli query utxo --address $(cat P1.addr) --testnet-magic 1
                           TxHash                                 TxIx        Amount
2077017595a69be695124ddff5f79c3410121234feed38f8519682239199ad29     0        5000000 lovelace + TxOutDatumNone
f8f17e3515372fa9428abf3e0a30aedc3f11a6ef598d5f9838d35e2e45519bf3     0        992481013 lovelace + TxOutDatumNone

And this contract address addr_test1wrxhzl9vvcf2p8njp2metcf9mkapc9d2fj8a5fszv4ngnecge54yd which received the bet and NFTstate already.

cardano-cli query utxo --address $(cat contract1stGame.addr) --testnet-magic 1
                           TxHash                                 TxIx        Amount
f8f17e3515372fa9428abf3e0a30aedc3f11a6ef598d5f9838d35e2e45519bf3     1        5000000 lovelace + 1 665c8f0cdf7dc8b939d484d85f80d24c4c50af560be49c58d2b51f38.7a65726f4f6e6547616d65546573743031 + TxOutDatumHash ScriptDataInBabbageEra "f47634d3b1c1caccb51ab10c74958ccb464b0893c3e612b649a4484a6e50eeca"

Then I try to build the transaction to ClaimByFirstPlayer

cardano-cli transaction build --babbage-era \
--tx-in f8f17e3515372fa9428abf3e0a30aedc3f11a6ef598d5f9838d35e2e45519bf3#0 \
--tx-in-script-file ../output/ZeroOneGame.plutus \
--tx-in-datum-file ../output/startGame-DATUM.json \
--required-signer P1.skey \
--tx-in-redeemer-file ../output/firstPlayerClaims-REDEEMER.json \
--tx-in-collateral 2077017595a69be695124ddff5f79c3410121234feed38f8519682239199ad29#0 \
--tx-out $(cat P1.addr)+5000000+"1 665c8f0cdf7dc8b939d484d85f80d24c4c50af560be49c58d2b51f38.7a65726f4f6e6547616d65546573743031" \
--change-address $(cat P1.addr) \
--protocol-params-file parameters.json \
--invalid-before 17168436 \
--testnet-magic 1 \
--out-file tx.raw

But I receive the following error:

Command failed: transaction build  Error: The following scripts have execution failures:
the script for transaction input 0 (in the order of the TxIds) failed with: 
transaction input 0 (in the order of the TxIds) points to a script hash that is not known.

Is difficult to understand what it is going wrong from this error, I told that the --tx-in order may have been wrong, but after trying to make it better the error persists.

Is there any obvious mistake I am going through from the information given?

1 Answer 1


Mystery solved, what Plutus is trying to tell me is that I forgot to put the UTxO/--tx-in of the contract itself.

to the previous transaction I had to add the line

--tx-in f8f17e3515372fa9428abf3e0a30aedc3f11a6ef598d5f9838d35e2e45519bf3#1 \

That error is a weird way to say that the script couldn't find any UTxO related to the contract in the transaction being built.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.