keeper

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 24 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func SetFundersKeeper added in v1.4.0

func SetFundersKeeper(k *Keeper, fundersKeeper types.FundersKeeper)

func SetStakersKeeper

func SetStakersKeeper(k *Keeper, stakersKeeper types.StakersKeeper)

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storeTypes.StoreKey,
	memKey storeTypes.StoreKey,

	authority string,

	accountKeeper types.AccountKeeper,
	bankKeeper bankKeeper.Keeper,
	distrKeeper distributionKeeper.Keeper,
	mintKeeper mintKeeper.Keeper,
	upgradeKeeper types.UpgradeKeeper,
	teamKeeper teamKeeper.Keeper,
) *Keeper

func (Keeper) AppendPool

func (k Keeper) AppendPool(ctx sdk.Context, pool types.Pool) uint64

AppendPool appends a pool in the store with a new id and updates the count

func (Keeper) AssertPoolExists

func (k Keeper) AssertPoolExists(ctx sdk.Context, poolId uint64) error

AssertPoolExists returns nil if the pool exists and types.ErrPoolNotFound if it does not.

func (Keeper) ChargeInflationPool added in v1.3.0

func (k Keeper) ChargeInflationPool(ctx sdk.Context, poolId uint64) (payout uint64, err error)

ChargeInflationPool charges the inflation pool and transfers the funds to the pool module so the payout can be performed

func (Keeper) EnsurePoolAccount added in v1.3.0

func (k Keeper) EnsurePoolAccount(ctx sdk.Context, id uint64)

func (Keeper) GetAllPools

func (k Keeper) GetAllPools(ctx sdk.Context) (list []types.Pool)

GetAllPools returns all pools

func (Keeper) GetPaginatedPoolsQuery

func (k Keeper) GetPaginatedPoolsQuery(
	ctx sdk.Context,
	pagination *query.PageRequest,
	search string,
	runtime string,
	disabled bool,
	storageProviderId uint32,
) ([]types.Pool, *query.PageResponse, error)

GetPaginatedPoolsQuery performs a full search on all pools with the given parameters.

func (Keeper) GetParams added in v1.3.0

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

GetParams returns the x/pool params from state.

func (Keeper) GetPool

func (k Keeper) GetPool(ctx sdk.Context, id uint64) (val types.Pool, found bool)

GetPool returns a pool from its ID

func (Keeper) GetPoolCount

func (k Keeper) GetPoolCount(ctx sdk.Context) uint64

GetPoolCount get the total number of pools

func (Keeper) GetPoolInflationPayoutRate added in v1.3.0

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

GetPoolInflationPayoutRate returns the GetPoolInflationPayoutRate param

func (Keeper) GetPoolWithError

func (k Keeper) GetPoolWithError(ctx sdk.Context, poolId uint64) (types.Pool, error)

GetPoolWithError returns a pool by its poolId, if the pool does not exist, a types.ErrPoolNotFound error is returned

func (Keeper) GetProtocolInflationShare added in v1.3.0

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

GetProtocolInflationShare returns the ProtocolInflationShare param.

func (Keeper) HandlePoolUpgrades

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

HandlePoolUpgrades handles to end-block logic for detecting and performing schedules pool-upgrades.

func (Keeper) IncrementBundleInformation

func (k Keeper) IncrementBundleInformation(
	ctx sdk.Context,
	poolId uint64,
	currentIndex uint64,
	currentKey string,
	currentSummary string,
)

IncrementBundleInformation updates the latest finalized bundle of a pool

func (Keeper) Logger

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

func (Keeper) Params added in v1.3.0

func (Keeper) RemovePool

func (k Keeper) RemovePool(ctx sdk.Context, id uint64)

RemovePool removes a pool from the store

func (Keeper) SetParams added in v1.3.0

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

SetParams stores the x/pool params in state.

func (Keeper) SetPool

func (k Keeper) SetPool(ctx sdk.Context, pool types.Pool)

SetPool sets a specific pool in the store

func (Keeper) SetPoolCount

func (k Keeper) SetPoolCount(ctx sdk.Context, count uint64)

SetPoolCount sets the total number of pools

func (Keeper) StoreKey

func (k Keeper) StoreKey() storeTypes.StoreKey

Jump to

Keyboard shortcuts

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