keeper

package
v0.0.0-...-abdbe5d Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllInvariants

func AllInvariants(k *Keeper) sdk.Invariant

AllInvariants runs all invariants of the module.

func MissingVerifiedClientIDInvariant

func MissingVerifiedClientIDInvariant(k *Keeper) sdk.Invariant

MissingVerifiedClientIDInvariant checks if any of the clientIDs in `VerifiedClientID` does not have a corresponding entry in `LaunchIDFromVerifiedClientID`

func NewMsgServerImpl

func NewMsgServerImpl(keeper *Keeper) types.MsgServer

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

func NewQueryServerImpl

func NewQueryServerImpl(k *Keeper) types.QueryServer

NewQueryServerImpl returns an implementation of the QueryServer interface for the provided Keeper.

func RegisterInvariants

func RegisterInvariants(ir sdk.InvariantRegistry, k *Keeper)

RegisterInvariants registers all module invariants

Types

type Keeper

type Keeper struct {
	Schema                       collections.Schema
	Params                       collections.Item[types.Params]
	LaunchIDFromChannelID        collections.Map[string, types.LaunchIDFromChannelID]
	LaunchIDFromVerifiedClientID collections.Map[string, types.LaunchIDFromVerifiedClientID]
	MonitoringHistory            collections.Map[uint64, types.MonitoringHistory]
	VerifiedClientID             collections.Map[uint64, types.VerifiedClientID]
	ProviderClientID             collections.Map[uint64, types.ProviderClientID]
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	addressCodec address.Codec,
	storeService store.KVStoreService,
	logger log.Logger,
	authority string,
	ibcKeeperFn func() *ibckeeper.Keeper,
	capabilityScopedFn func(string) capabilitykeeper.ScopedKeeper,
	launchKeeper types.LaunchKeeper,
	rewardKeeper types.RewardKeeper,
) *Keeper

func (Keeper) AddVerifiedClientID

func (k Keeper) AddVerifiedClientID(ctx context.Context, launchID uint64, clientID string) error

AddVerifiedClientID add a specific verifiedClientID without duplication in the store from its launch id

func (Keeper) AddressCodec

func (k Keeper) AddressCodec() address.Codec

AddressCodec returns the address codec.

func (Keeper) AllLaunchIDFromVerifiedClientID

func (k Keeper) AllLaunchIDFromVerifiedClientID(ctx context.Context) ([]types.LaunchIDFromVerifiedClientID, error)

AllLaunchIDFromVerifiedClientID returns all LaunchIDFromVerifiedClientID.

func (Keeper) AllVerifiedClientID

func (k Keeper) AllVerifiedClientID(ctx context.Context) ([]types.VerifiedClientID, error)

AllVerifiedClientID returns all VerifiedClientID.

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 defines a wrapper function for the port Keeper's function in order to expose it to module's InitGenesis function

func (Keeper) ChanCloseInit

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

ChanCloseInit defines a wrapper function for the channel Keeper's function.

func (Keeper) ClaimCapability

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

ClaimCapability allows the IBC app module to claim a capability that core IBC passes to it

func (Keeper) ClearVerifiedClientIdList

func (k Keeper) ClearVerifiedClientIdList(ctx context.Context, launchID uint64) error

ClearVerifiedClientIdList removes a set of verifiedClientID in the store from its launch ID

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the module's authority.

func (Keeper) GetPort

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

GetPort returns the portID for the IBC app module. Used in ExportGenesis

func (Keeper) Logger

func (k Keeper) Logger() log.Logger

Logger returns a module-specific logger.

func (Keeper) OnAcknowledgementMonitoringPacket

func (k Keeper) OnAcknowledgementMonitoringPacket(
	_ sdk.Context,
	_ channeltypes.Packet,
	_ networktypes.MonitoringPacket,
	_ channeltypes.Acknowledgement,
) error

OnAcknowledgementMonitoringPacket responds to the the success or failure of a packet acknowledgement written on the receiving chain.

func (Keeper) OnRecvMonitoringPacket

func (k Keeper) OnRecvMonitoringPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	data networktypes.MonitoringPacket,
) (packetAck networktypes.MonitoringPacketAck, err error)

OnRecvMonitoringPacket processes packet reception

func (Keeper) OnTimeoutMonitoringPacket

func (k Keeper) OnTimeoutMonitoringPacket(
	_ sdk.Context,
	_ channeltypes.Packet,
	_ networktypes.MonitoringPacket,
) error

OnTimeoutMonitoringPacket responds to the case where a packet has not been transmitted because of a timeout

func (Keeper) RegisterProviderClientIDFromChannelID

func (k Keeper) RegisterProviderClientIDFromChannelID(ctx sdk.Context, channelID string) error

RegisterProviderClientIDFromChannelID registers the verified client ID for the provider this operation should be performed at OnChanOpenAck

func (Keeper) ScopedKeeper

func (k Keeper) ScopedKeeper() exported.ScopedKeeper

ScopedKeeper returns the ScopedKeeper

func (*Keeper) SetChannelKeeper

func (k *Keeper) SetChannelKeeper(channelKeeper types.ChannelKeeper) error

SetChannelKeeper sets IBC channel keeper

func (*Keeper) SetClientKeeper

func (k *Keeper) SetClientKeeper(clientKeeper types.ClientKeeper) error

SetClientKeeper sets IBC client keeper

func (*Keeper) SetConnectionKeeper

func (k *Keeper) SetConnectionKeeper(connectionKeeper types.ConnectionKeeper) error

SetConnectionKeeper sets IBC connection keeper

func (*Keeper) SetIBCKeeper

func (k *Keeper) SetIBCKeeper(ibcKeeper *ibckeeper.Keeper) error

SetIBCKeeper sets the IBC Keeper

func (Keeper) SetPort

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

SetPort sets the portID for the IBC app module. Used in InitGenesis

func (*Keeper) SetPortKeeper

func (k *Keeper) SetPortKeeper(portKeeper types.PortKeeper) error

SetPortKeeper sets IBC port keeper

func (Keeper) ShouldBound

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

ShouldBound checks if the IBC app module can be bound to the desired port

func (Keeper) VerifyClientIDFromConnID

func (k Keeper) VerifyClientIDFromConnID(ctx sdk.Context, connID string) error

VerifyClientIDFromConnID verifies if the client ID associated with the provided connection ID is a verified client ID and if no connection is yet established with the provider chain this operation should be performed at OnChanOpenInit handshake phase

Jump to

Keyboard shortcuts

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