Skip to content

allow blueprint as input and output for the uplc executable - #7685

Merged
zliu41 merged 1 commit into
masterfrom
zliu41/blueprint
Mar 24, 2026
Merged

zliu41 merged 1 commit into
masterfrom
zliu41/blueprint

Conversation

@zliu41

@zliu41 zliu41 commented Mar 20, 2026

Copy link
Copy Markdown
Member

The blueprint format is different in that it may contain multiple validators, while all other input/output formats contain a single validator. So the blueprint format needs to be handled differently.

To make things simpler, it currently only allows the blueprint format in the "optimise" command, and if the input format is blueprint, the output format must also be blueprint.

To test it yourself, download the attached blueprint and run cabal run uplc -- optimise --certify whatever -i ./plutus.json -o ./plutus-optimised.json --if blueprint --of blueprint --certifier-report ./my-blueprint.report.

plutus.json

@zliu41
zliu41 requested review from a team and basetunnel March 20, 2026 21:41
@zliu41 zliu41 added the No Changelog Required Add this to skip the Changelog Check label Mar 20, 2026
InvalidCertificate _ -> exitWith $ ExitFailure 1
InvalidCompilerOutput -> exitWith $ ExitFailure 2
ValidationError _ -> exitWith $ ExitFailure 3
-- TODO: Only Right True is success

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any reason not to address this TODO before merging?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is not a new TODO and isn't relevant to this PR. We can address it separately.


loadUplcASTfromHex :: Input -> IO (UplcProg ())
loadUplcASTfromHex = fmap deserialiseUplcProg . getHexInput
loadUplcASTfromHex inp = do

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Such a strange casing

@zliu41
zliu41 merged commit 9cd4254 into master Mar 24, 2026
10 checks passed
@zliu41
zliu41 deleted the zliu41/blueprint branch March 24, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No Changelog Required Add this to skip the Changelog Check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants