Skip to content
Merged

Release #2012

Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
2bffa61
chore: shutter script experiment
jaybuidl Mar 15, 2025
3570b46
feat(shutter): added decryption logic
jaybuidl Mar 19, 2025
ddae29a
fix: better error handling
jaybuidl Mar 19, 2025
04e3f5c
feat: naive shutterized dispute kit and auto-voting bot
jaybuidl Apr 24, 2025
be6e1ce
feat: commitment hashing and verification onchain
jaybuidl Apr 29, 2025
020dbab
chore: cleanup
jaybuidl Apr 29, 2025
30804a8
feat: support for multiple voteIDs at once, fixed salt handling by bot
jaybuidl Apr 30, 2025
1a9b72d
chore: cleanup before integration into a fully fletched dispute kit
jaybuidl Apr 30, 2025
b580556
feat: fully fletched DisputeKitShutter
jaybuidl Apr 30, 2025
8819241
chore: removed redundant node-fetch
jaybuidl Apr 30, 2025
cd016b3
chore: cleanup
jaybuidl Apr 30, 2025
8e46e05
feat: fully fletched DisputeKitShutter
jaybuidl Apr 30, 2025
98ec3ba
chore: deployment of DisputeKitShutter in devnet
jaybuidl Apr 30, 2025
74d1506
fix: missing parameter, upgraded DisputeKitShutter
jaybuidl Apr 30, 2025
b40abc2
chore: upgraded DisputeKitClassic
jaybuidl Apr 30, 2025
cb7997f
fix: external call to castCommit() changes msg.sender, fixed by extra…
jaybuidl May 1, 2025
ee2ceb6
chore: enable shutter DK on the devnet general court
jaybuidl May 2, 2025
317aed6
feat: support for shutter disputekit in devnet
kemuru May 6, 2025
05dcdb0
fix: create new classic dispute entity correctly with correct round i…
kemuru May 8, 2025
44ea55e
fix: correct round check
kemuru May 8, 2025
a995e1e
chore: subgraph update scripts now relies on a template and removes d…
jaybuidl May 8, 2025
ca14ada
Merge branch 'dev' into feat/shutter-dispute-kit
jaybuidl May 8, 2025
f3f235c
Merge branch 'feat/shutter-dispute-kit' into feat(subgraph)/support-f…
kemuru May 9, 2025
4b85135
Merge branch 'dev' into feat/shutter-dispute-kit
jaybuidl May 9, 2025
edc4a7d
Merge branch 'dev' into feat/shutter-dispute-kit
jaybuidl May 12, 2025
78b2951
chore: fix to support deployment to Alchemy
jaybuidl May 13, 2025
6b32fc3
chore: lock file
jaybuidl May 13, 2025
74625e1
Merge pull request #1966 from kleros/feat(subgraph)/support-for-multi…
jaybuidl May 14, 2025
0dad7c4
Merge branch 'dev' into feat/shutter-dispute-kit
kemuru May 15, 2025
5ac64f5
feat: shutter support in dispute commiting
kemuru May 15, 2025
6cd4369
Merge branch 'dev' into feat/shutter-dispute-kit
kemuru May 15, 2025
724a949
Merge branch 'feat/shutter-dispute-kit' into feat(web)/shutter-fronte…
kemuru May 15, 2025
8a5b2f4
feat: shutter appeal support
kemuru May 15, 2025
14994db
fix: bug fix in subgraph
kemuru May 15, 2025
142273c
Merge pull request #1995 from kleros/fix(subgraph)/localrounds-fix
kemuru May 15, 2025
6b240a6
Merge branch 'feat/shutter-dispute-kit' into feat(web)/shutter-fronte…
kemuru May 15, 2025
5989928
chore: subgraphs version bump
jaybuidl May 16, 2025
1ff55f8
docs: natspec for KlerosCore view functions
jaybuidl May 14, 2025
036e897
chore: style and button changes
kemuru May 19, 2025
f20c9d4
chore: remove unused code
kemuru May 19, 2025
54d83a7
fix: avoid unnecessary calls draw() when no juror is available, requi…
jaybuidl May 19, 2025
9e8aa9e
fix: reinitializer and version for KlerosCore
jaybuidl May 19, 2025
7a5466b
chore: retrigger deploy preview
kemuru May 20, 2025
1ca9066
Merge pull request #2001 from kleros/chore(web)/style-and-button-changes
alcercu May 20, 2025
df98319
Merge branch 'dev' into feat/shutter-dispute-kit
kemuru May 20, 2025
05711fe
Merge branch 'feat/shutter-dispute-kit' into feat(web)/shutter-fronte…
kemuru May 20, 2025
729777d
feat: postinstall script, use correct commit function
kemuru May 20, 2025
8bf3772
fix: vote hashing during commitment must follow DisputeKitShutter.has…
jaybuidl May 20, 2025
8c74d4a
feat: decryption delay is the remaining of the commit period
kemuru May 22, 2025
29ef9a1
Fix: Update isCurrentRound for previous round on appeal
google-labs-jules[bot] May 22, 2025
b1d3fa9
chore: shutter event tweak, extra dispute kit views
jaybuidl May 22, 2025
47049eb
Merge branch 'feat/shutter-dispute-kit' into feat(web)/shutter-fronte…
jaybuidl May 22, 2025
3925b6f
Fix: Update isCurrentRound for previous round on appeal
google-labs-jules[bot] May 23, 2025
bae8db4
chore: remove postinstall script, tell vite where to find it
kemuru May 23, 2025
aa01874
feat: keeper bot for shutter auto-reveal (wip)
jaybuidl May 26, 2025
e983fdd
Merge branch 'feat/shutter-dispute-kit' into feat(web)/shutter-fronte…
kemuru May 26, 2025
2e5d2a7
feat: support for revealing shutter commit from the frontend
kemuru May 26, 2025
ad47783
chore: timeline clarify remaining time
kemuru May 26, 2025
bf7a3c0
chore: remove console logs, few code smells
kemuru May 26, 2025
349783f
Merge pull request #2009 from kleros/chore/timeline-clarify-remaining…
alcercu May 26, 2025
f370669
fix(subgraph): handle-batched-disputes-request-events
tractorss May 26, 2025
3f532d2
Merge pull request #2010 from kleros/fix/subgraph-batch-dispute-handling
jaybuidl May 27, 2025
20ee602
fix: bug in color loading text in file viewer
kemuru May 27, 2025
282b91d
Merge pull request #2011 from kleros/fix(web)/color-text-loading-bug-…
alcercu May 28, 2025
411b384
Merge branch 'dev' into fix/update-iscurrentround
jaybuidl May 28, 2025
367549c
chore: subgraph version bump
jaybuidl May 28, 2025
30382a0
Merge pull request #2007 from kleros/fix/update-iscurrentround
jaybuidl May 28, 2025
bafbd14
Merge branch 'dev' into feat/shutter-dispute-kit
jaybuidl May 28, 2025
c8bf188
Merge branch 'feat/shutter-dispute-kit' into feat(web)/shutter-fronte…
kemuru May 28, 2025
e5cf1df
Merge pull request #2002 from kleros/fix/keeper-bot-useless-draws
jaybuidl May 28, 2025
e7a0759
fix: allow return in case evidence was opened in new tab
kemuru May 28, 2025
dde0dc7
fix: few more links handling
kemuru May 28, 2025
4e95c72
Merge pull request #2013 from kleros/fix/file-viewer-return-button-link
alcercu May 28, 2025
2b51d5e
chore: find-initializer-versions utility
jaybuidl May 28, 2025
e52d59b
Merge branch 'dev' into feat/shutter-dispute-kit
jaybuidl May 28, 2025
99f9852
feat: shutter auto-reveal logic integrated into the main bot, improve…
jaybuidl May 28, 2025
4adedb5
chore: find-initializer-versions utility
jaybuidl May 28, 2025
04605db
chore: extra 5 min decryptiondelay
kemuru May 29, 2025
b3817bd
fix: trycatch in case voting fails
kemuru May 29, 2025
f816ca3
Merge branch 'feat/shutter-dispute-kit' into feat(web)/shutter-fronte…
kemuru May 29, 2025
fe7eb85
Merge branch 'dev' into feat/shutter-dispute-kit
kemuru May 29, 2025
4e2dea9
Merge branch 'feat/shutter-dispute-kit' into feat(web)/shutter-fronte…
kemuru May 29, 2025
469039a
Merge pull request #1994 from kleros/feat(web)/shutter-frontend-rende…
alcercu May 29, 2025
7bbe6df
chore: upgrade-all support for Shutter DK
jaybuidl May 28, 2025
1fd3526
chore: shutter env variables
kemuru May 30, 2025
c3f6611
feat: keeper bot passes the period to Voting before auto-revealing
jaybuidl May 30, 2025
959b765
chore: keeper bot logging
jaybuidl May 30, 2025
d43e68e
Merge branch 'chore/shutter-env-variables' into feat/shutter-dispute-kit
jaybuidl May 30, 2025
dd9f9c3
fix(kleros-app): add-state-for-confirm-email
jaybuidl Jun 4, 2025
bfd18da
chore(kleros-app): release @kleros/[email protected]
jaybuidl Jun 4, 2025
47aaca4
feat: new overview design
kemuru Jun 10, 2025
78508f5
feat: add card labels to the overview
kemuru Jun 11, 2025
f5f2530
chore: tweak
kemuru Jun 11, 2025
929955c
fix: add where to the key
kemuru Jun 11, 2025
0b75799
Merge pull request #2022 from kleros/feat/new-overview-design
alcercu Jun 11, 2025
411560e
Merge branch 'dev' into fix/profile-page-not-loading
kemuru Jun 11, 2025
2925a4e
feat(kleros-sdk): predefined-lambdas-for-mustache
tractorss Jun 13, 2025
33a47a9
chore: address-rabbit-feedback
tractorss Jun 13, 2025
10294ce
feat: ens in evidence
kemuru Jun 17, 2025
7449259
fix: bug in profile loading fix, dispute stats fix too
kemuru Jun 18, 2025
a35ceb0
chore: commify juror rewards
kemuru Jun 19, 2025
b38c702
Merge pull request #2023 from kleros/fix/profile-page-not-loading
alcercu Jun 20, 2025
70b21f9
Merge branch 'dev' into feat/ens-in-evidence
alcercu Jun 20, 2025
2542150
Merge pull request #2027 from kleros/feat/ens-in-evidence
alcercu Jun 20, 2025
a3742fa
Merge branch 'hotfix-deployment-artifacts' into dev
jaybuidl Jun 23, 2025
2a1edb7
deprecated var
jaybuidl Jul 5, 2025
70e4b7c
update reality DisputeMappings.json
jaybuidl Jul 5, 2025
5ac93ef
fix(DisputeKit): check that dispute belongs to DK
unknownunknown1 Jul 9, 2025
85f01b6
fix: changed mapping to a boolean, reset dispute.jumped
jaybuidl Jul 15, 2025
e99f3e6
Merge pull request #2039 from kleros/fix/dk-vote-bug
jaybuidl Jul 15, 2025
a3b8470
fix(SortitionModule): fix staking logic and remove instant staking
unknownunknown1 May 20, 2025
585ef60
fix(KC): update the state after transfer
unknownunknown1 May 30, 2025
f30d327
chore: removed the handlers for the instant staking events
jaybuidl Jun 5, 2025
c193e48
fix: removed the unused _alreadyTransferred parameter
jaybuidl Jul 15, 2025
8c5b67d
refactor: renamed SM.setStake() into SM.validateStake(), SM.updateSta…
jaybuidl Jul 15, 2025
e8c529e
fix: natspec
jaybuidl Jul 15, 2025
6c31770
fix: university contracts aligned with the base ones
jaybuidl Jul 15, 2025
d50b8a4
fix: removal of the unused instant staking events
jaybuidl Jul 15, 2025
2e71da9
feat: emit event LeftoverPNK when PNK becomes available for withdrawa…
jaybuidl Jul 16, 2025
62fd505
fix: invisible disputekitm dropdown if no court selected
kemuru Jul 16, 2025
4449e04
Merge pull request #2040 from kleros/fix/invisible-disputekit-dropdow…
jaybuidl Jul 16, 2025
55e762c
chore: add-shutter-api-token
tractorss Jul 16, 2025
16af2f7
chore: remove-bearer-token
tractorss Jul 16, 2025
aadc2d4
fix(KC): staking test update
unknownunknown1 Jul 18, 2025
29ab108
docs: custom natspec cleanup
jaybuidl Jul 18, 2025
277992c
feat: dynamic popup text if shutter dispute kit
kemuru Jul 18, 2025
d9c7ec6
fix: subgraph abi migrations update
jaybuidl Jul 18, 2025
f999611
feat: support for Shutter API token at the bot level
jaybuidl Jul 18, 2025
01dca90
fix: rabbit review
jaybuidl Jul 18, 2025
02def13
Merge branch 'dev' into feat/shutter-dispute-kit
jaybuidl Jul 18, 2025
2174fc2
refactor: env var rename SHUTTER_API_TOKEN to SHUTTER_API_KEY
jaybuidl Jul 18, 2025
d6b7495
Merge branch 'dev' into fix/staking-fix
jaybuidl Jul 18, 2025
392e1c0
Merge pull request #2004 from kleros/fix/staking-fix
jaybuidl Jul 18, 2025
3e8a2f8
Merge pull request #2024 from kleros/feat/predefined-lambdas-for-must…
jaybuidl Jul 18, 2025
e4a2562
test: support shutter DK initialization
jaybuidl Jul 18, 2025
f1320fb
Merge branch 'dev' into feat/shutter-dispute-kit
jaybuidl Jul 18, 2025
321a9a5
test: revert message fix
jaybuidl Jul 18, 2025
f39e4ee
Merge pull request #1965 from kleros/feat/shutter-dispute-kit
jaybuidl Jul 18, 2025
2b11e6d
Merge pull request #2019 from kleros/fix/kleros-app-confirm-email-state
jaybuidl Jul 18, 2025
2116239
docs: custom natspec cleanup
jaybuidl Jul 19, 2025
9d19c70
feat: gated dispute kit with dynamic token gate, shutter gated dk, te…
jaybuidl Jul 19, 2025
3bca47c
test: dispute kit gated
jaybuidl Jul 19, 2025
358a621
Merge pull request #2045 from kleros/feat/universal-gated-dk
jaybuidl Jul 19, 2025
6e535cc
chore: contract dependencies update, bumped node to v20, solidity to …
jaybuidl Jul 19, 2025
b8a2a15
chore: devnet contracts redeploy, tooling migration to etherscan v2 API
jaybuidl Jul 19, 2025
5ef5f23
chore: artifacts refresh, contract getters to include the new dispute…
jaybuidl Jul 19, 2025
b5c639c
fix: implementation version
jaybuidl Jul 19, 2025
1b9cc64
chore: devnet subgraphs redeployed to Alchemy
jaybuidl Jul 19, 2025
222b832
chore: published @kleros/[email protected]
jaybuidl Jul 20, 2025
60a0a75
chore: rolling back shutter-sdk to v0.0.1 due to BLST issue in browser
jaybuidl Jul 20, 2025
e2e6412
Merge pull request #2046 from kleros/chore/devnet-redeploy-jul2025
jaybuidl Jul 20, 2025
dace35e
fix: blst error shutter v0.0.2
kemuru Jul 20, 2025
2b67654
chore: bumped shutter sdk in contracts/
jaybuidl Jul 21, 2025
88f0a3e
Merge pull request #2049 from kleros/fix/blst-error-shutter-v0.0.2
jaybuidl Jul 21, 2025
032f38c
fix(subgraph): total-leaderboard-jurors-count
tractorss Jul 20, 2025
f36904e
chore: core subgraph redeploy on Alchemy
jaybuidl Jul 21, 2025
f4ed9a0
Merge pull request #2048 from kleros/fix/leaderboard-juror-count
jaybuidl Jul 21, 2025
1ff6beb
feat: recognise the new dispute kits, matching by address, resolver UX
jaybuidl Jul 21, 2025
f5c1d67
feat: gated dispute kit extra data input, extra data encoding refactor
jaybuidl Jul 22, 2025
bc76907
chore: dispute-kit-gated-subgraph-support
tractorss Jul 22, 2025
8818c80
fix(web): dispute-kit-input-persistence
tractorss Jul 22, 2025
4d0c513
feat(web): fetch-dispute-kit-data-in-duplication
tractorss Jul 22, 2025
38030e1
Merge branch 'web/dk-support-improvement' into chore/token-gated-disp…
tractorss Jul 22, 2025
008bd22
fix(subgraph): update-dispute-kit-extraction
tractorss Jul 22, 2025
fe7419c
feat(web): support-vote-commit-fund-calls-for-gated-dispute-kit
tractorss Jul 22, 2025
7912160
Merge branch 'web/dk-support-improvement' into chore/token-gated-disp…
tractorss Jul 22, 2025
434e608
Merge pull request #2051 from kleros/chore/token-gated-dispute-kit-su…
tractorss Jul 22, 2025
168740b
chore: bumped core subgraph version
jaybuidl Jul 22, 2025
6eb5bc6
chore: more aggressive draw iterations to account for ineligible jurors
jaybuidl Jul 22, 2025
fa2520c
fix: cosmetic and rabbit review
jaybuidl Jul 22, 2025
c6562bb
fix(web): update-fund-hook
tractorss Jul 22, 2025
c6b51c1
fix(web): jurors-count-input-crash
tractorss Jul 23, 2025
ce63962
fix(web): fix-shutter-commit-call
tractorss Jul 23, 2025
b5fff19
fix(web): reveal-shutter-gated
tractorss Jul 23, 2025
2166ee0
test: contracts getter tests with new dispute kits
jaybuidl Jul 28, 2025
026fe83
feat(bot): keeper bot support gated and gated shutter dk
jaybuidl Jul 28, 2025
bff4f10
Merge pull request #2050 from kleros/web/dk-support-improvement
jaybuidl Jul 28, 2025
6a3ed6c
chore: testnet upgrade and new dks deployment
jaybuidl Jul 28, 2025
c1ebbb1
chore: exported artifacts
jaybuidl Jul 28, 2025
041f3d9
Merge pull request #2058 from kleros/chore/testnet-upgrade-jul2025
jaybuidl Jul 28, 2025
97ba58a
feat: keeper bot automation of withdrawLeftoverPNK()
jaybuidl Jul 29, 2025
88f9469
chore: contracts changelog
jaybuidl Jul 29, 2025
c9bb926
chore: contracts changelog fix
jaybuidl Jul 29, 2025
e9ed4ba
chore: contracts changelog author removed
jaybuidl Jul 29, 2025
259ecd5
fix(DK): no empty addresses after draw
unknownunknown1 Jul 30, 2025
66c5e8f
feat(arbitration): implement SafeSend library for secure ETH transfers
thasmi21 Aug 1, 2025
1644927
test: fixed missing constructor param wNative
jaybuidl Aug 1, 2025
c5a894a
fix: removed SafeSend from ruler and university, natspec tweaks, Safe…
jaybuidl Aug 1, 2025
f080264
chore: minor tweak
jaybuidl Aug 1, 2025
05c3f28
Merge pull request #2060 from kleros/fix/draw-empty-address-bug
jaybuidl Aug 1, 2025
6786c29
Merge pull request #2041 from kleros/fix/ETH-transfer
jaybuidl Aug 1, 2025
701c14e
chore: changelog
jaybuidl Aug 1, 2025
ce82e0b
chore: upgrade scripts preparation
jaybuidl Aug 1, 2025
4a84534
fix: neo core contract is 144-bytes too large, extracted repeated cod…
jaybuidl Aug 1, 2025
b9e847d
chore: upgrade of the Devnet and Testnet contracts
jaybuidl Aug 1, 2025
ea9dcc9
chore: beta upgrade
jaybuidl Aug 2, 2025
f93ba63
chore: neo subgraph deployment
jaybuidl Aug 2, 2025
3e0b74c
chore: export deployment artifacts, added getters for new DKs in test…
jaybuidl Aug 2, 2025
3c429b1
chore: changelog
jaybuidl Aug 2, 2025
85ba557
chore: publish @kleros/[email protected]
jaybuidl Aug 2, 2025
737d719
fix: test coverage script
jaybuidl Aug 2, 2025
8dc21bc
Merge pull request #2061 from kleros/chore/devnet-upgrade-20250801
jaybuidl Aug 2, 2025
db8a4ba
chore: remove hallmark due to GHSA-8g77-54rh-46hx
jaybuidl Aug 2, 2025
c8185bd
fix(web): wagmi config for new Neo dispute kits
jaybuidl Aug 2, 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
17 changes: 5 additions & 12 deletions contracts/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,13 @@ GNOSISSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
# For the bots
LOG_LEVEL=debug
SUBGRAPH_URL=https://api.studio.thegraph.com/query/61738/kleros-v2-core-devnet/version/latest
LOGTAIL_TOKEN_KEEPER_BOT=cqPqBofVC8nmA8EZdZGqqvUV
LOGTAIL_TOKEN_RELAYER_BOT=41h8q5Z4gnz5yDx215eqcQ4r
LOGTAIL_TOKEN_DISPUTOR_BOT=mSryyvYubviaMqKDWfBKAGsi
HEARTBEAT_URL_KEEPER_BOT=https://uptime.betterstack.com/api/v1/heartbeat/jc23S8ZZzpf8KbzwxL1hoBp9
HEARTBEAT_URL_RELAYER_BOT=https://uptime.betterstack.com/api/v1/heartbeat/eT6Trk6CddJV6fFBbqZNzyqC
LOGTAIL_TOKEN_KEEPER_BOT=ABC123ABC123ABC123ABC
LOGTAIL_TOKEN_RELAYER_BOT=ABC123ABC123ABC123ABC
LOGTAIL_TOKEN_DISPUTOR_BOT=ABC123ABC123ABC123ABC
HEARTBEAT_URL_KEEPER_BOT=https://uptime.betterstack.com/api/v1/heartbeat/ABC123ABC123ABC123ABC
HEARTBEAT_URL_RELAYER_BOT=https://uptime.betterstack.com/api/v1/heartbeat/ABC123ABC123ABC123ABC
DISPUTES_TO_SKIP=

