Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump Plutus library constraints to 1.37 #8

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ply-core/ply-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ common common-deps
, bytestring
, cardano-binary
, containers
, plutus-core
, plutus-ledger-api
, plutus-tx
, plutus-core ^>=1.36
, plutus-ledger-api ^>=1.36
, plutus-tx ^>=1.36
, serialise
, tagged
, text
Expand Down
3 changes: 3 additions & 0 deletions ply-core/src/Ply/Core/Internal/Reify.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ instance ReifyVersion ScriptV1 where
instance ReifyVersion ScriptV2 where
reifyVersion _ = ScriptV2

instance ReifyVersion ScriptV3 where
reifyVersion _ = ScriptV3

instance ReifyRole ValidatorRole where
reifyRole _ = ValidatorRole

Expand Down
3 changes: 2 additions & 1 deletion ply-core/src/Ply/Core/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ data ScriptRole = ValidatorRole | MintingPolicyRole
deriving anyclass (ToJSON, FromJSON)

-- | Version identifier for the Plutus script.
data ScriptVersion = ScriptV1 | ScriptV2
data ScriptVersion = ScriptV1 | ScriptV2 | ScriptV3
deriving stock (Bounded, Enum, Eq, Ord, Show, Generic)
deriving anyclass (ToJSON, FromJSON)

Expand Down Expand Up @@ -100,6 +100,7 @@ instance FromJSON TypedScriptEnvelope where
version = v .: "version" <|> (parseType =<< v .: "type")
parseType "PlutusScriptV1" = pure ScriptV1
parseType "PlutusScriptV2" = pure ScriptV2
parseType "PlutusScriptV3" = pure ScriptV3
parseType s = fail $ s <> " is not a valid ScriptVersion"

parseAndDeserialize v =
Expand Down