keeper

package
v0.0.0-...-2617881 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

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 module MsgServer interface.

func NewQueryServerImpl

func NewQueryServerImpl(k *Keeper) types.QueryServer

NewQueryServerImpl returns an implementation of the module QueryServer.

Types

type Keeper

type Keeper struct {

	// state management
	Mailboxes collections.Map[uint64, types.Mailbox]
	// first key is the mailbox ID, second key is the message ID
	Messages collections.KeySet[collections.Pair[uint64, []byte]]
	// Key is the Receiver address (util.HexAddress) and value is the util.HexAddress of the ISM
	MailboxesSequence collections.Sequence

	Schema collections.Schema

	IsmKeeper          ismkeeper.Keeper
	PostDispatchKeeper postdispatchkeeper.Keeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, addressCodec address.Codec, storeService storetypes.KVStoreService, authority string, bankKeeper types.BankKeeper) Keeper

NewKeeper creates a new Keeper instance

func (Keeper) AppRouter

func (k Keeper) AppRouter() *util.Router[util.HyperlaneApp]

func (*Keeper) AssertIsmExists

func (k *Keeper) AssertIsmExists(ctx context.Context, id util.HexAddress) error

func (*Keeper) AssertPostDispatchHookExists

func (k *Keeper) AssertPostDispatchHookExists(ctx context.Context, id util.HexAddress) error

func (Keeper) DispatchMessage

func (k Keeper) DispatchMessage(
	ctx sdk.Context,
	originMailboxId util.HexAddress,

	sender util.HexAddress,

	maxFee sdk.Coins,

	destinationDomain uint32,

	recipient util.HexAddress,
	body []byte,

	metadata util.StandardHookMetadata,
	postDispatchHookId *util.HexAddress,
) (messageId util.HexAddress, error error)

func (*Keeper) ExportGenesis

func (k *Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error)

ExportGenesis exports the module state to a genesis state.

func (Keeper) GetMailbox

func (k Keeper) GetMailbox(ctx context.Context, mailboxId util.HexAddress) (types.Mailbox, error)

func (*Keeper) Handle

func (k *Keeper) Handle(ctx context.Context, mailboxId util.HexAddress, message util.HyperlaneMessage) error

func (*Keeper) InitGenesis

func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error

InitGenesis initializes the module state from a genesis state.

func (*Keeper) IsmExists

func (k *Keeper) IsmExists(ctx context.Context, ismId util.HexAddress) (bool, error)

func (Keeper) IsmRouter

func (Keeper) LocalDomain

func (k Keeper) LocalDomain(ctx context.Context, mailboxId util.HexAddress) (uint32, error)

func (Keeper) MailboxIdExists

func (k Keeper) MailboxIdExists(ctx context.Context, mailboxId util.HexAddress) (bool, error)

func (*Keeper) PostDispatch

func (k *Keeper) PostDispatch(ctx context.Context, mailboxId, hookId util.HexAddress, metadata util.StandardHookMetadata, message util.HyperlaneMessage, maxFee sdk.Coins) (sdk.Coins, error)

func (*Keeper) PostDispatchHookExists

func (k *Keeper) PostDispatchHookExists(ctx context.Context, hookId util.HexAddress) (bool, error)

func (Keeper) PostDispatchRouter

func (k Keeper) PostDispatchRouter() *util.Router[util.PostDispatchModule]

func (Keeper) ProcessMessage

func (k Keeper) ProcessMessage(ctx sdk.Context, mailboxId util.HexAddress, rawMessage []byte, metadata []byte) error

func (*Keeper) QuoteDispatch

func (k *Keeper) QuoteDispatch(ctx context.Context, mailboxId, overwriteHookId util.HexAddress, metadata util.StandardHookMetadata, message util.HyperlaneMessage) (sdk.Coins, error)

func (*Keeper) ReceiverIsmId

func (k *Keeper) ReceiverIsmId(ctx context.Context, recipient util.HexAddress) (util.HexAddress, error)

func (*Keeper) Verify

func (k *Keeper) Verify(ctx context.Context, ismId util.HexAddress, metadata []byte, message util.HyperlaneMessage) (bool, error)

Jump to

Keyboard shortcuts

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