diff --git a/app/app.go b/app/app.go
index 5d62f67e1e..c81550fd22 100644
--- a/app/app.go
+++ b/app/app.go
@@ -185,7 +185,7 @@ var (
 		distr.AppModuleBasic{},
 		gov.NewAppModuleBasic(
 			append(
-				wasmclient.ProposalHandlers,
+				wasmclient.ProposalHandlers, //nolint:staticcheck
 				paramsclient.ProposalHandler,
 				distrclient.ProposalHandler,
 				upgradeclient.ProposalHandler,
diff --git a/x/wasm/alias.go b/x/wasm/alias.go
index a64de37bdd..e47a657c97 100644
--- a/x/wasm/alias.go
+++ b/x/wasm/alias.go
@@ -59,7 +59,6 @@ var (
 	EncodeStakingMsg          = keeper.EncodeStakingMsg
 	EncodeWasmMsg             = keeper.EncodeWasmMsg
 	NewKeeper                 = keeper.NewKeeper
-	NewLegacyQuerier          = keeper.NewLegacyQuerier
 	DefaultQueryPlugins       = keeper.DefaultQueryPlugins
 	BankQuerier               = keeper.BankQuerier
 	NoCustomQuerier           = keeper.NoCustomQuerier
diff --git a/x/wasm/client/proposal_handler.go b/x/wasm/client/proposal_handler.go
index 6d4735180e..9d90d48df8 100644
--- a/x/wasm/client/proposal_handler.go
+++ b/x/wasm/client/proposal_handler.go
@@ -4,10 +4,11 @@ import (
 	govclient "github.com/cosmos/cosmos-sdk/x/gov/client"
 
 	"github.com/CosmWasm/wasmd/x/wasm/client/cli"
-	"github.com/CosmWasm/wasmd/x/wasm/client/rest"
+	"github.com/CosmWasm/wasmd/x/wasm/client/rest" //nolint:staticcheck
 )
 
 // ProposalHandlers define the wasm cli proposal types and rest handler.
+// Deprecated: the rest package will be removed. You can use the GRPC gateway instead
 var ProposalHandlers = []govclient.ProposalHandler{
 	govclient.NewProposalHandler(cli.ProposalStoreCodeCmd, rest.StoreCodeProposalHandler),
 	govclient.NewProposalHandler(cli.ProposalInstantiateContractCmd, rest.InstantiateProposalHandler),
diff --git a/x/wasm/client/rest/rest.go b/x/wasm/client/rest/rest.go
index 2e697a6b50..95339d3aa0 100644
--- a/x/wasm/client/rest/rest.go
+++ b/x/wasm/client/rest/rest.go
@@ -1,3 +1,4 @@
+// Deprecated: the rest package will be removed. You can use the GRPC gateway instead
 package rest
 
 import (
@@ -6,6 +7,7 @@ import (
 )
 
 // RegisterRoutes registers staking-related REST handlers to a router
+// Deprecated: the rest package will be removed. You can use the GRPC gateway instead
 func RegisterRoutes(cliCtx client.Context, r *mux.Router) {
 	registerQueryRoutes(cliCtx, r)
 	registerTxRoutes(cliCtx, r)
diff --git a/x/wasm/keeper/legacy_querier.go b/x/wasm/keeper/legacy_querier.go
index a4dd3055aa..8ff72e1f81 100644
--- a/x/wasm/keeper/legacy_querier.go
+++ b/x/wasm/keeper/legacy_querier.go
@@ -28,6 +28,7 @@ const (
 )
 
 // NewLegacyQuerier creates a new querier
+// Deprecated: the rest support will be removed. You can use the GRPC gateway instead
 func NewLegacyQuerier(keeper types.ViewKeeper, gasLimit sdk.Gas) sdk.Querier {
 	return func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) {
 		var (
diff --git a/x/wasm/keeper/recurse_test.go b/x/wasm/keeper/recurse_test.go
index 5a16da7878..0c0831aa49 100644
--- a/x/wasm/keeper/recurse_test.go
+++ b/x/wasm/keeper/recurse_test.go
@@ -4,6 +4,8 @@ import (
 	"encoding/json"
 	"testing"
 
+	sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
+
 	"github.com/CosmWasm/wasmd/x/wasm/types"
 
 	wasmvmtypes "github.com/CosmWasm/wasmvm/types"
@@ -11,7 +13,6 @@ import (
 	"github.com/stretchr/testify/require"
 
 	sdk "github.com/cosmos/cosmos-sdk/types"
-	abci "github.com/tendermint/tendermint/abci/types"
 )
 
 type Recurse struct {
@@ -146,7 +147,7 @@ func TestGasOnExternalQuery(t *testing.T) {
 	cases := map[string]struct {
 		gasLimit    uint64
 		msg         Recurse
-		expectPanic bool
+		expOutOfGas bool
 	}{
 		"no recursion, plenty gas": {
 			gasLimit: 400_000,
@@ -167,7 +168,7 @@ func TestGasOnExternalQuery(t *testing.T) {
 			msg: Recurse{
 				Work: 50,
 			},
-			expectPanic: true,
+			expOutOfGas: true,
 		},
 		"recursion 4, external gas limit": {
 			// this uses 244708 gas but give less
@@ -176,7 +177,7 @@ func TestGasOnExternalQuery(t *testing.T) {
 				Depth: 4,
 				Work:  50,
 			},
-			expectPanic: true,
+			expOutOfGas: true,
 		},
 	}
 
@@ -188,20 +189,14 @@ func TestGasOnExternalQuery(t *testing.T) {
 			recurse.Contract = contractAddr
 			msg := buildRecurseQuery(t, recurse)
 
-			// do the query
-			path := []string{QueryGetContractState, contractAddr.String(), QueryMethodContractStateSmart}
-			req := abci.RequestQuery{Data: msg}
-			if tc.expectPanic {
-				require.Panics(t, func() {
-					// this should run out of gas
-					_, err := NewLegacyQuerier(keeper, tc.gasLimit)(ctx, path, req)
-					t.Logf("%v", err)
-				})
-			} else {
-				// otherwise, make sure we get a good success
-				_, err := NewLegacyQuerier(keeper, tc.gasLimit)(ctx, path, req)
-				require.NoError(t, err)
+			querier := NewGrpcQuerier(keeper.cdc, keeper.storeKey, keeper, tc.gasLimit)
+			req := &types.QuerySmartContractStateRequest{Address: contractAddr.String(), QueryData: msg}
+			_, gotErr := querier.SmartContractState(sdk.WrapSDKContext(ctx), req)
+			if tc.expOutOfGas {
+				require.Error(t, gotErr, sdkerrors.ErrOutOfGas)
+				return
 			}
+			require.NoError(t, gotErr)
 		})
 	}
 }
diff --git a/x/wasm/module.go b/x/wasm/module.go
index 8473d7f34e..ea79b23768 100644
--- a/x/wasm/module.go
+++ b/x/wasm/module.go
@@ -24,7 +24,7 @@ import (
 	abci "github.com/tendermint/tendermint/abci/types"
 
 	"github.com/CosmWasm/wasmd/x/wasm/client/cli"
-	"github.com/CosmWasm/wasmd/x/wasm/client/rest"
+	"github.com/CosmWasm/wasmd/x/wasm/client/rest" //nolint:staticcheck
 	"github.com/CosmWasm/wasmd/x/wasm/keeper"
 	"github.com/CosmWasm/wasmd/x/wasm/simulation"
 	"github.com/CosmWasm/wasmd/x/wasm/types"
diff --git a/x/wasm/simulation/proposals.go b/x/wasm/simulation/proposals.go
index 8e73f04f64..1ee9584811 100644
--- a/x/wasm/simulation/proposals.go
+++ b/x/wasm/simulation/proposals.go
@@ -3,12 +3,13 @@ package simulation
 import (
 	"math/rand"
 
-	"github.com/CosmWasm/wasmd/app/params"
-	"github.com/CosmWasm/wasmd/x/wasm/keeper/testdata"
-	"github.com/CosmWasm/wasmd/x/wasm/types"
 	sdk "github.com/cosmos/cosmos-sdk/types"
 	simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
 	"github.com/cosmos/cosmos-sdk/x/simulation"
+
+	"github.com/CosmWasm/wasmd/app/params"
+	"github.com/CosmWasm/wasmd/x/wasm/keeper/testdata"
+	"github.com/CosmWasm/wasmd/x/wasm/types"
 )
 
 const (