-
Add
PlyTypeName
andplyTypeName
that replaces oldtypeName
function. This provides mode detailed type reflections: type applications, typelits, and modules name. -
Add
AsData
, an identity type that represents data encoded parameters. ParallelsPAsData
in Plutarch. -
Add proper instances for
AsData
to make it work withplyTypeName
andapplyTerm
. -
Add
unsafeUnTypedScript'
, same asunsafeUnTypedScript
but using unboxed tuple. -
Due to the changes made in
Ply.Core.Typename
module, scripts exported after v0.5.0 will not be compatible with scripts earlier versions of Ply. Users simply need to bump Ply version to make it compatible as there are no API changes made
-
Add
Ply.Core.Unsafe
to the public API, which allows direct access toTypedScript
. -
Add
Ply.Plutarch.toTypedScript
to obtain aTypedScript
from Plutarch term directly.See README for the motivation.
-
Add
Ply.Core.TypedReader.typedScriptToEnvelope
to obtain aTypedScriptEnvelope
fromTypedScript
. -
Add
PlyArg
andPlyArgOf
instance forPlutusTx.Ratio.Rational
andPlutarch.Extra.PRationalData.PRationalData
.
-
Older GHCs export 'Integer' at "GHC.Num.Integer", but older ones have it at "GHC.Integer.Type". So two GHC version discrepancy between onchain and offchain where one of the typed scripts used integers broke everything.
Ply will now rename the old module (if encountered) to be like the new one.
There is no Script
type in upstream Plutus anymore. As a result, TypedScript
holds the UPLC program itself.
Note that Script
from Plutus was previously only a newtype to the UPLC program anyway.
-
Remove
toValidator
,toMintingPolicy
(Validator
andMintingPolicy
no longer exist in Plutus)Instead,
TypedScript
is now exported as a pattern - extraction of the inner UPLC program is only allowed once all parameters are fully applied. Seeexample/reader-app
Once you have obtained the inner UPLC, you may use it in your own
Validator
/MintingPolicy
types depending on the PAB. -
Remove several
PlyArg
andPlyArgOf
instances (due to corresponding types being removed from upstream Plutus) -
new-ledger-namespace
flag has been removed. Please consider always using the new ledger namespace in all projects.Maintaining compat with the old ledger api, which exports certain types now removed from the newer ledger api, seems not worth the effort.
-
ply-core
andply-plutarch
are no longer built in different cabal environments. Heavy simplifications in haskell.nix and usage of CHaP allows both to be built in the same environment, without jeopardizing downstream projects (in case they still need a repo separation).Thanks to @MangoIV for help with nix!
TypedScriptEnvelope'
is deprecated.TypedScriptEnvelope
now implementstoJSON
andfromJSON
directly.writeEnvelope
andreadEnvelope
are updated to have more sensible types. They will read and write to and fromTypedScriptEnvelope
.mkEnvelope
atPly.Plutarch
will convert Plutarch term intoTypedScriptEnvelope
given config and description.CBORDecodeError
is removed,AesonDecodeError
will be thrown when decoding error happen.- Script serialization utilites are now relocated to
Ply.Core.Serialize.Script
.
-
The constructor indices were incorrect.
Thanks to @danielfarrelly for reporting and fixing the bug.
-
The instance was buggy and did not produce proper UPLC. Any types containing
Credential
(e.gAddress
) may have been affected.Thanks to @rmgaray for reporting the bug.
- Export
ToDataConstraint
andtoBuiltinArgData
.
- Full Plutus V2 support with machinery for distinguishing between V1 and V2 Plutarch scripts.
- Add
getPlutusVersion
- query aTypedScript
for its Plutus version (ScriptV1
orScriptV2
). - Plutarch 1.2 integration
- New flag for
ply-core
:new-ledger-namespace
, turned on by default. See README. writeTypedScript
andtypedWriterInfo
are now parameterized over the Plutarch compiler config.- More documentation in general, please consider checking out the haddocks locally.
- Fix
typeName
generation: this is somewhat of an internal detail and things will just work. But you may consider reading the README section on type name determination in case you're having strange issues during script reading.
Huge thanks to these folks helping me:
- @bladyjoker
- @danielfarrelly
- @MangoIV