Apply governor mutation based on existing datum
This commit is contained in:
parent
d5271cc9f9
commit
aab8580ac2
3 changed files with 71 additions and 21 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue