| Maintainer | connor@mlabs.city |
|---|---|
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Agora.Governor
Description
Governor entity scripts acting as authority of entire system.
Synopsis
- data GovernorDatum = GovernorDatum {}
- data GovernorRedeemer
- data Governor = Governor {}
- newtype PGovernorDatum (s :: S) = PGovernorDatum {
- getGovernorDatum :: Term s (PDataRecord '["proposalThresholds" := PProposalThresholds, "nextProposalId" := PProposalId, "proposalTimings" := PProposalTimingConfig, "createProposalTimeRangeMaxWidth" := PMaxTimeRangeWidth])
- data PGovernorRedeemer (s :: S)
- = PCreateProposal (Term s (PDataRecord '[]))
- | PMintGATs (Term s (PDataRecord '[]))
- | PMutateGovernor (Term s (PDataRecord '[]))
- pgetNextProposalId :: Term s (PProposalId :--> PProposalId)
- getNextProposalId :: ProposalId -> ProposalId
- governorDatumValid :: Term s (PGovernorDatum :--> PBool)
Haskell-land
data GovernorDatum Source #
Datum for the Governor script.
Since: 0.1.0
Constructors
| GovernorDatum | |
Fields
| |
Instances
data GovernorRedeemer Source #
Redeemer for Governor script. The governor has two primary responsibilities:
- The gating of Proposal creation.
- The gating of minting authority tokens.
Parameters of the governor can also be mutated by an effect.
Since: 0.1.0
Constructors
| CreateProposal | Checks that a proposal was created lawfully, and allows it. |
| MintGATs | Checks that a SINGLE proposal finished correctly, and allows minting GATs for each effect script. |
| MutateGovernor | Allows effects to mutate the parameters. |
Instances
Parameters for creating Governor scripts.
Since: 0.1.0
Constructors
| Governor | |
Fields
| |
Instances
| Generic Governor Source # | |
| type Rep Governor Source # | |
Defined in Agora.Governor type Rep Governor = D1 ('MetaData "Governor" "Agora.Governor" "agora-0.1.0-C1o5klqsCO77ggIWQdJiNp" 'False) (C1 ('MetaCons "Governor" 'PrefixI 'True) (S1 ('MetaSel ('Just "gstOutRef") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxOutRef) :*: (S1 ('MetaSel ('Just "gtClassRef") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Tagged GTTag AssetClass)) :*: S1 ('MetaSel ('Just "maximumCosigners") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))) | |
Plutarch-land
newtype PGovernorDatum (s :: S) Source #
Plutarch-level datum for the Governor script.
Since: 0.1.0
Constructors
| PGovernorDatum | |
Fields
| |
Instances
data PGovernorRedeemer (s :: S) Source #
Plutarch-level version of GovernorRedeemer.
Since: 0.1.0
Constructors
| PCreateProposal (Term s (PDataRecord '[])) | |
| PMintGATs (Term s (PDataRecord '[])) | |
| PMutateGovernor (Term s (PDataRecord '[])) |
Instances
Utilities
pgetNextProposalId :: Term s (PProposalId :--> PProposalId) Source #
Plutrach version of getNextProposalId.
Since: 0.1.0
getNextProposalId :: ProposalId -> ProposalId Source #
Get next proposal id.
Since: 0.1.0
governorDatumValid :: Term s (PGovernorDatum :--> PBool) Source #
Check whether a particular PGovernorDatum is well-formed.
Since: 0.1.0