From 4594536c5f9ed5fbfe489dfb9dbef6d23766d8e2 Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Tue, 5 Aug 2025 13:23:03 +0100 Subject: [PATCH 1/4] chore: changed contracts viem dependency as peer dependency --- contracts/package.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/contracts/package.json b/contracts/package.json index fc719eb7f..239c1665c 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -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", @@ -157,7 +157,14 @@ "@kleros/vea-contracts": "^0.6.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 + } } } From 5a81f9ecf9e4d182284fcf1a99f5aaadda81fbef Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Tue, 5 Aug 2025 13:24:53 +0100 Subject: [PATCH 2/4] feat: dispute kit helper --- contracts/deployments/disputeKitsViem.ts | 85 ++++++++++++++++++++++++ contracts/deployments/index.ts | 3 + contracts/scripts/getDisputeKits.ts | 33 +++++++++ 3 files changed, 121 insertions(+) create mode 100644 contracts/deployments/disputeKitsViem.ts create mode 100644 contracts/scripts/getDisputeKits.ts diff --git a/contracts/deployments/disputeKitsViem.ts b/contracts/deployments/disputeKitsViem.ts new file mode 100644 index 000000000..45ae23998 --- /dev/null +++ b/contracts/deployments/disputeKitsViem.ts @@ -0,0 +1,85 @@ +import { getContracts } from "./contractsViem"; +import { Abi, AbiEvent, getAbiItem, PublicClient } from "viem"; +import { DeploymentName } from "./utils"; + +export type DisputeKitContracts = ReturnType; +export type DisputeKit = + | NonNullable + | NonNullable + | NonNullable + | NonNullable + | null; +export type DisputeKitInfos = { + address: `0x${string}`; + contract: DisputeKit; + isGated: boolean; + isShutter: boolean; +}; +export type DisputeKitByIds = Record; + +const fetchDisputeKits = async (client: PublicClient, klerosCoreAddress: `0x${string}`, klerosCoreAbi: Abi) => { + const DisputeKitCreated = getAbiItem({ + abi: klerosCoreAbi, + name: "DisputeKitCreated", + }) as AbiEvent; + const logs = await client.getLogs({ + address: klerosCoreAddress, + event: DisputeKitCreated, + fromBlock: 0n, + toBlock: "latest", + }); + return Object.fromEntries( + logs + .filter((log) => { + const args = log.args as Record; + 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}`]) + ); +}; + +export const getDisputeKits = async (client: PublicClient, deployment: DeploymentName): Promise => { + const { klerosCore, disputeKitClassic, disputeKitShutter, disputeKitGated, disputeKitGatedShutter } = getContracts({ + publicClient: client, + deployment: deployment, + }); + + const isDefined = (kit: T): kit is NonNullable => 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, + }, + ]; + }) + ); +}; diff --git a/contracts/deployments/index.ts b/contracts/deployments/index.ts index 3479c5edf..c94968751 100644 --- a/contracts/deployments/index.ts +++ b/contracts/deployments/index.ts @@ -17,3 +17,6 @@ export * from "./utils"; // Contracts getters export { getContracts as getContractsEthers } from "./contractsEthers"; export { getContracts as getContractsViem } from "./contractsViem"; + +// Dispute kits getters +export { getDisputeKits as getDisputeKitsViem, type DisputeKitByIds, type DisputeKitInfos } from "./disputeKitsViem"; diff --git a/contracts/scripts/getDisputeKits.ts b/contracts/scripts/getDisputeKits.ts new file mode 100644 index 000000000..32f2b18eb --- /dev/null +++ b/contracts/scripts/getDisputeKits.ts @@ -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); + }); +} From 4c2277baabaa898fbf8af75b91448472241f069c Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Tue, 5 Aug 2025 13:29:23 +0100 Subject: [PATCH 3/4] chore: override viem resolution from viem@npm:2.x to npm:^2.23.2 because of @wagmi/cli --- package.json | 3 +- yarn.lock | 367 +++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 345 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index 6c9deb2d4..01e9468a1 100644 --- a/package.json +++ b/package.json @@ -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" }, "scripts": { "check-prerequisites": "scripts/check-prerequisites.sh", diff --git a/yarn.lock b/yarn.lock index 166200247..0b2eacdf0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3065,6 +3065,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/aix-ppc64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/aix-ppc64@npm:0.25.8" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + "@esbuild/android-arm64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/android-arm64@npm:0.19.12" @@ -3079,6 +3086,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/android-arm64@npm:0.25.8" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/android-arm@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/android-arm@npm:0.19.12" @@ -3093,6 +3107,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/android-arm@npm:0.25.8" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + "@esbuild/android-x64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/android-x64@npm:0.19.12" @@ -3107,6 +3128,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-x64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/android-x64@npm:0.25.8" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + "@esbuild/darwin-arm64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/darwin-arm64@npm:0.19.12" @@ -3121,6 +3149,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/darwin-arm64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/darwin-arm64@npm:0.25.8" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/darwin-x64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/darwin-x64@npm:0.19.12" @@ -3135,6 +3170,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/darwin-x64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/darwin-x64@npm:0.25.8" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + "@esbuild/freebsd-arm64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/freebsd-arm64@npm:0.19.12" @@ -3149,6 +3191,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/freebsd-arm64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/freebsd-arm64@npm:0.25.8" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/freebsd-x64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/freebsd-x64@npm:0.19.12" @@ -3163,6 +3212,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/freebsd-x64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/freebsd-x64@npm:0.25.8" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/linux-arm64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/linux-arm64@npm:0.19.12" @@ -3177,6 +3233,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-arm64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/linux-arm64@npm:0.25.8" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/linux-arm@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/linux-arm@npm:0.19.12" @@ -3191,6 +3254,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-arm@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/linux-arm@npm:0.25.8" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + "@esbuild/linux-ia32@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/linux-ia32@npm:0.19.12" @@ -3205,6 +3275,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-ia32@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/linux-ia32@npm:0.25.8" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + "@esbuild/linux-loong64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/linux-loong64@npm:0.19.12" @@ -3219,6 +3296,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-loong64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/linux-loong64@npm:0.25.8" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + "@esbuild/linux-mips64el@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/linux-mips64el@npm:0.19.12" @@ -3233,6 +3317,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-mips64el@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/linux-mips64el@npm:0.25.8" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + "@esbuild/linux-ppc64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/linux-ppc64@npm:0.19.12" @@ -3247,6 +3338,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-ppc64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/linux-ppc64@npm:0.25.8" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + "@esbuild/linux-riscv64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/linux-riscv64@npm:0.19.12" @@ -3261,6 +3359,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-riscv64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/linux-riscv64@npm:0.25.8" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + "@esbuild/linux-s390x@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/linux-s390x@npm:0.19.12" @@ -3275,6 +3380,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-s390x@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/linux-s390x@npm:0.25.8" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + "@esbuild/linux-x64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/linux-x64@npm:0.19.12" @@ -3289,6 +3401,20 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-x64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/linux-x64@npm:0.25.8" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-arm64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/netbsd-arm64@npm:0.25.8" + conditions: os=netbsd & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/netbsd-x64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/netbsd-x64@npm:0.19.12" @@ -3303,6 +3429,20 @@ __metadata: languageName: node linkType: hard +"@esbuild/netbsd-x64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/netbsd-x64@npm:0.25.8" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-arm64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/openbsd-arm64@npm:0.25.8" + conditions: os=openbsd & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/openbsd-x64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/openbsd-x64@npm:0.19.12" @@ -3317,6 +3457,20 @@ __metadata: languageName: node linkType: hard +"@esbuild/openbsd-x64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/openbsd-x64@npm:0.25.8" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openharmony-arm64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/openharmony-arm64@npm:0.25.8" + conditions: os=openharmony & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/sunos-x64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/sunos-x64@npm:0.19.12" @@ -3331,6 +3485,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/sunos-x64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/sunos-x64@npm:0.25.8" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + "@esbuild/win32-arm64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/win32-arm64@npm:0.19.12" @@ -3345,6 +3506,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-arm64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/win32-arm64@npm:0.25.8" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/win32-ia32@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/win32-ia32@npm:0.19.12" @@ -3359,6 +3527,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-ia32@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/win32-ia32@npm:0.25.8" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + "@esbuild/win32-x64@npm:0.19.12": version: 0.19.12 resolution: "@esbuild/win32-x64@npm:0.19.12" @@ -3373,6 +3548,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-x64@npm:0.25.8": + version: 0.25.8 + resolution: "@esbuild/win32-x64@npm:0.25.8" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": version: 4.4.0 resolution: "@eslint-community/eslint-utils@npm:4.4.0" @@ -5955,7 +6137,7 @@ __metadata: "@types/mocha": "npm:^10.0.10" "@types/node": "npm:^20.17.6" "@types/sinon": "npm:^17.0.4" - "@wagmi/cli": "npm:^2.2.0" + "@wagmi/cli": "npm:^2.3.2" abitype: "npm:^0.10.3" chai: "npm:^4.5.0" dotenv: "npm:^16.6.1" @@ -5986,7 +6168,11 @@ __metadata: ts-node: "npm:^10.9.2" typechain: "npm:^8.3.2" typescript: "npm:^5.6.3" - viem: "npm:^2.24.1" + peerDependencies: + viem: ^2.24.1 + peerDependenciesMeta: + viem: + optional: false languageName: unknown linkType: soft @@ -10999,6 +11185,39 @@ __metadata: languageName: node linkType: hard +"@wagmi/cli@npm:^2.3.2": + version: 2.3.2 + resolution: "@wagmi/cli@npm:2.3.2" + dependencies: + abitype: "npm:^1.0.4" + bundle-require: "npm:^5.1.0" + cac: "npm:^6.7.14" + change-case: "npm:^5.4.4" + chokidar: "npm:4.0.1" + dedent: "npm:^0.7.0" + dotenv: "npm:^16.3.1" + dotenv-expand: "npm:^10.0.0" + esbuild: "npm:~0.25.4" + escalade: "npm:3.2.0" + fdir: "npm:^6.1.1" + nanospinner: "npm:1.2.2" + pathe: "npm:^1.1.2" + picocolors: "npm:^1.0.0" + picomatch: "npm:^3.0.0" + prettier: "npm:^3.0.3" + viem: "npm:2.x" + zod: "npm:^3.22.2" + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + bin: + wagmi: dist/esm/cli.js + checksum: 10/85c6b1d4960c6d080d067f7dbac34e6a27d822690d33ef6c131b7714f6be13c5e04b2dd506fce38992ee6183ebe0fb48160e30f4cf901a27ccf34fd1b2dae529 + languageName: node + linkType: hard + "@wagmi/connectors@npm:5.7.11, @wagmi/connectors@npm:>=5.7.11, @wagmi/connectors@npm:^5.7.11": version: 5.7.11 resolution: "@wagmi/connectors@npm:5.7.11" @@ -13621,6 +13840,17 @@ __metadata: languageName: node linkType: hard +"bundle-require@npm:^5.1.0": + version: 5.1.0 + resolution: "bundle-require@npm:5.1.0" + dependencies: + load-tsconfig: "npm:^0.2.3" + peerDependencies: + esbuild: ">=0.18" + checksum: 10/735e0220055b9bdac20bea48ec1e10dc3a205232c889ef54767900bebdc721959c4ccb221e4ea434d7ddcd693a8a4445c3d0598e4040ee313ce0ac3aae3e6178 + languageName: node + linkType: hard + "busboy@npm:1.6.0, busboy@npm:^1.6.0": version: 1.6.0 resolution: "busboy@npm:1.6.0" @@ -17150,6 +17380,95 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:~0.25.4": + version: 0.25.8 + resolution: "esbuild@npm:0.25.8" + dependencies: + "@esbuild/aix-ppc64": "npm:0.25.8" + "@esbuild/android-arm": "npm:0.25.8" + "@esbuild/android-arm64": "npm:0.25.8" + "@esbuild/android-x64": "npm:0.25.8" + "@esbuild/darwin-arm64": "npm:0.25.8" + "@esbuild/darwin-x64": "npm:0.25.8" + "@esbuild/freebsd-arm64": "npm:0.25.8" + "@esbuild/freebsd-x64": "npm:0.25.8" + "@esbuild/linux-arm": "npm:0.25.8" + "@esbuild/linux-arm64": "npm:0.25.8" + "@esbuild/linux-ia32": "npm:0.25.8" + "@esbuild/linux-loong64": "npm:0.25.8" + "@esbuild/linux-mips64el": "npm:0.25.8" + "@esbuild/linux-ppc64": "npm:0.25.8" + "@esbuild/linux-riscv64": "npm:0.25.8" + "@esbuild/linux-s390x": "npm:0.25.8" + "@esbuild/linux-x64": "npm:0.25.8" + "@esbuild/netbsd-arm64": "npm:0.25.8" + "@esbuild/netbsd-x64": "npm:0.25.8" + "@esbuild/openbsd-arm64": "npm:0.25.8" + "@esbuild/openbsd-x64": "npm:0.25.8" + "@esbuild/openharmony-arm64": "npm:0.25.8" + "@esbuild/sunos-x64": "npm:0.25.8" + "@esbuild/win32-arm64": "npm:0.25.8" + "@esbuild/win32-ia32": "npm:0.25.8" + "@esbuild/win32-x64": "npm:0.25.8" + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-arm64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-arm64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/openharmony-arm64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 10/9897411732768e652d90fa5dfadae965e8f420d24e5f23fa0604331a1441769e2c7ee4e41ca53e926f1fb51a53af52e01fc9070fdc1a4edf3e9ec9208ee41273 + languageName: node + linkType: hard + "escalade@npm:3.2.0": version: 3.2.0 resolution: "escalade@npm:3.2.0" @@ -33829,28 +34148,6 @@ __metadata: languageName: node linkType: hard -"viem@npm:2.x, viem@npm:^2.1.1": - version: 2.21.50 - resolution: "viem@npm:2.21.50" - dependencies: - "@noble/curves": "npm:1.6.0" - "@noble/hashes": "npm:1.5.0" - "@scure/bip32": "npm:1.5.0" - "@scure/bip39": "npm:1.4.0" - abitype: "npm:1.0.6" - isows: "npm:1.0.6" - ox: "npm:0.1.2" - webauthn-p256: "npm:0.0.10" - ws: "npm:8.18.0" - peerDependencies: - typescript: ">=5.0.4" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/6525c7dfa679d48759d50a31751b1d608f055e4396506c4f48550b81655b75b53978bd2dbe39099ac200f549c7429261d3478810dbd63b36df6a0afd77f69931 - languageName: node - linkType: hard - "viem@npm:>=2.23.11, viem@npm:^2.22.21, viem@npm:^2.23.10, viem@npm:^2.24.1": version: 2.24.1 resolution: "viem@npm:2.24.1" @@ -33872,6 +34169,28 @@ __metadata: languageName: node linkType: hard +"viem@npm:^2.1.1": + version: 2.21.50 + resolution: "viem@npm:2.21.50" + dependencies: + "@noble/curves": "npm:1.6.0" + "@noble/hashes": "npm:1.5.0" + "@scure/bip32": "npm:1.5.0" + "@scure/bip39": "npm:1.4.0" + abitype: "npm:1.0.6" + isows: "npm:1.0.6" + ox: "npm:0.1.2" + webauthn-p256: "npm:0.0.10" + ws: "npm:8.18.0" + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/6525c7dfa679d48759d50a31751b1d608f055e4396506c4f48550b81655b75b53978bd2dbe39099ac200f549c7429261d3478810dbd63b36df6a0afd77f69931 + languageName: node + linkType: hard + "viem@npm:^2.21.59": version: 2.22.17 resolution: "viem@npm:2.22.17" From efb2aadc10d903026ce8bef2ae351c1d3c16c8be Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Tue, 5 Aug 2025 13:35:42 +0100 Subject: [PATCH 4/4] chore: changelog --- contracts/CHANGELOG.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/contracts/CHANGELOG.md b/contracts/CHANGELOG.md index 2e571aa14..bad94a295 100644 --- a/contracts/CHANGELOG.md +++ b/contracts/CHANGELOG.md @@ -4,7 +4,17 @@ 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.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 +117,7 @@ The format is based on [Common Changelog](https://common-changelog.org/). ## [0.8.1] - 2025-04-10 +[0.12.0]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.12.0 [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