Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func SetStakersKeeper(k *Keeper, stakersKeeper types.StakersKeeper)
- type Keeper
- func (k Keeper) AppendPool(ctx sdk.Context, pool types.Pool) uint64
- func (k Keeper) AssertPoolExists(ctx sdk.Context, poolId uint64) error
- func (k Keeper) ChargeFundersOfPool(ctx sdk.Context, poolId uint64, amount uint64) error
- func (k Keeper) GetAllPools(ctx sdk.Context) (list []types.Pool)
- func (k Keeper) GetPaginatedPoolsQuery(ctx sdk.Context, pagination *query.PageRequest, search string, runtime string, ...) ([]types.Pool, *query.PageResponse, error)
- func (k Keeper) GetPool(ctx sdk.Context, id uint64) (val types.Pool, found bool)
- func (k Keeper) GetPoolCount(ctx sdk.Context) uint64
- func (k Keeper) GetPoolWithError(ctx sdk.Context, poolId uint64) (types.Pool, error)
- func (k Keeper) HandlePoolUpgrades(ctx sdk.Context)
- func (k Keeper) IncrementBundleInformation(ctx sdk.Context, poolId uint64, currentIndex uint64, currentKey string, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) RemovePool(ctx sdk.Context, id uint64)
- func (k Keeper) SetPool(ctx sdk.Context, pool types.Pool)
- func (k Keeper) SetPoolCount(ctx sdk.Context, count uint64)
- func (k Keeper) StoreKey() storetypes.StoreKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
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 authkeeper.AccountKeeper, bankKeeper bankkeeper.Keeper, distrKeeper distrkeeper.Keeper, upgradeKeeper types.UpgradeKeeper, ) *Keeper
func (Keeper) AppendPool ¶
AppendPool appends a pool in the store with a new id and updates the count
func (Keeper) AssertPoolExists ¶
AssertPoolExists returns nil if the pool exists and types.ErrPoolNotFound if it does not.
func (Keeper) ChargeFundersOfPool ¶
ChargeFundersOfPool equally splits the amount between all funders and removes the appropriate amount from each funder. All funders who can't afford the amount, are kicked out. Their remaining amount is transferred to the Treasury. The function throws an error if pool ran out of funds. This method does not transfer any funds. The bundles-module is responsible for transferring the rewards out of the module.
func (Keeper) GetAllPools ¶
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) GetPoolCount ¶
GetPoolCount get the total number of pools
func (Keeper) GetPoolWithError ¶
GetPoolWithError returns a pool by its poolId, if the pool does not exist, a types.ErrPoolNotFound error is returned
func (Keeper) HandlePoolUpgrades ¶
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) RemovePool ¶
RemovePool removes a pool from the store
func (Keeper) SetPoolCount ¶
SetPoolCount sets the total number of pools
func (Keeper) StoreKey ¶
func (k Keeper) StoreKey() storetypes.StoreKey
Source Files ¶
- getters_pool.go
- keeper.go
- logic_end_block_handle_pool_upgrades.go
- logic_funders.go
- logic_pool.go
- msg_server.go
- msg_server_cancel_runtime_upgrade.go
- msg_server_create_pool.go
- msg_server_defund_pool.go
- msg_server_disable_pool.go
- msg_server_enable_pool.go
- msg_server_fund_pool.go
- msg_server_schedule_runtime_upgrade.go
- msg_server_update_pool.go