Skip to content

Commit 38a7997

Browse files
committed
chore: replace api key with fallback URL
1 parent 8fde18e commit 38a7997

File tree

3 files changed

+33
-13
lines changed

3 files changed

+33
-13
lines changed

apps/indexer/.env.example

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Custom RPCs
2+
ENVIO_SEI_RPC_URL=YOUR_SEI_RPC_URL
3+
ENVIO_HEDERA_RPC_URL=YOUR_HEDERA_RPC_URL
4+
5+
# Fallback RPCs
6+
ENVIO_MAINNET_FALLBACK_RPC=YOUR_MAINNET_RPC_URL
7+
ENVIO_OPTIMISM_FALLBACK_RPC=YOUR_OPTIMISM_RPC_URL
8+
ENVIO_GNOSIS_FALLBACK_RPC=YOUR_GNOSIS_RPC_URL
9+
ENVIO_POLYGON_FALLBACK_RPC=YOUR_POLYGON_RPC_URL
10+
ENVIO_FANTOM_FALLBACK_RPC=YOUR_FANTOM_RPC_URL
11+
ENVIO_ZKSYNC_FALLBACK_RPC=YOUR_ZKSYNC_RPC_URL
12+
ENVIO_METIS_FALLBACK_RPC=YOUR_METIS_RPC_URL
13+
ENVIO_BASE_FALLBACK_RPC=YOUR_BASE_RPC_URL
14+
ENVIO_ARBITRUM_FALLBACK_RPC=YOUR_ARBITRUM_RPC_URL
15+
ENVIO_AVALANCHE_FALLBACK_RPC=YOUR_AVALANCHE_RPC_URL
16+
ENVIO_CELO_FALLBACK_RPC=YOUR_CELO_RPC_URL
17+
ENVIO_SCROLL_FALLBACK_RPC=YOUR_SCROLL_RPC_URL
18+
ENVIO_SEPOLIA_FALLBACK_RPC=YOUR_SEPOLIA_RPC_URL

apps/indexer/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ Use your values for the chain and the contracts you want to index.
7070
7171
Ensure each event is properly handled and thoroughly tested before redeploying the environment to prevent issues in the indexing process.
7272
73+
Hypersync can sometimes be unreliable, so it's recommended to provide a fallback RPC. Check the `.env.example` file and ensure the necessary variables are set in the hosted service before deployment.
74+
7375
## 🧪 Testing
7476

7577
To run tests, use the following command:

