envio 2.0.0-fuel → 2.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/evm.schema.json +441 -0
- package/fuel.schema.json +197 -0
- package/package.json +14 -8
- package/package.json.tmpl +0 -58
- package/src/index.ts +0 -39
- package/tsconfig.json +0 -12
package/evm.schema.json
ADDED
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Envio Config Schema",
|
|
4
|
+
"description": "Schema for a YAML config for an envio indexer",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"description": {
|
|
8
|
+
"description": "Description of the project",
|
|
9
|
+
"type": [
|
|
10
|
+
"string",
|
|
11
|
+
"null"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"contracts": {
|
|
15
|
+
"description": "Global contract definitions that must contain all definitions except addresses. You can share a single handler/abi/event definitions for contracts across multiple chains.",
|
|
16
|
+
"type": [
|
|
17
|
+
"array",
|
|
18
|
+
"null"
|
|
19
|
+
],
|
|
20
|
+
"items": {
|
|
21
|
+
"$ref": "#/$defs/GlobalContract_for_ContractConfig"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"ecosystem": {
|
|
25
|
+
"description": "Ecosystem of the project.",
|
|
26
|
+
"anyOf": [
|
|
27
|
+
{
|
|
28
|
+
"$ref": "#/$defs/EcosystemTag"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "null"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"event_decoder": {
|
|
36
|
+
"description": "The event decoder to use for the indexer (default: hypersync-client)",
|
|
37
|
+
"anyOf": [
|
|
38
|
+
{
|
|
39
|
+
"$ref": "#/$defs/EventDecoder"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "null"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"field_selection": {
|
|
47
|
+
"description": "An object representing additional fields to add to the event passed to handlers.",
|
|
48
|
+
"anyOf": [
|
|
49
|
+
{
|
|
50
|
+
"$ref": "#/$defs/FieldSelection"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "null"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"name": {
|
|
58
|
+
"description": "Name of the project",
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
"networks": {
|
|
62
|
+
"description": "Configuration of the blockchain networks that the project is deployed on.",
|
|
63
|
+
"type": "array",
|
|
64
|
+
"items": {
|
|
65
|
+
"$ref": "#/$defs/Network"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"rollback_on_reorg": {
|
|
69
|
+
"description": "A flag to indicate if the indexer should rollback to the last known valid block on a reorg (default: false)",
|
|
70
|
+
"type": [
|
|
71
|
+
"boolean",
|
|
72
|
+
"null"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"save_full_history": {
|
|
76
|
+
"description": "A flag to indicate if the indexer should save the full history of events. This is useful for debugging but will increase the size of the database (default: false)",
|
|
77
|
+
"type": [
|
|
78
|
+
"boolean",
|
|
79
|
+
"null"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"schema": {
|
|
83
|
+
"description": "Custom path to config file",
|
|
84
|
+
"type": [
|
|
85
|
+
"string",
|
|
86
|
+
"null"
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"unordered_multichain_mode": {
|
|
90
|
+
"description": "A flag to indicate if the indexer should use a single queue for all chains or a queue per chain (default: false)",
|
|
91
|
+
"type": [
|
|
92
|
+
"boolean",
|
|
93
|
+
"null"
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"additionalProperties": false,
|
|
98
|
+
"required": [
|
|
99
|
+
"name",
|
|
100
|
+
"networks"
|
|
101
|
+
],
|
|
102
|
+
"$defs": {
|
|
103
|
+
"Addresses": {
|
|
104
|
+
"anyOf": [
|
|
105
|
+
{
|
|
106
|
+
"anyOf": [
|
|
107
|
+
{
|
|
108
|
+
"type": "string"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"type": "integer",
|
|
112
|
+
"format": "uint",
|
|
113
|
+
"minimum": 0
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"type": "array",
|
|
119
|
+
"items": {
|
|
120
|
+
"anyOf": [
|
|
121
|
+
{
|
|
122
|
+
"type": "string"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "integer",
|
|
126
|
+
"format": "uint",
|
|
127
|
+
"minimum": 0
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"BlockField": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"enum": [
|
|
137
|
+
"parent_hash",
|
|
138
|
+
"nonce",
|
|
139
|
+
"sha3_uncles",
|
|
140
|
+
"logs_bloom",
|
|
141
|
+
"transactions_root",
|
|
142
|
+
"state_root",
|
|
143
|
+
"receipts_root",
|
|
144
|
+
"miner",
|
|
145
|
+
"difficulty",
|
|
146
|
+
"total_difficulty",
|
|
147
|
+
"extra_data",
|
|
148
|
+
"size",
|
|
149
|
+
"gas_limit",
|
|
150
|
+
"gas_used",
|
|
151
|
+
"uncles",
|
|
152
|
+
"base_fee_per_gas"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
"EcosystemTag": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"enum": [
|
|
158
|
+
"evm"
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
"EventConfig": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"properties": {
|
|
164
|
+
"event": {
|
|
165
|
+
"type": "string"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"additionalProperties": false,
|
|
169
|
+
"required": [
|
|
170
|
+
"event"
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
"EventDecoder": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"enum": [
|
|
176
|
+
"viem",
|
|
177
|
+
"hypersync-client"
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
"FieldSelection": {
|
|
181
|
+
"type": "object",
|
|
182
|
+
"properties": {
|
|
183
|
+
"block_fields": {
|
|
184
|
+
"description": "Fields of a block to add to the event passed to handlers",
|
|
185
|
+
"type": [
|
|
186
|
+
"array",
|
|
187
|
+
"null"
|
|
188
|
+
],
|
|
189
|
+
"items": {
|
|
190
|
+
"$ref": "#/$defs/BlockField"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"transaction_fields": {
|
|
194
|
+
"description": "Fields of a transaction to add to the event passed to handlers",
|
|
195
|
+
"type": [
|
|
196
|
+
"array",
|
|
197
|
+
"null"
|
|
198
|
+
],
|
|
199
|
+
"items": {
|
|
200
|
+
"$ref": "#/$defs/TransactionField"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"additionalProperties": false
|
|
205
|
+
},
|
|
206
|
+
"GlobalContract_for_ContractConfig": {
|
|
207
|
+
"type": "object",
|
|
208
|
+
"properties": {
|
|
209
|
+
"abi_file_path": {
|
|
210
|
+
"type": [
|
|
211
|
+
"string",
|
|
212
|
+
"null"
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
"events": {
|
|
216
|
+
"type": "array",
|
|
217
|
+
"items": {
|
|
218
|
+
"$ref": "#/$defs/EventConfig"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"handler": {
|
|
222
|
+
"type": "string"
|
|
223
|
+
},
|
|
224
|
+
"name": {
|
|
225
|
+
"type": "string"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"additionalProperties": false,
|
|
229
|
+
"required": [
|
|
230
|
+
"name",
|
|
231
|
+
"handler",
|
|
232
|
+
"events"
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
"HypersyncConfig": {
|
|
236
|
+
"type": "object",
|
|
237
|
+
"properties": {
|
|
238
|
+
"url": {
|
|
239
|
+
"type": "string"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"additionalProperties": false,
|
|
243
|
+
"required": [
|
|
244
|
+
"url"
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
"Network": {
|
|
248
|
+
"type": "object",
|
|
249
|
+
"properties": {
|
|
250
|
+
"confirmed_block_threshold": {
|
|
251
|
+
"type": [
|
|
252
|
+
"integer",
|
|
253
|
+
"null"
|
|
254
|
+
],
|
|
255
|
+
"format": "int32"
|
|
256
|
+
},
|
|
257
|
+
"contracts": {
|
|
258
|
+
"type": "array",
|
|
259
|
+
"items": {
|
|
260
|
+
"$ref": "#/$defs/NetworkContract_for_ContractConfig"
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
"end_block": {
|
|
264
|
+
"type": [
|
|
265
|
+
"integer",
|
|
266
|
+
"null"
|
|
267
|
+
],
|
|
268
|
+
"format": "int32"
|
|
269
|
+
},
|
|
270
|
+
"hypersync_config": {
|
|
271
|
+
"anyOf": [
|
|
272
|
+
{
|
|
273
|
+
"$ref": "#/$defs/HypersyncConfig"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"type": "null"
|
|
277
|
+
}
|
|
278
|
+
]
|
|
279
|
+
},
|
|
280
|
+
"id": {
|
|
281
|
+
"type": "integer",
|
|
282
|
+
"format": "uint64",
|
|
283
|
+
"minimum": 0
|
|
284
|
+
},
|
|
285
|
+
"rpc_config": {
|
|
286
|
+
"anyOf": [
|
|
287
|
+
{
|
|
288
|
+
"$ref": "#/$defs/RpcConfig"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"type": "null"
|
|
292
|
+
}
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
"start_block": {
|
|
296
|
+
"type": "integer",
|
|
297
|
+
"format": "int32"
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"additionalProperties": false,
|
|
301
|
+
"required": [
|
|
302
|
+
"id",
|
|
303
|
+
"start_block",
|
|
304
|
+
"contracts"
|
|
305
|
+
]
|
|
306
|
+
},
|
|
307
|
+
"NetworkContract_for_ContractConfig": {
|
|
308
|
+
"type": "object",
|
|
309
|
+
"properties": {
|
|
310
|
+
"abi_file_path": {
|
|
311
|
+
"type": [
|
|
312
|
+
"string",
|
|
313
|
+
"null"
|
|
314
|
+
]
|
|
315
|
+
},
|
|
316
|
+
"address": {
|
|
317
|
+
"$ref": "#/$defs/Addresses"
|
|
318
|
+
},
|
|
319
|
+
"events": {
|
|
320
|
+
"type": "array",
|
|
321
|
+
"items": {
|
|
322
|
+
"$ref": "#/$defs/EventConfig"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"handler": {
|
|
326
|
+
"type": "string"
|
|
327
|
+
},
|
|
328
|
+
"name": {
|
|
329
|
+
"type": "string"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"additionalProperties": false,
|
|
333
|
+
"required": [
|
|
334
|
+
"name"
|
|
335
|
+
]
|
|
336
|
+
},
|
|
337
|
+
"RpcConfig": {
|
|
338
|
+
"type": "object",
|
|
339
|
+
"properties": {
|
|
340
|
+
"unstable__sync_config": {
|
|
341
|
+
"anyOf": [
|
|
342
|
+
{
|
|
343
|
+
"$ref": "#/$defs/SyncConfigUnstable"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"type": "null"
|
|
347
|
+
}
|
|
348
|
+
]
|
|
349
|
+
},
|
|
350
|
+
"url": {
|
|
351
|
+
"type": "string"
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
"additionalProperties": false,
|
|
355
|
+
"required": [
|
|
356
|
+
"url"
|
|
357
|
+
]
|
|
358
|
+
},
|
|
359
|
+
"SyncConfigUnstable": {
|
|
360
|
+
"type": "object",
|
|
361
|
+
"properties": {
|
|
362
|
+
"acceleration_additive": {
|
|
363
|
+
"type": [
|
|
364
|
+
"integer",
|
|
365
|
+
"null"
|
|
366
|
+
],
|
|
367
|
+
"format": "uint32",
|
|
368
|
+
"minimum": 0
|
|
369
|
+
},
|
|
370
|
+
"backoff_millis": {
|
|
371
|
+
"type": [
|
|
372
|
+
"integer",
|
|
373
|
+
"null"
|
|
374
|
+
],
|
|
375
|
+
"format": "uint32",
|
|
376
|
+
"minimum": 0
|
|
377
|
+
},
|
|
378
|
+
"backoff_multiplicative": {
|
|
379
|
+
"type": [
|
|
380
|
+
"number",
|
|
381
|
+
"null"
|
|
382
|
+
],
|
|
383
|
+
"format": "float"
|
|
384
|
+
},
|
|
385
|
+
"initial_block_interval": {
|
|
386
|
+
"type": [
|
|
387
|
+
"integer",
|
|
388
|
+
"null"
|
|
389
|
+
],
|
|
390
|
+
"format": "uint32",
|
|
391
|
+
"minimum": 0
|
|
392
|
+
},
|
|
393
|
+
"interval_ceiling": {
|
|
394
|
+
"type": [
|
|
395
|
+
"integer",
|
|
396
|
+
"null"
|
|
397
|
+
],
|
|
398
|
+
"format": "uint32",
|
|
399
|
+
"minimum": 0
|
|
400
|
+
},
|
|
401
|
+
"query_timeout_millis": {
|
|
402
|
+
"type": [
|
|
403
|
+
"integer",
|
|
404
|
+
"null"
|
|
405
|
+
],
|
|
406
|
+
"format": "uint32",
|
|
407
|
+
"minimum": 0
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"additionalProperties": false
|
|
411
|
+
},
|
|
412
|
+
"TransactionField": {
|
|
413
|
+
"type": "string",
|
|
414
|
+
"enum": [
|
|
415
|
+
"transaction_index",
|
|
416
|
+
"hash",
|
|
417
|
+
"from",
|
|
418
|
+
"to",
|
|
419
|
+
"gas",
|
|
420
|
+
"gas_price",
|
|
421
|
+
"max_priority_fee_per_gas",
|
|
422
|
+
"max_fee_per_gas",
|
|
423
|
+
"cumulative_gas_used",
|
|
424
|
+
"effective_gas_price",
|
|
425
|
+
"gas_used",
|
|
426
|
+
"input",
|
|
427
|
+
"nonce",
|
|
428
|
+
"value",
|
|
429
|
+
"v",
|
|
430
|
+
"r",
|
|
431
|
+
"s",
|
|
432
|
+
"contract_address",
|
|
433
|
+
"logs_bloom",
|
|
434
|
+
"type",
|
|
435
|
+
"root",
|
|
436
|
+
"status",
|
|
437
|
+
"sighash"
|
|
438
|
+
]
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
package/fuel.schema.json
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Envio Config Schema",
|
|
4
|
+
"description": "Schema for a YAML config for an envio indexer",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"description": {
|
|
8
|
+
"description": "Description of the project",
|
|
9
|
+
"type": [
|
|
10
|
+
"string",
|
|
11
|
+
"null"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"contracts": {
|
|
15
|
+
"description": "Global contract definitions that must contain all definitions except addresses. You can share a single handler/abi/event definitions for contracts across multiple chains.",
|
|
16
|
+
"type": [
|
|
17
|
+
"array",
|
|
18
|
+
"null"
|
|
19
|
+
],
|
|
20
|
+
"items": {
|
|
21
|
+
"$ref": "#/$defs/GlobalContract_for_ContractConfig"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"ecosystem": {
|
|
25
|
+
"description": "Ecosystem of the project.",
|
|
26
|
+
"$ref": "#/$defs/EcosystemTag"
|
|
27
|
+
},
|
|
28
|
+
"name": {
|
|
29
|
+
"description": "Name of the project",
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"networks": {
|
|
33
|
+
"description": "Configuration of the blockchain networks that the project is deployed on.",
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": {
|
|
36
|
+
"$ref": "#/$defs/Network"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"schema": {
|
|
40
|
+
"description": "Custom path to config file",
|
|
41
|
+
"type": [
|
|
42
|
+
"string",
|
|
43
|
+
"null"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": [
|
|
49
|
+
"name",
|
|
50
|
+
"ecosystem",
|
|
51
|
+
"networks"
|
|
52
|
+
],
|
|
53
|
+
"$defs": {
|
|
54
|
+
"Addresses": {
|
|
55
|
+
"anyOf": [
|
|
56
|
+
{
|
|
57
|
+
"anyOf": [
|
|
58
|
+
{
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "integer",
|
|
63
|
+
"format": "uint",
|
|
64
|
+
"minimum": 0
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"anyOf": [
|
|
72
|
+
{
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "integer",
|
|
77
|
+
"format": "uint",
|
|
78
|
+
"minimum": 0
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"EcosystemTag": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"enum": [
|
|
88
|
+
"fuel"
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"EventConfig": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"properties": {
|
|
94
|
+
"logId": {
|
|
95
|
+
"type": [
|
|
96
|
+
"string",
|
|
97
|
+
"null"
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"name": {
|
|
101
|
+
"type": "string"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"required": [
|
|
106
|
+
"name"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"GlobalContract_for_ContractConfig": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"properties": {
|
|
112
|
+
"abi_file_path": {
|
|
113
|
+
"type": "string"
|
|
114
|
+
},
|
|
115
|
+
"events": {
|
|
116
|
+
"type": "array",
|
|
117
|
+
"items": {
|
|
118
|
+
"$ref": "#/$defs/EventConfig"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"handler": {
|
|
122
|
+
"type": "string"
|
|
123
|
+
},
|
|
124
|
+
"name": {
|
|
125
|
+
"type": "string"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"additionalProperties": false,
|
|
129
|
+
"required": [
|
|
130
|
+
"name",
|
|
131
|
+
"abi_file_path",
|
|
132
|
+
"handler",
|
|
133
|
+
"events"
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
"Network": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"properties": {
|
|
139
|
+
"contracts": {
|
|
140
|
+
"type": "array",
|
|
141
|
+
"items": {
|
|
142
|
+
"$ref": "#/$defs/NetworkContract_for_ContractConfig"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"end_block": {
|
|
146
|
+
"type": [
|
|
147
|
+
"integer",
|
|
148
|
+
"null"
|
|
149
|
+
],
|
|
150
|
+
"format": "int32"
|
|
151
|
+
},
|
|
152
|
+
"id": {
|
|
153
|
+
"type": "integer",
|
|
154
|
+
"format": "uint64",
|
|
155
|
+
"minimum": 0
|
|
156
|
+
},
|
|
157
|
+
"start_block": {
|
|
158
|
+
"type": "integer",
|
|
159
|
+
"format": "int32"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"additionalProperties": false,
|
|
163
|
+
"required": [
|
|
164
|
+
"id",
|
|
165
|
+
"start_block",
|
|
166
|
+
"contracts"
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
"NetworkContract_for_ContractConfig": {
|
|
170
|
+
"type": "object",
|
|
171
|
+
"properties": {
|
|
172
|
+
"abi_file_path": {
|
|
173
|
+
"type": "string"
|
|
174
|
+
},
|
|
175
|
+
"address": {
|
|
176
|
+
"$ref": "#/$defs/Addresses"
|
|
177
|
+
},
|
|
178
|
+
"events": {
|
|
179
|
+
"type": "array",
|
|
180
|
+
"items": {
|
|
181
|
+
"$ref": "#/$defs/EventConfig"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"handler": {
|
|
185
|
+
"type": "string"
|
|
186
|
+
},
|
|
187
|
+
"name": {
|
|
188
|
+
"type": "string"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"additionalProperties": false,
|
|
192
|
+
"required": [
|
|
193
|
+
"name"
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "envio",
|
|
3
|
-
"version": "v2.0.0-
|
|
4
|
-
"description": "A
|
|
3
|
+
"version": "v2.0.0-rc.2",
|
|
4
|
+
"description": "A latency and sync speed optimized, developer friendly blockchain data indexer.",
|
|
5
5
|
"bin": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"typecheck": "tsc --noEmit",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"blockchain",
|
|
19
19
|
"indexer",
|
|
20
20
|
"ethereum",
|
|
21
|
+
"fuel",
|
|
21
22
|
"data",
|
|
22
23
|
"dapp"
|
|
23
24
|
],
|
|
@@ -35,11 +36,11 @@
|
|
|
35
36
|
"typescript": "^4.9.4"
|
|
36
37
|
},
|
|
37
38
|
"optionalDependencies": {
|
|
38
|
-
"envio-linux-x64": "v2.0.0-
|
|
39
|
-
"envio-linux-arm64": "v2.0.0-
|
|
40
|
-
"envio-darwin-x64": "v2.0.0-
|
|
41
|
-
"envio-darwin-arm64": "v2.0.0-
|
|
42
|
-
"envio-win32-x64": "v2.0.0-
|
|
39
|
+
"envio-linux-x64": "v2.0.0-rc.2",
|
|
40
|
+
"envio-linux-arm64": "v2.0.0-rc.2",
|
|
41
|
+
"envio-darwin-x64": "v2.0.0-rc.2",
|
|
42
|
+
"envio-darwin-arm64": "v2.0.0-rc.2",
|
|
43
|
+
"envio-win32-x64": "v2.0.0-rc.2"
|
|
43
44
|
},
|
|
44
45
|
"eslintConfig": {
|
|
45
46
|
"extends": [
|
|
@@ -54,5 +55,10 @@
|
|
|
54
55
|
"lib/*"
|
|
55
56
|
],
|
|
56
57
|
"root": true
|
|
57
|
-
}
|
|
58
|
+
},
|
|
59
|
+
"files": [
|
|
60
|
+
"lib",
|
|
61
|
+
"evm.schema.json",
|
|
62
|
+
"fuel.schema.json"
|
|
63
|
+
]
|
|
58
64
|
}
|
package/package.json.tmpl
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "envio",
|
|
3
|
-
"version": "${version}",
|
|
4
|
-
"description": "A ️latency and sync speed optimized, developer friendly blockchain data indexer.",
|
|
5
|
-
"bin": "lib/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"typecheck": "tsc --noEmit",
|
|
8
|
-
"lint": "eslint .",
|
|
9
|
-
"lint:fix": "eslint . --fix",
|
|
10
|
-
"build": "tsc",
|
|
11
|
-
"dev": "pnpm build && node lib/index.js"
|
|
12
|
-
},
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/enviodev/indexer.git"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"blockchain",
|
|
19
|
-
"indexer",
|
|
20
|
-
"ethereum",
|
|
21
|
-
"data",
|
|
22
|
-
"dapp"
|
|
23
|
-
],
|
|
24
|
-
"author": "envio contributors <about@envio.dev>",
|
|
25
|
-
"license": "GPL-3.0",
|
|
26
|
-
"bugs": {
|
|
27
|
-
"url": "https://github.com/enviodev/indexer/issues"
|
|
28
|
-
},
|
|
29
|
-
"homepage": "https://github.com/enviodev/indexer#readme",
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@types/node": "^18.11.18",
|
|
32
|
-
"@typescript-eslint/eslint-plugin": "^5.48.0",
|
|
33
|
-
"@typescript-eslint/parser": "^5.48.0",
|
|
34
|
-
"eslint": "^8.31.0",
|
|
35
|
-
"typescript": "^4.9.4"
|
|
36
|
-
},
|
|
37
|
-
"optionalDependencies": {
|
|
38
|
-
"envio-linux-x64": "${version}",
|
|
39
|
-
"envio-linux-arm64": "${version}",
|
|
40
|
-
"envio-darwin-x64": "${version}",
|
|
41
|
-
"envio-darwin-arm64": "${version}",
|
|
42
|
-
"envio-win32-x64": "${version}"
|
|
43
|
-
},
|
|
44
|
-
"eslintConfig": {
|
|
45
|
-
"extends": [
|
|
46
|
-
"eslint:recommended",
|
|
47
|
-
"plugin:@typescript-eslint/recommended"
|
|
48
|
-
],
|
|
49
|
-
"parser": "@typescript-eslint/parser",
|
|
50
|
-
"plugins": [
|
|
51
|
-
"@typescript-eslint"
|
|
52
|
-
],
|
|
53
|
-
"ignorePatterns": [
|
|
54
|
-
"lib/*"
|
|
55
|
-
],
|
|
56
|
-
"root": true
|
|
57
|
-
}
|
|
58
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { spawnSync } from "child_process"
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Returns the executable path for envio located inside node_modules
|
|
7
|
-
* The naming convention is envio-${os}-${arch}
|
|
8
|
-
* If the platform is `win32` or `cygwin`, executable will include a `.exe` extension
|
|
9
|
-
* @see https://nodejs.org/api/os.html#osarch
|
|
10
|
-
* @see https://nodejs.org/api/os.html#osplatform
|
|
11
|
-
* @example "x/xx/node_modules/envio-darwin-arm64"
|
|
12
|
-
*/
|
|
13
|
-
function getExePath() {
|
|
14
|
-
const arch = process.arch;
|
|
15
|
-
let os = process.platform as string;
|
|
16
|
-
let extension = '';
|
|
17
|
-
if (['win32', 'cygwin'].includes(process.platform)) {
|
|
18
|
-
os = 'windows';
|
|
19
|
-
extension = '.exe';
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
try {
|
|
23
|
-
// Since the bin will be located inside `node_modules`, we can simply call require.resolve
|
|
24
|
-
return require.resolve(`envio-${os}-${arch}/bin/envio${extension}`)
|
|
25
|
-
} catch (e) {
|
|
26
|
-
throw new Error(`Couldn't find envio binary inside node_modules for ${os}-${arch}`)
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Runs `envio` with args using nodejs spawn
|
|
32
|
-
*/
|
|
33
|
-
function runEnvio() {
|
|
34
|
-
const args = process.argv.slice(2)
|
|
35
|
-
const processResult = spawnSync(getExePath(), args, { stdio: "inherit" })
|
|
36
|
-
process.exit(processResult.status ?? 0)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
runEnvio()
|
package/tsconfig.json
DELETED