Documentation ¶
Index ¶
- type Keeper
- func (k *Keeper) AddDeposit(ctx sdk.Context, addr sdk.AccAddress, coins sdk.Coins) error
- func (k *Keeper) ExportGenesis(ctx sdk.Context) *v1.GenesisState
- func (k *Keeper) GetDeposit(ctx sdk.Context, addr sdk.AccAddress) (deposit v1.Deposit, found bool)
- func (k *Keeper) GetDeposits(ctx sdk.Context) (items v1.Deposits)
- func (k *Keeper) HandleQueryDeposit(ctx sdk.Context, req *v1.QueryDepositRequest) (*v1.QueryDepositResponse, error)
- func (k *Keeper) HandleQueryDeposits(ctx sdk.Context, req *v1.QueryDepositsRequest) (*v1.QueryDepositsResponse, error)
- func (k *Keeper) InitGenesis(ctx sdk.Context, state *v1.GenesisState)
- func (k *Keeper) IterateDeposits(ctx sdk.Context, fn func(index int, item v1.Deposit) (stop bool))
- func (k *Keeper) Logger(ctx sdk.Context) log.Logger
- func (k *Keeper) SendCoinsFromAccountToDeposit(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, coins sdk.Coins) error
- func (k *Keeper) SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, ...) error
- func (k *Keeper) SendCoinsFromDepositToAccount(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, coins sdk.Coins) error
- func (k *Keeper) SendCoinsFromDepositToModule(ctx sdk.Context, fromAddr sdk.AccAddress, toModule string, coins sdk.Coins) error
- func (k *Keeper) SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, ...) error
- func (k *Keeper) SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error
- func (k *Keeper) SetDeposit(ctx sdk.Context, deposit v1.Deposit)
- func (k *Keeper) Store(ctx sdk.Context) sdk.KVStore
- func (k *Keeper) SubtractDeposit(ctx sdk.Context, addr sdk.AccAddress, coins sdk.Coins) error
- func (k *Keeper) WithBankKeeper(keeper expected.BankKeeper)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey) Keeper
func (*Keeper) AddDeposit ¶
AddDeposit is a utility function to add coins to a deposit by transferring from the account to the deposit.
func (*Keeper) ExportGenesis ¶
func (k *Keeper) ExportGenesis(ctx sdk.Context) *v1.GenesisState
func (*Keeper) GetDeposit ¶
GetDeposit retrieves a deposit from the module's KVStore based on the account address. If the deposit exists, it returns the deposit and 'found' as true; otherwise, it returns 'found' as false.
func (*Keeper) GetDeposits ¶
GetDeposits retrieves all deposits stored in the module's KVStore.
func (*Keeper) HandleQueryDeposit ¶
func (k *Keeper) HandleQueryDeposit(ctx sdk.Context, req *v1.QueryDepositRequest) (*v1.QueryDepositResponse, error)
func (*Keeper) HandleQueryDeposits ¶
func (k *Keeper) HandleQueryDeposits(ctx sdk.Context, req *v1.QueryDepositsRequest) (*v1.QueryDepositsResponse, error)
func (*Keeper) InitGenesis ¶
func (k *Keeper) InitGenesis(ctx sdk.Context, state *v1.GenesisState)
func (*Keeper) IterateDeposits ¶
IterateDeposits iterates over all deposits stored in the module's KVStore and calls the provided function for each deposit. The iteration stops when the provided function returns 'true'.
func (*Keeper) SendCoinsFromAccountToDeposit ¶
func (k *Keeper) SendCoinsFromAccountToDeposit(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, coins sdk.Coins) error
SendCoinsFromAccountToDeposit transfers coins from an account to a deposit and updates the deposit in the KVStore. If the deposit does not exist, a new deposit will be created. It returns an error if the account doesn't have enough balance.
func (*Keeper) SendCoinsFromAccountToModule ¶
func (*Keeper) SendCoinsFromDepositToAccount ¶
func (k *Keeper) SendCoinsFromDepositToAccount(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, coins sdk.Coins) error
SendCoinsFromDepositToAccount transfers coins from a deposit to an account and updates the deposit in the KVStore. It returns an error if the deposit doesn't have enough balance.
func (*Keeper) SendCoinsFromDepositToModule ¶
func (k *Keeper) SendCoinsFromDepositToModule(ctx sdk.Context, fromAddr sdk.AccAddress, toModule string, coins sdk.Coins) error
SendCoinsFromDepositToModule transfers coins from a deposit to a module and updates the deposit in the KVStore. It returns an error if the deposit doesn't have enough balance.
func (*Keeper) SendCoinsFromModuleToAccount ¶
func (*Keeper) SendCoinsFromModuleToModule ¶
func (*Keeper) SetDeposit ¶
SetDeposit stores a deposit in the module's KVStore.
func (*Keeper) SubtractDeposit ¶
SubtractDeposit is a utility function to subtract coins from a deposit by transferring from the deposit to the account.
func (*Keeper) WithBankKeeper ¶
func (k *Keeper) WithBankKeeper(keeper expected.BankKeeper)