Apply governor mutation based on existing datum

This commit is contained in:
Daniel Farrelly 2023-03-29 21:33:09 +01:00 committed by Emily Martins
parent d5271cc9f9
commit aab8580ac2
3 changed files with 71 additions and 21 deletions

View file

@ -86,10 +86,10 @@ effectRef =
1
-- | The input effect datum in 'mkEffectTransaction'.
mkEffectDatum :: GovernorDatum -> MutateGovernorDatum
mkEffectDatum newGovDatum =
mkEffectDatum :: GovernorDatum -> GovernorDatum -> MutateGovernorDatum
mkEffectDatum oldGovDatum newGovDatum =
MutateGovernorDatum
{ governorRef = govRef
{ oldDatum = oldGovDatum
, newDatum = newGovDatum
}
@ -131,7 +131,7 @@ mkEffectTxInfo newGovDatum =
-- The effect should update 'nextProposalId'
effectInputDatum' :: MutateGovernorDatum
effectInputDatum' = mkEffectDatum newGovDatum
effectInputDatum' = mkEffectDatum governorInputDatum' newGovDatum
effectInputDatum :: Datum
effectInputDatum = Datum $ toBuiltinData effectInputDatum'
effectInput :: TxOut