wasmbinding

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

README

CosmWasm support

This package contains CosmWasm integration points.

This package provides first class support for:

  • Queries
    • OracleExchangeRates
  • Messages / Execution
    • N/A

Documentation

Index

Constants

View Source
const (
	OracleRoute       = "oracle"
	DexRoute          = "dex"
	EpochRoute        = "epoch"
	TokenFactoryRoute = "tokenfactory"
	EVMRoute          = "evm"
)

Variables

This section is empty.

Functions

func AreDependenciesFulfilled

func AreDependenciesFulfilled(lookupMap map[acltypes.ResourceAccess]map[string]struct{}, accessOp sdkacltypes.AccessOperation) bool

func BuildWasmDependencyLookupMap

func BuildWasmDependencyLookupMap(accessOps []sdkacltypes.AccessOperation) map[acltypes.ResourceAccess]map[string]struct{}

func CustomEncoder

func CustomEncoder(sender sdk.AccAddress, msg json.RawMessage, info wasmvmtypes.MessageInfo, codeInfo wasmtypes.CodeInfo) ([]sdk.Msg, error)

func CustomMessageHandler

func CustomMessageHandler(
	router wasmkeeper.MessageRouter,
	channelKeeper wasmtypes.ChannelKeeper,
	capabilityKeeper wasmtypes.CapabilityKeeper,
	bankKeeper wasmtypes.Burner,
	evmKeeper *evmkeeper.Keeper,
	unpacker codectypes.AnyUnpacker,
	portSource wasmtypes.ICS20TransferPortSource,
	_ aclkeeper.Keeper,
) wasmkeeper.Messenger

forked from wasm

func CustomQuerier

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

func GenerateAllowedResourceAccess

func GenerateAllowedResourceAccess(resource sdkacltypes.ResourceType, access sdkacltypes.AccessType) []acltypes.ResourceAccess

func RegisterCustomPlugins

func RegisterCustomPlugins(
	oracle *oraclekeeper.Keeper,
	dex *dexkeeper.Keeper,
	epoch *epochkeeper.Keeper,
	tokenfactory *tokenfactorykeeper.Keeper,
	_ *authkeeper.AccountKeeper,
	router wasmkeeper.MessageRouter,
	channelKeeper wasmtypes.ChannelKeeper,
	capabilityKeeper wasmtypes.CapabilityKeeper,
	bankKeeper wasmtypes.Burner,
	unpacker codectypes.AnyUnpacker,
	portSource wasmtypes.ICS20TransferPortSource,
	aclKeeper aclkeeper.Keeper,
	evmKeeper *evmkeeper.Keeper,
) []wasmkeeper.Option

Types

type CustomRouter

type CustomRouter struct {
	wasmkeeper.MessageRouter
	// contains filtered or unexported fields
}

func (*CustomRouter) Handler

func (r *CustomRouter) Handler(msg sdk.Msg) baseapp.MsgServiceHandler

type QueryPlugin

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

func NewQueryPlugin

NewQueryPlugin returns a reference to a new QueryPlugin.

func (QueryPlugin) HandleDexQuery

func (qp QueryPlugin) HandleDexQuery(ctx sdk.Context, queryData json.RawMessage) ([]byte, error)

func (QueryPlugin) HandleEVMQuery

func (qp QueryPlugin) HandleEVMQuery(ctx sdk.Context, queryData json.RawMessage) ([]byte, error)

func (QueryPlugin) HandleEpochQuery

func (qp QueryPlugin) HandleEpochQuery(ctx sdk.Context, queryData json.RawMessage) ([]byte, error)

func (QueryPlugin) HandleOracleQuery

func (qp QueryPlugin) HandleOracleQuery(ctx sdk.Context, queryData json.RawMessage) ([]byte, error)

func (QueryPlugin) HandleTokenFactoryQuery

func (qp QueryPlugin) HandleTokenFactoryQuery(ctx sdk.Context, queryData json.RawMessage) ([]byte, error)

type SeiQueryWrapper

type SeiQueryWrapper struct {
	// specifies which module handler should handle the query
	Route string `json:"route,omitempty"`
	// The query data that should be parsed into the module query
	QueryData json.RawMessage `json:"query_data,omitempty"`
}

type SeiWasmMessage

type SeiWasmMessage struct {
	PlaceOrders     json.RawMessage `json:"place_orders,omitempty"`
	CancelOrders    json.RawMessage `json:"cancel_orders,omitempty"`
	CreateDenom     json.RawMessage `json:"create_denom,omitempty"`
	MintTokens      json.RawMessage `json:"mint_tokens,omitempty"`
	BurnTokens      json.RawMessage `json:"burn_tokens,omitempty"`
	ChangeAdmin     json.RawMessage `json:"change_admin,omitempty"`
	SetMetadata     json.RawMessage `json:"set_metadata,omitempty"`
	CallEVM         json.RawMessage `json:"call_evm,omitempty"`
	DelegateCallEVM json.RawMessage `json:"delegate_call_evm,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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