-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathREADME.md.template
119 lines (78 loc) · 2.5 KB
/
README.md.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# @kleros/vea-contracts
Smart contracts for Vea.
---
$toc
---
## Deployed Addresses
Refresh the list of deployed contracts by running `./scripts/populateReadme.sh`.
$deployments
## Getting Started
### Install the Dependencies
```bash
yarn install
```
### Run Tests
```bash
yarn test
```
### Compile the Contracts
```bash
yarn build
```
### Run Linter on Files
```bash
yarn check
```
### Deployment
**NOTICE:** the commands below work only if you are inside the `contracts/` directory.
#### 0. Set the Environment Variables
Copy `.env.example` file as `.env` and edit it accordingly.
```bash
cp .env.example .env
```
The following env vars are required:
- `PRIVATE_KEY`: the private key of the deployer account used for the testnets.
- `MAINNET_PRIVATE_KEY`: the private key of the deployer account used for Mainnet.
- `INFURA_API_KEY`: the API key for infura.
The ones below are optional:
- `ETHERSCAN_API_KEY`: to verify the source of the newly deployed contracts on **Etherscan**.
- `ARBISCAN_API_KEY`: to verify the source of the newly deployed contracts on **Arbitrum**.
#### 1. Update the Constructor Parameters (optional)
If some of the constructor parameters needs to change, you need to update the files in the `deploy/` directory.
#### 2. Deploy to a Local Network
```bash
yarn start-local
```
#### 3. Deploy to Public Networks
##### Testnets
```bash
# arbitrumSepolia -> Sepolia
yarn deploy --network sepolia --tags ArbSepoliaToSepoliaOutbox
yarn deploy --network arbitrumSepolia --tags ArbSepoliaToSepoliaInbox
# arbitrumSepolia -> Chiado
yarn deploy --network chiado --tags ArbSepoliaToChiadoOutbox
yarn deploy --network arbitrumSepolia --tags ArbSepoliaToChiadoInbox
```
##### Mainnets
```bash
# Arbitrum -> Ethereum
yarn deploy --network mainnet --tags ArbToEthOutbox
yarn deploy --network arbitrum --tags ArbToEthInbox
# Arbitrum -> Gnosis chain
yarn deploy --network gnosischain --tags ArbToGnosisOutbox
yarn deploy --network arbitrum --tags ArbToGnosisInbox
```
The deployed addresses should be output to the screen after the deployment is complete.
If you miss that, you can always go to the `deployments/<network>` directory and look for the respective file.
#### 4. Running Test Fixtures
```bash
yarn test
```
#### 5. Verify the Source Code
This must be done for each network separately.
```bash
# explorer
yarn etherscan-verify --network <arbitrumSepolia|arbitrum|sepolia|mainnet|chiado|gnosischain>
# sourcify
yarn sourcify --network <arbitrumSepolia|arbitrum|sepolia|mainnet|chiado|gnosischain>
```