Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) GetICS4Wrapper() porttypes.ICS4Wrapper
- func (k Keeper) GetReceiverImpl() vibctypes.ReceiverImpl
- func (k Keeper) GetWatchedAddresses(ctx sdk.Context) ([]sdk.AccAddress, error)
- func (k Keeper) InterceptOnAcknowledgementPacket(ctx sdk.Context, ibcModule porttypes.IBCModule, packet channeltypes.Packet, ...) error
- func (k Keeper) InterceptOnRecvPacket(ctx sdk.Context, ibcModule porttypes.IBCModule, packet channeltypes.Packet, ...) ibcexported.Acknowledgement
- func (k Keeper) InterceptOnTimeoutPacket(ctx sdk.Context, ibcModule porttypes.IBCModule, packet channeltypes.Packet, ...) error
- func (k Keeper) InterceptWriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, ...) error
- func (k Keeper) Receive(cctx context.Context, jsonRequest string) (jsonReply string, err error)
- func (k Keeper) SetWatchedAddresses(ctx sdk.Context, addresses []sdk.AccAddress)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct { porttypes.ICS4Wrapper vibctypes.ReceiverImpl // contains filtered or unexported fields }
Keeper handles the interceptions from the vtransfer IBC middleware, passing them to the embedded vibc keeper if they involve a targeted address (which is an address associated with a VM listener). The embedded vibc keeper is used to bridge calls to swingset, but with a special wrapper on the bridge controller to use distinct action types. The keeper keeps a store of "targeted addresses", managed from Swingset by bridge messages.
func NewKeeper ¶
func NewKeeper( cdc codec.Codec, key storetypes.StoreKey, prototypeVibcKeeper vibc.Keeper, scopedTransferKeeper capabilitykeeper.ScopedKeeper, pushAction vm.ActionPusher, ) Keeper
NewKeeper creates a new vtransfer Keeper instance
func (Keeper) GetICS4Wrapper ¶
func (k Keeper) GetICS4Wrapper() porttypes.ICS4Wrapper
func (Keeper) GetReceiverImpl ¶
func (k Keeper) GetReceiverImpl() vibctypes.ReceiverImpl
func (Keeper) GetWatchedAddresses ¶
GetWatchedAdresses returns the watched addresses from the keeper as a slice of account addresses.
func (Keeper) InterceptOnAcknowledgementPacket ¶
func (k Keeper) InterceptOnAcknowledgementPacket( ctx sdk.Context, ibcModule porttypes.IBCModule, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, ) error
InterceptOnAcknowledgementPacket checks to see if the packet sender is a targeted account, and if so, delegates to the VM.
func (Keeper) InterceptOnRecvPacket ¶
func (k Keeper) InterceptOnRecvPacket(ctx sdk.Context, ibcModule porttypes.IBCModule, packet channeltypes.Packet, relayer sdk.AccAddress) ibcexported.Acknowledgement
InterceptOnRecvPacket runs the ibcModule and eventually acknowledges a packet. Many error acknowledgments are sent synchronously, but most cases instead return nil to tell the IBC system that acknowledgment is async (i.e., that WriteAcknowledgement will be called later, after the VM has dealt with the packet).
func (Keeper) InterceptOnTimeoutPacket ¶
func (k Keeper) InterceptOnTimeoutPacket( ctx sdk.Context, ibcModule porttypes.IBCModule, packet channeltypes.Packet, relayer sdk.AccAddress, ) error
InterceptOnTimeoutPacket checks to see if the packet sender is a targeted account, and if so, delegates to the VM.
func (Keeper) InterceptWriteAcknowledgement ¶
func (k Keeper) InterceptWriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet ibcexported.PacketI, ack ibcexported.Acknowledgement) error
InterceptWriteAcknowledgement checks to see if the packet's receiver is a targeted account, and if so, delegates to the VM.
func (Keeper) SetWatchedAddresses ¶
func (k Keeper) SetWatchedAddresses(ctx sdk.Context, addresses []sdk.AccAddress)
SetWatchedAddresses sets the watched addresses in the keeper from a slice of SDK account addresses.