Skip to content

fix(provider): include script in evaluateTx additionalUtxoSet#168

Merged
solidsnakedev merged 2 commits into
mainfrom
fix/blockfrost-evaluate-tx-reference-script
Mar 2, 2026
Merged

fix(provider): include script in evaluateTx additionalUtxoSet#168
solidsnakedev merged 2 commits into
mainfrom
fix/blockfrost-evaluate-tx-reference-script

Conversation

@solidsnakedev
Copy link
Copy Markdown
Collaborator

BlockfrostEffect.evaluateTx constructs the additionalUtxoSet payload for Blockfrost's /utils/txs/evaluate/utxos endpoint but silently drops the script field from each UTxO's txOut. When a mint transaction references an unconfirmed deploy UTxO carrying a minting policy as a reference script, Blockfrost cannot find the required script and evaluation fails with missingRequiredScripts.

The evaluateTx mapping now copies utxo.script into txOut.script when present, matching the datum/datumHash handling that was already in place. The underlying Ogmios.toOgmiosUTxOs already populates the script field correctly — it was only lost in the Blockfrost-specific payload construction.

Closes #166

Copilot AI review requested due to automatic review settings March 1, 2026 22:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes Blockfrost transaction evaluation when additionalUTxOs contain reference scripts by ensuring the Blockfrost /utils/txs/evaluate/utxos payload includes txOut.script (previously dropped), aligning the payload with the Ogmios UTxO representation already produced by Ogmios.toOgmiosUTxOs.

Changes:

  • Preserve utxo.script by copying it into txOut.script when building additionalUtxoSet for Blockfrost evaluation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@solidsnakedev solidsnakedev merged commit 5db882e into main Mar 2, 2026
7 of 9 checks passed
@solidsnakedev solidsnakedev deleted the fix/blockfrost-evaluate-tx-reference-script branch March 2, 2026 10:52
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.

BlockfrostEffect.evaluateTx drops reference script in additionalUtxoSet (causes missingRequiredScripts)

2 participants