{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -fno-specialise #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
module PlutusLedgerApi.V1.Scripts
(
ScriptError (..)
, Redeemer(..)
, Datum(..)
, Context(..)
, DatumHash(..)
, RedeemerHash(..)
, ScriptHash(..)
) where
import Prelude qualified as Haskell
import Codec.Serialise (Serialise (..))
import Control.DeepSeq (NFData)
import Data.String
import Data.Text (Text)
import GHC.Generics (Generic)
import PlutusLedgerApi.V1.Bytes (LedgerBytes (..))
import PlutusTx (FromData (..), ToData (..), UnsafeFromData (..), makeLift)
import PlutusTx.Builtins as Builtins
import PlutusTx.Builtins.Internal as BI
import PlutusTx.Prelude
import Prettyprinter
data ScriptError =
EvaluationError [Text] Haskell.String
| EvaluationException Haskell.String Haskell.String
deriving stock (Int -> ScriptError -> ShowS
[ScriptError] -> ShowS
ScriptError -> String
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
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. 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 -> ()
forall a. (a -> ()) -> NFData a
rnf :: ScriptError -> ()
$crnf :: ScriptError -> ()
NFData)
newtype Datum = Datum { Datum -> BuiltinData
getDatum :: BuiltinData }
deriving stock (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
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
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
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
Haskell.Ord, Datum -> Datum -> Bool
forall a. (a -> a -> Bool) -> Eq a
== :: Datum -> Datum -> Bool
$c== :: Datum -> Datum -> Bool
Eq, Datum -> BuiltinData
forall a. (a -> BuiltinData) -> ToData a
toBuiltinData :: Datum -> BuiltinData
$ctoBuiltinData :: Datum -> BuiltinData
ToData, BuiltinData -> Maybe Datum
forall a. (BuiltinData -> Maybe a) -> FromData a
fromBuiltinData :: BuiltinData -> Maybe Datum
$cfromBuiltinData :: BuiltinData -> Maybe Datum
FromData, BuiltinData -> Datum
forall a. (BuiltinData -> a) -> UnsafeFromData a
unsafeFromBuiltinData :: BuiltinData -> Datum
$cunsafeFromBuiltinData :: BuiltinData -> Datum
UnsafeFromData, 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 :: forall ann. [Datum] -> Doc ann
$cprettyList :: forall ann. [Datum] -> Doc ann
pretty :: forall ann. Datum -> Doc ann
$cpretty :: forall ann. Datum -> Doc ann
Pretty)
deriving anyclass (Datum -> ()
forall a. (a -> ()) -> NFData a
rnf :: Datum -> ()
$crnf :: Datum -> ()
NFData)
instance Serialise Datum where
encode :: Datum -> Encoding
encode (Datum (BuiltinData Data
d)) = forall a. Serialise a => a -> Encoding
encode Data
d
decode :: forall s. Decoder s Datum
decode = BuiltinData -> Datum
Datum forall b c a. (b -> c) -> (a -> b) -> a -> c
. Data -> BuiltinData
BuiltinData forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Haskell.<$> forall a s. Serialise a => Decoder s a
decode
newtype Redeemer = Redeemer { Redeemer -> BuiltinData
getRedeemer :: BuiltinData }
deriving stock (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
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
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
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
Haskell.Ord, Redeemer -> Redeemer -> Bool
forall a. (a -> a -> Bool) -> Eq a
== :: Redeemer -> Redeemer -> Bool
$c== :: Redeemer -> Redeemer -> Bool
Eq, Redeemer -> BuiltinData
forall a. (a -> BuiltinData) -> ToData a
toBuiltinData :: Redeemer -> BuiltinData
$ctoBuiltinData :: Redeemer -> BuiltinData
ToData, BuiltinData -> Maybe Redeemer
forall a. (BuiltinData -> Maybe a) -> FromData a
fromBuiltinData :: BuiltinData -> Maybe Redeemer
$cfromBuiltinData :: BuiltinData -> Maybe Redeemer
FromData, BuiltinData -> Redeemer
forall a. (BuiltinData -> a) -> UnsafeFromData a
unsafeFromBuiltinData :: BuiltinData -> Redeemer
$cunsafeFromBuiltinData :: BuiltinData -> Redeemer
UnsafeFromData, 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 :: forall ann. [Redeemer] -> Doc ann
$cprettyList :: forall ann. [Redeemer] -> Doc ann
pretty :: forall ann. Redeemer -> Doc ann
$cpretty :: forall ann. Redeemer -> Doc ann
Pretty)
deriving anyclass (Redeemer -> ()
forall a. (a -> ()) -> NFData a
rnf :: Redeemer -> ()
$crnf :: Redeemer -> ()
NFData)
instance Serialise Redeemer where
encode :: Redeemer -> Encoding
encode (Redeemer (BuiltinData Data
d)) = forall a. Serialise a => a -> Encoding
encode Data
d
decode :: forall s. Decoder s Redeemer
decode = BuiltinData -> Redeemer
Redeemer forall b c a. (b -> c) -> (a -> b) -> a -> c
. Data -> BuiltinData
BuiltinData forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Haskell.<$> forall a s. Serialise a => Decoder s a
decode
newtype ScriptHash =
ScriptHash { ScriptHash -> BuiltinByteString
getScriptHash :: Builtins.BuiltinByteString }
deriving
(String -> ScriptHash
forall a. (String -> a) -> IsString a
fromString :: String -> ScriptHash
$cfromString :: String -> ScriptHash
IsString
, Int -> ScriptHash -> ShowS
[ScriptHash] -> ShowS
ScriptHash -> String
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
, 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 :: forall ann. [ScriptHash] -> Doc ann
$cprettyList :: forall ann. [ScriptHash] -> Doc ann
pretty :: forall ann. ScriptHash -> Doc ann
$cpretty :: forall ann. ScriptHash -> Doc ann
Pretty
) via LedgerBytes
deriving stock (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
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
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
Haskell.Ord, ScriptHash -> ScriptHash -> Bool
forall a. (a -> a -> Bool) -> Eq a
== :: ScriptHash -> ScriptHash -> Bool
$c== :: ScriptHash -> ScriptHash -> Bool
Eq, Eq 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
Ord, ScriptHash -> BuiltinData
forall a. (a -> BuiltinData) -> ToData a
toBuiltinData :: ScriptHash -> BuiltinData
$ctoBuiltinData :: ScriptHash -> BuiltinData
ToData, BuiltinData -> Maybe ScriptHash
forall a. (BuiltinData -> Maybe a) -> FromData a
fromBuiltinData :: BuiltinData -> Maybe ScriptHash
$cfromBuiltinData :: BuiltinData -> Maybe ScriptHash
FromData, BuiltinData -> ScriptHash
forall a. (BuiltinData -> a) -> UnsafeFromData a
unsafeFromBuiltinData :: BuiltinData -> ScriptHash
$cunsafeFromBuiltinData :: BuiltinData -> ScriptHash
UnsafeFromData)
deriving anyclass (ScriptHash -> ()
forall a. (a -> ()) -> NFData a
rnf :: ScriptHash -> ()
$crnf :: ScriptHash -> ()
NFData)
newtype DatumHash =
DatumHash Builtins.BuiltinByteString
deriving
(String -> DatumHash
forall a. (String -> a) -> IsString a
fromString :: String -> DatumHash
$cfromString :: String -> DatumHash
IsString
, Int -> DatumHash -> ShowS
[DatumHash] -> ShowS
DatumHash -> String
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
, 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 :: forall ann. [DatumHash] -> Doc ann
$cprettyList :: forall ann. [DatumHash] -> Doc ann
pretty :: forall ann. DatumHash -> Doc ann
$cpretty :: forall ann. DatumHash -> Doc ann
Pretty
) via LedgerBytes
deriving stock (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
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
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
Haskell.Ord, DatumHash -> DatumHash -> Bool
forall a. (a -> a -> Bool) -> Eq a
== :: DatumHash -> DatumHash -> Bool
$c== :: DatumHash -> DatumHash -> Bool
Eq, Eq 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
Ord, DatumHash -> BuiltinData
forall a. (a -> BuiltinData) -> ToData a
toBuiltinData :: DatumHash -> BuiltinData
$ctoBuiltinData :: DatumHash -> BuiltinData
ToData, BuiltinData -> Maybe DatumHash
forall a. (BuiltinData -> Maybe a) -> FromData a
fromBuiltinData :: BuiltinData -> Maybe DatumHash
$cfromBuiltinData :: BuiltinData -> Maybe DatumHash
FromData, BuiltinData -> DatumHash
forall a. (BuiltinData -> a) -> UnsafeFromData a
unsafeFromBuiltinData :: BuiltinData -> DatumHash
$cunsafeFromBuiltinData :: BuiltinData -> DatumHash
UnsafeFromData)
deriving anyclass (DatumHash -> ()
forall a. (a -> ()) -> NFData a
rnf :: DatumHash -> ()
$crnf :: DatumHash -> ()
NFData)
newtype RedeemerHash =
RedeemerHash Builtins.BuiltinByteString
deriving
(String -> RedeemerHash
forall a. (String -> a) -> IsString a
fromString :: String -> RedeemerHash
$cfromString :: String -> RedeemerHash
IsString
, Int -> RedeemerHash -> ShowS
[RedeemerHash] -> ShowS
RedeemerHash -> String
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
, 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 :: forall ann. [RedeemerHash] -> Doc ann
$cprettyList :: forall ann. [RedeemerHash] -> Doc ann
pretty :: forall ann. RedeemerHash -> Doc ann
$cpretty :: forall ann. RedeemerHash -> Doc ann
Pretty
) via LedgerBytes
deriving stock (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
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
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
Haskell.Ord, RedeemerHash -> RedeemerHash -> Bool
forall a. (a -> a -> Bool) -> Eq a
== :: RedeemerHash -> RedeemerHash -> Bool
$c== :: RedeemerHash -> RedeemerHash -> Bool
Eq, Eq 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
Ord, RedeemerHash -> BuiltinData
forall a. (a -> BuiltinData) -> ToData a
toBuiltinData :: RedeemerHash -> BuiltinData
$ctoBuiltinData :: RedeemerHash -> BuiltinData
ToData, BuiltinData -> Maybe RedeemerHash
forall a. (BuiltinData -> Maybe a) -> FromData a
fromBuiltinData :: BuiltinData -> Maybe RedeemerHash
$cfromBuiltinData :: BuiltinData -> Maybe RedeemerHash
FromData, BuiltinData -> RedeemerHash
forall a. (BuiltinData -> a) -> UnsafeFromData a
unsafeFromBuiltinData :: BuiltinData -> RedeemerHash
$cunsafeFromBuiltinData :: BuiltinData -> RedeemerHash
UnsafeFromData)
deriving anyclass (RedeemerHash -> ()
forall a. (a -> ()) -> NFData a
rnf :: RedeemerHash -> ()
$crnf :: RedeemerHash -> ()
NFData)
newtype Context = Context BuiltinData
deriving newtype (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 :: forall ann. [Context] -> Doc ann
$cprettyList :: forall ann. [Context] -> Doc ann
pretty :: forall ann. Context -> Doc ann
$cpretty :: forall ann. Context -> Doc ann
Pretty, Int -> Context -> ShowS
[Context] -> ShowS
Context -> String
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)
makeLift ''ScriptHash
makeLift ''DatumHash
makeLift ''RedeemerHash
makeLift ''Datum
makeLift ''Redeemer