| Maintainer | connor@mlabs.city |
|---|---|
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Agora.Effect.GovernorMutation
Contents
Description
An effect for mutating governor settings.
Synopsis
- data MutateGovernorDatum = MutateGovernorDatum {}
- newtype PMutateGovernorDatum (s :: S) = PMutateGovernorDatum (Term s (PDataRecord '["governorRef" := PTxOutRef, "newDatum" := PGovernorDatum]))
- mutateGovernorValidator :: Governor -> ClosedTerm PValidator
Haskell-land
data MutateGovernorDatum Source #
Haskell-level datum for the governor mutation effect script.
Since: 0.1.0
Constructors
| MutateGovernorDatum | |
Fields
| |
Instances
Plutarch-land
newtype PMutateGovernorDatum (s :: S) Source #
Plutarch-level version of MutateGovernorDatum.
Since: 0.1.0
Constructors
| PMutateGovernorDatum (Term s (PDataRecord '["governorRef" := PTxOutRef, "newDatum" := PGovernorDatum])) |
Instances
Scripts
mutateGovernorValidator :: Governor -> ClosedTerm PValidator Source #
Validator for the governor mutation effect.
This effect is implemented using the makeEffect wrapper,
meaning that the burning of GAT is checked in said wrapper.
In order to locate the governor, the validator is parametrized with a Governor.
All the information it needs to validate the effect is encoded in the MutateGovernorDatum,
so regardless what redeemer it's given, it will check:
- No token is minted/burnt other than GAT.
- Nothing is being paid to the the effect validator.
The governor's state UTXO must be spent:
- It carries exactly one GST.
- It's referenced by
governorRefin the effect's datum.
A new state UTXO is paid to the governor:
- It contains the GST.
- It has valid governor state datum.
- The datum is exactly the same as the
newDatum.
Since: 0.1.0