plutus icon indicating copy to clipboard operation
plutus copied to clipboard

`serialiseCompiledCode` should be type constrained

Open bezirg opened this issue 1 year ago • 1 comments

Summary

serialiseCompiledCode :: forall a. CompiledCode a -> SerialisedScript takes any a and turns it into a SerialisedScript.

It would be better for the users to constrain this to:

CompiledCode (BuiltinData -> BuiltinData -> BuiltinData ->() ) -> SerialisedScript for V1,V2

and

CompiledCode (BuiltinData -> BuiltinUnit) -> SerialisedScript for V1,V2

for V3.

This needs versioning the SerialisedScript module in the plutus-ledger-api. Also optionally provide an unsafeSerialiseCompiledCode version that behaves with any a

Steps to reproduce the behavior

No response

Actual Result

No response

Expected Result

No response

Describe the approach you would take to fix this

No response

System info

No response

bezirg avatar Jun 04 '24 15:06 bezirg

I believe this is a UX issue and not a bug, hence I'm changing the label.

effectfully avatar Sep 02 '24 22:09 effectfully