Documentation
¶
Index ¶
- Constants
- func CalculateInterestFactor(perSecondInterestRate sdk.Dec, secondsElapsed sdkmath.Int) sdk.Dec
- type Keeper
- func (k Keeper) Distribution(c context.Context, req *types.QueryHistoryDistRequest) (*types.QueryHistoryDistResponse, error)
- func (k Keeper) DoDistribute(ctx sdk.Context)
- func (k Keeper) FirstDist(ctx sdk.Context) error
- func (k Keeper) FirstProvision(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) GetDistInfo(ctx sdk.Context) (h types.HistoricalDistInfo)
- func (k Keeper) GetNodeAPY(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetDistInfo(ctx sdk.Context, h types.HistoricalDistInfo)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) Unit(ctx sdk.Context) (res string)
Constants ¶
View Source
const MAXMINT = 100000000
Variables ¶
This section is empty.
Functions ¶
func CalculateInterestFactor ¶ added in v0.1.0
CalculateInterestFactor calculates the simple interest scaling factor, which is equal to: (per-second interest rate * number of seconds elapsed) Will return 1.000x, multiply by principal to get new principal with added interest
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, ps paramtypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distributionKeeper types.DistributionKeeper, stakingKeeper stakingkeeper.Keeper, feeCollectorName string, ) *Keeper
func (Keeper) Distribution ¶
func (k Keeper) Distribution(c context.Context, req *types.QueryHistoryDistRequest) (*types.QueryHistoryDistResponse, error)
func (Keeper) DoDistribute ¶
func (Keeper) FirstProvision ¶
FirstProvision returns the CurrentProvision param
func (Keeper) GetDistInfo ¶
func (k Keeper) GetDistInfo(ctx sdk.Context) (h types.HistoricalDistInfo)
GetDistInfo returns a createPool from its index
func (Keeper) GetNodeAPY ¶ added in v0.1.0
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) SetDistInfo ¶
func (k Keeper) SetDistInfo(ctx sdk.Context, h types.HistoricalDistInfo)
SetDistInfo sets the historical distribution info
Click to show internal directories.
Click to hide internal directories.