class Router {

  @GetMapping(value = "contract/{tx}/{function}")
  public QueryResult query(
      @PathVariable("tx") final String contractTransactionHash,
      @PathVariable("function") final String functionName,
      @RequestParam(value = "arguments", required = false) final String[] arguments
  ) {
    logger.trace("Transaction Hash: {}, Function: {}, Arguments: {}",
        contractTransactionHash, functionName, arguments);
    final String[] safeArguments = nvl(arguments, new String[0]);
    return contractService.tryQuery(contractTransactionHash, functionName, safeArguments);
  }

}