Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testnets #98

Merged
merged 2 commits into from
Oct 21, 2024
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
18 changes: 15 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
module.exports = {
extends: ["next/core-web-vitals"],
extends: [
'next',
'next/core-web-vitals',
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
plugins: ['react', '@typescript-eslint'],
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
},
rules: {
"react/no-unescaped-entities": 0,
"react/display-name": "off",
'react/no-unescaped-entities': 0,
'react/display-name': 'off',
},
};
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
version: 2
enable-beta-ecosystems: true
updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "weekly"
interval: 'weekly'
open-pull-requests-limit: 10
labels:
- dependencies
67 changes: 33 additions & 34 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "CodeQL Advanced"
name: 'CodeQL Advanced'

on:
merge_group:
merge_group:
branches:
- master
- dev
Expand Down Expand Up @@ -37,43 +37,42 @@ jobs:
- javascript

steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@2cb752a87e96af96708ab57187ab6372ee1973ab # v2.22.0
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
- name: Checkout repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@2cb752a87e96af96708ab57187ab6372ee1973ab # v2.22.0
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@2cb752a87e96af96708ab57187ab6372ee1973ab # v2.22.0
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@2cb752a87e96af96708ab57187ab6372ee1973ab # v2.22.0

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@2cb752a87e96af96708ab57187ab6372ee1973ab # v2.22.0
with:
category: "/language:${{matrix.language}}"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@2cb752a87e96af96708ab57187ab6372ee1973ab # v2.22.0
with:
category: '/language:${{matrix.language}}'
15 changes: 0 additions & 15 deletions .prettierrc

This file was deleted.

8 changes: 8 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
semi: true,
trailingComma: 'all',
singleQuote: true,
printWidth: 100,
tabWidth: 2,
plugins: ['prettier-plugin-tailwindcss'],
};
10 changes: 5 additions & 5 deletions codegen.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
overwrite: true
#schema: "https://api.studio.thegraph.com/query/64099/proof-of-humanity-sepolia/version/latest"
schema: "https://api.studio.thegraph.com/query/64099/proof-of-humanity-mainnet/version/latest"
documents: "schemas/**/*.gql"
schema: 'https://api.studio.thegraph.com/query/64099/proof-of-humanity-mainnet/version/latest'
documents: 'schemas/**/*.gql'
generates:
./src/generated/graphql.ts:
plugins:
- "typescript"
- "typescript-operations"
- "typescript-graphql-request"
- 'typescript'
- 'typescript-operations'
- 'typescript-graphql-request'
2 changes: 1 addition & 1 deletion env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ declare global {
}
}

export {};
export {};
10 changes: 5 additions & 5 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const nextConfig = {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ["@svgr/webpack"],
use: ['@svgr/webpack'],
});

