All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and we follow Semantic Versioning.
- [Unreleased]
- [v5.0.0]
- [v4.0.2] - 2023-01-17
- [v4.0.1] - 2022-12-20
- [v4.0.0] - 2022-12-15
- [3.0.0] - 2022-11-21
- [2.0.0] - 2022-09-12
- [2.0.0-alpha] - 2022-07-05
- [1.1.0] - 2022-06-30
- [1.0.1] - 2022-06-17
- [1.0.0] - 2022-06-10
- [IMPORTANT] New machinery to achieve better synchronization between wallets and query layer has been added. This affects all CTL-based apps when light wallet browser extensions are in use. See here for more info (#1440)
- Local Blockfrost runtime based on run-your-own version of Blockfrost - see here for more info (#1395)
- Automatic retries for
503 Service Unavailable
Kupo request errors. Retry attempts happen with exponentially increasing intervals (#1436) - New functions in the assertion library to track changes in CIP-30 wallet total balance - see
Contract.Test.Assert
(#1440) - Added
start-runtime
npm script to the template, to simplify UX (#1440) - Configuration options for Kupo in
buildCtlRuntime
(deferDbIndexes
andpruneUtxo
) (#1448) Contract.JsSdk
module containing helper functions for developers who want to use CTL from JS. See also: this new guide (#1453)- New docs for contract environment (#1453)
- [IMPORTANT] It is no more recommended to use
utxosAt
to get UTxOs at light wallet addresses. It may be a source of application bugs in some cases due to how wallets operate. Please see Synchronization and wallet UTxO locking section here (#1440) - All uses of
utxosAt
call have been replaced withgetWalletUtxos
in the balancer (#1440) - Naming changes in
Contract.Test.Assert
for consistency with other functions (#1440):checkNewUtxosAtAddress
->assertNewUtxosAtAddress
assertLovelaceDeltaAtAddress
->checkLovelaceDeltaAtAddress
assertValueDeltaAtAddress
->checkValueDeltaAtAddress
- New fields added to
ContractParams
:ContractTimeParams
andContractSynchronizationParams
. Default values areContract.Config.defaultTimeParams
andContract.Config.defaultSynchronizationParams
. See docs on query layers configuration for more info. (#1440) getWalletBalance
is now implemented viagetWalletUtxos
(#1440)PoolPubKeyHash
is now a wrapper overPubKeyHash
instead ofEd25519KeyHash
(#1440)Contract.Wallet.Key.publicKeyFromPrivateKey
usesPublicKey
type from public API (#1440)Contract.Test.Blockfrost.executeContractTestsWithBlockfrost
does not require optionalCtlBackendParams
value (it is now constructed from environment variables).plutip-server
was moved from Plutip repo to CTL (#1415)- Default NodeJS stable version is now v18 (#1453)
- Performance issues when using Eternl in multi-address mode (#1440)
ConnectToNuFi
now reexported inContract.Wallet
(#1435)- Fix a bug in UTxO selection in
Cip30Mock
(that affectedCip30Mock
users) (1437) - Fixed
bundlePursProject
crashing if build output directory exists (#1438) - Better reporting for WebSocket errors (#1403)
Contract.Test.Assert
: handle exceptions coming from callbacks that calculate expected values (incheckLovelaceDeltaAtAddress
,checkTokenDeltaAtAddress
,checkLovelaceDeltaInWallet
andcheckTokenDeltaInWallet
), propagate original error messages correctly (#1440)- Fixed collateral selection - sort the UTxOs by ADA value in descending order, before selecting them for collateral, to ensure that if a combination that satisfies the requirements is possible, it will be selected. The bug affected CIP-30 wallets. (#1440)
- Output correct reward address in CIP-30 mock (#1440)
E2E_SKIP_JQUERY_DOWNLOAD
configuration variable for E2E test suite. It is not needed, because it's expected value can be determined from the environment, and thus it can be an implementation detail (#1440)
- Blockfrost support - see
blockfrost.md
(#1260) - A test runner interface for Blockfrost (
Contract.Test.Blockfrost
). Seeblockfrost.md
(#1420) blake2b224Hash
andblake2b224HashHex
functions for computing blake2b-224 hashes of arbitrary byte arrays (#1323)bundlePursProject
allows passing ofincludeBundledModule
flag to export the bundled JS modulespago bundle-module
outputsContract.Transaction
exportsmkPoolPubKeyHash
andpoolPubKeyHashToBech32
for bech32 roundtripping (#1360)Contract.isTxConfirmed
function to check if a transaction is confirmed at the moment.
- Contract interface change:
Contract
does not have a row type parameter anymore. UseReaderT
or pass values explicitly to access them during runtime. - Contract interface change:
ConfigParams r
is replaced byContractParams
with the same purpose. SystemStart
now hasDateTime
(rather thanString
) as the underlying type (#1377)EraSummaries
now does not have anEncodeAeson
instance. Consider wrapping it inOgmiosEraSummaries
for Aeson encoding. (#1377)- Testing interface is re-implemented. Assertion functions from
Contract.Test.Utils
are moved toContract.Test.Assert
. See the docs for info on the new interface. (#1389) - Balancer no longer selects UTxOs which use PlutusV2 features when the transaction contains PlutusV1 scripts (#1349)
startPlutipCluster
error message now includes cluster startup failure details. (#1407)PlutipTest
is now known asContract.Test.ContractTest
. It has been semantically untied from Plutip, because we now have another test runner for tests that rely on particular funds distributions - Blockfrost. SeeContract.Test.Blockfrost.runContractTestsWithBlockfrost
(#1260)Contract.Staking.getPoolParameters
has been moved toContract.Backend.Ogmios.getPoolParameters
. This function only runs with Ogmios backend, because Blockfrost does not provide all the required values (#1260)- Use of CIP-40 collateral output is now enabled with CIP-30 wallets (#1260).
reindexSpentScriptRedeemers
is no longer in Contract (it's pure) (#1260)
- Important Ogmios Datum Cache is no longer a runtime dependency of CTL, as well as its Postgres DB - if updating, remove them from your runtime.
- CIP-25 strings are now being split into chunks whose sizes are less than or equal to 64 to adhere to the CIP-25 standard (#1343)
- Critical upstream fix in
purescript-bignumber
OutputDatum
aeson encoding now roundtrips (#1388)- Fix incorrect redeemer indexing for Plutus stake validator scripts (#1417)
- Ogmios - v5.5.7
- Kupo - v2.2.0
- Cardano-Node - v1.35.4
- Plutip - commit 8d1795d9ac3f9c6f31381104b25c71576eeba009
- Fixed nix build issue on MacOS systems
- Added a SECP256k1 explainer document (#1346)
- NuFi wallet support (#1265)
- Add
submitTxFromConstraints
andsubmitTxFromConstraintsReturningFee
inContract.Transaction
.submitTxFromConstraints
builds a transaction that satisfies the constraints, then submits it to the network. It is analogous tosubmitTxConstraintsWith
function in Plutus and replacesHelpers.buildBalanceSignAndSubmitTx
. - Support for CIP-49 crypto primitives: SECP256k1 ECDSA and Schnorr (verification functions, signing and key generation) (1273)
- Running plutip servers attaches on SIGINT handlers and therefore node will not exit by default. (#1231).
TestPlanM
,interpret
andinterpretWithConfig
are now public inContract.Test.Mote
and our customconsoleReporter
inContract.Test.Mote.ConsoleReporter
. (#1261).- Internal datum conversions are now total, resulting in some datum-related Contract functions dropping the use of
Maybe
, for exampledatumHash
,convertPlutusData
and their related functions. (#1284). - CIP-25
policy_id
andasset_name
metadata keys no longer include a0x
prefix for compatibility with Blockfrost (#1309). purescript-aeson
package has been updated:- the performance has generally been improved
encodeAeson'
is nowencodeAeson
(and it returns justAeson
instead of anAesonEncoder
)Number
type is not supported anymore (due toNaN
and+/-Infinity
) - useAeson.finiteNumber
function
ctl-server
, a haskell binary that was providing ability to apply arguments to parametrized scripts, was replaced by an implementation that uses WASM library (Contract.Scripts.applyArgs
) (#483)
- Added missing
stakePoolTargetNum
("nOpt
") protocol parameter (see CIP-9) (#571) - CIP-30
signData
response handling (#1289)
- Ogmios - v5.5.7
- Kupo - v2.2.0
- Cardano-Node - v1.35.4
- Ogmios-Datum-Cache - commit 862c6bfcb6110b8fe816e26b3bba105dfb492b24
- Plutip - commit 8d1795d9ac3f9c6f31381104b25c71576eeba009
- Support passing the inital UTxO distribution as an Array and also get the KeyWallets as an Array when writing Plutip tests. (#1018). An usage example can be found here.
- New
Contract.Test.Utils
assertions and checks:assertOutputHasRefScript
,checkOutputHasRefScript
,checkTxHasMetadata
(#1044) Parallel
instance toContract
monad. Parallel capabilities are in the associatedParContract
datatype (#1037)- Balancer constraints interface (check Building and submitting transactions and
examples/BalanceTxConstraints.purs
for reference) (#1053) - New
Contract.Transaction
functions accepting balancer constraints as a parameter:balanceTxWithConstraints
,balanceTxsWithConstraints
,withBalancedTxWithConstraints
,withBalancedTxsWithConstraints
(#1053) - New functions
addressWithNetworkTagFromBech32
andaddressFromBech32
inContract.Address
, the second checking that address network Id corresponds to the contract environment network Id. (#1062) Contract.CborBytes
for CBOR-related functionality. (#850)ToData
&FromData
instances forPublicKey
inCardano.Types.Transaction
(#998)Contract.Keys
module that exposes smart constructors forPublicKey
&Ed25519Signature
, namely:mkEd25519Signature
,mkPubKey
.Contract.createAdditionalUtxos
to build an expected utxo set from transaction outputs, useful for transaction chaining (#1046)DecodeAeson
instance forNativeScript
data type (#1069).Contract.Wallet
exportsmkWalletBySpec
(#1157)ctl-server
NixOS module (#1194). See nix/test-nixos-configuration.nix for example usage and nix/ctl-server-nixos-module.nix.- Ability to run E2E tests on private Plutip testnets using CIP-30 wallet mock - see the docs (#1166)
Contract.Plutarch.Types
module withPRational
type which is a newtype of Rational withToData
andFromData
instance which are compatible with Plutarch (#1221)- New constraints for stake operations (#1060):
- Pool registration (
mustRegisterPool
) - Pool retirement (
mustRetirePool
) - Stake credential registration (
mustRegisterStakePubKey
,mustRegisterStakeScript
) - Stake delegation (
mustDelegateStakeNativeScript
,mustDelegateStakePlutusScript
,mustDelegateStakePubKey
) - Staking rewards withdrawal (
mustWithdrawStakePubKey
,mustWithdrawStakePlutusScript
,mustWithdrawStakeNativeScript
) - Stake credential deregistration (
mustDeregisterStakePubKey
,mustDeregisterStakePlutusScript
,mustDeregisterStakeNativeScript
)
- Pool registration (
- New query layer functions to retrieve staking-related info from Ogmios (#1060):
Contract.Staking.getPoolIds
Contract.Staking.getPoolParameters
Contract.Staking.getPubKeyHashDelegationsAndRewards
Contract.Staking.getValidatorHashDelegationsAndRewards
Contract.Test.Plutip.testPlutipContracts
to run multiple Mote Plutip tests on the same Plutip cluster, saving on cluster startup time. (#1154).EncodeAeson
andDecodeAeson
instances forTransactionInput
,TransactionOutput
/TransactionOutputWithRefScript
andPaymentPubKeyHash
(#1138)mustSendChangeToAddress
balancer constraint, allowing to explicitly set the address to send all generated change to (#1243)mustUseUtxosAtAddress
andmustUseUtxosAtAddresses
balancer constraints, allowing to specify addresses that should be treated like utxos sources during balancing (#1243)- Add ability to provide extra browser CLI arguments in E2E test suite (#1253)
- The configuration option for plutip clusters: slot length can be adjusted using
clusterConfig
field ofPlutipConfig
. epoch size must currently remain at80
however due to (#1272)
- Bumped cardano-serialization-lib dependencies to version 11.1.1-alpha.1 (#1163)
Contract.Transaction.calculateMinFee
andContract.Transaction.calculateMinFeeM
now accept additional UTxOs.- Reorganised the library into new namespaces. Namely: library internals, tests, and examples are now under
Ctl.Internal.*
,Test.Ctl.*
, andCtl.Examples.*
respectively. Documentation and comments have been updated to use these new names, but not entries of previous releases in the changelog. (#1039) - Switched to
preview
testnet by default (#1030) addressFromBech32
checks that address network Id corresponds to the contract environment Id and is therefore lifted to theContract
monad (#1062)keyWalletPrivatePaymentKey
andkeyWalletPrivateStakeKey
are now in to the publicContract.Wallet.Key
API. (#1094)- Completely new E2E (headless browser) test suite. It is now both easier to set up and use, and less flaky. The shell script has been removed (and re-implemented in PureScript). The suite can now be configured using environment variables (
test/e2e.env
) or CLI arguments. It is no more required to provide an accompanying tester script for each of theContract
s to be tested. (#1058, #986) - The
logLevel
from the config parameters is passed to thecustomLogger
to allow consistent filtering of the logs. (#1110). - Functions for working with
BigNum
are now in the publicContract.Numeric.BigNum
API (#1109). PublicKey
andEd25519Signature
types now wrapRawBytes
instead ofBech32String
.TypeLevel.Nat
, needed to implementHasPlutusSchema
, gets exported inContract.PlutusData
(#1143).MintingPolicy
to an enum consisting ofPlutusScript
orNativeScript
(#1069)Contract.Scripts
applyArgs
is now monomorphic on the script parameter (#1069)- Adapted Gero wallet extension to
preview
network in E2E test suite (#1086) Contact.TextEnvelope
how provides more type safe interface with simplified error handling (#988)- Forbid minting zero tokens. (#1156)
- Modified functions
getWalletAddress
,ownPubKeyHash
,ownStakePubKeyHash
,getWalletAddressWithNetworkTag
andownPaymentPubKeyHash
to returnContract r (Array Adress)
. (#1045) pubKeyHashAddress
andscriptHashAddress
now both accept an optionalCredential
that corresponds to the staking component of the address (#1060)utxosAt
andgetUtxo
now use Kupo internally,utxosAt
returnsUtxoMap
withoutMaybe
context. The users will need to setkupoConfig
inConfigParams
. (#1185)Interval
type is redesigned to restrain some finite intervals to be expressed in the system (#1041)
balanceAndSignTxE
,balanceAndSignTx
,balanceAndSignTxs
,balanceTxWithAddress
,balanceTxsWithAddress
,withBalancedAndSignedTx
andwithBalancedAndSignedTxs
fromContract.Transaction
(#1053)ScriptOutput
is removed and therefore not exported byContract.Address
anymore. also,Contract.Transaction
doesn't exportscriptOutputToTransactionOutput
anymore (#652).Contract.TxConstraints.TxConstraint
type from public API. The users should rely on domain functions instead (#1135)Contract.Address.enterpriseAddressScriptHash
,enterpriseAddressValidatorHash
- useContract.Address.addressPaymentValidatorHash
that works for base addresses as well, oraddressStakeValidatorHash
to get the stake component validator hash (#1060)Contract.Address.enterpriseAddressMintingPolicyHash
andenterpriseAddressStakeValidatorHash
- these functions didn't make much sense (too specific, a very rare use case). (#1060)ScriptHash
type from theContract
interface (useValidatorHash
) (#1060)Contract.Address
re-exports fromContract.Scripts
(#1060)Contract.Address.ownPubKeyHash
andownPubKeyHashes
- these are not needed, useownPaymentPubKeyHash
/ownPaymentPubKeyHashes
(#1211)mustBalanceTxWithAddress
andmustBalanceTxWithAddresses
balancer constraints - use a combination ofmustUseUtxosAtAddresses
andmustSendChangeToAddress
to get the same behaviour (#1243)
- Fix absence of
getUtxos
method in CIP-30 mock (#1026) awaitTxConfirmedWithTimeout
not respecting its timeout (#1021)- Absence of
serializeData
in Plutip (#1078) - Fix excessive reconnection attempts after
Contract
runtime finalization (#965) - Fix wallet extension error terminating the whole test suite (#1209)
- Now we can process multiple time constraints (#1124)
- E2E test suite didn't apply settings archive CLI option properly (#1254)
- Ogmios - v5.5.7
- Kupo - v2.2.0
- Cardano-Node - v1.35.3
- Ogmios-Datum-Cache - commit 862c6bfcb6110b8fe816e26b3bba105dfb492b24
- Plutip - commit 1c9dd05697d7cf55de8ca26f0756a75ed821bdfb
- Plutip integration to run
Contract
s in local, private testnets (#470) - Ability to run
Contract
s in Plutip environment in parallel -Contract.Test.Plutip.withPlutipContractEnv
(#800) withKeyWallet
utility that allows to simulate multiple actors in Plutip environment (#663)withStakeKey
utility that allows providing a stake key to be used byKeyWallet
s in Plutip environment (#838)Alt
andPlus
instances forContract
.Contract.Utxos.getUtxo
call to get a single utxo at a given output referenceContract.Monad.withContractEnv
function that constructs and finalizes a contract environment that is usable inside a bracket callback. This is the intended way to run multiple contracts. (#731)Contract.Monad.stopContractEnv
function to finalize a contract environment (close theWebSockets
). It should be used together withmkContractEnv
, and is not needed withwithContractEnv
. (#731)Contract.Config
module that contains everything needed to create and manipulateConfigParams
, as well as a number ofConfigParams
fixtures for common use cases. (#731)Contract.Monad.askConfig
andContract.Monad.asksConfig
functions to access user-defined configurations. (#731)Contract.Config.WalletSpec
type that allows to define wallet parameters declaratively inConfigParams
, instead of initializing wallet and setting it to aContractConfig
(#731)- Faster initialization of
Contract
runtime due to parallelism. (#731) purescriptProject
'sshell
parameter now acceptspackageLockOnly
, which if set to true will stop npm from generatingnode_modules
. This is enabled for CTL developersContract.Transaction.awaitTxConfirmed
andContract.Transaction.awaitTxConfirmedWithTimeout
Contract.TextEnvelope.textEnvelopeBytes
and family to decode theTextEnvelope
format, a common format output by tools likecardano-cli
to serialize values such as cryptographical keys and on-chain scriptsContract.Wallet.isNamiAvailable
andContract.Wallet.isGeroAvailable
functions (#558])Contract.Transaction.balanceTxWithOwnAddress
andContract.Transaction.balanceTxsWithOwnAddress
to override anAddress
used inbalanceTx
internally (#775)Contract.Transaction.awaitTxConfirmedWithTimeoutSlots
waits a specified number of slots for a transaction to succeed. (#790)Contract.Transaction.submitE
like submit but uses anEither (Array Aeson) TransactionHash
to handle a SubmitFail response from OgmiosContract.Chain.waitNSlots
,Contract.Chain.currentSlot
andContract.Chain.currentTime
a function to wait at leastN
number of slots and functions to get the current time inSlot
orPOSIXTime
. (#740)Contract.Transaction.getTxByHash
to retrieve contents of an on-chain transaction.project.launchSearchablePursDocs
to create anapps
output for serving Pursuit documentation locally (#816)Contract.PlutusData.IsData
type class (ToData
+FromData
) (#809)- A check for port availability before Plutip runtime initialization attempt (#837)
Contract.Address.addressToBech32
andContract.Address.addressWithNetworkTagToBech32
(#846)doc/e2e-testing.md
describes the process of E2E testing. (#814)- Added unzip to the
devShell
. NewpurescriptProject.shell
flagwithChromium
also optionally adds Chromium to thedevShell
(#799) - Added paymentKey and stakeKey fields to the record in KeyWallet
- Added
formatPaymentKey
andformatStakeKey
toWallet.KeyFile
andContract.Wallet
for formatting private keys - Added
privatePaymentKeyToFile
andprivateStakeKeyToFile
toWallet.KeyFile
andContract.Wallet.KeyFile
for writing keys to files - Added
bytesFromPrivateKey
toSerialization
- Improved error handling of transaction evaluation through Ogmios. This helps with debugging during balancing, as it requires the transaction to be evaluated to calculate fees. (#832)
Contract.Hashing.transactionHash
to calculate the hash of the transaction (#870)- Flint wallet support (#556)
- Support for
NativeScript
s in constraints interface:mustPayToNativeScript
andmustSpendNativeScriptOutput
functions (#869) Contract.Test.Cip30Mock
module to mock CIP-30 wallet interface usingKeyWallet
. The mock can be used for testing without a wallet (even in NodeJS environment). This increases test coverage for CTL code. (#784)Plutus.Types.AssocMap.AssocMap
now hasTraversableWithIndex
,FoldableWithIndex
,FunctorWithIndex
instances (#943)- The return value of
purescriptProject
now includes the project with its compiledoutput
and its generatednode_modules
(under thecompiled
andnodeModules
attributes, respectively) (#956) Contract.Utxos.getWalletUtxos
function that calls CIP-30getUtxos
method. (#961)- Lode wallet support (#556)
- Added
Contract.Transaction.lookupTxHash
helper function (#957) Contract.Test.Utils
for making assertions aboutContract
s. (#1005)Examples.ContractTestUtils
demonstrating the use ofContract.Test.Utils
. (#1005)mustNotBeValid
constraint which marks the transaction as invalid, allowing scripts to fail during balancing and for Ogmios to allow submission. (#947)- Constraints for creating outputs with reference scripts:
mustPayToScriptWithScriptRef
,mustPayToPubKeyAddressWithDatumAndScriptRef
,mustPayToPubKeyAddressWithScriptRef
,mustPayToPubKeyWithDatumAndScriptRef
,mustPayToPubKeyWithScriptRef
(#946) - Constraints for using reference validators and minting policies:
mustSpendScriptOutputUsingScriptRef
,mustMintCurrencyUsingScriptRef
,mustMintCurrencyWithRedeemerUsingScriptRef
(#946) - Constraint for attaching a reference input to a transaction:
mustReferenceOutput
(#946) DatumPresence
data type, which tags paying constraints that accept datum, to mark whether the datum should be inline or hashed in the transaction output. (#931)- Utility conversion functions
serializeData
anddeserializeData
betweenPlutusData
andCborBytes
toContract.PlutusData
. (#1001) - Added CIP-30 methods:
getNetworkId
,getChangeAddress
,getRewardAddresses
,getUnusedAddresses
,signData
,isWalletAvailable
,isEnabled
,apiVersion
,name
andicon
toContract.Wallet
(#974)
PlutusScript
is now aware of which version of Plutus the script is for. The JSON representation has thus changed to reflect this and is not compatible with older JSON format.- CTL's
overlay
no longer requires an explicitly passedsystem
- Switched to CSL for utxo min ada value calculation (#715)
- Upgraded Haskell server to fully support Babbage-era transactions (#733)
- Improved the collateral selection algorithm for
KeyWallet
(#707) - Switched to CSL for
PlutusScript
hashing (#852) runContract
now acceptsConfigParams
instead ofContractConfig
(#731)mkContractConfig
has been renamed tomkContractEnv
. Users are advised to usewithContractEnv
instead to ensure proper finalization of WebSocket connections. (#731)ConfigParams
is now a type synonym instead of a newtype.ContractConfig
has been renamed toContractEnv
.- Moved logging functions to
Contract.Log
fromContract.Monad
(#727 - Renamed
Contract.Wallet.mkKeyWalletFromPrivateKey
toContract.Wallet.mkKeyWalletFromPrivateKeys
. - ServerConfig accepts a url
path
field (#728). - Examples now wait for transactions to be confirmed and log success (#739).
- Updated CSL version to v11.0.0 (#801)
- Better error message when attempting to initialize a wallet in NodeJS environment (#778)
- The
ctl-scaffold
repository has been archived and deprecated and its contents moved totemplates.ctl-scaffold
in the CTL flake (#760). - The CTL
overlay
output has been deprecated and replaced byoverlays.purescript
,overlays.runtime
, andoverlays.ctl-server
(#796 and #872). buildCtlRuntime
andlaunchCtlRuntime
now take anextraServices
argument to adddocker-compose
services to the resulting Arion expression (#769).- Use
cardano-serialization-lib
for fee calculation, instead of server-side code. balanceAndSignTx
no longer silently drops error information viaMaybe
. TheMaybe
wrapper is currently maintained for API compatibility, but will be dropped in the future.- Made it impossible to write unlawful
EncodeAeson
instances (#490) - The
ctl-server
component of the runtime is now optional and is only required when using theapplyArgs
endpoint (#872). Related changes include:- The
ctlServerConfig
fields of bothConfigParams
andPlutipConfig
now take aMaybe ServerConfig
. In the case ofPlutipConfig
, aJust
value will spawn the service inside the Plutip test. For theConfigParams
type, calls toapplyArgs
will fail when the field is set toNothing
. - The config accepted by
launchCtlRuntime
andbuildCtlRuntime
now takes actl-server.enable
field. Iffalse
,ctl-server
will not be launched.
- The
SlotLength
andRelativeTime
inEraSummary
from Ogmios are now of typeNumber
instead ofBigInt
. Also addMaybe
around some functions inType.Interval
or changed it's signature to useNumber
. (#868)- The
ProtocolParameters
introduced in Alonzo (prices
,maxTxExUnits
,maxBlockExUnits
,maxValueSize
,collateralPercent
andmaxCollateralInputs
) are no longer of typeMaybe
because we don't support pre-Alonzo eras. (#971) - Renamed
UtxoM
toUtxoMap
(#963) - KeyWallet's
selectCollateral
field now allows multiple collateral to be selected, and is provided withcoinsPerUtxoByte
andmaxCollateralInputs
from the protocol parameters. (#947) mustPayWithDatumToPubKey
,mustPayWithDatumToPubKeyAddress
, andmustPayToScript
now expect aDatumPresence
tag in their arguments to mark whether the datum should be inline or hashed in the transaction output. ((#931)[Plutonomicon#931))- Switched to blakejs for blake2b hashing.
blake2b256Hash
andblake2b256HashHex
functions are now pure (#991) - Updated ODC version, this includes a new function
getDatumsByHashesWithErrors
that does not discard errors, unlikegetDatumsByHashes
. This update also changes the way we store transactions in the local database, meaning that we need to drop thetransactions
table.
Contract.Monad.traceTestnetContractConfig
- useContract.Config.testnetNamiConfig
instead (or other variants oftestnet...Config
for other wallets).runContract_
- usevoid <<< runContract
.Contract.Aeson
module - useAeson
(#938)
- Endless
awaitTxConfirmed
calls (#804) - Bug with collateral selection: only the first UTxO provided by wallet was included as collateral (#723)
- Bug with collateral selection for
KeyWallet
when signing multiple transactions (#709) - Bug when zero-valued non-Ada assets were added to the non-Ada change output (#802)
- Error recovery logic for
SubmitTx
if the WebSocket connection is dropped (#870) - Properly implemented CIP-25 V2 metadata. Now there's no need to split arbitrary-length strings manually to fit them in 64 PlutusData bytes (CTL handles that). A new
Cip25String
type has been introduced (a smart constructor ensures that byte representation fits 64 bytes, as required by the spec). Additionally, a newMetadata.Cip25.Common.Cip25TokenName
wrapper overTokenName
is added to ensure proper encoding ofasset_name
s. There are still some minor differences from the spec:- We do not split strings in pieces when encoding to JSON
- We require a
"version": 2
tag policy_id
must be 28 bytesasset_name
is up to 32 bytes. See cardano-foundation/CIPs#303 for motivation
ogmios-datum-cache
now works onx86_64-darwin
TypedValidator
interface (#808)Contract.Address.getWalletCollateral
now works withKeyWallet
.- Removed unwanted error messages in case
WebSocket
listeners get cancelled (#827) - Bug in
CostModel
serialization - incorrectInt
type (#874) - Use logger settings on Contract initialization (#897)
- Disallow specifying less than 1 ADA in Plutip UTxO distribution (#901)
- Bug in
TransactionMetadatum
deserialization (#932) - Fix excessive logging after the end of
Contract
execution (#893) - Add ability to suppress logs of successful
Contract
executions - with newsuppressLogs
config option the logs will be shown on error (#768) - Fix
runPlutipTest
not passing custombuildInputs
(#955) - Problem parsing ogmios
SlotLength
andRelativeTime
in era Summaries if those include non integer values. (#906) - Use
docs-search-0.0.12
that properly lists modules consisting only of re-exports (#973) - Inline datum in Ogmios transaction outputs are now parsed and preserved when converting to CTLs respective type. (#931)
This release adds support for running CTL contracts against Babbage-era nodes. Note: this release does not support Babbagge-era features and improvements, e.g. inline datums and reference inputs. Those feature will be implemented in v2.0.0
proper.
- Support for using a
PrivateKey
as aWallet
. mkKeyWalletFromFile
helper to usecardano-cli
-styleskey
s- Single
Plutus.Conversion
module exposing all(Type <-> Plutus Type)
conversion functions (#464) logAeson
family of functions to be able to log JSON representationsEncodeAeson
instances for most types underCardano.Types.*
as well as other useful types (Value
,Coin
, etc.)getProtocolParameters
call to retrieve current protocol parameters from Ogmios (#541)Contract.Utxos.getWalletBalance
call to get all available assets as a singleValue
(#590)balanceAndSignTxs
balances and signs multiple transactions while taking care to use transaction inputs only once- Ability to load stake keys from files when using
KeyWallet
(#635) - Implement utxosAt for
KeyWallet
(#617) FromMetadata
andToMetadata
instances forContract.Value.CurrencySymbol
Contract.Chain.waitUntilSlot
to delay contract execution until local chain tip reaches certain point of time (in slots).
FromPlutusType
/ToPlutusType
type classes. (#464)Contract.Wallet.mkGeroWallet
andContract.Wallet.mkNamiWallet
-Aff
versions should be used instead- Protocol param update setters for the decentralisation constant (
set_d
) and the extra entropy (set_extra_entropy
) (#609) AbsSlot
and related functions have been removed in favour ofSlot
- Modules
Metadata.Seabug
andMetadata.Seabug.Share
POST /eval-ex-units
Haskell server endpoint (#665)- Truncated test fixtures for time/slots inside
AffInterface
to test time/slots not too far into the future which can be problematic during hardforks Plutonomicon#676 d
andextraEntropy
protocol parameters from protocol parameters update proposal
- Updated
ogmios-datum-cache
- bug fixes (#542, #526, #589) - Improved error response handling for Ogmios (#584)
balanceAndSignTx
now locks transaction inputs within the currentContract
context. If the resulting transaction is never used, then the inputs must be freed withunlockTransactionInputs
.- Updated
ogmios-datum-cache
- bug fixes (#542, #526, #589). - Made protocol parameters part of
QueryConfig
. - Refactored
Plutus.Conversion.Address
code (utilized CSL functionality). - Changed the underlying type of
Slot
,TransactionIndex
andCertificateIndex
toBigNum
. - Moved transaction finalization logic to
balanceTx
. - Upgraded to CSL v11.0.0-beta.1.
purescriptProject
(exposed via the CTL overlay) was reworked significantly. Please see the updated example in the documentation for more details.- Switched to Ogmios for execution units evaluation (#665)
- Changed
inputs
insideTxBody
to beSet TransactionInput
insteadArray TransactionInput
. This guarantees ordering of inputs inline with Cardano (#641) - Upgraded to Ogmios v5.5.0
- Change
inputs
insideTxBody
to beSet TransactionInput
insteadArray TransactionInput
. This guarantees ordering of inputs inline with Cardano (#641).
- Handling of invalid UTF8 byte sequences in the Aeson instance for
TokenName
Types.ScriptLookups.require
function naming caused problems with WebPack (#593)- Bad logging in
queryDispatch
that didn't propagate error messages (#615) - Utxo min ada value calculation (#611)
- Discarding invalid inputs in
txInsValues
instead of yielding an error (#696) - Locking transaction inputs before the actual balancing of the transaction (#696)
- Changed
utxoIndex
inside anUnbalancedTx
to be aMap
with valuesTransactionOutput
instead ofScriptOutput
so there is no conversion in the balancer toScriptOutput
. This means the balancer can spend UTxOs from different wallets instead of just the current wallet and script addresses.
mustBeSignedBy
now sets theEd25519KeyHash
corresponding to the providedPaymentPubKeyHash
directly. Previously, this constraint would fail as there was no way to provide a matchingPaymentPubKey
as a lookup. Note that this diverges from Plutus as thepaymentPubKey
lookup is always required in that implementation.
CTL's initial release!