Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
evm: fix get storage (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
fedekunze authored Jul 27, 2021
1 parent 8491ae3 commit bc2a2eb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
13 changes: 0 additions & 13 deletions x/evm/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down
9 changes: 0 additions & 9 deletions x/evm/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit bc2a2eb

Please sign in to comment.