module Plutarch.LedgerApi.V3.Value (
pfromRawValue,
pfromSortedValue,
pfromMintValue,
ptoSortedValue,
ptoLedgerValue,
ptoLedgerValue',
ptoMintValue,
punsafeFromRawValue,
punsafeFromSortedValue,
punsafeToLedgerValue,
punsafeToMintValue,
pemptyBuiltinValue,
psingletonBuiltinValue,
pvalueOf,
plovelaceValueOf,
preplaceAmountPositive,
preplaceAmountNegative,
pdeleteAmount,
) where
import Data.Kind (Type)
import Plutarch.Builtin.Value (
PBuiltinValue,
pinsertCoin,
plookupCoin,
punValueData,
pvalueData,
)
import Plutarch.LedgerApi.AssocMap (PUnsortedMap)
import Plutarch.LedgerApi.AssocMap qualified as AssocMap
import Plutarch.LedgerApi.V3.MintValue (PMintValue)
import Plutarch.LedgerApi.Value (
PLedgerValue,
PRawValue,
PSortedValue,
pinsertAdaEntry,
)
import Plutarch.LedgerApi.Value.CurrencySymbol (PCurrencySymbol)
import Plutarch.LedgerApi.Value.TokenName (PTokenName)
import Plutarch.Prelude (
PAsData,
PBool (PFalse, PTrue),
PBuiltinList (PCons, PNil),
PBuiltinPair (PBuiltinPair),
PInteger,
PPositive,
S,
Term,
pcon,
pconstant,
pdata,
pfix,
pforgetData,
pfromData,
phoistAcyclic,
pif,
plam,
plet,
pmatch,
pnegate,
pto,
pupcast,
(#),
(#$),
(#<),
(#==),
(:-->),
)
import Plutarch.Unsafe (punsafeCoerce)
import PlutusCore.Value qualified as PlutusCore
pfromMintValue ::
forall (s :: S).
Term s (PAsData PMintValue) -> Term s PBuiltinValue
pfromMintValue :: forall (s :: S).
Term s (PAsData PMintValue) -> Term s PBuiltinValue
pfromMintValue Term s (PAsData PMintValue)
x = Term s (PData :--> PBuiltinValue)
forall (s :: S). Term s (PData :--> PBuiltinValue)
punValueData Term s (PData :--> PBuiltinValue)
-> Term s PData -> Term s PBuiltinValue
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s (PAsData PMintValue) -> Term s PData
forall (s :: S) (a :: S -> Type).
Term s (PAsData a) -> Term s PData
pforgetData Term s (PAsData PMintValue)
x
pfromRawValue ::
forall (r :: S -> Type) (s :: S).
Term s PRawValue ->
Term s r ->
Term s (PBuiltinValue :--> r) ->
Term s r
pfromRawValue :: forall (r :: S -> Type) (s :: S).
Term s PRawValue
-> Term s r -> Term s (PBuiltinValue :--> r) -> Term s r
pfromRawValue Term s PRawValue
x Term s r
whenFail Term s (PBuiltinValue :--> r)
whenSucceed =
Term s PBool -> Term s r -> Term s r -> Term s r
forall (a :: S -> Type) (s :: S).
Term s PBool -> Term s a -> Term s a -> Term s a
pif (Term s (PRawValue :--> PBool)
forall (s :: S). Term s (PRawValue :--> PBool)
pcanBeBuiltinValue Term s (PRawValue :--> PBool) -> Term s PRawValue -> Term s PBool
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s PRawValue
x) (Term s (PBuiltinValue :--> r)
whenSucceed Term s (PBuiltinValue :--> r) -> Term s PBuiltinValue -> Term s r
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
#$ Term s (PData :--> PBuiltinValue)
forall (s :: S). Term s (PData :--> PBuiltinValue)
punValueData Term s (PData :--> PBuiltinValue)
-> Term s PData -> Term s PBuiltinValue
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s (PAsData PRawValue) -> Term s PData
forall (s :: S) (a :: S -> Type).
Term s (PAsData a) -> Term s PData
pforgetData (Term s PRawValue -> Term s (PAsData PRawValue)
forall (a :: S -> Type) (s :: S).
PIsData a =>
Term s a -> Term s (PAsData a)
pdata Term s PRawValue
x)) Term s r
whenFail
punsafeFromRawValue ::
forall (s :: S).
Term s (PAsData PRawValue) -> Term s PBuiltinValue
punsafeFromRawValue :: forall (s :: S). Term s (PAsData PRawValue) -> Term s PBuiltinValue
punsafeFromRawValue Term s (PAsData PRawValue)
x = Term s (PData :--> PBuiltinValue)
forall (s :: S). Term s (PData :--> PBuiltinValue)
punValueData Term s (PData :--> PBuiltinValue)
-> Term s PData -> Term s PBuiltinValue
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s (PAsData PRawValue) -> Term s PData
forall (s :: S) (a :: S -> Type).
Term s (PAsData a) -> Term s PData
pforgetData Term s (PAsData PRawValue)
x
pfromSortedValue ::
forall (r :: S -> Type) (s :: S).
Term s PSortedValue ->
Term s r ->
Term s (PBuiltinValue :--> r) ->
Term s r
pfromSortedValue :: forall (r :: S -> Type) (s :: S).
Term s PSortedValue
-> Term s r -> Term s (PBuiltinValue :--> r) -> Term s r
pfromSortedValue Term s PSortedValue
x Term s r
whenFail Term s (PBuiltinValue :--> r)
whenSucceed =
Term s PBool -> Term s r -> Term s r -> Term s r
forall (a :: S -> Type) (s :: S).
Term s PBool -> Term s a -> Term s a -> Term s a
pif (Term s (PSortedValue :--> PBool)
forall (s :: S). Term s (PSortedValue :--> PBool)
pnoZeroAmounts Term s (PSortedValue :--> PBool)
-> Term s PSortedValue -> Term s PBool
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s PSortedValue
x) (Term s (PBuiltinValue :--> r)
whenSucceed Term s (PBuiltinValue :--> r) -> Term s PBuiltinValue -> Term s r
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
#$ Term s (PData :--> PBuiltinValue)
forall (s :: S). Term s (PData :--> PBuiltinValue)
punValueData Term s (PData :--> PBuiltinValue)
-> Term s PData -> Term s PBuiltinValue
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s (PAsData PSortedValue) -> Term s PData
forall (s :: S) (a :: S -> Type).
Term s (PAsData a) -> Term s PData
pforgetData (Term s PSortedValue -> Term s (PAsData PSortedValue)
forall (a :: S -> Type) (s :: S).
PIsData a =>
Term s a -> Term s (PAsData a)
pdata Term s PSortedValue
x)) Term s r
whenFail
punsafeFromSortedValue :: forall (s :: S). Term s (PAsData PSortedValue) -> Term s PBuiltinValue
punsafeFromSortedValue :: forall (s :: S).
Term s (PAsData PSortedValue) -> Term s PBuiltinValue
punsafeFromSortedValue Term s (PAsData PSortedValue)
x = Term s (PData :--> PBuiltinValue)
forall (s :: S). Term s (PData :--> PBuiltinValue)
punValueData Term s (PData :--> PBuiltinValue)
-> Term s PData -> Term s PBuiltinValue
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s (PAsData PSortedValue) -> Term s PData
forall (s :: S) (a :: S -> Type).
Term s (PAsData a) -> Term s PData
pforgetData Term s (PAsData PSortedValue)
x
ptoSortedValue ::
forall (s :: S).
Term s PBuiltinValue -> Term s (PAsData PSortedValue)
ptoSortedValue :: forall (s :: S).
Term s PBuiltinValue -> Term s (PAsData PSortedValue)
ptoSortedValue Term s PBuiltinValue
v = Term s PData -> Term s (PAsData PSortedValue)
forall (b :: S -> Type) (a :: S -> Type) (s :: S).
Term s a -> Term s b
punsafeCoerce (Term s PData -> Term s (PAsData PSortedValue))
-> Term s PData -> Term s (PAsData PSortedValue)
forall a b. (a -> b) -> a -> b
$ Term s (PBuiltinValue :--> PData)
forall (s :: S). Term s (PBuiltinValue :--> PData)
pvalueData Term s (PBuiltinValue :--> PData)
-> Term s PBuiltinValue -> Term s PData
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s PBuiltinValue
v
ptoLedgerValue ::
forall (r :: S -> Type) (s :: S).
Term s PBuiltinValue ->
Term s r ->
Term s (PAsData PLedgerValue :--> r) ->
Term s r
ptoLedgerValue :: forall (r :: S -> Type) (s :: S).
Term s PBuiltinValue
-> Term s r -> Term s (PAsData PLedgerValue :--> r) -> Term s r
ptoLedgerValue Term s PBuiltinValue
v Term s r
whenInvalid Term s (PAsData PLedgerValue :--> r)
whenValid =
Term s PBool -> Term s r -> Term s r -> Term s r
forall (a :: S -> Type) (s :: S).
Term s PBool -> Term s a -> Term s a -> Term s a
pif (Term s (PBuiltinValue :--> PInteger)
forall (s :: S). Term s (PBuiltinValue :--> PInteger)
plovelaceValueOf Term s (PBuiltinValue :--> PInteger)
-> Term s PBuiltinValue -> Term s PInteger
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s PBuiltinValue
v Term s PInteger -> Term s PInteger -> Term s PBool
forall (s :: S). Term s PInteger -> Term s PInteger -> Term s PBool
forall (t :: S -> Type) (s :: S).
PEq t =>
Term s t -> Term s t -> Term s PBool
#== Term s PInteger
0) Term s r
whenInvalid (Term s (PAsData PLedgerValue :--> r)
whenValid Term s (PAsData PLedgerValue :--> r)
-> Term s (PAsData PLedgerValue) -> Term s r
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s PData -> Term s (PAsData PLedgerValue)
forall (b :: S -> Type) (a :: S -> Type) (s :: S).
Term s a -> Term s b
punsafeCoerce (Term s (PBuiltinValue :--> PData)
forall (s :: S). Term s (PBuiltinValue :--> PData)
pvalueData Term s (PBuiltinValue :--> PData)
-> Term s PBuiltinValue -> Term s PData
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s PBuiltinValue
v))
ptoLedgerValue' ::
forall (s :: S).
Term s PBuiltinValue ->
Term s PLedgerValue
ptoLedgerValue' :: forall (s :: S). Term s PBuiltinValue -> Term s PLedgerValue
ptoLedgerValue' Term s PBuiltinValue
v = Term s PSortedValue -> Term s PLedgerValue
forall (b :: S -> Type) (a :: S -> Type) (s :: S).
Term s a -> Term s b
punsafeCoerce (Term s PSortedValue -> Term s PLedgerValue)
-> Term s PSortedValue -> Term s PLedgerValue
forall a b. (a -> b) -> a -> b
$ Term s (PSortedValue :--> PSortedValue)
forall (s :: S). Term s (PSortedValue :--> PSortedValue)
pinsertAdaEntry Term s (PSortedValue :--> PSortedValue)
-> Term s PSortedValue -> Term s PSortedValue
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# (Term s (PAsData PSortedValue) -> Term s PSortedValue
forall (a :: S -> Type) (s :: S).
PIsData a =>
Term s (PAsData a) -> Term s a
pfromData (Term s (PAsData PSortedValue) -> Term s PSortedValue)
-> (Term s PBuiltinValue -> Term s (PAsData PSortedValue))
-> Term s PBuiltinValue
-> Term s PSortedValue
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Term s PBuiltinValue -> Term s (PAsData PSortedValue)
forall (s :: S).
Term s PBuiltinValue -> Term s (PAsData PSortedValue)
ptoSortedValue (Term s PBuiltinValue -> Term s PSortedValue)
-> Term s PBuiltinValue -> Term s PSortedValue
forall a b. (a -> b) -> a -> b
$ Term s PBuiltinValue
v)
ptoMintValue ::
forall (r :: S -> Type) (s :: S).
Term s PBuiltinValue ->
Term s r ->
Term s (PAsData PMintValue :--> r) ->
Term s r
ptoMintValue :: forall (r :: S -> Type) (s :: S).
Term s PBuiltinValue
-> Term s r -> Term s (PAsData PMintValue :--> r) -> Term s r
ptoMintValue Term s PBuiltinValue
v Term s r
whenInvalid Term s (PAsData PMintValue :--> r)
whenValid =
Term s PBool -> Term s r -> Term s r -> Term s r
forall (a :: S -> Type) (s :: S).
Term s PBool -> Term s a -> Term s a -> Term s a
pif (Term s (PBuiltinValue :--> PInteger)
forall (s :: S). Term s (PBuiltinValue :--> PInteger)
plovelaceValueOf Term s (PBuiltinValue :--> PInteger)
-> Term s PBuiltinValue -> Term s PInteger
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s PBuiltinValue
v Term s PInteger -> Term s PInteger -> Term s PBool
forall (s :: S). Term s PInteger -> Term s PInteger -> Term s PBool
forall (t :: S -> Type) (s :: S).
PEq t =>
Term s t -> Term s t -> Term s PBool
#== Term s PInteger
0) (Term s (PAsData PMintValue :--> r)
whenValid Term s (PAsData PMintValue :--> r)
-> Term s (PAsData PMintValue) -> Term s r
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s PData -> Term s (PAsData PMintValue)
forall (b :: S -> Type) (a :: S -> Type) (s :: S).
Term s a -> Term s b
punsafeCoerce (Term s (PBuiltinValue :--> PData)
forall (s :: S). Term s (PBuiltinValue :--> PData)
pvalueData Term s (PBuiltinValue :--> PData)
-> Term s PBuiltinValue -> Term s PData
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s PBuiltinValue
v)) Term s r
whenInvalid
punsafeToLedgerValue ::
forall (s :: S).
Term s PBuiltinValue -> Term s (PAsData PLedgerValue)
punsafeToLedgerValue :: forall (s :: S).
Term s PBuiltinValue -> Term s (PAsData PLedgerValue)
punsafeToLedgerValue Term s PBuiltinValue
v = Term s PData -> Term s (PAsData PLedgerValue)
forall (b :: S -> Type) (a :: S -> Type) (s :: S).
Term s a -> Term s b
punsafeCoerce (Term s PData -> Term s (PAsData PLedgerValue))
-> Term s PData -> Term s (PAsData PLedgerValue)
forall a b. (a -> b) -> a -> b
$ Term s (PBuiltinValue :--> PData)
forall (s :: S). Term s (PBuiltinValue :--> PData)
pvalueData Term s (PBuiltinValue :--> PData)
-> Term s PBuiltinValue -> Term s PData
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s PBuiltinValue
v
punsafeToMintValue ::
forall (s :: S).
Term s PBuiltinValue -> Term s (PAsData PMintValue)
punsafeToMintValue :: forall (s :: S).
Term s PBuiltinValue -> Term s (PAsData PMintValue)
punsafeToMintValue Term s PBuiltinValue
v = Term s PData -> Term s (PAsData PMintValue)
forall (b :: S -> Type) (a :: S -> Type) (s :: S).
Term s a -> Term s b
punsafeCoerce (Term s PData -> Term s (PAsData PMintValue))
-> Term s PData -> Term s (PAsData PMintValue)
forall a b. (a -> b) -> a -> b
$ Term s (PBuiltinValue :--> PData)
forall (s :: S). Term s (PBuiltinValue :--> PData)
pvalueData Term s (PBuiltinValue :--> PData)
-> Term s PBuiltinValue -> Term s PData
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s PBuiltinValue
v
pemptyBuiltinValue :: forall (s :: S). Term s PBuiltinValue
pemptyBuiltinValue :: forall (s :: S). Term s PBuiltinValue
pemptyBuiltinValue = AsHaskell PBuiltinValue -> Term s PBuiltinValue
forall (a :: S -> Type) (s :: S).
PLiftable a =>
AsHaskell a -> Term s a
pconstant AsHaskell PBuiltinValue
Value
PlutusCore.empty
psingletonBuiltinValue ::
forall (s :: S).
Term s (PCurrencySymbol :--> PTokenName :--> PInteger :--> PBuiltinValue)
psingletonBuiltinValue :: forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PInteger :--> PBuiltinValue)))
psingletonBuiltinValue = (forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PInteger :--> PBuiltinValue))))
-> Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PInteger :--> PBuiltinValue)))
forall (a :: S -> Type) (s :: S).
HasCallStack =>
(forall (s' :: S). Term s' a) -> Term s a
phoistAcyclic ((forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PInteger :--> PBuiltinValue))))
-> Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PInteger :--> PBuiltinValue))))
-> (forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PInteger :--> PBuiltinValue))))
-> Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PInteger :--> PBuiltinValue)))
forall a b. (a -> b) -> a -> b
$ (Term s' PCurrencySymbol
-> Term s' PTokenName -> Term s' PInteger -> Term s' PBuiltinValue)
-> Term
s'
(PCurrencySymbol
:--> (PTokenName :--> (PInteger :--> PBuiltinValue)))
forall a (b :: S -> Type) (s :: S) (c :: S -> Type).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: S -> Type).
HasCallStack =>
(Term s' c
-> Term s' PTokenName -> Term s' PInteger -> Term s' PBuiltinValue)
-> Term s' (c :--> (PTokenName :--> (PInteger :--> PBuiltinValue)))
plam ((Term s' PCurrencySymbol
-> Term s' PTokenName -> Term s' PInteger -> Term s' PBuiltinValue)
-> Term
s'
(PCurrencySymbol
:--> (PTokenName :--> (PInteger :--> PBuiltinValue))))
-> (Term s' PCurrencySymbol
-> Term s' PTokenName -> Term s' PInteger -> Term s' PBuiltinValue)
-> Term
s'
(PCurrencySymbol
:--> (PTokenName :--> (PInteger :--> PBuiltinValue)))
forall a b. (a -> b) -> a -> b
$ \Term s' PCurrencySymbol
symbol Term s' PTokenName
token Term s' PInteger
amount ->
Term
s'
(PByteString
:--> (PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue))))
forall (s :: S).
Term
s
(PByteString
:--> (PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue))))
pinsertCoin Term
s'
(PByteString
:--> (PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue))))
-> Term s' PByteString
-> Term
s'
(PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue)))
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PCurrencySymbol -> Term s' PByteString
forall (a :: S -> Type) (b :: S -> Type) (s :: S).
PSubtype a b =>
Term s b -> Term s a
pupcast Term s' PCurrencySymbol
symbol Term
s'
(PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue)))
-> Term s' PByteString
-> Term s' (PInteger :--> (PBuiltinValue :--> PBuiltinValue))
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PTokenName -> Term s' PByteString
forall (a :: S -> Type) (b :: S -> Type) (s :: S).
PSubtype a b =>
Term s b -> Term s a
pupcast Term s' PTokenName
token Term s' (PInteger :--> (PBuiltinValue :--> PBuiltinValue))
-> Term s' PInteger -> Term s' (PBuiltinValue :--> PBuiltinValue)
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PInteger
amount Term s' (PBuiltinValue :--> PBuiltinValue)
-> Term s' PBuiltinValue -> Term s' PBuiltinValue
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PBuiltinValue
forall (s :: S). Term s PBuiltinValue
pemptyBuiltinValue
pvalueOf ::
forall (s :: S).
Term s (PCurrencySymbol :--> PTokenName :--> PBuiltinValue :--> PInteger)
pvalueOf :: forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PInteger)))
pvalueOf = (forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PInteger))))
-> Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PInteger)))
forall (a :: S -> Type) (s :: S).
HasCallStack =>
(forall (s' :: S). Term s' a) -> Term s a
phoistAcyclic ((forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PInteger))))
-> Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PInteger))))
-> (forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PInteger))))
-> Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PInteger)))
forall a b. (a -> b) -> a -> b
$ (Term s' PCurrencySymbol
-> Term s' PTokenName -> Term s' PBuiltinValue -> Term s' PInteger)
-> Term
s'
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PInteger)))
forall a (b :: S -> Type) (s :: S) (c :: S -> Type).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: S -> Type).
HasCallStack =>
(Term s' c
-> Term s' PTokenName -> Term s' PBuiltinValue -> Term s' PInteger)
-> Term s' (c :--> (PTokenName :--> (PBuiltinValue :--> PInteger)))
plam ((Term s' PCurrencySymbol
-> Term s' PTokenName -> Term s' PBuiltinValue -> Term s' PInteger)
-> Term
s'
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PInteger))))
-> (Term s' PCurrencySymbol
-> Term s' PTokenName -> Term s' PBuiltinValue -> Term s' PInteger)
-> Term
s'
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PInteger)))
forall a b. (a -> b) -> a -> b
$ \Term s' PCurrencySymbol
cs Term s' PTokenName
tn Term s' PBuiltinValue
v ->
Term
s'
(PByteString :--> (PByteString :--> (PBuiltinValue :--> PInteger)))
forall (s :: S).
Term
s
(PByteString :--> (PByteString :--> (PBuiltinValue :--> PInteger)))
plookupCoin Term
s'
(PByteString :--> (PByteString :--> (PBuiltinValue :--> PInteger)))
-> Term s' PByteString
-> Term s' (PByteString :--> (PBuiltinValue :--> PInteger))
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PCurrencySymbol -> Term s' PByteString
forall (a :: S -> Type) (b :: S -> Type) (s :: S).
PSubtype a b =>
Term s b -> Term s a
pupcast Term s' PCurrencySymbol
cs Term s' (PByteString :--> (PBuiltinValue :--> PInteger))
-> Term s' PByteString -> Term s' (PBuiltinValue :--> PInteger)
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PTokenName -> Term s' PByteString
forall (a :: S -> Type) (b :: S -> Type) (s :: S).
PSubtype a b =>
Term s b -> Term s a
pupcast Term s' PTokenName
tn Term s' (PBuiltinValue :--> PInteger)
-> Term s' PBuiltinValue -> Term s' PInteger
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PBuiltinValue
v
plovelaceValueOf ::
forall (s :: S).
Term s (PBuiltinValue :--> PInteger)
plovelaceValueOf :: forall (s :: S). Term s (PBuiltinValue :--> PInteger)
plovelaceValueOf = (forall (s :: S). Term s (PBuiltinValue :--> PInteger))
-> Term s (PBuiltinValue :--> PInteger)
forall (a :: S -> Type) (s :: S).
HasCallStack =>
(forall (s' :: S). Term s' a) -> Term s a
phoistAcyclic ((forall (s :: S). Term s (PBuiltinValue :--> PInteger))
-> Term s (PBuiltinValue :--> PInteger))
-> (forall (s :: S). Term s (PBuiltinValue :--> PInteger))
-> Term s (PBuiltinValue :--> PInteger)
forall a b. (a -> b) -> a -> b
$ (Term s' PBuiltinValue -> Term s' PInteger)
-> Term s' (PBuiltinValue :--> PInteger)
forall a (b :: S -> Type) (s :: S) (c :: S -> Type).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: S -> Type).
HasCallStack =>
(Term s' c -> Term s' PInteger) -> Term s' (c :--> PInteger)
plam ((Term s' PBuiltinValue -> Term s' PInteger)
-> Term s' (PBuiltinValue :--> PInteger))
-> (Term s' PBuiltinValue -> Term s' PInteger)
-> Term s' (PBuiltinValue :--> PInteger)
forall a b. (a -> b) -> a -> b
$ \Term s' PBuiltinValue
v ->
Term
s'
(PByteString :--> (PByteString :--> (PBuiltinValue :--> PInteger)))
forall (s :: S).
Term
s
(PByteString :--> (PByteString :--> (PBuiltinValue :--> PInteger)))
plookupCoin Term
s'
(PByteString :--> (PByteString :--> (PBuiltinValue :--> PInteger)))
-> Term s' PByteString
-> Term s' (PByteString :--> (PBuiltinValue :--> PInteger))
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# AsHaskell PByteString -> Term s' PByteString
forall (a :: S -> Type) (s :: S).
PLiftable a =>
AsHaskell a -> Term s a
pconstant ByteString
AsHaskell PByteString
"" Term s' (PByteString :--> (PBuiltinValue :--> PInteger))
-> Term s' PByteString -> Term s' (PBuiltinValue :--> PInteger)
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# AsHaskell PByteString -> Term s' PByteString
forall (a :: S -> Type) (s :: S).
PLiftable a =>
AsHaskell a -> Term s a
pconstant ByteString
AsHaskell PByteString
"" Term s' (PBuiltinValue :--> PInteger)
-> Term s' PBuiltinValue -> Term s' PInteger
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PBuiltinValue
v
preplaceAmountPositive ::
forall (s :: S).
Term s (PCurrencySymbol :--> PTokenName :--> PPositive :--> PBuiltinValue :--> PBuiltinValue)
preplaceAmountPositive :: forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue))))
preplaceAmountPositive = (forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue)))))
-> Term
s
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue))))
forall (a :: S -> Type) (s :: S).
HasCallStack =>
(forall (s' :: S). Term s' a) -> Term s a
phoistAcyclic ((forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue)))))
-> Term
s
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue)))))
-> (forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue)))))
-> Term
s
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue))))
forall a b. (a -> b) -> a -> b
$ (Term s' PCurrencySymbol
-> Term s' PTokenName
-> Term s' PPositive
-> Term s' PBuiltinValue
-> Term s' PBuiltinValue)
-> Term
s'
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue))))
forall a (b :: S -> Type) (s :: S) (c :: S -> Type).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: S -> Type).
HasCallStack =>
(Term s' c
-> Term s' PTokenName
-> Term s' PPositive
-> Term s' PBuiltinValue
-> Term s' PBuiltinValue)
-> Term
s'
(c
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue))))
plam ((Term s' PCurrencySymbol
-> Term s' PTokenName
-> Term s' PPositive
-> Term s' PBuiltinValue
-> Term s' PBuiltinValue)
-> Term
s'
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue)))))
-> (Term s' PCurrencySymbol
-> Term s' PTokenName
-> Term s' PPositive
-> Term s' PBuiltinValue
-> Term s' PBuiltinValue)
-> Term
s'
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue))))
forall a b. (a -> b) -> a -> b
$ \Term s' PCurrencySymbol
cs Term s' PTokenName
tn Term s' PPositive
amount Term s' PBuiltinValue
v ->
Term
s'
(PByteString
:--> (PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue))))
forall (s :: S).
Term
s
(PByteString
:--> (PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue))))
pinsertCoin Term
s'
(PByteString
:--> (PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue))))
-> Term s' PByteString
-> Term
s'
(PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue)))
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PCurrencySymbol -> Term s' PByteString
forall (a :: S -> Type) (b :: S -> Type) (s :: S).
PSubtype a b =>
Term s b -> Term s a
pupcast Term s' PCurrencySymbol
cs Term
s'
(PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue)))
-> Term s' PByteString
-> Term s' (PInteger :--> (PBuiltinValue :--> PBuiltinValue))
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PTokenName -> Term s' PByteString
forall (a :: S -> Type) (b :: S -> Type) (s :: S).
PSubtype a b =>
Term s b -> Term s a
pupcast Term s' PTokenName
tn Term s' (PInteger :--> (PBuiltinValue :--> PBuiltinValue))
-> Term s' PInteger -> Term s' (PBuiltinValue :--> PBuiltinValue)
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PPositive -> Term s' PInteger
forall (a :: S -> Type) (b :: S -> Type) (s :: S).
PSubtype a b =>
Term s b -> Term s a
pupcast Term s' PPositive
amount Term s' (PBuiltinValue :--> PBuiltinValue)
-> Term s' PBuiltinValue -> Term s' PBuiltinValue
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PBuiltinValue
v
preplaceAmountNegative ::
forall (s :: S).
Term s (PCurrencySymbol :--> PTokenName :--> PPositive :--> PBuiltinValue :--> PBuiltinValue)
preplaceAmountNegative :: forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue))))
preplaceAmountNegative = (forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue)))))
-> Term
s
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue))))
forall (a :: S -> Type) (s :: S).
HasCallStack =>
(forall (s' :: S). Term s' a) -> Term s a
phoistAcyclic ((forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue)))))
-> Term
s
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue)))))
-> (forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue)))))
-> Term
s
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue))))
forall a b. (a -> b) -> a -> b
$ (Term s' PCurrencySymbol
-> Term s' PTokenName
-> Term s' PPositive
-> Term s' PBuiltinValue
-> Term s' PBuiltinValue)
-> Term
s'
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue))))
forall a (b :: S -> Type) (s :: S) (c :: S -> Type).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: S -> Type).
HasCallStack =>
(Term s' c
-> Term s' PTokenName
-> Term s' PPositive
-> Term s' PBuiltinValue
-> Term s' PBuiltinValue)
-> Term
s'
(c
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue))))
plam ((Term s' PCurrencySymbol
-> Term s' PTokenName
-> Term s' PPositive
-> Term s' PBuiltinValue
-> Term s' PBuiltinValue)
-> Term
s'
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue)))))
-> (Term s' PCurrencySymbol
-> Term s' PTokenName
-> Term s' PPositive
-> Term s' PBuiltinValue
-> Term s' PBuiltinValue)
-> Term
s'
(PCurrencySymbol
:--> (PTokenName
:--> (PPositive :--> (PBuiltinValue :--> PBuiltinValue))))
forall a b. (a -> b) -> a -> b
$ \Term s' PCurrencySymbol
cs Term s' PTokenName
tn Term s' PPositive
amount Term s' PBuiltinValue
v ->
Term
s'
(PByteString
:--> (PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue))))
forall (s :: S).
Term
s
(PByteString
:--> (PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue))))
pinsertCoin Term
s'
(PByteString
:--> (PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue))))
-> Term s' PByteString
-> Term
s'
(PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue)))
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PCurrencySymbol -> Term s' PByteString
forall (a :: S -> Type) (b :: S -> Type) (s :: S).
PSubtype a b =>
Term s b -> Term s a
pupcast Term s' PCurrencySymbol
cs Term
s'
(PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue)))
-> Term s' PByteString
-> Term s' (PInteger :--> (PBuiltinValue :--> PBuiltinValue))
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PTokenName -> Term s' PByteString
forall (a :: S -> Type) (b :: S -> Type) (s :: S).
PSubtype a b =>
Term s b -> Term s a
pupcast Term s' PTokenName
tn Term s' (PInteger :--> (PBuiltinValue :--> PBuiltinValue))
-> Term s' PInteger -> Term s' (PBuiltinValue :--> PBuiltinValue)
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# (Term s' (PInteger :--> PInteger)
forall (s :: S). Term s (PInteger :--> PInteger)
forall (a :: S -> Type) (s :: S).
PAdditiveGroup a =>
Term s (a :--> a)
pnegate Term s' (PInteger :--> PInteger)
-> Term s' PInteger -> Term s' PInteger
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PPositive -> Term s' PInteger
forall (a :: S -> Type) (b :: S -> Type) (s :: S).
PSubtype a b =>
Term s b -> Term s a
pupcast Term s' PPositive
amount) Term s' (PBuiltinValue :--> PBuiltinValue)
-> Term s' PBuiltinValue -> Term s' PBuiltinValue
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PBuiltinValue
v
pdeleteAmount ::
forall (s :: S).
Term s (PCurrencySymbol :--> PTokenName :--> PBuiltinValue :--> PBuiltinValue)
pdeleteAmount :: forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PBuiltinValue)))
pdeleteAmount = (forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PBuiltinValue))))
-> Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PBuiltinValue)))
forall (a :: S -> Type) (s :: S).
HasCallStack =>
(forall (s' :: S). Term s' a) -> Term s a
phoistAcyclic ((forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PBuiltinValue))))
-> Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PBuiltinValue))))
-> (forall (s :: S).
Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PBuiltinValue))))
-> Term
s
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PBuiltinValue)))
forall a b. (a -> b) -> a -> b
$ (Term s' PCurrencySymbol
-> Term s' PTokenName
-> Term s' PBuiltinValue
-> Term s' PBuiltinValue)
-> Term
s'
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PBuiltinValue)))
forall a (b :: S -> Type) (s :: S) (c :: S -> Type).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: S -> Type).
HasCallStack =>
(Term s' c
-> Term s' PTokenName
-> Term s' PBuiltinValue
-> Term s' PBuiltinValue)
-> Term
s' (c :--> (PTokenName :--> (PBuiltinValue :--> PBuiltinValue)))
plam ((Term s' PCurrencySymbol
-> Term s' PTokenName
-> Term s' PBuiltinValue
-> Term s' PBuiltinValue)
-> Term
s'
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PBuiltinValue))))
-> (Term s' PCurrencySymbol
-> Term s' PTokenName
-> Term s' PBuiltinValue
-> Term s' PBuiltinValue)
-> Term
s'
(PCurrencySymbol
:--> (PTokenName :--> (PBuiltinValue :--> PBuiltinValue)))
forall a b. (a -> b) -> a -> b
$ \Term s' PCurrencySymbol
cs Term s' PTokenName
tn Term s' PBuiltinValue
v ->
Term
s'
(PByteString
:--> (PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue))))
forall (s :: S).
Term
s
(PByteString
:--> (PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue))))
pinsertCoin Term
s'
(PByteString
:--> (PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue))))
-> Term s' PByteString
-> Term
s'
(PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue)))
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PCurrencySymbol -> Term s' PByteString
forall (a :: S -> Type) (b :: S -> Type) (s :: S).
PSubtype a b =>
Term s b -> Term s a
pupcast Term s' PCurrencySymbol
cs Term
s'
(PByteString
:--> (PInteger :--> (PBuiltinValue :--> PBuiltinValue)))
-> Term s' PByteString
-> Term s' (PInteger :--> (PBuiltinValue :--> PBuiltinValue))
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PTokenName -> Term s' PByteString
forall (a :: S -> Type) (b :: S -> Type) (s :: S).
PSubtype a b =>
Term s b -> Term s a
pupcast Term s' PTokenName
tn Term s' (PInteger :--> (PBuiltinValue :--> PBuiltinValue))
-> Term s' PInteger -> Term s' (PBuiltinValue :--> PBuiltinValue)
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PInteger
0 Term s' (PBuiltinValue :--> PBuiltinValue)
-> Term s' PBuiltinValue -> Term s' PBuiltinValue
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PBuiltinValue
v
pcanBeBuiltinValue :: forall (s :: S). Term s (PRawValue :--> PBool)
pcanBeBuiltinValue :: forall (s :: S). Term s (PRawValue :--> PBool)
pcanBeBuiltinValue = (forall (s :: S). Term s (PRawValue :--> PBool))
-> Term s (PRawValue :--> PBool)
forall (a :: S -> Type) (s :: S).
HasCallStack =>
(forall (s' :: S). Term s' a) -> Term s a
phoistAcyclic ((forall (s :: S). Term s (PRawValue :--> PBool))
-> Term s (PRawValue :--> PBool))
-> (forall (s :: S). Term s (PRawValue :--> PBool))
-> Term s (PRawValue :--> PBool)
forall a b. (a -> b) -> a -> b
$ (Term s' PRawValue -> Term s' PBool)
-> Term s' (PRawValue :--> PBool)
forall a (b :: S -> Type) (s :: S) (c :: S -> Type).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: S -> Type).
HasCallStack =>
(Term s' c -> Term s' PBool) -> Term s' (c :--> PBool)
plam ((Term s' PRawValue -> Term s' PBool)
-> Term s' (PRawValue :--> PBool))
-> (Term s' PRawValue -> Term s' PBool)
-> Term s' (PRawValue :--> PBool)
forall a b. (a -> b) -> a -> b
$ \Term s' PRawValue
v -> Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
-> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
s'
-> Term s' PBool)
-> Term s' PBool
forall (a :: S -> Type) (s :: S) (b :: S -> Type).
PlutusType a =>
Term s a -> (a s -> Term s b) -> Term s b
pmatch (Term
s'
(PInner
(PUnsortedMap PCurrencySymbol (PUnsortedMap PTokenName PInteger)))
-> Term
s'
(PInner
(PInner
(PUnsortedMap PCurrencySymbol (PUnsortedMap PTokenName PInteger))))
forall (a :: S -> Type) (s :: S). Term s a -> Term s (PInner a)
pto (Term
s'
(PUnsortedMap PCurrencySymbol (PUnsortedMap PTokenName PInteger))
-> Term
s'
(PInner
(PUnsortedMap PCurrencySymbol (PUnsortedMap PTokenName PInteger)))
forall (a :: S -> Type) (s :: S). Term s a -> Term s (PInner a)
pto (Term s' PRawValue -> Term s' (PInner PRawValue)
forall (a :: S -> Type) (s :: S). Term s a -> Term s (PInner a)
pto Term s' PRawValue
v))) ((PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
s'
-> Term s' PBool)
-> Term s' PBool)
-> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
s'
-> Term s' PBool)
-> Term s' PBool
forall a b. (a -> b) -> a -> b
$ \case
PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
s'
PNil -> PBool s' -> Term s' PBool
forall (a :: S -> Type) (s :: S). PlutusType a => a s -> Term s a
pcon PBool s'
forall (s :: S). PBool s
PTrue
PCons Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
x Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
xs -> Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
-> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
s'
-> Term s' PBool)
-> Term s' PBool
forall (a :: S -> Type) (s :: S) (b :: S -> Type).
PlutusType a =>
Term s a -> (a s -> Term s b) -> Term s b
pmatch Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
x ((PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
s'
-> Term s' PBool)
-> Term s' PBool)
-> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
s'
-> Term s' PBool)
-> Term s' PBool
forall a b. (a -> b) -> a -> b
$ \case
PBuiltinPair Term s' (PAsData PCurrencySymbol)
prevK Term s' (PAsData (PUnsortedMap PTokenName PInteger))
innerMap ->
Term s' PBool -> Term s' PBool -> Term s' PBool -> Term s' PBool
forall (a :: S -> Type) (s :: S).
Term s PBool -> Term s a -> Term s a -> Term s a
pif
(Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool)
forall (s' :: S).
Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool)
verifyInner Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool)
-> Term s' (PAsData (PUnsortedMap PTokenName PInteger))
-> Term s' PBool
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' (PAsData (PUnsortedMap PTokenName PInteger))
innerMap)
( Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
-> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
s'
-> Term s' PBool)
-> Term s' PBool
forall (a :: S -> Type) (s :: S) (b :: S -> Type).
PlutusType a =>
Term s a -> (a s -> Term s b) -> Term s b
pmatch Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
xs ((PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
s'
-> Term s' PBool)
-> Term s' PBool)
-> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
s'
-> Term s' PBool)
-> Term s' PBool
forall a b. (a -> b) -> a -> b
$ \case
PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
s'
PNil -> PBool s' -> Term s' PBool
forall (a :: S -> Type) (s :: S). PlutusType a => a s -> Term s a
pcon PBool s'
forall (s :: S). PBool s
PTrue
PCons Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
y Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
ys -> Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
forall (s' :: S).
Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
goOuter Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
-> Term s' PCurrencySymbol
-> Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool))
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' (PAsData PCurrencySymbol) -> Term s' PCurrencySymbol
forall (a :: S -> Type) (s :: S).
PIsData a =>
Term s (PAsData a) -> Term s a
pfromData Term s' (PAsData PCurrencySymbol)
prevK Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool))
-> Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
-> Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
y Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)
-> Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
-> Term s' PBool
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
ys
)
(PBool s' -> Term s' PBool
forall (a :: S -> Type) (s :: S). PlutusType a => a s -> Term s a
pcon PBool s'
forall (s :: S). PBool s
PFalse)
where
verifyInner ::
forall (s' :: S).
Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool)
verifyInner :: forall (s' :: S).
Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool)
verifyInner = (forall (s' :: S).
Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool))
-> Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool)
forall (a :: S -> Type) (s :: S).
HasCallStack =>
(forall (s' :: S). Term s' a) -> Term s a
phoistAcyclic ((forall (s' :: S).
Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool))
-> Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool))
-> (forall (s' :: S).
Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool))
-> Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool)
forall a b. (a -> b) -> a -> b
$ (Term s' (PAsData (PUnsortedMap PTokenName PInteger))
-> Term s' PBool)
-> Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool)
forall a (b :: S -> Type) (s :: S) (c :: S -> Type).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: S -> Type).
HasCallStack =>
(Term s' c -> Term s' PBool) -> Term s' (c :--> PBool)
plam ((Term s' (PAsData (PUnsortedMap PTokenName PInteger))
-> Term s' PBool)
-> Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool))
-> (Term s' (PAsData (PUnsortedMap PTokenName PInteger))
-> Term s' PBool)
-> Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool)
forall a b. (a -> b) -> a -> b
$ \Term s' (PAsData (PUnsortedMap PTokenName PInteger))
innerMap -> Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
-> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)) s'
-> Term s' PBool)
-> Term s' PBool
forall (a :: S -> Type) (s :: S) (b :: S -> Type).
PlutusType a =>
Term s a -> (a s -> Term s b) -> Term s b
pmatch (Term s' (PAssocMap PTokenName PInteger)
-> Term s' (PInner (PAssocMap PTokenName PInteger))
forall (a :: S -> Type) (s :: S). Term s a -> Term s (PInner a)
pto (Term s' (PUnsortedMap PTokenName PInteger)
-> Term s' (PInner (PUnsortedMap PTokenName PInteger))
forall (a :: S -> Type) (s :: S). Term s a -> Term s (PInner a)
pto (Term s' (PAsData (PUnsortedMap PTokenName PInteger))
-> Term s' (PUnsortedMap PTokenName PInteger)
forall (a :: S -> Type) (s :: S).
PIsData a =>
Term s (PAsData a) -> Term s a
pfromData Term s' (PAsData (PUnsortedMap PTokenName PInteger))
innerMap))) ((PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)) s'
-> Term s' PBool)
-> Term s' PBool)
-> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)) s'
-> Term s' PBool)
-> Term s' PBool
forall a b. (a -> b) -> a -> b
$ \case
PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)) s'
PNil -> PBool s' -> Term s' PBool
forall (a :: S -> Type) (s :: S). PlutusType a => a s -> Term s a
pcon PBool s'
forall (s :: S). PBool s
PFalse
PCons Term s' (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
x Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
xs -> Term s' (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
-> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger) s'
-> Term s' PBool)
-> Term s' PBool
forall (a :: S -> Type) (s :: S) (b :: S -> Type).
PlutusType a =>
Term s a -> (a s -> Term s b) -> Term s b
pmatch Term s' (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
x ((PBuiltinPair (PAsData PTokenName) (PAsData PInteger) s'
-> Term s' PBool)
-> Term s' PBool)
-> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger) s'
-> Term s' PBool)
-> Term s' PBool
forall a b. (a -> b) -> a -> b
$ \case
PBuiltinPair Term s' (PAsData PTokenName)
prevK Term s' (PAsData PInteger)
amount ->
Term s' PBool -> Term s' PBool -> Term s' PBool -> Term s' PBool
forall (a :: S -> Type) (s :: S).
Term s PBool -> Term s a -> Term s a -> Term s a
pif
(Term s' (PAsData PInteger) -> Term s' PInteger
forall (a :: S -> Type) (s :: S).
PIsData a =>
Term s (PAsData a) -> Term s a
pfromData Term s' (PAsData PInteger)
amount Term s' PInteger -> Term s' PInteger -> Term s' PBool
forall (s :: S). Term s PInteger -> Term s PInteger -> Term s PBool
forall (t :: S -> Type) (s :: S).
PEq t =>
Term s t -> Term s t -> Term s PBool
#== Term s' PInteger
0)
(PBool s' -> Term s' PBool
forall (a :: S -> Type) (s :: S). PlutusType a => a s -> Term s a
pcon PBool s'
forall (s :: S). PBool s
PFalse)
( Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
-> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)) s'
-> Term s' PBool)
-> Term s' PBool
forall (a :: S -> Type) (s :: S) (b :: S -> Type).
PlutusType a =>
Term s a -> (a s -> Term s b) -> Term s b
pmatch Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
xs ((PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)) s'
-> Term s' PBool)
-> Term s' PBool)
-> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)) s'
-> Term s' PBool)
-> Term s' PBool
forall a b. (a -> b) -> a -> b
$ \case
PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)) s'
PNil -> PBool s' -> Term s' PBool
forall (a :: S -> Type) (s :: S). PlutusType a => a s -> Term s a
pcon PBool s'
forall (s :: S). PBool s
PTrue
PCons Term s' (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
y Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
ys -> Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
forall (s' :: S).
Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
goInner Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
-> Term s' PTokenName
-> Term
s'
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool))
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' (PAsData PTokenName) -> Term s' PTokenName
forall (a :: S -> Type) (s :: S).
PIsData a =>
Term s (PAsData a) -> Term s a
pfromData Term s' (PAsData PTokenName)
prevK Term
s'
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool))
-> Term s' (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
-> Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
y Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)
-> Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
-> Term s' PBool
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
ys
)
goOuter ::
forall (s' :: S).
Term
s'
( PCurrencySymbol
:--> PBuiltinPair (PAsData PCurrencySymbol) (PAsData (PUnsortedMap PTokenName PInteger))
:--> PBuiltinList (PBuiltinPair (PAsData PCurrencySymbol) (PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool
)
goOuter :: forall (s' :: S).
Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
goOuter = (forall (s' :: S).
Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool))))
-> Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
forall (a :: S -> Type) (s :: S).
HasCallStack =>
(forall (s' :: S). Term s' a) -> Term s a
phoistAcyclic ((forall (s' :: S).
Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool))))
-> Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool))))
-> (forall (s' :: S).
Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool))))
-> Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
forall a b. (a -> b) -> a -> b
$ (Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
-> Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool))))
-> Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
forall (a :: S -> Type) (b :: S -> Type) (s :: S).
(Term s (a :--> b) -> Term s (a :--> b)) -> Term s (a :--> b)
pfix ((Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
-> Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool))))
-> Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool))))
-> (Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
-> Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool))))
-> Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
forall a b. (a -> b) -> a -> b
$ \Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
self -> (Term s' PCurrencySymbol
-> Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
-> Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
-> Term s' PBool)
-> Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
forall a (b :: S -> Type) (s :: S) (c :: S -> Type).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: S -> Type).
HasCallStack =>
(Term s' c
-> Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
-> Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
-> Term s' PBool)
-> Term
s'
(c
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
plam ((Term s' PCurrencySymbol
-> Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
-> Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
-> Term s' PBool)
-> Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool))))
-> (Term s' PCurrencySymbol
-> Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
-> Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
-> Term s' PBool)
-> Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
forall a b. (a -> b) -> a -> b
$ \Term s' PCurrencySymbol
prevK Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
curr Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
rest -> Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
-> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
s'
-> Term s' PBool)
-> Term s' PBool
forall (a :: S -> Type) (s :: S) (b :: S -> Type).
PlutusType a =>
Term s a -> (a s -> Term s b) -> Term s b
pmatch Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
curr ((PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
s'
-> Term s' PBool)
-> Term s' PBool)
-> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
s'
-> Term s' PBool)
-> Term s' PBool
forall a b. (a -> b) -> a -> b
$ \case
PBuiltinPair Term s' (PAsData PCurrencySymbol)
currK Term s' (PAsData (PUnsortedMap PTokenName PInteger))
currV -> Term s' PCurrencySymbol
-> (Term s' PCurrencySymbol -> Term s' PBool) -> Term s' PBool
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s a -> (Term s a -> Term s b) -> Term s b
plet (Term s' (PAsData PCurrencySymbol) -> Term s' PCurrencySymbol
forall (a :: S -> Type) (s :: S).
PIsData a =>
Term s (PAsData a) -> Term s a
pfromData Term s' (PAsData PCurrencySymbol)
currK) ((Term s' PCurrencySymbol -> Term s' PBool) -> Term s' PBool)
-> (Term s' PCurrencySymbol -> Term s' PBool) -> Term s' PBool
forall a b. (a -> b) -> a -> b
$ \Term s' PCurrencySymbol
currK' ->
Term s' PBool -> Term s' PBool -> Term s' PBool -> Term s' PBool
forall (a :: S -> Type) (s :: S).
Term s PBool -> Term s a -> Term s a -> Term s a
pif
(Term s' PCurrencySymbol
prevK Term s' PCurrencySymbol -> Term s' PCurrencySymbol -> Term s' PBool
forall (s :: S).
Term s PCurrencySymbol -> Term s PCurrencySymbol -> Term s PBool
forall (t :: S -> Type) (s :: S).
POrd t =>
Term s t -> Term s t -> Term s PBool
#< Term s' PCurrencySymbol
currK')
( Term s' PBool -> Term s' PBool -> Term s' PBool -> Term s' PBool
forall (a :: S -> Type) (s :: S).
Term s PBool -> Term s a -> Term s a -> Term s a
pif
(Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool)
forall (s' :: S).
Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool)
verifyInner Term s' (PAsData (PUnsortedMap PTokenName PInteger) :--> PBool)
-> Term s' (PAsData (PUnsortedMap PTokenName PInteger))
-> Term s' PBool
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' (PAsData (PUnsortedMap PTokenName PInteger))
currV)
( Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
-> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
s'
-> Term s' PBool)
-> Term s' PBool
forall (a :: S -> Type) (s :: S) (b :: S -> Type).
PlutusType a =>
Term s a -> (a s -> Term s b) -> Term s b
pmatch Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
rest ((PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
s'
-> Term s' PBool)
-> Term s' PBool)
-> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
s'
-> Term s' PBool)
-> Term s' PBool
forall a b. (a -> b) -> a -> b
$ \case
PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
s'
PNil -> PBool s' -> Term s' PBool
forall (a :: S -> Type) (s :: S). PlutusType a => a s -> Term s a
pcon PBool s'
forall (s :: S). PBool s
PTrue
PCons Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
y Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
ys -> Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
self Term
s'
(PCurrencySymbol
:--> (PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)))
-> Term s' PCurrencySymbol
-> Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool))
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PCurrencySymbol
currK' Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))
:--> (PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool))
-> Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
-> Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term
s'
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
y Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger)))
:--> PBool)
-> Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
-> Term s' PBool
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term
s'
(PBuiltinList
(PBuiltinPair
(PAsData PCurrencySymbol)
(PAsData (PUnsortedMap PTokenName PInteger))))
ys
)
(PBool s' -> Term s' PBool
forall (a :: S -> Type) (s :: S). PlutusType a => a s -> Term s a
pcon PBool s'
forall (s :: S). PBool s
PFalse)
)
(PBool s' -> Term s' PBool
forall (a :: S -> Type) (s :: S). PlutusType a => a s -> Term s a
pcon PBool s'
forall (s :: S). PBool s
PFalse)
goInner ::
forall (s' :: S).
Term
s'
( PTokenName
:--> PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> PBuiltinList (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool
)
goInner :: forall (s' :: S).
Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
goInner = (forall (s' :: S).
Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool))))
-> Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
forall (a :: S -> Type) (s :: S).
HasCallStack =>
(forall (s' :: S). Term s' a) -> Term s a
phoistAcyclic ((forall (s' :: S).
Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool))))
-> Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool))))
-> (forall (s' :: S).
Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool))))
-> Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
forall a b. (a -> b) -> a -> b
$ (Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
-> Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool))))
-> Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
forall (a :: S -> Type) (b :: S -> Type) (s :: S).
(Term s (a :--> b) -> Term s (a :--> b)) -> Term s (a :--> b)
pfix ((Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
-> Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool))))
-> Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool))))
-> (Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
-> Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool))))
-> Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
forall a b. (a -> b) -> a -> b
$ \Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
self -> (Term s' PTokenName
-> Term s' (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
-> Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
-> Term s' PBool)
-> Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
forall a (b :: S -> Type) (s :: S) (c :: S -> Type).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: S -> Type).
HasCallStack =>
(Term s' c
-> Term s' (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
-> Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
-> Term s' PBool)
-> Term
s'
(c
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
plam ((Term s' PTokenName
-> Term s' (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
-> Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
-> Term s' PBool)
-> Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool))))
-> (Term s' PTokenName
-> Term s' (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
-> Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
-> Term s' PBool)
-> Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
forall a b. (a -> b) -> a -> b
$ \Term s' PTokenName
prevK Term s' (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
curr Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
rest -> Term s' (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
-> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger) s'
-> Term s' PBool)
-> Term s' PBool
forall (a :: S -> Type) (s :: S) (b :: S -> Type).
PlutusType a =>
Term s a -> (a s -> Term s b) -> Term s b
pmatch Term s' (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
curr ((PBuiltinPair (PAsData PTokenName) (PAsData PInteger) s'
-> Term s' PBool)
-> Term s' PBool)
-> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger) s'
-> Term s' PBool)
-> Term s' PBool
forall a b. (a -> b) -> a -> b
$ \case
PBuiltinPair Term s' (PAsData PTokenName)
currK Term s' (PAsData PInteger)
currV -> Term s' PTokenName
-> (Term s' PTokenName -> Term s' PBool) -> Term s' PBool
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s a -> (Term s a -> Term s b) -> Term s b
plet (Term s' (PAsData PTokenName) -> Term s' PTokenName
forall (a :: S -> Type) (s :: S).
PIsData a =>
Term s (PAsData a) -> Term s a
pfromData Term s' (PAsData PTokenName)
currK) ((Term s' PTokenName -> Term s' PBool) -> Term s' PBool)
-> (Term s' PTokenName -> Term s' PBool) -> Term s' PBool
forall a b. (a -> b) -> a -> b
$ \Term s' PTokenName
currK' ->
Term s' PBool -> Term s' PBool -> Term s' PBool -> Term s' PBool
forall (a :: S -> Type) (s :: S).
Term s PBool -> Term s a -> Term s a -> Term s a
pif
(Term s' PTokenName
prevK Term s' PTokenName -> Term s' PTokenName -> Term s' PBool
forall (s :: S).
Term s PTokenName -> Term s PTokenName -> Term s PBool
forall (t :: S -> Type) (s :: S).
POrd t =>
Term s t -> Term s t -> Term s PBool
#< Term s' PTokenName
currK')
( Term s' PBool -> Term s' PBool -> Term s' PBool -> Term s' PBool
forall (a :: S -> Type) (s :: S).
Term s PBool -> Term s a -> Term s a -> Term s a
pif
(Term s' (PAsData PInteger) -> Term s' PInteger
forall (a :: S -> Type) (s :: S).
PIsData a =>
Term s (PAsData a) -> Term s a
pfromData Term s' (PAsData PInteger)
currV Term s' PInteger -> Term s' PInteger -> Term s' PBool
forall (s :: S). Term s PInteger -> Term s PInteger -> Term s PBool
forall (t :: S -> Type) (s :: S).
PEq t =>
Term s t -> Term s t -> Term s PBool
#== Term s' PInteger
0)
(PBool s' -> Term s' PBool
forall (a :: S -> Type) (s :: S). PlutusType a => a s -> Term s a
pcon PBool s'
forall (s :: S). PBool s
PFalse)
( Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
-> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)) s'
-> Term s' PBool)
-> Term s' PBool
forall (a :: S -> Type) (s :: S) (b :: S -> Type).
PlutusType a =>
Term s a -> (a s -> Term s b) -> Term s b
pmatch Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
rest ((PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)) s'
-> Term s' PBool)
-> Term s' PBool)
-> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)) s'
-> Term s' PBool)
-> Term s' PBool
forall a b. (a -> b) -> a -> b
$ \case
PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)) s'
PNil -> PBool s' -> Term s' PBool
forall (a :: S -> Type) (s :: S). PlutusType a => a s -> Term s a
pcon PBool s'
forall (s :: S). PBool s
PTrue
PCons Term s' (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
y Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
ys -> Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
self Term
s'
(PTokenName
:--> (PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)))
-> Term s' PTokenName
-> Term
s'
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool))
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' PTokenName
currK' Term
s'
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)
:--> (PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool))
-> Term s' (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
-> Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' (PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
y Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger))
:--> PBool)
-> Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
-> Term s' PBool
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term
s'
(PBuiltinList
(PBuiltinPair (PAsData PTokenName) (PAsData PInteger)))
ys
)
)
(PBool s' -> Term s' PBool
forall (a :: S -> Type) (s :: S). PlutusType a => a s -> Term s a
pcon PBool s'
forall (s :: S). PBool s
PFalse)
pnoZeroAmounts :: forall (s :: S). Term s (PSortedValue :--> PBool)
pnoZeroAmounts :: forall (s :: S). Term s (PSortedValue :--> PBool)
pnoZeroAmounts = (forall (s :: S). Term s (PSortedValue :--> PBool))
-> Term s (PSortedValue :--> PBool)
forall (a :: S -> Type) (s :: S).
HasCallStack =>
(forall (s' :: S). Term s' a) -> Term s a
phoistAcyclic ((forall (s :: S). Term s (PSortedValue :--> PBool))
-> Term s (PSortedValue :--> PBool))
-> (forall (s :: S). Term s (PSortedValue :--> PBool))
-> Term s (PSortedValue :--> PBool)
forall a b. (a -> b) -> a -> b
$ (Term s' PSortedValue -> Term s' PBool)
-> Term s' (PSortedValue :--> PBool)
forall a (b :: S -> Type) (s :: S) (c :: S -> Type).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: S -> Type).
HasCallStack =>
(Term s' c -> Term s' PBool) -> Term s' (c :--> PBool)
plam ((Term s' PSortedValue -> Term s' PBool)
-> Term s' (PSortedValue :--> PBool))
-> (Term s' PSortedValue -> Term s' PBool)
-> Term s' (PSortedValue :--> PBool)
forall a b. (a -> b) -> a -> b
$ \Term s' PSortedValue
v -> Term
s'
((PSortedMap PTokenName PInteger :--> PBool)
:--> (PUnsortedMap PCurrencySymbol (PSortedMap PTokenName PInteger)
:--> PBool))
forall (k :: S -> Type) (v :: S -> Type) (s :: S).
PIsData v =>
Term s ((v :--> PBool) :--> (PUnsortedMap k v :--> PBool))
AssocMap.pall Term
s'
((PSortedMap PTokenName PInteger :--> PBool)
:--> (PUnsortedMap PCurrencySymbol (PSortedMap PTokenName PInteger)
:--> PBool))
-> Term s' (PSortedMap PTokenName PInteger :--> PBool)
-> Term
s'
(PUnsortedMap PCurrencySymbol (PSortedMap PTokenName PInteger)
:--> PBool)
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' (PSortedMap PTokenName PInteger :--> PBool)
forall (s' :: S).
Term s' (PSortedMap PTokenName PInteger :--> PBool)
go Term
s'
(PUnsortedMap PCurrencySymbol (PSortedMap PTokenName PInteger)
:--> PBool)
-> Term
s' (PUnsortedMap PCurrencySymbol (PSortedMap PTokenName PInteger))
-> Term s' PBool
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term
s' (PSortedMap PCurrencySymbol (PSortedMap PTokenName PInteger))
-> Term
s' (PUnsortedMap PCurrencySymbol (PSortedMap PTokenName PInteger))
forall (k :: S -> Type) (v :: S -> Type) (s :: S).
Term s (PSortedMap k v) -> Term s (PUnsortedMap k v)
AssocMap.pforgetSorted (Term s' PSortedValue -> Term s' (PInner PSortedValue)
forall (a :: S -> Type) (s :: S). Term s a -> Term s (PInner a)
pto Term s' PSortedValue
v)
where
go :: forall (s' :: S). Term s' (AssocMap.PSortedMap PTokenName PInteger :--> PBool)
go :: forall (s' :: S).
Term s' (PSortedMap PTokenName PInteger :--> PBool)
go = (forall (s' :: S).
Term s' (PSortedMap PTokenName PInteger :--> PBool))
-> Term s' (PSortedMap PTokenName PInteger :--> PBool)
forall (a :: S -> Type) (s :: S).
HasCallStack =>
(forall (s' :: S). Term s' a) -> Term s a
phoistAcyclic ((forall (s' :: S).
Term s' (PSortedMap PTokenName PInteger :--> PBool))
-> Term s' (PSortedMap PTokenName PInteger :--> PBool))
-> (forall (s' :: S).
Term s' (PSortedMap PTokenName PInteger :--> PBool))
-> Term s' (PSortedMap PTokenName PInteger :--> PBool)
forall a b. (a -> b) -> a -> b
$ (Term s' (PSortedMap PTokenName PInteger) -> Term s' PBool)
-> Term s' (PSortedMap PTokenName PInteger :--> PBool)
forall a (b :: S -> Type) (s :: S) (c :: S -> Type).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: S -> Type).
HasCallStack =>
(Term s' c -> Term s' PBool) -> Term s' (c :--> PBool)
plam ((Term s' (PSortedMap PTokenName PInteger) -> Term s' PBool)
-> Term s' (PSortedMap PTokenName PInteger :--> PBool))
-> (Term s' (PSortedMap PTokenName PInteger) -> Term s' PBool)
-> Term s' (PSortedMap PTokenName PInteger :--> PBool)
forall a b. (a -> b) -> a -> b
$ \Term s' (PSortedMap PTokenName PInteger)
m ->
Term
s'
((PInteger :--> PBool)
:--> (PUnsortedMap PTokenName PInteger :--> PBool))
forall (k :: S -> Type) (v :: S -> Type) (s :: S).
PIsData v =>
Term s ((v :--> PBool) :--> (PUnsortedMap k v :--> PBool))
AssocMap.pall Term
s'
((PInteger :--> PBool)
:--> (PUnsortedMap PTokenName PInteger :--> PBool))
-> Term s' (PInteger :--> PBool)
-> Term s' (PUnsortedMap PTokenName PInteger :--> PBool)
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# (Term s' PInteger -> Term s' PBool)
-> Term s' (PInteger :--> PBool)
forall a (b :: S -> Type) (s :: S) (c :: S -> Type).
(PLamN a b s, HasCallStack) =>
(Term s c -> a) -> Term s (c :--> b)
forall (c :: S -> Type).
HasCallStack =>
(Term s' c -> Term s' PBool) -> Term s' (c :--> PBool)
plam (\Term s' PInteger
i -> Term s' PBool -> Term s' PBool -> Term s' PBool -> Term s' PBool
forall (a :: S -> Type) (s :: S).
Term s PBool -> Term s a -> Term s a -> Term s a
pif (Term s' PInteger
i Term s' PInteger -> Term s' PInteger -> Term s' PBool
forall (s :: S). Term s PInteger -> Term s PInteger -> Term s PBool
forall (t :: S -> Type) (s :: S).
PEq t =>
Term s t -> Term s t -> Term s PBool
#== Term s' PInteger
0) (PBool s' -> Term s' PBool
forall (a :: S -> Type) (s :: S). PlutusType a => a s -> Term s a
pcon PBool s'
forall (s :: S). PBool s
PFalse) (PBool s' -> Term s' PBool
forall (a :: S -> Type) (s :: S). PlutusType a => a s -> Term s a
pcon PBool s'
forall (s :: S). PBool s
PTrue)) Term s' (PUnsortedMap PTokenName PInteger :--> PBool)
-> Term s' (PUnsortedMap PTokenName PInteger) -> Term s' PBool
forall (s :: S) (a :: S -> Type) (b :: S -> Type).
Term s (a :--> b) -> Term s a -> Term s b
# Term s' (PSortedMap PTokenName PInteger)
-> Term s' (PUnsortedMap PTokenName PInteger)
forall (k :: S -> Type) (v :: S -> Type) (s :: S).
Term s (PSortedMap k v) -> Term s (PUnsortedMap k v)
AssocMap.pforgetSorted Term s' (PSortedMap PTokenName PInteger)
m