Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module provides the necessary instances of HasSpec
and HasSimpleRep
for the components of PParams. It hides
the fact that (PParams era) can have different underlying 'data' types
in each era, and provides (Term fn) selector functions
(e.g. minFeeA_, minFeeB_, etc.) for every PParam field (in every era).
The class EraPP provides this era parametric abstraction.
Synopsis
- class (Reflect era, Eq (PParamsHKD Identity era), Show (PParamsHKD Identity era), Eq (PParamsHKD StrictMaybe era), Show (PParamsHKD StrictMaybe era), EraPParams era) ⇒ EraPP era where
- subsetToPP ∷ SimplePParams era → PParams era
- ppToSubset ∷ PParams era → SimplePParams era
- updateToPPU ∷ SimplePPUpdate → PParamsUpdate era
- ppuToUpdate ∷ PParamsUpdate era → SimplePPUpdate
- data SimplePParams era = SimplePParams {
- minFeeA ∷ Coin
- minFeeB ∷ Coin
- maxBBSize ∷ Word32
- maxTxSize ∷ Word32
- maxBHSize ∷ Word32
- keyDeposit ∷ Coin
- poolDeposit ∷ Coin
- eMax ∷ EpochInterval
- nOpt ∷ Natural
- a0 ∷ NonNegativeInterval
- rho ∷ UnitInterval
- tau ∷ UnitInterval
- decentral ∷ UnitInterval
- protocolVersion ∷ ProtVer
- minUTxOValue ∷ Coin
- minPoolCost ∷ Coin
- coinsPerUTxOWord ∷ Coin
- costModels ∷ CostModels
- prices ∷ Prices
- maxTxExUnits ∷ ExUnits
- maxBlockExUnits ∷ ExUnits
- maxValSize ∷ Natural
- collateralPercentage ∷ Natural
- maxCollateralInputs ∷ Natural
- coinsPerUTxOByte ∷ Coin
- poolVotingThresholds ∷ PoolVotingThresholds
- drepVotingThresholds ∷ DRepVotingThresholds
- committeeMinSize ∷ Natural
- committeeMaxTermLength ∷ EpochInterval
- govActionLifetime ∷ EpochInterval
- govActionDeposit ∷ Coin
- dRepDeposit ∷ Coin
- dRepActivity ∷ EpochInterval
- minFeeRefScriptCostPerByte ∷ NonNegativeInterval
- data SimplePPUpdate = SimplePPUpdate {
- uminFeeA ∷ StrictMaybe Coin
- uminFeeB ∷ StrictMaybe Coin
- umaxBBSize ∷ StrictMaybe Word32
- umaxTxSize ∷ StrictMaybe Word32
- umaxBHSize ∷ StrictMaybe Word32
- ukeyDeposit ∷ StrictMaybe Coin
- upoolDeposit ∷ StrictMaybe Coin
- ueMax ∷ StrictMaybe EpochInterval
- unOpt ∷ StrictMaybe Natural
- ua0 ∷ StrictMaybe NonNegativeInterval
- urho ∷ StrictMaybe UnitInterval
- utau ∷ StrictMaybe UnitInterval
- udecentral ∷ StrictMaybe UnitInterval
- uprotocolVersion ∷ StrictMaybe ProtVer
- uminUTxOValue ∷ StrictMaybe Coin
- uminPoolCost ∷ StrictMaybe Coin
- ucoinsPerUTxOWord ∷ StrictMaybe Coin
- ucostModels ∷ StrictMaybe CostModels
- uprices ∷ StrictMaybe Prices
- umaxTxExUnits ∷ StrictMaybe ExUnits
- umaxBlockExUnits ∷ StrictMaybe ExUnits
- umaxValSize ∷ StrictMaybe Natural
- ucollateralPercentage ∷ StrictMaybe Natural
- umaxCollateralInputs ∷ StrictMaybe Natural
- ucoinsPerUTxOByte ∷ StrictMaybe Coin
- upoolVotingThresholds ∷ StrictMaybe PoolVotingThresholds
- udrepVotingThresholds ∷ StrictMaybe DRepVotingThresholds
- ucommitteeMinSize ∷ StrictMaybe Natural
- ucommitteeMaxTermLength ∷ StrictMaybe EpochInterval
- ugovActionLifetime ∷ StrictMaybe EpochInterval
- ugovActionDeposit ∷ StrictMaybe Coin
- udRepDeposit ∷ StrictMaybe Coin
- udRepActivity ∷ StrictMaybe EpochInterval
- uminFeeRefScriptCostPerByte ∷ StrictMaybe NonNegativeInterval
- simplePParamsSpec ∷ ∀ fn era. (EraPP era, BaseUniverse fn) ⇒ Specification fn (SimplePParams era)
- cSNothing_ ∷ (HasSpec fn a, IsNormalType a) ⇒ Term fn (StrictMaybe a)
- cSJust_ ∷ (HasSpec fn a, IsNormalType a) ⇒ Term fn a → Term fn (StrictMaybe a)
- succV_ ∷ BaseUniverse fn ⇒ Term fn Version → Term fn Version
- minFeeA_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- minFeeB_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- maxBBSize_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Word32
- maxTxSize_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Word32
- maxBHSize_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Word32
- keyDeposit_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- poolDeposit_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- eMax_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval
- nOpt_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural
- a0_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn NonNegativeInterval
- rho_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn UnitInterval
- tau_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn UnitInterval
- decentral_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn UnitInterval
- protocolVersion_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn ProtVer
- minUTxOValue_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- minPoolCost_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- coinsPerUTxOWord_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- costModels_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn CostModels
- prices_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Prices
- maxTxExUnits_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn ExUnits
- maxBlockExUnits_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn ExUnits
- maxValSize_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural
- collateralPercentage_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural
- maxCollateralInputs_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural
- coinsPerUTxOByte_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- poolVotingThresholds_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn PoolVotingThresholds
- drepVotingThresholds_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn DRepVotingThresholds
- committeeMinSize_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural
- committeeMaxTermLength_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval
- govActionLifetime_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval
- govActionDeposit_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- dRepDeposit_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- dRepActivity_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval
- minFeeRefScriptCostPerByte_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn NonNegativeInterval
Documentation
class (Reflect era, Eq (PParamsHKD Identity era), Show (PParamsHKD Identity era), Eq (PParamsHKD StrictMaybe era), Show (PParamsHKD StrictMaybe era), EraPParams era) ⇒ EraPP era where Source #
subsetToPP ∷ SimplePParams era → PParams era Source #
ppToSubset ∷ PParams era → SimplePParams era Source #
updateToPPU ∷ SimplePPUpdate → PParamsUpdate era Source #
ppuToUpdate ∷ PParamsUpdate era → SimplePPUpdate Source #
Instances
EraPP Allegra Source # | |
EraPP Alonzo Source # | |
EraPP Babbage Source # | |
EraPP Conway Source # | |
EraPP Mary Source # | |
EraPP Shelley Source # | |
data SimplePParams era Source #
Use this as the SimpleRep of (PParams era). It is polymorphic enough to encode PParams in EVERY Era. The EraPParams instances remove the fields that do not appear in that Era.
Instances
data SimplePPUpdate Source #
Use this as the SimpleRep of (PParamsUpdate era)
Instances
simplePParamsSpec ∷ ∀ fn era. (EraPP era, BaseUniverse fn) ⇒ Specification fn (SimplePParams era) Source #
A sample of how to constrain (PParams era) for every Era, by writing a specification for SimplePParams. Constrained but not applicable fields (for that era) are elided in the result. Missing fields are left unconstrained and will appear as random values in the result. This can easily be lifted to PParams: see Test.Cardano.Ledger.Constrained.Conway.PParams(pparamsSpec)
cSNothing_ ∷ (HasSpec fn a, IsNormalType a) ⇒ Term fn (StrictMaybe a) Source #
cSJust_ ∷ (HasSpec fn a, IsNormalType a) ⇒ Term fn a → Term fn (StrictMaybe a) Source #
minFeeA_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
minFeeB_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
maxBBSize_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Word32 Source #
maxTxSize_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Word32 Source #
maxBHSize_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Word32 Source #
keyDeposit_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
poolDeposit_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
eMax_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval Source #
nOpt_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural Source #
a0_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn NonNegativeInterval Source #
rho_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn UnitInterval Source #
tau_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn UnitInterval Source #
decentral_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn UnitInterval Source #
protocolVersion_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn ProtVer Source #
minUTxOValue_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
minPoolCost_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
coinsPerUTxOWord_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
costModels_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn CostModels Source #
prices_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Prices Source #
maxTxExUnits_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn ExUnits Source #
maxBlockExUnits_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn ExUnits Source #
maxValSize_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural Source #
collateralPercentage_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural Source #
maxCollateralInputs_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural Source #
coinsPerUTxOByte_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
poolVotingThresholds_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn PoolVotingThresholds Source #
drepVotingThresholds_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn DRepVotingThresholds Source #
committeeMinSize_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural Source #
committeeMaxTermLength_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval Source #
govActionLifetime_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval Source #
govActionDeposit_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
dRepDeposit_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
dRepActivity_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval Source #
minFeeRefScriptCostPerByte_ ∷ (EraPP era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn NonNegativeInterval Source #