keeper

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SeedPrefix         = collections.NewPrefix(0)
	ValidatorVRFPrefix = collections.NewPrefix(1)
)

Functions

func GetValidatorVRFKeyPrefixFull added in v0.1.2

func GetValidatorVRFKeyPrefixFull(consensusAddr sdk.ConsAddress) []byte

GetValidatorVRFKeyPrefixFull gets the key for the validator VRF object.

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

func SeedQueryPlugin

func SeedQueryPlugin(randomnessKeeper *Querier) func(ctx sdk.Context, request json.RawMessage) ([]byte, error)

Types

type Keeper

type Keeper struct {
	Schema              collections.Schema
	Seed                collections.Item[string]
	ValidatorVRFPubKeys collections.Map[string, cryptotypes.PubKey]
}

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, storeService storetypes.KVStoreService) *Keeper

func (Keeper) GetSeed

func (k Keeper) GetSeed(ctx sdk.Context) (string, error)

GetSeed returns the seed.

func (Keeper) GetValidatorVRFPubKey

func (k Keeper) GetValidatorVRFPubKey(ctx sdk.Context, consensusAddr string) (cryptotypes.PubKey, error)

GetValidatorVRFPubKey retrieves from the store the VRF public key corresponding to the given validator consensus address.

func (Keeper) Logger

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

func (Keeper) SetValidatorVRFPubKey

func (k Keeper) SetValidatorVRFPubKey(goCtx context.Context, consensusAddr string, vrfPubKey cryptotypes.PubKey) error

type ProposalHandler

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

func NewDefaultProposalHandler

func NewDefaultProposalHandler(txVerifier baseapp.ProposalTxVerifier) *ProposalHandler

func (*ProposalHandler) PrepareProposalHandler

func (h *ProposalHandler) PrepareProposalHandler(
	txConfig client.TxConfig,
	vrfSigner vrfSigner,
	keeper Keeper,
	authKeeper types.AccountKeeper,
	_ types.StakingKeeper,
) sdk.PrepareProposalHandler

func (*ProposalHandler) ProcessProposalHandler

func (h *ProposalHandler) ProcessProposalHandler(
	vrfSigner vrfSigner,
	keeper Keeper,
	_ types.StakingKeeper,
) sdk.ProcessProposalHandler

type Querier

type Querier struct {
	Keeper
}

func NewQuerierImpl

func NewQuerierImpl(keeper Keeper) *Querier

func (Querier) Seed

Jump to

Keyboard shortcuts

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