Documentation
¶
Index ¶
- func NewICS4Wrapper(k Keeper, down porttypes.ICS4Wrapper) *ics4Wrapper
- 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 ibcexported.PacketI, ...) error
- func (k Keeper) InterceptOnRecvPacket(ctx sdk.Context, ibcModule porttypes.IBCModule, packet ibcexported.PacketI, ...) ibcexported.Acknowledgement
- func (k Keeper) InterceptOnTimeoutPacket(ctx sdk.Context, ibcModule porttypes.IBCModule, packet ibcexported.PacketI, ...) error
- func (k Keeper) InterceptWriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, ...) (ibcexported.Acknowledgement, ibcexported.PacketI)
- func (k Keeper) PacketStore(ctx sdk.Context, ourOrigin agtypes.PacketOrigin, ourPort string, ...) (storetypes.KVStore, []byte)
- func (k Keeper) PacketStoreFromOrigin(ctx sdk.Context, ourOrigin agtypes.PacketOrigin, packet ibcexported.PacketI) (storetypes.KVStore, []byte)
- func (k Keeper) Receive(cctx context.Context, jsonRequest string) (jsonReply string, err error)
- func (k Keeper) SetDebugging(doStore bool, overridePacket PacketDataOverrider)
- func (k Keeper) SetWatchedAddresses(ctx sdk.Context, addresses []sdk.AccAddress)
- type KeeperDebugOptions
- type PacketDataOverrider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewICS4Wrapper ¶
func NewICS4Wrapper(k Keeper, down porttypes.ICS4Wrapper) *ics4Wrapper
NewICS4Wrapper creates a new ICS4Wrapper instance
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, storeService corestore.KVStoreService, 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 ibcexported.PacketI, 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 ibcexported.PacketI, 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 ibcexported.PacketI, 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) (ibcexported.Acknowledgement, ibcexported.PacketI)
InterceptWriteAcknowledgement checks to see if the packet's receiver is a targeted account, and if so, delegates to the VM.
func (Keeper) PacketStore ¶
func (k Keeper) PacketStore(ctx sdk.Context, ourOrigin agtypes.PacketOrigin, ourPort string, ourChannel string, sequence uint64) (storetypes.KVStore, []byte)
PacketStore returns a new KVStore for storing packet data, and a key for that store. The KVStore is divided into src or dst PacketOrigins because we need to record separate data for packets travelling in each direction.
func (Keeper) PacketStoreFromOrigin ¶
func (k Keeper) PacketStoreFromOrigin(ctx sdk.Context, ourOrigin agtypes.PacketOrigin, packet ibcexported.PacketI) (storetypes.KVStore, []byte)
func (Keeper) SetDebugging ¶
func (k Keeper) SetDebugging(doStore bool, overridePacket PacketDataOverrider)
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.
type KeeperDebugOptions ¶
type KeeperDebugOptions struct {
OverridePacket PacketDataOverrider
DoNotStore bool
}