Skip to content

Commit 0b88e87

Browse files
committed
Merge branch 'dev' into chore(hardhat)/hardhat-ether-version-update
2 parents f7b7ac8 + c3599ac commit 0b88e87

File tree

423 files changed

+79317
-21542
lines changed

Some content is hidden

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

423 files changed

+79317
-21542
lines changed

.yarn/releases/yarn-4.0.2.cjs

Lines changed: 0 additions & 893 deletions
This file was deleted.

.yarn/releases/yarn-4.5.1.cjs

Lines changed: 934 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ enableGlobalCache: false
44

55
nodeLinker: node-modules
66

7-
yarnPath: .yarn/releases/yarn-4.0.2.cjs
7+
yarnPath: .yarn/releases/yarn-4.5.1.cjs

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
</p>
1010

1111
<p align="center">
12-
<a href="https://app.netlify.com/sites/kleros-v2/deploys"><img src="https://api.netlify.com/api/v1/badges/86d94ae8-f655-46a4-a859-d68696173f3a/deploy-status" alt="Netlify Build Status"></a>
13-
<a href="https://app.netlify.com/sites/kleros-v2-university/deploys"><img src="https://api.netlify.com/api/v1/badges/085e1305-e434-4d36-91a4-88e8cbc3aa46/deploy-status" alt="Netlify Build Status"></a>
14-
<a href="https://www.gitpoap.io/gh/kleros/kleros-v2"><img src="https://public-api.gitpoap.io/v1/repo/kleros/kleros-v2/badge" alt="GitPoap badge"></a>
15-
</br>
1612
<a href="https://api.securityscorecards.dev/projects/github.com/kleros/kleros-v2"><img src="https://api.securityscorecards.dev/projects/github.com/kleros/kleros-v2/badge" alt="OpenSSF Scorecard"></a>
1713
<a href="https://sonarcloud.io/summary/new_code?id=kleros_kleros-v2"><img src="https://sonarcloud.io/api/project_badges/measure?project=kleros_kleros-v2&metric=security_rating" alt="Security Rating"></a>
1814
<a href="https://sonarcloud.io/summary/new_code?id=kleros_kleros-v2"><img src="https://sonarcloud.io/api/project_badges/measure?project=kleros_kleros-v2&metric=alert_status" alt="Quality Gate Status"></a>
@@ -24,6 +20,8 @@
2420
<a href="https://conventionalcommits.org"><img src="https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg" alt="Conventional Commits"></a>
2521
<a href="http://commitizen.github.io/cz-cli/"><img src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg" alt="Commitizen Friendly"></a>
2622
<a href="https://github.com/prettier/prettier"><img src="https://img.shields.io/badge/styled_with-prettier-ff69b4.svg" alt="Styled with Prettier"></a>
23+
</br>
24+
<a href="https://www.gitpoap.io/gh/kleros/kleros-v2"><img src="https://public-api.gitpoap.io/v1/repo/kleros/kleros-v2/badge" alt="GitPoap badge"></a>
2725
</p>
2826

2927
---
@@ -34,7 +32,7 @@
3432

3533
##### 🗃️ [Subgraph endpoints](subgraph/README.md#deployments)
3634

37-
##### ⚖️ [Web frontend](https://app.netlify.com/sites/kleros-v2/deploys)
35+
##### ⚖️ [Web frontend](web/README.md#court-deployments)
3836

3937
## Content
4038

contracts/README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments
1111
#### Arbitrum One
1212

