2

I'm following Plutus Pioneers Program, 4th Cohort, I'm at Week 2 on testnet

I'm struggling a bit collecting the gift, I have do a slightly modified version of Gift, creating it works as expect:

$ scripts/query-address.sh $(cat code/Week02/experiments/factoring.addr)
                           TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
2d1604d8ba3128cd1526b6c68f94f8eddcd83b530dda4560dd327f25ad39164d     0        3000000 lovelace + TxOutDatumInline ReferenceTxInsScriptsInlineDatumsInBabbageEra (ScriptDataNumber 42)

However, with bob:

$ scripts/query-address.sh $(cat keys/bob.addr)
                           TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
2e1fe0fe79677804a70bff96b249d9912143a3464f4788d7a42b1f772bfb2050     0        10000000000 lovelace + TxOutDatumNone

Building the transaction:

cardano-cli transaction build \
  --babbage-era \
  --testnet-magic 2 \
  --tx-in 2d1604d8ba3128cd1526b6c68f94f8eddcd83b530dda4560dd327f25ad39164d#0 \
  --tx-in-script-file /work/code/Week02/experiments/factoring.plutus \
  --tx-in-inline-datum-present \
  --tx-in-redeemer-file /work/code/Week02/experiments/wrong-redeemer.json \
  --tx-in-collateral 2e1fe0fe79677804a70bff96b249d9912143a3464f4788d7a42b1f772bfb2050#0 \
  --change-address addr_test1vqywcrjdxm0eehsgl5djnjg8pqeq48jhky8e3aht60ustkg6urjkr \
  --protocol-params-file /work/code/Week02/experiments/wrong-protocol-parameters.json \
  --out-file /work/code/Week02/experiments/wrong-collect-factoring.txbody

Fails with:

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: 
The redeemer pointer: RdmrPtr Spend 0 points to a Plutus script that does not exist.
The pointers that can be resolved are: fromList [(RdmrPtr Spend 0,(Spending (TxIn (TxId {_unTxId = SafeHash "2d1604d8ba3128cd1526b6c68f94f8eddcd83b530dda4560dd327f25ad39164d"}) (TxIx 0)),Nothing,ScriptHash "c06d15e27842d0ccd6c825a13b84830a14215e01c98a93567f8cdbf8"))]

Have you any hints about the issue? Thanks

1 Answer 1

2

This error means you're providing a different script to the one needed to witness the spend. Remember the script address will be different if the script is changed.

1
  • 1
    I did a breaking refactoring, which changed the address.
    – GlinesMome
    Mar 7 at 17:05

Your Answer

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

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