0

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);

3
  • Could you share your onchain code that you use? And especially how the custom datum and redeemer are indexed via the following function makeIsDataIndexed? playground.plutus.iohkdev.io/doc/haddock/plutus-tx/html/…
    – Fermat
    Aug 16, 2022 at 8:38
  • I dont know what you mean. Is that an error from contract or it's failed from nami wallet Aug 17, 2022 at 4:52
  • @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 Aug 17, 2022 at 10:15

0

Your Answer

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