Documentation ¶
Index ¶
- func NewHandler(keeper Keeper) sdk.Handler
- func NewQuerier(keeper Keeper) sdk.Querier
- type Keeper
- func (keeper Keeper) AddDeposit(ctx sdk.Context, trackID uint64, depositorAddr sdk.AccAddress, ...) (sdk.Error, bool)
- func (keeper Keeper) CreateTrack(ctx sdk.Context, title, audio, image, duration string, hidden, explicit bool, ...) (types.Track, sdk.Error)
- func (keeper Keeper) DeleteAllPlays(ctx sdk.Context)
- func (keeper Keeper) DeleteAllShares(ctx sdk.Context)
- func (keeper Keeper) DeleteDeposits(ctx sdk.Context, trackID uint64)
- func (keeper Keeper) GetAccPower(ctx sdk.Context, address sdk.AccAddress) sdk.Dec
- func (keeper Keeper) GetAllDeposits(ctx sdk.Context) (deposits types.Deposits)
- func (keeper Keeper) GetAllShares(ctx sdk.Context) (shares types.Shares)
- func (keeper Keeper) GetDeposit(ctx sdk.Context, trackID uint64, depositorAddr sdk.AccAddress) (deposit types.Deposit, found bool)
- func (keeper Keeper) GetDepositParams(ctx sdk.Context) types.DepositParams
- func (keeper Keeper) GetDeposits(ctx sdk.Context, trackID uint64) (deposits types.Deposits)
- func (keeper Keeper) GetDepositsIterator(ctx sdk.Context, trackID uint64) sdk.Iterator
- func (keeper Keeper) GetPlay(ctx sdk.Context, trackID uint64, accAddr sdk.AccAddress) (play types.Play, found bool)
- func (keeper Keeper) GetPlays(ctx sdk.Context, trackID uint64) (plays types.Plays)
- func (keeper Keeper) GetPlaysIterator(ctx sdk.Context, trackID uint64) sdk.Iterator
- func (keeper Keeper) GetShare(ctx sdk.Context, trackID uint64) (share types.Share, found bool)
- func (keeper Keeper) GetTrack(ctx sdk.Context, trackID uint64) (track types.Track, ok bool)
- func (keeper Keeper) GetTrackID(ctx sdk.Context) (trackID uint64, err sdk.Error)
- func (keeper Keeper) GetTracksFiltered(ctx sdk.Context, ownerAddr sdk.AccAddress, status types.TrackStatus, ...) []types.Track
- func (keeper Keeper) IncrementShare(ctx sdk.Context, trackID uint64, amt sdk.Dec) sdk.Error
- func (keeper Keeper) IterateAllDeposits(ctx sdk.Context, cb func(deposit types.Deposit) (stop bool))
- func (keeper Keeper) IterateAllPlays(ctx sdk.Context, cb func(play types.Play) (stop bool))
- func (keeper Keeper) IterateAllShares(ctx sdk.Context, cb func(share types.Share) (stop bool))
- func (keeper Keeper) IterateDeposits(ctx sdk.Context, trackID uint64, cb func(deposit types.Deposit) (stop bool))
- func (keeper Keeper) IteratePlays(ctx sdk.Context, trackID uint64, cb func(play types.Play) (stop bool))
- func (keeper Keeper) Logger(ctx sdk.Context) log.Logger
- func (keeper Keeper) Play(ctx sdk.Context, trackID uint64, accAddr sdk.AccAddress) sdk.Error
- func (keeper Keeper) RefundDeposits(ctx sdk.Context, trackID uint64)
- func (keeper Keeper) SetDeposit(ctx sdk.Context, trackID uint64, depositorAddr sdk.AccAddress, ...)
- func (keeper Keeper) SetDepositParams(ctx sdk.Context, depositParams types.DepositParams)
- func (keeper Keeper) SetTrack(ctx sdk.Context, track types.Track)
- func (keeper Keeper) SetTrackID(ctx sdk.Context, trackID uint64)
- func (keeper Keeper) SetTrackStatus(ctx sdk.Context, trackID uint64, status types.TrackStatus) sdk.Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
Types ¶
type Keeper ¶
type Keeper struct { Sk supply.Keeper // Cosmos-SDK Supply Keeper // contains filtered or unexported fields }
Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, codespace sdk.CodespaceType, stakingKeeper staking.Keeper, ak auth.AccountKeeper, sk supply.Keeper, paramSpace params.Subspace) Keeper
NewKeeper returns an track keeper.
func (Keeper) AddDeposit ¶
func (Keeper) CreateTrack ¶
func (keeper Keeper) CreateTrack(ctx sdk.Context, title, audio, image, duration string, hidden, explicit bool, genre, mood, artists, featuring, producers, description, copyright string, owner sdk.AccAddress) (types.Track, sdk.Error)
CreateTrack create new track
func (Keeper) DeleteAllPlays ¶
func (Keeper) DeleteAllShares ¶
func (Keeper) DeleteDeposits ¶
DeleteDeposits deletes all the deposits on a specific artist without refunding them
func (Keeper) GetAccPower ¶
GetAccPower, get account power based on staking
func (Keeper) GetAllDeposits ¶
GetAllDeposits returns all the deposits from the store
func (Keeper) GetAllShares ¶
func (Keeper) GetDeposit ¶
func (keeper Keeper) GetDeposit(ctx sdk.Context, trackID uint64, depositorAddr sdk.AccAddress) (deposit types.Deposit, found bool)
GetDeposit gets the deposit of a specific depositor on a specific artist
func (Keeper) GetDepositParams ¶
func (keeper Keeper) GetDepositParams(ctx sdk.Context) types.DepositParams
GetDepositParams returns the current DepositParams from the global param store
func (Keeper) GetDeposits ¶
GetDeposits returns all the deposits from a specific artist
func (Keeper) GetDepositsIterator ¶
GetDepositsIterator gets all the deposits on a specific proposal as an sdk.Iterator
func (Keeper) GetPlaysIterator ¶
func (Keeper) GetTrackID ¶
GetTrackID gets the highest track ID
func (Keeper) GetTracksFiltered ¶
func (keeper Keeper) GetTracksFiltered(ctx sdk.Context, ownerAddr sdk.AccAddress, status types.TrackStatus, numLatest uint64) []types.Track
GetTracksFiltered get Tracks from store by TrackID status will filter tracks by status numLatest will fetch a specified number of the most recent tracks, or 0 for all tracks
func (Keeper) IncrementShare ¶
func (Keeper) IterateAllDeposits ¶
func (Keeper) IterateAllPlays ¶
IterateAllPlays iterates over the all the stored plays and performs a callback function
func (Keeper) IterateAllShares ¶
func (Keeper) IterateDeposits ¶
func (Keeper) IteratePlays ¶
func (Keeper) RefundDeposits ¶
RefundDeposits refunds and deletes all the deposits on a specific track
func (Keeper) SetDeposit ¶
func (Keeper) SetDepositParams ¶
func (keeper Keeper) SetDepositParams(ctx sdk.Context, depositParams types.DepositParams)
func (Keeper) SetTrackID ¶
Set the track ID
func (Keeper) SetTrackStatus ¶
func (keeper Keeper) SetTrackStatus(ctx sdk.Context, trackID uint64, status types.TrackStatus) sdk.Error
SetTrackStatus set Status of the Track {Nil, Verified, Rejected, Failed}