apps/indexer/config.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ networks:
137137
#######################
138138
- id: 1 # mainnet
139139
start_block: 18486688
140-
rpc: https://eth-mainnet.g.alchemy.com/v2/${ENVIO_ALCHEMY_API_KEY}
140+
rpc: ${ENVIO_MAINNET_FALLBACK_RPC:-https://eth.llamarpc.com}
141141
contracts:
142142
- name: Allo
143143
address:
@@ -148,7 +148,7 @@ networks:
148148
- 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
149149

150150
- id: 10 # optimism
151-
rpc: https://opt-mainnet.g.alchemy.com/v2/${ENVIO_ALCHEMY_API_KEY}
151+
rpc: ${ENVIO_OPTIMISM_FALLBACK_RPC:-https://optimism.llamarpc.com}
152152
start_block: 111678968
153153
contracts:
154154
- name: Registry
@@ -172,7 +172,7 @@ networks:
172172
- 0xB087535DB0df98fC4327136e897A5985E5Cfbd66
173173

174174
- id: 100 # gnosis
175-
rpc: https://gnosis-mainnet.g.alchemy.com/v2/${ENVIO_ALCHEMY_API_KEY}
175+
rpc: ${ENVIO_GNOSIS_FALLBACK_RPC:-https://gnosis-rpc.publicnode.com}
176176
start_block: 35900000
177177
contracts:
178178
- name: Registry
@@ -184,7 +184,7 @@ networks:
184184
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1
185185

186186
- id: 137 # polygon
187-
rpc: https://polygon-mainnet.g.alchemy.com/v2/${ENVIO_ALCHEMY_API_KEY}
187+
rpc: ${ENVIO_POLYGON_FALLBACK_RPC:-https://polygon.llamarpc.com}
188188
start_block: 49466006
189189
contracts:
190190
- name: Registry
@@ -196,7 +196,7 @@ networks:
196196
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1
197197

198198
- id: 250 # fantom
199-
rpc: https://fantom-mainnet.g.alchemy.com/v2/${ENVIO_ALCHEMY_API_KEY}
199+
rpc: ${ENVIO_FANTOM_FALLBACK_RPC:-https://rpc.ankr.com/fantom}
200200
start_block: 77624278
201201
contracts:
202202
- name: Registry
@@ -208,7 +208,7 @@ networks:
208208
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1
209209

210210
- id: 324 # zksync-era-mainnet
211-
rpc: https://zksync-mainnet.g.alchemy.com/v2/${ENVIO_ALCHEMY_API_KEY}
211+
rpc: ${ENVIO_ZKSYNC_FALLBACK_RPC:-https://1rpc.io/zksync2-era}
212212
start_block: 31154341
213213
contracts:
214214
- name: Registry
@@ -220,7 +220,7 @@ networks:
220220
- 0x9D1D1BF2835935C291C0f5228c86d5C4e235A249
221221

222222
- id: 1088 # metis
223-
rpc: https://metis-mainnet.g.alchemy.com/v2/${ENVIO_ALCHEMY_API_KEY}
223+
rpc: ${ENVIO_METIS_FALLBACK_RPC:-https://metis-rpc.publicnode.com}
224224
start_block: 17860000
225225
contracts:
226226
- name: Registry
@@ -232,7 +232,7 @@ networks:
232232
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1
233233

234234
- id: 8453 # base
235-
rpc: https://base-mainnet.g.alchemy.com/v2/${ENVIO_ALCHEMY_API_KEY}
235+
rpc: ${ENVIO_BASE_FALLBACK_RPC:-https://base-rpc.publicnode.com}
236236
start_block: 6083365
237237
contracts:
238238
- name: Registry
@@ -244,8 +244,8 @@ networks:
244244
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1
245245

246246
- id: 42161 # arbitrum
247+
rpc: ${ENVIO_ARBITRUM_FALLBACK_RPC:-https://arbitrum.llamarpc.com}
247248
start_block: 146489425
248-
rpc: https://arb-mainnet.g.alchemy.com/v2/${ENVIO_ALCHEMY_API_KEY}
249249
contracts:
250250
- name: Registry
251251
address:
@@ -262,7 +262,7 @@ networks:
262262
- 0x2ce7E4cB5Edb140A9327e67De85463186E757C8f
263263

264264
- id: 43114 # avalanche
265-
rpc: https://avax-mainnet.g.alchemy.com/v2/${ENVIO_ALCHEMY_API_KEY}
265+
rpc: ${ENVIO_AVALANCHE_FALLBACK_RPC:-https://avalanche.public-rpc.com}
266266
start_block: 34540051
267267
contracts:
268268
- name: Registry
@@ -274,7 +274,7 @@ networks:
274274
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1
275275

276276
- id: 42220 # celo-mainnet
277-
rpc: https://celo-mainnet.g.alchemy.com/v2/${ENVIO_ALCHEMY_API_KEY}
277+
rpc: ${ENVIO_CELO_FALLBACK_RPC:-https://1rpc.io/celo}
278278
start_block: 22257475
279279
contracts:
280280
- name: Registry
@@ -286,7 +286,7 @@ networks:
286286
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1
287287

288288
- id: 534352 # scroll
289-
rpc: https://scroll-mainnet.g.alchemy.com/v2/${ENVIO_ALCHEMY_API_KEY}
289+
rpc: ${ENVIO_SCROLL_FALLBACK_RPC:-https://1rpc.io/scroll}
290290
start_block: 2683205
291291
contracts:
292292
- name: Registry
@@ -344,7 +344,7 @@ networks:
344344
#######################
345345

346346
- id: 11155111 # sepolia
347-
rpc: https://eth-sepolia.g.alchemy.com/v2/${ENVIO_ALCHEMY_API_KEY}
347+
rpc: ${ENVIO_SEPOLIA_FALLBACK_RPC:-https://1rpc.io/sepolia}
348348
start_block: 4617051
349349
contracts:
350350
- name: Registry

0 commit comments

Comments
 (0)