Documentation
¶
Index ¶
- type IBCMiddleware
- func (im IBCMiddleware) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool)
- func (im *IBCMiddleware) GetICS4Wrapper() porttypes.ICS4Wrapper
- func (im IBCMiddleware) OnAcknowledgementPacket(ctx sdk.Context, channelVersion string, packet channeltypes.Packet, ...) error
- func (im IBCMiddleware) OnChanCloseConfirm(ctx sdk.Context, portID, channelID string) error
- func (im IBCMiddleware) OnChanCloseInit(ctx sdk.Context, portID, channelID string) error
- func (im IBCMiddleware) OnChanOpenAck(ctx sdk.Context, ...) error
- func (im IBCMiddleware) OnChanOpenConfirm(ctx sdk.Context, portID, channelID string) error
- func (im IBCMiddleware) OnChanOpenInit(ctx sdk.Context, channelOrdering channeltypes.Order, connectionHops []string, ...) (string, error)
- func (im IBCMiddleware) OnChanOpenTry(ctx sdk.Context, channelOrdering channeltypes.Order, connectionHops []string, ...) (string, error)
- func (im IBCMiddleware) OnRecvPacket(ctx sdk.Context, channelVersion string, packet channeltypes.Packet, ...) ibcexported.Acknowledgement
- func (im IBCMiddleware) OnTimeoutPacket(ctx sdk.Context, channelVersion string, packet channeltypes.Packet, ...) error
- func (im IBCMiddleware) SendPacket(ctx sdk.Context, sourcePort string, sourceChannel string, ...) (uint64, error)
- func (im IBCMiddleware) UnmarshalPacketData(ctx sdk.Context, portID string, channelID string, bz []byte) (interface{}, string, error)
- func (im *IBCMiddleware) WithICS4Wrapper(wrapper porttypes.ICS4Wrapper)
- func (im IBCMiddleware) WriteAcknowledgement(ctx sdk.Context, packet ibcexported.PacketI, ack ibcexported.Acknowledgement) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IBCMiddleware ¶
type IBCMiddleware struct {
// contains filtered or unexported fields
}
IBCMiddleware implements the ICS26 callbacks for the ibc-callbacks middleware given the underlying application.
func NewIBCMiddleware ¶
func NewIBCMiddleware( app porttypes.IBCModule, ics4Wrapper porttypes.ICS4Wrapper, contractKeeper types.ContractKeeper, maxCallbackGas uint64, ) IBCMiddleware
NewIBCMiddleware creates a new IBCMiddleware given the keeper and underlying application. The underlying application must implement the required callback interfaces.
func (IBCMiddleware) GetAppVersion ¶
GetAppVersion implements the ICS4Wrapper interface. Callbacks has no version, so the call is deferred to the underlying application.
func (*IBCMiddleware) GetICS4Wrapper ¶
func (im *IBCMiddleware) GetICS4Wrapper() porttypes.ICS4Wrapper
GetICS4Wrapper returns the ICS4Wrapper.
func (IBCMiddleware) OnAcknowledgementPacket ¶
func (im IBCMiddleware) OnAcknowledgementPacket( ctx sdk.Context, channelVersion string, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, ) error
OnAcknowledgementPacket implements source callbacks for acknowledgement packets. It defers to the underlying application and then calls the contract callback. If the contract callback runs out of gas and may be retried with a higher gas limit then the state changes are reverted via a panic.
func (IBCMiddleware) OnChanCloseConfirm ¶
func (im IBCMiddleware) OnChanCloseConfirm(ctx sdk.Context, portID, channelID string) error
OnChanCloseConfirm defers to the underlying application
func (IBCMiddleware) OnChanCloseInit ¶
func (im IBCMiddleware) OnChanCloseInit(ctx sdk.Context, portID, channelID string) error
OnChanCloseInit defers to the underlying application
func (IBCMiddleware) OnChanOpenAck ¶
func (im IBCMiddleware) OnChanOpenAck( ctx sdk.Context, portID, channelID, counterpartyChannelID, counterpartyVersion string, ) error
OnChanOpenAck defers to the underlying application
func (IBCMiddleware) OnChanOpenConfirm ¶
func (im IBCMiddleware) OnChanOpenConfirm(ctx sdk.Context, portID, channelID string) error
OnChanOpenConfirm defers to the underlying application
func (IBCMiddleware) OnChanOpenInit ¶
func (im IBCMiddleware) OnChanOpenInit( ctx sdk.Context, channelOrdering channeltypes.Order, connectionHops []string, portID, channelID string, counterparty channeltypes.Counterparty, version string, ) (string, error)
OnChanOpenInit defers to the underlying application
func (IBCMiddleware) OnChanOpenTry ¶
func (im IBCMiddleware) OnChanOpenTry( ctx sdk.Context, channelOrdering channeltypes.Order, connectionHops []string, portID, channelID string, counterparty channeltypes.Counterparty, counterpartyVersion string, ) (string, error)
OnChanOpenTry defers to the underlying application
func (IBCMiddleware) OnRecvPacket ¶
func (im IBCMiddleware) OnRecvPacket(ctx sdk.Context, channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress) ibcexported.Acknowledgement
OnRecvPacket implements the ReceivePacket destination callbacks for the ibc-callbacks middleware during synchronous packet acknowledgement. It defers to the underlying application and then calls the contract callback. If the contract callback runs out of gas and may be retried with a higher gas limit then the state changes are reverted via a panic.
func (IBCMiddleware) OnTimeoutPacket ¶
func (im IBCMiddleware) OnTimeoutPacket(ctx sdk.Context, channelVersion string, packet channeltypes.Packet, relayer sdk.AccAddress) error
OnTimeoutPacket implements timeout source callbacks for the ibc-callbacks middleware. It defers to the underlying application and then calls the contract callback. If the contract callback runs out of gas and may be retried with a higher gas limit then the state changes are reverted via a panic.
func (IBCMiddleware) SendPacket ¶
func (im IBCMiddleware) SendPacket( ctx sdk.Context, sourcePort string, sourceChannel string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, data []byte, ) (uint64, error)
SendPacket implements source callbacks for sending packets. It defers to the underlying application and then calls the contract callback. If the contract callback returns an error, panics, or runs out of gas, then the packet send is rejected.
func (IBCMiddleware) UnmarshalPacketData ¶
func (im IBCMiddleware) UnmarshalPacketData(ctx sdk.Context, portID string, channelID string, bz []byte) (interface{}, string, error)
UnmarshalPacketData defers to the underlying app to unmarshal the packet data. This function implements the optional PacketDataUnmarshaler interface.
func (*IBCMiddleware) WithICS4Wrapper ¶
func (im *IBCMiddleware) WithICS4Wrapper(wrapper porttypes.ICS4Wrapper)
WithICS4Wrapper sets the ICS4Wrapper. This function may be used after the middleware's creation to set the middleware which is above this module in the IBC application stack.
func (IBCMiddleware) WriteAcknowledgement ¶
func (im IBCMiddleware) WriteAcknowledgement( ctx sdk.Context, packet ibcexported.PacketI, ack ibcexported.Acknowledgement, ) error
WriteAcknowledgement implements the ReceivePacket destination callbacks for the ibc-callbacks middleware during asynchronous packet acknowledgement. It defers to the underlying application and then calls the contract callback. If the contract callback runs out of gas and may be retried with a higher gas limit then the state changes are reverted via a panic.