wasmbinding

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

README

This package allows for custom queries and custom messages sends from contract.

What is supported

  • Queries:
  • Messages:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomMessageDecorator

func CustomMessageDecorator(
	dexKeeper *dexkeeper.Keeper,
) func(messenger wasmkeeper.Messenger) wasmkeeper.Messenger

func CustomQuerier

func CustomQuerier(qp *QueryPlugin) func(ctx sdk.Context, request json.RawMessage) ([]byte, error)

CustomQuerier returns a function that is an implementation of custom querier mechanism for specific messages

func RegisterCustomPlugins

func RegisterCustomPlugins(
	dexKeeper *dexkeeper.Keeper,
) []wasmkeeper.Option

RegisterCustomPlugins returns wasmkeeper.Option that we can use to connect handlers for implemented custom queries and messages to the App

Types

type CustomMessenger

type CustomMessenger struct {
	Wrapped      wasmkeeper.Messenger
	DexMsgServer dextypes.MsgServer
}

func (*CustomMessenger) DispatchMsg

func (m *CustomMessenger) DispatchMsg(
	ctx sdk.Context,
	contractAddr sdk.AccAddress,
	contractIBCPortID string,
	msg wasmvmtypes.CosmosMsg,
) ([]sdk.Event, [][]byte, error)

type QueryPlugin

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

func NewQueryPlugin

func NewQueryPlugin(
	dexKeeper *dexkeeper.Keeper,
) *QueryPlugin

NewQueryPlugin returns a reference to a new QueryPlugin.

func (*QueryPlugin) GetEstimateMultiHopSwapResult

func (qp *QueryPlugin) GetEstimateMultiHopSwapResult(
	ctx sdk.Context,
	creator string,
	receiver string,
	routes []*bindings.MultiHopRoute,
	amountIn sdk.Int,
	exitLimitPrice sdk.Dec,

	pickBestRoute bool,
) (*bindings.EstimateMultiHopSwapResultResponse, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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