Documentation ¶
Index ¶
- Variables
- func Abs(x sdk.Int) sdk.Int
- func MakeTestCodec() *codec.Codec
- func NewQuerier(k Keeper) sdk.Querier
- func TestAddr(addr string, bech string) sdk.AccAddress
- type Keeper
- func (k *Keeper) ClearCoinCache()
- func (k Keeper) GetAllCoins(ctx sdk.Context) []types.Coin
- func (k Keeper) GetBaseCoin(ctx sdk.Context) string
- func (k Keeper) GetCoin(ctx sdk.Context, symbol string) (types.Coin, error)
- func (k Keeper) GetCoinCache(symbol string) bool
- func (k Keeper) GetCoinsIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetCommission(ctx sdk.Context, commissionInBaseCoin sdk.Int) (sdk.Int, string, error)
- func (k Keeper) IsCheckRedeemed(ctx sdk.Context, check *types.Check) bool
- func (k Keeper) IsCoinBase(symbol string) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k *Keeper) SetCachedCoin(ctx sdk.Context, coin string)
- func (k Keeper) SetCheckRedeemed(ctx sdk.Context, check *types.Check)
- func (k Keeper) SetCoin(ctx sdk.Context, coin types.Coin)
- func (k Keeper) UpdateBalance(ctx sdk.Context, coinSymbol string, amount sdk.Int, address sdk.AccAddress) error
- func (k Keeper) UpdateCoin(ctx sdk.Context, coin types.Coin, reserve sdk.Int, volume sdk.Int)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Addrs = createTestAddrs(500)
)
Functions ¶
func NewQuerier ¶
NewQuerier creates a new querier for coin clients.
Types ¶
type Keeper ¶
type Keeper struct { AccountKeeper auth.AccountKeeper BankKeeper bank.Keeper SupplyKeeper supply.Keeper Config *config.Config // contains filtered or unexported fields }
Keeper of the coin store
func CreateTestInput ¶
Hogpodge of all sorts of input required for testing. `initPower` is converted to an amount of tokens. If `initPower` is 0, no addrs get created.
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, paramspace types.ParamSubspace, accountKeeper auth.AccountKeeper, coinKeeper bank.Keeper, supplyKeeper supply.Keeper, config *config.Config) Keeper
NewKeeper creates a coin keeper
func (*Keeper) ClearCoinCache ¶
func (k *Keeper) ClearCoinCache()
func (Keeper) GetCoinCache ¶
func (Keeper) GetCoinsIterator ¶
GetCoinsIterator gets an iterator over all Coins in which the keys are the symbols and the values are the coins
func (Keeper) GetCommission ¶
func (Keeper) IsCheckRedeemed ¶
func (Keeper) IsCoinBase ¶
func (Keeper) SetCheckRedeemed ¶
Click to show internal directories.
Click to hide internal directories.