Skip to content

Bump cardano-api to 11.0.0.0#1370

Merged
Jimbo4350 merged 2 commits into
masterfrom
jordan/cardano-api-11.0.0.0
May 1, 2026
Merged

Bump cardano-api to 11.0.0.0#1370
Jimbo4350 merged 2 commits into
masterfrom
jordan/cardano-api-11.0.0.0

Conversation

@Jimbo4350
Copy link
Copy Markdown
Contributor

@Jimbo4350 Jimbo4350 commented Apr 30, 2026

Summary

  • Bump cardano-api to 11.0.0.0 and adapt to the new Either MakeUnsignedTxError (UnsignedTx ...) return of Exp.makeUnsignedTx (cardano-api#1181).
  • Add a TxCmdMakeUnsignedTxError constructor to TxCmdError so the error surfaces via the existing fromEitherCli/firstExceptT idioms; update the two call sites in EraBased.Transaction.Run.
  • Provide --protocol-params-file in two build-raw tests with Plutus scripts. makeUnsignedTx now errors when Plutus scripts are present but protocol parameters are missing instead of silently omitting script_data_hash, so the existing tests need to point at the offline-protocol-params-preview.json fixture already used by the rest of the module.
  • Bump the cardano-haskell-packages index-state to pick up cardano-api-11.0.0.0 from CHaP (cardano-haskell-packages#1358).

Changelog

- description: |
    Bump `cardano-api` to 11.0.0.0. Adapt to the new `Either MakeUnsignedTxError (UnsignedTx ...)` return of `Exp.makeUnsignedTx` and surface the error via a new `TxCmdMakeUnsignedTxError` constructor.
  type:
    # - feature        # introduces a new feature
    # - breaking       # the API has changed in a breaking way
    # - compatible     # the API has changed but is non-breaking
    # - optimisation   # measurable performance improvements
    # - refactoring    # QoL changes
    # - bugfix         # fixes a defect
    # - test           # fixes/modifies tests
    - maintenance    # not directly related to the code
    # - release        # related to a new release preparation
    # - documentation  # change in code docs, haddocks...

@Jimbo4350 Jimbo4350 force-pushed the jordan/cardano-api-11.0.0.0 branch from 5b56414 to 7c7253e Compare April 30, 2026 21:32
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).
@Jimbo4350 Jimbo4350 force-pushed the jordan/cardano-api-11.0.0.0 branch from 7c7253e to f382628 Compare April 30, 2026 21:36
@Jimbo4350 Jimbo4350 marked this pull request as ready for review April 30, 2026 21:42
@Jimbo4350 Jimbo4350 requested review from a team, carbolymer, newhoggy and palas as code owners April 30, 2026 21:42
Copilot AI review requested due to automatic review settings April 30, 2026 21:42
Copy link
Copy Markdown

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

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-api dependency to ^>=11.0 and update CHaP index-state / Nix flake lock to resolve it.
  • Surface Exp.makeUnsignedTx failures through a new TxCmdMakeUnsignedTxError in TxCmdError and update the two call sites to handle Either.
  • Fix two build-raw test invocations to pass --protocol-params-file for 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.

@Jimbo4350 Jimbo4350 force-pushed the jordan/cardano-api-11.0.0.0 branch from 0b71bd4 to f382628 Compare May 1, 2026 12:48
@Jimbo4350 Jimbo4350 enabled auto-merge May 1, 2026 12:49
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.
@Jimbo4350 Jimbo4350 force-pushed the jordan/cardano-api-11.0.0.0 branch from f382628 to deaab73 Compare May 1, 2026 13:14
@Jimbo4350 Jimbo4350 added this pull request to the merge queue May 1, 2026
Merged via the queue into master with commit e0a1490 May 1, 2026
27 checks passed
@Jimbo4350 Jimbo4350 deleted the jordan/cardano-api-11.0.0.0 branch May 1, 2026 13:55
@Jimbo4350 Jimbo4350 mentioned this pull request May 1, 2026
3 tasks
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.

3 participants