diff --git a/.changeset/fix-blockfrost-evaluate-tx-reference-script.md b/.changeset/fix-blockfrost-evaluate-tx-reference-script.md new file mode 100644 index 00000000..7a7fd57b --- /dev/null +++ b/.changeset/fix-blockfrost-evaluate-tx-reference-script.md @@ -0,0 +1,5 @@ +--- +"@evolution-sdk/evolution": patch +--- + +Fix BlockfrostEffect.evaluateTx dropping reference scripts from additionalUtxoSet, which caused missingRequiredScripts errors when evaluating transactions that reference unconfirmed UTxOs carrying minting policies. diff --git a/packages/evolution/src/sdk/provider/internal/BlockfrostEffect.ts b/packages/evolution/src/sdk/provider/internal/BlockfrostEffect.ts index 4271f0b4..6f0ccb3a 100644 --- a/packages/evolution/src/sdk/provider/internal/BlockfrostEffect.ts +++ b/packages/evolution/src/sdk/provider/internal/BlockfrostEffect.ts @@ -652,6 +652,11 @@ export const evaluateTx = txOut.datumHash = utxo.datumHash } + // Add script if present (required for reference script UTxOs) + if (utxo.script) { + txOut.script = utxo.script + } + return [txIn, txOut] }) : []