Skip to content

Commit 690069b

Browse files
committed
chore: testnet-4 redeploy
1 parent dc14fe9 commit 690069b

29 files changed

+588
-743
lines changed

contracts/README.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,17 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments
2929
- [BlockHashRNG](https://sepolia.arbiscan.io/address/0x0298a3EFa6Faf90865725E2b48Cf0F66e5d52754)
3030
- [DAI](https://sepolia.arbiscan.io/address/0xc34aeFEa232956542C5b2f2EE55fD5c378B35c03)
3131
- [DAIFaucet](https://sepolia.arbiscan.io/address/0x1Fa58B52326488D62A406E71DBaD839560e810fF)
32-
- [DisputeKitClassic: proxy](https://sepolia.arbiscan.io/address/0x10bDc76B491BFcA466AB5C74431880C086b07c67), [implementation](https://sepolia.arbiscan.io/address/0x718a6FB3b6f8dc8205e9052E6B745Ff0c23205dD)
33-
- [DisputeResolver](https://sepolia.arbiscan.io/address/0xa5A7F0F8e5f90eb8738C7Ee1be37A9794024Bc1B)
34-
- [DisputeTemplateRegistry: proxy](https://sepolia.arbiscan.io/address/0xf2833d188269Df7c7B6951f9114DA0bD6BAE70af), [implementation](https://sepolia.arbiscan.io/address/0xa04d631e5660635D8e8f724F799A4e83Bb1EDb18)
35-
- [EvidenceModule: proxy](https://sepolia.arbiscan.io/address/0xFA4Df75ab27525e65Db073a9aF195cd6B7707046), [implementation](https://sepolia.arbiscan.io/address/0xA1280FA86a65c4Fe6e22586066A89372C22AA03f)
36-
- [KlerosCore: proxy](https://sepolia.arbiscan.io/address/0x8ab813348fA90DE51A87131365c458D43ca03F9c), [implementation](https://sepolia.arbiscan.io/address/0xea9cc831DA99C2d9EeC82aA8d281Bb3e26572e52)
32+
- [DisputeKitClassic: proxy](https://sepolia.arbiscan.io/address/0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94), [implementation](https://sepolia.arbiscan.io/address/0xDb0B7908C46E2Bb08459bf9b3155b9bb8F8713E1)
33+
- [DisputeResolver](https://sepolia.arbiscan.io/address/0xed31bEE8b1F7cE89E93033C0d3B2ccF4cEb27652)
34+
- [DisputeTemplateRegistry: proxy](https://sepolia.arbiscan.io/address/0xe763d31Cb096B4bc7294012B78FC7F148324ebcb), [implementation](https://sepolia.arbiscan.io/address/0x7283c07CC5224B20f431B1fa0E6d6db3cA02de34)
35+
- [EvidenceModule: proxy](https://sepolia.arbiscan.io/address/0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397), [implementation](https://sepolia.arbiscan.io/address/0x63CF56e1c99E65E4a9eCDCC805F4735E016F2dc8)
36+
- [KlerosCore: proxy](https://sepolia.arbiscan.io/address/0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479), [implementation](https://sepolia.arbiscan.io/address/0x0766e4B8c4a3aAC9371a5A9D6119E8125Adcfd55)
3737
- [PNKFaucet](https://sepolia.arbiscan.io/address/0x9f6ffc13B685A68ae359fCA128dfE776458Df464)
3838
- [PinakionV2](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225)
39-
- [PolicyRegistry: proxy](https://sepolia.arbiscan.io/address/0xb177AC8827146AC74C412688c6b10676ca170096), [implementation](https://sepolia.arbiscan.io/address/0xd543D50dcba2c3E067296210D64c8F91206Df908)
40-
- [RandomizerRNG: proxy](https://sepolia.arbiscan.io/address/0x1E2960117f570f48c773154C0A63919c12Db0Cc2), [implementation](https://sepolia.arbiscan.io/address/0x0974eF19c9202141D20ce50D60c5A3c522e7A9Ae)
41-
- [SortitionModule: proxy](https://sepolia.arbiscan.io/address/0xa156fAC2e209126273f841E81490DA7D4381Cc03), [implementation](https://sepolia.arbiscan.io/address/0xF506eA3E25ed3BFc9aFa30c81e0254cb0E4E0A35)
39+
- [PolicyRegistry: proxy](https://sepolia.arbiscan.io/address/0x2668c46A14af8997417138B064ca1bEB70769585), [implementation](https://sepolia.arbiscan.io/address/0xB958113f96950C7806d584eFBed964288d46a0B8)
40+
- [RandomizerRNG: proxy](https://sepolia.arbiscan.io/address/0x51a97ad9F0aA818e75819da3cA20CAc319580627), [implementation](https://sepolia.arbiscan.io/address/0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203)
41+
- [SortitionModule: proxy](https://sepolia.arbiscan.io/address/0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD), [implementation](https://sepolia.arbiscan.io/address/0xA418a7E63DC8Aa0F379487E4445f86543C16A0E9)
42+
- [TransactionBatcher](https://sepolia.arbiscan.io/address/0x35f93986950804ac1F93519BF68C2a7Dd776db0E)
4243
- [WETH](https://sepolia.arbiscan.io/address/0xAEE953CC26DbDeA52beBE3F97f281981f2B9d511)
4344
- [WETHFaucet](https://sepolia.arbiscan.io/address/0x922B84134e41BC5c9EDE7D5EFCE22Ba3D0e71835)
4445

contracts/deploy/00-home-chain-arbitration.ts

+13-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { DeployFunction } from "hardhat-deploy/types";
33
import { getContractAddress } from "./utils/getContractAddress";
44
import { deployUpgradable } from "./utils/deployUpgradable";
55
import { changeCurrencyRate } from "./utils/klerosCoreHelper";
6-
import { HomeChains, isSkipped, isDevnet, PNK, ETH } from "./utils";
6+
import { HomeChains, isSkipped, isDevnet, isMainnet, PNK, ETH } from "./utils";
77
import { getContractOrDeploy, getContractOrDeployUpgradable } from "./utils/getContractOrDeploy";
88
import { deployERC20AndFaucet } from "./utils/deployTokens";
99
import { DisputeKitClassic, KlerosCore } from "../typechain-types";
@@ -36,12 +36,22 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
3636
log: true,
3737
});
3838

39-
const rng = await deployUpgradable(deployments, "RandomizerRNG", {
39+
const randomizerRng = await getContractOrDeployUpgradable(hre, "RandomizerRNG", {
4040
from: deployer,
4141
args: [randomizerOracle.target, deployer],
4242
log: true,
4343
});
4444

45+
const blockhashRng = await getContractOrDeploy(hre, "BlockHashRNG", {
46+
from: deployer,
47+
args: [],
48+
log: true,
49+
});
50+
51+
// RNG fallback on Arbitrum Sepolia because the Randomizer.ai oracle contract is unverified and not officially supported.
52+
const rng = isMainnet(hre.network) ? randomizerRng : blockhashRng;
53+
console.log(isMainnet(hre.network) ? "using RandomizerRNG on mainnet" : "using BlockHashRNG on testnet/devnet");
54+
4555
const disputeKit = await deployUpgradable(deployments, "DisputeKitClassic", {
4656
from: deployer,
4757
args: [deployer, ZeroAddress],
@@ -59,7 +69,7 @@ const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment)
5969
const maxFreezingTime = devnet ? 600 : 1800;
6070
const sortitionModule = await deployUpgradable(deployments, "SortitionModule", {
6171
from: deployer,
62-
args: [deployer, klerosCoreAddress, minStakingTime, maxFreezingTime, rng.address, RNG_LOOKAHEAD],
72+
args: [deployer, klerosCoreAddress, minStakingTime, maxFreezingTime, rng.target, RNG_LOOKAHEAD],
6373
log: true,
6474
}); // nonce (implementation), nonce+1 (proxy)
6575

contracts/deploy/utils/klerosCoreHelper.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ export const changeCurrencyRate = async (
1111
const pnkRate = await core.currencyRates(erc20);
1212
if (pnkRate.feePaymentAccepted !== accepted) {
1313
console.log(`core.changeAcceptedFeeTokens(${erc20}, ${accepted})`);
14-
await core.changeAcceptedFeeTokens(erc20, accepted);
14+
const tx = await core.changeAcceptedFeeTokens(erc20, accepted);
15+
await tx.wait();
1516
}
1617
if (pnkRate.rateInEth !== toBigInt(rateInEth) || pnkRate.rateDecimals !== rateDecimals) {
1718
console.log(`core.changeCurrencyRates(${erc20}, ${rateInEth}, ${rateDecimals})`);
18-
await core.changeCurrencyRates(erc20, rateInEth, rateDecimals);
19+
const tx = await core.changeCurrencyRates(erc20, rateInEth, rateDecimals);
20+
await tx.wait();
1921
}
2022
};

contracts/deployments/arbitrumSepolia.ts

+22-22
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ export default {
477477
],
478478
},
479479
DisputeKitClassic: {
480-
address: "0x10bDc76B491BFcA466AB5C74431880C086b07c67",
480+
address: "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94",
481481
abi: [
482482
{
483483
stateMutability: "payable",
@@ -1426,7 +1426,7 @@ export default {
14261426
],
14271427
},
14281428
DisputeKitClassic_Implementation: {
1429-
address: "0x718a6FB3b6f8dc8205e9052E6B745Ff0c23205dD",
1429+
address: "0xDb0B7908C46E2Bb08459bf9b3155b9bb8F8713E1",
14301430
abi: [
14311431
{
14321432
inputs: [],
@@ -2356,7 +2356,7 @@ export default {
23562356
],
23572357
},
23582358
DisputeKitClassic_Proxy: {
2359-
address: "0x10bDc76B491BFcA466AB5C74431880C086b07c67",
2359+
address: "0x0c38f115D001d3b5bBec5e8D44f78C7B61A27D94",
23602360
abi: [
23612361
{
23622362
inputs: [
@@ -2385,7 +2385,7 @@ export default {
23852385
],
23862386
},
23872387
DisputeResolver: {
2388-
address: "0xa5A7F0F8e5f90eb8738C7Ee1be37A9794024Bc1B",
2388+
address: "0xed31bEE8b1F7cE89E93033C0d3B2ccF4cEb27652",
23892389
abi: [
23902390
{
23912391
inputs: [
@@ -2680,7 +2680,7 @@ export default {
26802680
],
26812681
},
26822682
DisputeTemplateRegistry: {
2683-
address: "0xf2833d188269Df7c7B6951f9114DA0bD6BAE70af",
2683+
address: "0xe763d31Cb096B4bc7294012B78FC7F148324ebcb",
26842684
abi: [
26852685
{
26862686
stateMutability: "payable",
@@ -2920,7 +2920,7 @@ export default {
29202920
],
29212921
},
29222922
DisputeTemplateRegistry_Implementation: {
2923-
address: "0xa04d631e5660635D8e8f724F799A4e83Bb1EDb18",
2923+
address: "0x7283c07CC5224B20f431B1fa0E6d6db3cA02de34",
29242924
abi: [
29252925
{
29262926
inputs: [],
@@ -3141,7 +3141,7 @@ export default {
31413141
],
31423142
},
31433143
DisputeTemplateRegistry_Proxy: {
3144-
address: "0xf2833d188269Df7c7B6951f9114DA0bD6BAE70af",
3144+
address: "0xe763d31Cb096B4bc7294012B78FC7F148324ebcb",
31453145
abi: [
31463146
{
31473147
inputs: [
@@ -3170,7 +3170,7 @@ export default {
31703170
],
31713171
},
31723172
EvidenceModule: {
3173-
address: "0xFA4Df75ab27525e65Db073a9aF195cd6B7707046",
3173+
address: "0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397",
31743174
abi: [
31753175
{
31763176
stateMutability: "payable",
@@ -3367,7 +3367,7 @@ export default {
33673367
],
33683368
},
33693369
EvidenceModule_Implementation: {
3370-
address: "0xA1280FA86a65c4Fe6e22586066A89372C22AA03f",
3370+
address: "0x63CF56e1c99E65E4a9eCDCC805F4735E016F2dc8",
33713371
abi: [
33723372
{
33733373
inputs: [],
@@ -3545,7 +3545,7 @@ export default {
35453545
],
35463546
},
35473547
EvidenceModule_Proxy: {
3548-
address: "0xFA4Df75ab27525e65Db073a9aF195cd6B7707046",
3548+
address: "0xA88A9a25cE7f1d8b3941dA3b322Ba91D009E1397",
35493549
abi: [
35503550
{
35513551
inputs: [
@@ -3574,7 +3574,7 @@ export default {
35743574
],
35753575
},
35763576
KlerosCore: {
3577-
address: "0x8ab813348fA90DE51A87131365c458D43ca03F9c",
3577+
address: "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479",
35783578
abi: [
35793579
{
35803580
stateMutability: "payable",
@@ -5446,7 +5446,7 @@ export default {
54465446
],
54475447
},
54485448
KlerosCore_Implementation: {
5449-
address: "0xea9cc831DA99C2d9EeC82aA8d281Bb3e26572e52",
5449+
address: "0x0766e4B8c4a3aAC9371a5A9D6119E8125Adcfd55",
54505450
abi: [
54515451
{
54525452
inputs: [],
@@ -7299,7 +7299,7 @@ export default {
72997299
],
73007300
},
73017301
KlerosCore_Proxy: {
7302-
address: "0x8ab813348fA90DE51A87131365c458D43ca03F9c",
7302+
address: "0xE8442307d36e9bf6aB27F1A009F95CE8E11C3479",
73037303
abi: [
73047304
{
73057305
inputs: [
@@ -8015,7 +8015,7 @@ export default {
80158015
],
80168016
},
80178017
PolicyRegistry: {
8018-
address: "0xb177AC8827146AC74C412688c6b10676ca170096",
8018+
address: "0x2668c46A14af8997417138B064ca1bEB70769585",
80198019
abi: [
80208020
{
80218021
stateMutability: "payable",
@@ -8249,7 +8249,7 @@ export default {
82498249
],
82508250
},
82518251
PolicyRegistry_Implementation: {
8252-
address: "0xC5cb504E1A88ea7De10136B2D6e33F9F7D4E9656",
8252+
address: "0xB958113f96950C7806d584eFBed964288d46a0B8",
82538253
abi: [
82548254
{
82558255
inputs: [],
@@ -8464,7 +8464,7 @@ export default {
84648464
],
84658465
},
84668466
PolicyRegistry_Proxy: {
8467-
address: "0xb177AC8827146AC74C412688c6b10676ca170096",
8467+
address: "0x2668c46A14af8997417138B064ca1bEB70769585",
84688468
abi: [
84698469
{
84708470
inputs: [
@@ -8497,7 +8497,7 @@ export default {
84978497
abi: [],
84988498
},
84998499
RandomizerRNG: {
8500-
address: "0x1E2960117f570f48c773154C0A63919c12Db0Cc2",
8500+
address: "0x51a97ad9F0aA818e75819da3cA20CAc319580627",
85018501
abi: [
85028502
{
85038503
stateMutability: "payable",
@@ -8822,7 +8822,7 @@ export default {
88228822
],
88238823
},
88248824
RandomizerRNG_Implementation: {
8825-
address: "0x0974eF19c9202141D20ce50D60c5A3c522e7A9Ae",
8825+
address: "0x1237F02bBeFDAEA20cE3A66aCAe458C4106Ae203",
88268826
abi: [
88278827
{
88288828
inputs: [],
@@ -9128,7 +9128,7 @@ export default {
91289128
],
91299129
},
91309130
RandomizerRNG_Proxy: {
9131-
address: "0x1E2960117f570f48c773154C0A63919c12Db0Cc2",
9131+
address: "0x51a97ad9F0aA818e75819da3cA20CAc319580627",
91329132
abi: [
91339133
{
91349134
inputs: [
@@ -9157,7 +9157,7 @@ export default {
91579157
],
91589158
},
91599159
SortitionModule: {
9160-
address: "0xa156fAC2e209126273f841E81490DA7D4381Cc03",
9160+
address: "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD",
91619161
abi: [
91629162
{
91639163
stateMutability: "payable",
@@ -10108,7 +10108,7 @@ export default {
1010810108
],
1010910109
},
1011010110
SortitionModule_Implementation: {
10111-
address: "0xF506eA3E25ed3BFc9aFa30c81e0254cb0E4E0A35",
10111+
address: "0xA418a7E63DC8Aa0F379487E4445f86543C16A0E9",
1011210112
abi: [
1011310113
{
1011410114
inputs: [],
@@ -11040,7 +11040,7 @@ export default {
1104011040
],
1104111041
},
1104211042
SortitionModule_Proxy: {
11043-
address: "0xa156fAC2e209126273f841E81490DA7D4381Cc03",
11043+
address: "0xbAA5068F0bD1417046250A3eDe2B1F27e31383BD",
1104411044
abi: [
1104511045
{
1104611046
inputs: [

0 commit comments

Comments
 (0)