Fix script validation failures: PlutusV2→V3 and missing CBOR encoding in zero.ts and distribute.ts#34
Merged
Conversation
Co-authored-by: SynthLuvr <131367121+SynthLuvr@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix missing redeemers for Plutus scripts in minting
Fix missing redeemer on Plutus mint transaction
Mar 1, 2026
Co-authored-by: SynthLuvr <131367121+SynthLuvr@users.noreply.github.com>
Copilot
AI
changed the title
Fix missing redeemer on Plutus mint transaction
Use Data.constr factory instead of new Data.Constr constructor
Mar 1, 2026
Co-authored-by: SynthLuvr <131367121+SynthLuvr@users.noreply.github.com>
Copilot
AI
changed the title
Use Data.constr factory instead of new Data.Constr constructor
Remove redeemers from Plutus V3 minting policy calls
Mar 1, 2026
…distribute.ts Co-authored-by: SynthLuvr <131367121+SynthLuvr@users.noreply.github.com>
Copilot
AI
changed the title
Remove redeemers from Plutus V3 minting policy calls
Fix script validation failures: PlutusV2→V3 and missing CBOR encoding in zero.ts and distribute.ts
Mar 1, 2026
SynthLuvr
approved these changes
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Aiken compiles validators to PlutusV3, but
zero.tsanddistribute.tswere wrapping script bytes asPlutusV2and skipping the requiredapplySingleCborEncodingstep — causing script validation failure at the wrong language version with malformed script bytes.Changes
src/zero.tsandsrc/distribute.ts:PlutusV2→PlutusV3throughout (createScript+createBlackholeAddress)src/zero.tsandsrc/distribute.ts: WrapapplyParamsToScriptwithapplySingleCborEncoding—applyParamsToScriptreturns double-CBOR-encoded bytes;PlutusV3requires single-CBOR-encoded bytesAlso removes the erroneously added
redeemer: Data.constr(0n, [])from allmintAssetscalls — Plutus V3 minting policies do not require redeemers, and passing one causes validation failure.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.