keeper

package
v25.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 15 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.

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	maccPerms map[string][]string,
	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	communityPoolKeeper types.CommunityPoolKeeper,
	enabledCapabilities []string,
	authority string,
) Keeper

NewKeeper returns a new instance of the x/tokenfactory keeper

func (Keeper) CreateDenom

func (k Keeper) CreateDenom(ctx sdk.Context, creatorAddr string, subdenom string) (newTokenDenom string, err error)

ConvertToBaseToken converts a fee amount in a whitelisted fee token to the base fee token amount

func (Keeper) CreateModuleAccount

func (k Keeper) CreateModuleAccount(ctx sdk.Context)

CreateModuleAccount creates a module account with minting and burning capabilities This account isn't intended to store any coins, it purely mints and burns them on behalf of the admin of respective denoms, and sends to the relevant address.

func (Keeper) ExportGenesis

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

ExportGenesis returns the tokenfactory module's exported genesis.

func (Keeper) GetAllDenomsIterator

func (k Keeper) GetAllDenomsIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the x/mint module's authority.

func (Keeper) GetAuthorityMetadata

func (k Keeper) GetAuthorityMetadata(ctx sdk.Context, denom string) (types.DenomAuthorityMetadata, error)

GetAuthorityMetadata returns the authority metadata for a specific denom

func (Keeper) GetCreatorPrefixStore

func (k Keeper) GetCreatorPrefixStore(ctx sdk.Context, creator string) sdk.KVStore

GetCreatorPrefixStore returns the substore for a specific creator address

func (Keeper) GetCreatorsPrefixStore

func (k Keeper) GetCreatorsPrefixStore(ctx sdk.Context) sdk.KVStore

GetCreatorsPrefixStore returns the substore that contains a list of creators

func (Keeper) GetDenomPrefixStore

func (k Keeper) GetDenomPrefixStore(ctx sdk.Context, denom string) sdk.KVStore

GetDenomPrefixStore returns the substore for a specific denom

func (Keeper) GetDenomsFromCreator

func (k Keeper) GetDenomsFromCreator(ctx sdk.Context, creator string) []string

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)

GetParams returns the total set params.

func (Keeper) InitGenesis

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

InitGenesis initializes the tokenfactory module's state from a provided genesis state.

func (Keeper) IsModuleAcc

func (k Keeper) IsModuleAcc(_ sdk.Context, addr sdk.AccAddress) bool

IsModuleAcc checks if a given address is restricted

func (Keeper) Logger

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

Logger returns a logger for the x/tokenfactory module

func (Keeper) Params

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error

SetParams sets the total set of params.

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, ss exported.Subspace) Migrator

func (Migrator) Migrate1to2

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

Migrate1to2 migrates the x/tokenfactory 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/tokenfactory module state.

func (Migrator) SetMetadata

func (m Migrator) SetMetadata(denomMetadata *banktypes.Metadata)

Jump to

Keyboard shortcuts

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