Documentation ¶
Index ¶
- Variables
- func KeyActiveBoxQueue(endTime int64, boxIdStr string) []byte
- func KeyAddress(boxType string, accAddress sdk.AccAddress) []byte
- func KeyAllBox() []byte
- func KeyBox(boxIdStr string) []byte
- func KeyIdStr(boxType string, seq uint64) string
- func KeyName(boxType string, name string) []byte
- func KeyNextBoxID(boxType string) []byte
- func PrefixActiveBoxQueueTime(endTime int64) []byte
- type BankKeeper
- type FeeCollectionKeeper
- type Hooks
- type IssueKeeper
- type Keeper
- func (keeper Keeper) ActiveBoxQueueIterator(ctx sdk.Context, endTime int64) sdk.Iterator
- func (keeper Keeper) AddBox(ctx sdk.Context, box *types.BoxInfo)
- func (keeper Keeper) CanTransfer(ctx sdk.Context, id string) sdk.Error
- func (keeper Keeper) CancelDepositedCoin(ctx sdk.Context, toAddr sdk.AccAddress, amt sdk.Coins, id string) sdk.Error
- func (keeper Keeper) CancelInterestFromDepositBox(ctx sdk.Context, id string, sender sdk.AccAddress, interest sdk.Coin) (*types.BoxInfo, sdk.Error)
- func (keeper Keeper) CreateBox(ctx sdk.Context, box *types.BoxInfo) sdk.Error
- func (keeper Keeper) DisableFeature(ctx sdk.Context, sender sdk.AccAddress, id string, feature string) (*types.BoxInfo, sdk.Error)
- func (keeper Keeper) Fee(ctx sdk.Context, sender sdk.AccAddress, fee sdk.Coin) sdk.Error
- func (keeper Keeper) GetBankKeeper() BankKeeper
- func (keeper Keeper) GetBox(ctx sdk.Context, id 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, id string) (*types.BoxInfo, sdk.Error)
- func (keeper Keeper) GetCoinDecimals(ctx sdk.Context, coin sdk.Coin) (uint, sdk.Error)
- func (keeper Keeper) GetDepositedCoins(ctx sdk.Context, id string) sdk.Coins
- func (keeper Keeper) GetFeeCollectionKeeper() FeeCollectionKeeper
- func (keeper Keeper) GetIdsByAddress(ctx sdk.Context, boxType string, accAddress sdk.AccAddress) (ids []string)
- func (keeper Keeper) GetIdsByName(ctx sdk.Context, boxType string, name string) (ids []string)
- func (keeper Keeper) GetIssueKeeper() IssueKeeper
- func (keeper Keeper) GetLastBoxID(ctx sdk.Context, boxType string) (id uint64)
- func (ak Keeper) GetParams(ctx sdk.Context) (params config.Params)
- func (keeper Keeper) Getcdc() *codec.Codec
- func (keeper Keeper) Hooks() Hooks
- func (keeper Keeper) InjectDepositBoxInterest(ctx sdk.Context, id string, sender sdk.AccAddress, interest sdk.Coin) (*types.BoxInfo, sdk.Error)
- func (keeper Keeper) InsertActiveBoxQueue(ctx sdk.Context, endTime int64, boxIdStr string)
- func (keeper Keeper) Iterator(ctx sdk.Context, boxType string, startId string) sdk.Iterator
- func (keeper Keeper) List(ctx sdk.Context, params boxparams.BoxQueryParams) []*types.BoxInfo
- func (keeper Keeper) ListAll(ctx sdk.Context, boxType string) []types.BoxInfo
- func (keeper Keeper) PeekCurrentBoxID(ctx sdk.Context, boxType string) (id uint64, err sdk.Error)
- func (keeper Keeper) ProcessBoxWithdraw(ctx sdk.Context, id string, sender sdk.AccAddress) (sdk.Int, *types.BoxInfo, 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) ProcessFutureBoxByEndBlocker(ctx sdk.Context, box *types.BoxInfo) sdk.Error
- func (keeper Keeper) ProcessFutureBoxCreate(ctx sdk.Context, box *types.BoxInfo) sdk.Error
- func (keeper Keeper) ProcessInjectBox(ctx sdk.Context, id string, sender sdk.AccAddress, amount sdk.Coin, ...) (*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) 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, id string) sdk.Error
- func (keeper Keeper) SetBoxDescription(ctx sdk.Context, id string, sender sdk.AccAddress, description []byte) (*types.BoxInfo, sdk.Error)
- func (keeper Keeper) SetInitialBoxStartingId(ctx sdk.Context, boxType string, id uint64) sdk.Error
- func (ak Keeper) SetParams(ctx sdk.Context, params config.Params)
- func (keeper Keeper) SubDepositedCoin(ctx sdk.Context, amt sdk.Coins, id 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
Functions ¶
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 KeyNextBoxID ¶
Key for getting a specific issuer from the store
func PrefixActiveBoxQueueTime ¶
Returns the key for a id in the activeQueue
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 FeeCollectionKeeper ¶ added in v0.6.0
expected fee collection keeper
type Hooks ¶ added in v0.6.0
type Hooks struct {
// contains filtered or unexported fields
}
Wrapper struct
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, feeCollectionKeeper FeeCollectionKeeper, 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) CanTransfer ¶ added in v0.6.0
func (Keeper) CancelDepositedCoin ¶ added in v0.6.0
func (Keeper) CancelInterestFromDepositBox ¶ added in v0.6.0
func (Keeper) DisableFeature ¶
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, id string) (*types.BoxInfo, sdk.Error)
Return box by id and and check owner
func (Keeper) GetCoinDecimals ¶ added in v0.6.0
Keys remove Remove box
func (keeper Keeper) RemoveBox(ctx sdk.Context, box *types.BoxInfo) { store := ctx.KVStore(keeper.storeKey) store.Delete(KeyName(box.BoxType, box.Name)) store.Delete(KeyAddress(box.BoxType, box.Owner)) store.Delete(KeyBox(box.Id)) }
func (Keeper) GetDepositedCoins ¶
func (Keeper) GetFeeCollectionKeeper ¶ added in v0.6.0
func (keeper Keeper) GetFeeCollectionKeeper() FeeCollectionKeeper
Get box feeCollectionKeeper
func (Keeper) GetIdsByAddress ¶ added in v0.6.0
func (keeper Keeper) GetIdsByAddress(ctx sdk.Context, boxType string, accAddress sdk.AccAddress) (ids []string)
Get address from a box
func (Keeper) GetIdsByName ¶ added in v0.6.0
Get name from a box
func (Keeper) GetIssueKeeper ¶
func (keeper Keeper) GetIssueKeeper() IssueKeeper
Get box issueKeeper
func (Keeper) GetLastBoxID ¶
Get the last used id
func (Keeper) InjectDepositBoxInterest ¶ added in v0.6.0
func (Keeper) InsertActiveBoxQueue ¶
Inserts a id into the active box queue at time
func (Keeper) PeekCurrentBoxID ¶
Peeks the next available BoxID without incrementing it
func (Keeper) ProcessBoxWithdraw ¶ added in v0.6.0
func (Keeper) ProcessDepositBoxByEndBlocker ¶
func (Keeper) ProcessDepositBoxCreate ¶
func (Keeper) ProcessFutureBoxByEndBlocker ¶
func (Keeper) ProcessFutureBoxCreate ¶
func (Keeper) ProcessInjectBox ¶ added in v0.6.0
func (Keeper) ProcessLockBoxByEndBlocker ¶
func (Keeper) ProcessLockBoxCreate ¶
func (Keeper) RemoveFromActiveBoxQueue ¶
removes a id 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) SetBoxDescription ¶
func (Keeper) SetInitialBoxStartingId ¶ added in v0.6.0
Set the initial boxCount