1313
- [DisputeKitClassicNeo: proxy](https://arbiscan.io/address/0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9), [implementation](https://arbiscan.io/address/0x86Ac67e5550F837a650B4B0Cd4778D4293a2bDe3)
14-
- [DisputeResolverNeo](https://arbiscan.io/address/0x95eCE455bD817D6adB92F2383617d36eBE10D6EB)
14+
- [DisputeResolverNeo](https://arbiscan.io/address/0x3645F9e08D80E47c82aD9E33fCB4EA703822C831)
1515
- [DisputeTemplateRegistry: proxy](https://arbiscan.io/address/0x52c9f5634361eD3641016e5d9783310f9EFf9e25), [implementation](https://arbiscan.io/address/0x4Ce87329d40f15509D5F9bF4D9Ce1A081A80CeFb)
1616
- [EvidenceModule: proxy](https://arbiscan.io/address/0xe62B776498F48061ef9425fCEf30F3d1370DB005), [implementation](https://arbiscan.io/address/0x827411b3e98bAe8c441efBf26842A1670f8f378F)
1717
- [KlerosCoreNeo: proxy](https://arbiscan.io/address/0xCd415C03dfa85B02646C7e2977F22a480c4354F1), [implementation](https://arbiscan.io/address/0x4DD8B69958eF1D7d5dA9347E9d9F57ADFC3dc284)
@@ -20,6 +20,7 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments
2020
- [PolicyRegistry: proxy](https://arbiscan.io/address/0x26c1980120F1C82cF611D666CE81D2b54d018547), [implementation](https://arbiscan.io/address/0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da)
2121
- [RandomizerRNG: proxy](https://arbiscan.io/address/0xC3dB344755b15c8Edfd834db79af4f8860029FB4), [implementation](https://arbiscan.io/address/0xA995C172d286f8F4eE137CC662e2844E59Cf4836)
2222
- [SortitionModuleNeo: proxy](https://arbiscan.io/address/0x614498118850184c62f82d08261109334bFB050f), [implementation](https://arbiscan.io/address/0xf327200420F21BAafce8F1C03B1EEdF926074B95)
23+
- [TransactionBatcher](https://arbiscan.io/address/0xBC5ef8d9ad307154447AE148c088f083d2dEa4eF)
2324

2425
### Official Testnet
2526

@@ -65,20 +66,22 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments
6566

6667
#### Arbitrum Sepolia
6768

68-
- [ArbitrableExample](https://sepolia.arbiscan.io/address/0xe48488AE09022a4F32c528d7EbfF92870225AcBf)
69+
- [ArbitrableExample](https://sepolia.arbiscan.io/address/0x3Eae72F076c68F5c354C73abC33EAA291ef1b2Fa)
6970
- [BlockHashRNG](https://sepolia.arbiscan.io/address/0x56d6d65Fe202232714794B5D5e4ed9894466Ee01)
7071
- [DAI](https://sepolia.arbiscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5)
7172
- [DAIFaucet](https://sepolia.arbiscan.io/address/0xB5b39A1bcD2D7097A8824B3cC18Ebd2dFb0D9B5E)
7273
- [DisputeKitClassic: proxy](https://sepolia.arbiscan.io/address/0x9426F127116C3652A262AE1eA48391AC8F44D35b), [implementation](https://sepolia.arbiscan.io/address/0x692CC78F2570181FFB99297965FeAA8352ab12E8)
7374
- [DisputeKitClassicNeo: proxy](https://sepolia.arbiscan.io/address/0xd40aA608801a639E292e10C235B90488D04070b1), [implementation](https://sepolia.arbiscan.io/address/0xE636AB278fBfc8712E807c589A362dc2396d2d2F)
7475
- [DisputeKitClassicUniversity: proxy](https://sepolia.arbiscan.io/address/0xDaE66157D72Baa099cd63a833c353776206feea4), [implementation](https://sepolia.arbiscan.io/address/0xf36fa321Bb64b6E39f5DA3dbb053ccE63D077f8B)
75-
- [DisputeResolver](https://sepolia.arbiscan.io/address/0xB8B36CC43f852f9F0484f53Eb38CaBBA28a81bF6)
76-
- [DisputeResolverNeo](https://sepolia.arbiscan.io/address/0xaBC213522c01354DC0Db2B3E89bDe0FCF44Acac6)
77-
- [DisputeResolverUniversity](https://sepolia.arbiscan.io/address/0x102Ba9488Df13842612e777aB16144cCACD38194)
78-
- [DisputeTemplateRegistry: proxy](https://sepolia.arbiscan.io/address/0x596D3B09E684D62217682216e9b7a0De75933391), [implementation](https://sepolia.arbiscan.io/address/0xc53b813ed94AaEb6F5518D60bf6a8109954bE3f6)
76+
- [DisputeResolver](https://sepolia.arbiscan.io/address/0xCE3d5F83d9da70d60ab9cee8b644a18EF3671E61)
77+
- [DisputeResolverNeo](https://sepolia.arbiscan.io/address/0xB73B124f2939959676509c37Ab6a41C8Ab4aDA1C)
78+
- [DisputeResolverRuler](https://sepolia.arbiscan.io/address/0x199893232ECC74cC7898B24b5Ff58d613029f6B7)
79+
- [DisputeResolverUniversity](https://sepolia.arbiscan.io/address/0x88d793dA6e88Ebd58136A1e1483cc4cf0D915ca4)
80+
- [DisputeTemplateRegistry: proxy](https://sepolia.arbiscan.io/address/0x596D3B09E684D62217682216e9b7a0De75933391), [implementation](https://sepolia.arbiscan.io/address/0xE00A43d3c3321A0e210F2F8bE2F3F75eC8a4951E)
7981
- [EvidenceModule: proxy](https://sepolia.arbiscan.io/address/0x57fd453FB0d16f8ca174E7386102D7170E17Be09), [implementation](https://sepolia.arbiscan.io/address/0x05AD81f245209b7f91885fd96e57c9da90554824)
8082
- [KlerosCore: proxy](https://sepolia.arbiscan.io/address/0xA54e7A16d7460e38a8F324eF46782FB520d58CE8), [implementation](https://sepolia.arbiscan.io/address/0x91a373BBdE0532F86410682F362e2Cf685e95085)
8183
- [KlerosCoreNeo: proxy](https://sepolia.arbiscan.io/address/0x26bf077037550e437605F07e25EfcAd510715C3A), [implementation](https://sepolia.arbiscan.io/address/0x3bE96b7eAF6A3640DBa1f7CE58776D5b790B74CB)
84+
- [KlerosCoreRuler: proxy](https://sepolia.arbiscan.io/address/0x7ffcd32A0521645E6fCFd071A68F0e26957775a5), [implementation](https://sepolia.arbiscan.io/address/0x97e30A3A940856A3913437912C746f1aF6ccC76c)
8285
- [KlerosCoreUniversity: proxy](https://sepolia.arbiscan.io/address/0x10BaAFDe8B4d3164CA781571e2F1513317f57980), [implementation](https://sepolia.arbiscan.io/address/0x8466ab62E7c923e8F2E61d0358C495676D6F939b)
8386
- [KlerosV2NeoEarlyUser](https://sepolia.arbiscan.io/address/0x0d60Ff8bbCF49Bc5352328E7E28e141834d7750F)
8487
- [PNKFaucet](https://sepolia.arbiscan.io/address/0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD)
@@ -88,6 +91,7 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments
8891
- [SortitionModule: proxy](https://sepolia.arbiscan.io/address/0x19cb28BAB40C3585955798f5EEabd71Eec14471C), [implementation](https://sepolia.arbiscan.io/address/0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3)
8992
- [SortitionModuleNeo: proxy](https://sepolia.arbiscan.io/address/0x809533c303c10915BB5c0585f2d8D738e2a4fB64), [implementation](https://sepolia.arbiscan.io/address/0xD9ddceb7C399518F23b69D155a67C6AFF13f9fF0)
9093
- [SortitionModuleUniversity: proxy](https://sepolia.arbiscan.io/address/0xBEEb15EF1DEf96c569c97A703E649B0251ceFB04), [implementation](https://sepolia.arbiscan.io/address/0xaA2833b174D4e29ae2aFc0b11dF9160EDB28BF9d)
94+
- [TransactionBatcher](https://sepolia.arbiscan.io/address/0x35f93986950804ac1F93519BF68C2a7Dd776db0E)
9195
- [WETH](https://sepolia.arbiscan.io/address/0x3829A2486d53ee984a0ca2D76552715726b77138)
9296
- [WETHFaucet](https://sepolia.arbiscan.io/address/0x6F8C10E0030aDf5B8030a5E282F026ADdB6525fd)
9397

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import { HardhatRuntimeEnvironment } from "hardhat/types";
2+
import { DeployFunction } from "hardhat-deploy/types";
3+
import { BigNumberish, toBigInt } from "ethers";
4+
import { deployUpgradable } from "./utils/deployUpgradable";
5+
import { HomeChains, isSkipped } from "./utils";
6+
import { deployERC20AndFaucet } from "./utils/deployTokens";
7+
import { KlerosCore, KlerosCoreRuler } from "../typechain-types";
8+
import { getContractOrDeployUpgradable } from "./utils/getContractOrDeploy";
9+
import { changeCurrencyRate } from "./utils/klerosCoreHelper";
10+
11+
const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
12+
const { deployments, getNamedAccounts, getChainId } = hre;
13+
const { deploy } = deployments;
14+
15+
// fallback to hardhat node signers on local network
16+
const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address;
17+
const chainId = Number(await getChainId());
18+
console.log("deploying to %s with deployer %s", HomeChains[chainId], deployer);
19+
20+
const pnk = await deployERC20AndFaucet(hre, deployer, "PNK");
21+
const dai = await deployERC20AndFaucet(hre, deployer, "DAI");
22+
const weth = await deployERC20AndFaucet(hre, deployer, "WETH");
23+
24+
const minStake = 0;
25+
const alpha = 10000;
26+
const feeForJuror = 10n ** 17n;
27+
const jurorsForCourtJump = 16;
28+
await deployUpgradable(deployments, "KlerosCoreRuler", {
29+
from: deployer,
30+
args: [
31+
deployer, // governor
32+
pnk.target,
33+
[minStake, alpha, feeForJuror, jurorsForCourtJump],
34+
],
35+
log: true,
36+
});
37+
const core = (await hre.ethers.getContract("KlerosCoreRuler")) as KlerosCoreRuler;
38+
39+
try {
40+
await changeCurrencyRate(core, await pnk.getAddress(), true, 12225583, 12);
41+
await changeCurrencyRate(core, await dai.getAddress(), true, 60327783, 11);
42+
await changeCurrencyRate(core, await weth.getAddress(), true, 1, 1);
43+
} catch (e) {
44+
console.error("failed to change currency rates:", e);
45+
}
46+
47+
const disputeTemplateRegistry = await getContractOrDeployUpgradable(hre, "DisputeTemplateRegistry", {
48+
from: deployer,
49+
args: [deployer],
50+
log: true,
51+
});
52+
53+
await deploy("DisputeResolverRuler", {
54+
from: deployer,
55+
args: [core.target, disputeTemplateRegistry.target],
56+
log: true,
57+
});
58+
};
59+
60+
deployArbitration.tags = ["ArbitrationRuler"];
61+
deployArbitration.skip = async ({ network }) => {
62+
return isSkipped(network, !HomeChains[network.config.chainId ?? 0]);
63+
};
64+
65+
export default deployArbitration;
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { HardhatRuntimeEnvironment } from "hardhat/types";
2+
import { DeployFunction } from "hardhat-deploy/types";
3+
import { HomeChains, isSkipped } from "./utils";
4+
5+
const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
6+
const { deployments, getNamedAccounts, getChainId } = hre;
7+
const { deploy } = deployments;
8+
9+
// fallback to hardhat node signers on local network
10+
const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address;
11+
const chainId = Number(await getChainId());
12+
console.log("deploying to %s with deployer %s", HomeChains[chainId], deployer);
13+
14+
await deploy("TransactionBatcher", {
15+
from: deployer,
16+
args: [],
17+
log: true,
18+
});
19+
};
20+
21+
deployArbitration.tags = ["TransactionBatcher"];
22+
deployArbitration.skip = async ({ network }) => {
23+
return isSkipped(network, !HomeChains[network.config.chainId ?? 0]);
24+
};
25+
26+
export default deployArbitration;

contracts/deploy/utils/klerosCoreHelper.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { KlerosCore, KlerosCoreNeo, KlerosCoreUniversity } from "../../typechain-types";
1+
import { KlerosCore, KlerosCoreNeo, KlerosCoreRuler, KlerosCoreUniversity } from "../../typechain-types";
22
import { BigNumberish, toBigInt } from "ethers";
33

44
export const changeCurrencyRate = async (
5-
core: KlerosCore | KlerosCoreNeo | KlerosCoreUniversity,
5+
core: KlerosCore | KlerosCoreNeo | KlerosCoreRuler | KlerosCoreUniversity,
66
erc20: string,
77
accepted: boolean,
88
rateInEth: BigNumberish,
@@ -13,7 +13,7 @@ export const changeCurrencyRate = async (
1313
console.log(`core.changeAcceptedFeeTokens(${erc20}, ${accepted})`);
1414
await core.changeAcceptedFeeTokens(erc20, accepted);
1515
}
16-
if (!(pnkRate.rateInEth === toBigInt(rateInEth)) || pnkRate.rateDecimals !== rateDecimals) {
16+
if (pnkRate.rateInEth !== toBigInt(rateInEth) || pnkRate.rateDecimals !== rateDecimals) {
1717
console.log(`core.changeCurrencyRates(${erc20}, ${rateInEth}, ${rateDecimals})`);
1818
await core.changeCurrencyRates(erc20, rateInEth, rateDecimals);
1919
}

0 commit comments

Comments
 (0)