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

Release v2-testnet-4.0.5 #1829

Merged
merged 49 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
f1535de
feat(web): lang-direction
Harman-singh-waraich Dec 19, 2024
0619ac8
Merge branch 'dev' into feat/lang-direction
alcercu Dec 19, 2024
9df6816
fix(web): min-stake-check
Harman-singh-waraich Dec 21, 2024
49be36e
feat(subgraph): add-fields-for-transaction-hash-and-timestamp
Harman-singh-waraich Dec 23, 2024
1fa3e7d
Merge pull request #1815 from kleros/fix/min-stake-check
alcercu Dec 23, 2024
35f2581
feat(web): dispute-txn-hashes-and-timestamps
Harman-singh-waraich Dec 23, 2024
d3642da
refactor(web): style-feedback
Harman-singh-waraich Dec 23, 2024
213bc80
refactor(web): date-placement
Harman-singh-waraich Dec 23, 2024
5d12cd0
fix: bug in firefox in votinghistory tab
kemuru Dec 23, 2024
ff5438d
Merge branch 'dev' into feat/dispute-dates-and-hashes-link
alcercu Dec 23, 2024
2f055e2
Merge branch 'dev' into feat/lang-direction
Harman-singh-waraich Dec 23, 2024
9daf106
Merge pull request #1808 from kleros/feat/lang-direction
alcercu Dec 23, 2024
b01f6f0
Merge branch 'dev' into feat/dispute-dates-and-hashes-link
Harman-singh-waraich Dec 24, 2024
3489f0e
refactor(web): voting-history-content-style
Harman-singh-waraich Dec 24, 2024
65e2ec1
refactor(web): remove-duplicate-imports
Harman-singh-waraich Dec 24, 2024
6e81890
feat(web): stake-popup-notification-info
Harman-singh-waraich Dec 27, 2024
abb897c
refactor(web): post-stake-notification-info
Harman-singh-waraich Dec 30, 2024
3a9825a
feat: public dashboards
kemuru Dec 31, 2024
1ede3d4
feat: add the search bar in courts page
kemuru Jan 6, 2025
dcfc337
chore: nitpick spaces in import
kemuru Jan 6, 2025
e7aab2a
Merge pull request #1816 from kleros/feat/dispute-dates-and-hashes-link
alcercu Jan 7, 2025
aac41a9
Merge branch 'dev' into feat/stake-popup-subscribe-notification
alcercu Jan 7, 2025
50bcfb9
Merge pull request #1818 from kleros/feat/stake-popup-subscribe-notif…
alcercu Jan 7, 2025
8b11b62
Merge branch 'dev' into feat(web)/public-dashboards
alcercu Jan 7, 2025
6d09c7d
Merge pull request #1819 from kleros/feat(web)/public-dashboards
alcercu Jan 7, 2025
3af51a2
Merge branch 'dev' into feat/search-bar-courts-page
alcercu Jan 7, 2025
0aedfbc
Merge branch 'dev' into feat/search-bar-courts-page
kemuru Jan 8, 2025
94b3a69
feat: better styling for dropdown, better wrapping for verdict answer…
kemuru Jan 8, 2025
605b082
refactor(web): add overlayscrollbar to courts search
alcercu Jan 8, 2025
763ce33
Merge pull request #1821 from kleros/feat/search-bar-courts-page
alcercu Jan 8, 2025
13273c5
chore(refactor): update-ui-lib
Harman-singh-waraich Jan 8, 2025
dae34a1
Merge pull request #1824 from kleros/chore/ui-lib-update
alcercu Jan 8, 2025
14e4dbb
feat(web): add-subgraph-status-banner
Harman-singh-waraich Jan 9, 2025
faa026b
refactor(web): courts-stat
Harman-singh-waraich Jan 9, 2025
721d029
refactor(web): rabbit-feedback
Harman-singh-waraich Jan 9, 2025
0c67dfa
Merge pull request #1825 from kleros/feat/subgraph-status-banner
jaybuidl Jan 9, 2025
743b960
Merge branch 'dev' into refactor/court-stats
alcercu Jan 9, 2025
f39ef4a
Merge pull request #1826 from kleros/refactor/court-stats
alcercu Jan 9, 2025
03f5c7a
fix(web): navbar-padding
Harman-singh-waraich Jan 9, 2025
e27997b
Merge pull request #1827 from kleros/fix/navbar-padding
alcercu Jan 10, 2025
9456601
chore: show skeleton when data is loading
kemuru Jan 13, 2025
6f21310
Merge pull request #1828 from kleros/chore/appeal-loading-skeleton
alcercu Jan 13, 2025
1d07f28
fix: align-wagmi-versions
Harman-singh-waraich Jan 14, 2025
dbcad12
fix: align-wagmi-versions-globally
Harman-singh-waraich Jan 14, 2025
eddabe0
chore: netlify command tweak
jaybuidl Jan 14, 2025
ef39507
fix: contracts testing workflow
jaybuidl Jan 13, 2025
e7faa21
chore: removal of the pr-labels workflow which never worked
jaybuidl Jan 14, 2025
1582b52
chore: revert netlify.toml
jaybuidl Jan 14, 2025
1de725b
Merge pull request #1833 from kleros/fix/kleros-app-resolution
jaybuidl Jan 14, 2025
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
23 changes: 16 additions & 7 deletions .github/workflows/contracts-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,23 @@ jobs:
registry.yarnpkg.com:443
registry.npmjs.org:443
54.185.253.63:443

