forked from cosmos/ibc-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
isc4_middleware_mock.go
43 lines (36 loc) · 992 Bytes
/
isc4_middleware_mock.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package mocks
import (
sdk "github.com/cosmos/cosmos-sdk/types"
capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types"
ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types"
"github.com/cosmos/ibc-go/v7/modules/core/exported"
)
var _ porttypes.ICS4Wrapper = &ICS4WrapperMock{}
type ICS4WrapperMock struct{}
func (m *ICS4WrapperMock) SendPacket(
ctx sdk.Context,
chanCap *capabilitytypes.Capability,
sourcePort string,
sourceChannel string,
timeoutHeight ibcclienttypes.Height,
timeoutTimestamp uint64,
data []byte,
) (sequence uint64, err error) {
return 1, nil
}
func (m *ICS4WrapperMock) WriteAcknowledgement(
ctx sdk.Context,
chanCap *capabilitytypes.Capability,
packet exported.PacketI,
ack exported.Acknowledgement,
) error {
return nil
}
func (m *ICS4WrapperMock) GetAppVersion(
ctx sdk.Context,
portID,
channelID string,
) (string, bool) {
return "", false
}