move GovernorMutation effect to Effect
This commit is contained in:
parent
eb6b617d4d
commit
7c5c8d423a
2 changed files with 9 additions and 9 deletions
|
|
@ -129,9 +129,9 @@ library
|
||||||
exposed-modules:
|
exposed-modules:
|
||||||
Agora.AuthorityToken
|
Agora.AuthorityToken
|
||||||
Agora.Effect
|
Agora.Effect
|
||||||
|
Agora.Effect.GovernorMutation
|
||||||
Agora.Effect.NoOp
|
Agora.Effect.NoOp
|
||||||
Agora.Effect.TreasuryWithdrawal
|
Agora.Effect.TreasuryWithdrawal
|
||||||
Agora.Effects.GovernorMutation
|
|
||||||
Agora.Governor
|
Agora.Governor
|
||||||
Agora.Governor.Scripts
|
Agora.Governor.Scripts
|
||||||
Agora.MultiSig
|
Agora.MultiSig
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
{-# LANGUAGE TemplateHaskell #-}
|
{-# LANGUAGE TemplateHaskell #-}
|
||||||
|
|
||||||
{- |
|
{- |
|
||||||
Module : Agora.Effects.GovernorMutation
|
Module : Agora.Effect.GovernorMutation
|
||||||
Maintainer : chfanghr@gmail.com
|
Maintainer : chfanghr@gmail.com
|
||||||
Description: An effect that mutates governor settings
|
Description: An effect that mutates governor settings
|
||||||
|
|
||||||
An effect for mutating governor settings
|
An effect for mutating governor settings
|
||||||
-}
|
-}
|
||||||
module Agora.Effects.GovernorMutation (
|
module Agora.Effect.GovernorMutation (
|
||||||
-- * Haskell-land
|
-- * Haskell-land
|
||||||
MutateGovernorDatum (..),
|
MutateGovernorDatum (..),
|
||||||
|
|
||||||
-- * Plutarch-land
|
-- * Plutarch-land
|
||||||
PMutateGovernorDatum (..),
|
PMutateGovernorDatum (..),
|
||||||
|
|
||||||
-- * Scripts
|
-- * Scripts
|
||||||
mutateGovernorValidator,
|
mutateGovernorValidator,
|
||||||
) where
|
) where
|
||||||
|
|
@ -68,10 +68,10 @@ import Agora.Utils (
|
||||||
|
|
||||||
-- | Haskell-level datum for the governor mutation effect script.
|
-- | Haskell-level datum for the governor mutation effect script.
|
||||||
data MutateGovernorDatum = MutateGovernorDatum
|
data MutateGovernorDatum = MutateGovernorDatum
|
||||||
{ governorRef :: TxOutRef
|
{ governorRef :: TxOutRef
|
||||||
-- ^ Referenced governor state UTXO should be updated by the effect.
|
-- ^ Referenced governor state UTXO should be updated by the effect.
|
||||||
, newDatum :: GovernorDatum
|
, newDatum :: GovernorDatum
|
||||||
-- ^ The new settings for the governor.
|
-- ^ The new settings for the governor.
|
||||||
}
|
}
|
||||||
deriving stock (Show, GHC.Generic)
|
deriving stock (Show, GHC.Generic)
|
||||||
deriving anyclass (Generic)
|
deriving anyclass (Generic)
|
||||||
|
|
@ -103,9 +103,9 @@ deriving via (DerivePConstantViaData MutateGovernorDatum PMutateGovernorDatum) i
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
{- | Validator for the governor mutation effect.
|
{- | Validator for the governor mutation effect.
|
||||||
|
|
||||||
This effect is implemented using the 'Agora.Effect.makeEffect' wrapper,
|
This effect is implemented using the 'Agora.Effect.makeEffect' wrapper,
|
||||||
meaning that the burning of GAT is checked in the said wrapper.
|
meaning that the burning of GAT is checked in the said wrapper.
|
||||||
|
|
||||||
In order to locate the governor, the validator is parametrized with a 'Agora.Governor.Governor'.
|
In order to locate the governor, the validator is parametrized with a 'Agora.Governor.Governor'.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue