apply naming suggestions from Emily and Seungheon

* `pid` -> `id`
*  `MutateParams` -> `MutateGovernor`
This commit is contained in:
fanghr 2022-04-17 12:07:06 +08:00
parent 4c770abce6
commit 5adde420f3
No known key found for this signature in database
GPG key ID: 35CD9A71CD5D5870
2 changed files with 5 additions and 5 deletions

View file

@ -100,14 +100,14 @@ data GovernorRedeemer
-- and allows minting GATs for each effect script.
MintGATs
| -- | Allows effects to mutate the parameters.
MutateParams
MutateMutateGovernor
deriving stock (Show, GHC.Generic)
PlutusTx.makeIsDataIndexed
''GovernorRedeemer
[ ('CreateProposal, 0)
, ('MintGATs, 1)
, ('MutateParams, 2)
, ('MutateMutateGovernor, 2)
]
-- | Parameters for creating Governor scripts.
@ -145,7 +145,7 @@ deriving via (DerivePConstantViaData GovernorDatum PGovernorDatum) instance (PCo
data PGovernorRedeemer (s :: S)
= PCreateProposal (Term s (PDataRecord '[]))
| PMintGATs (Term s (PDataRecord '[]))
| PMutateParams (Term s (PDataRecord '[]))
| PMutateGovernor (Term s (PDataRecord '[]))
deriving stock (GHC.Generic)
deriving anyclass (Generic)
deriving anyclass (PIsDataRepr)
@ -223,7 +223,7 @@ governorValidator params =
-- TODO: waiting for impl of proposal
ptraceError "Not implemented yet"
PMutateParams _ -> P.do
PMutateGovernor _ -> P.do
-- check that input has exactly one GAT and will be burnt
let gatAmount = psymbolValueOf # gatS # mint
passert "One GAT should be burnt" $ gatAmount #== -1

View file

@ -441,4 +441,4 @@ proposalDatumValid proposal =
--------------------------------------------------------------------------------
pnextProposalId :: Term s (PProposalId :--> PProposalId)
pnextProposalId = phoistAcyclic $ plam $ \(pto -> id) -> pcon $ PProposalId $ id + 1
pnextProposalId = phoistAcyclic $ plam $ \(pto -> pid) -> pcon $ PProposalId $ pid + 1