wasmbinding

package
v2.0.1-0...-ba8258b Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

README

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

What is supported

  • Queries:
    • InterchainQueryResult - Get the result of a registered interchain query by query_id
    • InterchainAccountAddress - Get the interchain account address by owner_id and connection_id
    • RegisteredInterchainQueries - all set of registered interchain queries.
    • RegisteredInterchainQuery - registered interchain query with specified query_id
  • Messages:
    • RegisterInterchainAccount - register an interchain account
    • SubmitTx - submit a transaction for execution on a remote chain
    • RegisterInterchainQuery - register an interchain query
    • UpdateInterchainQuery - update an interchain query
    • RemoveInterchainQuery - remove an interchain query

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptedStargateQueries

func AcceptedStargateQueries() wasmkeeper.AcceptedStargateQueries

func ChangeAdmin

func ChangeAdmin(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contractAddr sdk.AccAddress, changeAdmin *bindings.ChangeAdmin) error

ChangeAdmin is used with changeAdmin to validate changeAdmin messages and to dispatch.

func CustomMessageDecorator

func CustomMessageDecorator(
	ictx *ictxkeeper.Keeper,
	icq *icqkeeper.Keeper,
	transferKeeper transferwrapperkeeper.KeeperTransferWrapper,
	adminKeeper *adminmodulekeeper.Keeper,
	bankKeeper *bankkeeper.BaseKeeper,
	tokenFactoryKeeper *tokenfactorykeeper.Keeper,
	cronKeeper *cronkeeper.Keeper,
	contractmanagerKeeper *contractmanagerkeeper.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 GetFullDenom

func GetFullDenom(contract, subDenom string) (string, error)

GetFullDenom is a function, not method, so the message_plugin can use it

func PerformBurn

func PerformBurn(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contractAddr sdk.AccAddress, burn *bindings.BurnTokens) error

PerformBurn performs token burning after validating tokenBurn message.

func PerformCreateDenom

func PerformCreateDenom(f *tokenfactorykeeper.Keeper, _ *bankkeeper.BaseKeeper, ctx sdk.Context, contractAddr sdk.AccAddress, createDenom *bindings.CreateDenom) error

PerformCreateDenom is used with createDenom to create a token denom; validates the msgCreateDenom.

func PerformMint

func PerformMint(f *tokenfactorykeeper.Keeper, b *bankkeeper.BaseKeeper, ctx sdk.Context, contractAddr sdk.AccAddress, mint *bindings.MintTokens) error

PerformMint used with mintTokens to validate the mint message and mint through token factory.

func PerformSetBeforeSendHook

func PerformSetBeforeSendHook(f *tokenfactorykeeper.Keeper, ctx sdk.Context, contractAddr sdk.AccAddress, set *bindings.SetBeforeSendHook) error

func RegisterCustomPlugins

func RegisterCustomPlugins(
	ictxKeeper *interchaintransactionsmodulekeeper.Keeper,
	icqKeeper *interchainqueriesmodulekeeper.Keeper,
	transfer transfer.KeeperTransferWrapper,
	adminKeeper *adminmodulekeeper.Keeper,
	feeBurnerKeeper *feeburnerkeeper.Keeper,
	feeRefunderKeeper *feerefunderkeeper.Keeper,
	bank *bankkeeper.BaseKeeper,
	tfk *tokenfactorykeeper.Keeper,
	cronKeeper *cronkeeper.Keeper,
	contractmanagerKeeper *contractmanagerkeeper.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 {
	Keeper        ictxkeeper.Keeper
	Wrapped       wasmkeeper.Messenger
	Ictxmsgserver ictxtypes.MsgServer
	Icqmsgserver  icqtypes.MsgServer

	Adminserver           admintypes.MsgServer
	Bank                  *bankkeeper.BaseKeeper
	TokenFactory          *tokenfactorykeeper.Keeper
	CronKeeper            *cronkeeper.Keeper
	AdminKeeper           *adminmodulekeeper.Keeper
	ContractmanagerKeeper *contractmanagerkeeper.Keeper
	// contains filtered or unexported fields
}

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(icaControllerKeeper *icacontrollerkeeper.Keeper, icqKeeper *icqkeeper.Keeper, feeBurnerKeeper *feeburnerkeeper.Keeper, feeRefunderKeeper *feerefunderkeeper.Keeper, tfk *tokenfactorykeeper.Keeper, contractmanagerKeeper *contractmanagerkeeper.Keeper) *QueryPlugin

NewQueryPlugin returns a reference to a new QueryPlugin.

func (QueryPlugin) GetBeforeSendHook

func (qp QueryPlugin) GetBeforeSendHook(ctx sdk.Context, denom string) (*bindings.BeforeSendHookResponse, error)

GetBeforeSendHook is a query to get denom before send hook.

func (QueryPlugin) GetDenomAdmin

func (qp QueryPlugin) GetDenomAdmin(ctx sdk.Context, denom string) (*bindings.DenomAdminResponse, error)

GetDenomAdmin is a query to get denom admin.

func (*QueryPlugin) GetFailures

func (qp *QueryPlugin) GetFailures(ctx sdk.Context, address string, pagination *sdkquery.PageRequest) (*bindings.FailuresResponse, error)

func (*QueryPlugin) GetInterchainQueryResult

func (qp *QueryPlugin) GetInterchainQueryResult(ctx sdk.Context, queryID uint64) (*bindings.QueryRegisteredQueryResultResponse, error)

func (*QueryPlugin) GetMinIbcFee

func (*QueryPlugin) GetRegisteredInterchainQueries

func (qp *QueryPlugin) GetRegisteredInterchainQueries(ctx sdk.Context, query *bindings.QueryRegisteredQueriesRequest) (*bindings.QueryRegisteredQueriesResponse, error)

func (*QueryPlugin) GetRegisteredInterchainQuery

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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