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 EraSpecPParams provides this era parametric abstraction.
and instances of EraSpecPParams are defined here.
Synopsis
- class (Reflect era, Eq (PParamsHKD Identity era), Show (PParamsHKD Identity era), Eq (PParamsHKD StrictMaybe era), Show (PParamsHKD StrictMaybe era), EraPParams era) ⇒ EraSpecPParams 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. (EraSpecPParams 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_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- minFeeB_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- maxBBSize_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Word32
- maxTxSize_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Word32
- maxBHSize_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Word32
- keyDeposit_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- poolDeposit_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- eMax_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval
- nOpt_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural
- a0_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn NonNegativeInterval
- rho_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn UnitInterval
- tau_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn UnitInterval
- decentral_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn UnitInterval
- protocolVersion_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn ProtVer
- minUTxOValue_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- minPoolCost_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- coinsPerUTxOWord_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- costModels_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn CostModels
- prices_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Prices
- maxTxExUnits_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn ExUnits
- maxBlockExUnits_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn ExUnits
- maxValSize_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural
- collateralPercentage_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural
- maxCollateralInputs_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural
- coinsPerUTxOByte_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- poolVotingThresholds_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn PoolVotingThresholds
- drepVotingThresholds_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn DRepVotingThresholds
- committeeMinSize_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural
- committeeMaxTermLength_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval
- govActionLifetime_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval
- govActionDeposit_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- dRepDeposit_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin
- dRepActivity_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval
- minFeeRefScriptCostPerByte_ ∷ (EraSpecPParams 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) ⇒ EraSpecPParams 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
EraSpecPParams Allegra Source # | |
EraSpecPParams Alonzo Source # | |
EraSpecPParams Babbage Source # | |
EraSpecPParams Conway Source # | |
EraSpecPParams Mary Source # | |
EraSpecPParams 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. (EraSpecPParams 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_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
minFeeB_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
maxBBSize_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Word32 Source #
maxTxSize_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Word32 Source #
maxBHSize_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Word32 Source #
keyDeposit_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
poolDeposit_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
eMax_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval Source #
nOpt_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural Source #
a0_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn NonNegativeInterval Source #
rho_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn UnitInterval Source #
tau_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn UnitInterval Source #
decentral_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn UnitInterval Source #
protocolVersion_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn ProtVer Source #
minUTxOValue_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
minPoolCost_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
coinsPerUTxOWord_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
costModels_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn CostModels Source #
prices_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Prices Source #
maxTxExUnits_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn ExUnits Source #
maxBlockExUnits_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn ExUnits Source #
maxValSize_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural Source #
collateralPercentage_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural Source #
maxCollateralInputs_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural Source #
coinsPerUTxOByte_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
poolVotingThresholds_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn PoolVotingThresholds Source #
drepVotingThresholds_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn DRepVotingThresholds Source #
committeeMinSize_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Natural Source #
committeeMaxTermLength_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval Source #
govActionLifetime_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval Source #
govActionDeposit_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
dRepDeposit_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn Coin Source #
dRepActivity_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn EpochInterval Source #
minFeeRefScriptCostPerByte_ ∷ (EraSpecPParams era, BaseUniverse fn) ⇒ Term fn (SimplePParams era) → Term fn NonNegativeInterval Source #