Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data CHAIN era
- data ChainState era = ChainState {}
- data TestChainPredicateFailure era
- = RealChainPredicateFailure !ChainPredicateFailure
- | BbodyFailure !(PredicateFailure (EraRule "BBODY" era))
- | TickFailure !(PredicateFailure (EraRule "TICK" era))
- | TicknFailure !(PredicateFailure (EraRule "TICKN" era))
- | PrtclFailure !(PredicateFailure (PRTCL MockCrypto))
- | PrtclSeqFailure !PrtlSeqFailure
- data ChainEvent era
- = BbodyEvent !(Event (EraRule "BBODY" era))
- | TickEvent !(Event (EraRule "TICK" era))
- | TicknEvent !(Event (EraRule "TICKN" era))
- | PrtclEvent !(Event (PRTCL MockCrypto))
- type family PredicateFailure a
- data AdaPots = AdaPots {}
- initialShelleyState ∷ ∀ era. (EraTxOut era, EraGov era, Default (StashedAVVMAddresses era)) ⇒ WithOrigin LastAppliedBlock → EpochNo → UTxO era → Coin → Map (KeyHash 'Genesis) GenDelegPair → PParams era → Nonce → ChainState era
- totalAda ∷ (EraTxOut era, EraGov era) ⇒ ChainState era → Coin
- totalAdaPots ∷ (EraTxOut era, EraGov era) ⇒ ChainState era → AdaPots
- chainStateNesL ∷ Lens' (ChainState era) (NewEpochState era)
Documentation
Instances
data ChainState era Source #
Instances
data TestChainPredicateFailure era Source #
RealChainPredicateFailure !ChainPredicateFailure | |
BbodyFailure !(PredicateFailure (EraRule "BBODY" era)) | |
TickFailure !(PredicateFailure (EraRule "TICK" era)) | |
TicknFailure !(PredicateFailure (EraRule "TICKN" era)) | |
PrtclFailure !(PredicateFailure (PRTCL MockCrypto)) | |
PrtclSeqFailure !PrtlSeqFailure |
Instances
data ChainEvent era Source #
BbodyEvent !(Event (EraRule "BBODY" era)) | |
TickEvent !(Event (EraRule "TICK" era)) | |
TicknEvent !(Event (EraRule "TICKN" era)) | |
PrtclEvent !(Event (PRTCL MockCrypto)) |
type family PredicateFailure a Source #
Descriptive type for the possible failures which might cause a transition to fail.
As a convention, PredicateFailure
s which are "structural" (meaning that
they are not "throwable" in practice, and are used to pass control from
one transition rule to another) are prefixed with S_
.
Structural PredicateFailure
s represent conditions between rules where
the disjunction of all rules' preconditions is equal to True
. That is,
either one rule will throw a structural PredicateFailure
and the other
will succeed, or vice-versa.
Instances
Instances
Generic AdaPots | |
Show AdaPots | |
NFData AdaPots | |
Defined in Cardano.Ledger.Shelley.AdaPots | |
Eq AdaPots | |
type Rep AdaPots | |
Defined in Cardano.Ledger.Shelley.AdaPots type Rep AdaPots = D1 ('MetaData "AdaPots" "Cardano.Ledger.Shelley.AdaPots" "cardano-ledger-shelley-1.16.0.0-inplace" 'False) (C1 ('MetaCons "AdaPots" 'PrefixI 'True) ((S1 ('MetaSel ('Just "treasuryAdaPot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin) :*: (S1 ('MetaSel ('Just "reservesAdaPot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin) :*: S1 ('MetaSel ('Just "rewardsAdaPot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin))) :*: (S1 ('MetaSel ('Just "utxoAdaPot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin) :*: (S1 ('MetaSel ('Just "feesAdaPot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Coin) :*: S1 ('MetaSel ('Just "obligationsPot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Obligations))))) |
initialShelleyState ∷ ∀ era. (EraTxOut era, EraGov era, Default (StashedAVVMAddresses era)) ⇒ WithOrigin LastAppliedBlock → EpochNo → UTxO era → Coin → Map (KeyHash 'Genesis) GenDelegPair → PParams era → Nonce → ChainState era Source #
Creates a valid initial chain state
totalAda ∷ (EraTxOut era, EraGov era) ⇒ ChainState era → Coin Source #
Calculate the total ada in the chain state
totalAdaPots ∷ (EraTxOut era, EraGov era) ⇒ ChainState era → AdaPots Source #
Calculate the total ada pots in the chain state
chainStateNesL ∷ Lens' (ChainState era) (NewEpochState era) Source #
Orphan instances
ToExpr HashHeader Source # | |
toExpr ∷ HashHeader → Expr Source # listToExpr ∷ [HashHeader] → Expr Source # | |
ToExpr LastAppliedBlock Source # | |
toExpr ∷ LastAppliedBlock → Expr Source # listToExpr ∷ [LastAppliedBlock] → Expr Source # |