keepers

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AddressStoreKeyPrefix prefix for accountx-by-address store
	AddressStoreKeyPrefix = []byte{0x01}

	PrefixUnlockedCoinsQueue = []byte("UnlockedCoinsQueue")
	KeyDelimiter             = []byte(";")
)

Functions

func AddressStoreKey

func AddressStoreKey(addr sdk.AccAddress) []byte

func KeyUnlockedCoinsQueue

func KeyUnlockedCoinsQueue(unlockedTime int64, address sdk.AccAddress) []byte

func NewQuerier

func NewQuerier(keeper AccountXKeeper) sdk.Querier

creates a querier for auth REST endpoints

func PrefixUnlockedTimeQueueTime

func PrefixUnlockedTimeQueueTime(unlockedTime int64) []byte

Types

type AccountXKeeper

type AccountXKeeper struct {
	EventTypeMsgQueue string
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, paramSubspace params.Subspace, keeper SupplyKeeper, ak ExpectedAccountKeeper, bk ExpectedBankKeeper, eventTypeMsgQueue string) AccountXKeeper

func (AccountXKeeper) BlacklistedAddr

func (axk AccountXKeeper) BlacklistedAddr(addr sdk.AccAddress) bool

func (AccountXKeeper) GetAccountX

func (axk AccountXKeeper) GetAccountX(ctx sdk.Context, addr sdk.AccAddress) (ax types.AccountX, ok bool)

func (AccountXKeeper) GetOrCreateAccountX

func (axk AccountXKeeper) GetOrCreateAccountX(ctx sdk.Context, addr sdk.AccAddress) types.AccountX

func (AccountXKeeper) GetParams

func (axk AccountXKeeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams gets the asset module's parameters.

func (AccountXKeeper) GetRebateRatio

func (axk AccountXKeeper) GetRebateRatio(ctx sdk.Context) int64

func (AccountXKeeper) GetRebateRatioBase

func (axk AccountXKeeper) GetRebateRatioBase(ctx sdk.Context) int64

func (AccountXKeeper) GetRefereeAddr

func (axk AccountXKeeper) GetRefereeAddr(ctx sdk.Context, addr sdk.AccAddress) sdk.AccAddress

func (AccountXKeeper) InsertUnlockedCoinsQueue

func (axk AccountXKeeper) InsertUnlockedCoinsQueue(ctx sdk.Context, unlockedTime int64, address sdk.AccAddress)

func (AccountXKeeper) IterateAccounts

func (axk AccountXKeeper) IterateAccounts(ctx sdk.Context, process func(types.AccountX) (stop bool))

func (AccountXKeeper) PreTotalSupply

func (axk AccountXKeeper) PreTotalSupply(ctx sdk.Context)

----------------------------------------------------------------------------- PreTotalSupply sets the Authx Module Account

func (AccountXKeeper) RemoveFromUnlockedCoinsQueue

func (axk AccountXKeeper) RemoveFromUnlockedCoinsQueue(ctx sdk.Context, unlockedTime int64, address sdk.AccAddress)

func (AccountXKeeper) RemoveFromUnlockedCoinsQueueByKey

func (axk AccountXKeeper) RemoveFromUnlockedCoinsQueueByKey(ctx sdk.Context, key []byte)

func (AccountXKeeper) SetAccountX

func (axk AccountXKeeper) SetAccountX(ctx sdk.Context, ax types.AccountX)

func (AccountXKeeper) SetParams

func (axk AccountXKeeper) SetParams(ctx sdk.Context, params types.Params)

SetParams sets the asset module's parameters.

func (AccountXKeeper) UnlockedCoinsQueueIterator

func (axk AccountXKeeper) UnlockedCoinsQueueIterator(ctx sdk.Context, unlockedTime int64) sdk.Iterator

type ExpectedAccountKeeper

type ExpectedAccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) auth.Account
	SetAccount(ctx sdk.Context, acc auth.Account)
	GetParams(ctx sdk.Context) (params auth.Params)
}

type ExpectedBankKeeper

type ExpectedBankKeeper interface {
	BlacklistedAddr(addr sdk.AccAddress) bool
}

type ExpectedTokenKeeper

type ExpectedTokenKeeper interface {
	UpdateTokenSendLock(ctx sdk.Context, symbol string, amount sdk.Int, lock bool) sdk.Error
}

type SupplyKeeper

type SupplyKeeper interface {
	GetModuleAddress(name string) sdk.AccAddress
	GetModuleAccount(ctx sdk.Context, moduleName string) supply.ModuleAccountI
	SetModuleAccount(ctx sdk.Context, macc supply.ModuleAccountI)
	//SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) sdk.Error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
}

SupplyKeeper defines the expected supply keeper (noalias)

Jump to

Keyboard shortcuts

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