diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 22ddae5c..26fdf1ff 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -154,13 +154,6 @@ func (k Keeper) Storage(c context.Context, req *types.QueryStorageRequest) (*typ ) } - if ethermint.IsEmptyHash(req.Key) { - return nil, status.Errorf( - codes.InvalidArgument, - types.ErrEmptyHash.Error(), - ) - } - ctx := sdk.UnwrapSDKContext(c) k.WithContext(ctx) @@ -170,12 +163,6 @@ func (k Keeper) Storage(c context.Context, req *types.QueryStorageRequest) (*typ state := k.GetState(address, key) stateHex := state.Hex() - if ethermint.IsEmptyHash(stateHex) { - return nil, status.Error( - codes.NotFound, "contract code not found for given address", - ) - } - return &types.QueryStorageResponse{ Value: stateHex, }, nil diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index 5e9d73eb..59ed3705 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -271,15 +271,6 @@ func (suite *KeeperTestSuite) TestQueryStorage() { }, false, }, - {"empty hash", - func() { - req = &types.QueryStorageRequest{ - Address: suite.address.String(), - Key: ethcmn.Hash{}.String(), - } - }, - false, - }, { "success", func() {