Skip to content

Fix missing redeemer causing null scriptIntegrityHash in mint transaction#41

Merged
SynthLuvr merged 3 commits into
mainfrom
copilot/debug-script-integrity-error
Mar 2, 2026
Merged

Fix missing redeemer causing null scriptIntegrityHash in mint transaction#41
SynthLuvr merged 3 commits into
mainfrom
copilot/debug-script-integrity-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 2, 2026

Mint transactions were rejected on-chain with error 3113 because the transaction body had scriptIntegrityHash: null. The Cardano node computed a non-null expected hash, meaning the transaction was missing the field entirely.

Root Cause

The Evolution SDK only computes scriptDataHash when redeemers.length > 0. Since mintAssets was called without a redeemer, no redeemer was tracked in builder state, the hash was never computed, and the resulting transaction body omitted scriptIntegrityHash — required for any transaction executing a Plutus script (even via reference).

Changes

  • src/mint.ts — Add void redeemer to mintAssets; import Data:
.mintAssets({
  assets: Assets.fromRecord({ [token]: amount }),
  redeemer: Data.constr(0n, []),
})

The Aiken validator accepts _redeemer (ignored), so Data.constr(0n, []) is sufficient to trigger scriptDataHash computation with the correct Plutus V3 language views.

  • src/mint.test.ts — Mirror the same redeemer in the test builder for consistency.

🔒 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.

…null

Co-authored-by: SynthLuvr <131367121+SynthLuvr@users.noreply.github.com>
Comment thread src/mint.test.ts
Comment thread src/mint.test.ts
Comment thread src/mint.ts
Copilot AI changed the title [WIP] Fix transaction submission script integrity error Fix missing redeemer causing null scriptIntegrityHash in mint transaction Mar 2, 2026
Blockfrost and Aiken evaluators cause errors
@SynthLuvr SynthLuvr marked this pull request as ready for review March 2, 2026 16:54
Comment thread src/mint.ts
@SynthLuvr SynthLuvr merged commit f4553c9 into main Mar 2, 2026
1 check passed
@SynthLuvr SynthLuvr deleted the copilot/debug-script-integrity-error branch March 2, 2026 16:55
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