fix typo, add stubs on Governor

This commit is contained in:
Emily Martins 2022-04-04 13:37:06 +02:00
parent 4ef7c7866c
commit 51b1e726fc
2 changed files with 29 additions and 2 deletions

View file

@ -5,9 +5,22 @@ Description: Governor entity scripts acting as authority of entire system.
Governor entity scripts acting as authority of entire system.
-}
module Agora.Governor (GovernorDatum (..), GovernorRedeemer (..), Governor (..)) where
module Agora.Governor (
-- * Haskell-land
GovernorDatum (..),
GovernorRedeemer (..),
Governor (..),
-- * Plutarch-land
-- * Scripts
governorPolicy,
governorValidator,
) where
import Agora.Proposal (ProposalThresholds)
import Plutarch (popaque)
import Plutarch.Api.V1 (PMintingPolicy, PValidator)
-- | Datum for the Governor script.
newtype GovernorDatum = GovernorDatum
@ -31,3 +44,17 @@ data GovernorRedeemer
-- | Parameters for creating Governor scripts.
data Governor
= Governor
--------------------------------------------------------------------------------
-- | Policy for Governors.
governorPolicy :: Governor -> ClosedTerm PMintingPolicy
governorPolicy _ =
plam $ \_redeemer _ctx' -> P.do
popaque (pconstant ())
-- | Validator for Governors.
governorValidator :: Governor -> ClosedTerm PValidator
governorValidator _ =
plam $ \_datum _redeemer _ctx' -> P.do
popaque (pconstant ())

View file

@ -99,7 +99,7 @@ newtype Stake = Stake
on voting which in turn creates contention on stakers.
Vaguely this is the dependency graph for this locking
interaction. Both the stake vaalidator and the proposal
interaction. Both the stake validator and the proposal
validator are only able to check for eachother through
the datum belonging to the ST: