fix typo, add stubs on Governor
This commit is contained in:
parent
94383b33ca
commit
5d01dfb642
2 changed files with 29 additions and 2 deletions
|
|
@ -5,9 +5,22 @@ 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.
|
||||||
-}
|
-}
|
||||||
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 Agora.Proposal (ProposalThresholds)
|
||||||
|
import Plutarch (popaque)
|
||||||
|
import Plutarch.Api.V1 (PMintingPolicy, PValidator)
|
||||||
|
|
||||||
-- | Datum for the Governor script.
|
-- | Datum for the Governor script.
|
||||||
newtype GovernorDatum = GovernorDatum
|
newtype GovernorDatum = GovernorDatum
|
||||||
|
|
@ -31,3 +44,17 @@ data GovernorRedeemer
|
||||||
-- | Parameters for creating Governor scripts.
|
-- | Parameters for creating Governor scripts.
|
||||||
data Governor
|
data Governor
|
||||||
= 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 ())
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ newtype Stake = Stake
|
||||||
on voting which in turn creates contention on stakers.
|
on voting which in turn creates contention on stakers.
|
||||||
|
|
||||||
Vaguely this is the dependency graph for this locking
|
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
|
validator are only able to check for eachother through
|
||||||
the datum belonging to the ST:
|
the datum belonging to the ST:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue