Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ scripts
**/node_modules
**/build
**/dist
**/tsconfig.tsbuildinfo

# Core package artifacts
# Hardhat files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install dependencies
run: yarn install --immutable
- name: Build core package
run: yarn build:core
run: yarn workspace @human-protocol/core build
- name: Change core version
uses: jossef/action-set-json-field@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd-deploy-contracts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Install dependencies
run: yarn --immutable
- name: Build core package
run: yarn build:core
run: yarn workspace @human-protocol/core build
- name: Networks list
id: networks
run: |
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/cd-logger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Logger NPM publish

permissions:
contents: read

on:
workflow_dispatch:

jobs:
logger-publish:
name: Logger NPM Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: yarn
- name: Install dependencies
run: yarn install --immutable
- name: Build logger package
run: yarn workspace @human-protocol/logger build
- name: Publish package
run: yarn workspace @human-protocol/logger npm publish --access public
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/cd-node-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install dependencies
run: yarn install --immutable
- name: Build core package
run: yarn build:core
run: yarn workspace @human-protocol/core build
- name: Change Node.js SDK version from release tag
uses: jossef/action-set-json-field@v2
if: ${{ github.event_name != 'workflow_dispatch' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd-python-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install dependencies
run: yarn install
- name: Build core package
run: yarn build:core
run: yarn workspace @human-protocol/core build
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cd-subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- name: ethereum
- name: polygon
- name: sepolia
- name: aurora-testnet
fail-fast: true
max-parallel: 3
steps:
Expand Down Expand Up @@ -51,7 +52,7 @@ jobs:
run: yarn install --immutable
- name: Build core package
if: steps.filter_networks.outputs.continue == 'true'
run: yarn build:core
run: yarn workspace @human-protocol/core build
- name: Generate and build Subgraph
if: steps.filter_networks.outputs.continue == 'true'
run: yarn generate && yarn build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-node-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
- name: Install dependencies
run: yarn install --immutable
- name: Build core package
run: yarn build:core
run: yarn workspace @human-protocol/core build
- name: Run Node.js SDK test
run: yarn workspace @human-protocol/sdk test
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-python-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install core package dependencies
run: yarn install --immutable
- name: Build core package
run: yarn build:core
run: yarn workspace @human-protocol/core build
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install dependencies
run: yarn install --immutable
- name: Build core package
run: yarn build:core
run: yarn workspace @human-protocol/core build
- name: Generate manifest for Polygon for tests
run: NETWORK=polygon yarn workspace @human-protocol/subgraph generate
- name: Run subgraph test
Expand Down
1 change: 1 addition & 0 deletions docker-setup/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
infra-up infra-stop \
build-services services-up services-stop

export COMPOSE_BAKE=false
DOCKER_PARALLEL ?= 4

check-env-file:
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
"scripts": {
"clean": "yarn workspaces foreach --all -p run clean",
"lint": "yarn workspaces foreach --all -p run lint",
"build:core": "yarn workspace @human-protocol/core build",
"build:sdk": "yarn workspace @human-protocol/sdk build",
"build:libs": "yarn build:core && yarn build:sdk",
"build:libs": "yarn workspaces foreach -Rpt --from '{@human-protocol/sdk,packages/libs/*}' run build",
"docker:infra-up": "make -C ./docker-setup -f Makefile.dev infra-up",
"docker:infra-stop": "make -C ./docker-setup -f Makefile.dev infra-stop",
"docker:infra-down": "make -C ./docker-setup -f Makefile.dev infra-down",
Expand Down
1 change: 1 addition & 0 deletions packages/apps/dashboard/client/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export default tseslint.config(
],
'import/no-duplicates': 'error',
'import/no-unresolved': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }],
'@typescript-eslint/no-explicit-any': 'error',
'no-console': ['error', { allow: ['warn', 'error'] }],
Expand Down
9 changes: 4 additions & 5 deletions packages/apps/dashboard/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
<html lang="en">
<head>
<meta charset="UTF-8" />

<meta name="description" content="HUMAN Dashboard App" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="icon"
href="data:image/png;base64,AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAABMLAAATCwAAAAAAAAAAAAD/AE4A/wAjA/9Ji0n/ibS4/7HO8P+91f//vdX//73V//+91f//vdX//73V//+91f//vdX//73V//+91f//vdX//73V//+91f//vdX//73V//+91f//vdX//73V//+91f//vdX//73V//+91f//ss/w/422tf9MjEn/ACcD/wBOAP8AAAL/Xplj/8HX6P/1+f//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9vn//8PY6P9fmWP/AAAC/0mLSf/C2Of//v///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////v///8DX5/9Iikr/jLa0//X5/////////////////////////////////////////v///+71///u9f/////////////////////////////////////////////1+f//6fH///v9////////////////////////////////////////9Pj//4i0t/+yzu///////////////////////////////////v7//9Hi//+Esf//PYT//0iL///c6P//////////////////////////////////9fn//26j//8wfP//bqP//7zU///3+v//////////////////////////////////sM3v/73V///////////////////////////////////Z5///Mn3//wZh//8GYf//CGP//6vK///////////////////////////////////e6v//InP//wVg//8GYf//Fmv//6rJ//////////////////////////////////+91f//vdX//////////////////////////////////8Ta//8Wa///CGL//wlj//8IY///ocP//////////////////////////////////9bl//8fcf//CGL//wlj//8HYf//irX//////////////////////////////////73V//+91f//////////////////////////////////0uL//x1w//8IYv//CWP//whi//+Zv///////////////////////////////////z+H//xxv//8IYv//CWP//whj//+cwP//////////////////////////////////vdX//73V///////////////////////////////////f6v//JHT//wdi//8JY///CGL//5K6///////////////////////////////////K3f//GW3//whi//8JY///C2T//6zK//////////////////////////////////+91f//vdX//////////////////////////////////+jw//8wfP//B2L//wlj//8HYv//irX//////////////////////////////////8PZ//8Wa///CGL//whj//8RaP//udP//////////////////////////////////73V//+91f//////////////////////////////////7vX//z2E//8GYf//CWP//wdh//+CsP//////////////////////////////////vtb//xNq//8IY///CGL//xht///I3P//////////////////////////////////vdX//73V///////////////////////////////////2+f//TI7//wVh//8JY///BmH//3qr//////////////////////////////////+30f//EGf//wlj//8IYv//H3H//9bl//////////////////////////////////+91f//vdX///////////////////////////////////z9//9Zlv//BWD//wlj//8GYf//c6b//////////////////////////////////7DN//8NZv//CWP//wdi//8ndv//4u3//////////////////////////////////73V//+91f///////////////////////////////////////2qg//8FYf//CWP//wVh//9knf///f7/////////////////////////////pMX//wpk//8JY///BmH//zR+///q8v//////////////////////////////////vdX//73V////////////////////////////////////////eqv//wZh//8JY///B2L//yR0//+lxv//6/P/////////////9fn//8PZ//9Hi///B2L//wlj//8GYf//QYf///D2//////////////////////////////////+91f//vdX///////////////////////////////////////+dwP//CmT//whj//8JY///CGL//xBn//87g///irX//53B//9Skv//GG3//whi//8JY///CWP//wRg//9emf//+vz//////////////////////////////////73V//+91f///////////////////////////////////////+70//96q///EWj//whj//8JY///CWP//wZh//8JY///CmT//wZh//8IYv//CWP//wlj//8JY///UpL//9Pj////////////////////////////////////////vdX//73V/////////////////////////////////////////////+30//8+hf//BmH//wlj//8JY///CWP//wlj//8IY///CWP//wlj//8JY///CGL//xlt///I3P////////////////////////////////////////////+91f//vdX/////////////////////////////////////////////zd///yl3//8HYv//CWP//wlj//8GYf//C2T//w5m//8GYf//CGP//wlj//8IY///EGf//6DC///+/v///////////////////////////////////////73V//+91f///////////////////////////////////////+ry//9Fif//B2L//wlj//8IY///DWb//z6F//+Xvf//q8r//1ST//8Vav//CGL//wlj//8IYv//IHH//8PZ////////////////////////////////////////vdX//73V////////////////////////////////////////2uj//yBy//8HYv//CGP//xJp//+Mtv//6/L/////////////9Pj//7TP//8reP//B2L//wlj//8IYv//pMX///////////////////////////////////////+91f//vdX////////////////////////////////////////k7v//KXj//wdi//8HYv//MHz//+bw/////////////////////////v///2Oc//8FYP//CWP//w5m//+zz////////////////////////////////////////73V//+91f///////////////////////////////////////+vz//83gf//BmH//wdi//8ve///5/D/////////////////////////////Y5z//wVg//8IYv//FWv//8LY////////////////////////////////////////vdX//73V////////////////////////////////////////8vf//0WJ//8GYf//B2L//yh3///k7v////////////////////////3+//9cmP//BWD//whi//8cb///z+H///////////////////////////////////////+91f//vdX////////////////////////////////////////5+///U5L//wVg//8HYv//JHT//+Dr////////////////////////+vz//1aU//8FYP//B2L//yNz///d6v///////////////////////////////////////73V//+91f////////////////////////////////////////7///9hm///BWD//wdi//8hcv//2ef////////////////////////3+v//T4///wVh//8HYv//LHn//+bv////////////////////////////////////////vdX//73V/////////////////////////////////////////////4Ow//8GYf//BGD//x1v///V5P////////////////////////X5//9KjP//A1///wNf//9Hi///8vf///////////////////////////////////////+91f//sM3v////////////////////////////////////////////5O7//4Sx//8/hf//WJb//+70/////////////////////////v7//4Wy//81f///b6T//8nd/////////////////////////////////////////////7LO7/+ItLf/9Pj//////////////////////////////////////////////v////D1///w9v//////////////////////////////////9vn//+zz///9/v/////////////////////////////////////////////1+f//jba0/0iKSv/A1+f//v///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////v///8LY5/9Ji0n/AAAC/1+ZY//D2Oj/9vn///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////X5///B2Oj/Xplj/wAAAv8ATgD/ACYD/0yMSP+NtrX/s8/w/73V//+91f//vdX//73V//+91f//vdX//73V//+91f//vdX//73V//+91f//vdX//73V//+91f//vdX//73V//+91f//vdX//73V//+91f//vdX//73V//+xzvD/ibS3/0qLSf8AIwP/AE4AgAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAE="
/>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
rel="stylesheet"
/>
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Roboto:wght@400;500&display=swap" as="style">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Roboto:wght@400;500&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>HUMAN Dashboard</title>
</head>
Expand Down
12 changes: 6 additions & 6 deletions packages/apps/dashboard/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@human-protocol/sdk": "workspace:*",
"@mui/icons-material": "^7.0.1",
"@mui/material": "^5.15.18",
"@mui/styled-engine-sc": "6.4.0",
"@mui/system": "^5.15.14",
"@mui/x-data-grid": "^8.5.2",
"@mui/x-date-pickers": "^7.23.6",
"@mui/icons-material": "^7.2.0",
"@mui/material": "^7.2.0",
"@mui/styled-engine-sc": "7.2.0",
"@mui/system": "^7.2.0",
"@mui/x-data-grid": "^8.7.0",
"@mui/x-date-pickers": "^8.7.0",
"@tanstack/react-query": "^5.67.2",
"@types/react-router-dom": "^5.3.3",
"@types/recharts": "^1.8.29",
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/dashboard/client/src/app/AppRoutes.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FC } from 'react';
import type { FC } from 'react';

