keeper

package
v8.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmitWriteErrorAcknowledgementEvent

func EmitWriteErrorAcknowledgementEvent(ctx sdk.Context, packet exported.PacketI, err error)

EmitWriteErrorAcknowledgementEvent emits an event signalling an error acknowledgement and including the error details

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

Types

type Keeper

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

Keeper defines the IBC interchain query host keeper

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec, key storetypes.StoreKey,
	ics4Wrapper types.ICS4Wrapper, channelKeeper types.ChannelKeeper, portKeeper types.PortKeeper,
	scopedKeeper capabilitykeeper.ScopedKeeper, queryRouter *baseapp.GRPCQueryRouter, authority string,
) Keeper

NewKeeper creates a new interchain query Keeper instance

func (Keeper) AuthenticateCapability

func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool

AuthenticateCapability wraps the scopedKeeper's AuthenticateCapability function

func (Keeper) BindPort

func (k Keeper) BindPort(ctx sdk.Context, portID string) error

BindPort stores the provided portID and binds to it, returning the associated capability

func (Keeper) ClaimCapability

func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error

ClaimCapability wraps the scopedKeeper's ClaimCapability function

func (Keeper) ExportGenesis

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

ExportGenesis exports icq module's portID and denom trace info into its genesis state.

func (Keeper) GetAllowQueries

func (k Keeper) GetAllowQueries(ctx sdk.Context) []string

GetAllowQueries retrieves the host enabled query paths from the params

func (Keeper) GetAppVersion

func (k Keeper) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool)

GetAppVersion calls the ICS4Wrapper GetAppVersion function.

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the module's authority.

func (Keeper) GetParams

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

GetParams returns the current module parameters.

func (Keeper) GetPort

func (k Keeper) GetPort(ctx sdk.Context) string

GetPort returns the portID for the transfer module. Used in ExportGenesis

func (Keeper) InitGenesis

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

InitGenesis initializes the icq state and binds to PortID.

func (Keeper) IsBound

func (k Keeper) IsBound(ctx sdk.Context, portID string) bool

IsBound checks if the interchain query already bound to the desired port

func (Keeper) IsHostEnabled

func (k Keeper) IsHostEnabled(ctx sdk.Context) bool

IsHostEnabled retrieves the host enabled boolean from the params. True is returned if the host is enabled.

func (Keeper) Logger

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

Logger returns the application logger, scoped to the associated module

func (Keeper) OnRecvPacket

func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet) ([]byte, error)

OnRecvPacket handles a given interchain queries packet on a destination host chain. If the transaction is successfully executed, the transaction response bytes will be returned.

func (Keeper) Params

Params implements the Query/Params gRPC method

func (Keeper) SetParams

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

SetParams sets the module parameters.

func (Keeper) SetPort

func (k Keeper) SetPort(ctx sdk.Context, portID string)

SetPort sets the portID for the transfer module. Used in InitGenesis

type Migrator

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

Migrator is a struct for handling in-place state migrations.

func NewMigrator

func NewMigrator(k *Keeper, ss exported.Subspace) Migrator

func (Migrator) Migrate1to2

func (m Migrator) Migrate1to2(ctx sdk.Context) error

Migrate1to2 migrates the module state from the consensus version 1 to version 2. Specifically, it takes the parameters that are currently stored and managed by the x/params modules and stores them directly into the module state.

Jump to

Keyboard shortcuts

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