keeper

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 9 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 curating MsgServer interface for the provided Keeper.

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable for staking module

Types

type Keeper

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

Keeper of the x/curating store

func NewKeeper

NewKeeper creates a new staking Keeper instance

func (Keeper) ExportGenesis

func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState

ExportGenesis exports the curating module state

func (Keeper) GetParams

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

GetParams returns the total set of curating parameters.

func (Keeper) GetStake

func (k Keeper) GetStake(ctx sdk.Context, vendorID uint32, postID curatingtypes.PostID,
	delAddr sdk.AccAddress) (stake types.Stake, found bool, err error)

GetStake returns an existing stake from storage

func (Keeper) GetStakes

func (k Keeper) GetStakes(ctx sdk.Context, vendorID uint32, postID curatingtypes.PostID) (stakes []types.Stake)

GetStakes returns all stakes for a post

func (Keeper) InitGenesis

func (k Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState)

InitGenesis initializes the curating module state

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) MustMarshalStake

func (k Keeper) MustMarshalStake(stake types.Stake) []byte

MustMarshalStake attempts to encode a Stake object and returns the raw encoded bytes. It panics on error.

func (Keeper) MustUnmarshalStake

func (k Keeper) MustUnmarshalStake(data []byte, stake *types.Stake)

MustUnmarshalStake attempts to decode a Stake object and return it. It panics on error.

func (Keeper) PerformStake

func (k Keeper) PerformStake(ctx sdk.Context, vendorID uint32, postID curatingtypes.PostID, delAddr sdk.AccAddress,
	valAddr sdk.ValAddress, amount sdk.Int) error

PerformStake delegates an amount to a validator and associates a post

func (Keeper) PerformUnstake

func (k Keeper) PerformUnstake(ctx sdk.Context, vendorID uint32, postID curatingtypes.PostID,
	delAddr sdk.AccAddress, amount sdk.Int) error

PerformUnstake delegates an amount to a validator and associates a post

func (Keeper) SetParams

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

SetParams sets the curating parameters to the param space.

func (Keeper) SetStake

func (k Keeper) SetStake(ctx sdk.Context, delAddr sdk.AccAddress, s types.Stake)

SetStake sets the stake in the store

func (Keeper) Stake

Stake returns a Stake

func (Keeper) Stakes

Stakes returns stakes for a post

Jump to

Keyboard shortcuts

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