Skip to content

Commit

Permalink
Merge pull request #284 from input-output-hk/smelc/expose-dreg-regist…
Browse files Browse the repository at this point in the history
…ration-anchor

conway drep registration: expose ledger anchor parameter
  • Loading branch information
smelc committed Oct 2, 2023
2 parents a3e20c1 + 55d1e6c commit e1e62e6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cardano-api/internal/Cardano/Api/Certificate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@ import qualified Cardano.Api.ReexposeLedger as Ledger
import Cardano.Api.SerialiseCBOR
import Cardano.Api.SerialiseTextEnvelope
import Cardano.Api.StakePoolMetadata
import Cardano.Api.Utils (noInlineMaybeToStrictMaybe)
import Cardano.Api.Value

import qualified Cardano.Ledger.Conway.Governance as Ledger

import Data.ByteString (ByteString)
import qualified Data.Foldable as Foldable
import Data.IP (IPv4, IPv6)
Expand Down Expand Up @@ -588,14 +591,15 @@ data DRepRegistrationRequirements era where

makeDrepRegistrationCertificate :: ()
=> DRepRegistrationRequirements era
-> Maybe (Ledger.Anchor (EraCrypto (ShelleyLedgerEra era)))
-> Certificate era
makeDrepRegistrationCertificate (DRepRegistrationRequirements conwayOnwards (VotingCredential vcred) deposit) =
makeDrepRegistrationCertificate (DRepRegistrationRequirements conwayOnwards (VotingCredential vcred) deposit) anchor =
ConwayCertificate conwayOnwards
. Ledger.ConwayTxCertGov
$ Ledger.ConwayRegDRep
vcred
(toShelleyLovelace deposit)
Ledger.SNothing -- TODO: Conway era
(noInlineMaybeToStrictMaybe anchor)

data CommitteeHotKeyAuthorizationRequirements era where
CommitteeHotKeyAuthorizationRequirements
Expand Down

0 comments on commit e1e62e6

Please sign in to comment.