Documentation ¶
Index ¶
- Constants
- func NewQuerier(keeper Keeper) sdk.Querier
- type DateValue
- type Keeper
- func (k Keeper) AddTokens(ctx sdk.Context, owner sdk.AccAddress, amount sdk.Int, description []byte)
- func (k Keeper) GetBalance(ctx sdk.Context, owner sdk.AccAddress) sdk.Int
- func (k Keeper) GetBalanceIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetStats(ctx sdk.Context, owner sdk.AccAddress) map[uint64]float64
- func (k Keeper) GetTotalSupply(ctx sdk.Context) sdk.Int
- func (k Keeper) SetBalance(ctx sdk.Context, owner sdk.AccAddress, amount sdk.Int)
Constants ¶
View Source
const ( QueryBalance = "balance" QueryStats = "stats" )
query endpoints supported by the token Querier
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
NewQuerier creates a new querier for token clients.
Types ¶
type Keeper ¶
type Keeper struct {
// 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 (Keeper) AddTokens ¶
func (k Keeper) AddTokens(ctx sdk.Context, owner sdk.AccAddress, amount sdk.Int, description []byte)
AddTokens adds token to the given owner Description is needed to merge records in the index.
func (Keeper) GetBalance ¶
GetBalance returns token balance for the given owner
func (Keeper) GetBalanceIterator ¶
Get an iterator over all balances in which the keys are the accounts and the values are their balance
func (Keeper) GetTotalSupply ¶
GetTotalSupply returns total token supply
func (Keeper) SetBalance ¶ added in v1.0.0
SetBalance set balance to the given user
Click to show internal directories.
Click to hide internal directories.