remove hasOnlyOneTokenOfAssetClass'

This commit is contained in:
fanghr 2022-04-29 17:25:17 +08:00
parent 1e2b20dfef
commit 0e6369030e
No known key found for this signature in database
GPG key ID: 35CD9A71CD5D5870

View file

@ -43,7 +43,6 @@ module Agora.Utils (
validatorHashToTokenName,
pvalidatorHashToTokenName,
getMintingPolicySymbol,
hasOnlyOneTokenOfAssetClass',
hasOnlyOneTokenOfCurrencySymbol,
mustFindDatum',
mustBePJust,
@ -517,11 +516,6 @@ pvalidatorHashToTokenName vh = pcon (PTokenName (pto vh))
getMintingPolicySymbol :: ClosedTerm PMintingPolicy -> CurrencySymbol
getMintingPolicySymbol v = mintingPolicySymbol $ mkMintingPolicy v
-- | The entire value only contains one token of the specific assetclass.
hasOnlyOneTokenOfAssetClass' :: AssetClass -> Term s (PValue :--> PBool)
hasOnlyOneTokenOfAssetClass' ac = phoistAcyclic $
plam $ \vs -> passetClassValueOf' ac # vs #== 1
-- | The entire value only contains one token of the given currency symbol.
hasOnlyOneTokenOfCurrencySymbol :: Term s (PCurrencySymbol :--> PValue :--> PBool)
hasOnlyOneTokenOfCurrencySymbol = phoistAcyclic $