fix typos/grammar/docstrings, suggested by @jhodgdev

Co-authored-by: Jack Hodgkinson <30505104+jhodgdev@users.noreply.github.com>
This commit is contained in:
fanghr 2022-04-28 17:20:21 +08:00
parent c7bfe116d5
commit c1976b86fc
No known key found for this signature in database
GPG key ID: 35CD9A71CD5D5870
2 changed files with 8 additions and 6 deletions

View file

@ -2,7 +2,7 @@
{- |
Module : Agora.Governor
Maintainer : chfanghr@gmail.com
Maintainer : connor@mlabs.city
Description: 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
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.
@ -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 gov = AssetClass (symbol, "")
where
@ -783,7 +783,7 @@ gstAssetClass gov = AssetClass (symbol, "")
symbol :: CurrencySymbol
symbol = mintingPolicySymbol policy
-- | Get the currency symbol of GAT from governor parameters.
-- | Get the `CurrencySymbol` of GAT from 'Governor'.
gatSymbol :: Governor -> CurrencySymbol
gatSymbol gov = mintingPolicySymbol policy
where

View file

@ -380,13 +380,15 @@ pisDJust = phoistAcyclic $
)
-- | 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 = phoistAcyclic $
plam $ \ctx -> P.do
PMinting m <- pmatch $ pfield @"purpose" # ctx
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 = phoistAcyclic $
plam $ \oref info -> P.do
@ -529,7 +531,7 @@ hasOnlyOneTokenOfAssetClass' :: AssetClass -> Term s (PValue :--> PBool)
hasOnlyOneTokenOfAssetClass' ac = phoistAcyclic $
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 = phoistAcyclic $
plam $ \cs vs -> P.do