diff --git a/agora/Agora/Governor.hs b/agora/Agora/Governor.hs index 33584e1..34777ad 100644 --- a/agora/Agora/Governor.hs +++ b/agora/Agora/Governor.hs @@ -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 ()) diff --git a/agora/Agora/Stake.hs b/agora/Agora/Stake.hs index 7a90877..bb7f471 100644 --- a/agora/Agora/Stake.hs +++ b/agora/Agora/Stake.hs @@ -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: