Skip to content

Commit 5ef5f23

Browse files
committed
chore: artifacts refresh, contract getters to include the new dispute kits
1 parent b8a2a15 commit 5ef5f23

File tree

9 files changed

+12507
-432
lines changed

9 files changed

+12507
-432
lines changed

contracts/DEVNET_REDEPLOY.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
## Clean up of the old artifacts
2+
3+
The following contracts have been preserved:
4+
5+
- The University contracts (out-of-scope for now)
6+
- The ERC20 tokens and their faucets (unchanged): PinakionV2, PNK, PNKFaucet, DAI, DAIFaucet, WETH, WETHFaucet
7+
- The RNG contracts (unchanged): RandomizerOracle, BlockHashRNG, ChainlinkRNG, ChainlinkVRFCoordinator (mock)
8+
- KlerosV2NeoEarlyUser (unchanged, for Neo devnet)
9+
10+
```shell
11+
rm deployments/arbitrumSepoliaDevnet/DisputeKitClassic.json
12+
rm deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Implementation.json
13+
rm deployments/arbitrumSepoliaDevnet/DisputeKitClassic_Proxy.json
14+
rm deployments/arbitrumSepoliaDevnet/DisputeKitGated_Implementation.json
15+
rm deployments/arbitrumSepoliaDevnet/DisputeKitGated_Proxy.json
16+
rm deployments/arbitrumSepoliaDevnet/DisputeKitGated.json
17+
rm deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Implementation.json
18+
rm deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter_Proxy.json
19+
rm deployments/arbitrumSepoliaDevnet/DisputeKitGatedShutter.json
20+
rm deployments/arbitrumSepoliaDevnet/DisputeKitShutter.json
21+
rm deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Implementation.json
22+
rm deployments/arbitrumSepoliaDevnet/DisputeKitShutter_Proxy.json
23+
rm deployments/arbitrumSepoliaDevnet/DisputeResolver.json
24+
rm deployments/arbitrumSepoliaDevnet/DisputeResolverRuler.json
25+
rm deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry.json
26+
rm deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Implementation.json
27+
rm deployments/arbitrumSepoliaDevnet/DisputeTemplateRegistry_Proxy.json
28+
rm deployments/arbitrumSepoliaDevnet/EvidenceModule.json
29+
rm deployments/arbitrumSepoliaDevnet/EvidenceModule_Implementation.json
30+
rm deployments/arbitrumSepoliaDevnet/EvidenceModule_Proxy.json
31+
rm deployments/arbitrumSepoliaDevnet/KlerosCore.json
32+
rm deployments/arbitrumSepoliaDevnet/KlerosCoreRuler.json
33+
rm deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Implementation.json
34+
rm deployments/arbitrumSepoliaDevnet/KlerosCoreRuler_Proxy.json
35+
rm deployments/arbitrumSepoliaDevnet/KlerosCoreSnapshotProxy.json
36+
rm deployments/arbitrumSepoliaDevnet/KlerosCore_Implementation.json
37+
rm deployments/arbitrumSepoliaDevnet/KlerosCore_Proxy.json
38+
rm deployments/arbitrumSepoliaDevnet/PolicyRegistry.json
39+
rm deployments/arbitrumSepoliaDevnet/PolicyRegistry_Implementation.json
40+
rm deployments/arbitrumSepoliaDevnet/PolicyRegistry_Proxy.json
41+
rm deployments/arbitrumSepoliaDevnet/SortitionModule.json
42+
rm deployments/arbitrumSepoliaDevnet/SortitionModule_Implementation.json
43+
rm deployments/arbitrumSepoliaDevnet/SortitionModule_Proxy.json
44+
```
45+
46+
## Contracts Deployment - DRY RUN
47+
48+
Shell 1: fork node
49+
50+
```shell
51+
anvil --fork-url https://sepolia-rollup.arbitrum.io/rpc
52+
```
53+
54+
Shell 2: deployer
55+
56+
```shell
57+
export ARBITRUM_SEPOLIA_RPC=http://127.0.0.1:8545
58+
59+
yarn clean
60+
yarn deploy --network arbitrumSepoliaDevnet --tags Resolver
61+
yarn deploy --network arbitrumSepoliaDevnet --tags ArbitrationRuler
62+
63+
unset ARBITRUM_SEPOLIA_RPC
64+
```
65+
66+
:warning: Remember to delete all the deployed artifacts after each dry run.
67+
68+
## Contracts Deployment - LIVE
69+
70+
```shell
71+
yarn clean
72+
yarn deploy --network arbitrumSepoliaDevnet --tags Resolver
73+
yarn deploy --network arbitrumSepoliaDevnet --tags ArbitrationRuler
74+
75+
# Contracts verification, marking proxies
76+
yarn etherscan-verify --network arbitrumSepoliaDevnet
77+
yarn etherscan-verify-proxies
78+
79+
# Docs update
80+
./scripts/populateReadme.sh
81+
```
82+
83+
## Courts structure and policies configuration
84+
85+
```shell
86+
yarn hardhat populate:courts --from v2_devnet --network arbitrumSepoliaDevnet
87+
88+
yarn hardhat populate:policy-registry --from v2_devnet --network arbitrumSepoliaDevnet
89+
```
90+
91+
## Contracts SDK
92+
93+
### Refresh the artifacts
94+
95+
```shell
96+
# Viem artifacts
97+
yarn viem:generate-devnet
98+
99+
# Hardhat artifacts
100+
yarn export:devnet
101+
```
102+
103+
### Update the contract helpers
104+
105+
If there are new or removed contracts, edit the contract helpers in:
106+
107+
- `scripts/utils/contracts.ts` (Hardhat runtime)
108+
- `deployments/contractsEthers.ts` (pure EthersJS)
109+
- `deployments/contractsViem.ts` (pure Viem)

