Skip to content

Update all dependencies - #58

Draft
mmontin wants to merge 9 commits into
mainfrom
mm/update-cardano-api
Draft

mmontin wants to merge 9 commits into
mainfrom
mm/update-cardano-api

Conversation

@mmontin

@mmontin mmontin commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

fixes #59

@mmontin mmontin changed the title Mm/update cardano api Update all dependencies Sep 10, 2026
mmontin and others added 6 commits October 3, 2026 02:35
Add `Plutus.Script.Utils.V4` (Contexts, Generators, Typed and the V4
aggregator) mirroring the V3 modules, and revise the multipurpose-script
machinery for the V4 ledger API:

- Rename the Rewarding purpose to Withdrawing, whose payload is now an
  `AccountId` instead of a `Credential`.
- Add the new Guarding purpose (`GuardingScript Integer (Maybe TopTxInfo)`),
  with its purpose type, typed-script field, `with/addGuardingPurpose`
  helpers and `trueGuardingPurpose` generator.
- Account for the extra `scriptContextScriptHash` field of V4's
  `ScriptContext` in the on-chain resolved-context decoder.
- Handle V4's distinct `Address` type (account-based staking): match
  outputs on their payment credential in `Contexts`, use V4's `Address`
  in `Generators`, and keep building a V1 `Address` in the `ToAddress`
  instance as the class requires.

Bump the index-state and relax the `plutus-ledger-api` upper bound via
`allow-newer`, since the cardano stack still caps it below the 1.67+
releases that ship the V4 API (the V1-V3 encodings it consumes are
unchanged).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Referenced by hie.yaml; layers editor-only GHC options
(-fwrite-if-simplified-core, -fprefer-byte-code) on cabal.project.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Make plutus-ledger and plutus-script-utils compile against the updated
cardano-api/cardano-ledger stack and bump the emulator's canonical era
from Conway to Dijkstra so that PlutusV4 is supported and the
incomplete-pattern warnings disappear.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Migrate the emulator's canonical era from Conway to Dijkstra:
- EmulatorEra = DijkstraEra and all cardano-api era witnesses (ScriptInEra,
  *EraOnwards, PlutusScriptVxIn*, TxBodyContent) renamed to Dijkstra.
- Transition config now supplies the additional DijkstraGenesis
  (emulatorDijkstraGenesisDefaults) required by mkLatestTransitionConfig.
- Validated-tx construction wraps MkDijkstraTx (DijkstraTx ..) instead of
  AlonzoTx, and reads validity via isValidTxL (the AlonzoTx isValid field
  accessor no longer applies to the Dijkstra tx newtype).
- Ledger predicate failure uses DijkstraLedgerPredFailure (DijkstraUtxowFailure).
- GovState for Dijkstra is still ConwayGovState, so the Conway.Governance
  constitution lenses and ConwayGenesis are retained.

Note: the package does not fully build yet due to pre-existing, unrelated
new-dependency breakage (freer-extras, optics, PlutusTx Lift API) that is out
of scope for the era bump.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Update all dependencies

2 participants