module Cardano.YTxP.Control.Stubs (
alwaysSucceedsValidator,
alwaysSucceedsTwoArgumentScript,
noncedValidatorWrapper,
noncedTwoArgumentScriptWrapper,
) where
import Plutarch.LedgerApi.V2 (PScriptContext)
alwaysSucceedsValidator ::
forall (s :: S).
Term s (PData :--> PData :--> PScriptContext :--> POpaque)
alwaysSucceedsValidator :: forall (s :: S).
Term s (PData :--> (PData :--> (PScriptContext :--> POpaque)))
alwaysSucceedsValidator = (Term s PData
-> Term s PData -> Term s PScriptContext -> Term s POpaque)
-> Term s (PData :--> (PData :--> (PScriptContext :--> POpaque)))
forall a (b :: PType) (s :: S) (c :: PType).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: PType).
HasCallStack =>
(Term s c
-> Term s PData -> Term s PScriptContext -> Term s POpaque)
-> Term s (c :--> (PData :--> (PScriptContext :--> POpaque)))
plam ((Term s PData
-> Term s PData -> Term s PScriptContext -> Term s POpaque)
-> Term s (PData :--> (PData :--> (PScriptContext :--> POpaque))))
-> (Term s PData
-> Term s PData -> Term s PScriptContext -> Term s POpaque)
-> Term s (PData :--> (PData :--> (PScriptContext :--> POpaque)))
forall a b. (a -> b) -> a -> b
$ \Term s PData
_ Term s PData
_ Term s PScriptContext
_ -> Term s (PUnit @S) -> Term s POpaque
forall (s :: S) (a :: PType). Term s a -> Term s POpaque
popaque (PLifted (PUnit @S) -> Term s (PUnit @S)
forall (p :: PType) (s :: S). PLift p => PLifted p -> Term s p
pconstant ())
noncedValidatorWrapper ::
forall (nonceType :: S -> Type) (s :: S).
Term s nonceType ->
Term s (PData :--> PData :--> PScriptContext :--> POpaque) ->
Term s (PData :--> PData :--> PScriptContext :--> POpaque)
noncedValidatorWrapper :: forall (nonceType :: PType) (s :: S).
Term s nonceType
-> Term s (PData :--> (PData :--> (PScriptContext :--> POpaque)))
-> Term s (PData :--> (PData :--> (PScriptContext :--> POpaque)))
noncedValidatorWrapper Term s nonceType
nonce Term s (PData :--> (PData :--> (PScriptContext :--> POpaque)))
wrappedScript =
Term s nonceType
-> (Term s nonceType
-> Term s (PData :--> (PData :--> (PScriptContext :--> POpaque))))
-> Term s (PData :--> (PData :--> (PScriptContext :--> POpaque)))
forall (s :: S) (a :: PType) (b :: PType).
Term s a -> (Term s a -> Term s b) -> Term s b
plet Term s nonceType
nonce ((Term s nonceType
-> Term s (PData :--> (PData :--> (PScriptContext :--> POpaque))))
-> Term s (PData :--> (PData :--> (PScriptContext :--> POpaque))))
-> (Term s nonceType
-> Term s (PData :--> (PData :--> (PScriptContext :--> POpaque))))
-> Term s (PData :--> (PData :--> (PScriptContext :--> POpaque)))
forall a b. (a -> b) -> a -> b
$
Term s (PData :--> (PData :--> (PScriptContext :--> POpaque)))
-> Term s nonceType
-> Term s (PData :--> (PData :--> (PScriptContext :--> POpaque)))
forall a b. a -> b -> a
const
((Term s PData
-> Term s PData -> Term s PScriptContext -> Term s POpaque)
-> Term s (PData :--> (PData :--> (PScriptContext :--> POpaque)))
forall a (b :: PType) (s :: S) (c :: PType).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: PType).
HasCallStack =>
(Term s c
-> Term s PData -> Term s PScriptContext -> Term s POpaque)
-> Term s (c :--> (PData :--> (PScriptContext :--> POpaque)))
plam ((Term s PData
-> Term s PData -> Term s PScriptContext -> Term s POpaque)
-> Term s (PData :--> (PData :--> (PScriptContext :--> POpaque))))
-> (Term s PData
-> Term s PData -> Term s PScriptContext -> Term s POpaque)
-> Term s (PData :--> (PData :--> (PScriptContext :--> POpaque)))
forall a b. (a -> b) -> a -> b
$ \Term s PData
datum Term s PData
redeemer Term s PScriptContext
ctx -> Term s (PData :--> (PData :--> (PScriptContext :--> POpaque)))
wrappedScript Term s (PData :--> (PData :--> (PScriptContext :--> POpaque)))
-> Term s PData
-> Term s (PData :--> (PScriptContext :--> POpaque))
forall (s :: S) (a :: PType) (b :: PType).
Term s (a :--> b) -> Term s a -> Term s b
# Term s PData
datum Term s (PData :--> (PScriptContext :--> POpaque))
-> Term s PData -> Term s (PScriptContext :--> POpaque)
forall (s :: S) (a :: PType) (b :: PType).
Term s (a :--> b) -> Term s a -> Term s b
# Term s PData
redeemer Term s (PScriptContext :--> POpaque)
-> Term s PScriptContext -> Term s POpaque
forall (s :: S) (a :: PType) (b :: PType).
Term s (a :--> b) -> Term s a -> Term s b
# Term s PScriptContext
ctx)
alwaysSucceedsTwoArgumentScript ::
forall (s :: S).
Term s (PData :--> PScriptContext :--> POpaque)
alwaysSucceedsTwoArgumentScript :: forall (s :: S). Term s (PData :--> (PScriptContext :--> POpaque))
alwaysSucceedsTwoArgumentScript = (Term s PData -> Term s PScriptContext -> Term s POpaque)
-> Term s (PData :--> (PScriptContext :--> POpaque))
forall a (b :: PType) (s :: S) (c :: PType).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: PType).
HasCallStack =>
(Term s c -> Term s PScriptContext -> Term s POpaque)
-> Term s (c :--> (PScriptContext :--> POpaque))
plam ((Term s PData -> Term s PScriptContext -> Term s POpaque)
-> Term s (PData :--> (PScriptContext :--> POpaque)))
-> (Term s PData -> Term s PScriptContext -> Term s POpaque)
-> Term s (PData :--> (PScriptContext :--> POpaque))
forall a b. (a -> b) -> a -> b
$ \Term s PData
_ Term s PScriptContext
_ -> Term s (PUnit @S) -> Term s POpaque
forall (s :: S) (a :: PType). Term s a -> Term s POpaque
popaque (PLifted (PUnit @S) -> Term s (PUnit @S)
forall (p :: PType) (s :: S). PLift p => PLifted p -> Term s p
pconstant ())
noncedTwoArgumentScriptWrapper ::
forall (nonceType :: S -> Type) (s :: S).
Term s nonceType ->
Term s (PData :--> PScriptContext :--> POpaque) ->
Term s (PData :--> PScriptContext :--> POpaque)
noncedTwoArgumentScriptWrapper :: forall (nonceType :: PType) (s :: S).
Term s nonceType
-> Term s (PData :--> (PScriptContext :--> POpaque))
-> Term s (PData :--> (PScriptContext :--> POpaque))
noncedTwoArgumentScriptWrapper Term s nonceType
nonce Term s (PData :--> (PScriptContext :--> POpaque))
wrappedScript =
Term s nonceType
-> (Term s nonceType
-> Term s (PData :--> (PScriptContext :--> POpaque)))
-> Term s (PData :--> (PScriptContext :--> POpaque))
forall (s :: S) (a :: PType) (b :: PType).
Term s a -> (Term s a -> Term s b) -> Term s b
plet Term s nonceType
nonce ((Term s nonceType
-> Term s (PData :--> (PScriptContext :--> POpaque)))
-> Term s (PData :--> (PScriptContext :--> POpaque)))
-> (Term s nonceType
-> Term s (PData :--> (PScriptContext :--> POpaque)))
-> Term s (PData :--> (PScriptContext :--> POpaque))
forall a b. (a -> b) -> a -> b
$
Term s (PData :--> (PScriptContext :--> POpaque))
-> Term s nonceType
-> Term s (PData :--> (PScriptContext :--> POpaque))
forall a b. a -> b -> a
const
((Term s PData -> Term s PScriptContext -> Term s POpaque)
-> Term s (PData :--> (PScriptContext :--> POpaque))
forall a (b :: PType) (s :: S) (c :: PType).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: PType).
HasCallStack =>
(Term s c -> Term s PScriptContext -> Term s POpaque)
-> Term s (c :--> (PScriptContext :--> POpaque))
plam ((Term s PData -> Term s PScriptContext -> Term s POpaque)
-> Term s (PData :--> (PScriptContext :--> POpaque)))
-> (Term s PData -> Term s PScriptContext -> Term s POpaque)
-> Term s (PData :--> (PScriptContext :--> POpaque))
forall a b. (a -> b) -> a -> b
$ \Term s PData
redeemer Term s PScriptContext
ctx -> Term s (PData :--> (PScriptContext :--> POpaque))
wrappedScript Term s (PData :--> (PScriptContext :--> POpaque))
-> Term s PData -> Term s (PScriptContext :--> POpaque)
forall (s :: S) (a :: PType) (b :: PType).
Term s (a :--> b) -> Term s a -> Term s b
# Term s PData
redeemer Term s (PScriptContext :--> POpaque)
-> Term s PScriptContext -> Term s POpaque
forall (s :: S) (a :: PType) (b :: PType).
Term s (a :--> b) -> Term s a -> Term s b
# Term s PScriptContext
ctx)