Documentation ¶
Index ¶
- Variables
- type Keeper
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) FetchVestingAccounts(ctx sdk.Context) types.VestingAccounts
- func (k Keeper) GetLiquidSupply(ctx sdk.Context) sdk.Coins
- func (k Keeper) GetModuleAccountBalance(ctx sdk.Context, moduleName string) sdk.Coins
- func (k Keeper) GetTotalModuleAccountBalance(ctx sdk.Context, moduleNames ...string) sdk.Coins
- func (k Keeper) GetTotalSupply(ctx sdk.Context) sdk.Coins
- func (k Keeper) GetUnvestedSupply(ctx sdk.Context) sdk.Coins
- func (k Keeper) GetVestingAccounts(ctx sdk.Context) types.VestingAccounts
- func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
- func (k Keeper) LiquidSupply(ctx context.Context, _ *types.SupplyRequest) (*types.SupplyResponse, error)
- func (k Keeper) SetVestingAccounts(ctx sdk.Context, vestingAccounts types.VestingAccounts)
- func (k Keeper) TotalSupply(ctx context.Context, _ *types.SupplyRequest) (*types.SupplyResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( // ModuleAccounts defines the module accounts which will be queried to get liquid supply ModuleAccounts = []string{ authtypes.FeeCollectorName, distrtypes.ModuleName, stakingtypes.BondedPoolName, stakingtypes.NotBondedPoolName, minttypes.ModuleName, govtypes.ModuleName, } )
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper for supply module
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey sdk.StoreKey, bankKeeper types.BankKeeper, accountKeeper types.AccountKeeper, ) Keeper
NewKeeper returns a new keeper
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the supplu module's genesis state.
func (Keeper) FetchVestingAccounts ¶
func (k Keeper) FetchVestingAccounts(ctx sdk.Context) types.VestingAccounts
FetchVestingAccounts iterates over all the accounts and returns addresses of all the vesting accounts
func (Keeper) GetLiquidSupply ¶
GetLiquidSupply returns the total liquid supply in the system
func (Keeper) GetModuleAccountBalance ¶
GetModuleAccountBalance returns the balance of a module account
func (Keeper) GetTotalModuleAccountBalance ¶
GetTotalModuleAccountBalance returns total balance of given module accounts
func (Keeper) GetTotalSupply ¶
GetTotalSupply returns the current total supply in the system
func (Keeper) GetUnvestedSupply ¶
GetUnvestedSupply returns total unvested supply
func (Keeper) GetVestingAccounts ¶
func (k Keeper) GetVestingAccounts(ctx sdk.Context) types.VestingAccounts
GetVestingAccounts returns stored vesting accounts
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
InitGenesis initializes the supply module's state from a given genesis state.
func (Keeper) LiquidSupply ¶
func (k Keeper) LiquidSupply(ctx context.Context, _ *types.SupplyRequest) (*types.SupplyResponse, error)
LiquidSupply implements the Query/LiquidSupply gRPC method
func (Keeper) SetVestingAccounts ¶
func (k Keeper) SetVestingAccounts(ctx sdk.Context, vestingAccounts types.VestingAccounts)
SetVestingAccounts persists given vesting accounts
func (Keeper) TotalSupply ¶
func (k Keeper) TotalSupply(ctx context.Context, _ *types.SupplyRequest) (*types.SupplyResponse, error)
TotalSupply implements the Query/TotalSupply gRPC method