keeper

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 19 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.

func NewQueryServerImpl added in v1.0.1

func NewQueryServerImpl(k Keeper) types.QueryServer

Types

type Keeper

type Keeper struct {
	Schema collections.Schema
	Params collections.Item[types.Params]
	Token  collections.Map[string, types.Token]
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.Codec,
	storeService store.KVStoreService,
	bankKeeper types.BankKeeper,
	ak types.AccountKeeper,
	allowAddrs map[string]bool,
	authority string,
) *Keeper

NewKeeper returns a new Keeper object with a given codec, dedicated store key, a BankKeeper implementation, an AccountKeeper implementation, and a parameter Subspace used to store and fetch module parameters. It also has an allowAddrs map[string]bool to skip restrictions for module addresses.

func (Keeper) AllowAddr added in v0.9.0

func (k Keeper) AllowAddr(addr sdk.AccAddress) bool

AllowAddr addr checks if a given address is in the list of allowAddrs to skip restrictions

func (Keeper) AssetSendRestriction added in v0.9.0

func (k Keeper) AssetSendRestriction(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (newToAddr sdk.AccAddress, err error)

func (Keeper) IsAddressAuthorizedToSend

func (k Keeper) IsAddressAuthorizedToSend(ctx context.Context, symbol string, address sdk.AccAddress) (authorized bool)

func (Keeper) Logger

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

type Migrator added in v1.0.1

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

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

func NewMigrator added in v1.0.1

func NewMigrator(k Keeper, ss exported.Subspace) Migrator

NewMigrator returns Migrator instance for the state migration.

func (Migrator) Migrate1to2 added in v1.0.1

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

Migrate1to2 migrates the x/mint module state from the consensus version 1 to version 2. Specifically, it takes the parameters that are currently stored and managed by the x/params modules and stores them directly into the x/mint module state.

Jump to

Keyboard shortcuts

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