Fix TransactionBuilderError/EvaluationError in mint.ts and PlutusV2/V3 mismatch in nft.ts#26
Merged
Merged
Conversation
Co-authored-by: SynthLuvr <131367121+SynthLuvr@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Debug token minting error in transaction builder
Fix TransactionBuilderError/EvaluationError in mint.ts and PlutusV2/V3 mismatch in nft.ts
Mar 1, 2026
SynthLuvr
approved these changes
Mar 1, 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.
Two bugs introduced during the migration from
@lucid-evolution/lucidto@evolution-sdk/evolutionand the Aiken v1.0.29-alpha → v1.1.21 upgrade that caused token minting to fail withTransactionBuilderErrorcaused byEvaluationError.mint.ts: OverlappingAdditionalUtxo → EvaluationErrorbuild()calls lackedavailableUtxos, so the SDK fetched on-chain wallet UTxOs from Blockfrost for coin selection. WithpassAdditionalUtxos: trueon the mint tx, those on-chain UTxOs were forwarded to Blockfrost's/utils/txs/evaluate/utxosendpoint asadditionalUtxoSet. Since they already exist in Blockfrost's chain database, Blockfrost rejected the request withOverlappingAdditionalUtxo.Fix: explicitly pass
availableUtxosfrom the simulated chain state to eachbuild()call so coin selection only touches off-chain UTxOs.Additionally,
refis excluded from the deploy tx's available UTxOs to prevent it from being consumed before the mint tx needs it:nft.ts: PlutusV2 used for a PlutusV3 validatornft.tsusedPlutusV2for bothcreateScriptandcreateBlackholeAddress, butmultiple.akcompiles to Plutus V3. This is the same mismatch PR #25 fixed inmint.ts. All threePlutusV2references replaced withPlutusV3.🔒 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.