keeper

package
v0.2.1-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2020 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryParameters = "parameters"
	QueryBalances   = "balances"
)

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

creates a querier for asset REST endpoints

Types

type Keeper

type Keeper struct {
	MsgProducer msgqueue.MsgSender
	// contains filtered or unexported fields
}

func (Keeper) AddCoins

func (k Keeper) AddCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) sdk.Error

func (Keeper) BlacklistedAddr

func (k Keeper) BlacklistedAddr(addr sdk.AccAddress) bool

func (Keeper) DeductActivationFee

func (k Keeper) DeductActivationFee(ctx sdk.Context, from sdk.AccAddress, to sdk.AccAddress, transfer sdk.Coins) (sdk.Coins, sdk.Error)

func (Keeper) DeductActivationFeeForFreshAccounts

func (k Keeper) DeductActivationFeeForFreshAccounts(ctx sdk.Context, addrs []sdk.AccAddress) sdk.Error

func (Keeper) DeductFee

func (k Keeper) DeductFee(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) sdk.Error

func (Keeper) DeductInt64CetFee

func (k Keeper) DeductInt64CetFee(ctx sdk.Context, addr sdk.AccAddress, amt int64) sdk.Error

func (Keeper) DonateCoins

func (k Keeper) DonateCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) sdk.Error

func (Keeper) EarlierUnlockCoin

func (k Keeper) EarlierUnlockCoin(ctx sdk.Context, fromAddr, toAddr, supervisor sdk.AccAddress, amt *sdk.Coin,
	unlockTime int64, reward int64, isReturned bool) (*authx.NotificationUnlock, sdk.Error)

func (Keeper) FreezeCoins

func (k Keeper) FreezeCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) sdk.Error

func (Keeper) GetAccount

func (k Keeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) auth.Account

func (Keeper) GetCoins

func (k Keeper) GetCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

func (Keeper) GetFrozenCoins

func (k Keeper) GetFrozenCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

func (Keeper) GetLockedCoins

func (k Keeper) GetLockedCoins(ctx sdk.Context, addr sdk.AccAddress) authx.LockedCoins

func (Keeper) GetMemoRequired

func (k Keeper) GetMemoRequired(ctx sdk.Context, addr sdk.AccAddress) bool

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (param types.Params)

func (Keeper) GetSendEnabled

func (k Keeper) GetSendEnabled(ctx sdk.Context) bool

func (Keeper) GetTotalCoins

func (k Keeper) GetTotalCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

func (Keeper) HasCoins

func (k Keeper) HasCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) bool

return whether addr has enough spendable coins

func (Keeper) InputOutputCoins

func (k Keeper) InputOutputCoins(ctx sdk.Context, inputs []bank.Input, outputs []bank.Output) sdk.Error

func (Keeper) IsSendForbidden

func (k Keeper) IsSendForbidden(ctx sdk.Context, amt sdk.Coins, addr sdk.AccAddress) bool

func (Keeper) IsTokensExist

func (k Keeper) IsTokensExist(ctx sdk.Context, amt sdk.Coins) (string, bool)

func (Keeper) MockAddFrozenCoins

func (k Keeper) MockAddFrozenCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins)

func (Keeper) MockAddLockedCoins

func (k Keeper) MockAddLockedCoins(ctx sdk.Context, addr sdk.AccAddress, lockedCoins authx.LockedCoins)

func (Keeper) PreCheckFreshAccounts

func (k Keeper) PreCheckFreshAccounts(ctx sdk.Context, outputs []bank.Output) (addrs []sdk.AccAddress)

func (Keeper) SendCoins

func (k Keeper) SendCoins(ctx sdk.Context, from sdk.AccAddress, to sdk.AccAddress, amt sdk.Coins) sdk.Error

func (Keeper) SendLockedCoins

func (k Keeper) SendLockedCoins(ctx sdk.Context, fromAddr, toAddr, supervisor sdk.AccAddress, amt sdk.Coins,
	unlockTime int64, reward int64, isSupervised bool) sdk.Error

func (Keeper) SetMemoRequired

func (k Keeper) SetMemoRequired(ctx sdk.Context, addr sdk.AccAddress, required bool) sdk.Error

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

func (Keeper) SetSendEnabled

func (k Keeper) SetSendEnabled(ctx sdk.Context, enabled bool)

func (Keeper) SubtractCoins

func (k Keeper) SubtractCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) sdk.Error

func (Keeper) TotalAmountOfCoin

func (k Keeper) TotalAmountOfCoin(ctx sdk.Context, denom string) sdk.Int

only used by unit tests

func (Keeper) UnFreezeCoins

func (k Keeper) UnFreezeCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) sdk.Error

type QueryAddrBalances

type QueryAddrBalances struct {
	Addr sdk.AccAddress `json:"addr"`
}

func NewQueryAddrBalances

func NewQueryAddrBalances(addr sdk.AccAddress) QueryAddrBalances

Jump to

Keyboard shortcuts

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