{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -fno-specialise #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
module Plutus.V1.Ledger.Scripts(
Script (..),
scriptSize,
fromCompiledCode,
ScriptError (..),
evaluateScript,
runScript,
runMintingPolicyScript,
runStakeValidatorScript,
applyValidator,
applyMintingPolicyScript,
applyStakeValidatorScript,
applyArguments,
mkValidatorScript,
Validator (..),
unValidatorScript,
Redeemer(..),
Datum(..),
mkMintingPolicyScript,
MintingPolicy (..),
unMintingPolicyScript,
mkStakeValidatorScript,
StakeValidator (..),
unStakeValidatorScript,
Context(..),
DatumHash(..),
RedeemerHash(..),
ScriptHash(..),
ValidatorHash(..),
MintingPolicyHash (..),
StakeValidatorHash (..),
unitRedeemer,
unitDatum,
) where
import Prelude qualified as Haskell
import Codec.CBOR.Extras (SerialiseViaFlat (..))
import Codec.Serialise (Serialise, serialise)
import Control.DeepSeq (NFData)
import Control.Lens hiding (Context)
import Control.Monad.Except (MonadError, throwError)
import Data.ByteString.Lazy qualified as BSL
import Data.String
import Data.Text (Text)
import GHC.Generics (Generic)
import Plutus.V1.Ledger.Bytes (LedgerBytes (..))
import PlutusCore qualified as PLC
import PlutusCore.Data qualified as PLC
import PlutusCore.Evaluation.Machine.ExBudget qualified as PLC
import PlutusCore.Evaluation.Machine.Exception (ErrorWithCause (..), EvaluationError (..))
import PlutusCore.MkPlc qualified as PLC
import PlutusTx (CompiledCode, FromData (..), ToData (..), UnsafeFromData (..), getPlc, makeLift)
import PlutusTx.Builtins as Builtins
import PlutusTx.Builtins.Internal as BI
import PlutusTx.Prelude
import Prettyprinter
import Prettyprinter.Extras
import UntypedPlutusCore qualified as UPLC
import UntypedPlutusCore.Check.Scope qualified as UPLC
import UntypedPlutusCore.Evaluation.Machine.Cek qualified as UPLC
newtype Script = Script { Script -> Program DeBruijn DefaultUni DefaultFun ()
unScript :: UPLC.Program UPLC.DeBruijn PLC.DefaultUni PLC.DefaultFun () }
deriving stock ((forall x. Script -> Rep Script x)
-> (forall x. Rep Script x -> Script) -> Generic Script
forall x. Rep Script x -> Script
forall x. Script -> Rep Script x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Script x -> Script
$cfrom :: forall x. Script -> Rep Script x
Generic)
deriving anyclass (Script -> ()
(Script -> ()) -> NFData Script
forall a. (a -> ()) -> NFData a
rnf :: Script -> ()
$crnf :: Script -> ()
NFData)
deriving Decoder s Script
Decoder s [Script]
[Script] -> Encoding
Script -> Encoding
(Script -> Encoding)
-> (forall s. Decoder s Script)
-> ([Script] -> Encoding)
-> (forall s. Decoder s [Script])
-> Serialise Script
forall s. Decoder s [Script]
forall s. Decoder s Script
forall a.
(a -> Encoding)
-> (forall s. Decoder s a)
-> ([a] -> Encoding)
-> (forall s. Decoder s [a])
-> Serialise a
decodeList :: Decoder s [Script]
$cdecodeList :: forall s. Decoder s [Script]
encodeList :: [Script] -> Encoding
$cencodeList :: [Script] -> Encoding
decode :: Decoder s Script
$cdecode :: forall s. Decoder s Script
encode :: Script -> Encoding
$cencode :: Script -> Encoding
Serialise via (SerialiseViaFlat (UPLC.Program UPLC.DeBruijn PLC.DefaultUni PLC.DefaultFun ()))
instance Haskell.Eq Script where
Script
a == :: Script -> Script -> Bool
== Script
b = ByteString -> BuiltinByteString
forall a arep. ToBuiltin a arep => a -> arep
Builtins.toBuiltin (ByteString -> ByteString
BSL.toStrict (Script -> ByteString
forall a. Serialise a => a -> ByteString
serialise Script
a)) BuiltinByteString -> BuiltinByteString -> Bool
forall a. Eq a => a -> a -> Bool
== ByteString -> BuiltinByteString
forall a arep. ToBuiltin a arep => a -> arep
Builtins.toBuiltin (ByteString -> ByteString
BSL.toStrict (Script -> ByteString
forall a. Serialise a => a -> ByteString
serialise Script
b))
instance Haskell.Ord Script where
Script
a compare :: Script -> Script -> Ordering
`compare` Script
b = ByteString -> BuiltinByteString
forall a arep. ToBuiltin a arep => a -> arep
Builtins.toBuiltin (ByteString -> ByteString
BSL.toStrict (Script -> ByteString
forall a. Serialise a => a -> ByteString
serialise Script
a)) BuiltinByteString -> BuiltinByteString -> Ordering
forall a. Ord a => a -> a -> Ordering
`compare` ByteString -> BuiltinByteString
forall a arep. ToBuiltin a arep => a -> arep
Builtins.toBuiltin (ByteString -> ByteString
BSL.toStrict (Script -> ByteString
forall a. Serialise a => a -> ByteString
serialise Script
b))
instance Haskell.Show Script where
showsPrec :: Int -> Script -> ShowS
showsPrec Int
_ Script
_ = String -> ShowS
Haskell.showString String
"<Script>"
scriptSize :: Script -> Integer
scriptSize :: Script -> Integer
scriptSize (Script Program DeBruijn DefaultUni DefaultFun ()
s) = Program DeBruijn DefaultUni DefaultFun () -> Integer
forall name (uni :: * -> *) fun ann.
Program name uni fun ann -> Integer
UPLC.programSize Program DeBruijn DefaultUni DefaultFun ()
s
fromCompiledCode :: CompiledCode a -> Script
fromCompiledCode :: CompiledCode a -> Script
fromCompiledCode = Program DeBruijn DefaultUni DefaultFun () -> Script
Script (Program DeBruijn DefaultUni DefaultFun () -> Script)
-> (CompiledCode a -> Program DeBruijn DefaultUni DefaultFun ())
-> CompiledCode a
-> Script
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Program NamedDeBruijn DefaultUni DefaultFun ()
-> Program DeBruijn DefaultUni DefaultFun ()
toNameless (Program NamedDeBruijn DefaultUni DefaultFun ()
-> Program DeBruijn DefaultUni DefaultFun ())
-> (CompiledCode a
-> Program NamedDeBruijn DefaultUni DefaultFun ())
-> CompiledCode a
-> Program DeBruijn DefaultUni DefaultFun ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CompiledCode a -> Program NamedDeBruijn DefaultUni DefaultFun ()
forall (uni :: * -> *) fun a.
(Closed uni, Everywhere uni Flat, Flat fun,
Everywhere uni PrettyConst, GShow uni, Pretty fun) =>
CompiledCodeIn uni fun a -> Program NamedDeBruijn uni fun ()
getPlc
where
toNameless :: UPLC.Program UPLC.NamedDeBruijn PLC.DefaultUni PLC.DefaultFun ()
-> UPLC.Program UPLC.DeBruijn PLC.DefaultUni PLC.DefaultFun ()
toNameless :: Program NamedDeBruijn DefaultUni DefaultFun ()
-> Program DeBruijn DefaultUni DefaultFun ()
toNameless = ASetter
(Program NamedDeBruijn DefaultUni DefaultFun ())
(Program DeBruijn DefaultUni DefaultFun ())
(Term NamedDeBruijn DefaultUni DefaultFun ())
(Term DeBruijn DefaultUni DefaultFun ())
-> (Term NamedDeBruijn DefaultUni DefaultFun ()
-> Term DeBruijn DefaultUni DefaultFun ())
-> Program NamedDeBruijn DefaultUni DefaultFun ()
-> Program DeBruijn DefaultUni DefaultFun ()
forall s t a b. ASetter s t a b -> (a -> b) -> s -> t
over ASetter
(Program NamedDeBruijn DefaultUni DefaultFun ())
(Program DeBruijn DefaultUni DefaultFun ())
(Term NamedDeBruijn DefaultUni DefaultFun ())
(Term DeBruijn DefaultUni DefaultFun ())
forall name1 (uni1 :: * -> *) fun1 ann name2 (uni2 :: * -> *) fun2.
Lens
(Program name1 uni1 fun1 ann)
(Program name2 uni2 fun2 ann)
(Term name1 uni1 fun1 ann)
(Term name2 uni2 fun2 ann)
UPLC.progTerm ((Term NamedDeBruijn DefaultUni DefaultFun ()
-> Term DeBruijn DefaultUni DefaultFun ())
-> Program NamedDeBruijn DefaultUni DefaultFun ()
-> Program DeBruijn DefaultUni DefaultFun ())
-> (Term NamedDeBruijn DefaultUni DefaultFun ()
-> Term DeBruijn DefaultUni DefaultFun ())
-> Program NamedDeBruijn DefaultUni DefaultFun ()
-> Program DeBruijn DefaultUni DefaultFun ()
forall a b. (a -> b) -> a -> b
$ (NamedDeBruijn -> DeBruijn)
-> Term NamedDeBruijn DefaultUni DefaultFun ()
-> Term DeBruijn DefaultUni DefaultFun ()
forall name name' (uni :: * -> *) fun ann.
(name -> name') -> Term name uni fun ann -> Term name' uni fun ann
UPLC.termMapNames NamedDeBruijn -> DeBruijn
UPLC.unNameDeBruijn
data ScriptError =
EvaluationError [Text] Haskell.String
| EvaluationException Haskell.String Haskell.String
deriving stock (Int -> ScriptError -> ShowS
[ScriptError] -> ShowS
ScriptError -> String
(Int -> ScriptError -> ShowS)
-> (ScriptError -> String)
-> ([ScriptError] -> ShowS)
-> Show ScriptError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScriptError] -> ShowS
$cshowList :: [ScriptError] -> ShowS
show :: ScriptError -> String
$cshow :: ScriptError -> String
showsPrec :: Int -> ScriptError -> ShowS
$cshowsPrec :: Int -> ScriptError -> ShowS
Haskell.Show, ScriptError -> ScriptError -> Bool
(ScriptError -> ScriptError -> Bool)
-> (ScriptError -> ScriptError -> Bool) -> Eq ScriptError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScriptError -> ScriptError -> Bool
$c/= :: ScriptError -> ScriptError -> Bool
== :: ScriptError -> ScriptError -> Bool
$c== :: ScriptError -> ScriptError -> Bool
Haskell.Eq, (forall x. ScriptError -> Rep ScriptError x)
-> (forall x. Rep ScriptError x -> ScriptError)
-> Generic ScriptError
forall x. Rep ScriptError x -> ScriptError
forall x. ScriptError -> Rep ScriptError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ScriptError x -> ScriptError
$cfrom :: forall x. ScriptError -> Rep ScriptError x
Generic)
deriving anyclass (ScriptError -> ()
(ScriptError -> ()) -> NFData ScriptError
forall a. (a -> ()) -> NFData a
rnf :: ScriptError -> ()
$crnf :: ScriptError -> ()
NFData)
applyArguments :: Script -> [PLC.Data] -> Script
applyArguments :: Script -> [Data] -> Script
applyArguments (Script Program DeBruijn DefaultUni DefaultFun ()
p) [Data]
args =
let termArgs :: [Term DeBruijn DefaultUni DefaultFun ()]
termArgs = (Data -> Term DeBruijn DefaultUni DefaultFun ())
-> [Data] -> [Term DeBruijn DefaultUni DefaultFun ()]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Haskell.fmap (() -> Data -> Term DeBruijn DefaultUni DefaultFun ()
forall a (uni :: * -> *) fun (term :: * -> *) tyname name ann.
(TermLike term tyname name uni fun, Includes uni a) =>
ann -> a -> term ann
PLC.mkConstant ()) [Data]
args
applied :: Term DeBruijn DefaultUni DefaultFun ()
-> Term DeBruijn DefaultUni DefaultFun ()
applied Term DeBruijn DefaultUni DefaultFun ()
t = ()
-> Term DeBruijn DefaultUni DefaultFun ()
-> [Term DeBruijn DefaultUni DefaultFun ()]
-> Term DeBruijn DefaultUni DefaultFun ()
forall (term :: * -> *) tyname name (uni :: * -> *) fun ann.
TermLike term tyname name uni fun =>
ann -> term ann -> [term ann] -> term ann
PLC.mkIterApp () Term DeBruijn DefaultUni DefaultFun ()
t [Term DeBruijn DefaultUni DefaultFun ()]
termArgs
in Program DeBruijn DefaultUni DefaultFun () -> Script
Script (Program DeBruijn DefaultUni DefaultFun () -> Script)
-> Program DeBruijn DefaultUni DefaultFun () -> Script
forall a b. (a -> b) -> a -> b
$ ASetter
(Program DeBruijn DefaultUni DefaultFun ())
(Program DeBruijn DefaultUni DefaultFun ())
(Term DeBruijn DefaultUni DefaultFun ())
(Term DeBruijn DefaultUni DefaultFun ())
-> (Term DeBruijn DefaultUni DefaultFun ()
-> Term DeBruijn DefaultUni DefaultFun ())
-> Program DeBruijn DefaultUni DefaultFun ()
-> Program DeBruijn DefaultUni DefaultFun ()
forall s t a b. ASetter s t a b -> (a -> b) -> s -> t
over ASetter
(Program DeBruijn DefaultUni DefaultFun ())
(Program DeBruijn DefaultUni DefaultFun ())
(Term DeBruijn DefaultUni DefaultFun ())
(Term DeBruijn DefaultUni DefaultFun ())
forall name1 (uni1 :: * -> *) fun1 ann name2 (uni2 :: * -> *) fun2.
Lens
(Program name1 uni1 fun1 ann)
(Program name2 uni2 fun2 ann)
(Term name1 uni1 fun1 ann)
(Term name2 uni2 fun2 ann)
UPLC.progTerm Term DeBruijn DefaultUni DefaultFun ()
-> Term DeBruijn DefaultUni DefaultFun ()
forall tyname name (uni :: * -> *) fun.
TermLike
(Term DeBruijn DefaultUni DefaultFun) tyname name uni fun =>
Term DeBruijn DefaultUni DefaultFun ()
-> Term DeBruijn DefaultUni DefaultFun ()
applied Program DeBruijn DefaultUni DefaultFun ()
p
evaluateScript :: forall m . (MonadError ScriptError m) => Script -> m (PLC.ExBudget, [Text])
evaluateScript :: Script -> m (ExBudget, [Text])
evaluateScript Script
s =
let namedT :: Term NamedDeBruijn DefaultUni DefaultFun ()
namedT = (DeBruijn -> NamedDeBruijn)
-> Term DeBruijn DefaultUni DefaultFun ()
-> Term NamedDeBruijn DefaultUni DefaultFun ()
forall name name' (uni :: * -> *) fun ann.
(name -> name') -> Term name uni fun ann -> Term name' uni fun ann
UPLC.termMapNames DeBruijn -> NamedDeBruijn
UPLC.fakeNameDeBruijn (Term DeBruijn DefaultUni DefaultFun ()
-> Term NamedDeBruijn DefaultUni DefaultFun ())
-> Term DeBruijn DefaultUni DefaultFun ()
-> Term NamedDeBruijn DefaultUni DefaultFun ()
forall a b. (a -> b) -> a -> b
$ Program DeBruijn DefaultUni DefaultFun ()
-> Term DeBruijn DefaultUni DefaultFun ()
forall name (uni :: * -> *) fun ann.
Program name uni fun ann -> Term name uni fun ann
UPLC._progTerm (Program DeBruijn DefaultUni DefaultFun ()
-> Term DeBruijn DefaultUni DefaultFun ())
-> Program DeBruijn DefaultUni DefaultFun ()
-> Term DeBruijn DefaultUni DefaultFun ()
forall a b. (a -> b) -> a -> b
$ Script -> Program DeBruijn DefaultUni DefaultFun ()
unScript Script
s
in case Term NamedDeBruijn DefaultUni DefaultFun ()
-> Either FreeVariableError ()
forall e (m :: * -> *) name (uni :: * -> *) fun a.
(HasIndex name, MonadError e m, AsFreeVariableError e) =>
Term name uni fun a -> m ()
UPLC.checkScope @UPLC.FreeVariableError Term NamedDeBruijn DefaultUni DefaultFun ()
namedT of
Left FreeVariableError
fvError -> ScriptError -> m (ExBudget, [Text])
forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError (ScriptError -> m (ExBudget, [Text]))
-> ScriptError -> m (ExBudget, [Text])
forall a b. (a -> b) -> a -> b
$ [Text] -> String -> ScriptError
EvaluationError [] (String
"FreeVariableFailure of" String -> ShowS
forall a. [a] -> [a] -> [a]
++ FreeVariableError -> String
forall a. Show a => a -> String
Haskell.show FreeVariableError
fvError)
Either FreeVariableError ()
_ -> let (Either
(CekEvaluationException NamedDeBruijn DefaultUni DefaultFun)
(Term NamedDeBruijn DefaultUni DefaultFun ())
result, UPLC.TallyingSt CekExTally DefaultFun
_ ExBudget
budget, [Text]
logOut) = MachineParameters CekMachineCosts CekValue DefaultUni DefaultFun
-> ExBudgetMode (TallyingSt DefaultFun) DefaultUni DefaultFun
-> EmitterMode DefaultUni DefaultFun
-> Term NamedDeBruijn DefaultUni DefaultFun ()
-> (Either
(CekEvaluationException NamedDeBruijn DefaultUni DefaultFun)
(Term NamedDeBruijn DefaultUni DefaultFun ()),
TallyingSt DefaultFun, [Text])
forall (uni :: * -> *) fun cost.
(Everywhere uni ExMemoryUsage, Ix fun, PrettyUni uni fun) =>
MachineParameters CekMachineCosts CekValue uni fun
-> ExBudgetMode cost uni fun
-> EmitterMode uni fun
-> Term NamedDeBruijn uni fun ()
-> (Either
(CekEvaluationException NamedDeBruijn uni fun)
(Term NamedDeBruijn uni fun ()),
cost, [Text])
UPLC.runCekDeBruijn MachineParameters CekMachineCosts CekValue DefaultUni DefaultFun
PLC.defaultCekParameters ExBudgetMode (TallyingSt DefaultFun) DefaultUni DefaultFun
forall fun (uni :: * -> *).
(Eq fun, Hashable fun) =>
ExBudgetMode (TallyingSt fun) uni fun
UPLC.tallying EmitterMode DefaultUni DefaultFun
forall (uni :: * -> *) fun. EmitterMode uni fun
UPLC.logEmitter Term NamedDeBruijn DefaultUni DefaultFun ()
namedT
in case Either
(CekEvaluationException NamedDeBruijn DefaultUni DefaultFun)
(Term NamedDeBruijn DefaultUni DefaultFun ())
result of
Right Term NamedDeBruijn DefaultUni DefaultFun ()
_ -> (ExBudget, [Text]) -> m (ExBudget, [Text])
forall (f :: * -> *) a. Applicative f => a -> f a
Haskell.pure (ExBudget
budget, [Text]
logOut)
Left errWithCause :: CekEvaluationException NamedDeBruijn DefaultUni DefaultFun
errWithCause@(ErrorWithCause EvaluationError CekUserError (MachineError DefaultFun)
err Maybe (Term NamedDeBruijn DefaultUni DefaultFun ())
cause) -> ScriptError -> m (ExBudget, [Text])
forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError (ScriptError -> m (ExBudget, [Text]))
-> ScriptError -> m (ExBudget, [Text])
forall a b. (a -> b) -> a -> b
$ case EvaluationError CekUserError (MachineError DefaultFun)
err of
InternalEvaluationError MachineError DefaultFun
internalEvalError -> String -> String -> ScriptError
EvaluationException (CekEvaluationException NamedDeBruijn DefaultUni DefaultFun
-> String
forall a. Show a => a -> String
Haskell.show CekEvaluationException NamedDeBruijn DefaultUni DefaultFun
errWithCause) (MachineError DefaultFun -> String
forall a. Show a => a -> String
PLC.show MachineError DefaultFun
internalEvalError)
UserEvaluationError CekUserError
evalError -> [Text] -> String -> ScriptError
EvaluationError [Text]
logOut (CekUserError
-> Maybe (Term NamedDeBruijn DefaultUni DefaultFun ()) -> String
mkError CekUserError
evalError Maybe (Term NamedDeBruijn DefaultUni DefaultFun ())
cause)
mkError :: UPLC.CekUserError -> Maybe (UPLC.Term UPLC.NamedDeBruijn PLC.DefaultUni PLC.DefaultFun ()) -> String
mkError :: CekUserError
-> Maybe (Term NamedDeBruijn DefaultUni DefaultFun ()) -> String
mkError CekUserError
evalError Maybe (Term NamedDeBruijn DefaultUni DefaultFun ())
Nothing = CekUserError -> String
forall a. Show a => a -> String
PLC.show CekUserError
evalError
mkError CekUserError
evalError (Just Term NamedDeBruijn DefaultUni DefaultFun ()
t) =
case Term NamedDeBruijn DefaultUni DefaultFun () -> Maybe DefaultFun
findBuiltin Term NamedDeBruijn DefaultUni DefaultFun ()
t of
Just DefaultFun
b -> String
"BuiltinEvaluationFailure of " String -> ShowS
forall a. [a] -> [a] -> [a]
++ DefaultFun -> String
forall a. Show a => a -> String
Haskell.show DefaultFun
b
Maybe DefaultFun
Nothing -> CekUserError -> String
forall a. Show a => a -> String
PLC.show CekUserError
evalError
where
findBuiltin :: UPLC.Term UPLC.NamedDeBruijn PLC.DefaultUni PLC.DefaultFun () -> Maybe PLC.DefaultFun
findBuiltin :: Term NamedDeBruijn DefaultUni DefaultFun () -> Maybe DefaultFun
findBuiltin Term NamedDeBruijn DefaultUni DefaultFun ()
t = case Term NamedDeBruijn DefaultUni DefaultFun ()
t of
UPLC.Apply ()
_ Term NamedDeBruijn DefaultUni DefaultFun ()
t Term NamedDeBruijn DefaultUni DefaultFun ()
_ -> Term NamedDeBruijn DefaultUni DefaultFun () -> Maybe DefaultFun
findBuiltin Term NamedDeBruijn DefaultUni DefaultFun ()
t
UPLC.Builtin ()
_ DefaultFun
fun -> DefaultFun -> Maybe DefaultFun
forall a. a -> Maybe a
Just DefaultFun
fun
UPLC.Force ()
_ Term NamedDeBruijn DefaultUni DefaultFun ()
t -> Term NamedDeBruijn DefaultUni DefaultFun () -> Maybe DefaultFun
findBuiltin Term NamedDeBruijn DefaultUni DefaultFun ()
t
UPLC.Delay ()
_ Term NamedDeBruijn DefaultUni DefaultFun ()
t -> Term NamedDeBruijn DefaultUni DefaultFun () -> Maybe DefaultFun
findBuiltin Term NamedDeBruijn DefaultUni DefaultFun ()
t
UPLC.LamAbs ()
_ NamedDeBruijn
_ Term NamedDeBruijn DefaultUni DefaultFun ()
t -> Term NamedDeBruijn DefaultUni DefaultFun () -> Maybe DefaultFun
findBuiltin Term NamedDeBruijn DefaultUni DefaultFun ()
t
UPLC.Var ()
_ NamedDeBruijn
_ -> Maybe DefaultFun
forall a. Maybe a
Nothing
UPLC.Constant ()
_ Some (ValueOf DefaultUni)
_ -> Maybe DefaultFun
forall a. Maybe a
Nothing
UPLC.Error ()
_ -> Maybe DefaultFun
forall a. Maybe a
Nothing
mkValidatorScript :: CompiledCode (BuiltinData -> BuiltinData -> BuiltinData -> ()) -> Validator
mkValidatorScript :: CompiledCode (BuiltinData -> BuiltinData -> BuiltinData -> ())
-> Validator
mkValidatorScript = Script -> Validator
Validator (Script -> Validator)
-> (CompiledCode (BuiltinData -> BuiltinData -> BuiltinData -> ())
-> Script)
-> CompiledCode (BuiltinData -> BuiltinData -> BuiltinData -> ())
-> Validator
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CompiledCode (BuiltinData -> BuiltinData -> BuiltinData -> ())
-> Script
forall a. CompiledCode a -> Script
fromCompiledCode
unValidatorScript :: Validator -> Script
unValidatorScript :: Validator -> Script
unValidatorScript = Validator -> Script
getValidator
mkMintingPolicyScript :: CompiledCode (BuiltinData -> BuiltinData -> ()) -> MintingPolicy
mkMintingPolicyScript :: CompiledCode (BuiltinData -> BuiltinData -> ()) -> MintingPolicy
mkMintingPolicyScript = Script -> MintingPolicy
MintingPolicy (Script -> MintingPolicy)
-> (CompiledCode (BuiltinData -> BuiltinData -> ()) -> Script)
-> CompiledCode (BuiltinData -> BuiltinData -> ())
-> MintingPolicy
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CompiledCode (BuiltinData -> BuiltinData -> ()) -> Script
forall a. CompiledCode a -> Script
fromCompiledCode
unMintingPolicyScript :: MintingPolicy -> Script
unMintingPolicyScript :: MintingPolicy -> Script
unMintingPolicyScript = MintingPolicy -> Script
getMintingPolicy
mkStakeValidatorScript :: CompiledCode (BuiltinData -> BuiltinData -> ()) -> StakeValidator
mkStakeValidatorScript :: CompiledCode (BuiltinData -> BuiltinData -> ()) -> StakeValidator
mkStakeValidatorScript = Script -> StakeValidator
StakeValidator (Script -> StakeValidator)
-> (CompiledCode (BuiltinData -> BuiltinData -> ()) -> Script)
-> CompiledCode (BuiltinData -> BuiltinData -> ())
-> StakeValidator
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CompiledCode (BuiltinData -> BuiltinData -> ()) -> Script
forall a. CompiledCode a -> Script
fromCompiledCode
unStakeValidatorScript :: StakeValidator -> Script
unStakeValidatorScript :: StakeValidator -> Script
unStakeValidatorScript = StakeValidator -> Script
getStakeValidator
newtype Validator = Validator { Validator -> Script
getValidator :: Script }
deriving stock ((forall x. Validator -> Rep Validator x)
-> (forall x. Rep Validator x -> Validator) -> Generic Validator
forall x. Rep Validator x -> Validator
forall x. Validator -> Rep Validator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Validator x -> Validator
$cfrom :: forall x. Validator -> Rep Validator x
Generic)
deriving newtype (Validator -> Validator -> Bool
(Validator -> Validator -> Bool)
-> (Validator -> Validator -> Bool) -> Eq Validator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Validator -> Validator -> Bool
$c/= :: Validator -> Validator -> Bool
== :: Validator -> Validator -> Bool
$c== :: Validator -> Validator -> Bool
Haskell.Eq, Eq Validator
Eq Validator
-> (Validator -> Validator -> Ordering)
-> (Validator -> Validator -> Bool)
-> (Validator -> Validator -> Bool)
-> (Validator -> Validator -> Bool)
-> (Validator -> Validator -> Bool)
-> (Validator -> Validator -> Validator)
-> (Validator -> Validator -> Validator)
-> Ord Validator
Validator -> Validator -> Bool
Validator -> Validator -> Ordering
Validator -> Validator -> Validator
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Validator -> Validator -> Validator
$cmin :: Validator -> Validator -> Validator
max :: Validator -> Validator -> Validator
$cmax :: Validator -> Validator -> Validator
>= :: Validator -> Validator -> Bool
$c>= :: Validator -> Validator -> Bool
> :: Validator -> Validator -> Bool
$c> :: Validator -> Validator -> Bool
<= :: Validator -> Validator -> Bool
$c<= :: Validator -> Validator -> Bool
< :: Validator -> Validator -> Bool
$c< :: Validator -> Validator -> Bool
compare :: Validator -> Validator -> Ordering
$ccompare :: Validator -> Validator -> Ordering
$cp1Ord :: Eq Validator
Haskell.Ord, Decoder s Validator
Decoder s [Validator]
[Validator] -> Encoding
Validator -> Encoding
(Validator -> Encoding)
-> (forall s. Decoder s Validator)
-> ([Validator] -> Encoding)
-> (forall s. Decoder s [Validator])
-> Serialise Validator
forall s. Decoder s [Validator]
forall s. Decoder s Validator
forall a.
(a -> Encoding)
-> (forall s. Decoder s a)
-> ([a] -> Encoding)
-> (forall s. Decoder s [a])
-> Serialise a
decodeList :: Decoder s [Validator]
$cdecodeList :: forall s. Decoder s [Validator]
encodeList :: [Validator] -> Encoding
$cencodeList :: [Validator] -> Encoding
decode :: Decoder s Validator
$cdecode :: forall s. Decoder s Validator
encode :: Validator -> Encoding
$cencode :: Validator -> Encoding
Serialise)
deriving anyclass (Validator -> ()
(Validator -> ()) -> NFData Validator
forall a. (a -> ()) -> NFData a
rnf :: Validator -> ()
$crnf :: Validator -> ()
NFData)
deriving [Validator] -> Doc ann
Validator -> Doc ann
(forall ann. Validator -> Doc ann)
-> (forall ann. [Validator] -> Doc ann) -> Pretty Validator
forall ann. [Validator] -> Doc ann
forall ann. Validator -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: [Validator] -> Doc ann
$cprettyList :: forall ann. [Validator] -> Doc ann
pretty :: Validator -> Doc ann
$cpretty :: forall ann. Validator -> Doc ann
Pretty via (PrettyShow Validator)
instance Haskell.Show Validator where
show :: Validator -> String
show = String -> Validator -> String
forall a b. a -> b -> a
const String
"Validator { <script> }"
newtype Datum = Datum { Datum -> BuiltinData
getDatum :: BuiltinData }
deriving stock ((forall x. Datum -> Rep Datum x)
-> (forall x. Rep Datum x -> Datum) -> Generic Datum
forall x. Rep Datum x -> Datum
forall x. Datum -> Rep Datum x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Datum x -> Datum
$cfrom :: forall x. Datum -> Rep Datum x
Generic, Int -> Datum -> ShowS
[Datum] -> ShowS
Datum -> String
(Int -> Datum -> ShowS)
-> (Datum -> String) -> ([Datum] -> ShowS) -> Show Datum
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Datum] -> ShowS
$cshowList :: [Datum] -> ShowS
show :: Datum -> String
$cshow :: Datum -> String
showsPrec :: Int -> Datum -> ShowS
$cshowsPrec :: Int -> Datum -> ShowS
Haskell.Show)
deriving newtype (Datum -> Datum -> Bool
(Datum -> Datum -> Bool) -> (Datum -> Datum -> Bool) -> Eq Datum
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Datum -> Datum -> Bool
$c/= :: Datum -> Datum -> Bool
== :: Datum -> Datum -> Bool
$c== :: Datum -> Datum -> Bool
Haskell.Eq, Eq Datum
Eq Datum
-> (Datum -> Datum -> Ordering)
-> (Datum -> Datum -> Bool)
-> (Datum -> Datum -> Bool)
-> (Datum -> Datum -> Bool)
-> (Datum -> Datum -> Bool)
-> (Datum -> Datum -> Datum)
-> (Datum -> Datum -> Datum)
-> Ord Datum
Datum -> Datum -> Bool
Datum -> Datum -> Ordering
Datum -> Datum -> Datum
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Datum -> Datum -> Datum
$cmin :: Datum -> Datum -> Datum
max :: Datum -> Datum -> Datum
$cmax :: Datum -> Datum -> Datum
>= :: Datum -> Datum -> Bool
$c>= :: Datum -> Datum -> Bool
> :: Datum -> Datum -> Bool
$c> :: Datum -> Datum -> Bool
<= :: Datum -> Datum -> Bool
$c<= :: Datum -> Datum -> Bool
< :: Datum -> Datum -> Bool
$c< :: Datum -> Datum -> Bool
compare :: Datum -> Datum -> Ordering
$ccompare :: Datum -> Datum -> Ordering
$cp1Ord :: Eq Datum
Haskell.Ord, Datum -> Datum -> Bool
(Datum -> Datum -> Bool) -> Eq Datum
forall a. (a -> a -> Bool) -> Eq a
== :: Datum -> Datum -> Bool
$c== :: Datum -> Datum -> Bool
Eq, Datum -> BuiltinData
(Datum -> BuiltinData) -> ToData Datum
forall a. (a -> BuiltinData) -> ToData a
toBuiltinData :: Datum -> BuiltinData
$ctoBuiltinData :: Datum -> BuiltinData
ToData, BuiltinData -> Maybe Datum
(BuiltinData -> Maybe Datum) -> FromData Datum
forall a. (BuiltinData -> Maybe a) -> FromData a
fromBuiltinData :: BuiltinData -> Maybe Datum
$cfromBuiltinData :: BuiltinData -> Maybe Datum
FromData, BuiltinData -> Datum
(BuiltinData -> Datum) -> UnsafeFromData Datum
forall a. (BuiltinData -> a) -> UnsafeFromData a
unsafeFromBuiltinData :: BuiltinData -> Datum
$cunsafeFromBuiltinData :: BuiltinData -> Datum
UnsafeFromData, [Datum] -> Doc ann
Datum -> Doc ann
(forall ann. Datum -> Doc ann)
-> (forall ann. [Datum] -> Doc ann) -> Pretty Datum
forall ann. [Datum] -> Doc ann
forall ann. Datum -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: [Datum] -> Doc ann
$cprettyList :: forall ann. [Datum] -> Doc ann
pretty :: Datum -> Doc ann
$cpretty :: forall ann. Datum -> Doc ann
Pretty)
deriving anyclass (Datum -> ()
(Datum -> ()) -> NFData Datum
forall a. (a -> ()) -> NFData a
rnf :: Datum -> ()
$crnf :: Datum -> ()
NFData)
newtype Redeemer = Redeemer { Redeemer -> BuiltinData
getRedeemer :: BuiltinData }
deriving stock ((forall x. Redeemer -> Rep Redeemer x)
-> (forall x. Rep Redeemer x -> Redeemer) -> Generic Redeemer
forall x. Rep Redeemer x -> Redeemer
forall x. Redeemer -> Rep Redeemer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Redeemer x -> Redeemer
$cfrom :: forall x. Redeemer -> Rep Redeemer x
Generic, Int -> Redeemer -> ShowS
[Redeemer] -> ShowS
Redeemer -> String
(Int -> Redeemer -> ShowS)
-> (Redeemer -> String) -> ([Redeemer] -> ShowS) -> Show Redeemer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Redeemer] -> ShowS
$cshowList :: [Redeemer] -> ShowS
show :: Redeemer -> String
$cshow :: Redeemer -> String
showsPrec :: Int -> Redeemer -> ShowS
$cshowsPrec :: Int -> Redeemer -> ShowS
Haskell.Show)
deriving newtype (Redeemer -> Redeemer -> Bool
(Redeemer -> Redeemer -> Bool)
-> (Redeemer -> Redeemer -> Bool) -> Eq Redeemer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Redeemer -> Redeemer -> Bool
$c/= :: Redeemer -> Redeemer -> Bool
== :: Redeemer -> Redeemer -> Bool
$c== :: Redeemer -> Redeemer -> Bool
Haskell.Eq, Eq Redeemer
Eq Redeemer
-> (Redeemer -> Redeemer -> Ordering)
-> (Redeemer -> Redeemer -> Bool)
-> (Redeemer -> Redeemer -> Bool)
-> (Redeemer -> Redeemer -> Bool)
-> (Redeemer -> Redeemer -> Bool)
-> (Redeemer -> Redeemer -> Redeemer)
-> (Redeemer -> Redeemer -> Redeemer)
-> Ord Redeemer
Redeemer -> Redeemer -> Bool
Redeemer -> Redeemer -> Ordering
Redeemer -> Redeemer -> Redeemer
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Redeemer -> Redeemer -> Redeemer
$cmin :: Redeemer -> Redeemer -> Redeemer
max :: Redeemer -> Redeemer -> Redeemer
$cmax :: Redeemer -> Redeemer -> Redeemer
>= :: Redeemer -> Redeemer -> Bool
$c>= :: Redeemer -> Redeemer -> Bool
> :: Redeemer -> Redeemer -> Bool
$c> :: Redeemer -> Redeemer -> Bool
<= :: Redeemer -> Redeemer -> Bool
$c<= :: Redeemer -> Redeemer -> Bool
< :: Redeemer -> Redeemer -> Bool
$c< :: Redeemer -> Redeemer -> Bool
compare :: Redeemer -> Redeemer -> Ordering
$ccompare :: Redeemer -> Redeemer -> Ordering
$cp1Ord :: Eq Redeemer
Haskell.Ord, Redeemer -> Redeemer -> Bool
(Redeemer -> Redeemer -> Bool) -> Eq Redeemer
forall a. (a -> a -> Bool) -> Eq a
== :: Redeemer -> Redeemer -> Bool
$c== :: Redeemer -> Redeemer -> Bool
Eq, Redeemer -> BuiltinData
(Redeemer -> BuiltinData) -> ToData Redeemer
forall a. (a -> BuiltinData) -> ToData a
toBuiltinData :: Redeemer -> BuiltinData
$ctoBuiltinData :: Redeemer -> BuiltinData
ToData, BuiltinData -> Maybe Redeemer
(BuiltinData -> Maybe Redeemer) -> FromData Redeemer
forall a. (BuiltinData -> Maybe a) -> FromData a
fromBuiltinData :: BuiltinData -> Maybe Redeemer
$cfromBuiltinData :: BuiltinData -> Maybe Redeemer
FromData, BuiltinData -> Redeemer
(BuiltinData -> Redeemer) -> UnsafeFromData Redeemer
forall a. (BuiltinData -> a) -> UnsafeFromData a
unsafeFromBuiltinData :: BuiltinData -> Redeemer
$cunsafeFromBuiltinData :: BuiltinData -> Redeemer
UnsafeFromData, [Redeemer] -> Doc ann
Redeemer -> Doc ann
(forall ann. Redeemer -> Doc ann)
-> (forall ann. [Redeemer] -> Doc ann) -> Pretty Redeemer
forall ann. [Redeemer] -> Doc ann
forall ann. Redeemer -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: [Redeemer] -> Doc ann
$cprettyList :: forall ann. [Redeemer] -> Doc ann
pretty :: Redeemer -> Doc ann
$cpretty :: forall ann. Redeemer -> Doc ann
Pretty)
deriving anyclass (Redeemer -> ()
(Redeemer -> ()) -> NFData Redeemer
forall a. (a -> ()) -> NFData a
rnf :: Redeemer -> ()
$crnf :: Redeemer -> ()
NFData)
newtype MintingPolicy = MintingPolicy { MintingPolicy -> Script
getMintingPolicy :: Script }
deriving stock ((forall x. MintingPolicy -> Rep MintingPolicy x)
-> (forall x. Rep MintingPolicy x -> MintingPolicy)
-> Generic MintingPolicy
forall x. Rep MintingPolicy x -> MintingPolicy
forall x. MintingPolicy -> Rep MintingPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MintingPolicy x -> MintingPolicy
$cfrom :: forall x. MintingPolicy -> Rep MintingPolicy x
Generic)
deriving newtype (MintingPolicy -> MintingPolicy -> Bool
(MintingPolicy -> MintingPolicy -> Bool)
-> (MintingPolicy -> MintingPolicy -> Bool) -> Eq MintingPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MintingPolicy -> MintingPolicy -> Bool
$c/= :: MintingPolicy -> MintingPolicy -> Bool
== :: MintingPolicy -> MintingPolicy -> Bool
$c== :: MintingPolicy -> MintingPolicy -> Bool
Haskell.Eq, Eq MintingPolicy
Eq MintingPolicy
-> (MintingPolicy -> MintingPolicy -> Ordering)
-> (MintingPolicy -> MintingPolicy -> Bool)
-> (MintingPolicy -> MintingPolicy -> Bool)
-> (MintingPolicy -> MintingPolicy -> Bool)
-> (MintingPolicy -> MintingPolicy -> Bool)
-> (MintingPolicy -> MintingPolicy -> MintingPolicy)
-> (MintingPolicy -> MintingPolicy -> MintingPolicy)
-> Ord MintingPolicy
MintingPolicy -> MintingPolicy -> Bool
MintingPolicy -> MintingPolicy -> Ordering
MintingPolicy -> MintingPolicy -> MintingPolicy
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: MintingPolicy -> MintingPolicy -> MintingPolicy
$cmin :: MintingPolicy -> MintingPolicy -> MintingPolicy
max :: MintingPolicy -> MintingPolicy -> MintingPolicy
$cmax :: MintingPolicy -> MintingPolicy -> MintingPolicy
>= :: MintingPolicy -> MintingPolicy -> Bool
$c>= :: MintingPolicy -> MintingPolicy -> Bool
> :: MintingPolicy -> MintingPolicy -> Bool
$c> :: MintingPolicy -> MintingPolicy -> Bool
<= :: MintingPolicy -> MintingPolicy -> Bool
$c<= :: MintingPolicy -> MintingPolicy -> Bool
< :: MintingPolicy -> MintingPolicy -> Bool
$c< :: MintingPolicy -> MintingPolicy -> Bool
compare :: MintingPolicy -> MintingPolicy -> Ordering
$ccompare :: MintingPolicy -> MintingPolicy -> Ordering
$cp1Ord :: Eq MintingPolicy
Haskell.Ord, Decoder s MintingPolicy
Decoder s [MintingPolicy]
[MintingPolicy] -> Encoding
MintingPolicy -> Encoding
(MintingPolicy -> Encoding)
-> (forall s. Decoder s MintingPolicy)
-> ([MintingPolicy] -> Encoding)
-> (forall s. Decoder s [MintingPolicy])
-> Serialise MintingPolicy
forall s. Decoder s [MintingPolicy]
forall s. Decoder s MintingPolicy
forall a.
(a -> Encoding)
-> (forall s. Decoder s a)
-> ([a] -> Encoding)
-> (forall s. Decoder s [a])
-> Serialise a
decodeList :: Decoder s [MintingPolicy]
$cdecodeList :: forall s. Decoder s [MintingPolicy]
encodeList :: [MintingPolicy] -> Encoding
$cencodeList :: [MintingPolicy] -> Encoding
decode :: Decoder s MintingPolicy
$cdecode :: forall s. Decoder s MintingPolicy
encode :: MintingPolicy -> Encoding
$cencode :: MintingPolicy -> Encoding
Serialise)
deriving anyclass (MintingPolicy -> ()
(MintingPolicy -> ()) -> NFData MintingPolicy
forall a. (a -> ()) -> NFData a
rnf :: MintingPolicy -> ()
$crnf :: MintingPolicy -> ()
NFData)
deriving [MintingPolicy] -> Doc ann
MintingPolicy -> Doc ann
(forall ann. MintingPolicy -> Doc ann)
-> (forall ann. [MintingPolicy] -> Doc ann) -> Pretty MintingPolicy
forall ann. [MintingPolicy] -> Doc ann
forall ann. MintingPolicy -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: [MintingPolicy] -> Doc ann
$cprettyList :: forall ann. [MintingPolicy] -> Doc ann
pretty :: MintingPolicy -> Doc ann
$cpretty :: forall ann. MintingPolicy -> Doc ann
Pretty via (PrettyShow MintingPolicy)
instance Haskell.Show MintingPolicy where
show :: MintingPolicy -> String
show = String -> MintingPolicy -> String
forall a b. a -> b -> a
const String
"MintingPolicy { <script> }"
newtype StakeValidator = StakeValidator { StakeValidator -> Script
getStakeValidator :: Script }
deriving stock ((forall x. StakeValidator -> Rep StakeValidator x)
-> (forall x. Rep StakeValidator x -> StakeValidator)
-> Generic StakeValidator
forall x. Rep StakeValidator x -> StakeValidator
forall x. StakeValidator -> Rep StakeValidator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StakeValidator x -> StakeValidator
$cfrom :: forall x. StakeValidator -> Rep StakeValidator x
Generic)
deriving newtype (StakeValidator -> StakeValidator -> Bool
(StakeValidator -> StakeValidator -> Bool)
-> (StakeValidator -> StakeValidator -> Bool) -> Eq StakeValidator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StakeValidator -> StakeValidator -> Bool
$c/= :: StakeValidator -> StakeValidator -> Bool
== :: StakeValidator -> StakeValidator -> Bool
$c== :: StakeValidator -> StakeValidator -> Bool
Haskell.Eq, Eq StakeValidator
Eq StakeValidator
-> (StakeValidator -> StakeValidator -> Ordering)
-> (StakeValidator -> StakeValidator -> Bool)
-> (StakeValidator -> StakeValidator -> Bool)
-> (StakeValidator -> StakeValidator -> Bool)
-> (StakeValidator -> StakeValidator -> Bool)
-> (StakeValidator -> StakeValidator -> StakeValidator)
-> (StakeValidator -> StakeValidator -> StakeValidator)
-> Ord StakeValidator
StakeValidator -> StakeValidator -> Bool
StakeValidator -> StakeValidator -> Ordering
StakeValidator -> StakeValidator -> StakeValidator
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: StakeValidator -> StakeValidator -> StakeValidator
$cmin :: StakeValidator -> StakeValidator -> StakeValidator
max :: StakeValidator -> StakeValidator -> StakeValidator
$cmax :: StakeValidator -> StakeValidator -> StakeValidator
>= :: StakeValidator -> StakeValidator -> Bool
$c>= :: StakeValidator -> StakeValidator -> Bool
> :: StakeValidator -> StakeValidator -> Bool
$c> :: StakeValidator -> StakeValidator -> Bool
<= :: StakeValidator -> StakeValidator -> Bool
$c<= :: StakeValidator -> StakeValidator -> Bool
< :: StakeValidator -> StakeValidator -> Bool
$c< :: StakeValidator -> StakeValidator -> Bool
compare :: StakeValidator -> StakeValidator -> Ordering
$ccompare :: StakeValidator -> StakeValidator -> Ordering
$cp1Ord :: Eq StakeValidator
Haskell.Ord, Decoder s StakeValidator
Decoder s [StakeValidator]
[StakeValidator] -> Encoding
StakeValidator -> Encoding
(StakeValidator -> Encoding)
-> (forall s. Decoder s StakeValidator)
-> ([StakeValidator] -> Encoding)
-> (forall s. Decoder s [StakeValidator])
-> Serialise StakeValidator
forall s. Decoder s [StakeValidator]
forall s. Decoder s StakeValidator
forall a.
(a -> Encoding)
-> (forall s. Decoder s a)
-> ([a] -> Encoding)
-> (forall s. Decoder s [a])
-> Serialise a
decodeList :: Decoder s [StakeValidator]
$cdecodeList :: forall s. Decoder s [StakeValidator]
encodeList :: [StakeValidator] -> Encoding
$cencodeList :: [StakeValidator] -> Encoding
decode :: Decoder s StakeValidator
$cdecode :: forall s. Decoder s StakeValidator
encode :: StakeValidator -> Encoding
$cencode :: StakeValidator -> Encoding
Serialise)
deriving anyclass (StakeValidator -> ()
(StakeValidator -> ()) -> NFData StakeValidator
forall a. (a -> ()) -> NFData a
rnf :: StakeValidator -> ()
$crnf :: StakeValidator -> ()
NFData)
deriving [StakeValidator] -> Doc ann
StakeValidator -> Doc ann
(forall ann. StakeValidator -> Doc ann)
-> (forall ann. [StakeValidator] -> Doc ann)
-> Pretty StakeValidator
forall ann. [StakeValidator] -> Doc ann
forall ann. StakeValidator -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: [StakeValidator] -> Doc ann
$cprettyList :: forall ann. [StakeValidator] -> Doc ann
pretty :: StakeValidator -> Doc ann
$cpretty :: forall ann. StakeValidator -> Doc ann
Pretty via (PrettyShow MintingPolicy)
instance Haskell.Show StakeValidator where
show :: StakeValidator -> String
show = String -> StakeValidator -> String
forall a b. a -> b -> a
const String
"StakeValidator { <script> }"
newtype ScriptHash =
ScriptHash { ScriptHash -> BuiltinByteString
getScriptHash :: Builtins.BuiltinByteString }
deriving (String -> ScriptHash
(String -> ScriptHash) -> IsString ScriptHash
forall a. (String -> a) -> IsString a
fromString :: String -> ScriptHash
$cfromString :: String -> ScriptHash
IsString, Int -> ScriptHash -> ShowS
[ScriptHash] -> ShowS
ScriptHash -> String
(Int -> ScriptHash -> ShowS)
-> (ScriptHash -> String)
-> ([ScriptHash] -> ShowS)
-> Show ScriptHash
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScriptHash] -> ShowS
$cshowList :: [ScriptHash] -> ShowS
show :: ScriptHash -> String
$cshow :: ScriptHash -> String
showsPrec :: Int -> ScriptHash -> ShowS
$cshowsPrec :: Int -> ScriptHash -> ShowS
Haskell.Show, [ScriptHash] -> Doc ann
ScriptHash -> Doc ann
(forall ann. ScriptHash -> Doc ann)
-> (forall ann. [ScriptHash] -> Doc ann) -> Pretty ScriptHash
forall ann. [ScriptHash] -> Doc ann
forall ann. ScriptHash -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: [ScriptHash] -> Doc ann
$cprettyList :: forall ann. [ScriptHash] -> Doc ann
pretty :: ScriptHash -> Doc ann
$cpretty :: forall ann. ScriptHash -> Doc ann
Pretty) via LedgerBytes
deriving stock ((forall x. ScriptHash -> Rep ScriptHash x)
-> (forall x. Rep ScriptHash x -> ScriptHash) -> Generic ScriptHash
forall x. Rep ScriptHash x -> ScriptHash
forall x. ScriptHash -> Rep ScriptHash x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ScriptHash x -> ScriptHash
$cfrom :: forall x. ScriptHash -> Rep ScriptHash x
Generic)
deriving newtype (ScriptHash -> ScriptHash -> Bool
(ScriptHash -> ScriptHash -> Bool)
-> (ScriptHash -> ScriptHash -> Bool) -> Eq ScriptHash
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScriptHash -> ScriptHash -> Bool
$c/= :: ScriptHash -> ScriptHash -> Bool
== :: ScriptHash -> ScriptHash -> Bool
$c== :: ScriptHash -> ScriptHash -> Bool
Haskell.Eq, Eq ScriptHash
Eq ScriptHash
-> (ScriptHash -> ScriptHash -> Ordering)
-> (ScriptHash -> ScriptHash -> Bool)
-> (ScriptHash -> ScriptHash -> Bool)
-> (ScriptHash -> ScriptHash -> Bool)
-> (ScriptHash -> ScriptHash -> Bool)
-> (ScriptHash -> ScriptHash -> ScriptHash)
-> (ScriptHash -> ScriptHash -> ScriptHash)
-> Ord ScriptHash
ScriptHash -> ScriptHash -> Bool
ScriptHash -> ScriptHash -> Ordering
ScriptHash -> ScriptHash -> ScriptHash
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ScriptHash -> ScriptHash -> ScriptHash
$cmin :: ScriptHash -> ScriptHash -> ScriptHash
max :: ScriptHash -> ScriptHash -> ScriptHash
$cmax :: ScriptHash -> ScriptHash -> ScriptHash
>= :: ScriptHash -> ScriptHash -> Bool
$c>= :: ScriptHash -> ScriptHash -> Bool
> :: ScriptHash -> ScriptHash -> Bool
$c> :: ScriptHash -> ScriptHash -> Bool
<= :: ScriptHash -> ScriptHash -> Bool
$c<= :: ScriptHash -> ScriptHash -> Bool
< :: ScriptHash -> ScriptHash -> Bool
$c< :: ScriptHash -> ScriptHash -> Bool
compare :: ScriptHash -> ScriptHash -> Ordering
$ccompare :: ScriptHash -> ScriptHash -> Ordering
$cp1Ord :: Eq ScriptHash
Haskell.Ord, ScriptHash -> ScriptHash -> Bool
(ScriptHash -> ScriptHash -> Bool) -> Eq ScriptHash
forall a. (a -> a -> Bool) -> Eq a
== :: ScriptHash -> ScriptHash -> Bool
$c== :: ScriptHash -> ScriptHash -> Bool
Eq, Eq ScriptHash
Eq ScriptHash
-> (ScriptHash -> ScriptHash -> Ordering)
-> (ScriptHash -> ScriptHash -> Bool)
-> (ScriptHash -> ScriptHash -> Bool)
-> (ScriptHash -> ScriptHash -> Bool)
-> (ScriptHash -> ScriptHash -> Bool)
-> (ScriptHash -> ScriptHash -> ScriptHash)
-> (ScriptHash -> ScriptHash -> ScriptHash)
-> Ord ScriptHash
ScriptHash -> ScriptHash -> Bool
ScriptHash -> ScriptHash -> Ordering
ScriptHash -> ScriptHash -> ScriptHash
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ScriptHash -> ScriptHash -> ScriptHash
$cmin :: ScriptHash -> ScriptHash -> ScriptHash
max :: ScriptHash -> ScriptHash -> ScriptHash
$cmax :: ScriptHash -> ScriptHash -> ScriptHash
>= :: ScriptHash -> ScriptHash -> Bool
$c>= :: ScriptHash -> ScriptHash -> Bool
> :: ScriptHash -> ScriptHash -> Bool
$c> :: ScriptHash -> ScriptHash -> Bool
<= :: ScriptHash -> ScriptHash -> Bool
$c<= :: ScriptHash -> ScriptHash -> Bool
< :: ScriptHash -> ScriptHash -> Bool
$c< :: ScriptHash -> ScriptHash -> Bool
compare :: ScriptHash -> ScriptHash -> Ordering
$ccompare :: ScriptHash -> ScriptHash -> Ordering
$cp1Ord :: Eq ScriptHash
Ord, ScriptHash -> BuiltinData
(ScriptHash -> BuiltinData) -> ToData ScriptHash
forall a. (a -> BuiltinData) -> ToData a
toBuiltinData :: ScriptHash -> BuiltinData
$ctoBuiltinData :: ScriptHash -> BuiltinData
ToData, BuiltinData -> Maybe ScriptHash
(BuiltinData -> Maybe ScriptHash) -> FromData ScriptHash
forall a. (BuiltinData -> Maybe a) -> FromData a
fromBuiltinData :: BuiltinData -> Maybe ScriptHash
$cfromBuiltinData :: BuiltinData -> Maybe ScriptHash
FromData, BuiltinData -> ScriptHash
(BuiltinData -> ScriptHash) -> UnsafeFromData ScriptHash
forall a. (BuiltinData -> a) -> UnsafeFromData a
unsafeFromBuiltinData :: BuiltinData -> ScriptHash
$cunsafeFromBuiltinData :: BuiltinData -> ScriptHash
UnsafeFromData)
deriving anyclass (ScriptHash -> ()
(ScriptHash -> ()) -> NFData ScriptHash
forall a. (a -> ()) -> NFData a
rnf :: ScriptHash -> ()
$crnf :: ScriptHash -> ()
NFData)
newtype ValidatorHash =
ValidatorHash Builtins.BuiltinByteString
deriving (String -> ValidatorHash
(String -> ValidatorHash) -> IsString ValidatorHash
forall a. (String -> a) -> IsString a
fromString :: String -> ValidatorHash
$cfromString :: String -> ValidatorHash
IsString, Int -> ValidatorHash -> ShowS
[ValidatorHash] -> ShowS
ValidatorHash -> String
(Int -> ValidatorHash -> ShowS)
-> (ValidatorHash -> String)
-> ([ValidatorHash] -> ShowS)
-> Show ValidatorHash
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ValidatorHash] -> ShowS
$cshowList :: [ValidatorHash] -> ShowS
show :: ValidatorHash -> String
$cshow :: ValidatorHash -> String
showsPrec :: Int -> ValidatorHash -> ShowS
$cshowsPrec :: Int -> ValidatorHash -> ShowS
Haskell.Show, [ValidatorHash] -> Doc ann
ValidatorHash -> Doc ann
(forall ann. ValidatorHash -> Doc ann)
-> (forall ann. [ValidatorHash] -> Doc ann) -> Pretty ValidatorHash
forall ann. [ValidatorHash] -> Doc ann
forall ann. ValidatorHash -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: [ValidatorHash] -> Doc ann
$cprettyList :: forall ann. [ValidatorHash] -> Doc ann
pretty :: ValidatorHash -> Doc ann
$cpretty :: forall ann. ValidatorHash -> Doc ann
Pretty) via LedgerBytes
deriving stock ((forall x. ValidatorHash -> Rep ValidatorHash x)
-> (forall x. Rep ValidatorHash x -> ValidatorHash)
-> Generic ValidatorHash
forall x. Rep ValidatorHash x -> ValidatorHash
forall x. ValidatorHash -> Rep ValidatorHash x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ValidatorHash x -> ValidatorHash
$cfrom :: forall x. ValidatorHash -> Rep ValidatorHash x
Generic)
deriving newtype (ValidatorHash -> ValidatorHash -> Bool
(ValidatorHash -> ValidatorHash -> Bool)
-> (ValidatorHash -> ValidatorHash -> Bool) -> Eq ValidatorHash
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ValidatorHash -> ValidatorHash -> Bool
$c/= :: ValidatorHash -> ValidatorHash -> Bool
== :: ValidatorHash -> ValidatorHash -> Bool
$c== :: ValidatorHash -> ValidatorHash -> Bool
Haskell.Eq, Eq ValidatorHash
Eq ValidatorHash
-> (ValidatorHash -> ValidatorHash -> Ordering)
-> (ValidatorHash -> ValidatorHash -> Bool)
-> (ValidatorHash -> ValidatorHash -> Bool)
-> (ValidatorHash -> ValidatorHash -> Bool)
-> (ValidatorHash -> ValidatorHash -> Bool)
-> (ValidatorHash -> ValidatorHash -> ValidatorHash)
-> (ValidatorHash -> ValidatorHash -> ValidatorHash)
-> Ord ValidatorHash
ValidatorHash -> ValidatorHash -> Bool
ValidatorHash -> ValidatorHash -> Ordering
ValidatorHash -> ValidatorHash -> ValidatorHash
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ValidatorHash -> ValidatorHash -> ValidatorHash
$cmin :: ValidatorHash -> ValidatorHash -> ValidatorHash
max :: ValidatorHash -> ValidatorHash -> ValidatorHash
$cmax :: ValidatorHash -> ValidatorHash -> ValidatorHash
>= :: ValidatorHash -> ValidatorHash -> Bool
$c>= :: ValidatorHash -> ValidatorHash -> Bool
> :: ValidatorHash -> ValidatorHash -> Bool
$c> :: ValidatorHash -> ValidatorHash -> Bool
<= :: ValidatorHash -> ValidatorHash -> Bool
$c<= :: ValidatorHash -> ValidatorHash -> Bool
< :: ValidatorHash -> ValidatorHash -> Bool
$c< :: ValidatorHash -> ValidatorHash -> Bool
compare :: ValidatorHash -> ValidatorHash -> Ordering
$ccompare :: ValidatorHash -> ValidatorHash -> Ordering
$cp1Ord :: Eq ValidatorHash
Haskell.Ord, ValidatorHash -> ValidatorHash -> Bool
(ValidatorHash -> ValidatorHash -> Bool) -> Eq ValidatorHash
forall a. (a -> a -> Bool) -> Eq a
== :: ValidatorHash -> ValidatorHash -> Bool
$c== :: ValidatorHash -> ValidatorHash -> Bool
Eq, Eq ValidatorHash
Eq ValidatorHash
-> (ValidatorHash -> ValidatorHash -> Ordering)
-> (ValidatorHash -> ValidatorHash -> Bool)
-> (ValidatorHash -> ValidatorHash -> Bool)
-> (ValidatorHash -> ValidatorHash -> Bool)
-> (ValidatorHash -> ValidatorHash -> Bool)
-> (ValidatorHash -> ValidatorHash -> ValidatorHash)
-> (ValidatorHash -> ValidatorHash -> ValidatorHash)
-> Ord ValidatorHash
ValidatorHash -> ValidatorHash -> Bool
ValidatorHash -> ValidatorHash -> Ordering
ValidatorHash -> ValidatorHash -> ValidatorHash
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: ValidatorHash -> ValidatorHash -> ValidatorHash
$cmin :: ValidatorHash -> ValidatorHash -> ValidatorHash
max :: ValidatorHash -> ValidatorHash -> ValidatorHash
$cmax :: ValidatorHash -> ValidatorHash -> ValidatorHash
>= :: ValidatorHash -> ValidatorHash -> Bool
$c>= :: ValidatorHash -> ValidatorHash -> Bool
> :: ValidatorHash -> ValidatorHash -> Bool
$c> :: ValidatorHash -> ValidatorHash -> Bool
<= :: ValidatorHash -> ValidatorHash -> Bool
$c<= :: ValidatorHash -> ValidatorHash -> Bool
< :: ValidatorHash -> ValidatorHash -> Bool
$c< :: ValidatorHash -> ValidatorHash -> Bool
compare :: ValidatorHash -> ValidatorHash -> Ordering
$ccompare :: ValidatorHash -> ValidatorHash -> Ordering
$cp1Ord :: Eq ValidatorHash
Ord, ValidatorHash -> BuiltinData
(ValidatorHash -> BuiltinData) -> ToData ValidatorHash
forall a. (a -> BuiltinData) -> ToData a
toBuiltinData :: ValidatorHash -> BuiltinData
$ctoBuiltinData :: ValidatorHash -> BuiltinData
ToData, BuiltinData -> Maybe ValidatorHash
(BuiltinData -> Maybe ValidatorHash) -> FromData ValidatorHash
forall a. (BuiltinData -> Maybe a) -> FromData a
fromBuiltinData :: BuiltinData -> Maybe ValidatorHash
$cfromBuiltinData :: BuiltinData -> Maybe ValidatorHash
FromData, BuiltinData -> ValidatorHash
(BuiltinData -> ValidatorHash) -> UnsafeFromData ValidatorHash
forall a. (BuiltinData -> a) -> UnsafeFromData a
unsafeFromBuiltinData :: BuiltinData -> ValidatorHash
$cunsafeFromBuiltinData :: BuiltinData -> ValidatorHash
UnsafeFromData)
deriving anyclass (ValidatorHash -> ()
(ValidatorHash -> ()) -> NFData ValidatorHash
forall a. (a -> ()) -> NFData a
rnf :: ValidatorHash -> ()
$crnf :: ValidatorHash -> ()
NFData)
newtype DatumHash =
DatumHash Builtins.BuiltinByteString
deriving (String -> DatumHash
(String -> DatumHash) -> IsString DatumHash
forall a. (String -> a) -> IsString a
fromString :: String -> DatumHash
$cfromString :: String -> DatumHash
IsString, Int -> DatumHash -> ShowS
[DatumHash] -> ShowS
DatumHash -> String
(Int -> DatumHash -> ShowS)
-> (DatumHash -> String)
-> ([DatumHash] -> ShowS)
-> Show DatumHash
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DatumHash] -> ShowS
$cshowList :: [DatumHash] -> ShowS
show :: DatumHash -> String
$cshow :: DatumHash -> String
showsPrec :: Int -> DatumHash -> ShowS
$cshowsPrec :: Int -> DatumHash -> ShowS
Haskell.Show, [DatumHash] -> Doc ann
DatumHash -> Doc ann
(forall ann. DatumHash -> Doc ann)
-> (forall ann. [DatumHash] -> Doc ann) -> Pretty DatumHash
forall ann. [DatumHash] -> Doc ann
forall ann. DatumHash -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: [DatumHash] -> Doc ann
$cprettyList :: forall ann. [DatumHash] -> Doc ann
pretty :: DatumHash -> Doc ann
$cpretty :: forall ann. DatumHash -> Doc ann
Pretty) via LedgerBytes
deriving stock ((forall x. DatumHash -> Rep DatumHash x)
-> (forall x. Rep DatumHash x -> DatumHash) -> Generic DatumHash
forall x. Rep DatumHash x -> DatumHash
forall x. DatumHash -> Rep DatumHash x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DatumHash x -> DatumHash
$cfrom :: forall x. DatumHash -> Rep DatumHash x
Generic)
deriving newtype (DatumHash -> DatumHash -> Bool
(DatumHash -> DatumHash -> Bool)
-> (DatumHash -> DatumHash -> Bool) -> Eq DatumHash
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DatumHash -> DatumHash -> Bool
$c/= :: DatumHash -> DatumHash -> Bool
== :: DatumHash -> DatumHash -> Bool
$c== :: DatumHash -> DatumHash -> Bool
Haskell.Eq, Eq DatumHash
Eq DatumHash
-> (DatumHash -> DatumHash -> Ordering)
-> (DatumHash -> DatumHash -> Bool)
-> (DatumHash -> DatumHash -> Bool)
-> (DatumHash -> DatumHash -> Bool)
-> (DatumHash -> DatumHash -> Bool)
-> (DatumHash -> DatumHash -> DatumHash)
-> (DatumHash -> DatumHash -> DatumHash)
-> Ord DatumHash
DatumHash -> DatumHash -> Bool
DatumHash -> DatumHash -> Ordering
DatumHash -> DatumHash -> DatumHash
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DatumHash -> DatumHash -> DatumHash
$cmin :: DatumHash -> DatumHash -> DatumHash
max :: DatumHash -> DatumHash -> DatumHash
$cmax :: DatumHash -> DatumHash -> DatumHash
>= :: DatumHash -> DatumHash -> Bool
$c>= :: DatumHash -> DatumHash -> Bool
> :: DatumHash -> DatumHash -> Bool
$c> :: DatumHash -> DatumHash -> Bool
<= :: DatumHash -> DatumHash -> Bool
$c<= :: DatumHash -> DatumHash -> Bool
< :: DatumHash -> DatumHash -> Bool
$c< :: DatumHash -> DatumHash -> Bool
compare :: DatumHash -> DatumHash -> Ordering
$ccompare :: DatumHash -> DatumHash -> Ordering
$cp1Ord :: Eq DatumHash
Haskell.Ord, DatumHash -> DatumHash -> Bool
(DatumHash -> DatumHash -> Bool) -> Eq DatumHash
forall a. (a -> a -> Bool) -> Eq a
== :: DatumHash -> DatumHash -> Bool
$c== :: DatumHash -> DatumHash -> Bool
Eq, Eq DatumHash
Eq DatumHash
-> (DatumHash -> DatumHash -> Ordering)
-> (DatumHash -> DatumHash -> Bool)
-> (DatumHash -> DatumHash -> Bool)
-> (DatumHash -> DatumHash -> Bool)
-> (DatumHash -> DatumHash -> Bool)
-> (DatumHash -> DatumHash -> DatumHash)
-> (DatumHash -> DatumHash -> DatumHash)
-> Ord DatumHash
DatumHash -> DatumHash -> Bool
DatumHash -> DatumHash -> Ordering
DatumHash -> DatumHash -> DatumHash
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DatumHash -> DatumHash -> DatumHash
$cmin :: DatumHash -> DatumHash -> DatumHash
max :: DatumHash -> DatumHash -> DatumHash
$cmax :: DatumHash -> DatumHash -> DatumHash
>= :: DatumHash -> DatumHash -> Bool
$c>= :: DatumHash -> DatumHash -> Bool
> :: DatumHash -> DatumHash -> Bool
$c> :: DatumHash -> DatumHash -> Bool
<= :: DatumHash -> DatumHash -> Bool
$c<= :: DatumHash -> DatumHash -> Bool
< :: DatumHash -> DatumHash -> Bool
$c< :: DatumHash -> DatumHash -> Bool
compare :: DatumHash -> DatumHash -> Ordering
$ccompare :: DatumHash -> DatumHash -> Ordering
$cp1Ord :: Eq DatumHash
Ord, DatumHash -> BuiltinData
(DatumHash -> BuiltinData) -> ToData DatumHash
forall a. (a -> BuiltinData) -> ToData a
toBuiltinData :: DatumHash -> BuiltinData
$ctoBuiltinData :: DatumHash -> BuiltinData
ToData, BuiltinData -> Maybe DatumHash
(BuiltinData -> Maybe DatumHash) -> FromData DatumHash
forall a. (BuiltinData -> Maybe a) -> FromData a
fromBuiltinData :: BuiltinData -> Maybe DatumHash
$cfromBuiltinData :: BuiltinData -> Maybe DatumHash
FromData, BuiltinData -> DatumHash
(BuiltinData -> DatumHash) -> UnsafeFromData DatumHash
forall a. (BuiltinData -> a) -> UnsafeFromData a
unsafeFromBuiltinData :: BuiltinData -> DatumHash
$cunsafeFromBuiltinData :: BuiltinData -> DatumHash
UnsafeFromData)
deriving anyclass (DatumHash -> ()
(DatumHash -> ()) -> NFData DatumHash
forall a. (a -> ()) -> NFData a
rnf :: DatumHash -> ()
$crnf :: DatumHash -> ()
NFData)
newtype RedeemerHash =
RedeemerHash Builtins.BuiltinByteString
deriving (String -> RedeemerHash
(String -> RedeemerHash) -> IsString RedeemerHash
forall a. (String -> a) -> IsString a
fromString :: String -> RedeemerHash
$cfromString :: String -> RedeemerHash
IsString, Int -> RedeemerHash -> ShowS
[RedeemerHash] -> ShowS
RedeemerHash -> String
(Int -> RedeemerHash -> ShowS)
-> (RedeemerHash -> String)
-> ([RedeemerHash] -> ShowS)
-> Show RedeemerHash
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RedeemerHash] -> ShowS
$cshowList :: [RedeemerHash] -> ShowS
show :: RedeemerHash -> String
$cshow :: RedeemerHash -> String
showsPrec :: Int -> RedeemerHash -> ShowS
$cshowsPrec :: Int -> RedeemerHash -> ShowS
Haskell.Show, [RedeemerHash] -> Doc ann
RedeemerHash -> Doc ann
(forall ann. RedeemerHash -> Doc ann)
-> (forall ann. [RedeemerHash] -> Doc ann) -> Pretty RedeemerHash
forall ann. [RedeemerHash] -> Doc ann
forall ann. RedeemerHash -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: [RedeemerHash] -> Doc ann
$cprettyList :: forall ann. [RedeemerHash] -> Doc ann
pretty :: RedeemerHash -> Doc ann
$cpretty :: forall ann. RedeemerHash -> Doc ann
Pretty) via LedgerBytes
deriving stock ((forall x. RedeemerHash -> Rep RedeemerHash x)
-> (forall x. Rep RedeemerHash x -> RedeemerHash)
-> Generic RedeemerHash
forall x. Rep RedeemerHash x -> RedeemerHash
forall x. RedeemerHash -> Rep RedeemerHash x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RedeemerHash x -> RedeemerHash
$cfrom :: forall x. RedeemerHash -> Rep RedeemerHash x
Generic)
deriving newtype (RedeemerHash -> RedeemerHash -> Bool
(RedeemerHash -> RedeemerHash -> Bool)
-> (RedeemerHash -> RedeemerHash -> Bool) -> Eq RedeemerHash
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RedeemerHash -> RedeemerHash -> Bool
$c/= :: RedeemerHash -> RedeemerHash -> Bool
== :: RedeemerHash -> RedeemerHash -> Bool
$c== :: RedeemerHash -> RedeemerHash -> Bool
Haskell.Eq, Eq RedeemerHash
Eq RedeemerHash
-> (RedeemerHash -> RedeemerHash -> Ordering)
-> (RedeemerHash -> RedeemerHash -> Bool)
-> (RedeemerHash -> RedeemerHash -> Bool)
-> (RedeemerHash -> RedeemerHash -> Bool)
-> (RedeemerHash -> RedeemerHash -> Bool)
-> (RedeemerHash -> RedeemerHash -> RedeemerHash)
-> (RedeemerHash -> RedeemerHash -> RedeemerHash)
-> Ord RedeemerHash
RedeemerHash -> RedeemerHash -> Bool
RedeemerHash -> RedeemerHash -> Ordering
RedeemerHash -> RedeemerHash -> RedeemerHash
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: RedeemerHash -> RedeemerHash -> RedeemerHash
$cmin :: RedeemerHash -> RedeemerHash -> RedeemerHash
max :: RedeemerHash -> RedeemerHash -> RedeemerHash
$cmax :: RedeemerHash -> RedeemerHash -> RedeemerHash
>= :: RedeemerHash -> RedeemerHash -> Bool
$c>= :: RedeemerHash -> RedeemerHash -> Bool
> :: RedeemerHash -> RedeemerHash -> Bool
$c> :: RedeemerHash -> RedeemerHash -> Bool
<= :: RedeemerHash -> RedeemerHash -> Bool
$c<= :: RedeemerHash -> RedeemerHash -> Bool
< :: RedeemerHash -> RedeemerHash -> Bool
$c< :: RedeemerHash -> RedeemerHash -> Bool
compare :: RedeemerHash -> RedeemerHash -> Ordering
$ccompare :: RedeemerHash -> RedeemerHash -> Ordering
$cp1Ord :: Eq RedeemerHash
Haskell.Ord, RedeemerHash -> RedeemerHash -> Bool
(RedeemerHash -> RedeemerHash -> Bool) -> Eq RedeemerHash
forall a. (a -> a -> Bool) -> Eq a
== :: RedeemerHash -> RedeemerHash -> Bool
$c== :: RedeemerHash -> RedeemerHash -> Bool
Eq, Eq RedeemerHash
Eq RedeemerHash
-> (RedeemerHash -> RedeemerHash -> Ordering)
-> (RedeemerHash -> RedeemerHash -> Bool)
-> (RedeemerHash -> RedeemerHash -> Bool)
-> (RedeemerHash -> RedeemerHash -> Bool)
-> (RedeemerHash -> RedeemerHash -> Bool)
-> (RedeemerHash -> RedeemerHash -> RedeemerHash)
-> (RedeemerHash -> RedeemerHash -> RedeemerHash)
-> Ord RedeemerHash
RedeemerHash -> RedeemerHash -> Bool
RedeemerHash -> RedeemerHash -> Ordering
RedeemerHash -> RedeemerHash -> RedeemerHash
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: RedeemerHash -> RedeemerHash -> RedeemerHash
$cmin :: RedeemerHash -> RedeemerHash -> RedeemerHash
max :: RedeemerHash -> RedeemerHash -> RedeemerHash
$cmax :: RedeemerHash -> RedeemerHash -> RedeemerHash
>= :: RedeemerHash -> RedeemerHash -> Bool
$c>= :: RedeemerHash -> RedeemerHash -> Bool
> :: RedeemerHash -> RedeemerHash -> Bool
$c> :: RedeemerHash -> RedeemerHash -> Bool
<= :: RedeemerHash -> RedeemerHash -> Bool
$c<= :: RedeemerHash -> RedeemerHash -> Bool
< :: RedeemerHash -> RedeemerHash -> Bool
$c< :: RedeemerHash -> RedeemerHash -> Bool
compare :: RedeemerHash -> RedeemerHash -> Ordering
$ccompare :: RedeemerHash -> RedeemerHash -> Ordering
$cp1Ord :: Eq RedeemerHash
Ord, RedeemerHash -> BuiltinData
(RedeemerHash -> BuiltinData) -> ToData RedeemerHash
forall a. (a -> BuiltinData) -> ToData a
toBuiltinData :: RedeemerHash -> BuiltinData
$ctoBuiltinData :: RedeemerHash -> BuiltinData
ToData, BuiltinData -> Maybe RedeemerHash
(BuiltinData -> Maybe RedeemerHash) -> FromData RedeemerHash
forall a. (BuiltinData -> Maybe a) -> FromData a
fromBuiltinData :: BuiltinData -> Maybe RedeemerHash
$cfromBuiltinData :: BuiltinData -> Maybe RedeemerHash
FromData, BuiltinData -> RedeemerHash
(BuiltinData -> RedeemerHash) -> UnsafeFromData RedeemerHash
forall a. (BuiltinData -> a) -> UnsafeFromData a
unsafeFromBuiltinData :: BuiltinData -> RedeemerHash
$cunsafeFromBuiltinData :: BuiltinData -> RedeemerHash
UnsafeFromData)
deriving anyclass (RedeemerHash -> ()
(RedeemerHash -> ()) -> NFData RedeemerHash
forall a. (a -> ()) -> NFData a
rnf :: RedeemerHash -> ()
$crnf :: RedeemerHash -> ()
NFData)
newtype MintingPolicyHash =
MintingPolicyHash Builtins.BuiltinByteString
deriving (String -> MintingPolicyHash
(String -> MintingPolicyHash) -> IsString MintingPolicyHash
forall a. (String -> a) -> IsString a
fromString :: String -> MintingPolicyHash
$cfromString :: String -> MintingPolicyHash
IsString, Int -> MintingPolicyHash -> ShowS
[MintingPolicyHash] -> ShowS
MintingPolicyHash -> String
(Int -> MintingPolicyHash -> ShowS)
-> (MintingPolicyHash -> String)
-> ([MintingPolicyHash] -> ShowS)
-> Show MintingPolicyHash
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MintingPolicyHash] -> ShowS
$cshowList :: [MintingPolicyHash] -> ShowS
show :: MintingPolicyHash -> String
$cshow :: MintingPolicyHash -> String
showsPrec :: Int -> MintingPolicyHash -> ShowS
$cshowsPrec :: Int -> MintingPolicyHash -> ShowS
Haskell.Show, [MintingPolicyHash] -> Doc ann
MintingPolicyHash -> Doc ann
(forall ann. MintingPolicyHash -> Doc ann)
-> (forall ann. [MintingPolicyHash] -> Doc ann)
-> Pretty MintingPolicyHash
forall ann. [MintingPolicyHash] -> Doc ann
forall ann. MintingPolicyHash -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: [MintingPolicyHash] -> Doc ann
$cprettyList :: forall ann. [MintingPolicyHash] -> Doc ann
pretty :: MintingPolicyHash -> Doc ann
$cpretty :: forall ann. MintingPolicyHash -> Doc ann
Pretty) via LedgerBytes
deriving stock ((forall x. MintingPolicyHash -> Rep MintingPolicyHash x)
-> (forall x. Rep MintingPolicyHash x -> MintingPolicyHash)
-> Generic MintingPolicyHash
forall x. Rep MintingPolicyHash x -> MintingPolicyHash
forall x. MintingPolicyHash -> Rep MintingPolicyHash x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MintingPolicyHash x -> MintingPolicyHash
$cfrom :: forall x. MintingPolicyHash -> Rep MintingPolicyHash x
Generic)
deriving newtype (MintingPolicyHash -> MintingPolicyHash -> Bool
(MintingPolicyHash -> MintingPolicyHash -> Bool)
-> (MintingPolicyHash -> MintingPolicyHash -> Bool)
-> Eq MintingPolicyHash
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MintingPolicyHash -> MintingPolicyHash -> Bool
$c/= :: MintingPolicyHash -> MintingPolicyHash -> Bool
== :: MintingPolicyHash -> MintingPolicyHash -> Bool
$c== :: MintingPolicyHash -> MintingPolicyHash -> Bool
Haskell.Eq, Eq MintingPolicyHash
Eq MintingPolicyHash
-> (MintingPolicyHash -> MintingPolicyHash -> Ordering)
-> (MintingPolicyHash -> MintingPolicyHash -> Bool)
-> (MintingPolicyHash -> MintingPolicyHash -> Bool)
-> (MintingPolicyHash -> MintingPolicyHash -> Bool)
-> (MintingPolicyHash -> MintingPolicyHash -> Bool)
-> (MintingPolicyHash -> MintingPolicyHash -> MintingPolicyHash)
-> (MintingPolicyHash -> MintingPolicyHash -> MintingPolicyHash)
-> Ord MintingPolicyHash
MintingPolicyHash -> MintingPolicyHash -> Bool
MintingPolicyHash -> MintingPolicyHash -> Ordering
MintingPolicyHash -> MintingPolicyHash -> MintingPolicyHash
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: MintingPolicyHash -> MintingPolicyHash -> MintingPolicyHash
$cmin :: MintingPolicyHash -> MintingPolicyHash -> MintingPolicyHash
max :: MintingPolicyHash -> MintingPolicyHash -> MintingPolicyHash
$cmax :: MintingPolicyHash -> MintingPolicyHash -> MintingPolicyHash
>= :: MintingPolicyHash -> MintingPolicyHash -> Bool
$c>= :: MintingPolicyHash -> MintingPolicyHash -> Bool
> :: MintingPolicyHash -> MintingPolicyHash -> Bool
$c> :: MintingPolicyHash -> MintingPolicyHash -> Bool
<= :: MintingPolicyHash -> MintingPolicyHash -> Bool
$c<= :: MintingPolicyHash -> MintingPolicyHash -> Bool
< :: MintingPolicyHash -> MintingPolicyHash -> Bool
$c< :: MintingPolicyHash -> MintingPolicyHash -> Bool
compare :: MintingPolicyHash -> MintingPolicyHash -> Ordering
$ccompare :: MintingPolicyHash -> MintingPolicyHash -> Ordering
$cp1Ord :: Eq MintingPolicyHash
Haskell.Ord, MintingPolicyHash -> MintingPolicyHash -> Bool
(MintingPolicyHash -> MintingPolicyHash -> Bool)
-> Eq MintingPolicyHash
forall a. (a -> a -> Bool) -> Eq a
== :: MintingPolicyHash -> MintingPolicyHash -> Bool
$c== :: MintingPolicyHash -> MintingPolicyHash -> Bool
Eq, Eq MintingPolicyHash
Eq MintingPolicyHash
-> (MintingPolicyHash -> MintingPolicyHash -> Ordering)
-> (MintingPolicyHash -> MintingPolicyHash -> Bool)
-> (MintingPolicyHash -> MintingPolicyHash -> Bool)
-> (MintingPolicyHash -> MintingPolicyHash -> Bool)
-> (MintingPolicyHash -> MintingPolicyHash -> Bool)
-> (MintingPolicyHash -> MintingPolicyHash -> MintingPolicyHash)
-> (MintingPolicyHash -> MintingPolicyHash -> MintingPolicyHash)
-> Ord MintingPolicyHash
MintingPolicyHash -> MintingPolicyHash -> Bool
MintingPolicyHash -> MintingPolicyHash -> Ordering
MintingPolicyHash -> MintingPolicyHash -> MintingPolicyHash
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: MintingPolicyHash -> MintingPolicyHash -> MintingPolicyHash
$cmin :: MintingPolicyHash -> MintingPolicyHash -> MintingPolicyHash
max :: MintingPolicyHash -> MintingPolicyHash -> MintingPolicyHash
$cmax :: MintingPolicyHash -> MintingPolicyHash -> MintingPolicyHash
>= :: MintingPolicyHash -> MintingPolicyHash -> Bool
$c>= :: MintingPolicyHash -> MintingPolicyHash -> Bool
> :: MintingPolicyHash -> MintingPolicyHash -> Bool
$c> :: MintingPolicyHash -> MintingPolicyHash -> Bool
<= :: MintingPolicyHash -> MintingPolicyHash -> Bool
$c<= :: MintingPolicyHash -> MintingPolicyHash -> Bool
< :: MintingPolicyHash -> MintingPolicyHash -> Bool
$c< :: MintingPolicyHash -> MintingPolicyHash -> Bool
compare :: MintingPolicyHash -> MintingPolicyHash -> Ordering
$ccompare :: MintingPolicyHash -> MintingPolicyHash -> Ordering
$cp1Ord :: Eq MintingPolicyHash
Ord, MintingPolicyHash -> BuiltinData
(MintingPolicyHash -> BuiltinData) -> ToData MintingPolicyHash
forall a. (a -> BuiltinData) -> ToData a
toBuiltinData :: MintingPolicyHash -> BuiltinData
$ctoBuiltinData :: MintingPolicyHash -> BuiltinData
ToData, BuiltinData -> Maybe MintingPolicyHash
(BuiltinData -> Maybe MintingPolicyHash)
-> FromData MintingPolicyHash
forall a. (BuiltinData -> Maybe a) -> FromData a
fromBuiltinData :: BuiltinData -> Maybe MintingPolicyHash
$cfromBuiltinData :: BuiltinData -> Maybe MintingPolicyHash
FromData, BuiltinData -> MintingPolicyHash
(BuiltinData -> MintingPolicyHash)
-> UnsafeFromData MintingPolicyHash
forall a. (BuiltinData -> a) -> UnsafeFromData a
unsafeFromBuiltinData :: BuiltinData -> MintingPolicyHash
$cunsafeFromBuiltinData :: BuiltinData -> MintingPolicyHash
UnsafeFromData)
deriving anyclass (MintingPolicyHash -> ()
(MintingPolicyHash -> ()) -> NFData MintingPolicyHash
forall a. (a -> ()) -> NFData a
rnf :: MintingPolicyHash -> ()
$crnf :: MintingPolicyHash -> ()
NFData)
newtype StakeValidatorHash =
StakeValidatorHash Builtins.BuiltinByteString
deriving (String -> StakeValidatorHash
(String -> StakeValidatorHash) -> IsString StakeValidatorHash
forall a. (String -> a) -> IsString a
fromString :: String -> StakeValidatorHash
$cfromString :: String -> StakeValidatorHash
IsString, Int -> StakeValidatorHash -> ShowS
[StakeValidatorHash] -> ShowS
StakeValidatorHash -> String
(Int -> StakeValidatorHash -> ShowS)
-> (StakeValidatorHash -> String)
-> ([StakeValidatorHash] -> ShowS)
-> Show StakeValidatorHash
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StakeValidatorHash] -> ShowS
$cshowList :: [StakeValidatorHash] -> ShowS
show :: StakeValidatorHash -> String
$cshow :: StakeValidatorHash -> String
showsPrec :: Int -> StakeValidatorHash -> ShowS
$cshowsPrec :: Int -> StakeValidatorHash -> ShowS
Haskell.Show, [StakeValidatorHash] -> Doc ann
StakeValidatorHash -> Doc ann
(forall ann. StakeValidatorHash -> Doc ann)
-> (forall ann. [StakeValidatorHash] -> Doc ann)
-> Pretty StakeValidatorHash
forall ann. [StakeValidatorHash] -> Doc ann
forall ann. StakeValidatorHash -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: [StakeValidatorHash] -> Doc ann
$cprettyList :: forall ann. [StakeValidatorHash] -> Doc ann
pretty :: StakeValidatorHash -> Doc ann
$cpretty :: forall ann. StakeValidatorHash -> Doc ann
Pretty) via LedgerBytes
deriving stock ((forall x. StakeValidatorHash -> Rep StakeValidatorHash x)
-> (forall x. Rep StakeValidatorHash x -> StakeValidatorHash)
-> Generic StakeValidatorHash
forall x. Rep StakeValidatorHash x -> StakeValidatorHash
forall x. StakeValidatorHash -> Rep StakeValidatorHash x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StakeValidatorHash x -> StakeValidatorHash
$cfrom :: forall x. StakeValidatorHash -> Rep StakeValidatorHash x
Generic)
deriving newtype (StakeValidatorHash -> StakeValidatorHash -> Bool
(StakeValidatorHash -> StakeValidatorHash -> Bool)
-> (StakeValidatorHash -> StakeValidatorHash -> Bool)
-> Eq StakeValidatorHash
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StakeValidatorHash -> StakeValidatorHash -> Bool
$c/= :: StakeValidatorHash -> StakeValidatorHash -> Bool
== :: StakeValidatorHash -> StakeValidatorHash -> Bool
$c== :: StakeValidatorHash -> StakeValidatorHash -> Bool
Haskell.Eq, Eq StakeValidatorHash
Eq StakeValidatorHash
-> (StakeValidatorHash -> StakeValidatorHash -> Ordering)
-> (StakeValidatorHash -> StakeValidatorHash -> Bool)
-> (StakeValidatorHash -> StakeValidatorHash -> Bool)
-> (StakeValidatorHash -> StakeValidatorHash -> Bool)
-> (StakeValidatorHash -> StakeValidatorHash -> Bool)
-> (StakeValidatorHash -> StakeValidatorHash -> StakeValidatorHash)
-> (StakeValidatorHash -> StakeValidatorHash -> StakeValidatorHash)
-> Ord StakeValidatorHash
StakeValidatorHash -> StakeValidatorHash -> Bool
StakeValidatorHash -> StakeValidatorHash -> Ordering
StakeValidatorHash -> StakeValidatorHash -> StakeValidatorHash
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: StakeValidatorHash -> StakeValidatorHash -> StakeValidatorHash
$cmin :: StakeValidatorHash -> StakeValidatorHash -> StakeValidatorHash
max :: StakeValidatorHash -> StakeValidatorHash -> StakeValidatorHash
$cmax :: StakeValidatorHash -> StakeValidatorHash -> StakeValidatorHash
>= :: StakeValidatorHash -> StakeValidatorHash -> Bool
$c>= :: StakeValidatorHash -> StakeValidatorHash -> Bool
> :: StakeValidatorHash -> StakeValidatorHash -> Bool
$c> :: StakeValidatorHash -> StakeValidatorHash -> Bool
<= :: StakeValidatorHash -> StakeValidatorHash -> Bool
$c<= :: StakeValidatorHash -> StakeValidatorHash -> Bool
< :: StakeValidatorHash -> StakeValidatorHash -> Bool
$c< :: StakeValidatorHash -> StakeValidatorHash -> Bool
compare :: StakeValidatorHash -> StakeValidatorHash -> Ordering
$ccompare :: StakeValidatorHash -> StakeValidatorHash -> Ordering
$cp1Ord :: Eq StakeValidatorHash
Haskell.Ord, StakeValidatorHash -> StakeValidatorHash -> Bool
(StakeValidatorHash -> StakeValidatorHash -> Bool)
-> Eq StakeValidatorHash
forall a. (a -> a -> Bool) -> Eq a
== :: StakeValidatorHash -> StakeValidatorHash -> Bool
$c== :: StakeValidatorHash -> StakeValidatorHash -> Bool
Eq, Eq StakeValidatorHash
Eq StakeValidatorHash
-> (StakeValidatorHash -> StakeValidatorHash -> Ordering)
-> (StakeValidatorHash -> StakeValidatorHash -> Bool)
-> (StakeValidatorHash -> StakeValidatorHash -> Bool)
-> (StakeValidatorHash -> StakeValidatorHash -> Bool)
-> (StakeValidatorHash -> StakeValidatorHash -> Bool)
-> (StakeValidatorHash -> StakeValidatorHash -> StakeValidatorHash)
-> (StakeValidatorHash -> StakeValidatorHash -> StakeValidatorHash)
-> Ord StakeValidatorHash
StakeValidatorHash -> StakeValidatorHash -> Bool
StakeValidatorHash -> StakeValidatorHash -> Ordering
StakeValidatorHash -> StakeValidatorHash -> StakeValidatorHash
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: StakeValidatorHash -> StakeValidatorHash -> StakeValidatorHash
$cmin :: StakeValidatorHash -> StakeValidatorHash -> StakeValidatorHash
max :: StakeValidatorHash -> StakeValidatorHash -> StakeValidatorHash
$cmax :: StakeValidatorHash -> StakeValidatorHash -> StakeValidatorHash
>= :: StakeValidatorHash -> StakeValidatorHash -> Bool
$c>= :: StakeValidatorHash -> StakeValidatorHash -> Bool
> :: StakeValidatorHash -> StakeValidatorHash -> Bool
$c> :: StakeValidatorHash -> StakeValidatorHash -> Bool
<= :: StakeValidatorHash -> StakeValidatorHash -> Bool
$c<= :: StakeValidatorHash -> StakeValidatorHash -> Bool
< :: StakeValidatorHash -> StakeValidatorHash -> Bool
$c< :: StakeValidatorHash -> StakeValidatorHash -> Bool
compare :: StakeValidatorHash -> StakeValidatorHash -> Ordering
$ccompare :: StakeValidatorHash -> StakeValidatorHash -> Ordering
$cp1Ord :: Eq StakeValidatorHash
Ord, StakeValidatorHash -> BuiltinData
(StakeValidatorHash -> BuiltinData) -> ToData StakeValidatorHash
forall a. (a -> BuiltinData) -> ToData a
toBuiltinData :: StakeValidatorHash -> BuiltinData
$ctoBuiltinData :: StakeValidatorHash -> BuiltinData
ToData, BuiltinData -> Maybe StakeValidatorHash
(BuiltinData -> Maybe StakeValidatorHash)
-> FromData StakeValidatorHash
forall a. (BuiltinData -> Maybe a) -> FromData a
fromBuiltinData :: BuiltinData -> Maybe StakeValidatorHash
$cfromBuiltinData :: BuiltinData -> Maybe StakeValidatorHash
FromData, BuiltinData -> StakeValidatorHash
(BuiltinData -> StakeValidatorHash)
-> UnsafeFromData StakeValidatorHash
forall a. (BuiltinData -> a) -> UnsafeFromData a
unsafeFromBuiltinData :: BuiltinData -> StakeValidatorHash
$cunsafeFromBuiltinData :: BuiltinData -> StakeValidatorHash
UnsafeFromData)
deriving anyclass (StakeValidatorHash -> ()
(StakeValidatorHash -> ()) -> NFData StakeValidatorHash
forall a. (a -> ()) -> NFData a
rnf :: StakeValidatorHash -> ()
$crnf :: StakeValidatorHash -> ()
NFData)
newtype Context = Context BuiltinData
deriving newtype ([Context] -> Doc ann
Context -> Doc ann
(forall ann. Context -> Doc ann)
-> (forall ann. [Context] -> Doc ann) -> Pretty Context
forall ann. [Context] -> Doc ann
forall ann. Context -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: [Context] -> Doc ann
$cprettyList :: forall ann. [Context] -> Doc ann
pretty :: Context -> Doc ann
$cpretty :: forall ann. Context -> Doc ann
Pretty, Int -> Context -> ShowS
[Context] -> ShowS
Context -> String
(Int -> Context -> ShowS)
-> (Context -> String) -> ([Context] -> ShowS) -> Show Context
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Context] -> ShowS
$cshowList :: [Context] -> ShowS
show :: Context -> String
$cshow :: Context -> String
showsPrec :: Int -> Context -> ShowS
$cshowsPrec :: Int -> Context -> ShowS
Haskell.Show)
applyValidator
:: Context
-> Validator
-> Datum
-> Redeemer
-> Script
applyValidator :: Context -> Validator -> Datum -> Redeemer -> Script
applyValidator (Context (BuiltinData Data
valData)) (Validator Script
validator) (Datum (BuiltinData Data
datum)) (Redeemer (BuiltinData Data
redeemer)) =
Script -> [Data] -> Script
applyArguments Script
validator [Data
datum, Data
redeemer, Data
valData]
runScript
:: (MonadError ScriptError m)
=> Context
-> Validator
-> Datum
-> Redeemer
-> m (PLC.ExBudget, [Text])
runScript :: Context -> Validator -> Datum -> Redeemer -> m (ExBudget, [Text])
runScript Context
context Validator
validator Datum
datum Redeemer
redeemer =
Script -> m (ExBudget, [Text])
forall (m :: * -> *).
MonadError ScriptError m =>
Script -> m (ExBudget, [Text])
evaluateScript (Context -> Validator -> Datum -> Redeemer -> Script
applyValidator Context
context Validator
validator Datum
datum Redeemer
redeemer)
applyMintingPolicyScript
:: Context
-> MintingPolicy
-> Redeemer
-> Script
applyMintingPolicyScript :: Context -> MintingPolicy -> Redeemer -> Script
applyMintingPolicyScript (Context (BuiltinData Data
valData)) (MintingPolicy Script
validator) (Redeemer (BuiltinData Data
red)) =
Script -> [Data] -> Script
applyArguments Script
validator [Data
red, Data
valData]
runMintingPolicyScript
:: (MonadError ScriptError m)
=> Context
-> MintingPolicy
-> Redeemer
-> m (PLC.ExBudget, [Text])
runMintingPolicyScript :: Context -> MintingPolicy -> Redeemer -> m (ExBudget, [Text])
runMintingPolicyScript Context
context MintingPolicy
mps Redeemer
red =
Script -> m (ExBudget, [Text])
forall (m :: * -> *).
MonadError ScriptError m =>
Script -> m (ExBudget, [Text])
evaluateScript (Context -> MintingPolicy -> Redeemer -> Script
applyMintingPolicyScript Context
context MintingPolicy
mps Redeemer
red)
applyStakeValidatorScript
:: Context
-> StakeValidator
-> Redeemer
-> Script
applyStakeValidatorScript :: Context -> StakeValidator -> Redeemer -> Script
applyStakeValidatorScript (Context (BuiltinData Data
valData)) (StakeValidator Script
validator) (Redeemer (BuiltinData Data
red)) =
Script -> [Data] -> Script
applyArguments Script
validator [Data
red, Data
valData]
runStakeValidatorScript
:: (MonadError ScriptError m)
=> Context
-> StakeValidator
-> Redeemer
-> m (PLC.ExBudget, [Text])
runStakeValidatorScript :: Context -> StakeValidator -> Redeemer -> m (ExBudget, [Text])
runStakeValidatorScript Context
context StakeValidator
wps Redeemer
red =
Script -> m (ExBudget, [Text])
forall (m :: * -> *).
MonadError ScriptError m =>
Script -> m (ExBudget, [Text])
evaluateScript (Context -> StakeValidator -> Redeemer -> Script
applyStakeValidatorScript Context
context StakeValidator
wps Redeemer
red)
unitDatum :: Datum
unitDatum :: Datum
unitDatum = BuiltinData -> Datum
Datum (BuiltinData -> Datum) -> BuiltinData -> Datum
forall a b. (a -> b) -> a -> b
$ () -> BuiltinData
forall a. ToData a => a -> BuiltinData
toBuiltinData ()
unitRedeemer :: Redeemer
unitRedeemer :: Redeemer
unitRedeemer = BuiltinData -> Redeemer
Redeemer (BuiltinData -> Redeemer) -> BuiltinData -> Redeemer
forall a b. (a -> b) -> a -> b
$ () -> BuiltinData
forall a. ToData a => a -> BuiltinData
toBuiltinData ()
makeLift ''ScriptHash
makeLift ''ValidatorHash
makeLift ''MintingPolicyHash
makeLift ''StakeValidatorHash
makeLift ''DatumHash
makeLift ''RedeemerHash
makeLift ''Datum
makeLift ''Redeemer