Documentation
¶
Index ¶
- Constants
- Variables
- func NewErrorMockPayload(sourcePort, destPort string) channeltypesv2.Payload
- func NewMockPayload(sourcePort, destPort string) channeltypesv2.Payload
- type IBCApp
- type IBCModule
- func (im IBCModule) OnAcknowledgementPacket(ctx sdk.Context, sourceChannel string, destinationChannel string, ...) error
- func (im IBCModule) OnRecvPacket(ctx sdk.Context, sourceChannel string, destinationChannel string, ...) channeltypesv2.RecvPacketResult
- func (im IBCModule) OnSendPacket(ctx sdk.Context, sourceChannel string, destinationChannel string, ...) error
- func (im IBCModule) OnTimeoutPacket(ctx sdk.Context, sourceChannel string, destinationChannel string, ...) error
- func (IBCModule) UnmarshalPacketData(payload channeltypesv2.Payload) (interface{}, error)
Constants ¶
View Source
const ( // ModuleNameA is a name that can be used for the first mock application. ModuleNameA = ModuleName + "A" // ModuleNameB is a name that can be used for the second mock application. ModuleNameB = ModuleName + "B" // PortIDA is a port ID that can be used for the first mock application. PortIDA = ModuleNameA // PortIDB is a port ID that can be used for the second mock application. PortIDB = ModuleNameB )
View Source
const (
ModuleName = "mockv2"
)
Variables ¶
View Source
var MockRecvPacketResult = channeltypesv2.RecvPacketResult{ Status: channeltypesv2.PacketStatus_Success, Acknowledgement: mockv1.MockAcknowledgement.Acknowledgement(), }
Functions ¶
func NewErrorMockPayload ¶
func NewErrorMockPayload(sourcePort, destPort string) channeltypesv2.Payload
func NewMockPayload ¶
func NewMockPayload(sourcePort, destPort string) channeltypesv2.Payload
Types ¶
type IBCApp ¶
type IBCApp struct { OnSendPacket func(ctx sdk.Context, sourceChannel string, destinationChannel string, sequence uint64, payload channeltypesv2.Payload, signer sdk.AccAddress) error OnRecvPacket func(ctx sdk.Context, sourceChannel string, destinationChannel string, sequence uint64, payload channeltypesv2.Payload, relayer sdk.AccAddress) channeltypesv2.RecvPacketResult OnTimeoutPacket func(ctx sdk.Context, sourceChannel string, destinationChannel string, sequence uint64, payload channeltypesv2.Payload, relayer sdk.AccAddress) error OnAcknowledgementPacket func(ctx sdk.Context, sourceChannel string, destinationChannel string, sequence uint64, payload channeltypesv2.Payload, acknowledgement []byte, relayer sdk.AccAddress) error }
type IBCModule ¶
type IBCModule struct {
IBCApp *IBCApp
}
IBCModule is a mock implementation of the IBCModule interface. which delegates calls to the underlying IBCApp.
func NewIBCModule ¶
func NewIBCModule() IBCModule
NewIBCModule creates a new IBCModule with an underlying mock IBC application.
func (IBCModule) OnAcknowledgementPacket ¶
func (IBCModule) OnRecvPacket ¶
func (im IBCModule) OnRecvPacket(ctx sdk.Context, sourceChannel string, destinationChannel string, sequence uint64, payload channeltypesv2.Payload, relayer sdk.AccAddress) channeltypesv2.RecvPacketResult
func (IBCModule) OnSendPacket ¶
func (IBCModule) OnTimeoutPacket ¶
func (IBCModule) UnmarshalPacketData ¶
func (IBCModule) UnmarshalPacketData(payload channeltypesv2.Payload) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.