keeper

package
v1.20.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 18 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(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	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) GetAuthority added in v1.19.0

func (k Keeper) GetAuthority() string

GetAuthority is signer of the proposal

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) IsAuthority added in v1.19.0

func (k Keeper) IsAuthority(addr string) bool

IsAuthority returns true if the provided address bech32 string is the authority address.

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) Params added in v1.19.0

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

func (Keeper) ValidateAuthority added in v1.19.0

func (k Keeper) ValidateAuthority(addr string) error

ValidateAuthority returns an error if the provided address is not the authority.

Jump to

Keyboard shortcuts

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