class PermGetAccountsAllowlist implements JsonRpcMethod {

  @Override
  public JsonRpcResponse response(final JsonRpcRequestContext requestContext) {
    if (allowlistController.isPresent()) {
      return new JsonRpcSuccessResponse(
          requestContext.getRequest().getId(), allowlistController.get().getAccountAllowlist());
    } else {
      return new JsonRpcErrorResponse(
          requestContext.getRequest().getId(), JsonRpcError.ACCOUNT_ALLOWLIST_NOT_ENABLED);
    }
  }

  public  PermGetAccountsAllowlist(
      final Optional<AccountLocalConfigPermissioningController> allowlistController);

}