Documentation ¶
Index ¶
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- type Keeper
- func (k Keeper) BuyCoin(goCtx context.Context, msg *types.MsgBuyCoin) (*types.MsgBuyCoinResponse, error)
- func (k Keeper) Check(c context.Context, req *types.QueryCheckRequest) (*types.QueryCheckResponse, error)
- func (k *Keeper) CheckFutureChanges(ctx sdk.Context, coinInfo types.Coin, amount sdk.Int) error
- func (k Keeper) Checks(c context.Context, req *types.QueryChecksRequest) (*types.QueryChecksResponse, error)
- func (k *Keeper) ClearCoinCache()
- func (k Keeper) Coin(c context.Context, req *types.QueryCoinRequest) (*types.QueryCoinResponse, error)
- func (k Keeper) Coins(c context.Context, req *types.QueryCoinsRequest) (*types.QueryCoinsResponse, error)
- func (k Keeper) CreateCoin(goCtx context.Context, msg *types.MsgCreateCoin) (*types.MsgCreateCoinResponse, error)
- func (k *Keeper) DeleteLegacyBalance(ctx sdk.Context, legacyAddress string)
- func (k *Keeper) EditCoin(ctx sdk.Context, coin types.Coin, reserve sdk.Int, volume sdk.Int)
- func (k *Keeper) GetBaseDenom(ctx sdk.Context) (symbol string)
- func (k *Keeper) GetCheck(ctx sdk.Context, checkHash []byte) (check types.Check, err error)
- func (k *Keeper) GetChecks(ctx sdk.Context) (checks []types.Check)
- func (k *Keeper) GetChecksIterator(ctx sdk.Context) sdk.Iterator
- func (k *Keeper) GetCoin(ctx sdk.Context, symbol string) (coin types.Coin, err error)
- func (k *Keeper) GetCoinCache(symbol string) bool
- func (k *Keeper) GetCoins(ctx sdk.Context) (coins []types.Coin)
- func (k *Keeper) GetCoinsIterator(ctx sdk.Context) sdk.Iterator
- func (k *Keeper) GetCommission(ctx sdk.Context, feeAmountBase sdk.Int) (sdk.Int, string, error)
- func (k *Keeper) GetLegacyBalance(ctx sdk.Context, legacyAddress string) (balance types.LegacyBalance, err error)
- func (k *Keeper) GetLegacyBalances(ctx sdk.Context) (balances []types.LegacyBalance)
- func (k *Keeper) GetLegacyBalancesIterator(ctx sdk.Context) sdk.Iterator
- func (k *Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k *Keeper) IsCheckRedeemed(ctx sdk.Context, check *types.Check) bool
- func (k *Keeper) IsCoinBase(ctx sdk.Context, symbol string) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MultiSendCoin(goCtx context.Context, msg *types.MsgMultiSendCoin) (*types.MsgMultiSendCoinResponse, error)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) RedeemCheck(goCtx context.Context, msg *types.MsgRedeemCheck) (*types.MsgRedeemCheckResponse, error)
- func (k Keeper) ReturnLegacyBalance(goCtx context.Context, msg *types.MsgReturnLegacyBalance) (*types.MsgReturnLegacyBalanceResponse, error)
- func (k Keeper) SellAllCoin(goCtx context.Context, msg *types.MsgSellAllCoin) (*types.MsgSellAllCoinResponse, error)
- func (k Keeper) SellCoin(goCtx context.Context, msg *types.MsgSellCoin) (*types.MsgSellCoinResponse, error)
- func (k Keeper) SendCoin(goCtx context.Context, msg *types.MsgSendCoin) (*types.MsgSendCoinResponse, error)
- func (k *Keeper) SetCachedCoin(coin string)
- func (k *Keeper) SetCheck(ctx sdk.Context, check *types.Check)
- func (k *Keeper) SetCoin(ctx sdk.Context, coin types.Coin)
- func (k *Keeper) SetLegacyBalance(ctx sdk.Context, balance types.LegacyBalance)
- func (k *Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) UpdateCoin(goCtx context.Context, msg *types.MsgUpdateCoin) (*types.MsgUpdateCoinResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper implements the module data storaging.
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey sdk.StoreKey, ps paramtypes.Subspace, accountKeeper auth.AccountKeeperI, bankKeeper bank.Keeper, ) *Keeper
NewKeeper creates new Keeper instance.
func (Keeper) BuyCoin ¶
func (k Keeper) BuyCoin(goCtx context.Context, msg *types.MsgBuyCoin) (*types.MsgBuyCoinResponse, error)
func (Keeper) Check ¶
func (k Keeper) Check(c context.Context, req *types.QueryCheckRequest) (*types.QueryCheckResponse, error)
func (*Keeper) CheckFutureChanges ¶
Check than buy/sell/fee deduct operations will not violate coin constants: minimal volume, limit volume, minimal reserve It includes check balance of auth.FeeCollectorName Positive amount = buy = increase volume and reserve Negative amount = sell/deduct = decrease volume and reserve
func (Keeper) Checks ¶
func (k Keeper) Checks(c context.Context, req *types.QueryChecksRequest) (*types.QueryChecksResponse, error)
func (*Keeper) ClearCoinCache ¶
func (k *Keeper) ClearCoinCache()
func (Keeper) Coin ¶
func (k Keeper) Coin(c context.Context, req *types.QueryCoinRequest) (*types.QueryCoinResponse, error)
func (Keeper) Coins ¶
func (k Keeper) Coins(c context.Context, req *types.QueryCoinsRequest) (*types.QueryCoinsResponse, error)
func (Keeper) CreateCoin ¶
func (k Keeper) CreateCoin(goCtx context.Context, msg *types.MsgCreateCoin) (*types.MsgCreateCoinResponse, error)
func (*Keeper) DeleteLegacyBalance ¶
DeleteLegacyBalance delete balance for old address. Must call in return transaction
func (*Keeper) GetChecksIterator ¶
GetChecksIterator returns iterator over all checks existing in KVStore.
func (*Keeper) GetCoinCache ¶
func (*Keeper) GetCoinsIterator ¶
GetCoinsIterator returns iterator over all coins existing in KVStore.
func (*Keeper) GetCommission ¶
func (*Keeper) GetLegacyBalance ¶
func (k *Keeper) GetLegacyBalance(ctx sdk.Context, legacyAddress string) (balance types.LegacyBalance, err error)
GetLegacyBalance returns balance for legacy address if exists in KVStore.
func (*Keeper) GetLegacyBalances ¶
func (k *Keeper) GetLegacyBalances(ctx sdk.Context) (balances []types.LegacyBalance)
GetLegacyBalance returns balance for old address if exists in KVStore.
func (*Keeper) GetLegacyBalancesIterator ¶
GetLegacyBalancesIterator returns iterator over all legacy balances existing in KVStore.
func (*Keeper) IsCheckRedeemed ¶
func (Keeper) MultiSendCoin ¶
func (k Keeper) MultiSendCoin(goCtx context.Context, msg *types.MsgMultiSendCoin) (*types.MsgMultiSendCoinResponse, error)
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) RedeemCheck ¶
func (k Keeper) RedeemCheck(goCtx context.Context, msg *types.MsgRedeemCheck) (*types.MsgRedeemCheckResponse, error)
func (Keeper) ReturnLegacyBalance ¶
func (k Keeper) ReturnLegacyBalance(goCtx context.Context, msg *types.MsgReturnLegacyBalance) (*types.MsgReturnLegacyBalanceResponse, error)
func (Keeper) SellAllCoin ¶
func (k Keeper) SellAllCoin(goCtx context.Context, msg *types.MsgSellAllCoin) (*types.MsgSellAllCoinResponse, error)
func (Keeper) SellCoin ¶
func (k Keeper) SellCoin(goCtx context.Context, msg *types.MsgSellCoin) (*types.MsgSellCoinResponse, error)
func (Keeper) SendCoin ¶
func (k Keeper) SendCoin(goCtx context.Context, msg *types.MsgSendCoin) (*types.MsgSendCoinResponse, error)
SendCoin creates new custom coin.
func (*Keeper) SetCachedCoin ¶
func (*Keeper) SetLegacyBalance ¶
func (k *Keeper) SetLegacyBalance(ctx sdk.Context, balance types.LegacyBalance)
SetLegacyBalance store legacy balance for legacy address. Must call only in genesis
func (Keeper) UpdateCoin ¶
func (k Keeper) UpdateCoin(goCtx context.Context, msg *types.MsgUpdateCoin) (*types.MsgUpdateCoinResponse, error)