keeper

package
v4.2.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 storetypes.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

func (k Keeper) GetLiquidSupply(ctx sdk.Context) sdk.Coins

GetLiquidSupply returns the total liquid supply in the system

func (Keeper) GetModuleAccountBalance

func (k Keeper) GetModuleAccountBalance(ctx sdk.Context, moduleName string) sdk.Coins

GetModuleAccountBalance returns the balance of a module account

func (Keeper) GetTotalModuleAccountBalance

func (k Keeper) GetTotalModuleAccountBalance(ctx sdk.Context, moduleNames ...string) sdk.Coins

GetTotalModuleAccountBalance returns total balance of given module accounts

func (Keeper) GetTotalSupply

func (k Keeper) GetTotalSupply(ctx sdk.Context) sdk.Coins

GetTotalSupply returns the current total supply in the system

func (Keeper) GetUnvestedSupply

func (k Keeper) GetUnvestedSupply(ctx sdk.Context) sdk.Coins

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

Jump to

Keyboard shortcuts

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