keeper

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CWCoinFromSDKCoin

func CWCoinFromSDKCoin(in sdk.Coin) wasmvmtypes.Coin

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

Types

type Hooks

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

Hooks wrapper struct for bank keeper

func (Hooks) BlockBeforeSend

func (h Hooks) BlockBeforeSend(ctx context.Context, from, to sdk.AccAddress, amount sdk.Coins) error

TrackBeforeSend calls the before send listener contract returns any errors

func (Hooks) TrackBeforeSend

func (h Hooks) TrackBeforeSend(ctx context.Context, from, to sdk.AccAddress, amount sdk.Coins)

TrackBeforeSend calls the before send listener contract suppresses any errors

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.Codec,
	storeService store.KVStoreService,
	knownModules []string,
	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	contractKeeper types.WasmKeeper,
	authority string,
) Keeper

NewKeeper returns a new instance of the x/tokenfactory keeper

func (Keeper) CreateDenom

func (k Keeper) CreateDenom(ctx sdk.Context, creatorAddr, 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) storetypes.Iterator

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns an authority for the x/tokenfactory module

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) GetBeforeSendHook

func (k Keeper) GetBeforeSendHook(ctx context.Context, denom string) string

func (Keeper) GetCreatorPrefixStore

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

GetCreatorPrefixStore returns the substore for a specific creator address

func (Keeper) GetCreatorsPrefixStore

func (k Keeper) GetCreatorsPrefixStore(ctx sdk.Context) prefix.Store

GetCreatorsPrefixStore returns the substore that contains a list of creators

func (Keeper) GetDenomPrefixStore

func (k Keeper) GetDenomPrefixStore(ctx context.Context, denom string) prefix.Store

GetDenomPrefixStore returns the substore for a specific denom

func (Keeper) GetParams

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

GetParams returns the total set params.

func (Keeper) Hooks

func (k Keeper) Hooks() Hooks

Return the wrapper struct

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) Logger

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

Logger returns a logger for the x/tokenfactory module

func (Keeper) Params

func (*Keeper) SetContractKeeper

func (k *Keeper) SetContractKeeper(contractKeeper types.WasmKeeper)

Set the wasm keeper.

func (Keeper) SetParams

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

SetParams sets the total set of params.

func (Keeper) UpdateParams

UpdateParams updates the module parameters

Jump to

Keyboard shortcuts

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