keeper

package
v0.0.0-...-739a9b5 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "election"

Variables

View Source
var (
	ElectionKey = collections.NewPrefix(0)
)

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) election.MsgServer

NewMsgServerImpl returns an implementation of the module MsgServer interface.

func NewQueryServerImpl

func NewQueryServerImpl(k Keeper) election.QueryServer

NewQueryServerImpl returns an implementation of the module QueryServer.

Types

type Keeper

type Keeper struct {

	// state management
	Schema     collections.Schema
	ElectionID collections.Sequence
	Election   collections.Map[uint64, election.Election] // key: ID
	Params     collections.Item[election.Params]
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, addressCodec address.Codec, storeService storetypes.KVStoreService, crs expectedkeepers.CrsKeeper, authority string) Keeper

func (Keeper) Endblocker

func (k Keeper) Endblocker(ctx context.Context)

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

func (Keeper) GetGenesisHandler

func (k Keeper) GetGenesisHandler() appmodule.HasGenesis

func (*Keeper) InitGenesis

func (k *Keeper) InitGenesis(ctx context.Context, data *election.GenesisState) error

InitGenesis initializes the module state from a genesis state.

type Migrator

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

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

func NewMigrator

func NewMigrator(k Keeper) Migrator

NewMigrator returns Migrator instance for the state migration.

Jump to

Keyboard shortcuts

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