Skip to content

Commit f2b120a

Browse files
committed
chore: update readme
Signed-off-by: Tomás Migone <[email protected]>
1 parent 1b9914d commit f2b120a

File tree

2 files changed

+43
-12
lines changed

2 files changed

+43
-12
lines changed

packages/horizon/README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ The following environment variables might be required:
99
| Variable | Description |
1010
|----------|-------------|
1111
| `ARBISCAN_API_KEY` | Arbiscan API key |
12-
| `DEPLOYER_PRIVATE_KEY` | Deployer private key - for testnet deployments |
13-
| `GOVERNOR_PRIVATE_KEY` | Governor private key - for testnet deployments |
1412
| `ARBITRUM_SEPOLIA_RPC` | Arbitrum Sepolia RPC URL |
15-
| `VIRTUAL_ARBITRUM_SEPOLIA_RPC` | Virtual Arbitrum Sepolia RPC URL |
1613

1714
You can set them using Hardhat:
1815

@@ -27,7 +24,7 @@ yarn install
2724
yarn build
2825
```
2926

30-
## Deploy
27+
## Deployment
3128

3229
Note that this instructions will help you deploy Graph Horizon contracts, but no data service will be deployed. If you want to deploy the Subgraph Service please refer to the [Subgraph Service README](../subgraph-service/README.md) for deploy instructions.
3330

@@ -39,13 +36,13 @@ npx hardhat deploy:protocol --network hardhat
3936
```
4037

4138
### Upgrade deployment
42-
Usually you would run this against a network (or a fork) where the original Graph Protocol was previously deployed. To upgrade an existing deployment of the original Graph Protocol to Graph Horizon, run the following commands. Note that each step might need to be run by different accounts (deployer vs governor):
39+
Usually you would run this against a network (or a fork) where the original Graph Protocol was previously deployed. To upgrade an existing deployment of the original Graph Protocol to Graph Horizon, run the following commands. Note that some steps might need to be run by different accounts (deployer vs governor):
4340

4441
```bash
4542
npx hardhat deploy:migrate --network hardhat --step 1
46-
npx hardhat deploy:migrate --network hardhat --step 2 # Optionally add --patch-config
43+
npx hardhat deploy:migrate --network hardhat --step 2 # Run with governor. Optionally add --patch-config
4744
npx hardhat deploy:migrate --network hardhat --step 3
48-
npx hardhat deploy:migrate --network hardhat --step 4 # Optionally add --patch-config
45+
npx hardhat deploy:migrate --network hardhat --step 4 # Run with governor. Optionally add --patch-config
4946
```
5047

5148
Steps 2 and 4 require patching the configuration file with addresses from previous steps. The files are located in the `ignition/configs` directory and need to be manually edited. You can also pass `--patch-config` flag to the deploy command to automatically patch the configuration reading values from the address book. Note that this will NOT update the configuration file.

packages/subgraph-service/README.md

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,50 @@
22

33
The Subgraph Service is a data service designed to work with Graph Horizon that supports indexing subgraphs and serving queries to consumers.
44

5-
## Deployment
5+
## Configuration
66

7-
We use Hardhat Ignition to deploy the contracts. To build and deploy the Subgraph Service run the following commands:
7+
The following environment variables might be required:
8+
9+
| Variable | Description |
10+
|----------|-------------|
11+
| `ARBISCAN_API_KEY` | Arbiscan API key |
12+
| `ARBITRUM_SEPOLIA_RPC` | Arbitrum Sepolia RPC URL |
13+
14+
You can set them using Hardhat:
15+
16+
```bash
17+
npx hardhat vars set <variable>
18+
```
19+
20+
## Build
821

922
```bash
1023
yarn install
1124
yarn build
12-
npx hardhat run scripts/deploy.ts --network hardhat
1325
```
1426

15-
You can use any network defined in `hardhat.config.ts` by replacing `hardhat` with the network name.
27+
## Deployment
28+
29+
Note that this instructions will help you deploy Graph Horizon contracts alongside the Subgraph Service. If you want to deploy just the core Horizon contracts please refer to the [Horizon README](../horizon/README.md) for deploy instructions.
30+
31+
### New deployment
32+
To deploy Graph Horizon from scratch including the Subgraph Service run the following command:
33+
34+
```bash
35+
npx hardhat deploy:protocol --network hardhat
36+
```
37+
38+
### Upgrade deployment
39+
Usually you would run this against a network (or a fork) where the original Graph Protocol was previously deployed. To upgrade an existing deployment of the original Graph Protocol to Graph Horizon including the Subgraph Service, run the following commands. Note that some steps might need to be run by different accounts (deployer vs governor):
40+
41+
```bash
42+
cd ../
43+
cd horizon && npx hardhat deploy:migrate --network hardhat --step 1 && cd ..
44+
cd subgraph-service && npx hardhat deploy:migrate --network hardhat --step 1 && cd ..
45+
cd horizon && npx hardhat deploy:migrate --network hardhat --step 2 && cd .. # Run with governor. Optionally add --patch-config
46+
cd horizon && npx hardhat deploy:migrate --network hardhat --step 3 && cd ..
47+
cd subgraph-service && npx hardhat deploy:migrate --network hardhat --step 2 && cd .. # Optionally add --patch-config
48+
cd horizon && npx hardhat deploy:migrate --network hardhat --step 4 && cd .. # Run with governor. Optionally add --patch-config
49+
```
1650

17-
Note that this will deploy and configure Graph Horizon contracts as well as the Subgraph Service.
51+
Horizon Steps 2 and 4, and Subgraph Service Step 2 require patching the configuration file with addresses from previous steps. The files are located in the `ignition/configs` directory and need to be manually edited. You can also pass `--patch-config` flag to the deploy command to automatically patch the configuration reading values from the address book. Note that this will NOT update the configuration file.

0 commit comments

Comments
 (0)