return config;
Expand All @@ -16,15 +16,15 @@ const nextConfig = {
CHIADO_RPC: process.env.CHIADO_RPC,
SEPOLIA_RPC: process.env.SEPOLIA_RPC,
GNOSIS_RPC: process.env.GNOSIS_RPC,
MAINNET_RPC: process.env.MAINNET_RPC
MAINNET_RPC: process.env.MAINNET_RPC,
},
images: {
remotePatterns: [
{
protocol: "https",
protocol: 'https',
hostname: process.env.REACT_APP_IPFS_GATEWAY,
port: "",
pathname: "/ipfs/**",
port: '',
pathname: '/ipfs/**',
},
],
},
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@
"@types/ua-parser-js": "^0.7.36",
"assert": "^2.0.0",
"browserify-zlib": "^0.2.0",
"eslint": "^7.32.0",
"eslint": "^9.13.0",
"eslint-config-next": "14.0.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.1",
"events": "^3.3.0",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"postcss": "^8.4.13",
"postcss-nested": "^6.0.0",
"prettier-plugin-tailwindcss": "^0.6.8",
"process": "^0.11.10",
"stream-browserify": "^3.0.0",
"tailwindcss": "^3.4.10",
Expand All @@ -33,7 +37,6 @@
},
"dependencies": {
"@cyntler/react-doc-viewer": "^1.16.3",
"react-markdown": "^8.0.7",
"@ffmpeg/ffmpeg": "^0.10.1",
"@legendapp/state": "^1.11.1",
"@web3modal/ethereum": "^2.7.1",
Expand All @@ -52,12 +55,13 @@
"next": "14.0.1",
"pino-pretty": "^11.0.0",
"postcss-import": "^14.1.0",
"prettier": "^2.0.0",
"prettier": "^3.3.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.2",
"react-easy-crop": "^4.4.0",
"react-jazzicon": "^1.0.4",
"react-markdown": "^8.0.7",
"react-select": "^5.7.7",
"react-toastify": "^9.0.7",
"react-webcam": "^7.0.1",
Expand Down
20 changes: 10 additions & 10 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"background_color": "#fff",
"display": "standalone",
"homepage_url": "https://poh.vercel.app",
"name": "Proof of Humanity",
"description": "Proof of Humanity",
"iconPath": "./poh-logo-colored.svg",
"short_name": "PoH",
"start_url": ".",
"theme_color": "#FF9966"
}
"background_color": "#fff",
"display": "standalone",
"homepage_url": "https://poh.vercel.app",
"name": "Proof of Humanity",
"description": "Proof of Humanity",
"iconPath": "./poh-logo-colored.svg",
"short_name": "PoH",
"start_url": ".",
"theme_color": "#FF9966"
}
2 changes: 1 addition & 1 deletion schemas/request.gql
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ query Request($id: ID!) {
extraData
}
}
}
}
8 changes: 1 addition & 7 deletions schemas/requests.gql
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
query Requests($skip: Int, $first: Int, $where: Request_filter) {
requests(
first: $first
skip: $skip
where: $where
orderBy: creationTime
orderDirection: desc
) {
requests(first: $first, skip: $skip, where: $where, orderBy: creationTime, orderDirection: desc) {
id
index
status {
Expand Down
2 changes: 1 addition & 1 deletion schemas/valid.vouch.gql
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ query HumanityVouch($id: ID!) {
expirationTime
}
}
}
}
16 changes: 4 additions & 12 deletions schemas/winner.fragment.gql
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
fragment winnerClaim on Humanity {
winnerClaim: requests(
where: {
where: {
or: [
{
revocation: false,
status: "resolved",
winnerParty: "requester"
},
{
revocation: false,
status: "transferring",
winnerParty: "requester"
}
{ revocation: false, status: "resolved", winnerParty: "requester" }
{ revocation: false, status: "transferring", winnerParty: "requester" }
]
}
orderBy: resolutionTime
Expand All @@ -26,4 +18,4 @@ fragment winnerClaim on Humanity {
}
}
}
}
}
14 changes: 5 additions & 9 deletions src/app/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import Image from "next/image";
import ExternalLink from "components/ExternalLink";
import Image from 'next/image';
import ExternalLink from 'components/ExternalLink';

const Footer: React.FC = () => (
<div className="bottom-0 w-full flex flex-wrap justify-center sm:justify-between items-center gap-y-[20px] gap-x-[240px] text-white text-lg header-background shadow-sm px-8 py-4">
<ExternalLink
className="flex items-center gap-2 text-sm"
href="https://kleros.io/"
>
BUILT BY{" "}
<Image alt="kleros" src="/logo/kleros.svg" width={96} height={24} />
<div className="header-background bottom-0 flex w-full flex-wrap items-center justify-center gap-x-[240px] gap-y-[20px] px-8 py-4 text-lg text-white shadow-sm sm:justify-between">
<ExternalLink className="flex items-center gap-2 text-sm" href="https://kleros.io/">
BUILT BY <Image alt="kleros" src="/logo/kleros.svg" width={96} height={24} />
</ExternalLink>

<div className="flex items-center gap-4">
Expand Down
Loading
Loading