Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to cardano api 10.10 alongside CNE #461

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e33139f
src compiles
mmontin Feb 5, 2025
c7b385d
tests compile
mmontin Feb 5, 2025
4c6347c
not working
mmontin Feb 16, 2025
ca199e8
adding dependencies directly here for now
mmontin Mar 5, 2025
23b51ec
cooked compiles with 10.10
mmontin Mar 5, 2025
eba2d68
inline datum v3 work
mmontin Mar 7, 2025
a43add6
better inline spec
mmontin Mar 8, 2025
2cb037c
merging main into this
mmontin Mar 10, 2025
287a3f8
post merge changes, getting rid of ToVersionedScript
mmontin Mar 10, 2025
5ef2e11
merging config changes into this
mmontin Mar 12, 2025
61c8199
sorting out language extensions and warnings in plutus-script-utils
mmontin Mar 13, 2025
7a8747c
Ada -> Value
mmontin Mar 13, 2025
6f7d7ad
min ada in each output
mmontin Mar 14, 2025
e0dd7fb
adding logging
mmontin Mar 14, 2025
5959f07
update CHANGELOG and CHEATSHEET
mmontin Mar 14, 2025
1e619cb
Merge branch 'main' into mm/min-ada-in-txskeloutput
mmontin Mar 14, 2025
b825d73
some more comments
mmontin Mar 14, 2025
124f1a0
merging
mmontin Mar 14, 2025
b0999b4
no more ada
mmontin Mar 15, 2025
9fa57af
it compiles, still some small errors in tests
mmontin Mar 15, 2025
fc16942
upgraded DH
mmontin Mar 15, 2025
cf56d58
test suite successful
mmontin Mar 15, 2025
3970ee6
AdjustableValue -> FixedValue
mmontin Mar 18, 2025
748f086
begin to have generate tx live in our mockchain
mmontin Mar 17, 2025
19479bd
generateTx/xxx compiles
mmontin Mar 17, 2025
18017ea
all tests pass
mmontin Mar 17, 2025
dafd501
a few helpers adjustments
mmontin Mar 17, 2025
5fafa0b
merging
mmontin Mar 18, 2025
96a9b09
better handling of default empty datums
mmontin Mar 18, 2025
51964db
toAddress and toCredential in PSU
mmontin Mar 18, 2025
cef7c16
Merge branch 'main' into mm/deduplicate-transaction-generation
mmontin Mar 18, 2025
ba0a9ae
Merge branch 'mm/deduplicate-transaction-generation' into update-to-c…
mmontin Mar 18, 2025
ceb8b0f
no more ToOutputDatum
mmontin Mar 19, 2025
4674c0d
no more conversion
mmontin Mar 19, 2025
35de79f
Merge branch 'main' into update-to-cardano-api-10.3
mmontin Mar 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 8 additions & 23 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
packages:
.
cardano-node-emulator
plutus-ledger
plutus-script-utils
freer-extras

package cooked-validators
coverage: True
library-coverage: True

package cardano-crypto-praos
flags: -external-libsodium-vrf

source-repository-package
type: git
location: https://github.com/IntersectMBO/cardano-node-emulator/
tag: 3bdb1f2a578226c1aa39fe09b8fb13e3a0be6d6a
subdir:
cardano-node-emulator
plutus-ledger
plutus-script-utils
freer-extras


-- Everything below this point has been copied from cardano-node-emulator cabal.project

-- Custom repository for cardano haskell packages
Expand All @@ -33,10 +27,9 @@ repository cardano-haskell-packages
c00aae8461a256275598500ea0e187588c35a5d5d7454fb57eac18d9edb86a56
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee

-- See CONTRIBUTING.adoc for how to update index-state
index-state:
, hackage.haskell.org 2024-06-12T10:10:17Z
, cardano-haskell-packages 2024-06-12T10:10:17Z
, hackage.haskell.org 2024-12-24T12:56:48Z
, cardano-haskell-packages 2025-02-28T13:16:07Z

-- We never, ever, want this.
write-ghc-environment-files: never
Expand All @@ -59,12 +52,4 @@ package cardano-crypto-praos
flags: -external-libsodium-vrf

constraints:
cardano-api ^>= 8.46

source-repository-package
type: git
location: https://github.com/input-output-hk/quickcheck-contractmodel
tag: b19a7689a0d40ba3c7f91da87ef5fbcf20f3926c
subdir:
quickcheck-contractmodel
quickcheck-threatmodel
cardano-api ^>= 10.10
27 changes: 27 additions & 0 deletions cardano-node-emulator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

<a id='changelog-1.2.0'></a>
# 1.2.0 — 2023-03-03

## Removed

- Removed `OpenApi.ToSchema` instance for `SlotConfig`.

- Remove `estimateTransactionFee`, `signTx`, `fromPlutusTx`, `fromPlutusTxSigned`, `fromPlutusTxSigned'` as the `Tx` was removed from `plutus-ledger`.

## Changed

- The default utxo provider for balancing now selects bigger inputs first when adding new inputs, to reduce the number of inputs.
This was in particular a problem for collateral inputs, of which there can only be 3.

