keeper

package
v0.0.0-...-b8140f3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

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

Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine

func NewKeeper

func NewKeeper(
	cdc codec.Codec,
	channelKeeper types.ChannelKeeper,
	portKeeper types.PortKeeper,
) Keeper

NewKeeper creates a new vibc Keeper instance

func (Keeper) ClaimCapability

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

ClaimCapability allows the vibc module to claim a capability that IBC module passes to it.

func (Keeper) GetAppVersion

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

GetAppVersion defines a wrapper function for the channel Keeper's function in order to expose it to the vibc IBC handler.

func (Keeper) GetCapability

func (k Keeper) GetCapability(ctx sdk.Context, name string) (*capability.Capability, bool)

GetCapability allows the vibc module to retrieve a capability.

func (Keeper) GetChannel

func (k Keeper) GetChannel(ctx sdk.Context, portID, channelID string) (channeltypes.Channel, bool)

GetChannel defines a wrapper function for the channel Keeper's function in order to expose it to the vibc IBC handler.

func (Keeper) GetICS4Wrapper

func (k Keeper) GetICS4Wrapper() porttypes.ICS4Wrapper

GetICS4Wrapper returns the ICS4Wrapper interface for the keeper.

func (Keeper) PushAction

func (k Keeper) PushAction(ctx sdk.Context, action vm.Action) error

PushAction sends a vm.Action to the VM controller.

func (Keeper) ReceiveBindPort

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

ReceiveBindPort is a wrapper function for the port Keeper's function in order to expose it to the vibc IBC handler.

func (Keeper) ReceiveChanCloseInit

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

ReceiveChanCloseInit is a wrapper function for the channel Keeper's function in order to expose it to the vibc IBC handler.

func (Keeper) ReceiveChanOpenInit

func (k Keeper) ReceiveChanOpenInit(ctx sdk.Context, order channeltypes.Order, connectionHops []string,
	portID, rPortID, version string,
) error

ReceiveChanOpenInit wraps the keeper's ChanOpenInit function.

func (Keeper) ReceiveSendPacket

func (k Keeper) ReceiveSendPacket(ctx sdk.Context, packet ibcexported.PacketI) (uint64, error)

ReceiveSendPacket wraps the keeper's SendPacket function.

func (Keeper) ReceiveTimeoutExecuted

func (k Keeper) ReceiveTimeoutExecuted(ctx sdk.Context, packet ibcexported.PacketI) error

ReceiveTimeoutExecuted is a wrapper function for the channel Keeper's function in order to expose it to the vibc IBC handler.

func (Keeper) ReceiveWriteAcknowledgement

func (k Keeper) ReceiveWriteAcknowledgement(ctx sdk.Context, packet ibcexported.PacketI, ack ibcexported.Acknowledgement) error

ReceiveWriteAcknowledgement wraps the keeper's WriteAcknowledgment function.

func (Keeper) ReceiveWriteOpenTryChannel

func (k Keeper) ReceiveWriteOpenTryChannel(ctx sdk.Context, packet ibcexported.PacketI, order channeltypes.Order, connectionHops []string, version string) error

ReceiveWriteOpenTryChannel wraps the keeper's WriteOpenTryChannel function.

func (Keeper) SendPacket

func (k Keeper) SendPacket(
	ctx sdk.Context,
	chanCap *capability.Capability,
	sourcePort string,
	sourceChannel string,
	timeoutHeight clienttypes.Height,
	timeoutTimestamp uint64,
	data []byte,
) (uint64, error)

SendPacket defines a wrapper function for the channel Keeper's function in order to expose it to the vibc IBC handler.

func (Keeper) TriggerOnAcknowledgementPacket

func (k Keeper) TriggerOnAcknowledgementPacket(
	ctx sdk.Context,
	target string,
	packet ibcexported.PacketI,
	acknowledgement []byte,
	relayer sdk.AccAddress,
) error

func (Keeper) TriggerOnTimeoutPacket

func (k Keeper) TriggerOnTimeoutPacket(
	ctx sdk.Context,
	target string,
	packet ibcexported.PacketI,
	relayer sdk.AccAddress,
) error

func (Keeper) TriggerWriteAcknowledgement

func (k Keeper) TriggerWriteAcknowledgement(
	ctx sdk.Context,
	target string,
	packet ibcexported.PacketI,
	acknowledgement ibcexported.Acknowledgement,
) error

func (Keeper) WithScope

func (k Keeper) WithScope(storeKey storetypes.StoreKey, scopedKeeper types.ScopedKeeper, pushAction vm.ActionPusher) Keeper

WithScope returns a new Keeper copied from the receiver, but with the given store key, scoped keeper, and push action.

func (Keeper) WriteAcknowledgement

func (k Keeper) WriteAcknowledgement(ctx sdk.Context, chanCap *capability.Capability, packet ibcexported.PacketI, ack ibcexported.Acknowledgement) error

WriteAcknowledgement defines a wrapper function for the channel Keeper's function in order to expose it to the vibc IBC handler.

func (Keeper) WriteOpenTryChannel

func (k Keeper) WriteOpenTryChannel(ctx sdk.Context, portID, channelID string, order channeltypes.Order,
	connectionHops []string, counterparty channeltypes.Counterparty, version string)

WriteOpenTryChannel is a wrapper function for the channel Keeper's function

type WriteAcknowledgementEvent

type WriteAcknowledgementEvent struct {
	*vm.ActionHeader `actionType:"IBC_EVENT"`
	Event            string              `json:"event" default:"writeAcknowledgement"`
	Target           string              `json:"target"`
	Packet           channeltypes.Packet `json:"packet"`
	Acknowledgement  []byte              `json:"acknowledgement"`
	Relayer          sdk.AccAddress      `json:"relayer"`
}

Jump to

Keyboard shortcuts

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