# Optionally for debugging
# TENDERLY_USERNAME=your_username
# TENDERLY_PROJECT=your_project

# Used by the "hardhat.config.ts" file and important to set them for the "scripts/simulations" tasks
ARB_GOERLI_PRIVATE_KEY_WALLET_1=
ARB_GOERLI_PRIVATE_KEY_WALLET_2=
ARB_GOERLI_PRIVATE_KEY_WALLET_3=
ARB_GOERLI_PRIVATE_KEY_WALLET_4=
ARB_GOERLI_PRIVATE_KEY_WALLET_5=
2 changes: 1 addition & 1 deletion contracts/deploy/upgrade-all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const deployUpgradeAll: DeployFunction = async (hre: HardhatRuntimeEnvironment)
await upgrade(disputeKitClassic, "initialize6", []);
await upgrade(disputeTemplateRegistry, "initialize2", []);
await upgrade(evidence, "initialize2", []);
await upgrade(core, "initialize4", []);
await upgrade(core, "initialize5", []);
await upgrade(policyRegistry, "initialize2", []);
await upgrade(sortition, "initialize3", []);
};
Expand Down
27 changes: 27 additions & 0 deletions contracts/scripts/find-initializer-versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#! /usr/bin/env bash

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

declare -A rpcUrls
rpcUrls["arbitrum"]=$(mesc url arbitrum_alchemy)
rpcUrls["arbitrumSepolia"]=$(mesc url arbitrumSepolia_alchemy)
rpcUrls["arbitrumSepoliaDevnet"]=$(mesc url arbitrumSepolia_alchemy)

