keeper

package
v15.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	Schema collections.Schema

	Params collections.Item[types.Params]
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeService corestoretypes.KVStoreService,
	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	stakingKeeper types.StakingKeeper,
	distrKeeper types.DistrKeeper,
	authority string,
) Keeper

func (Keeper) DistributeInflation

func (k Keeper) DistributeInflation(ctx sdk.Context) error

DistributeInflation distributes module-specific inflation

func (Keeper) DistributeWeightedRewards

func (k Keeper) DistributeWeightedRewards(ctx sdk.Context, feeCollectorAddress sdk.AccAddress, totalAllocation sdk.Coin, accounts []types.WeightedAddress) error

func (Keeper) FundCommunityPool

func (k Keeper) FundCommunityPool(ctx sdk.Context) error

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the x/alloc module's authority.

func (Keeper) GetModuleAccount

func (k Keeper) GetModuleAccount(ctx sdk.Context, moduleName string) sdk.AccountI

GetModuleAccountBalance gets the airdrop coin balance of module account

func (Keeper) GetModuleAccountAddress

func (k Keeper) GetModuleAccountAddress(_ sdk.Context) sdk.AccAddress

GetModuleAccountBalance gets the airdrop coin balance of module account

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params, err error)

GetParams returns the total set of alloc module parameters.

func (Keeper) GetProportions

func (k Keeper) GetProportions(_ sdk.Context, mintedCoin sdk.Coin, ratio sdkmath.LegacyDec) sdk.Coin

GetProportions gets the balance of the `MintedDenom` from minted coins and returns coins according to the `AllocationRatio`

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error

SetParams sets the total set of alloc module parameters.

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

Migrator is a struct for handling in-place store migrations.

func NewMigrator

func NewMigrator(keeper Keeper) Migrator

NewMigrator returns a new Migrator.

func (Migrator) Migrate1to2

func (m Migrator) Migrate1to2(_ sdk.Context) error

Migrate1to2 migrates x/alloc state from consensus version 1 to 2.

func (Migrator) Migrate2to3

func (m Migrator) Migrate2to3(_ sdk.Context) error

Migrate2to3 migrates x/alloc state from consensus version 2 to 3.

func (Migrator) Migrate3to4

func (m Migrator) Migrate3to4(_ sdk.Context) error

Migrate3to4 migrates the x/alloc module state from the consensus version 3 to version 4. Specifically, it takes the parameters that are currently stored and managed by the x/params module and stores them directly into the x/alloc module state.

type QueryServer

type QueryServer struct {
	// contains filtered or unexported fields
}

QueryServer implements the module gRPC query service.

func NewQueryServer

func NewQueryServer(keeper Keeper) *QueryServer

NewQueryServer creates a new gRPC query server.

func (QueryServer) Params

Params returns params of the alloc module.

Jump to

Keyboard shortcuts

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