Skip to content

Commit

Permalink
Modify ProposeNewConstitution to specify a constitution script
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimbo4350 committed Feb 23, 2024
1 parent 1d1cec1 commit e75f8b0
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ data GovernanceAction era
| ProposeNewConstitution
(StrictMaybe (Ledger.GovPurposeId Ledger.ConstitutionPurpose (ShelleyLedgerEra era)))
(Ledger.Anchor StandardCrypto)
(StrictMaybe (Shelley.ScriptHash StandardCrypto))
| ProposeNewCommittee
(StrictMaybe (Ledger.GovPurposeId Ledger.CommitteePurpose (ShelleyLedgerEra era)))
[Hash CommitteeColdKey] -- ^ Old constitutional committee
Expand All @@ -76,10 +77,10 @@ toGovernanceAction sbe =
shelleyBasedEraConstraints sbe $ \case
MotionOfNoConfidence prevGovId ->
Gov.NoConfidence prevGovId
ProposeNewConstitution prevGovAction anchor ->
ProposeNewConstitution prevGovAction anchor mConstitutionScriptHash ->
Gov.NewConstitution prevGovAction Gov.Constitution
{ Gov.constitutionAnchor = anchor
, Gov.constitutionScript = SNothing -- TODO: Conway era
, Gov.constitutionScript = mConstitutionScriptHash -- TODO: Conway era
}
ProposeNewCommittee prevGovId oldCommitteeMembers newCommitteeMembers quor ->
Gov.UpdateCommittee
Expand Down Expand Up @@ -109,7 +110,9 @@ fromGovernanceAction = \case
Gov.NoConfidence prevGovId ->
MotionOfNoConfidence prevGovId
Gov.NewConstitution prevGovId constitution ->
ProposeNewConstitution prevGovId $ Gov.constitutionAnchor constitution
ProposeNewConstitution prevGovId
(Gov.constitutionAnchor constitution)
(Gov.constitutionScript constitution)
Gov.ParameterChange prevGovId pparams govPolicy ->
UpdatePParams prevGovId pparams govPolicy
Gov.HardForkInitiation prevGovId pVer ->
Expand Down

0 comments on commit e75f8b0

Please sign in to comment.