<a id='changelog-1.1.0'></a>
# 1.1.0 — 2023-01-12

## Added

- Moved from `plutus-ledger` package:
- `Ledger.TimeSlot` to `Cardano.Node.Emulator.TimeSlot`
- `Ledger.Params` to `Cardano.Node.Emulator.Params`
- `Ledger.Generators` to `Cardano.Node.Emulator.Generators`
- `Ledger.Fee` to `Cardano.Node.Emulator.Fee`
- `Ledger.Validation` to `Cardano.Node.Emulator.Validation`
- `Wallet.Emulator.Chain` to `Cardano.Node.Emulator.Chain`
93 changes: 93 additions & 0 deletions cardano-node-emulator/cardano-node-emulator.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
cabal-version: 3.8
name: cardano-node-emulator
version: 1.4.0.0

common lang
default-language: Haskell2010
default-extensions:
DeriveFoldable
DeriveFunctor
DeriveGeneric
DeriveLift
DeriveTraversable
ExplicitForAll
FlexibleContexts
GeneralizedNewtypeDeriving
ImportQualifiedPost
LambdaCase
NamedFieldPuns
ScopedTypeVariables
StandaloneDeriving

-- See Plutus Tx readme for why we need the following flags:
-- -fobject-code -fno-ignore-interface-pragmas and -fno-omit-interface-pragmas
ghc-options:
-Wall -Widentities -Wincomplete-record-updates -Wunused-packages
-Wincomplete-uni-patterns -Wnoncanonical-monad-instances
-Wredundant-constraints -Wmissing-import-lists -fobject-code
-fno-ignore-interface-pragmas -fno-omit-interface-pragmas
-fplugin-opt PlutusTx.Plugin:target-version=1.1.0 -fplugin-opt
PlutusTx.Plugin:defer-errors

-- The limitation of plutus-tx-plugin
if (impl(ghc <9.6) || impl(ghc >=9.7))
buildable: False

library
import: lang
hs-source-dirs: src
exposed-modules:
Cardano.Node.Emulator
Cardano.Node.Emulator.API
Cardano.Node.Emulator.Generators
Cardano.Node.Emulator.Internal.API
Cardano.Node.Emulator.Internal.Node
Cardano.Node.Emulator.Internal.Node.Chain
Cardano.Node.Emulator.Internal.Node.Params
Cardano.Node.Emulator.Internal.Node.TimeSlot
Cardano.Node.Emulator.Internal.Node.Validation
Cardano.Node.Emulator.LogMessages

--------------------
-- Local components
--------------------
build-depends:
, freer-extras ^>=1.4.0
, plutus-ledger ^>=1.4.0

--------------------------
-- Other IOG dependencies
--------------------------
build-depends:
, cardano-api:{cardano-api,gen} ^>=10.10
, cardano-crypto
, cardano-ledger-alonzo
, cardano-ledger-api
, cardano-ledger-binary
, cardano-ledger-conway
, cardano-ledger-core
, cardano-ledger-shelley
, cardano-slotting
, ouroboros-consensus
, plutus-ledger-api >=1.0.0
, plutus-tx >=1.0.0
, sop-extras
, strict-sop-core

------------------------
-- Non-IOG dependencies
------------------------
build-depends:
, aeson >=2
, base >=4.9 && <5
, bytestring
, containers
, data-default
, freer-simple
, hedgehog
, lens
, mtl
, prettyprinter >=1.1.0.1
, sop-core
, text
, time
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Added

- Added `Cardano.Node.Emulator.MTL`, a module that helps run the node emulator without the `Contract` monad.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Added

- Added `Cardano.Node.Emulator.MTL.Test`, with helpers for writing tests, including `quickcheck-contractmodel` tests.
- Added `currentSlot`, `awaitSlot` and `getParams` to `Cardano.Node.Emulator.MTL`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Added

- Added logging methods to the MTL api: `logInfo`, `logDebug`, `logWarn` and `logError`.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Added

- Added `utxoAtTxOutRef` and `lookupDatum` functions to `Cardano.Node.Emulator.MTL`.
1 change: 1 addition & 0 deletions cardano-node-emulator/changelog.d/scriv.ini
25 changes: 25 additions & 0 deletions cardano-node-emulator/src/Cardano/Node/Emulator.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{-# OPTIONS_GHC -Wno-missing-import-lists #-}

-- | This module re-export the content needed to test a contract with the node emulator.
module Cardano.Node.Emulator
( -- * Emulator contracts
module Cardano.Node.Emulator.API,
module Params,

-- * Contract helpers
module Gen,
)
where

import Cardano.Node.Emulator.API
import Cardano.Node.Emulator.Generators as Gen
( alwaysSucceedPolicy,
alwaysSucceedPolicyId,
emptyTxBodyContent,
knownAddresses,
knownPaymentKeys,
knownPaymentPrivateKeys,
knownPaymentPublicKeys,
someTokenValue,
)
import Cardano.Node.Emulator.Internal.Node.Params as Params (Params)
Loading