-
Notifications
You must be signed in to change notification settings - Fork 51
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 17 commits
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
578d4d5
42f721c
6b8970a
592243f
643d561
33f84ad
72062e7
487c5e9
697dac8
87d2a70
e5aa70c
81f8290
1193c19
d6cc3be
a3c9f91
3342328
574f8c9
e6b8207
4128c77
47e1280
e67c533
cf2dcc7
4330108
318d311
a6d8672
e40034f
a2c372d
16e7af5
59a67a0
ac5b45e
4553827
9d8c385
9d72238
cf44adf
58b3ffa
e16934e
eca8874
df44324
31d9065
46de145
5e2741f
117cfb0
ba50923
9197bbd
4cdb9f9
c843eba
251e88c
4974dca
01234cb
927cede
9f72187
2d9c117
997bd55
ec2fe4b
dba605c
1043b4d
89766af
94ed78b
2946c1e
d266a61
f196723
f862532
05ebe69
d47ed4e
2c6e681
2dacbc7
f8c4d56
43add77
911cc58
4a364cc
7bf37ff
46da5a2
275fbfc
3b0d24b
e93f815
b5211f9
88abbe7
694f224
16917fc
53a2239
279357a
12b8303
ab34d7a
9d0e3e9
33680e1
68ac08e
9c06a36
e254a96
8aa5a8b
47b9962
c07ce55
1fa9cb7
965013e
eecb8d0
4948b47
0d279e8
497ee11
191f11d
26b95cc
d2b66d9
90393da
39b2f1a
cd83b20
b305da0
e39ea4b
a9ffa87
e75be45
7062815
786388c
f7eb2df
784ba71
2df9266
3e374bb
345a6df
d45a1b9
e340e49
7985eb7
2b85368
d06a34d
dad7b1a
b9f762b
c536ad8
14a31bb
6e234cc
a68a03e
f17cab9
9bc9a4f
24bd92b
c1959ee
1ceddde
f41be59
1a42b7a
80c74c7
052a8b4
a0147be
68983aa
b272a2d
a059486
9ff7f07
5559b1f
f2cf280
e2e8200
6258570
33c0f7b
4c01c3c
7973fa4
d944e19
345fc53
00acfd4
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%2Fkleros-v2-contracts@0.13.0 | ||||||||||
| [0.12.0]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.12.0 | ||||||||||
|
Comment on lines
+174
to
+175
Contributor
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%2Fkleros-v2-contracts@0.13.0
+<!-- [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%2Fkleros-v2-contracts@0.13.0"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%2Fkleros-v2-contracts@0.13.0
+<!-- [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%2Fkleros-v2-contracts@0.11.0 | ||||||||||
| [0.10.0]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.10.0 | ||||||||||
| [0.9.4]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.9.4 | ||||||||||
|
|
||||||||||
| 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
Contributor
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
Contributor
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
Contributor
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 | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
| "peerDependencies": { | |
| "viem": "^2.24.1" | |
| }, | |
| "peerDependenciesMeta": { | |
| "viem": { | |
| "optional": false | |
| } | |
| } | |
| "peerDependencies": { | |
| - "viem": "^2.24.1" | |
| + "viem": "^2.23.0" | |
| }, | |
| "peerDependenciesMeta": { | |
| "viem": { | |
| "optional": false | |
| } | |
| } |
🤖 Prompt for AI Agents
In contracts/package.json around lines 162 to 169, the peer dependency version
for "viem" (^2.24.1) conflicts with the root workspace resolution (^2.23.2),
causing warnings and potential inconsistent behavior. To fix this, update the
root package.json to use "viem" version ^2.24.1 to match the peer dependency, or
alternatively, relax the peer dependency in this package.json to ^2.23.2 if you
must stay on that version, understanding this may limit access to newer
features.
| 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
Contributor
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
Contributor
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 |
||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.