@morpho-dev/router 0.12.0 → 0.12.1

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.
@@ -0,0 +1,2035 @@
1
+ {
2
+ "id": "f6523413-e1f8-4bfb-b4c0-acb18def2dd2",
3
+ "prevId": "95ec06f9-e78a-4a74-ba85-9c8115f75e06",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "router_v1.16.callbacks": {
8
+ "name": "callbacks",
9
+ "schema": "router_v1.16",
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.16",
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.16",
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.16.chains": {
69
+ "name": "chains",
70
+ "schema": "router_v1.16",
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.16.collectors": {
149
+ "name": "collectors",
150
+ "schema": "router_v1.16",
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.16",
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.16.consumed_events": {
227
+ "name": "consumed_events",
228
+ "schema": "router_v1.16",
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.16",
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.16.groups": {
337
+ "name": "groups",
338
+ "schema": "router_v1.16",
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
+ "foreignKeys": {},
380
+ "compositePrimaryKeys": {
381
+ "groups_pk": {
382
+ "name": "groups_pk",
383
+ "columns": ["chain_id", "maker", "group"]
384
+ }
385
+ },
386
+ "uniqueConstraints": {},
387
+ "policies": {},
388
+ "checkConstraints": {},
389
+ "isRLSEnabled": false
390
+ },
391
+ "router_v1.16.lots": {
392
+ "name": "lots",
393
+ "schema": "router_v1.16",
394
+ "columns": {
395
+ "chain_id": {
396
+ "name": "chain_id",
397
+ "type": "bigint",
398
+ "primaryKey": false,
399
+ "notNull": true
400
+ },
401
+ "user": {
402
+ "name": "user",
403
+ "type": "varchar(42)",
404
+ "primaryKey": false,
405
+ "notNull": true
406
+ },
407
+ "contract": {
408
+ "name": "contract",
409
+ "type": "varchar(66)",
410
+ "primaryKey": false,
411
+ "notNull": true
412
+ },
413
+ "group": {
414
+ "name": "group",
415
+ "type": "varchar(66)",
416
+ "primaryKey": false,
417
+ "notNull": true
418
+ },
419
+ "obligation_id": {
420
+ "name": "obligation_id",
421
+ "type": "varchar(66)",
422
+ "primaryKey": false,
423
+ "notNull": true
424
+ },
425
+ "lower": {
426
+ "name": "lower",
427
+ "type": "numeric(78, 0)",
428
+ "primaryKey": false,
429
+ "notNull": true
430
+ },
431
+ "upper": {
432
+ "name": "upper",
433
+ "type": "numeric(78, 0)",
434
+ "primaryKey": false,
435
+ "notNull": true
436
+ }
437
+ },
438
+ "indexes": {
439
+ "lots_position_group_obligation_idx": {
440
+ "name": "lots_position_group_obligation_idx",
441
+ "columns": [
442
+ {
443
+ "expression": "chain_id",
444
+ "isExpression": false,
445
+ "asc": true,
446
+ "nulls": "last"
447
+ },
448
+ {
449
+ "expression": "user",
450
+ "isExpression": false,
451
+ "asc": true,
452
+ "nulls": "last"
453
+ },
454
+ {
455
+ "expression": "group",
456
+ "isExpression": false,
457
+ "asc": true,
458
+ "nulls": "last"
459
+ },
460
+ {
461
+ "expression": "obligation_id",
462
+ "isExpression": false,
463
+ "asc": true,
464
+ "nulls": "last"
465
+ }
466
+ ],
467
+ "isUnique": false,
468
+ "concurrently": false,
469
+ "method": "btree",
470
+ "with": {}
471
+ }
472
+ },
473
+ "foreignKeys": {
474
+ "lots_lots_positions_fk": {
475
+ "name": "lots_lots_positions_fk",
476
+ "tableFrom": "lots",
477
+ "tableTo": "lots_positions",
478
+ "schemaTo": "router_v1.16",
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.16",
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.16.lots_positions": {
507
+ "name": "lots_positions",
508
+ "schema": "router_v1.16",
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.16",
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.16.merkle_paths": {
560
+ "name": "merkle_paths",
561
+ "schema": "router_v1.16",
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.16",
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.16",
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.16.obligation_collaterals_v2": {
646
+ "name": "obligation_collaterals_v2",
647
+ "schema": "router_v1.16",
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
+ "foreignKeys": {
695
+ "obligation_collaterals_v2_obligation_key_obligations_obligation_key_fk": {
696
+ "name": "obligation_collaterals_v2_obligation_key_obligations_obligation_key_fk",
697
+ "tableFrom": "obligation_collaterals_v2",
698
+ "tableTo": "obligations",
699
+ "schemaTo": "router_v1.16",
700
+ "columnsFrom": ["obligation_key"],
701
+ "columnsTo": ["obligation_key"],
702
+ "onDelete": "cascade",
703
+ "onUpdate": "no action"
704
+ }
705
+ },
706
+ "compositePrimaryKeys": {
707
+ "obligation_collaterals_v2_pk": {
708
+ "name": "obligation_collaterals_v2_pk",
709
+ "columns": ["obligation_key", "asset"]
710
+ }
711
+ },
712
+ "uniqueConstraints": {},
713
+ "policies": {},
714
+ "checkConstraints": {},
715
+ "isRLSEnabled": false
716
+ },
717
+ "router_v1.16.obligation_id_keys": {
718
+ "name": "obligation_id_keys",
719
+ "schema": "router_v1.16",
720
+ "columns": {
721
+ "obligation_id": {
722
+ "name": "obligation_id",
723
+ "type": "varchar(66)",
724
+ "primaryKey": true,
725
+ "notNull": true
726
+ },
727
+ "obligation_key": {
728
+ "name": "obligation_key",
729
+ "type": "varchar(66)",
730
+ "primaryKey": false,
731
+ "notNull": true
732
+ },
733
+ "chain_id": {
734
+ "name": "chain_id",
735
+ "type": "bigint",
736
+ "primaryKey": false,
737
+ "notNull": true
738
+ },
739
+ "morpho_v2": {
740
+ "name": "morpho_v2",
741
+ "type": "varchar(42)",
742
+ "primaryKey": false,
743
+ "notNull": true
744
+ }
745
+ },
746
+ "indexes": {
747
+ "obligation_id_keys_obligation_key_idx": {
748
+ "name": "obligation_id_keys_obligation_key_idx",
749
+ "columns": [
750
+ {
751
+ "expression": "obligation_key",
752
+ "isExpression": false,
753
+ "asc": true,
754
+ "nulls": "last"
755
+ }
756
+ ],
757
+ "isUnique": false,
758
+ "concurrently": false,
759
+ "method": "btree",
760
+ "with": {}
761
+ },
762
+ "obligation_id_keys_chain_id_idx": {
763
+ "name": "obligation_id_keys_chain_id_idx",
764
+ "columns": [
765
+ {
766
+ "expression": "chain_id",
767
+ "isExpression": false,
768
+ "asc": true,
769
+ "nulls": "last"
770
+ }
771
+ ],
772
+ "isUnique": false,
773
+ "concurrently": false,
774
+ "method": "btree",
775
+ "with": {}
776
+ }
777
+ },
778
+ "foreignKeys": {
779
+ "obligation_id_keys_obligation_key_obligations_obligation_key_fk": {
780
+ "name": "obligation_id_keys_obligation_key_obligations_obligation_key_fk",
781
+ "tableFrom": "obligation_id_keys",
782
+ "tableTo": "obligations",
783
+ "schemaTo": "router_v1.16",
784
+ "columnsFrom": ["obligation_key"],
785
+ "columnsTo": ["obligation_key"],
786
+ "onDelete": "cascade",
787
+ "onUpdate": "no action"
788
+ }
789
+ },
790
+ "compositePrimaryKeys": {},
791
+ "uniqueConstraints": {},
792
+ "policies": {},
793
+ "checkConstraints": {},
794
+ "isRLSEnabled": false
795
+ },
796
+ "router_v1.16.obligations": {
797
+ "name": "obligations",
798
+ "schema": "router_v1.16",
799
+ "columns": {
800
+ "obligation_key": {
801
+ "name": "obligation_key",
802
+ "type": "varchar(66)",
803
+ "primaryKey": true,
804
+ "notNull": true
805
+ },
806
+ "loan_token": {
807
+ "name": "loan_token",
808
+ "type": "varchar(42)",
809
+ "primaryKey": false,
810
+ "notNull": true
811
+ },
812
+ "maturity": {
813
+ "name": "maturity",
814
+ "type": "integer",
815
+ "primaryKey": false,
816
+ "notNull": true
817
+ },
818
+ "rcf_threshold": {
819
+ "name": "rcf_threshold",
820
+ "type": "numeric(78, 0)",
821
+ "primaryKey": false,
822
+ "notNull": true
823
+ }
824
+ },
825
+ "indexes": {},
826
+ "foreignKeys": {},
827
+ "compositePrimaryKeys": {},
828
+ "uniqueConstraints": {},
829
+ "policies": {},
830
+ "checkConstraints": {},
831
+ "isRLSEnabled": false
832
+ },
833
+ "router_v1.16.offers": {
834
+ "name": "offers",
835
+ "schema": "router_v1.16",
836
+ "columns": {
837
+ "hash": {
838
+ "name": "hash",
839
+ "type": "varchar(66)",
840
+ "primaryKey": false,
841
+ "notNull": true
842
+ },
843
+ "obligation_id": {
844
+ "name": "obligation_id",
845
+ "type": "varchar(66)",
846
+ "primaryKey": false,
847
+ "notNull": true
848
+ },
849
+ "max_units": {
850
+ "name": "max_units",
851
+ "type": "numeric(78, 0)",
852
+ "primaryKey": false,
853
+ "notNull": true,
854
+ "default": "'0'"
855
+ },
856
+ "tick": {
857
+ "name": "tick",
858
+ "type": "integer",
859
+ "primaryKey": false,
860
+ "notNull": true
861
+ },
862
+ "maturity": {
863
+ "name": "maturity",
864
+ "type": "integer",
865
+ "primaryKey": false,
866
+ "notNull": true
867
+ },
868
+ "expiry": {
869
+ "name": "expiry",
870
+ "type": "integer",
871
+ "primaryKey": false,
872
+ "notNull": true
873
+ },
874
+ "start": {
875
+ "name": "start",
876
+ "type": "integer",
877
+ "primaryKey": false,
878
+ "notNull": true
879
+ },
880
+ "group_chain_id": {
881
+ "name": "group_chain_id",
882
+ "type": "bigint",
883
+ "primaryKey": false,
884
+ "notNull": true
885
+ },
886
+ "group_maker": {
887
+ "name": "group_maker",
888
+ "type": "varchar(42)",
889
+ "primaryKey": false,
890
+ "notNull": true
891
+ },
892
+ "group_group": {
893
+ "name": "group_group",
894
+ "type": "varchar(66)",
895
+ "primaryKey": false,
896
+ "notNull": true
897
+ },
898
+ "session": {
899
+ "name": "session",
900
+ "type": "varchar(66)",
901
+ "primaryKey": false,
902
+ "notNull": true
903
+ },
904
+ "buy": {
905
+ "name": "buy",
906
+ "type": "boolean",
907
+ "primaryKey": false,
908
+ "notNull": true
909
+ },
910
+ "callback_address": {
911
+ "name": "callback_address",
912
+ "type": "varchar(42)",
913
+ "primaryKey": false,
914
+ "notNull": true
915
+ },
916
+ "callback_data": {
917
+ "name": "callback_data",
918
+ "type": "text",
919
+ "primaryKey": false,
920
+ "notNull": true
921
+ },
922
+ "receiver_if_maker_is_seller": {
923
+ "name": "receiver_if_maker_is_seller",
924
+ "type": "varchar(42)",
925
+ "primaryKey": false,
926
+ "notNull": false
927
+ },
928
+ "block_number": {
929
+ "name": "block_number",
930
+ "type": "bigint",
931
+ "primaryKey": false,
932
+ "notNull": true
933
+ },
934
+ "updated_at": {
935
+ "name": "updated_at",
936
+ "type": "timestamp",
937
+ "primaryKey": false,
938
+ "notNull": true,
939
+ "default": "now()"
940
+ },
941
+ "exit_only": {
942
+ "name": "exit_only",
943
+ "type": "boolean",
944
+ "primaryKey": false,
945
+ "notNull": true,
946
+ "default": false
947
+ }
948
+ },
949
+ "indexes": {
950
+ "offers_group_and_hash_idx": {
951
+ "name": "offers_group_and_hash_idx",
952
+ "columns": [
953
+ {
954
+ "expression": "group_chain_id",
955
+ "isExpression": false,
956
+ "asc": true,
957
+ "nulls": "last"
958
+ },
959
+ {
960
+ "expression": "group_maker",
961
+ "isExpression": false,
962
+ "asc": true,
963
+ "nulls": "last"
964
+ },
965
+ {
966
+ "expression": "group_group",
967
+ "isExpression": false,
968
+ "asc": true,
969
+ "nulls": "last"
970
+ },
971
+ {
972
+ "expression": "hash",
973
+ "isExpression": false,
974
+ "asc": true,
975
+ "nulls": "last"
976
+ }
977
+ ],
978
+ "isUnique": false,
979
+ "concurrently": false,
980
+ "method": "btree",
981
+ "with": {}
982
+ },
983
+ "offers_obligation_side_tick_idx": {
984
+ "name": "offers_obligation_side_tick_idx",
985
+ "columns": [
986
+ {
987
+ "expression": "obligation_id",
988
+ "isExpression": false,
989
+ "asc": true,
990
+ "nulls": "last"
991
+ },
992
+ {
993
+ "expression": "buy",
994
+ "isExpression": false,
995
+ "asc": true,
996
+ "nulls": "last"
997
+ },
998
+ {
999
+ "expression": "tick",
1000
+ "isExpression": false,
1001
+ "asc": true,
1002
+ "nulls": "last"
1003
+ }
1004
+ ],
1005
+ "isUnique": false,
1006
+ "concurrently": false,
1007
+ "method": "btree",
1008
+ "with": {}
1009
+ },
1010
+ "offers_obligation_active_tick_idx": {
1011
+ "name": "offers_obligation_active_tick_idx",
1012
+ "columns": [
1013
+ {
1014
+ "expression": "obligation_id",
1015
+ "isExpression": false,
1016
+ "asc": true,
1017
+ "nulls": "last"
1018
+ },
1019
+ {
1020
+ "expression": "buy",
1021
+ "isExpression": false,
1022
+ "asc": true,
1023
+ "nulls": "last"
1024
+ },
1025
+ {
1026
+ "expression": "expiry",
1027
+ "isExpression": false,
1028
+ "asc": true,
1029
+ "nulls": "last"
1030
+ },
1031
+ {
1032
+ "expression": "maturity",
1033
+ "isExpression": false,
1034
+ "asc": true,
1035
+ "nulls": "last"
1036
+ },
1037
+ {
1038
+ "expression": "start",
1039
+ "isExpression": false,
1040
+ "asc": true,
1041
+ "nulls": "last"
1042
+ },
1043
+ {
1044
+ "expression": "tick",
1045
+ "isExpression": false,
1046
+ "asc": true,
1047
+ "nulls": "last"
1048
+ }
1049
+ ],
1050
+ "isUnique": false,
1051
+ "concurrently": false,
1052
+ "method": "btree",
1053
+ "with": {}
1054
+ },
1055
+ "offers_group_maker_idx": {
1056
+ "name": "offers_group_maker_idx",
1057
+ "columns": [
1058
+ {
1059
+ "expression": "group_maker",
1060
+ "isExpression": false,
1061
+ "asc": true,
1062
+ "nulls": "last"
1063
+ },
1064
+ {
1065
+ "expression": "hash",
1066
+ "isExpression": false,
1067
+ "asc": true,
1068
+ "nulls": "last"
1069
+ },
1070
+ {
1071
+ "expression": "obligation_id",
1072
+ "isExpression": false,
1073
+ "asc": true,
1074
+ "nulls": "last"
1075
+ }
1076
+ ],
1077
+ "isUnique": false,
1078
+ "concurrently": false,
1079
+ "method": "btree",
1080
+ "with": {}
1081
+ },
1082
+ "offers_group_winner_expr_idx": {
1083
+ "name": "offers_group_winner_expr_idx",
1084
+ "columns": [
1085
+ {
1086
+ "expression": "group_chain_id",
1087
+ "isExpression": false,
1088
+ "asc": true,
1089
+ "nulls": "last"
1090
+ },
1091
+ {
1092
+ "expression": "group_maker",
1093
+ "isExpression": false,
1094
+ "asc": true,
1095
+ "nulls": "last"
1096
+ },
1097
+ {
1098
+ "expression": "group_group",
1099
+ "isExpression": false,
1100
+ "asc": true,
1101
+ "nulls": "last"
1102
+ },
1103
+ {
1104
+ "expression": "obligation_id",
1105
+ "isExpression": false,
1106
+ "asc": true,
1107
+ "nulls": "last"
1108
+ },
1109
+ {
1110
+ "expression": "buy",
1111
+ "isExpression": false,
1112
+ "asc": true,
1113
+ "nulls": "last"
1114
+ },
1115
+ {
1116
+ "expression": "(CASE WHEN \"buy\" THEN -\"tick\" ELSE \"tick\" END)",
1117
+ "asc": true,
1118
+ "isExpression": true,
1119
+ "nulls": "last"
1120
+ },
1121
+ {
1122
+ "expression": "block_number",
1123
+ "isExpression": false,
1124
+ "asc": true,
1125
+ "nulls": "last"
1126
+ },
1127
+ {
1128
+ "expression": "\"max_units\" DESC",
1129
+ "asc": true,
1130
+ "isExpression": true,
1131
+ "nulls": "last"
1132
+ },
1133
+ {
1134
+ "expression": "hash",
1135
+ "isExpression": false,
1136
+ "asc": true,
1137
+ "nulls": "last"
1138
+ }
1139
+ ],
1140
+ "isUnique": false,
1141
+ "concurrently": false,
1142
+ "method": "btree",
1143
+ "with": {}
1144
+ },
1145
+ "offers_book_winners_covering_idx": {
1146
+ "name": "offers_book_winners_covering_idx",
1147
+ "columns": [
1148
+ {
1149
+ "expression": "obligation_id",
1150
+ "isExpression": false,
1151
+ "asc": true,
1152
+ "nulls": "last"
1153
+ },
1154
+ {
1155
+ "expression": "buy",
1156
+ "isExpression": false,
1157
+ "asc": true,
1158
+ "nulls": "last"
1159
+ },
1160
+ {
1161
+ "expression": "group_chain_id",
1162
+ "isExpression": false,
1163
+ "asc": true,
1164
+ "nulls": "last"
1165
+ },
1166
+ {
1167
+ "expression": "group_maker",
1168
+ "isExpression": false,
1169
+ "asc": true,
1170
+ "nulls": "last"
1171
+ },
1172
+ {
1173
+ "expression": "group_group",
1174
+ "isExpression": false,
1175
+ "asc": true,
1176
+ "nulls": "last"
1177
+ },
1178
+ {
1179
+ "expression": "(CASE WHEN \"buy\" THEN -\"tick\" ELSE \"tick\" END)",
1180
+ "asc": true,
1181
+ "isExpression": true,
1182
+ "nulls": "last"
1183
+ },
1184
+ {
1185
+ "expression": "block_number",
1186
+ "isExpression": false,
1187
+ "asc": true,
1188
+ "nulls": "last"
1189
+ },
1190
+ {
1191
+ "expression": "\"max_units\" DESC",
1192
+ "asc": true,
1193
+ "isExpression": true,
1194
+ "nulls": "last"
1195
+ },
1196
+ {
1197
+ "expression": "hash",
1198
+ "isExpression": false,
1199
+ "asc": true,
1200
+ "nulls": "last"
1201
+ }
1202
+ ],
1203
+ "isUnique": false,
1204
+ "concurrently": false,
1205
+ "method": "btree",
1206
+ "with": {}
1207
+ }
1208
+ },
1209
+ "foreignKeys": {
1210
+ "offers_obligation_id_obligation_id_keys_obligation_id_fk": {
1211
+ "name": "offers_obligation_id_obligation_id_keys_obligation_id_fk",
1212
+ "tableFrom": "offers",
1213
+ "tableTo": "obligation_id_keys",
1214
+ "schemaTo": "router_v1.16",
1215
+ "columnsFrom": ["obligation_id"],
1216
+ "columnsTo": ["obligation_id"],
1217
+ "onDelete": "cascade",
1218
+ "onUpdate": "no action"
1219
+ },
1220
+ "offers_groups_fk": {
1221
+ "name": "offers_groups_fk",
1222
+ "tableFrom": "offers",
1223
+ "tableTo": "groups",
1224
+ "schemaTo": "router_v1.16",
1225
+ "columnsFrom": ["group_chain_id", "group_maker", "group_group"],
1226
+ "columnsTo": ["chain_id", "maker", "group"],
1227
+ "onDelete": "cascade",
1228
+ "onUpdate": "no action"
1229
+ }
1230
+ },
1231
+ "compositePrimaryKeys": {
1232
+ "offers_pk": {
1233
+ "name": "offers_pk",
1234
+ "columns": ["hash", "obligation_id"]
1235
+ }
1236
+ },
1237
+ "uniqueConstraints": {},
1238
+ "policies": {},
1239
+ "checkConstraints": {},
1240
+ "isRLSEnabled": false
1241
+ },
1242
+ "router_v1.16.offers_callbacks": {
1243
+ "name": "offers_callbacks",
1244
+ "schema": "router_v1.16",
1245
+ "columns": {
1246
+ "offer_hash": {
1247
+ "name": "offer_hash",
1248
+ "type": "varchar(66)",
1249
+ "primaryKey": false,
1250
+ "notNull": true
1251
+ },
1252
+ "obligation_id": {
1253
+ "name": "obligation_id",
1254
+ "type": "varchar(66)",
1255
+ "primaryKey": false,
1256
+ "notNull": true
1257
+ },
1258
+ "callback_id": {
1259
+ "name": "callback_id",
1260
+ "type": "varchar(66)",
1261
+ "primaryKey": false,
1262
+ "notNull": false
1263
+ }
1264
+ },
1265
+ "indexes": {},
1266
+ "foreignKeys": {
1267
+ "offers_callbacks_offer_fk": {
1268
+ "name": "offers_callbacks_offer_fk",
1269
+ "tableFrom": "offers_callbacks",
1270
+ "tableTo": "offers",
1271
+ "schemaTo": "router_v1.16",
1272
+ "columnsFrom": ["offer_hash", "obligation_id"],
1273
+ "columnsTo": ["hash", "obligation_id"],
1274
+ "onDelete": "cascade",
1275
+ "onUpdate": "no action"
1276
+ }
1277
+ },
1278
+ "compositePrimaryKeys": {
1279
+ "offers_callbacks_pk": {
1280
+ "name": "offers_callbacks_pk",
1281
+ "columns": ["offer_hash", "obligation_id", "callback_id"]
1282
+ }
1283
+ },
1284
+ "uniqueConstraints": {},
1285
+ "policies": {},
1286
+ "checkConstraints": {},
1287
+ "isRLSEnabled": false
1288
+ },
1289
+ "router_v1.16.offsets": {
1290
+ "name": "offsets",
1291
+ "schema": "router_v1.16",
1292
+ "columns": {
1293
+ "chain_id": {
1294
+ "name": "chain_id",
1295
+ "type": "bigint",
1296
+ "primaryKey": false,
1297
+ "notNull": true
1298
+ },
1299
+ "user": {
1300
+ "name": "user",
1301
+ "type": "varchar(42)",
1302
+ "primaryKey": false,
1303
+ "notNull": true
1304
+ },
1305
+ "contract": {
1306
+ "name": "contract",
1307
+ "type": "varchar(66)",
1308
+ "primaryKey": false,
1309
+ "notNull": true
1310
+ },
1311
+ "group": {
1312
+ "name": "group",
1313
+ "type": "varchar(66)",
1314
+ "primaryKey": false,
1315
+ "notNull": true
1316
+ },
1317
+ "obligation_id": {
1318
+ "name": "obligation_id",
1319
+ "type": "varchar(66)",
1320
+ "primaryKey": false,
1321
+ "notNull": true
1322
+ },
1323
+ "value": {
1324
+ "name": "value",
1325
+ "type": "numeric(78, 0)",
1326
+ "primaryKey": false,
1327
+ "notNull": true
1328
+ }
1329
+ },
1330
+ "indexes": {
1331
+ "offsets_position_obligation_idx": {
1332
+ "name": "offsets_position_obligation_idx",
1333
+ "columns": [
1334
+ {
1335
+ "expression": "chain_id",
1336
+ "isExpression": false,
1337
+ "asc": true,
1338
+ "nulls": "last"
1339
+ },
1340
+ {
1341
+ "expression": "contract",
1342
+ "isExpression": false,
1343
+ "asc": true,
1344
+ "nulls": "last"
1345
+ },
1346
+ {
1347
+ "expression": "user",
1348
+ "isExpression": false,
1349
+ "asc": true,
1350
+ "nulls": "last"
1351
+ },
1352
+ {
1353
+ "expression": "obligation_id",
1354
+ "isExpression": false,
1355
+ "asc": true,
1356
+ "nulls": "last"
1357
+ }
1358
+ ],
1359
+ "isUnique": false,
1360
+ "concurrently": false,
1361
+ "method": "btree",
1362
+ "with": {}
1363
+ }
1364
+ },
1365
+ "foreignKeys": {
1366
+ "offsets_lots_positions_fk": {
1367
+ "name": "offsets_lots_positions_fk",
1368
+ "tableFrom": "offsets",
1369
+ "tableTo": "lots_positions",
1370
+ "schemaTo": "router_v1.16",
1371
+ "columnsFrom": ["chain_id", "contract", "user"],
1372
+ "columnsTo": ["chain_id", "contract", "user"],
1373
+ "onDelete": "cascade",
1374
+ "onUpdate": "no action"
1375
+ }
1376
+ },
1377
+ "compositePrimaryKeys": {
1378
+ "offsets_pk": {
1379
+ "name": "offsets_pk",
1380
+ "columns": ["chain_id", "user", "contract", "group", "obligation_id"]
1381
+ }
1382
+ },
1383
+ "uniqueConstraints": {},
1384
+ "policies": {},
1385
+ "checkConstraints": {},
1386
+ "isRLSEnabled": false
1387
+ },
1388
+ "router_v1.16.oracles": {
1389
+ "name": "oracles",
1390
+ "schema": "router_v1.16",
1391
+ "columns": {
1392
+ "chain_id": {
1393
+ "name": "chain_id",
1394
+ "type": "bigint",
1395
+ "primaryKey": false,
1396
+ "notNull": true
1397
+ },
1398
+ "address": {
1399
+ "name": "address",
1400
+ "type": "varchar(42)",
1401
+ "primaryKey": false,
1402
+ "notNull": true
1403
+ },
1404
+ "price": {
1405
+ "name": "price",
1406
+ "type": "numeric(78, 0)",
1407
+ "primaryKey": false,
1408
+ "notNull": false
1409
+ },
1410
+ "block_number": {
1411
+ "name": "block_number",
1412
+ "type": "bigint",
1413
+ "primaryKey": false,
1414
+ "notNull": true
1415
+ },
1416
+ "updated_at": {
1417
+ "name": "updated_at",
1418
+ "type": "timestamp",
1419
+ "primaryKey": false,
1420
+ "notNull": true,
1421
+ "default": "now()"
1422
+ }
1423
+ },
1424
+ "indexes": {},
1425
+ "foreignKeys": {},
1426
+ "compositePrimaryKeys": {
1427
+ "oracles_pk": {
1428
+ "name": "oracles_pk",
1429
+ "columns": ["chain_id", "address"]
1430
+ }
1431
+ },
1432
+ "uniqueConstraints": {},
1433
+ "policies": {},
1434
+ "checkConstraints": {},
1435
+ "isRLSEnabled": false
1436
+ },
1437
+ "router_v1.16.pending_links": {
1438
+ "name": "pending_links",
1439
+ "schema": "router_v1.16",
1440
+ "columns": {
1441
+ "key": {
1442
+ "name": "key",
1443
+ "type": "varchar(191)",
1444
+ "primaryKey": true,
1445
+ "notNull": true
1446
+ },
1447
+ "type": {
1448
+ "name": "type",
1449
+ "type": "text",
1450
+ "primaryKey": false,
1451
+ "notNull": true
1452
+ },
1453
+ "status": {
1454
+ "name": "status",
1455
+ "type": "text",
1456
+ "primaryKey": false,
1457
+ "notNull": true
1458
+ },
1459
+ "chain_id": {
1460
+ "name": "chain_id",
1461
+ "type": "bigint",
1462
+ "primaryKey": false,
1463
+ "notNull": true
1464
+ },
1465
+ "event_id": {
1466
+ "name": "event_id",
1467
+ "type": "varchar(128)",
1468
+ "primaryKey": false,
1469
+ "notNull": true
1470
+ },
1471
+ "obligation_id": {
1472
+ "name": "obligation_id",
1473
+ "type": "varchar(66)",
1474
+ "primaryKey": false,
1475
+ "notNull": true
1476
+ },
1477
+ "collateral_index": {
1478
+ "name": "collateral_index",
1479
+ "type": "integer",
1480
+ "primaryKey": false,
1481
+ "notNull": true
1482
+ },
1483
+ "user": {
1484
+ "name": "user",
1485
+ "type": "varchar(42)",
1486
+ "primaryKey": false,
1487
+ "notNull": true
1488
+ },
1489
+ "amount": {
1490
+ "name": "amount",
1491
+ "type": "numeric(78, 0)",
1492
+ "primaryKey": false,
1493
+ "notNull": true
1494
+ },
1495
+ "block_number": {
1496
+ "name": "block_number",
1497
+ "type": "bigint",
1498
+ "primaryKey": false,
1499
+ "notNull": true
1500
+ },
1501
+ "first_seen_block": {
1502
+ "name": "first_seen_block",
1503
+ "type": "bigint",
1504
+ "primaryKey": false,
1505
+ "notNull": true
1506
+ },
1507
+ "last_tried_block": {
1508
+ "name": "last_tried_block",
1509
+ "type": "bigint",
1510
+ "primaryKey": false,
1511
+ "notNull": false
1512
+ },
1513
+ "attempts": {
1514
+ "name": "attempts",
1515
+ "type": "integer",
1516
+ "primaryKey": false,
1517
+ "notNull": true,
1518
+ "default": 0
1519
+ },
1520
+ "ignored_reason": {
1521
+ "name": "ignored_reason",
1522
+ "type": "text",
1523
+ "primaryKey": false,
1524
+ "notNull": false
1525
+ },
1526
+ "resolved_at": {
1527
+ "name": "resolved_at",
1528
+ "type": "timestamp",
1529
+ "primaryKey": false,
1530
+ "notNull": false
1531
+ },
1532
+ "updated_at": {
1533
+ "name": "updated_at",
1534
+ "type": "timestamp",
1535
+ "primaryKey": false,
1536
+ "notNull": true,
1537
+ "default": "now()"
1538
+ }
1539
+ },
1540
+ "indexes": {
1541
+ "pending_links_pending_scan_idx": {
1542
+ "name": "pending_links_pending_scan_idx",
1543
+ "columns": [
1544
+ {
1545
+ "expression": "chain_id",
1546
+ "isExpression": false,
1547
+ "asc": true,
1548
+ "nulls": "last"
1549
+ },
1550
+ {
1551
+ "expression": "type",
1552
+ "isExpression": false,
1553
+ "asc": true,
1554
+ "nulls": "last"
1555
+ },
1556
+ {
1557
+ "expression": "status",
1558
+ "isExpression": false,
1559
+ "asc": true,
1560
+ "nulls": "last"
1561
+ },
1562
+ {
1563
+ "expression": "first_seen_block",
1564
+ "isExpression": false,
1565
+ "asc": true,
1566
+ "nulls": "last"
1567
+ }
1568
+ ],
1569
+ "isUnique": false,
1570
+ "concurrently": false,
1571
+ "method": "btree",
1572
+ "with": {}
1573
+ },
1574
+ "pending_links_event_id_idx": {
1575
+ "name": "pending_links_event_id_idx",
1576
+ "columns": [
1577
+ {
1578
+ "expression": "chain_id",
1579
+ "isExpression": false,
1580
+ "asc": true,
1581
+ "nulls": "last"
1582
+ },
1583
+ {
1584
+ "expression": "event_id",
1585
+ "isExpression": false,
1586
+ "asc": true,
1587
+ "nulls": "last"
1588
+ }
1589
+ ],
1590
+ "isUnique": false,
1591
+ "concurrently": false,
1592
+ "method": "btree",
1593
+ "with": {}
1594
+ }
1595
+ },
1596
+ "foreignKeys": {},
1597
+ "compositePrimaryKeys": {},
1598
+ "uniqueConstraints": {},
1599
+ "policies": {},
1600
+ "checkConstraints": {},
1601
+ "isRLSEnabled": false
1602
+ },
1603
+ "router_v1.16.position_types": {
1604
+ "name": "position_types",
1605
+ "schema": "router_v1.16",
1606
+ "columns": {
1607
+ "id": {
1608
+ "name": "id",
1609
+ "type": "serial",
1610
+ "primaryKey": true,
1611
+ "notNull": true
1612
+ },
1613
+ "type": {
1614
+ "name": "type",
1615
+ "type": "position_type",
1616
+ "typeSchema": "router_v1.16",
1617
+ "primaryKey": false,
1618
+ "notNull": true
1619
+ }
1620
+ },
1621
+ "indexes": {},
1622
+ "foreignKeys": {},
1623
+ "compositePrimaryKeys": {},
1624
+ "uniqueConstraints": {},
1625
+ "policies": {},
1626
+ "checkConstraints": {},
1627
+ "isRLSEnabled": false
1628
+ },
1629
+ "router_v1.16.positions": {
1630
+ "name": "positions",
1631
+ "schema": "router_v1.16",
1632
+ "columns": {
1633
+ "chain_id": {
1634
+ "name": "chain_id",
1635
+ "type": "bigint",
1636
+ "primaryKey": false,
1637
+ "notNull": true
1638
+ },
1639
+ "contract": {
1640
+ "name": "contract",
1641
+ "type": "varchar(66)",
1642
+ "primaryKey": false,
1643
+ "notNull": true
1644
+ },
1645
+ "user": {
1646
+ "name": "user",
1647
+ "type": "varchar(42)",
1648
+ "primaryKey": false,
1649
+ "notNull": true
1650
+ },
1651
+ "position_type_id": {
1652
+ "name": "position_type_id",
1653
+ "type": "integer",
1654
+ "primaryKey": false,
1655
+ "notNull": true
1656
+ },
1657
+ "balance": {
1658
+ "name": "balance",
1659
+ "type": "numeric(78, 0)",
1660
+ "primaryKey": false,
1661
+ "notNull": false
1662
+ },
1663
+ "asset": {
1664
+ "name": "asset",
1665
+ "type": "varchar(42)",
1666
+ "primaryKey": false,
1667
+ "notNull": true
1668
+ },
1669
+ "block_number": {
1670
+ "name": "block_number",
1671
+ "type": "bigint",
1672
+ "primaryKey": false,
1673
+ "notNull": true
1674
+ },
1675
+ "updated_at": {
1676
+ "name": "updated_at",
1677
+ "type": "timestamp",
1678
+ "primaryKey": false,
1679
+ "notNull": true,
1680
+ "default": "now()"
1681
+ }
1682
+ },
1683
+ "indexes": {},
1684
+ "foreignKeys": {
1685
+ "positions_position_type_id_position_types_id_fk": {
1686
+ "name": "positions_position_type_id_position_types_id_fk",
1687
+ "tableFrom": "positions",
1688
+ "tableTo": "position_types",
1689
+ "schemaTo": "router_v1.16",
1690
+ "columnsFrom": ["position_type_id"],
1691
+ "columnsTo": ["id"],
1692
+ "onDelete": "no action",
1693
+ "onUpdate": "no action"
1694
+ }
1695
+ },
1696
+ "compositePrimaryKeys": {
1697
+ "positions_pk": {
1698
+ "name": "positions_pk",
1699
+ "columns": ["chain_id", "contract", "user", "position_type_id", "asset"]
1700
+ }
1701
+ },
1702
+ "uniqueConstraints": {},
1703
+ "policies": {},
1704
+ "checkConstraints": {},
1705
+ "isRLSEnabled": false
1706
+ },
1707
+ "router_v1.16.status": {
1708
+ "name": "status",
1709
+ "schema": "router_v1.16",
1710
+ "columns": {
1711
+ "id": {
1712
+ "name": "id",
1713
+ "type": "serial",
1714
+ "primaryKey": true,
1715
+ "notNull": true
1716
+ },
1717
+ "code": {
1718
+ "name": "code",
1719
+ "type": "status_code",
1720
+ "typeSchema": "router_v1.16",
1721
+ "primaryKey": false,
1722
+ "notNull": false
1723
+ }
1724
+ },
1725
+ "indexes": {},
1726
+ "foreignKeys": {},
1727
+ "compositePrimaryKeys": {},
1728
+ "uniqueConstraints": {
1729
+ "status_code_unique": {
1730
+ "name": "status_code_unique",
1731
+ "nullsNotDistinct": false,
1732
+ "columns": ["code"]
1733
+ }
1734
+ },
1735
+ "policies": {},
1736
+ "checkConstraints": {},
1737
+ "isRLSEnabled": false
1738
+ },
1739
+ "router_v1.16.transfers": {
1740
+ "name": "transfers",
1741
+ "schema": "router_v1.16",
1742
+ "columns": {
1743
+ "event_id": {
1744
+ "name": "event_id",
1745
+ "type": "varchar(128)",
1746
+ "primaryKey": true,
1747
+ "notNull": true
1748
+ },
1749
+ "chain_id": {
1750
+ "name": "chain_id",
1751
+ "type": "bigint",
1752
+ "primaryKey": false,
1753
+ "notNull": true
1754
+ },
1755
+ "contract": {
1756
+ "name": "contract",
1757
+ "type": "varchar(66)",
1758
+ "primaryKey": false,
1759
+ "notNull": true
1760
+ },
1761
+ "from": {
1762
+ "name": "from",
1763
+ "type": "varchar(42)",
1764
+ "primaryKey": false,
1765
+ "notNull": true
1766
+ },
1767
+ "to": {
1768
+ "name": "to",
1769
+ "type": "varchar(42)",
1770
+ "primaryKey": false,
1771
+ "notNull": true
1772
+ },
1773
+ "value": {
1774
+ "name": "value",
1775
+ "type": "numeric(78, 0)",
1776
+ "primaryKey": false,
1777
+ "notNull": true
1778
+ },
1779
+ "position_type_id": {
1780
+ "name": "position_type_id",
1781
+ "type": "integer",
1782
+ "primaryKey": false,
1783
+ "notNull": true
1784
+ },
1785
+ "asset": {
1786
+ "name": "asset",
1787
+ "type": "varchar(42)",
1788
+ "primaryKey": false,
1789
+ "notNull": true
1790
+ },
1791
+ "block_number": {
1792
+ "name": "block_number",
1793
+ "type": "bigint",
1794
+ "primaryKey": false,
1795
+ "notNull": true
1796
+ },
1797
+ "created_at": {
1798
+ "name": "created_at",
1799
+ "type": "timestamp",
1800
+ "primaryKey": false,
1801
+ "notNull": true,
1802
+ "default": "now()"
1803
+ }
1804
+ },
1805
+ "indexes": {
1806
+ "transfers_chain_contract_user_idx": {
1807
+ "name": "transfers_chain_contract_user_idx",
1808
+ "columns": [
1809
+ {
1810
+ "expression": "chain_id",
1811
+ "isExpression": false,
1812
+ "asc": true,
1813
+ "nulls": "last"
1814
+ },
1815
+ {
1816
+ "expression": "contract",
1817
+ "isExpression": false,
1818
+ "asc": true,
1819
+ "nulls": "last"
1820
+ },
1821
+ {
1822
+ "expression": "from",
1823
+ "isExpression": false,
1824
+ "asc": true,
1825
+ "nulls": "last"
1826
+ },
1827
+ {
1828
+ "expression": "to",
1829
+ "isExpression": false,
1830
+ "asc": true,
1831
+ "nulls": "last"
1832
+ },
1833
+ {
1834
+ "expression": "block_number",
1835
+ "isExpression": false,
1836
+ "asc": true,
1837
+ "nulls": "last"
1838
+ }
1839
+ ],
1840
+ "isUnique": false,
1841
+ "concurrently": false,
1842
+ "method": "btree",
1843
+ "with": {}
1844
+ },
1845
+ "transfers_chain_type_block_idx": {
1846
+ "name": "transfers_chain_type_block_idx",
1847
+ "columns": [
1848
+ {
1849
+ "expression": "chain_id",
1850
+ "isExpression": false,
1851
+ "asc": true,
1852
+ "nulls": "last"
1853
+ },
1854
+ {
1855
+ "expression": "position_type_id",
1856
+ "isExpression": false,
1857
+ "asc": true,
1858
+ "nulls": "last"
1859
+ },
1860
+ {
1861
+ "expression": "block_number",
1862
+ "isExpression": false,
1863
+ "asc": true,
1864
+ "nulls": "last"
1865
+ }
1866
+ ],
1867
+ "isUnique": false,
1868
+ "concurrently": false,
1869
+ "method": "btree",
1870
+ "with": {}
1871
+ }
1872
+ },
1873
+ "foreignKeys": {
1874
+ "transfers_position_type_id_position_types_id_fk": {
1875
+ "name": "transfers_position_type_id_position_types_id_fk",
1876
+ "tableFrom": "transfers",
1877
+ "tableTo": "position_types",
1878
+ "schemaTo": "router_v1.16",
1879
+ "columnsFrom": ["position_type_id"],
1880
+ "columnsTo": ["id"],
1881
+ "onDelete": "no action",
1882
+ "onUpdate": "no action"
1883
+ },
1884
+ "transfers_positions_from_fk": {
1885
+ "name": "transfers_positions_from_fk",
1886
+ "tableFrom": "transfers",
1887
+ "tableTo": "positions",
1888
+ "schemaTo": "router_v1.16",
1889
+ "columnsFrom": ["chain_id", "contract", "from", "position_type_id", "asset"],
1890
+ "columnsTo": ["chain_id", "contract", "user", "position_type_id", "asset"],
1891
+ "onDelete": "cascade",
1892
+ "onUpdate": "no action"
1893
+ },
1894
+ "transfers_positions_to_fk": {
1895
+ "name": "transfers_positions_to_fk",
1896
+ "tableFrom": "transfers",
1897
+ "tableTo": "positions",
1898
+ "schemaTo": "router_v1.16",
1899
+ "columnsFrom": ["chain_id", "contract", "to", "position_type_id", "asset"],
1900
+ "columnsTo": ["chain_id", "contract", "user", "position_type_id", "asset"],
1901
+ "onDelete": "cascade",
1902
+ "onUpdate": "no action"
1903
+ }
1904
+ },
1905
+ "compositePrimaryKeys": {},
1906
+ "uniqueConstraints": {},
1907
+ "policies": {},
1908
+ "checkConstraints": {},
1909
+ "isRLSEnabled": false
1910
+ },
1911
+ "router_v1.16.trees": {
1912
+ "name": "trees",
1913
+ "schema": "router_v1.16",
1914
+ "columns": {
1915
+ "root": {
1916
+ "name": "root",
1917
+ "type": "varchar(66)",
1918
+ "primaryKey": true,
1919
+ "notNull": true
1920
+ },
1921
+ "root_signature": {
1922
+ "name": "root_signature",
1923
+ "type": "varchar(132)",
1924
+ "primaryKey": false,
1925
+ "notNull": true
1926
+ },
1927
+ "created_at": {
1928
+ "name": "created_at",
1929
+ "type": "timestamp",
1930
+ "primaryKey": false,
1931
+ "notNull": true,
1932
+ "default": "now()"
1933
+ }
1934
+ },
1935
+ "indexes": {},
1936
+ "foreignKeys": {},
1937
+ "compositePrimaryKeys": {},
1938
+ "uniqueConstraints": {},
1939
+ "policies": {},
1940
+ "checkConstraints": {},
1941
+ "isRLSEnabled": false
1942
+ },
1943
+ "router_v1.16.validations": {
1944
+ "name": "validations",
1945
+ "schema": "router_v1.16",
1946
+ "columns": {
1947
+ "offer_hash": {
1948
+ "name": "offer_hash",
1949
+ "type": "varchar(66)",
1950
+ "primaryKey": false,
1951
+ "notNull": true
1952
+ },
1953
+ "obligation_id": {
1954
+ "name": "obligation_id",
1955
+ "type": "varchar(66)",
1956
+ "primaryKey": false,
1957
+ "notNull": true
1958
+ },
1959
+ "status_id": {
1960
+ "name": "status_id",
1961
+ "type": "integer",
1962
+ "primaryKey": false,
1963
+ "notNull": true
1964
+ },
1965
+ "updated_at": {
1966
+ "name": "updated_at",
1967
+ "type": "timestamp",
1968
+ "primaryKey": false,
1969
+ "notNull": true,
1970
+ "default": "now()"
1971
+ }
1972
+ },
1973
+ "indexes": {},
1974
+ "foreignKeys": {
1975
+ "validations_status_id_status_id_fk": {
1976
+ "name": "validations_status_id_status_id_fk",
1977
+ "tableFrom": "validations",
1978
+ "tableTo": "status",
1979
+ "schemaTo": "router_v1.16",
1980
+ "columnsFrom": ["status_id"],
1981
+ "columnsTo": ["id"],
1982
+ "onDelete": "no action",
1983
+ "onUpdate": "no action"
1984
+ },
1985
+ "validations_offer_fk": {
1986
+ "name": "validations_offer_fk",
1987
+ "tableFrom": "validations",
1988
+ "tableTo": "offers",
1989
+ "schemaTo": "router_v1.16",
1990
+ "columnsFrom": ["offer_hash", "obligation_id"],
1991
+ "columnsTo": ["hash", "obligation_id"],
1992
+ "onDelete": "cascade",
1993
+ "onUpdate": "no action"
1994
+ }
1995
+ },
1996
+ "compositePrimaryKeys": {
1997
+ "validations_pk": {
1998
+ "name": "validations_pk",
1999
+ "columns": ["offer_hash", "obligation_id"]
2000
+ }
2001
+ },
2002
+ "uniqueConstraints": {},
2003
+ "policies": {},
2004
+ "checkConstraints": {},
2005
+ "isRLSEnabled": false
2006
+ }
2007
+ },
2008
+ "enums": {
2009
+ "router_v1.16.callback_type": {
2010
+ "name": "callback_type",
2011
+ "schema": "router_v1.16",
2012
+ "values": ["empty"]
2013
+ },
2014
+ "router_v1.16.position_type": {
2015
+ "name": "position_type",
2016
+ "schema": "router_v1.16",
2017
+ "values": ["erc20", "vault_v1", "debtOf", "collateralOf"]
2018
+ },
2019
+ "router_v1.16.status_code": {
2020
+ "name": "status_code",
2021
+ "schema": "router_v1.16",
2022
+ "values": ["VALID", "SIMULATION_ERROR"]
2023
+ }
2024
+ },
2025
+ "schemas": {},
2026
+ "sequences": {},
2027
+ "roles": {},
2028
+ "policies": {},
2029
+ "views": {},
2030
+ "_meta": {
2031
+ "columns": {},
2032
+ "schemas": {},
2033
+ "tables": {}
2034
+ }
2035
+ }