- name: Setup Node.js environment
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 18.x

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive


- name: Set up corepack (for yarn)
run: |
corepack enable
corepack prepare [email protected] --activate
yarn set version 4.5.1

- name: Setup Node.js environment
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20.x
cache: yarn

- name: Cache node modules
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
env:
Expand All @@ -61,7 +68,9 @@ jobs:
${{ runner.os }}-build-${{ secrets.CACHE_VERSION }}-${{ env.cache-name }}-

- name: Install contracts dependencies
run: yarn workspace @kleros/kleros-v2-contracts install
run: |
# TODO: re-enable hardened mode once the kleros-app resolution is fixed
YARN_ENABLE_HARDENED_MODE=0 yarn workspace @kleros/kleros-v2-contracts install

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@8f1998e9878d786675189ef566a2e4bf24869773 # v1.2.0
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/pr-labels.yml

This file was deleted.

2 changes: 1 addition & 1 deletion kleros-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"viem": "^2.21.42",
"wagmi": "^2.13.0"
"wagmi": "^2.13.5"
}
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@
"local-stack": "scripts/tmux-local-stack.sh",
"changelog": "conventional-changelog --infile CHANGELOG.md --same-file --release-count 0 && prettier --write CHANGELOG.md",
"postinstall": "yarn check-prerequisites; husky install",
"reinstall": "YARN_CHECKSUM_BEHAVIOR=update yarn install --no-immutable"
"reinstall": "YARN_CHECKSUM_BEHAVIOR=update yarn install --no-immutable",
"build:web:ci": "yarn workspaces focus @kleros/kleros-v2-web && yarn workspaces foreach -Ap --include kleros-app --include contracts run build && yarn workspace @kleros/kleros-v2-web build-netlify",
"build:web-devtools:ci": "yarn workspaces focus @kleros/kleros-v2-web-devtools && yarn workspaces foreach -Ap --include contracts run build && yarn workspace @kleros/kleros-v2-web-devtools build-netlify"
},
"alias": {
"process": "process/browser.js",
Expand Down
20 changes: 10 additions & 10 deletions subgraph/core-neo/subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ dataSources:
name: KlerosCore
network: arbitrum-one
source:
address: "0xCd415C03dfa85B02646C7e2977F22a480c4354F1"
address: "0x991d2df165670b9cac3B022f4B68D65b664222ea"
abi: KlerosCore
startBlock: 190274596
startBlock: 272063254
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand Down Expand Up @@ -64,9 +64,9 @@ dataSources:
name: PolicyRegistry
network: arbitrum-one
source:
address: "0x26c1980120F1C82cF611D666CE81D2b54d018547"
address: "0x553dcbF6aB3aE06a1064b5200Df1B5A9fB403d3c"
abi: PolicyRegistry
startBlock: 190274403
startBlock: 272063037
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand All @@ -84,9 +84,9 @@ dataSources:
name: DisputeKitClassic
network: arbitrum-one
source:
address: "0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9"
address: "0x70B464be85A547144C72485eBa2577E5D3A45421"
abi: DisputeKitClassic
startBlock: 190274518
startBlock: 272063168
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand Down Expand Up @@ -119,9 +119,9 @@ dataSources:
name: EvidenceModule
network: arbitrum-one
source:
address: "0xe62B776498F48061ef9425fCEf30F3d1370DB005"
address: "0x48e052B4A6dC4F30e90930F1CeaAFd83b3981EB3"
abi: EvidenceModule
startBlock: 190274441
startBlock: 272063086
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand All @@ -140,9 +140,9 @@ dataSources:
name: SortitionModule
network: arbitrum-one
source:
address: "0x614498118850184c62f82d08261109334bFB050f"
address: "0x21A9402aDb818744B296e1d1BE58C804118DC03D"
abi: SortitionModule
startBlock: 190274557
startBlock: 272063201
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand Down
5 changes: 5 additions & 0 deletions subgraph/core/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ type Dispute @entity {
disputeID: BigInt!
court: Court!
createdAt: BigInt
transactionHash: String!
arbitrated: Arbitrable!
period: Period!
ruled: Boolean!
Expand All @@ -180,6 +181,8 @@ type Dispute @entity {
arbitrableChainId:BigInt
externalDisputeId:BigInt
templateId:BigInt
rulingTimestamp:BigInt
rulingTransactionHash:String
}

type PeriodIndexCounter @entity {
Expand Down Expand Up @@ -303,6 +306,8 @@ type ClassicJustification @entity {
choice: BigInt!
votes: [ClassicVote!]! @derivedFrom(field: "justification")
reference: String!
transactionHash: String!
timestamp: BigInt!
}

type ClassicEvidenceGroup implements EvidenceGroup @entity {
Expand Down
2 changes: 2 additions & 0 deletions subgraph/core/src/DisputeKitClassic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export function handleVoteCast(event: VoteCast): void {
justification.localRound = currentLocalRoundID;
justification.choice = choice;
justification.reference = event.params._justification;
justification.transactionHash = event.transaction.hash.toHexString();
justification.timestamp = event.block.timestamp;
justification.save();
const currentRulingInfo = updateCountsAndGetCurrentRuling(
currentLocalRoundID,
Expand Down
2 changes: 2 additions & 0 deletions subgraph/core/src/KlerosCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ export function handleRuling(event: Ruling): void {
const dispute = Dispute.load(disputeID.toString());
if (!dispute) return;
dispute.ruled = true;
dispute.rulingTransactionHash = event.transaction.hash.toHexString();
dispute.rulingTimestamp = event.block.timestamp;
dispute.save();
const court = Court.load(dispute.court);
if (!court) return;
Expand Down
1 change: 1 addition & 0 deletions subgraph/core/src/entities/Dispute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function createDisputeFromEvent(event: DisputeCreation): void {
dispute.lastPeriodChange = event.block.timestamp;
dispute.lastPeriodChangeBlockNumber = event.block.number;
dispute.periodNotificationIndex = getAndIncrementPeriodCounter(dispute.period);
dispute.transactionHash = event.transaction.hash.toHexString();
const court = Court.load(courtID);
if (!court) return;
dispute.periodDeadline = event.block.timestamp.plus(court.timesPerPeriod[0]);
Expand Down
2 changes: 1 addition & 1 deletion subgraph/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kleros/kleros-v2-subgraph",
"version": "0.9.1",
"version": "0.10.1",
"license": "MIT",
"scripts": {
"update:core:arbitrum-sepolia-devnet": "./scripts/update.sh arbitrumSepoliaDevnet arbitrum-sepolia core/subgraph.yaml",
Expand Down
5 changes: 3 additions & 2 deletions web-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
},
"dependencies": {
"@kleros/kleros-sdk": "workspace:^",
"@kleros/ui-components-library": "^2.19.0",
"@kleros/kleros-v2-contracts": "workspace:^",
"@kleros/ui-components-library": "^2.20.0",
"@tanstack/react-query": "^5.61.0",
"@wagmi/connectors": "^5.5.0",
"@wagmi/core": "^2.15.0",
Expand All @@ -65,6 +66,6 @@
"typewriter-effect": "^2.21.0",
"vanilla-jsoneditor": "^0.21.6",
"viem": "^2.21.50",
"wagmi": "^2.13.0"
"wagmi": "^2.13.5"
}
}
5 changes: 3 additions & 2 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@
},
"dependencies": {
"@cyntler/react-doc-viewer": "^1.17.0",
"@kleros/kleros-app": "^2.0.2",
"@kleros/kleros-app": "workspace:^",
"@kleros/kleros-sdk": "workspace:^",
"@kleros/kleros-v2-contracts": "workspace:^",
"@kleros/ui-components-library": "^2.19.0",
"@kleros/ui-components-library": "^2.20.0",
"@lifi/wallet-management": "^3.4.6",
"@lifi/widget": "^3.12.3",
"@sentry/react": "^7.120.0",
Expand Down Expand Up @@ -117,6 +117,7 @@
"react-toastify": "^9.1.3",
"react-use": "^17.5.1",
"styled-components": "^5.3.3",
"subgraph-status": "^1.2.3",
"viem": "^2.21.54",
"wagmi": "^2.13.5"
}
Expand Down
7 changes: 4 additions & 3 deletions web/src/components/CasesDisplay/Filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled, { css, useTheme } from "styled-components";

import { hoverShortTransitionTiming } from "styles/commonStyles";

import { useNavigate, useParams } from "react-router-dom";
import { useNavigate, useParams, useSearchParams } from "react-router-dom";

import { DropdownSelect } from "@kleros/ui-components-library";

Expand Down Expand Up @@ -55,16 +55,17 @@ const Filters: React.FC = () => {
const { ruled, period, ...filterObject } = decodeURIFilter(filter ?? "all");
const navigate = useNavigate();
const location = useRootPath();
const [searchParams] = useSearchParams();

const handleStatusChange = (value: string | number) => {
const parsedValue = JSON.parse(value as string);
const encodedFilter = encodeURIFilter({ ...filterObject, ...parsedValue });
navigate(`${location}/1/${order}/${encodedFilter}`);
navigate(`${location}/1/${order}/${encodedFilter}?${searchParams.toString()}`);
};

const handleOrderChange = (value: string | number) => {
const encodedFilter = encodeURIFilter({ ruled, period, ...filterObject });
navigate(`${location}/1/${value}/${encodedFilter}`);
navigate(`${location}/1/${value}/${encodedFilter}?${searchParams.toString()}`);
};

const { isList, setIsList } = useIsList();
Expand Down
20 changes: 15 additions & 5 deletions web/src/components/CasesDisplay/Search.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React, { useMemo, useState } from "react";
import React, { useMemo, useRef, useState } from "react";
import styled, { css } from "styled-components";

import Skeleton from "react-loading-skeleton";
import { useNavigate, useParams } from "react-router-dom";
import { useNavigate, useParams, useSearchParams } from "react-router-dom";
import { useDebounce } from "react-use";

import { Searchbar, DropdownCascader } from "@kleros/ui-components-library";

import { isEmpty, isUndefined } from "utils/index";
Expand Down Expand Up @@ -39,6 +38,7 @@ const SearchBarContainer = styled.div`
const StyledSearchbar = styled(Searchbar)`
flex: 1;
flex-basis: 310px;
input {
font-size: 16px;
height: 45px;
Expand All @@ -53,16 +53,25 @@ const Search: React.FC = () => {
const decodedFilter = decodeURIFilter(filter ?? "all");
const { id: searchValue, ...filterObject } = decodedFilter;
const [search, setSearch] = useState(searchValue ?? "");
const initialRenderRef = useRef(true);
const navigate = useNavigate();
const [searchParams] = useSearchParams();

useDebounce(
() => {
if (initialRenderRef.current && isEmpty(search)) {
initialRenderRef.current = false;
return;
}
initialRenderRef.current = false;
const newFilters = isEmpty(search) ? { ...filterObject } : { ...filterObject, id: search };
const encodedFilter = encodeURIFilter(newFilters);
navigate(`${location}/${page}/${order}/${encodedFilter}`);
navigate(`${location}/${page}/${order}/${encodedFilter}?${searchParams.toString()}`);
},
500,
[search]
);

const { data: courtTreeData } = useCourtTree();
const items = useMemo(() => {
if (!isUndefined(courtTreeData)) {
Expand All @@ -82,14 +91,15 @@ const Search: React.FC = () => {
onSelect={(value) => {
const { court: _, ...filterWithoutCourt } = decodedFilter;
const newFilter = value === "all" ? filterWithoutCourt : { ...decodedFilter, court: value.toString() };
navigate(`${location}/${page}/${order}/${encodeURIFilter(newFilter)}`);
navigate(`${location}/${page}/${order}/${encodeURIFilter(newFilter)}?${searchParams.toString()}`);
}}
/>
) : (
<Skeleton width={240} height={42} />
)}
<SearchBarContainer>
<StyledSearchbar
dir="auto"
type="text"
placeholder="Search By ID"
value={search}
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/DisputePreview/Alias.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const AliasDisplay: React.FC<IAlias> = ({ name, address }) => {
const resolvedAddress = addressFromENS ?? (address as `0x${string}`);

return (
<AliasContainer>
<AliasContainer dir="auto">
{isLoading ? <Skeleton width={30} height={24} /> : <IdenticonOrAvatar address={resolvedAddress} size="24" />}
<TextContainer>
{isLoading ? <Skeleton width={30} height={24} /> : <AddressOrName address={resolvedAddress} />}&nbsp;
Expand Down
Loading
Loading