import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';

Expand Down
16 changes: 10 additions & 6 deletions packages/apps/dashboard/client/src/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import { StrictMode } from 'react';

import { LocalizationProvider } from '@mui/x-date-pickers';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import ReactDOM from 'react-dom/client';

Expand All @@ -17,10 +19,12 @@ const queryClient = new QueryClient({

ReactDOM.createRoot(document.getElementById('root')!).render(
<ThemeProvider>
<React.StrictMode>
<QueryClientProvider client={queryClient}>
<AppRoutes />
</QueryClientProvider>
</React.StrictMode>
<StrictMode>
<LocalizationProvider dateAdapter={AdapterDayjs}>
<QueryClientProvider client={queryClient}>
<AppRoutes />
</QueryClientProvider>
</LocalizationProvider>
</StrictMode>
</ThemeProvider>
);
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import {
FC,
PropsWithChildren,
type FC,
type PropsWithChildren,
useCallback,
useEffect,
useMemo,
useState,
} from 'react';

import {
CssBaseline,
PaletteMode,
ThemeProvider as MuiThemeProvider,
} from '@mui/material';
import type { PaletteMode } from '@mui/material';
import CssBaseline from '@mui/material/CssBaseline';
import { ThemeProvider as MuiThemeProvider } from '@mui/material/styles';

import { createAppTheme } from '@/shared/ui/theme';

Expand Down
4 changes: 0 additions & 4 deletions packages/apps/dashboard/client/src/app/styles/_home-page.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.home-page-search {
margin-top: 24px;
}

.home-page-leaderboard {
margin-top: 60px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@
.container {
margin: auto;
padding: 30px 80px 100px;
min-height: calc(100vh - 82px);

@media (max-width: 1200px) {
padding: 24px 16px;
}

@media (max-width: 900px) {
min-height: calc(100vh - 62px);
}
}

@media (max-width: 600px) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import validateResponse from '@/shared/lib/validateResponse';

import {
hcaptchaDailyStatsSchema,
HcaptchaDailyStats,
type HcaptchaDailyStats,
} from '../model/hcaptchaDailyStatsSchema';
import {
hmtDailyStatsSchema,
HMTDailyStats,
type HMTDailyStats,
} from '../model/hmtDailyStatsSchema';

export type ChartData = (HMTDailyStats & Omit<HcaptchaDailyStats, 'date'>)[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import dayjs, { Dayjs } from 'dayjs';
import dayjs, { type Dayjs } from 'dayjs';
import { create } from 'zustand';

const MINIMAL_DATE_FOR_DATE_PICKER = '2021-04-06';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { FC, useEffect, useRef, useState } from 'react';
import { type FC, useEffect, useRef, useState } from 'react';

import { Typography, useTheme } from '@mui/material';
import Card from '@mui/material/Card';
import Stack from '@mui/material/Stack';
import dayjs, { Dayjs } from 'dayjs';
import { useTheme } from '@mui/material/styles';
import Typography from '@mui/material/Typography';
import dayjs, { type Dayjs } from 'dayjs';
import {
CartesianGrid,
Tooltip,
Expand All @@ -16,7 +17,7 @@ import {

import DatePicker from '@/shared/ui/DatePicker';

import useChartData, { ChartData } from '../api/useChartData';
import useChartData, { type ChartData } from '../api/useChartData';
import formatNumber from '../lib/formatNumber';
import useChartParamsStore, {
initialAllTime,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import { FC } from 'react';
import type { FC } from 'react';

import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord';
import { Grid, Typography } from '@mui/material';
import Box from '@mui/material/Box';
import Card from '@mui/material/Card';
import Grid from '@mui/material/Grid';
import Stack from '@mui/material/Stack';
import { TooltipProps } from 'recharts';
import Typography from '@mui/material/Typography';
import type { TooltipProps } from 'recharts';

import FormattedNumber from '@/shared/ui/FormattedNumber';

import formatDate from '../lib/formatDate';

import { ChartDataConfigObject } from './AreaChart';
import type { ChartDataConfigObject } from './AreaChart';

const renderTitle = (title: string) => {
const currentTitle: ChartDataConfigObject<string> = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useTheme } from '@mui/material';
import { useTheme } from '@mui/material/styles';
// @ts-expect-error -- import error, but this type work property
import { ContentRenderer } from 'recharts';
import type { ContentRenderer } from 'recharts';

import formatDate from '../lib/formatDate';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FC, useEffect } from 'react';
import { type FC, useEffect } from 'react';

import { Navigation } from 'swiper/modules';
import { Swiper, SwiperSlide } from 'swiper/react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { FC, Fragment } from 'react';
import { type FC, Fragment } from 'react';

import { useTheme } from '@mui/material';
import Box from '@mui/material/Box';
import Card from '@mui/material/Card';
import Stack from '@mui/material/Stack';
import { useTheme } from '@mui/material/styles';
import Typography from '@mui/material/Typography';
import {
AreaChart,
Area,
XAxis,
YAxis,
AreaChart,
CartesianGrid,
Tooltip,
ResponsiveContainer,
TooltipProps,
Tooltip,
type TooltipProps,
XAxis,
YAxis,
} from 'recharts';

import { useIsMobile } from '@/shared/hooks/useBreakpoints';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { styled } from '@mui/material';
import Button from '@mui/material/Button';
import { styled } from '@mui/material/styles';
import ToggleButton from '@mui/material/ToggleButton';
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
import dayjs from 'dayjs';

import useChartParamsStore, {
TIME_PERIOD_OPTIONS,
TimePeriod,
type TimePeriod,
} from '../store/useChartParamsStore';

export const StyledToggleButtonGroup = styled(ToggleButtonGroup)(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { FC } from 'react';
import type { FC } from 'react';

import { FormControlLabel, FormGroup, Typography } from '@mui/material';
import Checkbox from '@mui/material/Checkbox';
import FormControlLabel from '@mui/material/FormControlLabel';
import FormGroup from '@mui/material/FormGroup';
import Stack from '@mui/material/Stack';
import Typography from '@mui/material/Typography';

import FormattedNumber from '@/shared/ui/FormattedNumber';

Expand Down
Loading
Loading