diff --git a/modules/light-clients/08-wasm/keeper/contract_keeper_test.go b/modules/light-clients/08-wasm/keeper/contract_keeper_test.go index f258db7d570..b7b59bbcdec 100644 --- a/modules/light-clients/08-wasm/keeper/contract_keeper_test.go +++ b/modules/light-clients/08-wasm/keeper/contract_keeper_test.go @@ -167,7 +167,7 @@ func (suite *KeeperTestSuite) TestWasmInstantiate() { tc := tc suite.Run(tc.name, func() { suite.SetupWasmWithMockVM() - checksum := storeWasmCode(suite, wasmtesting.Code) + checksum := suite.storeWasmCode(wasmtesting.Code) tc.malleate() @@ -309,7 +309,7 @@ func (suite *KeeperTestSuite) TestWasmMigrate() { tc := tc suite.Run(tc.name, func() { suite.SetupWasmWithMockVM() - _ = storeWasmCode(suite, wasmtesting.Code) + _ = suite.storeWasmCode(wasmtesting.Code) endpoint := wasmtesting.NewWasmEndpoint(suite.chainA) err := endpoint.CreateClient() @@ -380,7 +380,7 @@ func (suite *KeeperTestSuite) TestWasmQuery() { tc := tc suite.Run(tc.name, func() { suite.SetupWasmWithMockVM() - _ = storeWasmCode(suite, wasmtesting.Code) + _ = suite.storeWasmCode(wasmtesting.Code) endpoint := wasmtesting.NewWasmEndpoint(suite.chainA) err := endpoint.CreateClient() @@ -551,7 +551,7 @@ func (suite *KeeperTestSuite) TestWasmSudo() { tc := tc suite.Run(tc.name, func() { suite.SetupWasmWithMockVM() - _ = storeWasmCode(suite, wasmtesting.Code) + _ = suite.storeWasmCode(wasmtesting.Code) endpoint := wasmtesting.NewWasmEndpoint(suite.chainA) err := endpoint.CreateClient() diff --git a/modules/light-clients/08-wasm/keeper/keeper_test.go b/modules/light-clients/08-wasm/keeper/keeper_test.go index 6f7b54550ee..67234f94032 100644 --- a/modules/light-clients/08-wasm/keeper/keeper_test.go +++ b/modules/light-clients/08-wasm/keeper/keeper_test.go @@ -121,7 +121,7 @@ func (suite *KeeperTestSuite) setupWasmWithMockVM() (ibctesting.TestingApp, map[ } // storeWasmCode stores the wasm code on chain and returns the checksum. -func storeWasmCode(suite *KeeperTestSuite, wasmCode []byte) []byte { +func (suite *KeeperTestSuite) storeWasmCode(wasmCode []byte) []byte { ctx := suite.chainA.GetContext().WithBlockGasMeter(storetypes.NewInfiniteGasMeter()) msg := types.NewMsgStoreCode(authtypes.NewModuleAddress(govtypes.ModuleName).String(), wasmCode) @@ -403,7 +403,7 @@ func (suite *KeeperTestSuite) TestMigrateContract() { tc := tc suite.Run(tc.name, func() { suite.SetupWasmWithMockVM() - storeWasmCode(suite, wasmtesting.Code) + suite.storeWasmCode(wasmtesting.Code) var err error oldHash, err = types.CreateChecksum(wasmtesting.Code) @@ -460,7 +460,7 @@ func (suite *KeeperTestSuite) TestGetChecksums() { "success: default mock vm contract stored.", func() { suite.SetupWasmWithMockVM() - storeWasmCode(suite, wasmtesting.Code) + suite.storeWasmCode(wasmtesting.Code) }, func(checksums []types.Checksum) { suite.Require().Len(checksums, 1) @@ -473,7 +473,7 @@ func (suite *KeeperTestSuite) TestGetChecksums() { "success: non-empty checksums", func() { suite.SetupWasmWithMockVM() - storeWasmCode(suite, wasmtesting.Code) + suite.storeWasmCode(wasmtesting.Code) err := GetSimApp(suite.chainA).WasmClientKeeper.GetChecksums().Set(suite.chainA.GetContext(), types.Checksum("checksum")) suite.Require().NoError(err) @@ -499,7 +499,7 @@ func (suite *KeeperTestSuite) TestGetChecksums() { func (suite *KeeperTestSuite) TestAddChecksum() { suite.SetupWasmWithMockVM() - storeWasmCode(suite, wasmtesting.Code) + suite.storeWasmCode(wasmtesting.Code) wasmClientKeeper := GetSimApp(suite.chainA).WasmClientKeeper diff --git a/modules/light-clients/08-wasm/keeper/msg_server_test.go b/modules/light-clients/08-wasm/keeper/msg_server_test.go index 568294fa38d..72a113680fc 100644 --- a/modules/light-clients/08-wasm/keeper/msg_server_test.go +++ b/modules/light-clients/08-wasm/keeper/msg_server_test.go @@ -268,8 +268,8 @@ func (suite *KeeperTestSuite) TestMsgMigrateContract() { var ok bool suite.SetupWasmWithMockVM() - storeWasmCode(suite, wasmtesting.Code) - newChecksum = storeWasmCode(suite, newByteCode) + _ = suite.storeWasmCode(wasmtesting.Code) + newChecksum = suite.storeWasmCode(newByteCode) endpoint := wasmtesting.NewWasmEndpoint(suite.chainA) err := endpoint.CreateClient() @@ -399,7 +399,7 @@ func (suite *KeeperTestSuite) TestMsgRemoveChecksum() { suite.Run(tc.name, func() { suite.SetupWasmWithMockVM() - storeWasmCode(suite, wasmtesting.Code) + _ = suite.storeWasmCode(wasmtesting.Code) endpoint := wasmtesting.NewWasmEndpoint(suite.chainA) err := endpoint.CreateClient() diff --git a/modules/light-clients/08-wasm/keeper/querier_test.go b/modules/light-clients/08-wasm/keeper/querier_test.go index b27c5adcc55..5fb1cf52173 100644 --- a/modules/light-clients/08-wasm/keeper/querier_test.go +++ b/modules/light-clients/08-wasm/keeper/querier_test.go @@ -103,7 +103,7 @@ func (suite *KeeperTestSuite) TestCustomQuery() { for _, tc := range testCases { suite.Run(tc.name, func() { suite.SetupWasmWithMockVM() - _ = storeWasmCode(suite, wasmtesting.Code) + _ = suite.storeWasmCode(wasmtesting.Code) endpoint := wasmtesting.NewWasmEndpoint(suite.chainA) err := endpoint.CreateClient() @@ -305,7 +305,7 @@ func (suite *KeeperTestSuite) TestStargateQuery() { suite.Run(tc.name, func() { expDiscardedState = false suite.SetupWasmWithMockVM() - checksum = storeWasmCode(suite, wasmtesting.Code) + checksum = suite.storeWasmCode(wasmtesting.Code) endpoint = wasmtesting.NewWasmEndpoint(suite.chainA) err := endpoint.CreateClient()