Documentation
¶
Index ¶
- Variables
- func GetAddressFromKeyAddressDeposit(keyAddressDeposit []byte) sdk.AccAddress
- func KeyActiveBoxQueue(endTime int64, boxIdStr string) []byte
- func KeyAddress(boxType string, accAddress sdk.AccAddress) []byte
- func KeyAddressDeposit(boxID string, accAddress sdk.AccAddress) []byte
- func KeyBox(boxIdStr string) []byte
- func KeyBoxIdStr(boxType string, seq uint64) string
- func KeyName(boxType string, name string) []byte
- func KeyNextBoxID(boxType string) []byte
- func ParamKeyTable() params.KeyTable
- func PrefixActiveBoxQueueTime(endTime int64) []byte
- func PrefixKeyDeposit(boxID string) []byte
- type BankKeeper
- type IssueKeeper
- type Keeper
- func (keeper Keeper) ActiveBoxQueueIterator(ctx sdk.Context, endTime int64) sdk.Iterator
- func (keeper Keeper) CheckDepositByAddress(ctx sdk.Context, boxID string, accAddress sdk.AccAddress) bool
- func (keeper Keeper) CreateBox(ctx sdk.Context, box *types.BoxInfo) sdk.Error
- func (keeper Keeper) DisableFeature(ctx sdk.Context, sender sdk.AccAddress, boxID string, feature string) (*types.BoxInfo, sdk.Error)
- func (keeper Keeper) FetchDepositedCoin(ctx sdk.Context, toAddr sdk.AccAddress, amt sdk.Coins, boxID string) sdk.Error
- func (keeper Keeper) GetBankKeeper() BankKeeper
- func (keeper Keeper) GetBox(ctx sdk.Context, boxID string) *types.BoxInfo
- func (keeper Keeper) GetBoxByAddress(ctx sdk.Context, boxType string, accAddress sdk.AccAddress) []*types.BoxInfo
- func (keeper Keeper) GetBoxByOwner(ctx sdk.Context, sender sdk.AccAddress, boxID string) (*types.BoxInfo, sdk.Error)
- func (keeper Keeper) GetBoxConfigParams(ctx sdk.Context) boxparams.BoxConfigParams
- func (keeper Keeper) GetBoxIdsByAddress(ctx sdk.Context, boxType string, accAddress sdk.AccAddress) (boxIDs []string)
- func (keeper Keeper) GetBoxIdsByName(ctx sdk.Context, boxType string, name string) (boxIDs []string)
- func (keeper Keeper) GetCoinDecimal(ctx sdk.Context, coin sdk.Coin) (uint, sdk.Error)
- func (keeper Keeper) GetDepositByAddress(ctx sdk.Context, boxID string, accAddress sdk.AccAddress) *types.BoxDeposit
- func (keeper Keeper) GetDepositedCoins(ctx sdk.Context, boxID string) sdk.Coins
- func (keeper Keeper) GetIssueKeeper() IssueKeeper
- func (keeper Keeper) GetLastBoxID(ctx sdk.Context, boxType string) (boxID uint64)
- func (keeper Keeper) Getcdc() *codec.Codec
- func (keeper Keeper) InsertActiveBoxQueue(ctx sdk.Context, endTime int64, boxIdStr string)
- func (keeper Keeper) List(ctx sdk.Context, params boxparams.BoxQueryParams) []*types.BoxInfo
- func (keeper Keeper) PeekCurrentBoxID(ctx sdk.Context, boxType string) (boxID uint64, err sdk.Error)
- func (keeper Keeper) ProcessDepositBoxByEndBlocker(ctx sdk.Context, box *types.BoxInfo) sdk.Error
- func (keeper Keeper) ProcessDepositBoxCreate(ctx sdk.Context, box *types.BoxInfo) sdk.Error
- func (keeper Keeper) ProcessDepositBoxInterest(ctx sdk.Context, boxID string, sender sdk.AccAddress, interest sdk.Coin, ...) (*types.BoxInfo, sdk.Error)
- func (keeper Keeper) ProcessDepositToBox(ctx sdk.Context, boxID string, sender sdk.AccAddress, deposit sdk.Coin, ...) (*types.BoxInfo, sdk.Error)
- func (keeper Keeper) ProcessFutureBoxByEndBlocker(ctx sdk.Context, box *types.BoxInfo, seq int) sdk.Error
- func (keeper Keeper) ProcessFutureBoxCreate(ctx sdk.Context, box *types.BoxInfo) sdk.Error
- func (keeper Keeper) ProcessLockBoxByEndBlocker(ctx sdk.Context, box *types.BoxInfo) sdk.Error
- func (keeper Keeper) ProcessLockBoxCreate(ctx sdk.Context, box *types.BoxInfo) sdk.Error
- func (keeper Keeper) QueryDepositListFromDepositBox(ctx sdk.Context, boxID string, accAddress sdk.AccAddress) types.DepositBoxDepositInterestList
- func (keeper Keeper) RemoveBox(ctx sdk.Context, box *types.BoxInfo)
- func (keeper Keeper) RemoveFromActiveBoxQueue(ctx sdk.Context, endTime int64, boxIdStr string)
- func (keeper Keeper) RemoveFromActiveBoxQueueByKey(ctx sdk.Context, key []byte)
- func (keeper Keeper) SearchBox(ctx sdk.Context, boxType string, name string) []*types.BoxInfo
- func (keeper Keeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
- func (keeper Keeper) SendDepositedCoin(ctx sdk.Context, fromAddr sdk.AccAddress, amt sdk.Coins, boxID string) sdk.Error
- func (keeper Keeper) SetBoxConfigParams(ctx sdk.Context, boxConfigParams boxparams.BoxConfigParams)
- func (keeper Keeper) SetBoxDescription(ctx sdk.Context, boxID string, sender sdk.AccAddress, description []byte) (*types.BoxInfo, sdk.Error)
- func (keeper Keeper) SetInitialBoxStartingBoxId(ctx sdk.Context, boxType string, boxID uint64) sdk.Error
- func (keeper Keeper) SubDepositedCoin(ctx sdk.Context, amt sdk.Coins, boxID string) sdk.Error
Constants ¶
This section is empty.
Variables ¶
var ( KeyDelimiter = []byte(types.KeyDelimiterString) PrefixActiveQueue = []byte("active") )
Key for getting a the next available proposalID from the store
var (
ParamStoreKeyBoxParams = []byte("boxparams")
)
Parameter store key
Functions ¶
func GetAddressFromKeyAddressDeposit ¶
func GetAddressFromKeyAddressDeposit(keyAddressDeposit []byte) sdk.AccAddress
func KeyActiveBoxQueue ¶
Returns the key for a proposalID in the activeQueue
func KeyAddress ¶
func KeyAddress(boxType string, accAddress sdk.AccAddress) []byte
Key for getting a specific address from the store
func KeyAddressDeposit ¶
func KeyAddressDeposit(boxID string, accAddress sdk.AccAddress) []byte
func KeyBoxIdStr ¶
func KeyNextBoxID ¶
Key for getting a specific issuer from the store
func PrefixActiveBoxQueueTime ¶
Returns the key for a boxID in the activeQueue
func PrefixKeyDeposit ¶
Types ¶
type BankKeeper ¶
type BankKeeper interface {
GetCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
AddCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, sdk.Error)
SubtractCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, sdk.Error)
SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
SetSendEnabled(ctx sdk.Context, enabled bool)
}
expected bank keeper
type IssueKeeper ¶
type IssueKeeper interface {
GetIssue(ctx sdk.Context, issueID string) *types.CoinIssueInfo
}
expected issue keeper
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Box Keeper
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, paramsKeeper params.Keeper, paramSpace params.Subspace, ck BankKeeper, ik IssueKeeper, codespace sdk.CodespaceType) Keeper
New box keeper Instance
func (Keeper) ActiveBoxQueueIterator ¶
Returns an iterator for all the box in the Active Queue that expire by time
func (Keeper) CheckDepositByAddress ¶
func (Keeper) DisableFeature ¶
func (Keeper) FetchDepositedCoin ¶
func (Keeper) GetBoxByAddress ¶
func (keeper Keeper) GetBoxByAddress(ctx sdk.Context, boxType string, accAddress sdk.AccAddress) []*types.BoxInfo
Returns box list by type and accAddress
func (Keeper) GetBoxByOwner ¶
func (keeper Keeper) GetBoxByOwner(ctx sdk.Context, sender sdk.AccAddress, boxID string) (*types.BoxInfo, sdk.Error)
Return box by boxID and and check owner
func (Keeper) GetBoxConfigParams ¶
func (keeper Keeper) GetBoxConfigParams(ctx sdk.Context) boxparams.BoxConfigParams
Params Returns the current boxConfigParams from the global param store
func (Keeper) GetBoxIdsByAddress ¶
func (keeper Keeper) GetBoxIdsByAddress(ctx sdk.Context, boxType string, accAddress sdk.AccAddress) (boxIDs []string)
Get address from a box
func (Keeper) GetBoxIdsByName ¶
func (keeper Keeper) GetBoxIdsByName(ctx sdk.Context, boxType string, name string) (boxIDs []string)
Get name from a box
func (Keeper) GetCoinDecimal ¶
func (Keeper) GetDepositByAddress ¶
func (keeper Keeper) GetDepositByAddress(ctx sdk.Context, boxID string, accAddress sdk.AccAddress) *types.BoxDeposit
Return deposit amount by accAddress
func (Keeper) GetDepositedCoins ¶
func (Keeper) GetIssueKeeper ¶
func (keeper Keeper) GetIssueKeeper() IssueKeeper
Get box issueKeeper
func (Keeper) GetLastBoxID ¶
Get the last used boxID
func (Keeper) InsertActiveBoxQueue ¶
Inserts a boxID into the active box queue at time
func (Keeper) PeekCurrentBoxID ¶
func (keeper Keeper) PeekCurrentBoxID(ctx sdk.Context, boxType string) (boxID uint64, err sdk.Error)
Peeks the next available BoxID without incrementing it
func (Keeper) ProcessDepositBoxByEndBlocker ¶
func (Keeper) ProcessDepositBoxCreate ¶
func (Keeper) ProcessDepositBoxInterest ¶
func (Keeper) ProcessDepositToBox ¶
func (Keeper) ProcessFutureBoxByEndBlocker ¶
func (Keeper) ProcessFutureBoxCreate ¶
func (Keeper) ProcessLockBoxByEndBlocker ¶
func (Keeper) ProcessLockBoxCreate ¶
func (Keeper) QueryDepositListFromDepositBox ¶
func (keeper Keeper) QueryDepositListFromDepositBox(ctx sdk.Context, boxID string, accAddress sdk.AccAddress) types.DepositBoxDepositInterestList
Queries Query deposit list
func (Keeper) RemoveFromActiveBoxQueue ¶
removes a boxID from the Active box Queue
func (Keeper) RemoveFromActiveBoxQueueByKey ¶
func (Keeper) SendCoins ¶
func (keeper Keeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
Send coins
func (Keeper) SendDepositedCoin ¶
func (Keeper) SetBoxConfigParams ¶
func (keeper Keeper) SetBoxConfigParams(ctx sdk.Context, boxConfigParams boxparams.BoxConfigParams)
Set boxConfigParams