# event Initialized(uint64 version);
eventTopic=0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2

for c in arbitrum arbitrumSepolia arbitrumSepoliaDevnet; do
echo "--------------------------------"
echo "$c"
echo "--------------------------------"
for f in "$SCRIPT_DIR"/../deployments/"$c"/*_Proxy.json; do
address=$(jq -r .address "$f")
block=$(jq -r .receipt.blockNumber "$f")
basename "$f"
results=$(cast logs --from-block "$block" --to-block latest $eventTopic --address "$address" --rpc-url "${rpcUrls[$c]}" --json | jq -r .[].data)
initializer=$(cast --to-dec "$(echo "$results" | tail -n1)")
version=$(cast call --rpc-url "${rpcUrls[$c]}" "$address" "version()(string)" --json 2>/dev/null | jq -r '.[0]')
echo "$initializer" @v"$version"
echo
done
done
15 changes: 14 additions & 1 deletion contracts/scripts/keeperBot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Cores, getContracts as getContractsForCoreType } from "./utils/contract

let request: <T>(url: string, query: string) => Promise<T>; // Workaround graphql-request ESM import
const { ethers } = hre;
const MAX_DRAW_CALLS_WITHOUT_JURORS = 10;
const MAX_DRAW_ITERATIONS = 30;
const MAX_EXECUTE_ITERATIONS = 20;
const MAX_DELAYED_STAKES_ITERATIONS = 50;
Expand Down Expand Up @@ -248,7 +249,19 @@ const drawJurors = async (dispute: { id: string; currentRoundIndex: string }, it
const { core } = await getContracts();
let success = false;
try {
await core.draw.staticCall(dispute.id, iterations, HIGH_GAS_LIMIT);
const simulatedIterations = iterations * MAX_DRAW_CALLS_WITHOUT_JURORS; // Drawing will be skipped as long as no juror is available in the next MAX_DRAW_CALLS_WITHOUT_JURORS calls to draw() given this nb of iterations.
const { drawnJurors: drawnJurorsBefore } = await core.getRoundInfo(dispute.id, dispute.currentRoundIndex);
const nbDrawnJurors = (await core.draw.staticCall(dispute.id, simulatedIterations, HIGH_GAS_LIMIT)) as bigint;
const extraJurors = nbDrawnJurors - BigInt(drawnJurorsBefore.length);
logger.debug(
`Draw: ${extraJurors} jurors available in the next ${simulatedIterations} iterations for dispute ${dispute.id}`
);
if (extraJurors <= 0n) {
logger.warn(
`Draw: skipping, no jurors available in the next ${simulatedIterations} iterations for dispute ${dispute.id}`
);
return success;
}
} catch (e) {
logger.error(`Draw: will fail for ${dispute.id}, skipping`);
return success;
Expand Down
4 changes: 2 additions & 2 deletions contracts/src/arbitration/KlerosCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {KlerosCoreBase, IDisputeKit, ISortitionModule, IERC20} from "./KlerosCor
/// Core arbitrator contract for Kleros v2.
/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.
contract KlerosCore is KlerosCoreBase {
string public constant override version = "0.9.3";
string public constant override version = "0.9.4";

// ************************************* //
// * Constructor * //
Expand Down Expand Up @@ -56,7 +56,7 @@ contract KlerosCore is KlerosCoreBase {
);
}

function initialize4() external reinitializer(4) {
function initialize5() external reinitializer(5) {
// NOP
}

Expand Down
20 changes: 19 additions & 1 deletion contracts/src/arbitration/KlerosCoreBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,8 @@ abstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable
/// @dev Draws jurors for the dispute. Can be called in parts.
/// @param _disputeID The ID of the dispute.
/// @param _iterations The number of iterations to run.
function draw(uint256 _disputeID, uint256 _iterations) external {
/// @return nbDrawnJurors The total number of jurors drawn in the round.
function draw(uint256 _disputeID, uint256 _iterations) external returns (uint256 nbDrawnJurors) {
Dispute storage dispute = disputes[_disputeID];
uint256 currentRound = dispute.rounds.length - 1;
Round storage round = dispute.rounds[currentRound];
Expand All @@ -616,6 +617,7 @@ abstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable
}
}
round.drawIterations += i;
return round.drawnJurors.length;
}

/// @dev Appeals the ruling of a specified dispute.
Expand Down Expand Up @@ -981,18 +983,34 @@ abstract contract KlerosCoreBase is IArbitratorV2, Initializable, UUPSProxiable
(ruling, tied, overridden) = disputeKit.currentRuling(_disputeID);
}

/// @dev Gets the round info for a specified dispute and round.
/// @dev This function must not be called from a non-view function because it returns a dynamic array which might be very large, theoretically exceeding the block gas limit.
/// @param _disputeID The ID of the dispute.
/// @param _round The round to get the info for.
/// @return round The round info.
function getRoundInfo(uint256 _disputeID, uint256 _round) external view returns (Round memory) {
return disputes[_disputeID].rounds[_round];
}

/// @dev Gets the PNK at stake per juror for a specified dispute and round.
/// @param _disputeID The ID of the dispute.
/// @param _round The round to get the info for.
/// @return pnkAtStakePerJuror The PNK at stake per juror.
function getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round) external view returns (uint256) {
return disputes[_disputeID].rounds[_round].pnkAtStakePerJuror;
}

/// @dev Gets the number of rounds for a specified dispute.
/// @param _disputeID The ID of the dispute.
/// @return The number of rounds.
function getNumberOfRounds(uint256 _disputeID) external view returns (uint256) {
return disputes[_disputeID].rounds.length;
}

/// @dev Checks if a given dispute kit is supported by a given court.
/// @param _courtID The ID of the court to check the support for.
/// @param _disputeKitID The ID of the dispute kit to check the support for.
/// @return Whether the dispute kit is supported or not.
function isSupported(uint96 _courtID, uint256 _disputeKitID) external view returns (bool) {
return courts[_courtID].supportedDisputeKits[_disputeKitID];
}
Expand Down
4 changes: 2 additions & 2 deletions contracts/src/arbitration/KlerosCoreNeo.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
/// Core arbitrator contract for Kleros v2.
/// Note that this contract trusts the PNK token, the dispute kit and the sortition module contracts.
contract KlerosCoreNeo is KlerosCoreBase {
string public constant override version = "0.8.0";
string public constant override version = "0.9.4";

// ************************************* //
// * Storage * //
Expand Down Expand Up @@ -67,7 +67,7 @@ contract KlerosCoreNeo is KlerosCoreBase {
jurorNft = _jurorNft;
}

function initialize4() external reinitializer(4) {
function initialize5() external reinitializer(5) {
// NOP
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[
{
"type": "json",
"source": {
"value": "**Kleros Moderate:** Did the user, **degenape6** (ID: 1554345080), break the Telegram group, ***[Kleros Trading Group]()*** (ID: -1001151472172), ***[rules](https://cdn.kleros.link/ipfs/Qme3Qbj9rKUNHUe9vj9rqCLnTVUCWKy2YfveQF8HiuWQSu/Kleros%20Moderate%20Community%20Rules.pdf)*** due to conduct related to the ***[message](https://t.me/c/1151472172/116662)*** (***[backup](https://cdn.kleros.link/ipfs/QmVbFrZR1bcyQzZjvLyXwL9ekDxrqHERykdreRxXrw4nqg/animations_file_23.mp4)***)?",
"value": {
"question": "**Kleros Moderate:** Did the user, **degenape6** (ID: 1554345080), break the Telegram group, ***[Kleros Trading Group]()*** (ID: -1001151472172), ***[rules](https://cdn.kleros.link/ipfs/Qme3Qbj9rKUNHUe9vj9rqCLnTVUCWKy2YfveQF8HiuWQSu/Kleros%20Moderate%20Community%20Rules.pdf)*** due to conduct related to the ***[message](https://t.me/c/1151472172/116662)*** (***[backup](https://cdn.kleros.link/ipfs/QmVbFrZR1bcyQzZjvLyXwL9ekDxrqHERykdreRxXrw4nqg/animations_file_23.mp4)***)?",
"type": "single-select",
"answers": [
{
Expand Down
13 changes: 11 additions & 2 deletions subgraph/core/src/KlerosCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,19 @@ export function handleAppealDecision(event: AppealDecision): void {
const disputeID = event.params._disputeID;
const dispute = Dispute.load(disputeID.toString());
if (!dispute) return;

// Load the current (previous) round
const previousRoundID = dispute.currentRound;
const previousRound = Round.load(previousRoundID);
if (previousRound) {
previousRound.isCurrentRound = false;
previousRound.save();
}

const newRoundIndex = dispute.currentRoundIndex.plus(ONE);
const roundID = `${disputeID}-${newRoundIndex.toString()}`;
const newRoundID = `${disputeID}-${newRoundIndex.toString()}`;
dispute.currentRoundIndex = newRoundIndex;
dispute.currentRound = roundID;
dispute.currentRound = newRoundID;
dispute.save();
const roundInfo = contract.getRoundInfo(disputeID, newRoundIndex);

Expand Down
30 changes: 28 additions & 2 deletions subgraph/core/src/entities/Dispute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,36 @@ export const updateDisputeRequestData = (event: DisputeCreation): void => {
if (!receipt) return;

const logs = receipt.logs;
const coreDisputeId = event.params._disputeID;

// note that the topic at 0th index is always the event signature
const disputeRequestEventIndex = logs.findIndex((log) => log.topics[0] == DisputeRequestSignature);
const crossChainDisputeEventIndex = logs.findIndex((log) => log.topics[0] == CrossChainDisputeIncomingSignature);
// For DisputeRequestSignature
let disputeRequestEventIndex = -1;
for (let i = 0; i < logs.length; i++) {
let log = logs[i];
if (log.topics.length > 2 && log.topics[0] == DisputeRequestSignature) {
// 3rd indexed argument in event is _arbitratorDisputeId
let decodedId = ethereum.decode("uint256", log.topics[2]);
if (decodedId != null && coreDisputeId.equals(decodedId.toBigInt())) {
disputeRequestEventIndex = i;
break;
}
}
}

// For CrossChainDisputeIncomingSignature
let crossChainDisputeEventIndex = -1;
for (let i = 0; i < logs.length; i++) {
let log = logs[i];
if (log.topics.length > 3 && log.topics[0] == CrossChainDisputeIncomingSignature) {
// 4th indexed argument in event is _arbitratorDisputeId
let decodedId = ethereum.decode("uint256", log.topics[3]);
if (decodedId != null && coreDisputeId.equals(decodedId.toBigInt())) {
crossChainDisputeEventIndex = i;
break;
}
}
}

if (crossChainDisputeEventIndex !== -1) {
const crossChainDisputeEvent = logs[crossChainDisputeEventIndex];
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.15.2",
"version": "0.15.4",
"drtVersion": "0.12.0",
"license": "MIT",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

### Pre-Requisites

If you haven't already, you need to follow all the previous steps of the **Contributing** section of the repo's [Contribution Guidelines](../CONTRIBUTING.md).
If you haven't already, you need to follow all the previous steps of the **Contributing** section of the repo's [Contribution Guidelines](../CONTRIBUTING.md)

### Getting Started

Expand Down
11 changes: 11 additions & 0 deletions web/src/assets/svgs/icons/gavel-executed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 0 additions & 45 deletions web/src/components/AllCasesButton.tsx

This file was deleted.

Loading
Loading