@morpho-dev/router 0.11.0 → 0.12.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.
Files changed (46) hide show
  1. package/README.md +20 -5
  2. package/dist/cli.js +11700 -6794
  3. package/dist/drizzle/migrations/0034_chain-checkpoints.sql +1 -0
  4. package/dist/drizzle/migrations/0035_chain-tip-hash-cas.sql +1 -0
  5. package/dist/drizzle/migrations/0036_pending-links.sql +22 -0
  6. package/dist/drizzle/migrations/0037_chain-finalized-anchor.sql +2 -0
  7. package/dist/drizzle/migrations/0038_add-obligation-rcf-threshold.sql +2 -0
  8. package/dist/drizzle/migrations/0039_add-offers-composite-indexes.sql +2 -0
  9. package/dist/drizzle/migrations/0040_drop-redundant-offers-indexes.sql +2 -0
  10. package/dist/drizzle/migrations/0041_add-group-winner-expression-index.sql +10 -0
  11. package/dist/drizzle/migrations/0042_contract-sync-v1.14.sql +284 -0
  12. package/dist/drizzle/migrations/0043_add-obligation-side-tick-index.sql +1 -0
  13. package/dist/drizzle/migrations/0044_index-audit-cleanup.sql +27 -0
  14. package/dist/drizzle/migrations/0045_add-lots-offsets-availability-indexes.sql +5 -0
  15. package/dist/drizzle/migrations/0046_add-offers-active-tick-index.sql +1 -0
  16. package/dist/drizzle/migrations/0047_add-offers-book-winners-index.sql +1 -0
  17. package/dist/drizzle/migrations/0048_covering-indexes-for-winners-queries.sql +34 -0
  18. package/dist/drizzle/migrations/0049_contract-sync-v1.15.sql +305 -0
  19. package/dist/drizzle/migrations/meta/0036_snapshot.json +1864 -0
  20. package/dist/drizzle/migrations/meta/0037_snapshot.json +1876 -0
  21. package/dist/drizzle/migrations/meta/0038_snapshot.json +1882 -0
  22. package/dist/drizzle/migrations/meta/0039_snapshot.json +1960 -0
  23. package/dist/drizzle/migrations/meta/0040_snapshot.json +1912 -0
  24. package/dist/drizzle/migrations/meta/0041_snapshot.json +1912 -0
  25. package/dist/drizzle/migrations/meta/0042_snapshot.json +1882 -0
  26. package/dist/drizzle/migrations/meta/0043_snapshot.json +1909 -0
  27. package/dist/drizzle/migrations/meta/0044_snapshot.json +1853 -0
  28. package/dist/drizzle/migrations/meta/0045_snapshot.json +1921 -0
  29. package/dist/drizzle/migrations/meta/0046_snapshot.json +1966 -0
  30. package/dist/drizzle/migrations/meta/0047_snapshot.json +2005 -0
  31. package/dist/drizzle/migrations/meta/0048_snapshot.json +2035 -0
  32. package/dist/drizzle/migrations/meta/0049_snapshot.json +2035 -0
  33. package/dist/drizzle/migrations/meta/_journal.json +112 -0
  34. package/dist/evm/bytecode/morpho.txt +1 -1
  35. package/dist/index.browser.d.mts +587 -271
  36. package/dist/index.browser.d.mts.map +1 -1
  37. package/dist/index.browser.mjs +656 -419
  38. package/dist/index.browser.mjs.map +1 -1
  39. package/dist/index.node.d.mts +1454 -583
  40. package/dist/index.node.d.mts.map +1 -1
  41. package/dist/index.node.mjs +9064 -5228
  42. package/dist/index.node.mjs.map +1 -1
  43. package/dist/server-D4xxddev.js +9573 -0
  44. package/dist/server.js +9617 -0
  45. package/docs/integrator.md +14 -24
  46. package/package.json +7 -4
