- The type of
writeBits
built-in PlutusTx/Plinth function has been changed from
BuiltinByteString -> [Integer] -> [Bool] -> BuiltinByteString
to
BuiltinByteString -> [Integer] -> Bool -> BuiltinByteString
Instead of a list of boolean values to write to bit positions specified in the
second argument it now takes a single boolean value which is used to update the
bits at all of the given positions. If it's necessary to set some bits and
clear others then the function should be called twice, once with True
as the
third argument and once with False
.
- CIP-57 (Blueprints) related changes:
HasSchema
typeclass renamed toHasBlueprintSchema
AsDefinitionId
typeclass renamed toHasBlueprintDefinition
Unroll
type-family made into an associated type ofHasBlueprintSchema
in order to make it open for extension.HasBlueprintSchema
andHasBlueprintDefinition
instances for data types.
-
Enabled the draft modularExponentation builtin.
-
Builtin function
ripemd_160
implementing RIPEMD-160 hashing.
- In #6347 made
[] :: [Integer]
,[] :: [Bool]
,[] :: [Data]
, and[(Data, Data)]
compile directly to the respective empty list via theMkNil
type class without usage of built-in functions ordefineBuiltinTerm
.
- Removed incorrect Ord and Eq instances from AssocMap and Data.AssocMap.
-
Builtins corresponding to the logical operations from CIP-122.
-
Builtin wrappers for operations from this CIP.
-
Haskell
Eq
andOrd
instances forAssocMap
based onData.Map.Strict
.
-
References to CIP-0087 now correctly refer to CIP-121.
-
Rename
replicateByteString
toreplicateByte
- Added
Data.AssocList.Map
module which provides a map implementation based onData
.
- Split
PlutusTx.Builtins.Class
intoPlutusTx.Builtins.HasBuiltin
andPlutusTx.Builtins.HasOpaque
in #5971:
- Split 'FromBuiltin' into 'HasFromBuiltin' and 'HasFromOpaque'
- Split 'ToBuiltin' into 'HasToBuiltin' and 'HasToOpaque'
- The PlutusTx
These
type had the Haskell implementations ofShow
,Eq
andOrd
instances instead of PlutusTx ones. This has been fixed.
- Renamed
PlutusTx.Builtins.matchList
tomatchList'
. The newmatchList
takes an argument of type() -> r
for thenil
case, ensuring that the nil case isn't evaluated if the list is non-empty.
-
CIP-0057 Blueprint generation is supported.
-
An error code "PT20" for the
recip
function in thePlutusTx.Ratio
module. -
PlutusTx.List.indexBuiltinList
: index operator for builtin lists.
- Documented functions which unsafely construct
PlutusTx.AssocMap.Map
s, or depend on the precondition that the inputMap
s do not contain duplicate entries.
- Renamed
PlutusTx.AssocMap.Map.fromList
toPlutusTx.AssocMap.Map.unsafeFromList
. - Renamed
PlutusTx.AssocMap.Map.fromListSafe
toPlutusTx.AssocMap.Map.safeFromList
.
PlutusTx.Ratio.reduce
removed in favor ofPlutusTx.Ratio.unsafeRatio
as it was violating the "positive denominator" invariant.
- Builtins updated to include
ByteStringToInteger
andIntegerToByteString
.
- Entries in
PlutusTx.Builtins
for CIP-0087 primitives - Entries in
PlutusTx.Builtins.Internal
for CIP-0087 primitives
- The
blake2b_224
function in the plutus-tx plugin was erroneously callingblake2b_256
instead. Now fixed.
-
The group elements
bls12_381_G1_zero
andbls12_381_G1_generator
have been replaced with bytestrings calledbls12_381_G1_compressed_zero
andbls12_381_G1_compressed generator
, and similarly forbls12_381_G2_zero
andbls12_381_G2_generator
. PlutusTx scripts should applybls12_381_G2_uncompress
orbls12_381_G2_uncompress
to the compressed versions to recover the group elements. -
Improved the performance of
PlutusTx.AssocMap.insert
andPlutusTx.AssocMap.unionWith
.
- The "safe" version of
fromData
was using an unsafehead
function, so would crash on some malformed input instead of returningNothing
.
- A more informative error message when the plugin encounters a literal range
- PlutusTx.enumFromThenTO for ranges like [1,5..101]
- Generated instances for
IsData
now have more efficient codegen, but requireViewPatterns
.
-
asData
, a TH function for creating datatype declarations that are backed byData
, which can be much faster in some circumstances. -
Generic instances for Rational and BuiltinData.
- Fixed a strictness issue in generated
IsData
instaces when using-O0
in Plutus Tx.
- The
Strict
extension is now on by default in all of Plutus Tx.
- Haskell function for
keccak_256
builtin - Haskell function for
blake2b_224
builtin
- New built-in types and functions for BLS12-381 operations.
- GHC 9.6 support
-
Monomorphized functions in PlutusTx.Foldable that should short-circuit. This makes them short-circuit properly.
-
liftCode
and some other functions inPlutusTx.Lift
now return PIR in addition to UPLC.
- Various
Lift
functions gainedVersion
arguments, so that you can control the version of PLC used in the resulting program. This also affects how the PIR compiler will compile datatypes.
unsafeApplyCode
, a variant ofapplyCode
that throws if the language versions don't match.
applyCode
now requires matching Plutus Core language versions.
- Removed Plutus Tx library functions with the
Haskell.Monad
constraint. Functions requiringFunctor
andApplicative
are usingPlutusTx.Functor
andPlutusTx.Applicative
, but those requiringMonad
were using Haskell'sMonad
, which is inconsistent and confusing. We should either add aPlutusTx.Monad
class, or switch to Haskell'sFunctor
andApplicative
. Some of these functions likesequence_
andmapM_
are also not useful, and one should prefersequenceA_
andtraverse_
, respectively.
- Use
foldr
instead offoldMap
inPlutusTx.Foldable