contracts/README.md

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ yarn deploy --network localhost --tags <Arbitration|VeaMock|ForeignGatewayOnEthe
197197
```bash
198198
# ArbitrumSepolia to Chiado
199199
yarn deploy --network arbitrumSepolia --tags Arbitration
200-
yarn deploy --network arbitrumSepolia --tags HomeArbitrable
200+
yarn deploy --network arbitrumSepolia --tags Resolver
201201
yarn deploy --network chiado --tags ForeignGatewayOnGnosis
202202
yarn deploy --network chiado --tags KlerosLiquidOnGnosis
203203
yarn deploy --network chiado --tags ForeignArbitrable
@@ -259,26 +259,11 @@ do
259259
done
260260
```
261261

262-
#### 2/ Import the data to V2 - Local Network
263-
264-
Shell 1:
265-
266-
```bash
267-
yarn hardhat node --tags Arbitration
268-
```
269-
270-
Shell 2:
271-
272-
```bash
273-
yarn hardhat run scripts/populateCourts.ts --network localhost
274-
yarn hardhat run scripts/populatePolicyRegistry.ts --network localhost
275-
```
276-
277-
#### 3/ Import the data to V2 - Public Testnet
262+
#### 2/ Import the data to V2 - Public Testnet
278263

279264
```bash
280-
yarn hardhat run scripts/populateCourts.ts --network arbitrumSepolia
281-
yarn hardhat run scripts/populatePolicyRegistry.ts --network arbitrumSepolia
265+
yarn hardhat populate:courts --from v2_testnet --max-number-of-courts 3 --network arbitrumSepolia
266+
yarn hardhat populate:policy-registry --from v2_testnet --network arbitrumSepolia
282267
```
283268

284269
### Generate deployment artifacts for existing contracts

contracts/README.md.template

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ yarn deploy --network localhost --tags <Arbitration|VeaMock|ForeignGatewayOnEthe
8989
```bash
9090
# ArbitrumSepolia to Chiado
9191
yarn deploy --network arbitrumSepolia --tags Arbitration
92-
yarn deploy --network arbitrumSepolia --tags HomeArbitrable
92+
yarn deploy --network arbitrumSepolia --tags Resolver
9393
yarn deploy --network chiado --tags ForeignGatewayOnGnosis
9494
yarn deploy --network chiado --tags KlerosLiquidOnGnosis
9595
yarn deploy --network chiado --tags ForeignArbitrable
@@ -151,26 +151,11 @@ do
151151
done
152152
```
153153

154-
#### 2/ Import the data to V2 - Local Network
155-
156-
Shell 1:
157-
158-
```bash
159-
yarn hardhat node --tags Arbitration
160-
```
161-
162-
Shell 2:
163-
164-
```bash
165-
yarn hardhat run scripts/populateCourts.ts --network localhost
166-
yarn hardhat run scripts/populatePolicyRegistry.ts --network localhost
167-
```
168-
169-
#### 3/ Import the data to V2 - Public Testnet
154+
#### 2/ Import the data to V2 - Public Testnet
170155

171156
```bash
172-
yarn hardhat run scripts/populateCourts.ts --network arbitrumSepolia
173-
yarn hardhat run scripts/populatePolicyRegistry.ts --network arbitrumSepolia
157+
yarn hardhat populate:courts --from v2_testnet --max-number-of-courts 3 --network arbitrumSepolia
158+
yarn hardhat populate:policy-registry --from v2_testnet --network arbitrumSepolia
174159
```
175160

176161
### Generate deployment artifacts for existing contracts

0 commit comments

Comments
 (0)