keeper

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeriveIntermediateSender

func DeriveIntermediateSender(channel, originalSender, bech32Prefix string) (string, error)

DeriveIntermediateSender derives the sender address to be used when calling wasm hooks

func GeneratePacketAckValue

func GeneratePacketAckValue(packet channeltypes.Packet, contract string) ([]byte, error)

func GetPacketAckKey

func GetPacketAckKey(channel string, packetSequence uint64) []byte

func GetPacketCallbackKey

func GetPacketCallbackKey(channel string, packetSequence uint64) []byte

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func NewSuccessAckError

func NewSuccessAckError(ctx sdk.Context, err error, errorContent []byte, errorContexts ...string) channeltypes.Acknowledgement

NewSuccessAckError creates a new success acknowledgement that represents an error. This is useful for notifying the sender that an error has occurred in a way that does not allow the received tokens to be reverted (which means they shouldn't be released by the sender's ics20 escrow)

Types

type Keeper

type Keeper struct {
	ContractKeeper *wasmkeeper.PermissionedKeeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	storeKey storetypes.StoreKey,
	paramSpace paramtypes.Subspace,
	channelKeeper types.ChannelKeeper,
	contractKeeper *wasmkeeper.PermissionedKeeper,
) Keeper

NewKeeper returns a new instance of the x/ibchooks keeper

func (Keeper) DeletePacketAckActor

func (k Keeper) DeletePacketAckActor(ctx sdk.Context, channel string, packetSequence uint64)

DeletePacketAckActor deletes the ack actor from storage once it has been used

func (Keeper) DeletePacketCallback

func (k Keeper) DeletePacketCallback(ctx sdk.Context, channel string, packetSequence uint64)

DeletePacketCallback deletes the callback from storage once it has been processed

func (Keeper) EmitIBCAck

func (k Keeper) EmitIBCAck(ctx sdk.Context, sender, channel string, packetSequence uint64) ([]byte, error)

EmitIBCAck emits an event that the IBC packet has been acknowledged

func (Keeper) ExportGenesis

func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState

func (Keeper) GetPacketAckActor

func (k Keeper) GetPacketAckActor(ctx sdk.Context, channel string, packetSequence uint64) (string, string)

GetPacketAckActor returns the bech32 addr of the contract that is allowed to send an ack for the packet and the packet hash

func (Keeper) GetPacketCallback

func (k Keeper) GetPacketCallback(ctx sdk.Context, channel string, packetSequence uint64) string

GetPacketCallback returns the bech32 addr of the contract that is expecting a callback from a packet

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams returns the total set of the module's parameters.

func (Keeper) InitGenesis

func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)

func (Keeper) IsInAllowList

func (k Keeper) IsInAllowList(ctx sdk.Context, contract string) bool

IsInAllowList checks the params to see if the contract is in the KeyAsyncAckAllowList param

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a logger for the x/tokenfactory module

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams sets the module's parameters with the provided parameters.

func (Keeper) StorePacketAckActor

func (k Keeper) StorePacketAckActor(ctx sdk.Context, packet channeltypes.Packet, contract string)

StorePacketAckActor stores which contract is allowed to send an ack for the packet

func (Keeper) StorePacketCallback

func (k Keeper) StorePacketCallback(ctx sdk.Context, channel string, packetSequence uint64, contract string)

StorePacketCallback stores which contract will be listening for the ack or timeout of a packet

Jump to

Keyboard shortcuts

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