Seeking Guidance: Escrow Integration Issue in Aiken + Lucid + Plutus V3 on Preprod

Hello Cardano Community,
I hope this message finds you well. I’m currently working on a dApp to build a local marketplace in Goma/DRC, which will enable online buying and selling with an escrow system to secure transactions.

On the technical side, I’m using Aiken smart contracts, Lucid, and Plutus V3. However, I am encountering a challenge: when a user attempts to purchase a product, they deploy funds by signing with their wallet on preprod, but unfortunately, the funds do not reach the intended recipient, i.e., the seller.

I would sincerely appreciate any guidance or insights from this community to help me understand and resolve this issue.

You can reach me on:

Thank you very much in advance for any assistance or suggestions you may offer.

5 Likes

Hi Olivier, the issue usually happens because the transaction fails script validation even though the wallet signs it. Here are the 3 key things to check to fix it:

  1. Confirm the script UTxO and address
    Make sure the escrow script address is correct and the UTxO you’re spending actually exists on preprod.
  2. Verify datum & redeemer match the Aiken validator
    Most failed transfers happen because the datum or redeemer structure doesn’t match what the validator expects. Double-check the types and constructors.
  3. Check the on-chain error
  4. Log the error from Lucid when submitting the tx, it will show exactly why the script is rejecting it.
try { await tx.submit(); } catch (e) { console.log(e); }

Once you see the validation error, the fix becomes straightforward.

3 Likes

Hello sir,
Thank you very much for these suggestions.
I will test them and observe the resulting outputs, as I initially believed the issue was an incompatibility between Plutus V3 and Lucid, but unfortunately this has not resolved the problem so far.

What is the error that you are getting?

Bellow is the error I am getting:

prepareAdaRelease.ts:91 :cross_mark: Error while releasing funds: missing required script
Script d5c214c90928733c8a8741b40de67ded41255290af2f4d88400a3d19

By the way, the transaction is being signed by the seller: the seller confirms the delivery, the buyer releases the funds from escrow, but in the end the funds do not reach the seller.