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) (payout uint64, err error)
- func (k Keeper) ChargeInflationPool(ctx sdk.Context, poolId uint64) (payout uint64, err error)
- func (k Keeper) EnsurePoolAccount(ctx sdk.Context, id uint64)
- 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) GetParams(ctx sdk.Context) (params types.Params)
- 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) GetPoolInflationPayoutRate(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) GetPoolWithError(ctx sdk.Context, poolId uint64) (types.Pool, error)
- func (k Keeper) GetProtocolInflationShare(ctx sdk.Context) (res sdk.Dec)
- 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) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) RemovePool(ctx sdk.Context, id uint64)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- 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 distributionKeeper.Keeper, mintKeeper mintKeeper.Keeper, upgradeKeeper types.UpgradeKeeper, teamKeeper teamKeeper.Keeper, ) *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 ¶
func (k Keeper) ChargeFundersOfPool(ctx sdk.Context, poolId uint64, amount uint64) (payout uint64, err error)
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. This method does not transfer any funds. The bundles-module is responsible for transferring the rewards out of the module.
func (Keeper) ChargeInflationPool ¶ added in v1.3.0
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 (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) GetPoolInflationPayoutRate ¶ added in v1.3.0
GetPoolInflationPayoutRate returns the GetPoolInflationPayoutRate param
func (Keeper) GetPoolWithError ¶
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
GetProtocolInflationShare returns the ProtocolInflationShare param.
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) Params ¶ added in v1.3.0
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
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_params.go
- getters_pool.go
- grpc_query.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_params.go
- msg_server_update_pool.go