IntersectMBO / IntersectMBO/plutus
`serialiseCompiledCode` should be type constrained
- Dominant language
- Haskell
- Stars
- 1.6k
- Forks
- 508
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 22
Description
### 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_
Contributor guide
Research direction
Start by reading the current SerialisedScript module and serialiseCompiledCode in plutus-ledger-api, then trace how V1, V2, and V3 are versioned. Done means the public API enforces the requested CompiledCode types for each version, with the module-versioning and optional unsafe API decisions resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- api, blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100