handlers

package
v1.8.0-rc8 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdditionalMsgFeeHandler

func NewAdditionalMsgFeeHandler(options PioBaseAppKeeperOptions) (sdk.FeeHandler, error)

Types

type MsgFeeInvoker

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

func NewMsgFeeInvoker

func NewMsgFeeInvoker(bankKeeper msgfeestypes.BankKeeper, accountKeeper msgfeestypes.AccountKeeper,
	feegrantKeeper msgfeestypes.FeegrantKeeper, msgFeeKeeper msgfeestypes.MsgFeesKeeper, decoder sdk.TxDecoder) MsgFeeInvoker

NewMsgFeeInvoker concrete impl of how to charge Msg Based Fees

func (MsgFeeInvoker) Invoke

func (afd MsgFeeInvoker) Invoke(ctx sdk.Context, simulate bool) (coins sdk.Coins, events sdk.Events, err error)

type MsgServiceHandler

type MsgServiceHandler = func(ctx sdk.Context, req sdk.Msg) (*sdk.Result, error)

MsgServiceHandler defines a function type which handles Msg service message.

type PioBaseAppKeeperOptions

type PioBaseAppKeeperOptions struct {
	AccountKeeper  msgfeestypes.AccountKeeper
	BankKeeper     msgfeestypes.BankKeeper
	FeegrantKeeper msgfeestypes.FeegrantKeeper
	MsgFeesKeeper  msgfeestypes.MsgFeesKeeper
	Decoder        sdk.TxDecoder
}

type PioMsgServiceRouter

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

PioMsgServiceRouter routes fully-qualified Msg service methods to their handler with additional fee processing of msgs.

func NewPioMsgServiceRouter

func NewPioMsgServiceRouter(decoder sdk.TxDecoder) *PioMsgServiceRouter

NewPioMsgServiceRouter creates a new PioMsgServiceRouter.

func (*PioMsgServiceRouter) Handler

func (msr *PioMsgServiceRouter) Handler(msg sdk.Msg) MsgServiceHandler

Handler returns the MsgServiceHandler for a given msg or nil if not found.

func (*PioMsgServiceRouter) HandlerByTypeURL

func (msr *PioMsgServiceRouter) HandlerByTypeURL(typeURL string) MsgServiceHandler

HandlerByTypeURL returns the MsgServiceHandler for a given query route path or nil if not found.

func (*PioMsgServiceRouter) RegisterService

func (msr *PioMsgServiceRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{})

RegisterService implements the gRPC Server.RegisterService method. sd is a gRPC service description, handler is an object which implements that gRPC service.

This function PANICs:

  • if it is called before the service `Msg`s have been registered using RegisterInterfaces,
  • or if a service is being registered twice.

func (*PioMsgServiceRouter) SetInterfaceRegistry

func (msr *PioMsgServiceRouter) SetInterfaceRegistry(interfaceRegistry codectypes.InterfaceRegistry)

SetInterfaceRegistry sets the interface registry for the router.

func (*PioMsgServiceRouter) SetMsgFeesKeeper

func (msr *PioMsgServiceRouter) SetMsgFeesKeeper(msgFeesKeeper msgfeeskeeper.Keeper)

SetMsgFeesKeeper sets the msg based fee keeper for retrieving msg fees.

Jump to

Keyboard shortcuts

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