Skip to content

Commit 57fcdb9

Browse files
08-wasm: pin ibc-go v8.0 (#5392)
* pin ibc-go v8.0 * go mod tidy * fix error * add mock key path and height * mock fixes
1 parent cffbd67 commit 57fcdb9

File tree

5 files changed

+37
-10
lines changed

5 files changed

+37
-10
lines changed

modules/light-clients/08-wasm/go.mod

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ module github.com/cosmos/ibc-go/modules/light-clients/08-wasm
22

33
go 1.21
44

5-
replace github.com/cosmos/ibc-go/v8 => ../../../
6-
75
replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
86

97
require (

modules/light-clients/08-wasm/go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,8 @@ github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so=
368368
github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc=
369369
github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE=
370370
github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco=
371+
github.com/cosmos/ibc-go/v8 v8.0.0 h1:QKipnr/NGwc+9L7NZipURvmSIu+nw9jOIWTJuDBqOhg=
372+
github.com/cosmos/ibc-go/v8 v8.0.0/go.mod h1:C6IiJom0F3cIQCD5fKwVPDrDK9j/xTu563AWuOmXois=
371373
github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM=
372374
github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0=
373375
github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM=
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package mock
2+
3+
import (
4+
"github.com/cosmos/ibc-go/v8/modules/core/exported"
5+
)
6+
7+
var _ exported.Path = KeyPath{}
8+
9+
// KeyPath defines a placeholder struct which implements the exported.Path interface
10+
type KeyPath struct{}
11+
12+
// String implements the exported.Path interface
13+
func (KeyPath) String() string {
14+
return ""
15+
}
16+
17+
// Empty implements the exported.Path interface
18+
func (KeyPath) Empty() bool {
19+
return false
20+
}
21+
22+
var _ exported.Height = Height{}
23+
24+
// Height defines a placeholder struct which implements the exported.Height interface
25+
type Height struct {
26+
exported.Height
27+
}

modules/light-clients/08-wasm/testing/simapp/app.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -641,8 +641,8 @@ func NewSimApp(
641641
ibcfee.NewAppModule(app.IBCFeeKeeper),
642642
ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper),
643643
wasm.NewAppModule(app.WasmClientKeeper),
644-
ibctm.AppModuleBasic{},
645-
solomachine.AppModuleBasic{},
644+
ibctm.NewAppModule(),
645+
solomachine.NewAppModule(),
646646
mockModule,
647647
)
648648

modules/light-clients/08-wasm/types/client_state_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111

1212
"github.com/cosmos/ibc-go/modules/light-clients/08-wasm/internal/ibcwasm"
1313
wasmtesting "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/testing"
14+
mock "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/testing/mock"
1415
"github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
1516
clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types"
1617
commitmenttypes "github.com/cosmos/ibc-go/v8/modules/core/23-commitment/types"
@@ -19,7 +20,6 @@ import (
1920
"github.com/cosmos/ibc-go/v8/modules/core/exported"
2021
solomachine "github.com/cosmos/ibc-go/v8/modules/light-clients/06-solomachine"
2122
ibctesting "github.com/cosmos/ibc-go/v8/testing"
22-
ibcmock "github.com/cosmos/ibc-go/v8/testing/mock"
2323
)
2424

2525
func (suite *TypesTestSuite) TestStatus() {
@@ -137,7 +137,7 @@ func (suite *TypesTestSuite) TestGetTimestampAtHeight() {
137137
{
138138
"error: invalid height",
139139
func() {
140-
height = ibcmock.Height{}
140+
height = mock.Height{}
141141
},
142142
ibcerrors.ErrInvalidType,
143143
},
@@ -438,14 +438,14 @@ func (suite *TypesTestSuite) TestVerifyMembership() {
438438
{
439439
"invalid path argument",
440440
func() {
441-
path = ibcmock.KeyPath{}
441+
path = mock.KeyPath{}
442442
},
443443
ibcerrors.ErrInvalidType,
444444
},
445445
{
446446
"proof height is invalid type",
447447
func() {
448-
proofHeight = ibcmock.Height{}
448+
proofHeight = mock.Height{}
449449
},
450450
ibcerrors.ErrInvalidType,
451451
},
@@ -579,14 +579,14 @@ func (suite *TypesTestSuite) TestVerifyNonMembership() {
579579
{
580580
"invalid path argument",
581581
func() {
582-
path = ibcmock.KeyPath{}
582+
path = mock.KeyPath{}
583583
},
584584
ibcerrors.ErrInvalidType,
585585
},
586586
{
587587
"proof height is invalid type",
588588
func() {
589-
proofHeight = ibcmock.Height{}
589+
proofHeight = mock.Height{}
590590
},
591591
ibcerrors.ErrInvalidType,
592592
},

0 commit comments

Comments
 (0)