keeper

package
v0.0.0-...-b0ad14f Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

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.

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey sdk.StoreKey,
	ps paramtypes.Subspace,
	sudoKeeper types.SudoKeeper,
	bankKeeper types.BankKeeper,
	zDexKeeper types.ZDexKeeper,
) *Keeper

func (Keeper) AddMiningProvider

func (k Keeper) AddMiningProvider(ctx sdk.Context, addr sdk.AccAddress)

func (Keeper) AddRewardToken

func (k Keeper) AddRewardToken(ctx sdk.Context, rewardToken *types.RewardToken)

func (Keeper) AddStakeToken

func (k Keeper) AddStakeToken(ctx sdk.Context, denom string)

func (Keeper) GetAllStakeItemList

func (k Keeper) GetAllStakeItemList(ctx sdk.Context) []*types.StakeItem

func (Keeper) GetAllUserStakeRecordList

func (k Keeper) GetAllUserStakeRecordList(ctx sdk.Context) []*types.UserStakeRecord

func (Keeper) GetMaxRewardPoolNumber

func (k Keeper) GetMaxRewardPoolNumber(ctx sdk.Context) uint32

func (Keeper) GetMaxStakeItemNumber

func (k Keeper) GetMaxStakeItemNumber(ctx sdk.Context) uint32

func (Keeper) GetMiningProviderList

func (k Keeper) GetMiningProviderList(ctx sdk.Context) []string

func (Keeper) GetMiningProviderSwitch

func (k Keeper) GetMiningProviderSwitch(ctx sdk.Context) bool

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetRewardToken

func (k Keeper) GetRewardToken(ctx sdk.Context, denom string) (*types.RewardToken, bool)

func (Keeper) GetRewardTokenList

func (k Keeper) GetRewardTokenList(ctx sdk.Context) []*types.RewardToken

func (Keeper) GetStakeItem

func (k Keeper) GetStakeItem(ctx sdk.Context, stakePoolIndex, index uint32) (*types.StakeItem, bool)

func (Keeper) GetStakeItemLimit

func (k Keeper) GetStakeItemLimit(ctx sdk.Context) *types.StakeItemLimit

func (Keeper) GetStakeItemList

func (k Keeper) GetStakeItemList(ctx sdk.Context, stakePoolIndex uint32) []*types.StakeItem

func (Keeper) GetStakeItemNextIndex

func (k Keeper) GetStakeItemNextIndex(ctx sdk.Context, stakePoolIndex uint32) uint32

func (Keeper) GetStakePool

func (k Keeper) GetStakePool(ctx sdk.Context, stakePoolIndex uint32) (*types.StakePool, bool)

func (Keeper) GetStakePoolList

func (k Keeper) GetStakePoolList(ctx sdk.Context) []*types.StakePool

func (Keeper) GetStakePoolNextIndex

func (k Keeper) GetStakePoolNextIndex(ctx sdk.Context) uint32

func (Keeper) GetStakeTokenList

func (k Keeper) GetStakeTokenList(ctx sdk.Context) []string

func (Keeper) GetUserStakeRecord

func (k Keeper) GetUserStakeRecord(ctx sdk.Context, userAddress string, stakePoolIndex, index uint32) (*types.UserStakeRecord, bool)

func (Keeper) GetUserStakeRecordList

func (k Keeper) GetUserStakeRecordList(ctx sdk.Context, userAddress string, stakePoolIndex uint32) []*types.UserStakeRecord

prefix + len(userAddress) + userAddress + stakePoolIndex + index

func (Keeper) GetUserStakeRecordNextIndex

func (k Keeper) GetUserStakeRecordNextIndex(ctx sdk.Context, userAddress string, stakePoolIndex uint32) uint32

func (Keeper) HasMiningProvider

func (k Keeper) HasMiningProvider(ctx sdk.Context, addr sdk.AccAddress) bool

func (Keeper) HasRewardToken

func (k Keeper) HasRewardToken(ctx sdk.Context, denom string) bool

func (Keeper) HasStakeToken

func (k Keeper) HasStakeToken(ctx sdk.Context, denom string) bool

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) RemoveMiningProvider

func (k Keeper) RemoveMiningProvider(ctx sdk.Context, addr sdk.AccAddress)

func (Keeper) RemoveRewardToken

func (k Keeper) RemoveRewardToken(ctx sdk.Context, denom string)

func (Keeper) RemoveStakeToken

func (k Keeper) RemoveStakeToken(ctx sdk.Context, denom string)

func (Keeper) SetMaxRewardPoolNumber

func (k Keeper) SetMaxRewardPoolNumber(ctx sdk.Context, number uint32)

func (Keeper) SetMaxStakeItemNumber

func (k Keeper) SetMaxStakeItemNumber(ctx sdk.Context, number uint32)

func (Keeper) SetMiningProviderSwitch

func (k Keeper) SetMiningProviderSwitch(ctx sdk.Context, isOpen bool)

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetStakeItem

func (k Keeper) SetStakeItem(ctx sdk.Context, stakeItem *types.StakeItem)

func (Keeper) SetStakeItemIndex

func (k Keeper) SetStakeItemIndex(ctx sdk.Context, stakePoolIndex, index uint32)

func (Keeper) SetStakeItemLimit

func (k Keeper) SetStakeItemLimit(ctx sdk.Context, limit *types.StakeItemLimit)

func (Keeper) SetStakePool

func (k Keeper) SetStakePool(ctx sdk.Context, stakePool *types.StakePool)

func (Keeper) SetStakePoolIndex

func (k Keeper) SetStakePoolIndex(ctx sdk.Context, index uint32)

func (Keeper) SetUserStakeRecord

func (k Keeper) SetUserStakeRecord(ctx sdk.Context, userStakeRecord *types.UserStakeRecord)

func (Keeper) SetUserStakeRecordIndex

func (k Keeper) SetUserStakeRecordIndex(ctx sdk.Context, userAddress string, stakePoolIndex, index uint32)

func (Keeper) ToggleMiningProviderSwitch

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

Jump to

Keyboard shortcuts

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