keeper

package
v0.1.2-testnet Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const MAXMINT = 100000000

Variables

This section is empty.

Functions

func CalculateInterestFactor added in v0.1.0

func CalculateInterestFactor(perSecondInterestRate sdk.Dec, secondsElapsed sdkmath.Int) sdk.Dec

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) DoDistribute

func (k Keeper) DoDistribute(ctx sdk.Context)

func (Keeper) FirstDist added in v0.0.2

func (k Keeper) FirstDist(ctx sdk.Context) error

func (Keeper) FirstProvision

func (k Keeper) FirstProvision(ctx sdk.Context) (res sdk.Dec)

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 (k Keeper) GetNodeAPY(ctx sdk.Context) (res sdk.Dec)

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) types.Params

GetParams get all parameters as types.Params

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) Params

func (Keeper) SetDistInfo

func (k Keeper) SetDistInfo(ctx sdk.Context, h types.HistoricalDistInfo)

SetDistInfo sets the historical distribution info

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams set the params

func (Keeper) Unit

func (k Keeper) Unit(ctx sdk.Context) (res string)

Unit returns the CurrentProvision param

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL