-
Couldn't load subscription status.
- Fork 50
Release #2076
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
base: master
Are you sure you want to change the base?
Release #2076
Changes from 13 commits
5a81f9e
4c2277b
efb2aad
29aee53
e3ed3c9
92852da
c99b0c9
7c74b70
d78e212
77c8549
0cdc07d
e41ee56
9b1f5fd
2d94bfd
bfe11a7
63ecf4a
937fb97
752b64a
9140890
4a72da5
d3a1293
9d3ba90
3080c8f
a8942cd
89848ea
a130a6a
b8628bb
d10251b
41e8998
34f6a65
da7eea1
a8f3415
78b3169
738ef2c
82f8b1c
52f86ac
a374113
a0cb09d
5353ccf
831b062
3d211cc
95f2803
277457c
d1910ca
8d0edf4
c1bad1d
be33847
cabc743
b19b82d
1dbfedf
37bd43f
0a10ad2
257870c
4a451a5
5ca5c3b
bd4e169
31efb24
96e48f8
0f31e0e
d63d000
78f180a
413a85a
9895c7c
2f711f3
da90234
0cadf21
e6572d5
635aa6d
9401c9b
8f4993d
3b59568
f02d718
f2b2183
03376da
524116c
9618a6f
5468d55
1aae950
208e009
42cc971
057957e
d0a9a80
f734873
582b674
e4d4bdb
1d37d89
3ed7310
c9e7334
ea5b3a7
361fa55
6636c6d
e6114ba
9d31252
baf9695
4cc634f
14fedbb
63d3a64
e6e83ae
1d1f9f2
b7888c2
d3c215e
323ba18
953bd95
d794975
62b0a50
a7cfba0
1ba64db
068df77
188f8d0
bd589e7
6f92514
2cfeec4
4aa2cd2
b490c96
ef3a64c
fb6ca6a
5e987c4
98f7eac
030eedf
6ded616
63744e9
262f940
bd210be
40714da
758a809
7a5d08d
e9f8a0a
923bd7b
daa8bf9
4e384c9
8636c23
36a2455
59ca8e1
5dc39fa
79a458c
1ec4e02
f1ec484
8b6e1f9
7a78b27
83a21bd
6bea072
62d5723
0e3fb9c
f77b92f
e41329b
8f438dd
8032917
1b6c98a
568eb40
96bb505
78833f3
4530869
cfdb1f4
7c30463
e7578d2
bd983ca
c97270a
f1dd559
fd465a4
8ecf061
41a5b77
cbc111a
452246f
e59e79b
e7971b8
835eea4
d82188a
79e4210
e1a3d05
55589e5
9d4b286
4f35c9d
e3dc195
942fa9e
20ae3a4
e2d7c81
b9a7a97
48abffb
859834b
56aaca8
94e4783
a8d32b8
0e96a87
6752cad
65f84cf
2842949
e827f63
6b74ebc
df07fbb
835d45b
5b35be9
06db2d0
615effc
11f84f7
ec9e89c
40d2240
45bcd0f
06cccaa
7cb1275
bc906e5
4d14f47
e21d261
cf59b86
f70050e
decd3e7
00be694
536e61c
374b4f2
f9fd944
a0a3a67
a934ba5
6b7e365
5a46536
87e5759
bcbe228
83a8ba6
700738e
cefa0cb
13f3708
3a930be
613b8c3
57319d4
8ab5d63
ca59e71
780e00a
c279eff
c40c12c
fac9901
973f572
6cbd494
5276f64
91ccfe9
d03832d
e2daec5
bbcc819
7df6109
0b4cb0c
8704a3c
ad1ff0d
6d76559
b22899c
4a3c20f
f8536e6
b6ca2ad
f5f3079
7f64aba
32fe70a
8795f88
2dd02dc
877ed81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,7 +4,26 @@ All notable changes to this package will be documented in this file. | |||||||||
|
|
||||||||||
| The format is based on [Common Changelog](https://common-changelog.org/). | ||||||||||
|
|
||||||||||
| ## [0.11.0] - 2025-08-01 | ||||||||||
| ## [0.13.0] - 2025-08-07 (Not published yet) | ||||||||||
|
|
||||||||||
| ### Changed | ||||||||||
|
|
||||||||||
| - Set the Hardhat Solidity version to v0.8.30 and enable the IR pipeline ([#2069](https://github.com/kleros/kleros-v2/issues/2069)) | ||||||||||
| - Set the Foundry Solidity version to v0.8.30 and enable the IR pipeline ([#2073](https://github.com/kleros/kleros-v2/issues/2073)) | ||||||||||
| - Bump `hardhat` to v2.26.2 ([#2069](https://github.com/kleros/kleros-v2/issues/2069)) | ||||||||||
| - Bump `@kleros/vea-contracts` to v0.7.0 ([#2073](https://github.com/kleros/kleros-v2/issues/2073)) | ||||||||||
|
|
||||||||||
| ## [0.12.0] - 2025-08-05 | ||||||||||
|
|
||||||||||
| ### Changed | ||||||||||
|
|
||||||||||
| - **Breaking:** Make `viem` a peer dependency, it should be provided by the consuming package ([`4594536`](https://github.com/kleros/kleros-v2/commit/4594536c)) | ||||||||||
|
|
||||||||||
| ### Added | ||||||||||
|
|
||||||||||
| - Add helper function `getDisputeKitsViem` to retrieve a deployment's available dispute kit infos including their capabilities (`isShutter`, `isGated`) ([`5a81f9e`](https://github.com/kleros/kleros-v2/commit/5a81f9ec)) | ||||||||||
|
|
||||||||||
| ## [0.11.0] - 2025-08-02 | ||||||||||
|
|
||||||||||
| ### Changed | ||||||||||
|
|
||||||||||
|
|
@@ -107,6 +126,8 @@ The format is based on [Common Changelog](https://common-changelog.org/). | |||||||||
|
|
||||||||||
| ## [0.8.1] - 2025-04-10 | ||||||||||
|
|
||||||||||
| [0.13.0]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%[email protected] | ||||||||||
| [0.12.0]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%[email protected] | ||||||||||
|
Comment on lines
+174
to
+175
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainAvoid adding a release link for an unpublished tag. If 0.13.0 isn’t published, this link will 404. Add it only when the release is live. -[0.13.0]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%[email protected]
+<!-- [0.13.0]: (add after publishing) -->Optionally confirm release existence before merging: 🏁 Script executed: #!/bin/bash
# Prints 200 if the tag exists, otherwise likely 404
curl -s -o /dev/null -w "%{http_code}\n" \
"https://github.com/kleros/kleros-v2/releases/tag/@kleros%[email protected]"Length of output: 132 Remove unpublished release link for v0.13.0 in CHANGELOG.md The • File: Recommended change: -[0.13.0]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%[email protected]
+<!-- [0.13.0]: (add after publishing) -->📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| [0.11.0]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%[email protected] | ||||||||||
| [0.10.0]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%[email protected] | ||||||||||
| [0.9.4]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%[email protected] | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,85 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { getContracts } from "./contractsViem"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { Abi, AbiEvent, getAbiItem, PublicClient } from "viem"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { DeploymentName } from "./utils"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export type DisputeKitContracts = ReturnType<typeof getContracts>; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export type DisputeKit = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | NonNullable<DisputeKitContracts["disputeKitClassic"]> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | NonNullable<DisputeKitContracts["disputeKitShutter"]> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | NonNullable<DisputeKitContracts["disputeKitGated"]> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | NonNullable<DisputeKitContracts["disputeKitGatedShutter"]> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| | null; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export type DisputeKitInfos = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| address: `0x${string}`; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| contract: DisputeKit; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isGated: boolean; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isShutter: boolean; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export type DisputeKitByIds = Record<string, DisputeKitInfos>; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const fetchDisputeKits = async (client: PublicClient, klerosCoreAddress: `0x${string}`, klerosCoreAbi: Abi) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const DisputeKitCreated = getAbiItem({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| abi: klerosCoreAbi, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: "DisputeKitCreated", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) as AbiEvent; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+21
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Unsafe type assertion - add runtime validation. The type assertion - const DisputeKitCreated = getAbiItem({
- abi: klerosCoreAbi,
- name: "DisputeKitCreated",
- }) as AbiEvent;
+ const DisputeKitCreated = getAbiItem({
+ abi: klerosCoreAbi,
+ name: "DisputeKitCreated",
+ });
+
+ if (!DisputeKitCreated || DisputeKitCreated.type !== 'event') {
+ throw new Error('DisputeKitCreated event not found in ABI');
+ }📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const logs = await client.getLogs({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| address: klerosCoreAddress, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| event: DisputeKitCreated, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fromBlock: 0n, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| toBlock: "latest", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+20
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider performance implications of unbounded block range. Fetching events from block 0 to latest will become increasingly expensive as the chain grows. Consider adding block range parameters or caching mechanisms for production use. -const fetchDisputeKits = async (client: PublicClient, klerosCoreAddress: `0x${string}`, klerosCoreAbi: Abi) => {
+const fetchDisputeKits = async (
+ client: PublicClient,
+ klerosCoreAddress: `0x${string}`,
+ klerosCoreAbi: Abi,
+ fromBlock: bigint = 0n
+) => {
const DisputeKitCreated = getAbiItem({
abi: klerosCoreAbi,
name: "DisputeKitCreated",
}) as AbiEvent;
const logs = await client.getLogs({
address: klerosCoreAddress,
event: DisputeKitCreated,
- fromBlock: 0n,
+ fromBlock,
toBlock: "latest",
});📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return Object.fromEntries( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| logs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .filter((log) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const args = log.args as Record<string, unknown>; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return "_disputeKitID" in args && "_disputeKitAddress" in args; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .map((log) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const { _disputeKitID, _disputeKitAddress } = log.args as { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _disputeKitID: bigint; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _disputeKitAddress: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| disputeKitID: _disputeKitID, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| disputeKitAddress: _disputeKitAddress, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .map(({ disputeKitID, disputeKitAddress }) => [disputeKitID!.toString(), disputeKitAddress as `0x${string}`]) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+31
to
+49
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add error handling for blockchain interactions. The function lacks error handling for potential RPC failures or malformed event data. Wrap the blockchain interaction in try-catch: + try {
const logs = await client.getLogs({
address: klerosCoreAddress,
event: DisputeKitCreated,
fromBlock: 0n,
toBlock: "latest",
});
+ } catch (error) {
+ throw new Error(`Failed to fetch DisputeKitCreated events: ${error}`);
+ }
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const getDisputeKits = async (client: PublicClient, deployment: DeploymentName): Promise<DisputeKitByIds> => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const { klerosCore, disputeKitClassic, disputeKitShutter, disputeKitGated, disputeKitGatedShutter } = getContracts({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| publicClient: client, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| deployment: deployment, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const isDefined = <T>(kit: T): kit is NonNullable<T> => kit != null; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const disputeKitContracts = [disputeKitClassic, disputeKitShutter, disputeKitGated, disputeKitGatedShutter].filter( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isDefined | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const shutterEnabled = [disputeKitShutter, disputeKitGatedShutter].filter(isDefined); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const gatedEnabled = [disputeKitGated, disputeKitGatedShutter].filter(isDefined); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const disputeKitMap = await fetchDisputeKits(client, klerosCore.address, klerosCore.abi); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return Object.fromEntries( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Object.entries(disputeKitMap).map(([disputeKitID, address]) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const contract = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| disputeKitContracts.find((contract) => contract.address.toLowerCase() === address.toLowerCase()) ?? null; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| disputeKitID, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| address, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| contract: contract satisfies DisputeKit, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isGated: contract | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ? gatedEnabled.some((gated) => contract.address.toLowerCase() === gated.address.toLowerCase()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| : false, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isShutter: contract | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ? shutterEnabled.some((shutter) => contract.address.toLowerCase() === shutter.address.toLowerCase()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| : false, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||
| "name": "@kleros/kleros-v2-contracts", | ||||||||||||||||||||||||||||||||||||
| "version": "0.11.0", | ||||||||||||||||||||||||||||||||||||
| "version": "0.12.0", | ||||||||||||||||||||||||||||||||||||
| "description": "Smart contracts for Kleros version 2", | ||||||||||||||||||||||||||||||||||||
| "main": "./cjs/deployments/index.js", | ||||||||||||||||||||||||||||||||||||
| "module": "./esm/deployments/index.js", | ||||||||||||||||||||||||||||||||||||
|
|
@@ -121,7 +121,7 @@ | |||||||||||||||||||||||||||||||||||
| "@types/mocha": "^10.0.10", | ||||||||||||||||||||||||||||||||||||
| "@types/node": "^20.17.6", | ||||||||||||||||||||||||||||||||||||
| "@types/sinon": "^17.0.4", | ||||||||||||||||||||||||||||||||||||
| "@wagmi/cli": "^2.2.0", | ||||||||||||||||||||||||||||||||||||
| "@wagmi/cli": "^2.3.2", | ||||||||||||||||||||||||||||||||||||
| "abitype": "^0.10.3", | ||||||||||||||||||||||||||||||||||||
| "chai": "^4.5.0", | ||||||||||||||||||||||||||||||||||||
| "dotenv": "^16.6.1", | ||||||||||||||||||||||||||||||||||||
|
|
@@ -131,7 +131,7 @@ | |||||||||||||||||||||||||||||||||||
| "gluegun": "^5.2.0", | ||||||||||||||||||||||||||||||||||||
| "graphql": "^16.9.0", | ||||||||||||||||||||||||||||||||||||
| "graphql-request": "^7.1.2", | ||||||||||||||||||||||||||||||||||||
| "hardhat": "2.25.0", | ||||||||||||||||||||||||||||||||||||
| "hardhat": "2.26.2", | ||||||||||||||||||||||||||||||||||||
| "hardhat-contract-sizer": "^2.10.0", | ||||||||||||||||||||||||||||||||||||
| "hardhat-deploy": "^1.0.4", | ||||||||||||||||||||||||||||||||||||
| "hardhat-deploy-ethers": "^0.4.2", | ||||||||||||||||||||||||||||||||||||
|
|
@@ -154,10 +154,17 @@ | |||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "dependencies": { | ||||||||||||||||||||||||||||||||||||
| "@chainlink/contracts": "^1.4.0", | ||||||||||||||||||||||||||||||||||||
| "@kleros/vea-contracts": "^0.6.0", | ||||||||||||||||||||||||||||||||||||
| "@kleros/vea-contracts": "^0.7.0", | ||||||||||||||||||||||||||||||||||||
| "@openzeppelin/contracts": "^5.4.0", | ||||||||||||||||||||||||||||||||||||
| "@shutter-network/shutter-sdk": "0.0.2", | ||||||||||||||||||||||||||||||||||||
| "isomorphic-fetch": "^3.0.0", | ||||||||||||||||||||||||||||||||||||
| "isomorphic-fetch": "^3.0.0" | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "peerDependencies": { | ||||||||||||||||||||||||||||||||||||
| "viem": "^2.24.1" | ||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||
| "peerDependenciesMeta": { | ||||||||||||||||||||||||||||||||||||
| "viem": { | ||||||||||||||||||||||||||||||||||||
| "optional": false | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+160
to
167
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Peer dependency viem ^2.24.1 conflicts with root resolution (^2.23.2). This will produce peer warnings/errors and potentially divergent behavior across workspaces. Either relax the peer to match the resolution, or better, update the root resolution to satisfy the peer (recommended): Preferred (root package.json): - "viem@npm:2.x": "npm:^2.23.2"
+ "viem@npm:2.x": "npm:^2.24.1"If you must stay on 2.23.x, change this package’s peer to: - "viem": "^2.24.1"
+ "viem": "^2.23.0"…but this may block newer features you rely on. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import { getDisputeKits } from "../deployments/disputeKitsViem"; | ||
| import { createPublicClient, http } from "viem"; | ||
| import { arbitrumSepolia } from "viem/chains"; | ||
|
|
||
| const rpc = process.env.ARBITRUM_SEPOLIA_RPC; | ||
| if (!rpc) { | ||
| throw new Error("ARBITRUM_SEPOLIA_RPC is not set"); | ||
| } | ||
|
|
||
| const client = createPublicClient({ | ||
| chain: arbitrumSepolia, | ||
| transport: http(rpc), | ||
| }); | ||
|
|
||
| async function main() { | ||
| try { | ||
| console.log("Fetching DisputeKitCreated events..."); | ||
| const disputeKitResult = await getDisputeKits(client, "devnet"); | ||
| console.log(disputeKitResult); | ||
| } catch (error) { | ||
| console.error("Error fetching events:", error); | ||
| throw error; | ||
| } | ||
| } | ||
|
|
||
| if (require.main === module) { | ||
| main() | ||
| .then(() => process.exit(0)) | ||
| .catch((error) => { | ||
| console.error(error); | ||
| process.exit(1); | ||
| }); | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -77,7 +77,8 @@ | |||||||||||||
| "elliptic@npm:6.5.4": "npm:6.6.1", | ||||||||||||||
| "word-wrap@npm:~1.2.3": "npm:1.2.5", | ||||||||||||||
| "@codemirror/state": "npm:6.5.2", | ||||||||||||||
| "undici@npm:7.3.0": "npm:7.5.0" | ||||||||||||||
| "undici@npm:7.3.0": "npm:7.5.0", | ||||||||||||||
| "viem@npm:2.x": "npm:^2.23.2" | ||||||||||||||
|
Comment on lines
+80
to
+81
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainAlign viem resolution with contracts’ peer dependency to avoid peer conflicts. Root resolution pins viem 2.x to ^2.23.2, while contracts require viem ^2.24.1 as a peer. This will trigger peer resolution warnings/errors in Yarn 4 and could break consumers. Update the resolution to satisfy the peer: "resolutions": {
...
- "viem@npm:2.x": "npm:^2.23.2"
+ "viem@npm:2.x": "npm:^2.24.1"
},To check for other mismatches: 🏁 Script executed: #!/bin/bash
rg -n --json '"viem"\s*:\s*"' | jq -r '.data.path.text + ":" + .data.line_number|tostring + " " + .data.lines.text'Length of output: 1417 🏁 Script executed: #!/bin/bash
# Search for all references to “viem” in any JSON file to spot mismatched pins
rg -n '"viem"' -g '*.json'Length of output: 440 Update viem resolution to match peerDependency (^2.24.1) All of your sub-packages (contracts, web, kleros-sdk, web-devtools, kleros-app) declare viem at ^2.24.1, but the root • File: package.json (root) "resolutions": {
…
- "viem@npm:2.x": "npm:^2.23.2"
+ "viem@npm:2.x": "npm:^2.24.1"
},📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| }, | ||||||||||||||
| "scripts": { | ||||||||||||||
| "check-prerequisites": "scripts/check-prerequisites.sh", | ||||||||||||||
|
|
||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,3 +9,8 @@ YARN_ENABLE_GLOBAL_CACHE = "true" | |||||||||||||||||
|
|
||||||||||||||||||
| [functions] | ||||||||||||||||||
| directory = "web/netlify/functions/" | ||||||||||||||||||
|
|
||||||||||||||||||
| [[headers]] | ||||||||||||||||||
| for = "/*" | ||||||||||||||||||
| [headers.values] | ||||||||||||||||||
| X-Robots-Tag = "llms-txt" | ||||||||||||||||||
|
Comment on lines
+13
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainHeader value likely incorrect; consider advertising llms.txt via Link header instead of X-Robots-Tag. X-Robots-Tag expects crawler directives (e.g., noindex, noai). Using "llms-txt" here is non-standard and probably ignored. To advertise a policy file, prefer a Link header (and ensure the file is served at the expected path). Apply one of these: Option A — advertise a policy file: [[headers]]
for = "/*"
[headers.values]
- X-Robots-Tag = "llms-txt"
+ Link = "</llms.txt>; rel=\"ai-policy\""Option B — if you meant to control AI crawlers: [[headers]]
for = "/*"
[headers.values]
- X-Robots-Tag = "llms-txt"
+ X-Robots-Tag = "noai, noimageai"Also verify the file is published at the root (e.g., web/public/llms.txt → https://site/llms.txt), not under src. Run to locate the file and confirm its publish path: 🏁 Script executed: #!/bin/bash
fd -HI --glob "llms.txt"Length of output: 48 Misuse of X-Robots-Tag; advertise AI policy via Link header
Option A — advertise your policy file via Link header: [[headers]]
for = "/*"
[headers.values]
- X-Robots-Tag = "llms-txt"
+ Link = "</llms.txt>; rel=\"ai-policy\""Option B — apply valid X-Robots-Tag directives: [[headers]]
for = "/*"
[headers.values]
- X-Robots-Tag = "llms-txt"
+ X-Robots-Tag = "noai, noimageai"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # v2.kleros.builders llms.txt | ||
|
|
||
| > Facilitates decentralized arbitration by allowing users to create, manage, and resolve dispute cases through crowdsourced juror consensus, rewarding jurors with cryptocurrency for coherent votes on disputes on the blockchain-based Kleros platform. | ||
|
|
||
| - [Kleros Dispute Dashboard](https://v2.kleros.builders): Dashboard for managing and viewing decentralized dispute cases, jurors, and court statistics on Kleros platform. | ||
| - [Kleros Dispute Cases](https://v2.kleros.builders/#/cases/display/1/desc/all): Provide a platform for viewing and managing decentralized dispute resolution cases. | ||
| - [Kleros Decentralized Courts](https://v2.kleros.builders/#/courts): Facilitate decentralized dispute resolution by allowing users to stake tokens, participate as jurors, and view court cases. | ||
| - [Kleros Jurors Leaderboard](https://v2.kleros.builders/#/jurors/1/desc/all): Display ranking and statistics of jurors based on coherent voting and rewards in the Kleros decentralized arbitration system. | ||
| - [Get PNK Token](https://v2.kleros.builders/#/get-pnk): Facilitates cross-chain swaps of PNK tokens typically between the Ethereum and Arbitrum networks. |
Uh oh!
There was an error while loading. Please reload this page.