Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func ParamKeyTable() paramtypes.KeyTable
- type Keeper
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetStake(ctx sdk.Context, vendorID uint32, postID curatingtypes.PostID, ...) (stake types.Stake, found bool, err error)
- func (k Keeper) GetStakes(ctx sdk.Context, vendorID uint32, postID curatingtypes.PostID) (stakes []types.Stake)
- func (k Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MustMarshalStake(stake types.Stake) []byte
- func (k Keeper) MustUnmarshalStake(data []byte, stake *types.Stake)
- func (k Keeper) PerformBuyCreatorCoin(ctx sdk.Context, username string, creator sdk.AccAddress, buyer sdk.AccAddress, ...) error
- func (k Keeper) PerformSellCreatorCoin(ctx sdk.Context, username string, creator sdk.AccAddress, ...) error
- func (k Keeper) PerformStake(ctx sdk.Context, vendorID uint32, postID curatingtypes.PostID, ...) error
- func (k Keeper) PerformUnstake(ctx sdk.Context, vendorID uint32, postID curatingtypes.PostID, ...) error
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetStake(ctx sdk.Context, delAddr sdk.AccAddress, s types.Stake)
- func (k Keeper) Stake(c context.Context, req *types.QueryStakeRequest) (*types.QueryStakeResponse, error)
- func (k Keeper) Stakes(c context.Context, req *types.QueryStakesRequest) (*types.QueryStakesResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the curating MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the x/curating store
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryMarshaler, key sdk.StoreKey, ck types.CurationKeeper, sk types.StakingKeeper, bk types.BankKeeper, ps paramtypes.Subspace) Keeper
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) 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) MustMarshalStake ¶
MustMarshalStake attempts to encode a Stake object and returns the raw encoded bytes. It panics on error.
func (Keeper) MustUnmarshalStake ¶
MustUnmarshalStake attempts to decode a Stake object and return it. It panics on error.
func (Keeper) PerformBuyCreatorCoin ¶ added in v0.7.0
func (k Keeper) PerformBuyCreatorCoin( ctx sdk.Context, username string, creator sdk.AccAddress, buyer sdk.AccAddress, valAddr sdk.ValAddress, amount sdk.Int) error
BuyCreatorCoin delegates an amount to a validator and associates a post
func (Keeper) PerformSellCreatorCoin ¶ added in v0.8.0
func (k Keeper) PerformSellCreatorCoin( ctx sdk.Context, username string, creator sdk.AccAddress, seller sdk.AccAddress, valAddr sdk.ValAddress, amount sdk.Int) error
SellCreatorCoin undelegates an amount from a validator and disassociates a post
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) Stake ¶
func (k Keeper) Stake(c context.Context, req *types.QueryStakeRequest) (*types.QueryStakeResponse, error)
Stake returns a Stake
func (Keeper) Stakes ¶
func (k Keeper) Stakes(c context.Context, req *types.QueryStakesRequest) (*types.QueryStakesResponse, error)
Stakes returns stakes for a post