envio 2.0.0-rc.5 → 2.0.0

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 CHANGED
@@ -11,15 +11,9 @@
11
11
  "null"
12
12
  ]
13
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
- }
14
+ "name": {
15
+ "description": "Name of the project",
16
+ "type": "string"
23
17
  },
24
18
  "ecosystem": {
25
19
  "description": "Ecosystem of the project.",
@@ -32,31 +26,22 @@
32
26
  }
33
27
  ]
34
28
  },
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
- }
29
+ "schema": {
30
+ "description": "Custom path to config file",
31
+ "type": [
32
+ "string",
33
+ "null"
55
34
  ]
56
35
  },
57
- "name": {
58
- "description": "Name of the project",
59
- "type": "string"
36
+ "contracts": {
37
+ "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.",
38
+ "type": [
39
+ "array",
40
+ "null"
41
+ ],
42
+ "items": {
43
+ "$ref": "#/$defs/GlobalContract_for_ContractConfig"
44
+ }
60
45
  },
61
46
  "networks": {
62
47
  "description": "Configuration of the blockchain networks that the project is deployed on.",
@@ -65,13 +50,24 @@
65
50
  "$ref": "#/$defs/Network"
66
51
  }
67
52
  },
68
- "raw_events": {
69
- "description": "If true, the indexer will store the raw event data in the database. This is useful for debugging, but will increase the size of the database and the amount of time it takes to process events (default: false)",
53
+ "unordered_multichain_mode": {
54
+ "description": "A flag to indicate if the indexer should use a single queue for all chains or a queue per chain (default: false)",
70
55
  "type": [
71
56
  "boolean",
72
57
  "null"
73
58
  ]
74
59
  },
60
+ "event_decoder": {
61
+ "description": "The event decoder to use for the indexer (default: hypersync-client)",
62
+ "anyOf": [
63
+ {
64
+ "$ref": "#/$defs/EventDecoder"
65
+ },
66
+ {
67
+ "type": "null"
68
+ }
69
+ ]
70
+ },
75
71
  "rollback_on_reorg": {
76
72
  "description": "A flag to indicate if the indexer should rollback to the last known valid block on a reorg (default: false)",
77
73
  "type": [
@@ -86,15 +82,19 @@
86
82
  "null"
87
83
  ]
88
84
  },
89
- "schema": {
90
- "description": "Custom path to config file",
91
- "type": [
92
- "string",
93
- "null"
85
+ "field_selection": {
86
+ "description": "An object representing additional fields to add to the event passed to handlers.",
87
+ "anyOf": [
88
+ {
89
+ "$ref": "#/$defs/FieldSelection"
90
+ },
91
+ {
92
+ "type": "null"
93
+ }
94
94
  ]
95
95
  },
96
- "unordered_multichain_mode": {
97
- "description": "A flag to indicate if the indexer should use a single queue for all chains or a queue per chain (default: false)",
96
+ "raw_events": {
97
+ "description": "If true, the indexer will store the raw event data in the database. This is useful for debugging, but will increase the size of the database and the amount of time it takes to process events (default: false)",
98
98
  "type": [
99
99
  "boolean",
100
100
  "null"
@@ -107,129 +107,36 @@
107
107
  "networks"
108
108
  ],
109
109
  "$defs": {
110
- "Addresses": {
111
- "anyOf": [
112
- {
113
- "anyOf": [
114
- {
115
- "type": "string"
116
- },
117
- {
118
- "type": "integer",
119
- "format": "uint",
120
- "minimum": 0
121
- }
122
- ]
123
- },
124
- {
125
- "type": "array",
126
- "items": {
127
- "anyOf": [
128
- {
129
- "type": "string"
130
- },
131
- {
132
- "type": "integer",
133
- "format": "uint",
134
- "minimum": 0
135
- }
136
- ]
137
- }
138
- }
139
- ]
140
- },
141
- "BlockField": {
142
- "type": "string",
143
- "enum": [
144
- "parent_hash",
145
- "nonce",
146
- "sha3_uncles",
147
- "logs_bloom",
148
- "transactions_root",
149
- "state_root",
150
- "receipts_root",
151
- "miner",
152
- "difficulty",
153
- "total_difficulty",
154
- "extra_data",
155
- "size",
156
- "gas_limit",
157
- "gas_used",
158
- "uncles",
159
- "base_fee_per_gas"
160
- ]
161
- },
162
110
  "EcosystemTag": {
163
111
  "type": "string",
164
112
  "enum": [
165
113
  "evm"
166
114
  ]
167
115
  },
168
- "EventConfig": {
116
+ "GlobalContract_for_ContractConfig": {
169
117
  "type": "object",
170
118
  "properties": {
171
- "event": {
119
+ "name": {
120
+ "description": "A unique project-wide name for this contract (no spaces)",
172
121
  "type": "string"
173
- }
174
- },
175
- "additionalProperties": false,
176
- "required": [
177
- "event"
178
- ]
179
- },
180
- "EventDecoder": {
181
- "type": "string",
182
- "enum": [
183
- "viem",
184
- "hypersync-client"
185
- ]
186
- },
187
- "FieldSelection": {
188
- "type": "object",
189
- "properties": {
190
- "block_fields": {
191
- "description": "Fields of a block to add to the event passed to handlers",
192
- "type": [
193
- "array",
194
- "null"
195
- ],
196
- "items": {
197
- "$ref": "#/$defs/BlockField"
198
- }
199
122
  },
200
- "transaction_fields": {
201
- "description": "Fields of a transaction to add to the event passed to handlers",
202
- "type": [
203
- "array",
204
- "null"
205
- ],
206
- "items": {
207
- "$ref": "#/$defs/TransactionField"
208
- }
209
- }
210
- },
211
- "additionalProperties": false
212
- },
213
- "GlobalContract_for_ContractConfig": {
214
- "type": "object",
215
- "properties": {
216
123
  "abi_file_path": {
124
+ "description": "Relative path (from config) to a json abi. If this is used then each configured event should simply be referenced by its name",
217
125
  "type": [
218
126
  "string",
219
127
  "null"
220
128
  ]
221
129
  },
130
+ "handler": {
131
+ "description": "The relative path to a file where handlers are registered for the given contract",
132
+ "type": "string"
133
+ },
222
134
  "events": {
135
+ "description": "A list of events that should be indexed on this contract",
223
136
  "type": "array",
224
137
  "items": {
225
138
  "$ref": "#/$defs/EventConfig"
226
139
  }
227
- },
228
- "handler": {
229
- "type": "string"
230
- },
231
- "name": {
232
- "type": "string"
233
140
  }
234
141
  },
235
142
  "additionalProperties": false,
@@ -239,124 +146,89 @@
239
146
  "events"
240
147
  ]
241
148
  },
242
- "HypersyncConfig": {
149
+ "EventConfig": {
243
150
  "type": "object",
244
151
  "properties": {
245
- "url": {
246
- "description": "URL of the HyperSync endpoint (default: The most performant HyperSync endpoint for the network)",
152
+ "event": {
153
+ "description": "The human readable signature of an event 'eg. Transfer(address indexed from, address indexed to, uint256 value)' OR a reference to the name of an event in a json ABI file defined in your contract config. A provided signature will take precedence over what is defined in the json ABI",
247
154
  "type": "string"
248
155
  }
249
156
  },
250
157
  "additionalProperties": false,
251
158
  "required": [
252
- "url"
159
+ "event"
253
160
  ]
254
161
  },
255
162
  "Network": {
256
163
  "type": "object",
257
164
  "properties": {
258
- "confirmed_block_threshold": {
259
- "type": [
260
- "integer",
261
- "null"
262
- ],
263
- "format": "int32"
264
- },
265
- "contracts": {
266
- "type": "array",
267
- "items": {
268
- "$ref": "#/$defs/NetworkContract_for_ContractConfig"
269
- }
270
- },
271
- "end_block": {
272
- "type": [
273
- "integer",
274
- "null"
275
- ],
276
- "format": "int32"
165
+ "id": {
166
+ "description": "Public chain/network id",
167
+ "type": "integer",
168
+ "format": "uint64",
169
+ "minimum": 0
277
170
  },
278
- "hypersync_config": {
279
- "description": "Optional HyperSync Config for additional fine-tuning",
171
+ "rpc_config": {
172
+ "description": "RPC Config that will be used to subscribe to blockchain data on this network (TIP: This is optional and in most cases does not need to be specified if the network is supported with HyperSync. We recommend using HyperSync instead of RPC for 100x speed-up)",
280
173
  "anyOf": [
281
174
  {
282
- "$ref": "#/$defs/HypersyncConfig"
175
+ "$ref": "#/$defs/RpcConfig"
283
176
  },
284
177
  {
285
178
  "type": "null"
286
179
  }
287
180
  ]
288
181
  },
289
- "id": {
290
- "type": "integer",
291
- "format": "uint64",
292
- "minimum": 0
293
- },
294
- "rpc_config": {
295
- "description": "RPC Config that will be used to subscribe to blockchain data on this network (TIP: This is optional and in most cases does not need to be specified if the network is supported with HyperSync. We recommend using HyperSync instead of RPC for 100x speed-up)",
182
+ "hypersync_config": {
183
+ "description": "Optional HyperSync Config for additional fine-tuning",
296
184
  "anyOf": [
297
185
  {
298
- "$ref": "#/$defs/RpcConfig"
186
+ "$ref": "#/$defs/HypersyncConfig"
299
187
  },
300
188
  {
301
189
  "type": "null"
302
190
  }
303
191
  ]
304
192
  },
193
+ "confirmed_block_threshold": {
194
+ "description": "The number of blocks from the head that the indexer should account for in case of reorgs.",
195
+ "type": [
196
+ "integer",
197
+ "null"
198
+ ],
199
+ "format": "int32"
200
+ },
305
201
  "start_block": {
202
+ "description": "The block at which the indexer should start ingesting data",
306
203
  "type": "integer",
307
204
  "format": "int32"
308
- }
309
- },
310
- "additionalProperties": false,
311
- "required": [
312
- "id",
313
- "start_block",
314
- "contracts"
315
- ]
316
- },
317
- "NetworkContract_for_ContractConfig": {
318
- "type": "object",
319
- "properties": {
320
- "abi_file_path": {
205
+ },
206
+ "end_block": {
207
+ "description": "The block at which the indexer should terminate.",
321
208
  "type": [
322
- "string",
209
+ "integer",
323
210
  "null"
324
- ]
325
- },
326
- "address": {
327
- "$ref": "#/$defs/Addresses"
211
+ ],
212
+ "format": "int32"
328
213
  },
329
- "events": {
214
+ "contracts": {
215
+ "description": "All the contracts that should be indexed on the given network",
330
216
  "type": "array",
331
217
  "items": {
332
- "$ref": "#/$defs/EventConfig"
218
+ "$ref": "#/$defs/NetworkContract_for_ContractConfig"
333
219
  }
334
- },
335
- "handler": {
336
- "type": "string"
337
- },
338
- "name": {
339
- "type": "string"
340
220
  }
341
221
  },
342
222
  "additionalProperties": false,
343
223
  "required": [
344
- "name"
224
+ "id",
225
+ "start_block",
226
+ "contracts"
345
227
  ]
346
228
  },
347
229
  "RpcConfig": {
348
230
  "type": "object",
349
231
  "properties": {
350
- "unstable__sync_config": {
351
- "anyOf": [
352
- {
353
- "$ref": "#/$defs/SyncConfigUnstable"
354
- },
355
- {
356
- "type": "null"
357
- }
358
- ]
359
- },
360
232
  "url": {
361
233
  "description": "URL of the RPC endpoint. Can be a single URL or an array of URLs. If multiple URLs are provided, the first one will be used as the primary RPC endpoint and the rest will be used as fallbacks.",
362
234
  "anyOf": [
@@ -370,25 +242,9 @@
370
242
  }
371
243
  }
372
244
  ]
373
- }
374
- },
375
- "additionalProperties": false,
376
- "required": [
377
- "url"
378
- ]
379
- },
380
- "SyncConfigUnstable": {
381
- "type": "object",
382
- "properties": {
383
- "acceleration_additive": {
384
- "type": [
385
- "integer",
386
- "null"
387
- ],
388
- "format": "uint32",
389
- "minimum": 0
390
245
  },
391
- "backoff_millis": {
246
+ "initial_block_interval": {
247
+ "description": "The starting interval in range of blocks per query",
392
248
  "type": [
393
249
  "integer",
394
250
  "null"
@@ -397,13 +253,15 @@
397
253
  "minimum": 0
398
254
  },
399
255
  "backoff_multiplicative": {
256
+ "description": "After an RPC error, how much to scale back the number of blocks requested at once",
400
257
  "type": [
401
258
  "number",
402
259
  "null"
403
260
  ],
404
261
  "format": "double"
405
262
  },
406
- "fallback_stall_timeout": {
263
+ "acceleration_additive": {
264
+ "description": "Without RPC errors or timeouts, how much to increase the number of blocks requested by for the next batch",
407
265
  "type": [
408
266
  "integer",
409
267
  "null"
@@ -411,7 +269,8 @@
411
269
  "format": "uint32",
412
270
  "minimum": 0
413
271
  },
414
- "initial_block_interval": {
272
+ "interval_ceiling": {
273
+ "description": "Do not further increase the block interval past this limit",
415
274
  "type": [
416
275
  "integer",
417
276
  "null"
@@ -419,7 +278,17 @@
419
278
  "format": "uint32",
420
279
  "minimum": 0
421
280
  },
422
- "interval_ceiling": {
281
+ "backoff_millis": {
282
+ "description": "After an error, how long to wait before retrying",
283
+ "type": [
284
+ "integer",
285
+ "null"
286
+ ],
287
+ "format": "uint32",
288
+ "minimum": 0
289
+ },
290
+ "fallback_stall_timeout": {
291
+ "description": "If a fallback RPC is provided, the amount of time in ms to wait before kicking off the next provider",
423
292
  "type": [
424
293
  "integer",
425
294
  "null"
@@ -428,6 +297,7 @@
428
297
  "minimum": 0
429
298
  },
430
299
  "query_timeout_millis": {
300
+ "description": "How long to wait before cancelling an RPC request",
431
301
  "type": [
432
302
  "integer",
433
303
  "null"
@@ -436,6 +306,121 @@
436
306
  "minimum": 0
437
307
  }
438
308
  },
309
+ "additionalProperties": false,
310
+ "required": [
311
+ "url"
312
+ ]
313
+ },
314
+ "HypersyncConfig": {
315
+ "type": "object",
316
+ "properties": {
317
+ "url": {
318
+ "description": "URL of the HyperSync endpoint (default: The most performant HyperSync endpoint for the network)",
319
+ "type": "string"
320
+ }
321
+ },
322
+ "additionalProperties": false,
323
+ "required": [
324
+ "url"
325
+ ]
326
+ },
327
+ "NetworkContract_for_ContractConfig": {
328
+ "type": "object",
329
+ "properties": {
330
+ "name": {
331
+ "description": "A unique project-wide name for this contract if events and handler are defined OR a reference to the name of contract defined globally at the top level",
332
+ "type": "string"
333
+ },
334
+ "address": {
335
+ "description": "A single address or a list of addresses to be indexed. This can be left as null in the case where this contracts addresses will be registered dynamically.",
336
+ "$ref": "#/$defs/Addresses"
337
+ },
338
+ "abi_file_path": {
339
+ "description": "Relative path (from config) to a json abi. If this is used then each configured event should simply be referenced by its name",
340
+ "type": [
341
+ "string",
342
+ "null"
343
+ ]
344
+ },
345
+ "handler": {
346
+ "description": "The relative path to a file where handlers are registered for the given contract",
347
+ "type": "string"
348
+ },
349
+ "events": {
350
+ "description": "A list of events that should be indexed on this contract",
351
+ "type": "array",
352
+ "items": {
353
+ "$ref": "#/$defs/EventConfig"
354
+ }
355
+ }
356
+ },
357
+ "additionalProperties": false,
358
+ "required": [
359
+ "name"
360
+ ]
361
+ },
362
+ "Addresses": {
363
+ "anyOf": [
364
+ {
365
+ "anyOf": [
366
+ {
367
+ "type": "string"
368
+ },
369
+ {
370
+ "type": "integer",
371
+ "format": "uint",
372
+ "minimum": 0
373
+ }
374
+ ]
375
+ },
376
+ {
377
+ "type": "array",
378
+ "items": {
379
+ "anyOf": [
380
+ {
381
+ "type": "string"
382
+ },
383
+ {
384
+ "type": "integer",
385
+ "format": "uint",
386
+ "minimum": 0
387
+ }
388
+ ]
389
+ }
390
+ }
391
+ ]
392
+ },
393
+ "EventDecoder": {
394
+ "type": "string",
395
+ "enum": [
396
+ "viem",
397
+ "hypersync-client"
398
+ ]
399
+ },
400
+ "FieldSelection": {
401
+ "type": "object",
402
+ "properties": {
403
+ "transaction_fields": {
404
+ "description": "Fields of a transaction to add to the event passed to handlers",
405
+ "type": [
406
+ "array",
407
+ "null"
408
+ ],
409
+ "items": {
410
+ "$ref": "#/$defs/TransactionField"
411
+ }
412
+ },
413
+ "block_fields": {
414
+ "description": "Fields of a block to add to the event passed to handlers",
415
+ "type": [
416
+ "array",
417
+ "null"
418
+ ],
419
+ "items": {
420
+ "$ref": "#/$defs/BlockField"
421
+ }
422
+ }
423
+ },
439
424
  "additionalProperties": false
440
425
  },
441
426
  "TransactionField": {
@@ -465,6 +450,27 @@
465
450
  "status",
466
451
  "sighash"
467
452
  ]
453
+ },
454
+ "BlockField": {
455
+ "type": "string",
456
+ "enum": [
457
+ "parent_hash",
458
+ "nonce",
459
+ "sha3_uncles",
460
+ "logs_bloom",
461
+ "transactions_root",
462
+ "state_root",
463
+ "receipts_root",
464
+ "miner",
465
+ "difficulty",
466
+ "total_difficulty",
467
+ "extra_data",
468
+ "size",
469
+ "gas_limit",
470
+ "gas_used",
471
+ "uncles",
472
+ "base_fee_per_gas"
473
+ ]
468
474
  }
469
475
  }
470
476
  }
package/fuel.schema.json CHANGED
@@ -11,6 +11,21 @@
11
11
  "null"
12
12
  ]
13
13
  },
14
+ "name": {
15
+ "description": "Name of the project",
16
+ "type": "string"
17
+ },
18
+ "ecosystem": {
19
+ "description": "Ecosystem of the project.",
20
+ "$ref": "#/$defs/EcosystemTag"
21
+ },
22
+ "schema": {
23
+ "description": "Custom path to config file",
24
+ "type": [
25
+ "string",
26
+ "null"
27
+ ]
28
+ },
14
29
  "contracts": {
15
30
  "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
31
  "type": [
@@ -21,27 +36,12 @@
21
36
  "$ref": "#/$defs/GlobalContract_for_ContractConfig"
22
37
  }
23
38
  },
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
39
  "networks": {
33
40
  "description": "Configuration of the blockchain networks that the project is deployed on.",
34
41
  "type": "array",
35
42
  "items": {
36
43
  "$ref": "#/$defs/Network"
37
44
  }
38
- },
39
- "schema": {
40
- "description": "Custom path to config file",
41
- "type": [
42
- "string",
43
- "null"
44
- ]
45
45
  }
46
46
  },
47
47
  "additionalProperties": false,
@@ -51,78 +51,33 @@
51
51
  "networks"
52
52
  ],
53
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
54
  "EcosystemTag": {
86
55
  "type": "string",
87
56
  "enum": [
88
57
  "fuel"
89
58
  ]
90
59
  },
91
- "EventConfig": {
60
+ "GlobalContract_for_ContractConfig": {
92
61
  "type": "object",
93
62
  "properties": {
94
- "logId": {
95
- "type": [
96
- "string",
97
- "null"
98
- ]
99
- },
100
63
  "name": {
64
+ "description": "A unique project-wide name for this contract (no spaces)",
101
65
  "type": "string"
102
- }
103
- },
104
- "additionalProperties": false,
105
- "required": [
106
- "name"
107
- ]
108
- },
109
- "GlobalContract_for_ContractConfig": {
110
- "type": "object",
111
- "properties": {
66
+ },
112
67
  "abi_file_path": {
68
+ "description": "Relative path (from config) to a json abi.",
69
+ "type": "string"
70
+ },
71
+ "handler": {
72
+ "description": "The relative path to a file where handlers are registered for the given contract",
113
73
  "type": "string"
114
74
  },
115
75
  "events": {
76
+ "description": "A list of events that should be indexed on this contract",
116
77
  "type": "array",
117
78
  "items": {
118
79
  "$ref": "#/$defs/EventConfig"
119
80
  }
120
- },
121
- "handler": {
122
- "type": "string"
123
- },
124
- "name": {
125
- "type": "string"
126
81
  }
127
82
  },
128
83
  "additionalProperties": false,
@@ -133,30 +88,54 @@
133
88
  "events"
134
89
  ]
135
90
  },
136
- "Network": {
91
+ "EventConfig": {
137
92
  "type": "object",
138
93
  "properties": {
139
- "contracts": {
140
- "type": "array",
141
- "items": {
142
- "$ref": "#/$defs/NetworkContract_for_ContractConfig"
143
- }
94
+ "name": {
95
+ "description": "A reference to a struct in the ABI or a unique name for the provided log_id",
96
+ "type": "string"
144
97
  },
145
- "end_block": {
98
+ "logId": {
99
+ "description": "A reference to a log_id in the ABI",
146
100
  "type": [
147
- "integer",
101
+ "string",
148
102
  "null"
149
- ],
150
- "format": "int32"
151
- },
103
+ ]
104
+ }
105
+ },
106
+ "additionalProperties": false,
107
+ "required": [
108
+ "name"
109
+ ]
110
+ },
111
+ "Network": {
112
+ "type": "object",
113
+ "properties": {
152
114
  "id": {
115
+ "description": "Public chain/network id",
153
116
  "type": "integer",
154
117
  "format": "uint64",
155
118
  "minimum": 0
156
119
  },
157
120
  "start_block": {
121
+ "description": "The block at which the indexer should start ingesting data",
158
122
  "type": "integer",
159
123
  "format": "int32"
124
+ },
125
+ "end_block": {
126
+ "description": "The block at which the indexer should terminate.",
127
+ "type": [
128
+ "integer",
129
+ "null"
130
+ ],
131
+ "format": "int32"
132
+ },
133
+ "contracts": {
134
+ "description": "All the contracts that should be indexed on the given network",
135
+ "type": "array",
136
+ "items": {
137
+ "$ref": "#/$defs/NetworkContract_for_ContractConfig"
138
+ }
160
139
  }
161
140
  },
162
141
  "additionalProperties": false,
@@ -169,29 +148,65 @@
169
148
  "NetworkContract_for_ContractConfig": {
170
149
  "type": "object",
171
150
  "properties": {
172
- "abi_file_path": {
151
+ "name": {
152
+ "description": "A unique project-wide name for this contract if events and handler are defined OR a reference to the name of contract defined globally at the top level",
173
153
  "type": "string"
174
154
  },
175
155
  "address": {
156
+ "description": "A single address or a list of addresses to be indexed. This can be left as null in the case where this contracts addresses will be registered dynamically.",
176
157
  "$ref": "#/$defs/Addresses"
177
158
  },
159
+ "abi_file_path": {
160
+ "description": "Relative path (from config) to a json abi.",
161
+ "type": "string"
162
+ },
163
+ "handler": {
164
+ "description": "The relative path to a file where handlers are registered for the given contract",
165
+ "type": "string"
166
+ },
178
167
  "events": {
168
+ "description": "A list of events that should be indexed on this contract",
179
169
  "type": "array",
180
170
  "items": {
181
171
  "$ref": "#/$defs/EventConfig"
182
172
  }
183
- },
184
- "handler": {
185
- "type": "string"
186
- },
187
- "name": {
188
- "type": "string"
189
173
  }
190
174
  },
191
175
  "additionalProperties": false,
192
176
  "required": [
193
177
  "name"
194
178
  ]
179
+ },
180
+ "Addresses": {
181
+ "anyOf": [
182
+ {
183
+ "anyOf": [
184
+ {
185
+ "type": "string"
186
+ },
187
+ {
188
+ "type": "integer",
189
+ "format": "uint",
190
+ "minimum": 0
191
+ }
192
+ ]
193
+ },
194
+ {
195
+ "type": "array",
196
+ "items": {
197
+ "anyOf": [
198
+ {
199
+ "type": "string"
200
+ },
201
+ {
202
+ "type": "integer",
203
+ "format": "uint",
204
+ "minimum": 0
205
+ }
206
+ ]
207
+ }
208
+ }
209
+ ]
195
210
  }
196
211
  }
197
212
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "envio",
3
- "version": "v2.0.0-rc.5",
3
+ "version": "v2.0.0",
4
4
  "description": "A latency and sync speed optimized, developer friendly blockchain data indexer.",
5
5
  "bin": "lib/index.js",
6
6
  "scripts": {
@@ -36,11 +36,11 @@
36
36
  "typescript": "^4.9.4"
37
37
  },
38
38
  "optionalDependencies": {
39
- "envio-linux-x64": "v2.0.0-rc.5",
40
- "envio-linux-arm64": "v2.0.0-rc.5",
41
- "envio-darwin-x64": "v2.0.0-rc.5",
42
- "envio-darwin-arm64": "v2.0.0-rc.5",
43
- "envio-win32-x64": "v2.0.0-rc.5"
39
+ "envio-linux-x64": "v2.0.0",
40
+ "envio-linux-arm64": "v2.0.0",
41
+ "envio-darwin-x64": "v2.0.0",
42
+ "envio-darwin-arm64": "v2.0.0",
43
+ "envio-win32-x64": "v2.0.0"
44
44
  },
45
45
  "eslintConfig": {
46
46
  "extends": [