fix typos/grammar/docstrings, suggested by @jhodgdev
Co-authored-by: Jack Hodgkinson <30505104+jhodgdev@users.noreply.github.com>
This commit is contained in:
parent
836ec5e9cf
commit
62c359aac3
2 changed files with 8 additions and 6 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{- |
|
{- |
|
||||||
Module : Agora.Governor
|
Module : Agora.Governor
|
||||||
Maintainer : chfanghr@gmail.com
|
Maintainer : connor@mlabs.city
|
||||||
Description: Governor entity scripts acting as authority of entire system.
|
Description: Governor entity scripts acting as authority of entire system.
|
||||||
|
|
||||||
Governor entity scripts acting as authority of entire system.
|
Governor entity scripts acting as authority of entire system.
|
||||||
|
|
@ -137,7 +137,7 @@ import PlutusTx qualified
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
{- $gst
|
{- $gst
|
||||||
Governance state token, aka. GST, is an NFT that identifies an UTXO that carries the state datum of the Governance script.
|
Governance state token, aka. GST, is an NFT that identifies a UTXO that carries the state datum of the Governance script.
|
||||||
|
|
||||||
This token is minted by a one-shot monetary policy 'governorPolicy', meaning that the token has guaranteed uniqueness.
|
This token is minted by a one-shot monetary policy 'governorPolicy', meaning that the token has guaranteed uniqueness.
|
||||||
|
|
||||||
|
|
@ -773,7 +773,7 @@ governorValidator gov =
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
-- | Get the assetclass of GST from governor parameters.
|
-- | Get the 'AssetClass' of GST from 'Governor'.
|
||||||
gstAssetClass :: Governor -> AssetClass
|
gstAssetClass :: Governor -> AssetClass
|
||||||
gstAssetClass gov = AssetClass (symbol, "")
|
gstAssetClass gov = AssetClass (symbol, "")
|
||||||
where
|
where
|
||||||
|
|
@ -783,7 +783,7 @@ gstAssetClass gov = AssetClass (symbol, "")
|
||||||
symbol :: CurrencySymbol
|
symbol :: CurrencySymbol
|
||||||
symbol = mintingPolicySymbol policy
|
symbol = mintingPolicySymbol policy
|
||||||
|
|
||||||
-- | Get the currency symbol of GAT from governor parameters.
|
-- | Get the `CurrencySymbol` of GAT from 'Governor'.
|
||||||
gatSymbol :: Governor -> CurrencySymbol
|
gatSymbol :: Governor -> CurrencySymbol
|
||||||
gatSymbol gov = mintingPolicySymbol policy
|
gatSymbol gov = mintingPolicySymbol policy
|
||||||
where
|
where
|
||||||
|
|
|
||||||
|
|
@ -380,13 +380,15 @@ pisDJust = phoistAcyclic $
|
||||||
)
|
)
|
||||||
|
|
||||||
-- | The 'CurrencySymbol' of the current minting policy.
|
-- | The 'CurrencySymbol' of the current minting policy.
|
||||||
|
-- FIXME: Yeet/reimplement this function, since passing the whole script context is highly inefficient.
|
||||||
pownCurrencySymbol :: Term s (PScriptContext :--> PCurrencySymbol)
|
pownCurrencySymbol :: Term s (PScriptContext :--> PCurrencySymbol)
|
||||||
pownCurrencySymbol = phoistAcyclic $
|
pownCurrencySymbol = phoistAcyclic $
|
||||||
plam $ \ctx -> P.do
|
plam $ \ctx -> P.do
|
||||||
PMinting m <- pmatch $ pfield @"purpose" # ctx
|
PMinting m <- pmatch $ pfield @"purpose" # ctx
|
||||||
pfield @"_0" # m
|
pfield @"_0" # m
|
||||||
|
|
||||||
-- | Determines if a given utxo is spent.
|
-- | Determines if a given UTXO is spent.
|
||||||
|
-- TODO: no need to pass the whole TxInfo here.
|
||||||
pisUxtoSpent :: Term s (PTxOutRef :--> PTxInfo :--> PBool)
|
pisUxtoSpent :: Term s (PTxOutRef :--> PTxInfo :--> PBool)
|
||||||
pisUxtoSpent = phoistAcyclic $
|
pisUxtoSpent = phoistAcyclic $
|
||||||
plam $ \oref info -> P.do
|
plam $ \oref info -> P.do
|
||||||
|
|
@ -529,7 +531,7 @@ hasOnlyOneTokenOfAssetClass' :: AssetClass -> Term s (PValue :--> PBool)
|
||||||
hasOnlyOneTokenOfAssetClass' ac = phoistAcyclic $
|
hasOnlyOneTokenOfAssetClass' ac = phoistAcyclic $
|
||||||
plam $ \vs -> passetClassValueOf' ac # vs #== 1
|
plam $ \vs -> passetClassValueOf' ac # vs #== 1
|
||||||
|
|
||||||
-- | The entire value only contains one token of the specific currency symbol.
|
-- | The entire value only contains one token of the given currency symbol.
|
||||||
hasOnlyOneTokenOfCurrencySymbol :: Term s (PCurrencySymbol :--> PValue :--> PBool)
|
hasOnlyOneTokenOfCurrencySymbol :: Term s (PCurrencySymbol :--> PValue :--> PBool)
|
||||||
hasOnlyOneTokenOfCurrencySymbol = phoistAcyclic $
|
hasOnlyOneTokenOfCurrencySymbol = phoistAcyclic $
|
||||||
plam $ \cs vs -> P.do
|
plam $ \cs vs -> P.do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue