Skip to content

ConwayUtxowFailure: PPViewHashesDontMatch when spending Plutus V3 script UTxO with MeshTxBuilder #822

@J-Praveenan

Description

@J-Praveenan

Issue

I am building a Cardano dApp using MeshJS, Next.js, and an Aiken Plutus V3 smart contract.

Creating/locking a UTxO at the script address works successfully. However, when I try to spend the script UTxO, the wallet signs the transaction successfully, but transaction submission fails with PPViewHashesDontMatch.

Error

BAD_REQUEST ({
  "error": "Bad Request",
  "message": "{\"contents\":{\"contents\":{\"contents\":{\"era\":\"ShelleyBasedEraConway\",\"error\":[\"ConwayUtxowFailure (PPViewHashesDontMatch Mismatch (RelEQ) {supplied: SJust (SafeHash \\\"f3a4844dcef65781ba74da2d26b2e83c41a95832fd91a5d0457b843e2ba94508\\\"), expected: SJust (SafeHash \\\"59cd8a77a0cc0925e3a2d4ddd81a0e310aa55c772e97fa0ae37da469993721867\\\")})\"],\"kind\":\"ShelleyTxValidationError\"},\"tag\":\"TxValidationErrorInCardanoMode\"},\"tag\":\"TxCmdTxSubmitValidationError\"},\"tag\":\"TxSubmitFail\"}",
  "status_code": 400
})


Environment

{
  "name": "ui",
  "description": "A Mesh starter template for NextJS",
  "author": "MeshJS",
  "license": "Apache-2.0",
  "version": "0.1.0",
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@meshsdk/core": "^1.9.0-beta.102",
    "@meshsdk/react": "^2.0.0-beta.2",
    "next": "16.2.6",
    "react": "19.2.4",
    "react-dom": "19.2.4",
    "react-hot-toast": "^2.6.0"
  },
  "devDependencies": {
    "@types/node": "^20",
    "@types/react": "^18",
    "@types/react-dom": "^18",
    "eslint": "^8",
    "eslint-config-next": "15.0.3",
    "postcss": "^8",
    "tailwindcss": "^3.4.1",
    "typescript": "^5"
  }
}



What works
Wallet connection works.
Creating a script UTxO works.
Inline datum is stored correctly.
Wallet signs the spending transaction successfully.
What fails

Spending the Plutus V3 script UTxO fails during submit with:
ConwayUtxowFailure (PPViewHashesDontMatch Mismatch)


const unsignedTx = await txBuilder
  .spendingPlutusScriptV3()
  .txIn(targetUtxo.input.txHash, targetUtxo.input.outputIndex)
  .txInInlineDatumPresent()
  .txInRedeemerValue(redeemer, "JSON")
  .txInScript(scriptCbor)
  .requiredSignerHash(senderPkh)
  .txInCollateral(
    collateral[0].input.txHash,
    collateral[0].input.outputIndex,
    collateral[0].output.amount,
    collateral[0].output.address
  )
  .txOut(scriptAddress, targetUtxo.output.amount)
  .txOutInlineDatumValue(newDatum, "JSON")
  .changeAddress(changeAddress)
  .selectUtxosFrom(walletUtxos)
  .complete();

const signedTx = await walletInstance.signTx(unsignedTx, true);
const txHash = await walletInstance.submitTx(signedTx);



Question

Is this issue related to MeshJS transaction building for Conway-era Plutus V3 transactions, especially with Next.js 16/Turbopack?

What is the recommended way to avoid PPViewHashesDontMatch when spending a Plutus V3 script UTxO using MeshTxBuilder?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions