Bump cardano-api to 11.0.0.0#1370
Merged
Merged
Conversation
5b56414 to
7c7253e
Compare
Adapt to the new `Either MakeUnsignedTxError (UnsignedTx ...)` return of `Exp.makeUnsignedTx` (IntersectMBO/cardano-api#1181). Add a TxCmdMakeUnsignedTxError constructor to TxCmdError so the error surfaces with the existing fromEitherCli/firstExceptT idioms, and update the two call sites in EraBased.Transaction.Run. Bump the cardano-haskell-packages index-state and refresh the CHaP nix flake input to pick up cardano-api 11.0.0.0 (IntersectMBO/cardano-haskell-packages#1358).
7c7253e to
f382628
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates cardano-cli to build against cardano-api-11.0.0.0, adapting transaction-building code to the new Either MakeUnsignedTxError (UnsignedTx ...) return type and updating affected tests that now require protocol parameters when Plutus scripts are present.
Changes:
- Bump
cardano-apidependency to^>=11.0and update CHaP index-state / Nix flake lock to resolve it. - Surface
Exp.makeUnsignedTxfailures through a newTxCmdMakeUnsignedTxErrorinTxCmdErrorand update the two call sites to handleEither. - Fix two
build-rawtest invocations to pass--protocol-params-filefor Plutus-script transactions.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| flake.lock | Updates CHaP pin to a revision that includes cardano-api-11.0.0.0. |
| cardano-cli/cardano-cli.cabal | Bumps cardano-api constraint to ^>=11.0. |
| cabal.project | Advances CHaP index-state to pick up the newer cardano-api. |
| cardano-cli/src/Cardano/CLI/Type/Error/TxCmdError.hs | Adds TxCmdMakeUnsignedTxError and renders it via prettyError. |
| cardano-cli/src/Cardano/CLI/EraBased/Transaction/Run.hs | Updates makeUnsignedTx call sites to handle Either and map errors into TxCmdError. |
| cardano-cli/test/.../Build.hs + TxView.hs | Adds --protocol-params-file to affected Plutus build-raw tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
carbolymer
approved these changes
Apr 30, 2026
0b71bd4 to
f382628
Compare
cardano-api 11.0.0.0 (IntersectMBO/cardano-api#1181) makes `makeUnsignedTx` error when Plutus scripts are present but protocol parameters are missing, instead of silently omitting `script_data_hash`. Two existing tests built Plutus txs without `--protocol-params-file` and so now fail. Point both at the existing offline-protocol-params-preview.json fixture used by the other tests in the same module.
f382628 to
deaab73
Compare
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.
Summary
cardano-apito11.0.0.0and adapt to the newEither MakeUnsignedTxError (UnsignedTx ...)return ofExp.makeUnsignedTx(cardano-api#1181).TxCmdMakeUnsignedTxErrorconstructor toTxCmdErrorso the error surfaces via the existingfromEitherCli/firstExceptTidioms; update the two call sites inEraBased.Transaction.Run.--protocol-params-filein twobuild-rawtests with Plutus scripts.makeUnsignedTxnow errors when Plutus scripts are present but protocol parameters are missing instead of silently omittingscript_data_hash, so the existing tests need to point at theoffline-protocol-params-preview.jsonfixture already used by the rest of the module.cardano-haskell-packagesindex-stateto pick upcardano-api-11.0.0.0from CHaP (cardano-haskell-packages#1358).Changelog