keeper

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportGenesis

func ExportGenesis(ctx sdk.Context, k Keeper) types.GenesisState

ExportGenesis exports all the state needed to restart the chain from the current state of the chain

func InitGenesis

func InitGenesis(ctx sdk.Context, k Keeper, data types.GenesisState)

InitGenesis starts a chain from a genesis state

Types

type Keeper

type Keeper struct {
	Cdc codec.Codec
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc codec.Codec, storeKey sdk.StoreKey, paramSpace paramstypes.Subspace) Keeper

func (Keeper) GetGasFreeMessageTypes

func (k Keeper) GetGasFreeMessageTypes(ctx sdk.Context) []string

func (Keeper) GetGasFreeMessageTypesSet

func (k Keeper) GetGasFreeMessageTypesSet(ctx sdk.Context) map[string]struct{}

func (Keeper) GetParamsIfSet

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

GetParamsIfSet will return the current params, but will return an error if the chain is still initializing. By error checking this function is safe to use in handling genesis transactions.

func (Keeper) IsGasFreeMsg

func (k Keeper) IsGasFreeMsg(gasFreeMessageTypes map[string]struct{}, msg sdk.Msg) bool

IsGasFreeMsg checks if the given msg is in the given gasFreeMessageTypes set, and if it shoudl be

func (Keeper) IsGasFreeMsgType

func (k Keeper) IsGasFreeMsgType(ctx sdk.Context, msgType string) bool

IsGasFreeMsgType checks if the given msgType is one of the GasFreeMessageTypes

func (Keeper) IsGasFreeTx

func (k Keeper) IsGasFreeTx(ctx sdk.Context, keeper Keeper, tx sdk.Tx) (bool, error)

Checks if the given Tx contains only messages in the GasFreeMessageTypes set

func (Keeper) Params

Params queries the params of the microtx module

func (Keeper) SetGasFreeMessageTypes

func (k Keeper) SetGasFreeMessageTypes(ctx sdk.Context, gasFreeMessageTypes []string)

Jump to

Keyboard shortcuts

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