Skip to content

Commit 333f98e

Browse files
committed
feat: allow overriding localhost rpc
Signed-off-by: Tomás Migone <[email protected]>
1 parent 44dd7ea commit 333f98e

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

packages/hardhat-graph-protocol/src/sdk/hardhat.base.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ interface SecureAccountsOptions {
1212
// RPCs
1313
const ARBITRUM_ONE_RPC = vars.get('ARBITRUM_ONE_RPC', 'https://arb1.arbitrum.io/rpc')
1414
const ARBITRUM_SEPOLIA_RPC = vars.get('ARBITRUM_SEPOLIA_RPC', 'https://sepolia-rollup.arbitrum.io/rpc')
15+
const LOCALHOST_RPC = vars.get('LOCALHOST_RPC', 'http://localhost:8545')
1516

1617
export const solidityUserConfig: SolidityUserConfig = {
1718
version: '0.8.27',
@@ -54,7 +55,7 @@ export const networksUserConfig: BaseNetworksUserConfig = {
5455
},
5556
localhost: {
5657
chainId: 31337,
57-
url: 'http://localhost:8545',
58+
url: LOCALHOST_RPC,
5859
secureAccounts: {
5960
enabled: true,
6061
},

packages/horizon/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ The following environment variables might be required:
88

99
| Variable | Description |
1010
|----------|-------------|
11-
| `ARBISCAN_API_KEY` | Arbiscan API key |
12-
| `ARBITRUM_SEPOLIA_RPC` | Arbitrum Sepolia RPC URL |
11+
| `ARBISCAN_API_KEY` | Arbiscan API key - for contract verification|
12+
| `ARBITRUM_ONE_RPC` | Arbitrum One RPC URL - defaults to `https://arb1.arbitrum.io/rpc` |
13+
| `ARBITRUM_SEPOLIA_RPC` | Arbitrum Sepolia RPC URL - defaults to `https://sepolia-rollup.arbitrum.io/rpc` |
14+
| `LOCALHOST_RPC` | Localhost RPC URL - defaults to `http://localhost:8545` |
1315

1416
You can set them using Hardhat:
1517

packages/subgraph-service/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ The following environment variables might be required:
88

99
| Variable | Description |
1010
|----------|-------------|
11-
| `ARBISCAN_API_KEY` | Arbiscan API key |
12-
| `ARBITRUM_SEPOLIA_RPC` | Arbitrum Sepolia RPC URL |
11+
| `ARBISCAN_API_KEY` | Arbiscan API key - for contract verification|
12+
| `ARBITRUM_ONE_RPC` | Arbitrum One RPC URL - defaults to `https://arb1.arbitrum.io/rpc` |
13+
| `ARBITRUM_SEPOLIA_RPC` | Arbitrum Sepolia RPC URL - defaults to `https://sepolia-rollup.arbitrum.io/rpc` |
14+
| `LOCALHOST_RPC` | Localhost RPC URL - defaults to `http://localhost:8545` |
1315

1416
You can set them using Hardhat:
1517

0 commit comments

Comments
 (0)