@@ -0,0 +1,1909 @@
1
+ {
2
+ "id": "6e8eaef8-bd93-456c-b784-92b61579ae91",
3
+ "prevId": "7f3fdc17-ff09-47ae-821b-2d1aa4e67a2b",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "router_v1.14.callbacks": {
8
+ "name": "callbacks",
9
+ "schema": "router_v1.14",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "varchar(66)",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "position_chain_id": {
18
+ "name": "position_chain_id",
19
+ "type": "bigint",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "position_contract": {
24
+ "name": "position_contract",
25
+ "type": "varchar(66)",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "position_user": {
30
+ "name": "position_user",
31
+ "type": "varchar(42)",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "position_type_id": {
36
+ "name": "position_type_id",
37
+ "type": "integer",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "type": {
42
+ "name": "type",
43
+ "type": "callback_type",
44
+ "typeSchema": "router_v1.14",
45
+ "primaryKey": false,
46
+ "notNull": true
47
+ }
48
+ },
49
+ "indexes": {},
50
+ "foreignKeys": {
51
+ "callbacks_position_type_id_position_types_id_fk": {
52
+ "name": "callbacks_position_type_id_position_types_id_fk",
53
+ "tableFrom": "callbacks",
54
+ "tableTo": "position_types",
55
+ "schemaTo": "router_v1.14",
56
+ "columnsFrom": ["position_type_id"],
57
+ "columnsTo": ["id"],
58
+ "onDelete": "no action",
59
+ "onUpdate": "no action"
60
+ }
61
+ },
62
+ "compositePrimaryKeys": {},
63
+ "uniqueConstraints": {},
64
+ "policies": {},
65
+ "checkConstraints": {},
66
+ "isRLSEnabled": false
67
+ },
68
+ "router_v1.14.chains": {
69
+ "name": "chains",
70
+ "schema": "router_v1.14",
71
+ "columns": {
72
+ "chain_id": {
73
+ "name": "chain_id",
74
+ "type": "bigint",
75
+ "primaryKey": false,
76
+ "notNull": true
77
+ },
78
+ "block_number": {
79
+ "name": "block_number",
80
+ "type": "bigint",
81
+ "primaryKey": false,
82
+ "notNull": true
83
+ },
84
+ "epoch": {
85
+ "name": "epoch",
86
+ "type": "numeric(78, 0)",
87
+ "primaryKey": false,
88
+ "notNull": true,
89
+ "default": "'0'"
90
+ },
91
+ "checkpoints": {
92
+ "name": "checkpoints",
93
+ "type": "text",
94
+ "primaryKey": false,
95
+ "notNull": true,
96
+ "default": "'[]'"
97
+ },
98
+ "tip_hash": {
99
+ "name": "tip_hash",
100
+ "type": "text",
101
+ "primaryKey": false,
102
+ "notNull": false
103
+ },
104
+ "finalized_block_number": {
105
+ "name": "finalized_block_number",
106
+ "type": "bigint",
107
+ "primaryKey": false,
108
+ "notNull": false
109
+ },
110
+ "finalized_block_hash": {
111
+ "name": "finalized_block_hash",
112
+ "type": "text",
113
+ "primaryKey": false,
114
+ "notNull": false
115
+ },
116
+ "updated_at": {
117
+ "name": "updated_at",
118
+ "type": "timestamp",
119
+ "primaryKey": false,
120
+ "notNull": true,
121
+ "default": "now()"
122
+ }
123
+ },
124
+ "indexes": {
125
+ "chains_chain_id_idx": {
126
+ "name": "chains_chain_id_idx",
127
+ "columns": [
128
+ {
129
+ "expression": "chain_id",
130
+ "isExpression": false,
131
+ "asc": true,
132
+ "nulls": "last"
133
+ }
134
+ ],
135
+ "isUnique": true,
136
+ "concurrently": false,
137
+ "method": "btree",
138
+ "with": {}
139
+ }
140
+ },
141
+ "foreignKeys": {},
142
+ "compositePrimaryKeys": {},
143
+ "uniqueConstraints": {},
144
+ "policies": {},
145
+ "checkConstraints": {},
146
+ "isRLSEnabled": false
147
+ },
148
+ "router_v1.14.collectors": {
149
+ "name": "collectors",
150
+ "schema": "router_v1.14",
151
+ "columns": {
152
+ "chain_id": {
153
+ "name": "chain_id",
154
+ "type": "bigint",
155
+ "primaryKey": false,
156
+ "notNull": true
157
+ },
158
+ "name": {
159
+ "name": "name",
160
+ "type": "text",
161
+ "primaryKey": false,
162
+ "notNull": true
163
+ },
164
+ "block_number": {
165
+ "name": "block_number",
166
+ "type": "bigint",
167
+ "primaryKey": false,
168
+ "notNull": true
169
+ },
170
+ "epoch": {
171
+ "name": "epoch",
172
+ "type": "numeric(78, 0)",
173
+ "primaryKey": false,
174
+ "notNull": true,
175
+ "default": "'0'"
176
+ },
177
+ "updated_at": {
178
+ "name": "updated_at",
179
+ "type": "timestamp",
180
+ "primaryKey": false,
181
+ "notNull": true,
182
+ "default": "now()"
183
+ }
184
+ },
185
+ "indexes": {
186
+ "collectors_chain_name_idx": {
187
+ "name": "collectors_chain_name_idx",
188
+ "columns": [
189
+ {
190
+ "expression": "chain_id",
191
+ "isExpression": false,
192
+ "asc": true,
193
+ "nulls": "last"
194
+ },
195
+ {
196
+ "expression": "name",
197
+ "isExpression": false,
198
+ "asc": true,
199
+ "nulls": "last"
200
+ }
201
+ ],
202
+ "isUnique": true,
203
+ "concurrently": false,
204
+ "method": "btree",
205
+ "with": {}
206
+ }
207
+ },
208
+ "foreignKeys": {
209
+ "collectors_chain_id_chains_chain_id_fk": {
210
+ "name": "collectors_chain_id_chains_chain_id_fk",
211
+ "tableFrom": "collectors",
212
+ "tableTo": "chains",
213
+ "schemaTo": "router_v1.14",
214
+ "columnsFrom": ["chain_id"],
215
+ "columnsTo": ["chain_id"],
216
+ "onDelete": "no action",
217
+ "onUpdate": "no action"
218
+ }
219
+ },
220
+ "compositePrimaryKeys": {},
221
+ "uniqueConstraints": {},
222
+ "policies": {},
223
+ "checkConstraints": {},
224
+ "isRLSEnabled": false
225
+ },
226
+ "router_v1.14.consumed_events": {
227
+ "name": "consumed_events",
228
+ "schema": "router_v1.14",
229
+ "columns": {
230
+ "event_id": {
231
+ "name": "event_id",
232
+ "type": "varchar(128)",
233
+ "primaryKey": true,
234
+ "notNull": true
235
+ },
236
+ "chain_id": {
237
+ "name": "chain_id",
238
+ "type": "bigint",
239
+ "primaryKey": false,
240
+ "notNull": true
241
+ },
242
+ "maker": {
243
+ "name": "maker",
244
+ "type": "varchar(42)",
245
+ "primaryKey": false,
246
+ "notNull": true
247
+ },
248
+ "group": {
249
+ "name": "group",
250
+ "type": "varchar(66)",
251
+ "primaryKey": false,
252
+ "notNull": true
253
+ },
254
+ "amount": {
255
+ "name": "amount",
256
+ "type": "numeric(78, 0)",
257
+ "primaryKey": false,
258
+ "notNull": true
259
+ },
260
+ "block_number": {
261
+ "name": "block_number",
262
+ "type": "bigint",
263
+ "primaryKey": false,
264
+ "notNull": true
265
+ },
266
+ "created_at": {
267
+ "name": "created_at",
268
+ "type": "timestamp",
269
+ "primaryKey": false,
270
+ "notNull": true,
271
+ "default": "now()"
272
+ }
273
+ },
274
+ "indexes": {
275
+ "consumed_events_group_idx": {
276
+ "name": "consumed_events_group_idx",
277
+ "columns": [
278
+ {
279
+ "expression": "chain_id",
280
+ "isExpression": false,
281
+ "asc": true,
282
+ "nulls": "last"
283
+ },
284
+ {
285
+ "expression": "maker",
286
+ "isExpression": false,
287
+ "asc": true,
288
+ "nulls": "last"
289
+ },
290
+ {
291
+ "expression": "group",
292
+ "isExpression": false,
293
+ "asc": true,
294
+ "nulls": "last"
295
+ }
296
+ ],
297
+ "isUnique": false,
298
+ "concurrently": false,
299
+ "method": "btree",
300
+ "with": {}
301
+ },
302
+ "consumed_events_block_number_idx": {
303
+ "name": "consumed_events_block_number_idx",
304
+ "columns": [
305
+ {
306
+ "expression": "block_number",
307
+ "isExpression": false,
308
+ "asc": true,
309
+ "nulls": "last"
310
+ }
311
+ ],
312
+ "isUnique": false,
313
+ "concurrently": false,
314
+ "method": "btree",
315
+ "with": {}
316
+ }
317
+ },
318
+ "foreignKeys": {
319
+ "consumed_events_groups_fk": {
320
+ "name": "consumed_events_groups_fk",
321
+ "tableFrom": "consumed_events",
322
+ "tableTo": "groups",
323
+ "schemaTo": "router_v1.14",
324
+ "columnsFrom": ["chain_id", "maker", "group"],
325
+ "columnsTo": ["chain_id", "maker", "group"],
326
+ "onDelete": "cascade",
327
+ "onUpdate": "no action"
328
+ }
329
+ },
330
+ "compositePrimaryKeys": {},
331
+ "uniqueConstraints": {},
332
+ "policies": {},
333
+ "checkConstraints": {},
334
+ "isRLSEnabled": false
335
+ },
336
+ "router_v1.14.groups": {
337
+ "name": "groups",
338
+ "schema": "router_v1.14",
339
+ "columns": {
340
+ "chain_id": {
341
+ "name": "chain_id",
342
+ "type": "bigint",
343
+ "primaryKey": false,
344
+ "notNull": true
345
+ },
346
+ "maker": {
347
+ "name": "maker",
348
+ "type": "varchar(42)",
349
+ "primaryKey": false,
350
+ "notNull": true
351
+ },
352
+ "group": {
353
+ "name": "group",
354
+ "type": "varchar(66)",
355
+ "primaryKey": false,
356
+ "notNull": true
357
+ },
358
+ "consumed": {
359
+ "name": "consumed",
360
+ "type": "numeric(78, 0)",
361
+ "primaryKey": false,
362
+ "notNull": true
363
+ },
364
+ "block_number": {
365
+ "name": "block_number",
366
+ "type": "bigint",
367
+ "primaryKey": false,
368
+ "notNull": true
369
+ },
370
+ "updated_at": {
371
+ "name": "updated_at",
372
+ "type": "timestamp",
373
+ "primaryKey": false,
374
+ "notNull": true,
375
+ "default": "now()"
376
+ }
377
+ },
378
+ "indexes": {
379
+ "groups_chain_id_maker_group_consumed_idx": {
380
+ "name": "groups_chain_id_maker_group_consumed_idx",
381
+ "columns": [
382
+ {
383
+ "expression": "chain_id",
384
+ "isExpression": false,
385
+ "asc": true,
386
+ "nulls": "last"
387
+ },
388
+ {
389
+ "expression": "maker",
390
+ "isExpression": false,
391
+ "asc": true,
392
+ "nulls": "last"
393
+ },
394
+ {
395
+ "expression": "group",
396
+ "isExpression": false,
397
+ "asc": true,
398
+ "nulls": "last"
399
+ },
400
+ {
401
+ "expression": "consumed",
402
+ "isExpression": false,
403
+ "asc": true,
404
+ "nulls": "last"
405
+ }
406
+ ],
407
+ "isUnique": false,
408
+ "concurrently": false,
409
+ "method": "btree",
410
+ "with": {}
411
+ }
412
+ },
413
+ "foreignKeys": {},
414
+ "compositePrimaryKeys": {
415
+ "groups_pk": {
416
+ "name": "groups_pk",
417
+ "columns": ["chain_id", "maker", "group"]
418
+ }
419
+ },
420
+ "uniqueConstraints": {},
421
+ "policies": {},
422
+ "checkConstraints": {},
423
+ "isRLSEnabled": false
424
+ },
425
+ "router_v1.14.lots": {
426
+ "name": "lots",
427
+ "schema": "router_v1.14",
428
+ "columns": {
429
+ "chain_id": {
430
+ "name": "chain_id",
431
+ "type": "bigint",
432
+ "primaryKey": false,
433
+ "notNull": true
434
+ },
435
+ "user": {
436
+ "name": "user",
437
+ "type": "varchar(42)",
438
+ "primaryKey": false,
439
+ "notNull": true
440
+ },
441
+ "contract": {
442
+ "name": "contract",
443
+ "type": "varchar(66)",
444
+ "primaryKey": false,
445
+ "notNull": true
446
+ },
447
+ "group": {
448
+ "name": "group",
449
+ "type": "varchar(66)",
450
+ "primaryKey": false,
451
+ "notNull": true
452
+ },
453
+ "obligation_id": {
454
+ "name": "obligation_id",
455
+ "type": "varchar(66)",
456
+ "primaryKey": false,
457
+ "notNull": true
458
+ },
459
+ "lower": {
460
+ "name": "lower",
461
+ "type": "numeric(78, 0)",
462
+ "primaryKey": false,
463
+ "notNull": true
464
+ },
465
+ "upper": {
466
+ "name": "upper",
467
+ "type": "numeric(78, 0)",
468
+ "primaryKey": false,
469
+ "notNull": true
470
+ }
471
+ },
472
+ "indexes": {},
473
+ "foreignKeys": {
474
+ "lots_lots_positions_fk": {
475
+ "name": "lots_lots_positions_fk",
476
+ "tableFrom": "lots",
477
+ "tableTo": "lots_positions",
478
+ "schemaTo": "router_v1.14",
479
+ "columnsFrom": ["chain_id", "contract", "user"],
480
+ "columnsTo": ["chain_id", "contract", "user"],
481
+ "onDelete": "cascade",
482
+ "onUpdate": "no action"
483
+ },
484
+ "lots_groups_fk": {
485
+ "name": "lots_groups_fk",
486
+ "tableFrom": "lots",
487
+ "tableTo": "groups",
488
+ "schemaTo": "router_v1.14",
489
+ "columnsFrom": ["chain_id", "user", "group"],
490
+ "columnsTo": ["chain_id", "maker", "group"],
491
+ "onDelete": "cascade",
492
+ "onUpdate": "no action"
493
+ }
494
+ },
495
+ "compositePrimaryKeys": {
496
+ "lots_pk": {
497
+ "name": "lots_pk",
498
+ "columns": ["chain_id", "user", "contract", "group", "obligation_id"]
499
+ }
500
+ },
501
+ "uniqueConstraints": {},
502
+ "policies": {},
503
+ "checkConstraints": {},
504
+ "isRLSEnabled": false
505
+ },
506
+ "router_v1.14.lots_positions": {
507
+ "name": "lots_positions",
508
+ "schema": "router_v1.14",
509
+ "columns": {
510
+ "chain_id": {
511
+ "name": "chain_id",
512
+ "type": "bigint",
513
+ "primaryKey": false,
514
+ "notNull": true
515
+ },
516
+ "contract": {
517
+ "name": "contract",
518
+ "type": "varchar(66)",
519
+ "primaryKey": false,
520
+ "notNull": true
521
+ },
522
+ "user": {
523
+ "name": "user",
524
+ "type": "varchar(42)",
525
+ "primaryKey": false,
526
+ "notNull": true
527
+ },
528
+ "position_type_id": {
529
+ "name": "position_type_id",
530
+ "type": "integer",
531
+ "primaryKey": false,
532
+ "notNull": true
533
+ }
534
+ },
535
+ "indexes": {},
536
+ "foreignKeys": {
537
+ "lots_positions_position_type_id_position_types_id_fk": {
538
+ "name": "lots_positions_position_type_id_position_types_id_fk",
539
+ "tableFrom": "lots_positions",
540
+ "tableTo": "position_types",
541
+ "schemaTo": "router_v1.14",
542
+ "columnsFrom": ["position_type_id"],
543
+ "columnsTo": ["id"],
544
+ "onDelete": "no action",
545
+ "onUpdate": "no action"
546
+ }
547
+ },
548
+ "compositePrimaryKeys": {
549
+ "lots_positions_pk": {
550
+ "name": "lots_positions_pk",
551
+ "columns": ["chain_id", "contract", "user"]
552
+ }
553
+ },
554
+ "uniqueConstraints": {},
555
+ "policies": {},
556
+ "checkConstraints": {},
557
+ "isRLSEnabled": false
558
+ },
559
+ "router_v1.14.merkle_paths": {
560
+ "name": "merkle_paths",
561
+ "schema": "router_v1.14",
562
+ "columns": {
563
+ "offer_hash": {
564
+ "name": "offer_hash",
565
+ "type": "varchar(66)",
566
+ "primaryKey": false,
567
+ "notNull": true
568
+ },
569
+ "obligation_id": {
570
+ "name": "obligation_id",
571
+ "type": "varchar(66)",
572
+ "primaryKey": false,
573
+ "notNull": true
574
+ },
575
+ "tree_root": {
576
+ "name": "tree_root",
577
+ "type": "varchar(66)",
578
+ "primaryKey": false,
579
+ "notNull": true
580
+ },
581
+ "proof_nodes": {
582
+ "name": "proof_nodes",
583
+ "type": "text",
584
+ "primaryKey": false,
585
+ "notNull": true
586
+ },
587
+ "created_at": {
588
+ "name": "created_at",
589
+ "type": "timestamp",
590
+ "primaryKey": false,
591
+ "notNull": true,
592
+ "default": "now()"
593
+ }
594
+ },
595
+ "indexes": {
596
+ "merkle_paths_tree_root_idx": {
597
+ "name": "merkle_paths_tree_root_idx",
598
+ "columns": [
599
+ {
600
+ "expression": "tree_root",
601
+ "isExpression": false,
602
+ "asc": true,
603
+ "nulls": "last"
604
+ }
605
+ ],
606
+ "isUnique": false,
607
+ "concurrently": false,
608
+ "method": "btree",
609
+ "with": {}
610
+ }
611
+ },
612
+ "foreignKeys": {
613
+ "merkle_paths_tree_root_trees_root_fk": {
614
+ "name": "merkle_paths_tree_root_trees_root_fk",
615
+ "tableFrom": "merkle_paths",
616
+ "tableTo": "trees",
617
+ "schemaTo": "router_v1.14",
618
+ "columnsFrom": ["tree_root"],
619
+ "columnsTo": ["root"],
620
+ "onDelete": "cascade",
621
+ "onUpdate": "no action"
622
+ },
623
+ "merkle_paths_offer_fk": {
624
+ "name": "merkle_paths_offer_fk",
625
+ "tableFrom": "merkle_paths",
626
+ "tableTo": "offers",
627
+ "schemaTo": "router_v1.14",
628
+ "columnsFrom": ["offer_hash", "obligation_id"],
629
+ "columnsTo": ["hash", "obligation_id"],
630
+ "onDelete": "cascade",
631
+ "onUpdate": "no action"
632
+ }
633
+ },
634
+ "compositePrimaryKeys": {
635
+ "merkle_paths_pk": {
636
+ "name": "merkle_paths_pk",
637
+ "columns": ["offer_hash", "obligation_id"]
638
+ }
639
+ },
640
+ "uniqueConstraints": {},
641
+ "policies": {},
642
+ "checkConstraints": {},
643
+ "isRLSEnabled": false
644
+ },
645
+ "router_v1.14.obligation_collaterals_v2": {
646
+ "name": "obligation_collaterals_v2",
647
+ "schema": "router_v1.14",
648
+ "columns": {
649
+ "obligation_key": {
650
+ "name": "obligation_key",
651
+ "type": "varchar(66)",
652
+ "primaryKey": false,
653
+ "notNull": true
654
+ },
655
+ "asset": {
656
+ "name": "asset",
657
+ "type": "varchar(42)",
658
+ "primaryKey": false,
659
+ "notNull": true
660
+ },
661
+ "oracle_address": {
662
+ "name": "oracle_address",
663
+ "type": "varchar(42)",
664
+ "primaryKey": false,
665
+ "notNull": true
666
+ },
667
+ "lltv": {
668
+ "name": "lltv",
669
+ "type": "bigint",
670
+ "primaryKey": false,
671
+ "notNull": true
672
+ },
673
+ "max_lif": {
674
+ "name": "max_lif",
675
+ "type": "bigint",
676
+ "primaryKey": false,
677
+ "notNull": true
678
+ },
679
+ "collateral_index": {
680
+ "name": "collateral_index",
681
+ "type": "integer",
682
+ "primaryKey": false,
683
+ "notNull": true
684
+ },
685
+ "updated_at": {
686
+ "name": "updated_at",
687
+ "type": "timestamp",
688
+ "primaryKey": false,
689
+ "notNull": true,
690
+ "default": "now()"
691
+ }
692
+ },
693
+ "indexes": {
694
+ "obligation_collaterals_v2_obligation_key_idx": {
695
+ "name": "obligation_collaterals_v2_obligation_key_idx",
696
+ "columns": [
697
+ {
698
+ "expression": "obligation_key",
699
+ "isExpression": false,
700
+ "asc": true,
701
+ "nulls": "last"
702
+ }
703
+ ],
704
+ "isUnique": false,
705
+ "concurrently": false,
706
+ "method": "btree",
707
+ "with": {}
708
+ },
709
+ "obligation_collaterals_v2_oracle_address_idx": {
710
+ "name": "obligation_collaterals_v2_oracle_address_idx",
711
+ "columns": [
712
+ {
713
+ "expression": "oracle_address",
714
+ "isExpression": false,
715
+ "asc": true,
716
+ "nulls": "last"
717
+ }
718
+ ],
719
+ "isUnique": false,
720
+ "concurrently": false,
721
+ "method": "btree",
722
+ "with": {}
723
+ }
724
+ },
725
+ "foreignKeys": {
726
+ "obligation_collaterals_v2_obligation_key_obligations_obligation_key_fk": {
727
+ "name": "obligation_collaterals_v2_obligation_key_obligations_obligation_key_fk",
728
+ "tableFrom": "obligation_collaterals_v2",
729
+ "tableTo": "obligations",
730
+ "schemaTo": "router_v1.14",
731
+ "columnsFrom": ["obligation_key"],
732
+ "columnsTo": ["obligation_key"],
733
+ "onDelete": "cascade",
734
+ "onUpdate": "no action"
735
+ }
736
+ },
737
+ "compositePrimaryKeys": {
738
+ "obligation_collaterals_v2_pk": {
739
+ "name": "obligation_collaterals_v2_pk",
740
+ "columns": ["obligation_key", "asset"]
741
+ }
742
+ },
743
+ "uniqueConstraints": {},
744
+ "policies": {},
745
+ "checkConstraints": {},
746
+ "isRLSEnabled": false
747
+ },
748
+ "router_v1.14.obligation_id_keys": {
749
+ "name": "obligation_id_keys",
750
+ "schema": "router_v1.14",
751
+ "columns": {
752
+ "obligation_id": {
753
+ "name": "obligation_id",
754
+ "type": "varchar(66)",
755
+ "primaryKey": true,
756
+ "notNull": true
757
+ },
758
+ "obligation_key": {
759
+ "name": "obligation_key",
760
+ "type": "varchar(66)",
761
+ "primaryKey": false,
762
+ "notNull": true
763
+ },
764
+ "chain_id": {
765
+ "name": "chain_id",
766
+ "type": "bigint",
767
+ "primaryKey": false,
768
+ "notNull": true
769
+ },
770
+ "morpho_v2": {
771
+ "name": "morpho_v2",
772
+ "type": "varchar(42)",
773
+ "primaryKey": false,
774
+ "notNull": true
775
+ }
776
+ },
777
+ "indexes": {
778
+ "obligation_id_keys_obligation_key_idx": {
779
+ "name": "obligation_id_keys_obligation_key_idx",
780
+ "columns": [
781
+ {
782
+ "expression": "obligation_key",
783
+ "isExpression": false,
784
+ "asc": true,
785
+ "nulls": "last"
786
+ }
787
+ ],
788
+ "isUnique": false,
789
+ "concurrently": false,
790
+ "method": "btree",
791
+ "with": {}
792
+ },
793
+ "obligation_id_keys_chain_id_idx": {
794
+ "name": "obligation_id_keys_chain_id_idx",
795
+ "columns": [
796
+ {
797
+ "expression": "chain_id",
798
+ "isExpression": false,
799
+ "asc": true,
800
+ "nulls": "last"
801
+ }
802
+ ],
803
+ "isUnique": false,
804
+ "concurrently": false,
805
+ "method": "btree",
806
+ "with": {}
807
+ }
808
+ },
809
+ "foreignKeys": {
810
+ "obligation_id_keys_obligation_key_obligations_obligation_key_fk": {
811
+ "name": "obligation_id_keys_obligation_key_obligations_obligation_key_fk",
812
+ "tableFrom": "obligation_id_keys",
813
+ "tableTo": "obligations",
814
+ "schemaTo": "router_v1.14",
815
+ "columnsFrom": ["obligation_key"],
816
+ "columnsTo": ["obligation_key"],
817
+ "onDelete": "cascade",
818
+ "onUpdate": "no action"
819
+ }
820
+ },
821
+ "compositePrimaryKeys": {},
822
+ "uniqueConstraints": {},
823
+ "policies": {},
824
+ "checkConstraints": {},
825
+ "isRLSEnabled": false
826
+ },
827
+ "router_v1.14.obligations": {
828
+ "name": "obligations",
829
+ "schema": "router_v1.14",
830
+ "columns": {
831
+ "obligation_key": {
832
+ "name": "obligation_key",
833
+ "type": "varchar(66)",
834
+ "primaryKey": true,
835
+ "notNull": true
836
+ },
837
+ "loan_token": {
838
+ "name": "loan_token",
839
+ "type": "varchar(42)",
840
+ "primaryKey": false,
841
+ "notNull": true
842
+ },
843
+ "maturity": {
844
+ "name": "maturity",
845
+ "type": "integer",
846
+ "primaryKey": false,
847
+ "notNull": true
848
+ },
849
+ "rcf_threshold": {
850
+ "name": "rcf_threshold",
851
+ "type": "numeric(78, 0)",
852
+ "primaryKey": false,
853
+ "notNull": true
854
+ }
855
+ },
856
+ "indexes": {},
857
+ "foreignKeys": {},
858
+ "compositePrimaryKeys": {},
859
+ "uniqueConstraints": {},
860
+ "policies": {},
861
+ "checkConstraints": {},
862
+ "isRLSEnabled": false
863
+ },
864
+ "router_v1.14.offers": {
865
+ "name": "offers",
866
+ "schema": "router_v1.14",
867
+ "columns": {
868
+ "hash": {
869
+ "name": "hash",
870
+ "type": "varchar(66)",
871
+ "primaryKey": false,
872
+ "notNull": true
873
+ },
874
+ "obligation_id": {
875
+ "name": "obligation_id",
876
+ "type": "varchar(66)",
877
+ "primaryKey": false,
878
+ "notNull": true
879
+ },
880
+ "obligation_units": {
881
+ "name": "obligation_units",
882
+ "type": "numeric(78, 0)",
883
+ "primaryKey": false,
884
+ "notNull": true,
885
+ "default": "'0'"
886
+ },
887
+ "obligation_shares": {
888
+ "name": "obligation_shares",
889
+ "type": "numeric(78, 0)",
890
+ "primaryKey": false,
891
+ "notNull": true,
892
+ "default": "'0'"
893
+ },
894
+ "tick": {
895
+ "name": "tick",
896
+ "type": "integer",
897
+ "primaryKey": false,
898
+ "notNull": true
899
+ },
900
+ "maturity": {
901
+ "name": "maturity",
902
+ "type": "integer",
903
+ "primaryKey": false,
904
+ "notNull": true
905
+ },
906
+ "expiry": {
907
+ "name": "expiry",
908
+ "type": "integer",
909
+ "primaryKey": false,
910
+ "notNull": true
911
+ },
912
+ "start": {
913
+ "name": "start",
914
+ "type": "integer",
915
+ "primaryKey": false,
916
+ "notNull": true
917
+ },
918
+ "group_chain_id": {
919
+ "name": "group_chain_id",
920
+ "type": "bigint",
921
+ "primaryKey": false,
922
+ "notNull": true
923
+ },
924
+ "group_maker": {
925
+ "name": "group_maker",
926
+ "type": "varchar(42)",
927
+ "primaryKey": false,
928
+ "notNull": true
929
+ },
930
+ "group_group": {
931
+ "name": "group_group",
932
+ "type": "varchar(66)",
933
+ "primaryKey": false,
934
+ "notNull": true
935
+ },
936
+ "session": {
937
+ "name": "session",
938
+ "type": "varchar(66)",
939
+ "primaryKey": false,
940
+ "notNull": true
941
+ },
942
+ "buy": {
943
+ "name": "buy",
944
+ "type": "boolean",
945
+ "primaryKey": false,
946
+ "notNull": true
947
+ },
948
+ "callback_address": {
949
+ "name": "callback_address",
950
+ "type": "varchar(42)",
951
+ "primaryKey": false,
952
+ "notNull": true
953
+ },
954
+ "callback_data": {
955
+ "name": "callback_data",
956
+ "type": "text",
957
+ "primaryKey": false,
958
+ "notNull": true
959
+ },
960
+ "receiver_if_maker_is_seller": {
961
+ "name": "receiver_if_maker_is_seller",
962
+ "type": "varchar(42)",
963
+ "primaryKey": false,
964
+ "notNull": false
965
+ },
966
+ "block_number": {
967
+ "name": "block_number",
968
+ "type": "bigint",
969
+ "primaryKey": false,
970
+ "notNull": true
971
+ },
972
+ "updated_at": {
973
+ "name": "updated_at",
974
+ "type": "timestamp",
975
+ "primaryKey": false,
976
+ "notNull": true,
977
+ "default": "now()"
978
+ }
979
+ },
980
+ "indexes": {
981
+ "offers_group_fk_idx": {
982
+ "name": "offers_group_fk_idx",
983
+ "columns": [
984
+ {
985
+ "expression": "group_chain_id",
986
+ "isExpression": false,
987
+ "asc": true,
988
+ "nulls": "last"
989
+ },
990
+ {
991
+ "expression": "group_maker",
992
+ "isExpression": false,
993
+ "asc": true,
994
+ "nulls": "last"
995
+ },
996
+ {
997
+ "expression": "group_group",
998
+ "isExpression": false,
999
+ "asc": true,
1000
+ "nulls": "last"
1001
+ }
1002
+ ],
1003
+ "isUnique": false,
1004
+ "concurrently": false,
1005
+ "method": "btree",
1006
+ "with": {}
1007
+ },
1008
+ "offers_group_and_hash_idx": {
1009
+ "name": "offers_group_and_hash_idx",
1010
+ "columns": [
1011
+ {
1012
+ "expression": "group_chain_id",
1013
+ "isExpression": false,
1014
+ "asc": true,
1015
+ "nulls": "last"
1016
+ },
1017
+ {
1018
+ "expression": "group_maker",
1019
+ "isExpression": false,
1020
+ "asc": true,
1021
+ "nulls": "last"
1022
+ },
1023
+ {
1024
+ "expression": "group_group",
1025
+ "isExpression": false,
1026
+ "asc": true,
1027
+ "nulls": "last"
1028
+ },
1029
+ {
1030
+ "expression": "hash",
1031
+ "isExpression": false,
1032
+ "asc": true,
1033
+ "nulls": "last"
1034
+ }
1035
+ ],
1036
+ "isUnique": false,
1037
+ "concurrently": false,
1038
+ "method": "btree",
1039
+ "with": {}
1040
+ },
1041
+ "offers_obligation_id_side_idx": {
1042
+ "name": "offers_obligation_id_side_idx",
1043
+ "columns": [
1044
+ {
1045
+ "expression": "obligation_id",
1046
+ "isExpression": false,
1047
+ "asc": true,
1048
+ "nulls": "last"
1049
+ },
1050
+ {
1051
+ "expression": "buy",
1052
+ "isExpression": false,
1053
+ "asc": true,
1054
+ "nulls": "last"
1055
+ }
1056
+ ],
1057
+ "isUnique": false,
1058
+ "concurrently": false,
1059
+ "method": "btree",
1060
+ "with": {}
1061
+ },
1062
+ "offers_obligation_side_tick_idx": {
1063
+ "name": "offers_obligation_side_tick_idx",
1064
+ "columns": [
1065
+ {
1066
+ "expression": "obligation_id",
1067
+ "isExpression": false,
1068
+ "asc": true,
1069
+ "nulls": "last"
1070
+ },
1071
+ {
1072
+ "expression": "buy",
1073
+ "isExpression": false,
1074
+ "asc": true,
1075
+ "nulls": "last"
1076
+ },
1077
+ {
1078
+ "expression": "tick",
1079
+ "isExpression": false,
1080
+ "asc": true,
1081
+ "nulls": "last"
1082
+ }
1083
+ ],
1084
+ "isUnique": false,
1085
+ "concurrently": false,
1086
+ "method": "btree",
1087
+ "with": {}
1088
+ }
1089
+ },
1090
+ "foreignKeys": {
1091
+ "offers_obligation_id_obligation_id_keys_obligation_id_fk": {
1092
+ "name": "offers_obligation_id_obligation_id_keys_obligation_id_fk",
1093
+ "tableFrom": "offers",
1094
+ "tableTo": "obligation_id_keys",
1095
+ "schemaTo": "router_v1.14",
1096
+ "columnsFrom": ["obligation_id"],
1097
+ "columnsTo": ["obligation_id"],
1098
+ "onDelete": "cascade",
1099
+ "onUpdate": "no action"
1100
+ },
1101
+ "offers_groups_fk": {
1102
+ "name": "offers_groups_fk",
1103
+ "tableFrom": "offers",
1104
+ "tableTo": "groups",
1105
+ "schemaTo": "router_v1.14",
1106
+ "columnsFrom": ["group_chain_id", "group_maker", "group_group"],
1107
+ "columnsTo": ["chain_id", "maker", "group"],
1108
+ "onDelete": "cascade",
1109
+ "onUpdate": "no action"
1110
+ }
1111
+ },
1112
+ "compositePrimaryKeys": {
1113
+ "offers_pk": {
1114
+ "name": "offers_pk",
1115
+ "columns": ["hash", "obligation_id"]
1116
+ }
1117
+ },
1118
+ "uniqueConstraints": {},
1119
+ "policies": {},
1120
+ "checkConstraints": {},
1121
+ "isRLSEnabled": false
1122
+ },
1123
+ "router_v1.14.offers_callbacks": {
1124
+ "name": "offers_callbacks",
1125
+ "schema": "router_v1.14",
1126
+ "columns": {
1127
+ "offer_hash": {
1128
+ "name": "offer_hash",
1129
+ "type": "varchar(66)",
1130
+ "primaryKey": false,
1131
+ "notNull": true
1132
+ },
1133
+ "obligation_id": {
1134
+ "name": "obligation_id",
1135
+ "type": "varchar(66)",
1136
+ "primaryKey": false,
1137
+ "notNull": true
1138
+ },
1139
+ "callback_id": {
1140
+ "name": "callback_id",
1141
+ "type": "varchar(66)",
1142
+ "primaryKey": false,
1143
+ "notNull": false
1144
+ }
1145
+ },
1146
+ "indexes": {},
1147
+ "foreignKeys": {
1148
+ "offers_callbacks_offer_fk": {
1149
+ "name": "offers_callbacks_offer_fk",
1150
+ "tableFrom": "offers_callbacks",
1151
+ "tableTo": "offers",
1152
+ "schemaTo": "router_v1.14",
1153
+ "columnsFrom": ["offer_hash", "obligation_id"],
1154
+ "columnsTo": ["hash", "obligation_id"],
1155
+ "onDelete": "cascade",
1156
+ "onUpdate": "no action"
1157
+ }
1158
+ },
1159
+ "compositePrimaryKeys": {
1160
+ "offers_callbacks_pk": {
1161
+ "name": "offers_callbacks_pk",
1162
+ "columns": ["offer_hash", "obligation_id", "callback_id"]
1163
+ }
1164
+ },
1165
+ "uniqueConstraints": {},
1166
+ "policies": {},
1167
+ "checkConstraints": {},
1168
+ "isRLSEnabled": false
1169
+ },
1170
+ "router_v1.14.offsets": {
1171
+ "name": "offsets",
1172
+ "schema": "router_v1.14",
1173
+ "columns": {
1174
+ "chain_id": {
1175
+ "name": "chain_id",
1176
+ "type": "bigint",
1177
+ "primaryKey": false,
1178
+ "notNull": true
1179
+ },
1180
+ "user": {
1181
+ "name": "user",
1182
+ "type": "varchar(42)",
1183
+ "primaryKey": false,
1184
+ "notNull": true
1185
+ },
1186
+ "contract": {
1187
+ "name": "contract",
1188
+ "type": "varchar(66)",
1189
+ "primaryKey": false,
1190
+ "notNull": true
1191
+ },
1192
+ "group": {
1193
+ "name": "group",
1194
+ "type": "varchar(66)",
1195
+ "primaryKey": false,
1196
+ "notNull": true
1197
+ },
1198
+ "obligation_id": {
1199
+ "name": "obligation_id",
1200
+ "type": "varchar(66)",
1201
+ "primaryKey": false,
1202
+ "notNull": true
1203
+ },
1204
+ "value": {
1205
+ "name": "value",
1206
+ "type": "numeric(78, 0)",
1207
+ "primaryKey": false,
1208
+ "notNull": true
1209
+ }
1210
+ },
1211
+ "indexes": {},
1212
+ "foreignKeys": {
1213
+ "offsets_lots_positions_fk": {
1214
+ "name": "offsets_lots_positions_fk",
1215
+ "tableFrom": "offsets",
1216
+ "tableTo": "lots_positions",
1217
+ "schemaTo": "router_v1.14",
1218
+ "columnsFrom": ["chain_id", "contract", "user"],
1219
+ "columnsTo": ["chain_id", "contract", "user"],
1220
+ "onDelete": "cascade",
1221
+ "onUpdate": "no action"
1222
+ }
1223
+ },
1224
+ "compositePrimaryKeys": {
1225
+ "offsets_pk": {
1226
+ "name": "offsets_pk",
1227
+ "columns": ["chain_id", "user", "contract", "group", "obligation_id"]
1228
+ }
1229
+ },
1230
+ "uniqueConstraints": {},
1231
+ "policies": {},
1232
+ "checkConstraints": {},
1233
+ "isRLSEnabled": false
1234
+ },
1235
+ "router_v1.14.oracles": {
1236
+ "name": "oracles",
1237
+ "schema": "router_v1.14",
1238
+ "columns": {
1239
+ "chain_id": {
1240
+ "name": "chain_id",
1241
+ "type": "bigint",
1242
+ "primaryKey": false,
1243
+ "notNull": true
1244
+ },
1245
+ "address": {
1246
+ "name": "address",
1247
+ "type": "varchar(42)",
1248
+ "primaryKey": false,
1249
+ "notNull": true
1250
+ },
1251
+ "price": {
1252
+ "name": "price",
1253
+ "type": "numeric(78, 0)",
1254
+ "primaryKey": false,
1255
+ "notNull": false
1256
+ },
1257
+ "block_number": {
1258
+ "name": "block_number",
1259
+ "type": "bigint",
1260
+ "primaryKey": false,
1261
+ "notNull": true
1262
+ },
1263
+ "updated_at": {
1264
+ "name": "updated_at",
1265
+ "type": "timestamp",
1266
+ "primaryKey": false,
1267
+ "notNull": true,
1268
+ "default": "now()"
1269
+ }
1270
+ },
1271
+ "indexes": {},
1272
+ "foreignKeys": {},
1273
+ "compositePrimaryKeys": {
1274
+ "oracles_pk": {
1275
+ "name": "oracles_pk",
1276
+ "columns": ["chain_id", "address"]
1277
+ }
1278
+ },
1279
+ "uniqueConstraints": {},
1280
+ "policies": {},
1281
+ "checkConstraints": {},
1282
+ "isRLSEnabled": false
1283
+ },
1284
+ "router_v1.14.pending_links": {
1285
+ "name": "pending_links",
1286
+ "schema": "router_v1.14",
1287
+ "columns": {
1288
+ "key": {
1289
+ "name": "key",
1290
+ "type": "varchar(191)",
1291
+ "primaryKey": true,
1292
+ "notNull": true
1293
+ },
1294
+ "type": {
1295
+ "name": "type",
1296
+ "type": "text",
1297
+ "primaryKey": false,
1298
+ "notNull": true
1299
+ },
1300
+ "status": {
1301
+ "name": "status",
1302
+ "type": "text",
1303
+ "primaryKey": false,
1304
+ "notNull": true
1305
+ },
1306
+ "chain_id": {
1307
+ "name": "chain_id",
1308
+ "type": "bigint",
1309
+ "primaryKey": false,
1310
+ "notNull": true
1311
+ },
1312
+ "event_id": {
1313
+ "name": "event_id",
1314
+ "type": "varchar(128)",
1315
+ "primaryKey": false,
1316
+ "notNull": true
1317
+ },
1318
+ "obligation_id": {
1319
+ "name": "obligation_id",
1320
+ "type": "varchar(66)",
1321
+ "primaryKey": false,
1322
+ "notNull": true
1323
+ },
1324
+ "collateral_index": {
1325
+ "name": "collateral_index",
1326
+ "type": "integer",
1327
+ "primaryKey": false,
1328
+ "notNull": true
1329
+ },
1330
+ "user": {
1331
+ "name": "user",
1332
+ "type": "varchar(42)",
1333
+ "primaryKey": false,
1334
+ "notNull": true
1335
+ },
1336
+ "amount": {
1337
+ "name": "amount",
1338
+ "type": "numeric(78, 0)",
1339
+ "primaryKey": false,
1340
+ "notNull": true
1341
+ },
1342
+ "block_number": {
1343
+ "name": "block_number",
1344
+ "type": "bigint",
1345
+ "primaryKey": false,
1346
+ "notNull": true
1347
+ },
1348
+ "first_seen_block": {
1349
+ "name": "first_seen_block",
1350
+ "type": "bigint",
1351
+ "primaryKey": false,
1352
+ "notNull": true
1353
+ },
1354
+ "last_tried_block": {
1355
+ "name": "last_tried_block",
1356
+ "type": "bigint",
1357
+ "primaryKey": false,
1358
+ "notNull": false
1359
+ },
1360
+ "attempts": {
1361
+ "name": "attempts",
1362
+ "type": "integer",
1363
+ "primaryKey": false,
1364
+ "notNull": true,
1365
+ "default": 0
1366
+ },
1367
+ "ignored_reason": {
1368
+ "name": "ignored_reason",
1369
+ "type": "text",
1370
+ "primaryKey": false,
1371
+ "notNull": false
1372
+ },
1373
+ "resolved_at": {
1374
+ "name": "resolved_at",
1375
+ "type": "timestamp",
1376
+ "primaryKey": false,
1377
+ "notNull": false
1378
+ },
1379
+ "updated_at": {
1380
+ "name": "updated_at",
1381
+ "type": "timestamp",
1382
+ "primaryKey": false,
1383
+ "notNull": true,
1384
+ "default": "now()"
1385
+ }
1386
+ },
1387
+ "indexes": {
1388
+ "pending_links_chain_type_status_idx": {
1389
+ "name": "pending_links_chain_type_status_idx",
1390
+ "columns": [
1391
+ {
1392
+ "expression": "chain_id",
1393
+ "isExpression": false,
1394
+ "asc": true,
1395
+ "nulls": "last"
1396
+ },
1397
+ {
1398
+ "expression": "type",
1399
+ "isExpression": false,
1400
+ "asc": true,
1401
+ "nulls": "last"
1402
+ },
1403
+ {
1404
+ "expression": "status",
1405
+ "isExpression": false,
1406
+ "asc": true,
1407
+ "nulls": "last"
1408
+ }
1409
+ ],
1410
+ "isUnique": false,
1411
+ "concurrently": false,
1412
+ "method": "btree",
1413
+ "with": {}
1414
+ },
1415
+ "pending_links_pending_scan_idx": {
1416
+ "name": "pending_links_pending_scan_idx",
1417
+ "columns": [
1418
+ {
1419
+ "expression": "chain_id",
1420
+ "isExpression": false,
1421
+ "asc": true,
1422
+ "nulls": "last"
1423
+ },
1424
+ {
1425
+ "expression": "type",
1426
+ "isExpression": false,
1427
+ "asc": true,
1428
+ "nulls": "last"
1429
+ },
1430
+ {
1431
+ "expression": "status",
1432
+ "isExpression": false,
1433
+ "asc": true,
1434
+ "nulls": "last"
1435
+ },
1436
+ {
1437
+ "expression": "first_seen_block",
1438
+ "isExpression": false,
1439
+ "asc": true,
1440
+ "nulls": "last"
1441
+ }
1442
+ ],
1443
+ "isUnique": false,
1444
+ "concurrently": false,
1445
+ "method": "btree",
1446
+ "with": {}
1447
+ },
1448
+ "pending_links_event_id_idx": {
1449
+ "name": "pending_links_event_id_idx",
1450
+ "columns": [
1451
+ {
1452
+ "expression": "chain_id",
1453
+ "isExpression": false,
1454
+ "asc": true,
1455
+ "nulls": "last"
1456
+ },
1457
+ {
1458
+ "expression": "event_id",
1459
+ "isExpression": false,
1460
+ "asc": true,
1461
+ "nulls": "last"
1462
+ }
1463
+ ],
1464
+ "isUnique": false,
1465
+ "concurrently": false,
1466
+ "method": "btree",
1467
+ "with": {}
1468
+ }
1469
+ },
1470
+ "foreignKeys": {},
1471
+ "compositePrimaryKeys": {},
1472
+ "uniqueConstraints": {},
1473
+ "policies": {},
1474
+ "checkConstraints": {},
1475
+ "isRLSEnabled": false
1476
+ },
1477
+ "router_v1.14.position_types": {
1478
+ "name": "position_types",
1479
+ "schema": "router_v1.14",
1480
+ "columns": {
1481
+ "id": {
1482
+ "name": "id",
1483
+ "type": "serial",
1484
+ "primaryKey": true,
1485
+ "notNull": true
1486
+ },
1487
+ "type": {
1488
+ "name": "type",
1489
+ "type": "position_type",
1490
+ "typeSchema": "router_v1.14",
1491
+ "primaryKey": false,
1492
+ "notNull": true
1493
+ }
1494
+ },
1495
+ "indexes": {},
1496
+ "foreignKeys": {},
1497
+ "compositePrimaryKeys": {},
1498
+ "uniqueConstraints": {},
1499
+ "policies": {},
1500
+ "checkConstraints": {},
1501
+ "isRLSEnabled": false
1502
+ },
1503
+ "router_v1.14.positions": {
1504
+ "name": "positions",
1505
+ "schema": "router_v1.14",
1506
+ "columns": {
1507
+ "chain_id": {
1508
+ "name": "chain_id",
1509
+ "type": "bigint",
1510
+ "primaryKey": false,
1511
+ "notNull": true
1512
+ },
1513
+ "contract": {
1514
+ "name": "contract",
1515
+ "type": "varchar(66)",
1516
+ "primaryKey": false,
1517
+ "notNull": true
1518
+ },
1519
+ "user": {
1520
+ "name": "user",
1521
+ "type": "varchar(42)",
1522
+ "primaryKey": false,
1523
+ "notNull": true
1524
+ },
1525
+ "position_type_id": {
1526
+ "name": "position_type_id",
1527
+ "type": "integer",
1528
+ "primaryKey": false,
1529
+ "notNull": true
1530
+ },
1531
+ "balance": {
1532
+ "name": "balance",
1533
+ "type": "numeric(78, 0)",
1534
+ "primaryKey": false,
1535
+ "notNull": false
1536
+ },
1537
+ "asset": {
1538
+ "name": "asset",
1539
+ "type": "varchar(42)",
1540
+ "primaryKey": false,
1541
+ "notNull": true
1542
+ },
1543
+ "block_number": {
1544
+ "name": "block_number",
1545
+ "type": "bigint",
1546
+ "primaryKey": false,
1547
+ "notNull": true
1548
+ },
1549
+ "updated_at": {
1550
+ "name": "updated_at",
1551
+ "type": "timestamp",
1552
+ "primaryKey": false,
1553
+ "notNull": true,
1554
+ "default": "now()"
1555
+ }
1556
+ },
1557
+ "indexes": {},
1558
+ "foreignKeys": {
1559
+ "positions_position_type_id_position_types_id_fk": {
1560
+ "name": "positions_position_type_id_position_types_id_fk",
1561
+ "tableFrom": "positions",
1562
+ "tableTo": "position_types",
1563
+ "schemaTo": "router_v1.14",
1564
+ "columnsFrom": ["position_type_id"],
1565
+ "columnsTo": ["id"],
1566
+ "onDelete": "no action",
1567
+ "onUpdate": "no action"
1568
+ }
1569
+ },
1570
+ "compositePrimaryKeys": {
1571
+ "positions_pk": {
1572
+ "name": "positions_pk",
1573
+ "columns": ["chain_id", "contract", "user", "position_type_id", "asset"]
1574
+ }
1575
+ },
1576
+ "uniqueConstraints": {},
1577
+ "policies": {},
1578
+ "checkConstraints": {},
1579
+ "isRLSEnabled": false
1580
+ },
1581
+ "router_v1.14.status": {
1582
+ "name": "status",
1583
+ "schema": "router_v1.14",
1584
+ "columns": {
1585
+ "id": {
1586
+ "name": "id",
1587
+ "type": "serial",
1588
+ "primaryKey": true,
1589
+ "notNull": true
1590
+ },
1591
+ "code": {
1592
+ "name": "code",
1593
+ "type": "status_code",
1594
+ "typeSchema": "router_v1.14",
1595
+ "primaryKey": false,
1596
+ "notNull": false
1597
+ }
1598
+ },
1599
+ "indexes": {},
1600
+ "foreignKeys": {},
1601
+ "compositePrimaryKeys": {},
1602
+ "uniqueConstraints": {
1603
+ "status_code_unique": {
1604
+ "name": "status_code_unique",
1605
+ "nullsNotDistinct": false,
1606
+ "columns": ["code"]
1607
+ }
1608
+ },
1609
+ "policies": {},
1610
+ "checkConstraints": {},
1611
+ "isRLSEnabled": false
1612
+ },
1613
+ "router_v1.14.transfers": {
1614
+ "name": "transfers",
1615
+ "schema": "router_v1.14",
1616
+ "columns": {
1617
+ "event_id": {
1618
+ "name": "event_id",
1619
+ "type": "varchar(128)",
1620
+ "primaryKey": true,
1621
+ "notNull": true
1622
+ },
1623
+ "chain_id": {
1624
+ "name": "chain_id",
1625
+ "type": "bigint",
1626
+ "primaryKey": false,
1627
+ "notNull": true
1628
+ },
1629
+ "contract": {
1630
+ "name": "contract",
1631
+ "type": "varchar(66)",
1632
+ "primaryKey": false,
1633
+ "notNull": true
1634
+ },
1635
+ "from": {
1636
+ "name": "from",
1637
+ "type": "varchar(42)",
1638
+ "primaryKey": false,
1639
+ "notNull": true
1640
+ },
1641
+ "to": {
1642
+ "name": "to",
1643
+ "type": "varchar(42)",
1644
+ "primaryKey": false,
1645
+ "notNull": true
1646
+ },
1647
+ "value": {
1648
+ "name": "value",
1649
+ "type": "numeric(78, 0)",
1650
+ "primaryKey": false,
1651
+ "notNull": true
1652
+ },
1653
+ "position_type_id": {
1654
+ "name": "position_type_id",
1655
+ "type": "integer",
1656
+ "primaryKey": false,
1657
+ "notNull": true
1658
+ },
1659
+ "asset": {
1660
+ "name": "asset",
1661
+ "type": "varchar(42)",
1662
+ "primaryKey": false,
1663
+ "notNull": true
1664
+ },
1665
+ "block_number": {
1666
+ "name": "block_number",
1667
+ "type": "bigint",
1668
+ "primaryKey": false,
1669
+ "notNull": true
1670
+ },
1671
+ "created_at": {
1672
+ "name": "created_at",
1673
+ "type": "timestamp",
1674
+ "primaryKey": false,
1675
+ "notNull": true,
1676
+ "default": "now()"
1677
+ }
1678
+ },
1679
+ "indexes": {
1680
+ "transfers_chain_contract_user_idx": {
1681
+ "name": "transfers_chain_contract_user_idx",
1682
+ "columns": [
1683
+ {
1684
+ "expression": "chain_id",
1685
+ "isExpression": false,
1686
+ "asc": true,
1687
+ "nulls": "last"
1688
+ },
1689
+ {
1690
+ "expression": "contract",
1691
+ "isExpression": false,
1692
+ "asc": true,
1693
+ "nulls": "last"
1694
+ },
1695
+ {
1696
+ "expression": "from",
1697
+ "isExpression": false,
1698
+ "asc": true,
1699
+ "nulls": "last"
1700
+ },
1701
+ {
1702
+ "expression": "to",
1703
+ "isExpression": false,
1704
+ "asc": true,
1705
+ "nulls": "last"
1706
+ },
1707
+ {
1708
+ "expression": "block_number",
1709
+ "isExpression": false,
1710
+ "asc": true,
1711
+ "nulls": "last"
1712
+ }
1713
+ ],
1714
+ "isUnique": false,
1715
+ "concurrently": false,
1716
+ "method": "btree",
1717
+ "with": {}
1718
+ },
1719
+ "transfers_chain_type_block_idx": {
1720
+ "name": "transfers_chain_type_block_idx",
1721
+ "columns": [
1722
+ {
1723
+ "expression": "chain_id",
1724
+ "isExpression": false,
1725
+ "asc": true,
1726
+ "nulls": "last"
1727
+ },
1728
+ {
1729
+ "expression": "position_type_id",
1730
+ "isExpression": false,
1731
+ "asc": true,
1732
+ "nulls": "last"
1733
+ },
1734
+ {
1735
+ "expression": "block_number",
1736
+ "isExpression": false,
1737
+ "asc": true,
1738
+ "nulls": "last"
1739
+ }
1740
+ ],
1741
+ "isUnique": false,
1742
+ "concurrently": false,
1743
+ "method": "btree",
1744
+ "with": {}
1745
+ }
1746
+ },
1747
+ "foreignKeys": {
1748
+ "transfers_position_type_id_position_types_id_fk": {
1749
+ "name": "transfers_position_type_id_position_types_id_fk",
1750
+ "tableFrom": "transfers",
1751
+ "tableTo": "position_types",
1752
+ "schemaTo": "router_v1.14",
1753
+ "columnsFrom": ["position_type_id"],
1754
+ "columnsTo": ["id"],
1755
+ "onDelete": "no action",
1756
+ "onUpdate": "no action"
1757
+ },
1758
+ "transfers_positions_from_fk": {
1759
+ "name": "transfers_positions_from_fk",
1760
+ "tableFrom": "transfers",
1761
+ "tableTo": "positions",
1762
+ "schemaTo": "router_v1.14",
1763
+ "columnsFrom": ["chain_id", "contract", "from", "position_type_id", "asset"],
1764
+ "columnsTo": ["chain_id", "contract", "user", "position_type_id", "asset"],
1765
+ "onDelete": "cascade",
1766
+ "onUpdate": "no action"
1767
+ },
1768
+ "transfers_positions_to_fk": {
1769
+ "name": "transfers_positions_to_fk",
1770
+ "tableFrom": "transfers",
1771
+ "tableTo": "positions",
1772
+ "schemaTo": "router_v1.14",
1773
+ "columnsFrom": ["chain_id", "contract", "to", "position_type_id", "asset"],
1774
+ "columnsTo": ["chain_id", "contract", "user", "position_type_id", "asset"],
1775
+ "onDelete": "cascade",
1776
+ "onUpdate": "no action"
1777
+ }
1778
+ },
1779
+ "compositePrimaryKeys": {},
1780
+ "uniqueConstraints": {},
1781
+ "policies": {},
1782
+ "checkConstraints": {},
1783
+ "isRLSEnabled": false
1784
+ },
1785
+ "router_v1.14.trees": {
1786
+ "name": "trees",
1787
+ "schema": "router_v1.14",
1788
+ "columns": {
1789
+ "root": {
1790
+ "name": "root",
1791
+ "type": "varchar(66)",
1792
+ "primaryKey": true,
1793
+ "notNull": true
1794
+ },
1795
+ "root_signature": {
1796
+ "name": "root_signature",
1797
+ "type": "varchar(132)",
1798
+ "primaryKey": false,
1799
+ "notNull": true
1800
+ },
1801
+ "created_at": {
1802
+ "name": "created_at",
1803
+ "type": "timestamp",
1804
+ "primaryKey": false,
1805
+ "notNull": true,
1806
+ "default": "now()"
1807
+ }
1808
+ },
1809
+ "indexes": {},
1810
+ "foreignKeys": {},
1811
+ "compositePrimaryKeys": {},
1812
+ "uniqueConstraints": {},
1813
+ "policies": {},
1814
+ "checkConstraints": {},
1815
+ "isRLSEnabled": false
1816
+ },
1817
+ "router_v1.14.validations": {
1818
+ "name": "validations",
1819
+ "schema": "router_v1.14",
1820
+ "columns": {
1821
+ "offer_hash": {
1822
+ "name": "offer_hash",
1823
+ "type": "varchar(66)",
1824
+ "primaryKey": false,
1825
+ "notNull": true
1826
+ },
1827
+ "obligation_id": {
1828
+ "name": "obligation_id",
1829
+ "type": "varchar(66)",
1830
+ "primaryKey": false,
1831
+ "notNull": true
1832
+ },
1833
+ "status_id": {
1834
+ "name": "status_id",
1835
+ "type": "integer",
1836
+ "primaryKey": false,
1837
+ "notNull": true
1838
+ },
1839
+ "updated_at": {
1840
+ "name": "updated_at",
1841
+ "type": "timestamp",
1842
+ "primaryKey": false,
1843
+ "notNull": true,
1844
+ "default": "now()"
1845
+ }
1846
+ },
1847
+ "indexes": {},
1848
+ "foreignKeys": {
1849
+ "validations_status_id_status_id_fk": {
1850
+ "name": "validations_status_id_status_id_fk",
1851
+ "tableFrom": "validations",
1852
+ "tableTo": "status",
1853
+ "schemaTo": "router_v1.14",
1854
+ "columnsFrom": ["status_id"],
1855
+ "columnsTo": ["id"],
1856
+ "onDelete": "no action",
1857
+ "onUpdate": "no action"
1858
+ },
1859
+ "validations_offer_fk": {
1860
+ "name": "validations_offer_fk",
1861
+ "tableFrom": "validations",
1862
+ "tableTo": "offers",
1863
+ "schemaTo": "router_v1.14",
1864
+ "columnsFrom": ["offer_hash", "obligation_id"],
1865
+ "columnsTo": ["hash", "obligation_id"],
1866
+ "onDelete": "cascade",
1867
+ "onUpdate": "no action"
1868
+ }
1869
+ },
1870
+ "compositePrimaryKeys": {
1871
+ "validations_pk": {
1872
+ "name": "validations_pk",
1873
+ "columns": ["offer_hash", "obligation_id"]
1874
+ }
1875
+ },
1876
+ "uniqueConstraints": {},
1877
+ "policies": {},
1878
+ "checkConstraints": {},
1879
+ "isRLSEnabled": false
1880
+ }
1881
+ },
1882
+ "enums": {
1883
+ "router_v1.14.callback_type": {
1884
+ "name": "callback_type",
1885
+ "schema": "router_v1.14",
1886
+ "values": ["empty"]
1887
+ },
1888
+ "router_v1.14.position_type": {
1889
+ "name": "position_type",
1890
+ "schema": "router_v1.14",
1891
+ "values": ["erc20", "vault_v1", "debtOf", "collateralOf"]
1892
+ },
1893
+ "router_v1.14.status_code": {
1894
+ "name": "status_code",
1895
+ "schema": "router_v1.14",
1896
+ "values": ["VALID", "SIMULATION_ERROR"]
1897
+ }
1898
+ },
1899
+ "schemas": {},
1900
+ "sequences": {},
1901
+ "roles": {},
1902
+ "policies": {},
1903
+ "views": {},
1904
+ "_meta": {
1905
+ "columns": {},
1906
+ "schemas": {},
1907
+ "tables": {}
1908
+ }
1909
+ }