Skip to content

Fix TransactionBuilderError caused by PlutusV2/V3 version mismatch after Aiken upgrade#25

Merged
SynthLuvr merged 2 commits into
mainfrom
copilot/debug-transaction-builder-error
Mar 1, 2026
Merged

Fix TransactionBuilderError caused by PlutusV2/V3 version mismatch after Aiken upgrade#25
SynthLuvr merged 2 commits into
mainfrom
copilot/debug-transaction-builder-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 1, 2026

Aiken v1.1.21 compiles validators to Plutus V3 by default, but the mint script was still wrapping the compiled UPLC in PlutusV2. This causes an EvaluationError at transaction evaluation time because the node passes a V2-format script context to a V3-compiled script.

Changes

  • src/mint.ts: Replace PlutusV2 with PlutusV3 for both the minting policy script and the blackhole address script derivation
- import { PlutusV2 } from "@evolution-sdk/evolution/PlutusV2";
+ import { PlutusV3 } from "@evolution-sdk/evolution/PlutusV3";

  const createScript = (plutus: string, ref: UTxO.UTxO): PlutusV3 => {
    ...
-   return new PlutusV2({ bytes: hexToBytes(scriptHex) });
+   return new PlutusV3({ bytes: hexToBytes(scriptHex) });
  };

The mismatch is confirmed by plutus.json emitting "plutusVersion": "v3" after the Aiken upgrade — the script version wrapping in TypeScript was never updated to match.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: SynthLuvr <131367121+SynthLuvr@users.noreply.github.com>
Comment thread src/mint.ts
Comment thread src/mint.ts
Copilot AI changed the title [WIP] Debug transaction builder error during token minting Fix TransactionBuilderError caused by PlutusV2/V3 version mismatch after Aiken upgrade Mar 1, 2026
@SynthLuvr SynthLuvr marked this pull request as ready for review March 1, 2026 15:53
@SynthLuvr SynthLuvr merged commit 29c8ed9 into main Mar 1, 2026
1 check passed
@SynthLuvr SynthLuvr deleted the copilot/debug-transaction-builder-error branch March 1, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants