class ElrondNodeController {

    @RequestMapping(path = "/node/shardofaddress", method = RequestMethod.GET)
    public @ResponseBody
    ResponseObject shardOfAddress(
            HttpServletResponse response,
            @RequestParam() String address) {

        logger.traceEntry("params: {}", address);

        try {

            ShardingService shardingService = AppServiceProvider.getShardingService();
            byte[] publicKeyBytes = Util.hexStringToByteArray(address);
            return logger.traceExit(new ResponseObject(true, "", shardingService.getShard(publicKeyBytes).getIndex()));
        } catch (Exception ex){
            logger.throwing(ex);
            return logger.traceExit(new ResponseObject(false, ex.getMessage(), null));
        }
    }

}