keeper

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(keeper Keeper) sdk.Handler

Handle all "content" type messages.

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

Types

type Keeper

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

Keeper of the track store

func NewKeeper

func NewKeeper(supplyKeeper supply.Keeper, cdc *codec.Codec, key sdk.StoreKey) Keeper

NewKeeper creates a track keeper

func (Keeper) Add added in v0.4.0

func (k Keeper) Add(ctx sdk.Context, track *types.Track) (string, error)

func (Keeper) AddShare added in v0.5.0

func (k Keeper) AddShare(ctx sdk.Context, trackID string, entityAddr sdk.AccAddress, shareAmount sdk.Coin) error

func (Keeper) GetCreatorTracks added in v0.4.0

func (k Keeper) GetCreatorTracks(ctx sdk.Context, creator sdk.AccAddress) (tracks []types.Track)

func (Keeper) GetShare

func (k Keeper) GetShare(ctx sdk.Context, trackID string, entityAddr sdk.AccAddress) (share types.Share, found bool)

GetShare gets the share of a specific entity on a specific track

func (Keeper) GetShares added in v0.5.0

func (k Keeper) GetShares(ctx sdk.Context, trackID string) (shares []types.Share)

GetShares returns all the shares from a track

func (Keeper) GetTrack

func (k Keeper) GetTrack(ctx sdk.Context, trackID string) (track types.Track, ok bool)

func (Keeper) GetTracks added in v0.4.0

func (k Keeper) GetTracks(ctx sdk.Context) []types.Track

func (Keeper) GetTracksPaginated added in v0.4.0

func (k Keeper) GetTracksPaginated(ctx sdk.Context, params types.QueryTracksParams) []types.Track

func (Keeper) IterateShares added in v0.5.0

func (k Keeper) IterateShares(ctx sdk.Context, trackID string, cb func(share types.Share) (stop bool))

IterateShares iterates over the all the tracks shares and performs a callback function

func (Keeper) IterateTracks added in v0.4.0

func (k Keeper) IterateTracks(ctx sdk.Context, fn func(track types.Track) (stop bool))

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) MintAndSend added in v0.5.0

func (k Keeper) MintAndSend(ctx sdk.Context, amount sdk.Coin, recipient sdk.AccAddress) error

func (Keeper) RemoveShare added in v0.5.0

func (k Keeper) RemoveShare(ctx sdk.Context, trackID string, entityAddr sdk.AccAddress, shareAmount sdk.Coin) error

func (Keeper) SetCreatorTrack added in v0.4.0

func (k Keeper) SetCreatorTrack(ctx sdk.Context, track *types.Track)

func (Keeper) SetShare added in v0.5.0

func (k Keeper) SetShare(ctx sdk.Context, share types.Share)

SetShare sets a Share to the track store

func (Keeper) SetTrack

func (k Keeper) SetTrack(ctx sdk.Context, track *types.Track)

Jump to

Keyboard shortcuts

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