{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE StandaloneDeriving #-}
module Cardano.Ledger.Shelley.RewardProvenance (
RewardProvenance (..),
RewardProvenancePool (..),
Desirability (..),
)
where
import Cardano.Ledger.BaseTypes (BlocksMade (..))
import Cardano.Ledger.Binary (DecCBOR (..), EncCBOR (..))
import Cardano.Ledger.Binary.Coders
import Cardano.Ledger.Coin (Coin (..))
import Cardano.Ledger.Keys (KeyHash (..), KeyRole (..))
import Cardano.Ledger.PoolParams (PoolParams (..))
import Control.DeepSeq (NFData)
import Data.Aeson (FromJSON, ToJSON)
import Data.Default (Default (..))
import Data.Map.Strict (Map)
import Data.Word (Word64)
import GHC.Generics
import NoThunks.Class (NoThunks (..))
import Numeric.Natural (Natural)
data RewardProvenancePool = RewardProvenancePool
{ RewardProvenancePool -> Natural
poolBlocksP :: !Natural
, RewardProvenancePool -> Rational
sigmaP :: !Rational
, RewardProvenancePool -> Rational
sigmaAP :: !Rational
, RewardProvenancePool -> Coin
ownerStakeP :: !Coin
, RewardProvenancePool -> PoolParams
poolParamsP :: !PoolParams
, RewardProvenancePool -> Rational
pledgeRatioP :: !Rational
, RewardProvenancePool -> Coin
maxPP :: !Coin
, RewardProvenancePool -> Rational
appPerfP :: !Rational
, RewardProvenancePool -> Coin
poolRP :: !Coin
, RewardProvenancePool -> Coin
lRewardP :: !Coin
}
deriving (RewardProvenancePool -> RewardProvenancePool -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RewardProvenancePool -> RewardProvenancePool -> Bool
$c/= :: RewardProvenancePool -> RewardProvenancePool -> Bool
== :: RewardProvenancePool -> RewardProvenancePool -> Bool
$c== :: RewardProvenancePool -> RewardProvenancePool -> Bool
Eq, forall x. Rep RewardProvenancePool x -> RewardProvenancePool
forall x. RewardProvenancePool -> Rep RewardProvenancePool x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RewardProvenancePool x -> RewardProvenancePool
$cfrom :: forall x. RewardProvenancePool -> Rep RewardProvenancePool x
Generic)
instance NoThunks RewardProvenancePool
instance NFData RewardProvenancePool
instance FromJSON RewardProvenancePool
instance ToJSON RewardProvenancePool
instance Default RewardProvenancePool where
def :: RewardProvenancePool
def = Natural
-> Rational
-> Rational
-> Coin
-> PoolParams
-> Rational
-> Coin
-> Rational
-> Coin
-> Coin
-> RewardProvenancePool
RewardProvenancePool Natural
0 Rational
0 Rational
0 (Integer -> Coin
Coin Integer
0) forall a. Default a => a
def Rational
0 (Integer -> Coin
Coin Integer
0) Rational
0 (Integer -> Coin
Coin Integer
0) (Integer -> Coin
Coin Integer
0)
data Desirability = Desirability
{ Desirability -> Double
desirabilityScore :: !Double
, Desirability -> Double
hitRateEstimate :: !Double
}
deriving (Desirability -> Desirability -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Desirability -> Desirability -> Bool
$c/= :: Desirability -> Desirability -> Bool
== :: Desirability -> Desirability -> Bool
$c== :: Desirability -> Desirability -> Bool
Eq, Int -> Desirability -> ShowS
[Desirability] -> ShowS
Desirability -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Desirability] -> ShowS
$cshowList :: [Desirability] -> ShowS
show :: Desirability -> String
$cshow :: Desirability -> String
showsPrec :: Int -> Desirability -> ShowS
$cshowsPrec :: Int -> Desirability -> ShowS
Show, forall x. Rep Desirability x -> Desirability
forall x. Desirability -> Rep Desirability x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Desirability x -> Desirability
$cfrom :: forall x. Desirability -> Rep Desirability x
Generic)
instance NoThunks Desirability
instance NFData Desirability
data RewardProvenance = RewardProvenance
{ RewardProvenance -> Word64
spe :: !Word64
, RewardProvenance -> BlocksMade
blocks :: !BlocksMade
, RewardProvenance -> Coin
maxLL :: !Coin
, RewardProvenance -> Coin
deltaR1 :: !Coin
, RewardProvenance -> Coin
deltaR2 :: !Coin
, RewardProvenance -> Coin
r :: !Coin
, RewardProvenance -> Coin
totalStake :: !Coin
, RewardProvenance -> Integer
blocksCount :: !Integer
, RewardProvenance -> Rational
d :: !Rational
, RewardProvenance -> Integer
expBlocks :: !Integer
, RewardProvenance -> Rational
eta :: !Rational
, RewardProvenance -> Coin
rPot :: !Coin
, RewardProvenance -> Coin
deltaT1 :: !Coin
, RewardProvenance -> Coin
activeStake :: !Coin
, RewardProvenance -> Map (KeyHash 'StakePool) RewardProvenancePool
pools :: !(Map (KeyHash 'StakePool) RewardProvenancePool)
, RewardProvenance -> Map (KeyHash 'StakePool) Desirability
desirabilities :: !(Map (KeyHash 'StakePool) Desirability)
}
deriving (RewardProvenance -> RewardProvenance -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RewardProvenance -> RewardProvenance -> Bool
$c/= :: RewardProvenance -> RewardProvenance -> Bool
== :: RewardProvenance -> RewardProvenance -> Bool
$c== :: RewardProvenance -> RewardProvenance -> Bool
Eq, forall x. Rep RewardProvenance x -> RewardProvenance
forall x. RewardProvenance -> Rep RewardProvenance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RewardProvenance x -> RewardProvenance
$cfrom :: forall x. RewardProvenance -> Rep RewardProvenance x
Generic)
instance FromJSON Desirability
instance ToJSON Desirability
instance FromJSON RewardProvenance
instance ToJSON RewardProvenance
instance NoThunks RewardProvenance
instance NFData RewardProvenance
instance Default RewardProvenance where
def :: RewardProvenance
def =
Word64
-> BlocksMade
-> Coin
-> Coin
-> Coin
-> Coin
-> Coin
-> Integer
-> Rational
-> Integer
-> Rational
-> Coin
-> Coin
-> Coin
-> Map (KeyHash 'StakePool) RewardProvenancePool
-> Map (KeyHash 'StakePool) Desirability
-> RewardProvenance
RewardProvenance
Word64
0
(Map (KeyHash 'StakePool) Natural -> BlocksMade
BlocksMade forall a. Default a => a
def)
(Integer -> Coin
Coin Integer
0)
(Integer -> Coin
Coin Integer
0)
(Integer -> Coin
Coin Integer
0)
(Integer -> Coin
Coin Integer
0)
(Integer -> Coin
Coin Integer
0)
Integer
0
Rational
0
Integer
0
Rational
0
(Integer -> Coin
Coin Integer
0)
(Integer -> Coin
Coin Integer
0)
(Integer -> Coin
Coin Integer
0)
forall a. Default a => a
def
forall a. Default a => a
def
mylines :: Int -> [String] -> String
mylines :: Int -> Context -> String
mylines Int
n Context
xs = Context -> String
unlines (forall a b. (a -> b) -> [a] -> [b]
map (forall a. Int -> a -> [a]
replicate Int
n Char
' ' forall a. [a] -> [a] -> [a]
++) Context
xs)
instance Show RewardProvenancePool where
show :: RewardProvenancePool -> String
show RewardProvenancePool
t =
String
"RewardProvenancePool\n"
forall a. [a] -> [a] -> [a]
++ Int -> Context -> String
mylines
Int
3
[ String
"poolBlocks = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenancePool -> Natural
poolBlocksP RewardProvenancePool
t)
, String
"sigma = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenancePool -> Rational
sigmaP RewardProvenancePool
t)
, String
"sigmaA = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenancePool -> Rational
sigmaAP RewardProvenancePool
t)
, String
"ownerStake = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenancePool -> Coin
ownerStakeP RewardProvenancePool
t)
, String
"poolParams = " forall a. [a] -> [a] -> [a]
++ PoolParams -> String
showPoolParams (RewardProvenancePool -> PoolParams
poolParamsP RewardProvenancePool
t)
, String
"pledgeRatio = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenancePool -> Rational
pledgeRatioP RewardProvenancePool
t)
, String
"maxP = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenancePool -> Coin
maxPP RewardProvenancePool
t)
, String
"appPerf = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenancePool -> Rational
appPerfP RewardProvenancePool
t)
, String
"poolR = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenancePool -> Coin
poolRP RewardProvenancePool
t)
, String
"lReward = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenancePool -> Coin
lRewardP RewardProvenancePool
t)
]
showPoolParams :: PoolParams -> String
showPoolParams :: PoolParams -> String
showPoolParams PoolParams
x =
String
"PoolParams\n"
forall a. [a] -> [a] -> [a]
++ Int -> Context -> String
mylines
Int
6
[ String
"poolId = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (PoolParams -> KeyHash 'StakePool
ppId PoolParams
x)
, String
"poolVrf = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (PoolParams -> VRFVerKeyHash 'StakePoolVRF
ppVrf PoolParams
x)
, String
"poolPledge = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (PoolParams -> Coin
ppPledge PoolParams
x)
, String
"poolCost = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (PoolParams -> Coin
ppCost PoolParams
x)
, String
"poolMargin = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (PoolParams -> UnitInterval
ppMargin PoolParams
x)
, String
"poolRAcnt = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (PoolParams -> RewardAccount
ppRewardAccount PoolParams
x)
, String
"poolOwners = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (PoolParams -> Set (KeyHash 'Staking)
ppOwners PoolParams
x)
, String
"poolRelays = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (PoolParams -> StrictSeq StakePoolRelay
ppRelays PoolParams
x)
, String
"poolMD = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (PoolParams -> StrictMaybe PoolMetadata
ppMetadata PoolParams
x)
]
instance Show RewardProvenance where
show :: RewardProvenance -> String
show RewardProvenance
t =
String
"RewardProvenance\n"
forall a. [a] -> [a] -> [a]
++ Int -> Context -> String
mylines
Int
3
[ String
"spe = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenance -> Word64
spe RewardProvenance
t)
, String
"blocks = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenance -> BlocksMade
blocks RewardProvenance
t)
, String
"maxLL = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenance -> Coin
maxLL RewardProvenance
t)
, String
"deltaR1 = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenance -> Coin
deltaR1 RewardProvenance
t)
, String
"deltaR2 = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenance -> Coin
deltaR2 RewardProvenance
t)
, String
"r = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenance -> Coin
r RewardProvenance
t)
, String
"totalStake = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenance -> Coin
totalStake RewardProvenance
t)
, String
"blocksCount = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenance -> Integer
blocksCount RewardProvenance
t)
, String
"d = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenance -> Rational
d RewardProvenance
t)
, String
"expBlocks = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenance -> Integer
expBlocks RewardProvenance
t)
, String
"eta = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenance -> Rational
eta RewardProvenance
t)
, String
"rPot = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenance -> Coin
rPot RewardProvenance
t)
, String
"deltaT1 = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenance -> Coin
deltaT1 RewardProvenance
t)
, String
"activeStake = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenance -> Coin
activeStake RewardProvenance
t)
, String
"pools = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenance -> Map (KeyHash 'StakePool) RewardProvenancePool
pools RewardProvenance
t)
, String
"desirabilities = " forall a. [a] -> [a] -> [a]
++ forall a. Show a => a -> String
show (RewardProvenance -> Map (KeyHash 'StakePool) Desirability
desirabilities RewardProvenance
t)
]
instance EncCBOR Desirability where
encCBOR :: Desirability -> Encoding
encCBOR (Desirability Double
p1 Double
p2) =
forall (w :: Wrapped) t. Encode w t -> Encoding
encode forall a b. (a -> b) -> a -> b
$ forall t. t -> Encode ('Closed 'Dense) t
Rec Double -> Double -> Desirability
Desirability forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Double
p1 forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Double
p2
instance DecCBOR Desirability where
decCBOR :: forall s. Decoder s Desirability
decCBOR = forall (w :: Wrapped) t s. Decode w t -> Decoder s t
decode forall a b. (a -> b) -> a -> b
$ forall t. t -> Decode ('Closed 'Dense) t
RecD Double -> Double -> Desirability
Desirability forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
instance EncCBOR RewardProvenancePool where
encCBOR :: RewardProvenancePool -> Encoding
encCBOR (RewardProvenancePool Natural
p1 Rational
p2 Rational
p3 Coin
p4 PoolParams
p5 Rational
p6 Coin
p7 Rational
p8 Coin
p9 Coin
p10) =
forall (w :: Wrapped) t. Encode w t -> Encoding
encode forall a b. (a -> b) -> a -> b
$
forall t. t -> Encode ('Closed 'Dense) t
Rec Natural
-> Rational
-> Rational
-> Coin
-> PoolParams
-> Rational
-> Coin
-> Rational
-> Coin
-> Coin
-> RewardProvenancePool
RewardProvenancePool
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Natural
p1
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Rational
p2
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Rational
p3
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Coin
p4
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To PoolParams
p5
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Rational
p6
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Coin
p7
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Rational
p8
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Coin
p9
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Coin
p10
instance DecCBOR RewardProvenancePool where
decCBOR :: forall s. Decoder s RewardProvenancePool
decCBOR =
forall (w :: Wrapped) t s. Decode w t -> Decoder s t
decode forall a b. (a -> b) -> a -> b
$
forall t. t -> Decode ('Closed 'Dense) t
RecD Natural
-> Rational
-> Rational
-> Coin
-> PoolParams
-> Rational
-> Coin
-> Rational
-> Coin
-> Coin
-> RewardProvenancePool
RewardProvenancePool
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
instance EncCBOR RewardProvenance where
encCBOR :: RewardProvenance -> Encoding
encCBOR (RewardProvenance Word64
p1 BlocksMade
p2 Coin
p3 Coin
p4 Coin
p5 Coin
p6 Coin
p7 Integer
p8 Rational
p9 Integer
p10 Rational
p11 Coin
p12 Coin
p13 Coin
p14 Map (KeyHash 'StakePool) RewardProvenancePool
p15 Map (KeyHash 'StakePool) Desirability
p16) =
forall (w :: Wrapped) t. Encode w t -> Encoding
encode forall a b. (a -> b) -> a -> b
$
forall t. t -> Encode ('Closed 'Dense) t
Rec Word64
-> BlocksMade
-> Coin
-> Coin
-> Coin
-> Coin
-> Coin
-> Integer
-> Rational
-> Integer
-> Rational
-> Coin
-> Coin
-> Coin
-> Map (KeyHash 'StakePool) RewardProvenancePool
-> Map (KeyHash 'StakePool) Desirability
-> RewardProvenance
RewardProvenance
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Word64
p1
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To BlocksMade
p2
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Coin
p3
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Coin
p4
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Coin
p5
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Coin
p6
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Coin
p7
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Integer
p8
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Rational
p9
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Integer
p10
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Rational
p11
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Coin
p12
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Coin
p13
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Coin
p14
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Map (KeyHash 'StakePool) RewardProvenancePool
p15
forall (w :: Wrapped) a t (r :: Density).
Encode w (a -> t) -> Encode ('Closed r) a -> Encode w t
!> forall t. EncCBOR t => t -> Encode ('Closed 'Dense) t
To Map (KeyHash 'StakePool) Desirability
p16
instance DecCBOR RewardProvenance where
decCBOR :: forall s. Decoder s RewardProvenance
decCBOR =
forall (w :: Wrapped) t s. Decode w t -> Decoder s t
decode forall a b. (a -> b) -> a -> b
$
forall t. t -> Decode ('Closed 'Dense) t
RecD Word64
-> BlocksMade
-> Coin
-> Coin
-> Coin
-> Coin
-> Coin
-> Integer
-> Rational
-> Integer
-> Rational
-> Coin
-> Coin
-> Coin
-> Map (KeyHash 'StakePool) RewardProvenancePool
-> Map (KeyHash 'StakePool) Desirability
-> RewardProvenance
RewardProvenance
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From
forall (w1 :: Wrapped) a t (w :: Density).
Decode w1 (a -> t) -> Decode ('Closed w) a -> Decode w1 t
<! forall t (w :: Wrapped). DecCBOR t => Decode w t
From