Skip to content

Commit 92852da

Browse files
authored
Merge branch 'dev' into feat/gated-dk-address-validation
2 parents f1fe7c9 + e3ed3c9 commit 92852da

File tree

86 files changed

+49426
-2267
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+49426
-2267
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ contracts/tenderly.yaml
1111

1212
*/.DS_Store
1313
*/*.log
14+
15+
.env*
16+
.flaskenv*
17+
!.env.project
18+
!.env.vault

.github/workflows/contracts-testing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ jobs:
4646
- name: Set up corepack (for yarn)
4747
run: |
4848
corepack enable
49-
corepack prepare yarn@4.5.1 --activate
50-
yarn set version 4.5.1
49+
corepack prepare yarn@4.9.2 --activate
50+
yarn set version 4.9.2
5151
5252
- name: Setup Node.js environment
5353
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,3 +202,8 @@ subgraph/*/contracts/*
202202

203203
# Local Netlify folder
204204
.netlify
205+
206+
.env*
207+
.flaskenv*
208+
!.env.project
209+
!.env.vault

contracts/.solcover.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const shell = require("shelljs");
66

77
module.exports = {
88
istanbulReporter: ["lcov"],
9+
configureYulOptimizer: true,
910
onCompileComplete: async function (_config) {
1011
await run("typechain");
1112
},

contracts/CHANGELOG.md

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Changelog
2+
3+
All notable changes to this package will be documented in this file.
4+
5+
The format is based on [Common Changelog](https://common-changelog.org/).
6+
7+
## [0.12.0] - 2025-08-05
8+
9+
### Changed
10+
11+
- **Breaking:** Make `viem` a peer dependency, it should be provided by the consuming package ([`4594536`](https://github.com/kleros/kleros-v2/commit/4594536c))
12+
13+
### Added
14+
15+
- 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))
16+
17+
## [0.11.0] - 2025-08-02
18+
19+
### Changed
20+
21+
- **Breaking:** Add an extra wNative parameter to the initializer of `KlerosCoreBase` and `DisputeKitBase` and their descendants ([#2041](https://github.com/kleros/kleros-v2/issues/2041))
22+
- **Breaking:** Add an extra wNative parameter to the constructor of `KlerosGovernor` ([#2041](https://github.com/kleros/kleros-v2/issues/2041))
23+
- **Breaking:** Upgrade Mainnet Beta to v0.11.0 ([`ea9dcc95`](https://github.com/kleros/kleros-v2/commit/ea9dcc95))
24+
- **Breaking:** Upgrade Devnet and Testnet to v0.11.0 ([`b9e847d`](https://github.com/kleros/kleros-v2/commit/b9e847d9))
25+
- Fallback to sending wETH if sending ETH fails ([#2041](https://github.com/kleros/kleros-v2/issues/2041))
26+
- Automate `SortitionModule.withdrawLeftoverPNK()` using the keeper bot ([`97ba58a`](https://github.com/kleros/kleros-v2/commit/97ba58a))
27+
- Upgrade Testnet to v0.10.0 ([#2058](https://github.com/kleros/kleros-v2/issues/2058))
28+
- Support the Gated and Shutter Gated dispute kits by the keeper bot ([`026fe83`](https://github.com/kleros/kleros-v2/commit/026fe83))
29+
- Support the Gated and Shutter Gated dispute kits by the contracts getter tests ([`2166ee0`](https://github.com/kleros/kleros-v2/commit/2166ee0))
30+
- Draw jurors with a more number of iterations to account for ineligible jurors by the keeper bot ([`6eb5bc6`](https://github.com/kleros/kleros-v2/commit/6eb5bc6))
31+
- Bump `@shutter-network/shutter-sdk` to 0.0.2 ([#2049](https://github.com/kleros/kleros-v2/issues/2049))
32+
33+
### Added
34+
35+
- **Breaking:** Add new dispute kits to Mainnet Beta: Shutter, Gated, Gated Shutter ([`ea9dcc95`](https://github.com/kleros/kleros-v2/commit/ea9dcc95))
36+
- **Breaking:** Add new dispute kits to Testnet: Shutter, Gated, Gated Shutter ([`b9e847d`](https://github.com/kleros/kleros-v2/commit/b9e847d9))
37+
38+
### Fixed
39+
40+
- Do not push address(0) in `DisputeKitBase.round.votes` during `draw()` when there is no staked juror in the court ([#2059](https://github.com/kleros/kleros-v2/issues/2059))
41+
- Reduce Neo core contract size below limit by 144 bytes by extracting internal functions for repeated code and by making the `appealPeriod()` view external. ([`4a84534`](https://github.com/kleros/kleros-v2/commit/4a845346))
42+
43+
## [0.10.0] - 2025-07-20
44+
45+
### Changed
46+
47+
- **Breaking:** Redeploy the Devnet contracts ([`b8a2a15`](https://github.com/kleros/kleros-v2/commit/b8a2a15))
48+
- **Breaking:** Update the Devnet contract artifacts, add getter for the new Shutter, Gated and Gated Shutter dispute kits ([`5ef5f23`](https://github.com/kleros/kleros-v2/commit/5ef5f23))
49+
- **Breaking**: Make `KlerosCoreBase.draw()` return the number of drawn jurors ([`54d83a7`](https://github.com/kleros/kleros-v2/commit/54d83a7))
50+
- **Breaking**: Make `SortitionModule.penalizeStake()` return `(uint256 pnkBalance, uint256 availablePenalty)` ([#2004](https://github.com/kleros/kleros-v2/issues/2004))
51+
- **Breaking**: Split SortitionModuleBase.setStake() into 2 functions: `validateStake()` and `setStake()` ([#2004](https://github.com/kleros/kleros-v2/issues/2004))
52+
- Avoid unnecessary calls `KlerosCoreBase.draw()` by the keeper bot when no juror is available ([`54d83a7`](https://github.com/kleros/kleros-v2/commit/54d83a7))
53+
- Migrate the contracts verification tooling to the etherscan v2 API ([`b8a2a15`](https://github.com/kleros/kleros-v2/commit/b8a2a15))
54+
- Bump contract Solidity version to v0.8.28 ([`6e535cc`](https://github.com/kleros/kleros-v2/commit/6e535cc))
55+
- Bump contract dependencies, `hardhat` to v2.26.0 `node` to v20, `yarn` to 4.9.2 ([`6e535cc`](https://github.com/kleros/kleros-v2/commit/6e535cc))
56+
- Deprecate struct field `SortitionModuleBase.SortitionSumTree.alreadyTransferred` ([#2004](https://github.com/kleros/kleros-v2/issues/2004))
57+
- Deprecate state variable `SortitionModuleBase.latestDelayedStakeIndex` ([#2004](https://github.com/kleros/kleros-v2/issues/2004))
58+
59+
### Added
60+
61+
- Add Gated dispute kit with support a dynamic token address for the Gated dispute kit using the dispute `extraData` ([#2045](https://github.com/kleros/kleros-v2/issues/2045))
62+
- Add Shutter Gated dispute kit ([#2045](https://github.com/kleros/kleros-v2/issues/2045))
63+
- Add public functions to `SortitionModuleBase` `getJurorLeftoverPNK(address _juror)` and `withdrawLeftoverPNK(address _account)` ([#2004](https://github.com/kleros/kleros-v2/issues/2004))
64+
- Add a permissioned function to KlerosCoreBase `transferBySortitionModule(address _account, uint256 _amount)`
65+
- Add a public boolean `DisputeKitBase.coreDisputeIDToActive` keyed by `coreDisputeID` ([#2039](https://github.com/kleros/kleros-v2/issues/2039))
66+
- Support for the Shutter API token by the keeper bot using the environment variable `SHUTTER_API_KEY` ([`f999611`](https://github.com/kleros/kleros-v2/commit/f999611))
67+
68+
### Removed
69+
70+
- Remove instant staking logic ([#2004](https://github.com/kleros/kleros-v2/issues/2004))
71+
- Remove the parameter `_alreadyTransferred` to the staking functions. No external interfaces impact. ([#2004](https://github.com/kleros/kleros-v2/issues/2004))
72+
73+
### Fixed
74+
75+
- Do not prevent a juror from being drawn if their entire stake is already locked ([#2004](https://github.com/kleros/kleros-v2/issues/2004))
76+
- Prevent stake corruption when delayed stakes move existing stakes to another court and juror is drawn ([#2004](https://github.com/kleros/kleros-v2/issues/2004))
77+
- Ensure that a dispute does belong to the right dispute kit ([#2039](https://github.com/kleros/kleros-v2/issues/2039))
78+
- Reset `dispute.jumped` in dispute kit `createDispute()` ([#2039](https://github.com/kleros/kleros-v2/issues/2039))
79+
80+
## [0.9.4] - 2025-06-23
81+
82+
### Changed
83+
84+
- Upgrade the Beta contracts ([`a72c450`](https://github.com/kleros/kleros-v2/commit/a72c450))
85+
- Upgrade the Testnet contracts ([`05c5b3d`](https://github.com/kleros/kleros-v2/commit/05c5b3d))
86+
- Upgrade the Devnet contracts ([`019cfd9`](https://github.com/kleros/kleros-v2/commit/019cfd9))
87+
88+
### Added
89+
90+
- Add a view function `KlerosCoreBase.getPnkAtStakePerJuror(uint256 _disputeID, uint256 _round)`
91+
- Add a public boolean `DisputeKitBase.alreadyDrawn` keyed by `localDisputeID`, `localRoundID` and `drawnAddress`
92+
93+
### Fixed
94+
95+
- Stop calling `getRoundInfo()` from the mutating function `DisputeKitBase._postDrawCheck()` ([`524a2dc`](https://github.com/kleros/kleros-v2/commit/524a2dc))
96+
- Restore the broken dispute kit storage layout on Testnet ([`1d2e62a`](https://github.com/kleros/kleros-v2/commit/1d2e62a))
97+
- Fix a typo in SafeERC20.sol ([#1960](https://github.com/kleros/kleros-v2/issues/1960))
98+
99+
### Uncategorized
100+
101+
## [0.9.3] - 2025-04-18
102+
103+
### Changed
104+
105+
- **Breaking change**: Bundle the package for both CJS and ESM, it changes the package entry point ([`c132303`](https://github.com/kleros/kleros-v2/commit/c132303))
106+
- Pass the commit and appeal periods quicker when possible ([#1955](https://github.com/kleros/kleros-v2/issues/1955))
107+
108+
### Added
109+
110+
- Add contracts getter for Viem ([`1aeb0a2`](https://github.com/kleros/kleros-v2/commit/1aeb0a2))
111+
- Add contract getter for EtherJS, export deployment files ([`692c83f`](https://github.com/kleros/kleros-v2/commit/692c83f))
112+
- New DisputeKitBase view function `isAppealFunded()` ([#1955](https://github.com/kleros/kleros-v2/issues/1955))
113+
114+
### Fixed
115+
116+
- Fix typo in custom error `StakingNotPossibleInThisCourt` ([#1956](https://github.com/kleros/kleros-v2/issues/1956))
117+
118+
## [0.8.1] - 2025-04-10
119+
120+
[0.12.0]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.12.0
121+
[0.11.0]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.11.0
122+
[0.10.0]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.10.0
123+
[0.9.4]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.9.4
124+
[0.9.3]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.9.3
125+
[0.8.1]: https://github.com/kleros/kleros-v2/releases/tag/@kleros%2Fkleros-v2-contracts@0.8.1

0 commit comments

Comments
 (0)