keeper

package
v0.0.0-...-0190ce5 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) zktx.MsgServer

NewMsgServerImpl returns an implementation of the module MsgServer interface.

func NewQueryServerImpl

func NewQueryServerImpl(k Keeper) zktx.QueryServer

NewQueryServerImpl returns an implementation of the module QueryServer.

func SetContextIfNeeded

func SetContextIfNeeded(proofData zktx.HyleOutput, hyleContext *zktx.HyleContext) error

For clarity, split from ValidateProofData

func ValidateProofData

func ValidateProofData(proofData zktx.HyleOutput, initialState []byte, hyleContext *zktx.HyleContext) error

TODO check block number, block time and tx hash

Types

type Keeper

type Keeper struct {

	// state management
	Schema    collections.Schema
	Params    collections.Item[zktx.Params]
	Contracts collections.Map[string, zktx.Contract]
	// contains filtered or unexported fields
}

func NewKeeper

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

NewKeeper creates a new Keeper instance

func (*Keeper) ExportGenesis

func (k *Keeper) ExportGenesis(ctx context.Context) (*zktx.GenesisState, error)

ExportGenesis exports the module state to a genesis state.

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the module's authority.

func (*Keeper) InitGenesis

func (k *Keeper) InitGenesis(ctx context.Context, data *zktx.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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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