keeper

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 17 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,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,
	bankKeeper types.BankKeeper,
	ak types.AccountKeeper,
	allowAddrs map[string]bool,
) *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 sdk.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (newToAddr sdk.AccAddress, err error)

func (Keeper) GetAllToken

func (k Keeper) GetAllToken(ctx sdk.Context) (list []types.Token)

GetAllToken returns all token

func (Keeper) GetParams added in v0.0.4

func (k Keeper) GetParams(_ sdk.Context) types.Params

GetParams get all parameters as types.Params

func (Keeper) GetToken

func (k Keeper) GetToken(
	ctx sdk.Context,
	symbol string,
) (val types.Token, found bool)

GetToken returns a token from its symbol

func (Keeper) IsAddressAuthorizedToSend

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

func (Keeper) IsAuthorized added in v0.9.0

func (Keeper) Logger

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

func (Keeper) Params added in v0.0.4

func (Keeper) SetParams added in v0.0.4

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

SetParams set the params

func (Keeper) SetToken

func (k Keeper) SetToken(ctx sdk.Context, token types.Token)

SetToken set a specific token in the store from its symbol

func (Keeper) Token

func (Keeper) Tokens added in v0.6.0

Jump to

Keyboard shortcuts

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