Safe Haskell | None |
---|---|
Language | Haskell98 |
Shelley.Spec.Ledger.EpochBoundary
Description
This modules implements the necessary functions for the changes that can happen at epoch boundaries.
Synopsis
- newtype Stake era = Stake {
- unStake ∷ Map (Credential 'Staking era) Coin
- newtype BlocksMade era = BlocksMade {}
- data SnapShot era = SnapShot {
- _stake ∷ !(Stake era)
- _delegations ∷ !(Map (Credential 'Staking era) (KeyHash 'StakePool (Crypto era)))
- _poolParams ∷ !(Map (KeyHash 'StakePool (Crypto era)) (PoolParams era))
- data SnapShots era = SnapShots {
- _pstakeMark ∷ !(SnapShot era)
- _pstakeSet ∷ !(SnapShot era)
- _pstakeGo ∷ !(SnapShot era)
- _feeSS ∷ !Coin
- emptySnapShot ∷ SnapShot era
- emptySnapShots ∷ SnapShots era
- aggregateUtxoCoinByCredential ∷ ∀ era. ShelleyBased era ⇒ Map Ptr (Credential 'Staking era) → UTxO era → Map (Credential 'Staking era) Coin → Map (Credential 'Staking era) Coin
- poolStake ∷ KeyHash 'StakePool (Crypto era) → Map (Credential 'Staking era) (KeyHash 'StakePool (Crypto era)) → Stake era → Stake era
- obligation ∷ PParams era → Map (Credential 'Staking era) Coin → Map (KeyHash 'StakePool (Crypto era)) (PoolParams era) → Coin
- maxPool ∷ PParams era → Coin → Rational → Rational → Coin
Documentation
Type of stake as map from hash key to coins associated.
Instances
Eq (Stake era) Source # | |
Ord (Stake era) Source # | |
Defined in Shelley.Spec.Ledger.EpochBoundary | |
Show (Stake era) Source # | |
NFData (Stake era) Source # | |
Defined in Shelley.Spec.Ledger.EpochBoundary | |
(Era era, AnnotatedData (Script era)) ⇒ ToCBOR (Stake era) Source # | |
(Era era, AnnotatedData (Script era)) ⇒ FromCBOR (Stake era) Source # | |
NoThunks (Stake era) Source # | |
newtype BlocksMade era Source #
Blocks made
Constructors
BlocksMade | |
Instances
Snapshot of the stake distribution.
Constructors
SnapShot | |
Fields
|
Instances
Snapshots of the stake distribution.
Constructors
SnapShots | |
Fields
|
Instances
emptySnapShot ∷ SnapShot era Source #
emptySnapShots ∷ SnapShots era Source #
aggregateUtxoCoinByCredential ∷ ∀ era. ShelleyBased era ⇒ Map Ptr (Credential 'Staking era) → UTxO era → Map (Credential 'Staking era) Coin → Map (Credential 'Staking era) Coin Source #
Sum up all the Coin for each staking Credential
poolStake ∷ KeyHash 'StakePool (Crypto era) → Map (Credential 'Staking era) (KeyHash 'StakePool (Crypto era)) → Stake era → Stake era Source #
Get stake of one pool
obligation ∷ PParams era → Map (Credential 'Staking era) Coin → Map (KeyHash 'StakePool (Crypto era)) (PoolParams era) → Coin Source #
Calculate total possible refunds.