Version 3.0.0
Added
- Modifiers to ease specification of payments in transaction skeletons:
withDatum
,withInlineDatum
, andwithDatumHash
to add or override datums in payments, regardless of whether the type matches the validator type in case of scriptspaysScriptNoDatum
to be used withwithDatum
,withInlineDatum
andwithDatumHash
.withReferenceScript
andwithStakingCredential
to add a reference script or staking credential to a payment
- Export
Cooked.UtxoState
- A module
Cooked.ShowBS
to provide a Plutus-level analogue ofShow
withBuiltinString
as its codomain. This is very inefficient due to limitations ofBuiltinString
, but potentially useful for "printf-debugging" of scripts. - An option
txOptEmulatorParamsModification
to temporarily change protocol parameters for balancing and validation of a transaction - A function
combineModsTweak
to construct branching tweaks depending on the different combinations of foci of an optic onTxSkel
- New
PrettyCooked
instances for common Plutus types - Tweaks on signers in the non-lens tweak API
- A function
resolveTypedDatum
to recover typed data on UTxOs inMonadBlockChainBalancing
. - A
UtxoSearch
that starts from a list ofTxOutRef
s - A transaction option to choose which UTxOs can be spent for balancing
- Lenses for the fields of
TxOpts
- Cheatsheet
- API now exposes:
Cooked.Tweak.ValidityRange
,interpretAndRun
,interpretAndRunWith
,runTweak
,runTweakFrom
anddatumHijackingTarget
there
modifier to apply a tweak at a precise place in a trace- New tweaks to change the start or end of the transaction validity range:
setValidityStartTweak
andsetValidityEndTweak
- UTxo searches with predicates over values, including only ada, or not only ada:
filterWithValuePred
,filterWithOnlyAda
andfilterWithNotOnlyAda
- New pretty-printing options related to hashes in
pcOptHashes
including the possibility to assign human readable names to hashes (pubkeys, scripts, minting policies) - Initial distributions of funds can now include arbitrat payments instead of only consisting of values belonging to wallets. In particular, we can now initially pay to scripts and have utxos with datums and reference scripts. We can still create an initial distribution in the old fashion way with
distributionFromList
or directly provide a list of payments withInitialDistribution
. - Dummy pre-existing validators in
Cooked.Validators
to be used for testing purposes mainly but also as targets for attacks and tweaks. - Small QOL helpers (
ada
,lovelace
andadaAssetClass
) to create values inCooked.ValueUtils
.
Removed
paysPKWithReferenceScript
(superseded by thewithReferenceScript
modifier)- Do not export
Cooked.UtxoPayloadSet
Changed
-
Cooked.holdingInState
is relpaced byCooked.holdsInState
which takes an address instead of a wallet as argument. -
Failure testing is slightly modified so that every test has to check that the right error is thrown
Cooked.testFailsFrom'
is renamed toCooked.testFailsFrom
Cooked.testFails
is (the new)Cooked.testFailsFrom
with the default distribution.
To update their code, users must
- Adapt invokations of
Cooked.testFails
andCooked.testFailsFrom
adding a predicate that must hold on the error returned by running the transaction, - Rename
Cooked.testFailsFrom'
intoCooked.testFailsFrom
. - (Bonus) simplify, knowing that
Cooked.testFailsFrom o x def == Cooked.testFails o x
-
Quick and permanent value minting policies have been migrated to PlutusV2.
-
Default initial distribution only provides 5 UTxOs per wallet instead of 10.
Fixes
- Add forgotten export of
permanentValue
- In
MockChainT
: don't delete data on transaction inputs if there are still UTxOs with that datum around. - Prettyprint unresolved transaction inputs