keeper

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 12 Imported by: 3

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 OPB MsgServer interface for the provided Keeper.

func NewQuerier

func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier

NewQuerier creates a new OPB Querier instance

func ParamKeyTable

func ParamKeyTable() paramstypes.KeyTable

ParamKeyTable for the OPB module

Types

type Keeper

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

Keeper defines the OPB keeper

func NewKeeper

func NewKeeper(
	cdc codec.Codec,
	storeKey sdk.StoreKey,
	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	tokenKeeper types.TokenKeeper,
	permKeeper types.PermKeeper,
	paramSpace paramstypes.Subspace,
) Keeper

NewKeeper creates a new Keeper instance

func (Keeper) BaseTokenDenom

func (k Keeper) BaseTokenDenom(ctx sdk.Context) (res string)

BaseTokenDenom returns the base token denom

func (Keeper) BaseTokenManager

func (k Keeper) BaseTokenManager(ctx sdk.Context) (res string)

BaseTokenManager returns the base token manager

func (Keeper) GetParams

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

GetParams gets all parameters

func (Keeper) HasToken

func (k Keeper) HasToken(ctx sdk.Context, denom string) bool

HasToken checks if the given token exists

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) Mint

func (k Keeper) Mint(ctx sdk.Context, amount uint64, recipient, operator sdk.AccAddress) error

Mint mints the base native token by the specified amount NOTE: the operator must possess the BaseM1Admin or RootAdmin permission

func (Keeper) Params

func (Keeper) PointTokenDenom

func (k Keeper) PointTokenDenom(ctx sdk.Context) (res string)

PointTokenDenom returns the point token denom

func (Keeper) Reclaim

func (k Keeper) Reclaim(ctx sdk.Context, denom string, recipient, operator sdk.AccAddress) error

Reclaim reclaims the native token of the specified denom from the corresponding escrow account NOTE: the operator must possess the certain permission

func (Keeper) SetParams

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

SetParams sets the params to the store

func (Keeper) UnrestrictedTokenTransfer

func (k Keeper) UnrestrictedTokenTransfer(ctx sdk.Context) (res bool)

UnrestrictedTokenTransfer returns the boolean value which indicates if the token transfer is restricted

type Migrator

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

func NewMigrator

func NewMigrator(k Keeper) Migrator

NewMigrator returns a new Migrator.

func (Migrator) Migrate1to2

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

Migrate1to2 migrates from version 1 to 2.

type ValidateFn

type ValidateFn func(ctx sdk.Context, msg sdk.Msg) error

type ValidateTokenTransferDecorator

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

ValidateTokenTransferDecorator checks if the token transfer satisfies the underlying constraint

func NewValidateTokenTransferDecorator

func NewValidateTokenTransferDecorator(
	keeper Keeper,
	tokenKeeper types.TokenKeeper,
	permKeeper types.PermKeeper,
) *ValidateTokenTransferDecorator

NewValidateTokenTransferDecorator constructs a new ValidateTokenTransferDecorator instance

func (ValidateTokenTransferDecorator) AnteHandle

func (vtd ValidateTokenTransferDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)

AnteHandle implements AnteHandler

func (*ValidateTokenTransferDecorator) Append

func (*ValidateTokenTransferDecorator) DefaultValidateFn

Jump to

Keyboard shortcuts

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