Skip to content

Commit

Permalink
More changed to VotingProcedure
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimbo4350 committed Jun 23, 2023
1 parent c37fc54 commit e21d8be
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ newtype GoveranceActionIdentifier ledgerera
deriving (Show, Eq)

makeGoveranceActionIdentifier
:: EraCrypto ledgerera ~ StandardCrypto
=> TxIn -> GoveranceActionIdentifier ledgerera
makeGoveranceActionIdentifier txin =
:: EraCrypto (ShelleyLedgerEra era) ~ StandardCrypto
=> ShelleyBasedEra era -> TxIn -> GoveranceActionIdentifier (ShelleyLedgerEra era)
makeGoveranceActionIdentifier _ txin =
let Ledger.TxIn txid (Ledger.TxIx txix) = toShelleyTxIn txin
in GoveranceActionIdentifier $
Gov.GovernanceActionId
Expand Down Expand Up @@ -110,13 +110,14 @@ instance TestEquality (Ledger.Credential 'Voting) where
-}

createVotingProcedure
:: EraCrypto ledgerera ~ StandardCrypto
=> VoteChoice
:: EraCrypto (ShelleyLedgerEra era) ~ StandardCrypto
=> ShelleyBasedEra era
-> VoteChoice
-> VoterType
-> GoveranceActionIdentifier ledgerera
-> VotingCredential ledgerera -- ^ Governance witness credential (ledger checks that you are allowed to vote)
-> Gov.VotingProcedure ledgerera
createVotingProcedure vChoice vt (GoveranceActionIdentifier govActId) (VotingCredential govWitnessCredential) =
-> GoveranceActionIdentifier (ShelleyLedgerEra era)
-> VotingCredential (ShelleyLedgerEra era) -- ^ Governance witness credential (ledger checks that you are allowed to vote)
-> Gov.VotingProcedure (ShelleyLedgerEra era)
createVotingProcedure _ vChoice vt (GoveranceActionIdentifier govActId) (VotingCredential govWitnessCredential) =
Gov.VotingProcedure
{ Gov.vProcGovActionId = govActId
, Gov.vProcRole = toVoterRole vt
Expand Down

0 comments on commit e21d8be

Please sign in to comment.