<p>Sometimes I face this issue when make action buy nft in contract. Sometimes it works. So I don't know what does this mean and how to fix it.</p>
<pre><code>transaction submit error ShelleyTxValidationError 
ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure
(FromAlonzoUtxowFail (ExtraRedeemers [RdmrPtr Spend 0])),UtxowFailure
(FromAlonzoUtxowFail (MissingRedeemers [(Spending (TxIn (TxId {_unTxId
= SafeHash \&quot;e641e3f78b3f3d32e9f16eec14093a853d1217cacdc6290627d6855d154eaaf0\&quot;})
(TxIx 0)),ScriptHash
\&quot;d85388ecce0a819bb6ee2179566d123b4339d381ca0b09114e7aafd7\&quot;)])),
UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (UtxosFailure
(CollectErrors [NoRedeemer (Spending (TxIn (TxId {_unTxId = SafeHash
\&quot;e641e3f78b3f3d32e9f16eec14093a853d1217cacdc6290627d6855d154eaaf0\&quot;})
(TxIx 0)))]))))])
</code></pre>
<p>This is how I pass redeemer in txBuilder</p>
<pre><code> const plutusListRedeemer = CardanoWasm.PlutusList.new();
    plutusListRedeemer.add(CardanoWasm.PlutusData.new_bytes(hexToBytes(resellOrderData._id))); // sell order id
const redeemerData = CardanoWasm.PlutusData.new_constr_plutus_data(      CardanoWasm.ConstrPlutusData.new(CardanoWasm.BigNum.from_str(CONTRACT_CARDANO_EVENT.BUY), plutusListRedeemer),
    );
    const redeemer = CardanoWasm.Redeemer.new(
      CardanoWasm.RedeemerTag.new_spend(),
      CardanoWasm.BigNum.from_str('0'),
      redeemerData,
      CardanoWasm.ExUnits.new(
        CardanoWasm.BigNum.from_str(BUY_CARDANO_MEM.toString()),
        CardanoWasm.BigNum.from_str(BUY_CARDANO_CPU.toString()),
      ),
    );
    redeemers.add(redeemer);
transactionWitnessSet.set_redeemers(redeemers);

</code></pre>

CC BY-SA 4.0
2022-08-16T08:38:42.593Z
Could you share your onchain code that you use? And especially how the custom datum and redeemer are indexed via the following function `makeIsDataIndexed`? https://playground.plutus.iohkdev.io/doc/haddock/plutus-tx/html/PlutusTx.html#v:makeIsDataIndexed
Fermat
CC BY-SA 4.0
2022-08-17T04:52:49.623Z
I dont know what you mean. Is that an error from contract or it's failed from nami wallet
Nguyen Huy Duc
CC BY-SA 4.0
2022-08-17T10:15:06.963Z
@Fermat Hi, i try with another redeemer index and see sometime 2 work, sometimes 0 workds. Could you plean explain why does that happen and what does redeemer index mean
Nguyen Huy Duc
<wallet><cardano-serialization-lib><nami-wallet>
What does ExtraRedeemers error mean when call function in contract with nami wallet and cardano-serialization
# What does ExtraRedeemers error mean when call function in contract with nami wallet and cardano-serialization

(Asked by: username_0 on 2022-08-16)

Sometimes I face this issue when make action buy nft in contract. Sometimes it works. So I don't know what does this mean and how to fix it.
transaction submit error ShelleyTxValidationError 
ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure
(FromAlonzoUtxowFail (ExtraRedeemers [RdmrPtr Spend 0])),UtxowFailure
(FromAlonzoUtxowFail (MissingRedeemers [(Spending (TxIn (TxId {_unTxId
= SafeHash \"e641e3f78b3f3d32e9f16eec14093a853d1217cacdc6290627d6855d154eaaf0\"})
(TxIx 0)),ScriptHash
\"d85388ecce0a819bb6ee2179566d123b4339d381ca0b09114e7aafd7\")])),
UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (UtxosFailure
(CollectErrors [NoRedeemer (Spending (TxIn (TxId {_unTxId = SafeHash
\"e641e3f78b3f3d32e9f16eec14093a853d1217cacdc6290627d6855d154eaaf0\"})
(TxIx 0)))]))))])

This is how I pass redeemer in txBuilder
 const plutusListRedeemer = CardanoWasm.PlutusList.new();
    plutusListRedeemer.add(CardanoWasm.PlutusData.new_bytes(hexToBytes(resellOrderData._id))); // sell order id
const redeemerData = CardanoWasm.PlutusData.new_constr_plutus_data(      CardanoWasm.ConstrPlutusData.new(CardanoWasm.BigNum.from_str(CONTRACT_CARDANO_EVENT.BUY), plutusListRedeemer),
    );
    const redeemer = CardanoWasm.Redeemer.new(
      CardanoWasm.RedeemerTag.new_spend(),
      CardanoWasm.BigNum.from_str('0'),
      redeemerData,
      CardanoWasm.ExUnits.new(
        CardanoWasm.BigNum.from_str(BUY_CARDANO_MEM.toString()),
        CardanoWasm.BigNum.from_str(BUY_CARDANO_CPU.toString()),
      ),
    );
    redeemers.add(redeemer);
transactionWitnessSet.set_redeemers(redeemers);

**Tags:** wallet, cardano-serialization-lib, nami-wallet
> **Comments:**
> **username_1**: Could you share your onchain code that you use? And especially how the custom datum and redeemer are indexed via the following function `makeIsDataIndexed`? https://playground.plutus.iohkdev.io/doc/haddock/plutus-tx/html/PlutusTx.html#v:makeIsDataIndexed  
> **username_0**: I dont know what you mean. Is that an error from contract or it's failed from nami wallet  
> **username_0**: @Fermat Hi, i try with another redeemer index and see sometime 2 work, sometimes 0 workds. Could you plean explain why does that happen and what does redeemer index mean  

---

## 0 answers

