<p>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.</p>

CC BY-SA 4.0
2023-03-07T17:05:52.280Z
I did a breaking refactoring, which changed the address.
GlinesMome
CC BY-SA 4.0
2023-03-07T10:13:32.170Z
2023-03-07T10:13:32.170Z
james
<p>I'm following Plutus Pioneers Program, 4th Cohort, I'm at Week 2 on testnet</p>
<p>I'm struggling a bit collecting the gift, I have do a slightly modified version of Gift, creating it works as expect:</p>
<pre><code>$ scripts/query-address.sh $(cat code/Week02/experiments/factoring.addr)
                           TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
2d1604d8ba3128cd1526b6c68f94f8eddcd83b530dda4560dd327f25ad39164d     0        3000000 lovelace + TxOutDatumInline ReferenceTxInsScriptsInlineDatumsInBabbageEra (ScriptDataNumber 42)
</code></pre>
<p>However, with bob:</p>
<pre><code>$ scripts/query-address.sh $(cat keys/bob.addr)
                           TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
2e1fe0fe79677804a70bff96b249d9912143a3464f4788d7a42b1f772bfb2050     0        10000000000 lovelace + TxOutDatumNone
</code></pre>
<p>Building the transaction:</p>
<pre><code>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
</code></pre>
<p>Fails with:</p>
<pre><code>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 &quot;2d1604d8ba3128cd1526b6c68f94f8eddcd83b530dda4560dd327f25ad39164d&quot;}) (TxIx 0)),Nothing,ScriptHash &quot;c06d15e27842d0ccd6c825a13b84830a14215e01c98a93567f8cdbf8&quot;))]
</code></pre>
<p>Have you any hints about the issue?
Thanks</p>

<plutus-pioneer-program><transaction><collateral>
Can't collect due to a non existent script
# Can't collect due to a non existent script

(Asked by: username_0 on 2023-03-06)

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

**Tags:** plutus-pioneer-program, transaction, collateral

---

## 1 answers

### Answer by username_1 on 2023-03-07. Score: 2 | Accepted answer

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.

> **Comments:**
> **username_0**: I did a breaking refactoring, which changed the address.  

---

