@morpho-dev/router 0.5.0 → 0.6.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.
@@ -0,0 +1,1436 @@
1
+ {
2
+ "id": "98985fe1-bae6-4f40-9a50-b7a8661e95b5",
3
+ "prevId": "ed8004f6-064a-4068-bf20-808f4b69ebb8",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "router_v1.6.callbacks": {
8
+ "name": "callbacks",
9
+ "schema": "router_v1.6",
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(42)",
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
+ "amount": {
36
+ "name": "amount",
37
+ "type": "numeric(78, 0)",
38
+ "primaryKey": false,
39
+ "notNull": false
40
+ }
41
+ },
42
+ "indexes": {},
43
+ "foreignKeys": {
44
+ "callbacks_positions_fk": {
45
+ "name": "callbacks_positions_fk",
46
+ "tableFrom": "callbacks",
47
+ "tableTo": "positions",
48
+ "schemaTo": "router_v1.6",
49
+ "columnsFrom": ["position_chain_id", "position_contract", "position_user"],
50
+ "columnsTo": ["chain_id", "contract", "user"],
51
+ "onDelete": "cascade",
52
+ "onUpdate": "no action"
53
+ }
54
+ },
55
+ "compositePrimaryKeys": {},
56
+ "uniqueConstraints": {},
57
+ "policies": {},
58
+ "checkConstraints": {},
59
+ "isRLSEnabled": false
60
+ },
61
+ "router_v1.6.chains": {
62
+ "name": "chains",
63
+ "schema": "router_v1.6",
64
+ "columns": {
65
+ "chain_id": {
66
+ "name": "chain_id",
67
+ "type": "bigint",
68
+ "primaryKey": false,
69
+ "notNull": true
70
+ },
71
+ "block_number": {
72
+ "name": "block_number",
73
+ "type": "bigint",
74
+ "primaryKey": false,
75
+ "notNull": true
76
+ },
77
+ "epoch": {
78
+ "name": "epoch",
79
+ "type": "numeric(78, 0)",
80
+ "primaryKey": false,
81
+ "notNull": true,
82
+ "default": "'0'"
83
+ },
84
+ "updated_at": {
85
+ "name": "updated_at",
86
+ "type": "timestamp",
87
+ "primaryKey": false,
88
+ "notNull": true,
89
+ "default": "now()"
90
+ }
91
+ },
92
+ "indexes": {
93
+ "chains_chain_id_idx": {
94
+ "name": "chains_chain_id_idx",
95
+ "columns": [
96
+ {
97
+ "expression": "chain_id",
98
+ "isExpression": false,
99
+ "asc": true,
100
+ "nulls": "last"
101
+ }
102
+ ],
103
+ "isUnique": true,
104
+ "concurrently": false,
105
+ "method": "btree",
106
+ "with": {}
107
+ }
108
+ },
109
+ "foreignKeys": {},
110
+ "compositePrimaryKeys": {},
111
+ "uniqueConstraints": {},
112
+ "policies": {},
113
+ "checkConstraints": {},
114
+ "isRLSEnabled": false
115
+ },
116
+ "router_v1.6.collectors": {
117
+ "name": "collectors",
118
+ "schema": "router_v1.6",
119
+ "columns": {
120
+ "chain_id": {
121
+ "name": "chain_id",
122
+ "type": "bigint",
123
+ "primaryKey": false,
124
+ "notNull": true
125
+ },
126
+ "name": {
127
+ "name": "name",
128
+ "type": "text",
129
+ "primaryKey": false,
130
+ "notNull": true
131
+ },
132
+ "block_number": {
133
+ "name": "block_number",
134
+ "type": "bigint",
135
+ "primaryKey": false,
136
+ "notNull": true
137
+ },
138
+ "epoch": {
139
+ "name": "epoch",
140
+ "type": "numeric(78, 0)",
141
+ "primaryKey": false,
142
+ "notNull": true,
143
+ "default": "'0'"
144
+ },
145
+ "updated_at": {
146
+ "name": "updated_at",
147
+ "type": "timestamp",
148
+ "primaryKey": false,
149
+ "notNull": true,
150
+ "default": "now()"
151
+ }
152
+ },
153
+ "indexes": {
154
+ "collectors_chain_name_idx": {
155
+ "name": "collectors_chain_name_idx",
156
+ "columns": [
157
+ {
158
+ "expression": "chain_id",
159
+ "isExpression": false,
160
+ "asc": true,
161
+ "nulls": "last"
162
+ },
163
+ {
164
+ "expression": "name",
165
+ "isExpression": false,
166
+ "asc": true,
167
+ "nulls": "last"
168
+ }
169
+ ],
170
+ "isUnique": true,
171
+ "concurrently": false,
172
+ "method": "btree",
173
+ "with": {}
174
+ }
175
+ },
176
+ "foreignKeys": {
177
+ "collectors_chain_id_chains_chain_id_fk": {
178
+ "name": "collectors_chain_id_chains_chain_id_fk",
179
+ "tableFrom": "collectors",
180
+ "tableTo": "chains",
181
+ "schemaTo": "router_v1.6",
182
+ "columnsFrom": ["chain_id"],
183
+ "columnsTo": ["chain_id"],
184
+ "onDelete": "no action",
185
+ "onUpdate": "no action"
186
+ }
187
+ },
188
+ "compositePrimaryKeys": {},
189
+ "uniqueConstraints": {},
190
+ "policies": {},
191
+ "checkConstraints": {},
192
+ "isRLSEnabled": false
193
+ },
194
+ "router_v1.6.consumed_events": {
195
+ "name": "consumed_events",
196
+ "schema": "router_v1.6",
197
+ "columns": {
198
+ "event_id": {
199
+ "name": "event_id",
200
+ "type": "varchar(128)",
201
+ "primaryKey": true,
202
+ "notNull": true
203
+ },
204
+ "chain_id": {
205
+ "name": "chain_id",
206
+ "type": "bigint",
207
+ "primaryKey": false,
208
+ "notNull": true
209
+ },
210
+ "maker": {
211
+ "name": "maker",
212
+ "type": "varchar(42)",
213
+ "primaryKey": false,
214
+ "notNull": true
215
+ },
216
+ "group": {
217
+ "name": "group",
218
+ "type": "varchar(66)",
219
+ "primaryKey": false,
220
+ "notNull": true
221
+ },
222
+ "amount": {
223
+ "name": "amount",
224
+ "type": "numeric(78, 0)",
225
+ "primaryKey": false,
226
+ "notNull": true
227
+ },
228
+ "block_number": {
229
+ "name": "block_number",
230
+ "type": "bigint",
231
+ "primaryKey": false,
232
+ "notNull": true
233
+ },
234
+ "created_at": {
235
+ "name": "created_at",
236
+ "type": "timestamp",
237
+ "primaryKey": false,
238
+ "notNull": true,
239
+ "default": "now()"
240
+ }
241
+ },
242
+ "indexes": {
243
+ "consumed_events_group_idx": {
244
+ "name": "consumed_events_group_idx",
245
+ "columns": [
246
+ {
247
+ "expression": "chain_id",
248
+ "isExpression": false,
249
+ "asc": true,
250
+ "nulls": "last"
251
+ },
252
+ {
253
+ "expression": "maker",
254
+ "isExpression": false,
255
+ "asc": true,
256
+ "nulls": "last"
257
+ },
258
+ {
259
+ "expression": "group",
260
+ "isExpression": false,
261
+ "asc": true,
262
+ "nulls": "last"
263
+ }
264
+ ],
265
+ "isUnique": false,
266
+ "concurrently": false,
267
+ "method": "btree",
268
+ "with": {}
269
+ },
270
+ "consumed_events_block_number_idx": {
271
+ "name": "consumed_events_block_number_idx",
272
+ "columns": [
273
+ {
274
+ "expression": "block_number",
275
+ "isExpression": false,
276
+ "asc": true,
277
+ "nulls": "last"
278
+ }
279
+ ],
280
+ "isUnique": false,
281
+ "concurrently": false,
282
+ "method": "btree",
283
+ "with": {}
284
+ }
285
+ },
286
+ "foreignKeys": {
287
+ "consumed_events_groups_fk": {
288
+ "name": "consumed_events_groups_fk",
289
+ "tableFrom": "consumed_events",
290
+ "tableTo": "groups",
291
+ "schemaTo": "router_v1.6",
292
+ "columnsFrom": ["chain_id", "maker", "group"],
293
+ "columnsTo": ["chain_id", "maker", "group"],
294
+ "onDelete": "cascade",
295
+ "onUpdate": "no action"
296
+ }
297
+ },
298
+ "compositePrimaryKeys": {},
299
+ "uniqueConstraints": {},
300
+ "policies": {},
301
+ "checkConstraints": {},
302
+ "isRLSEnabled": false
303
+ },
304
+ "router_v1.6.groups": {
305
+ "name": "groups",
306
+ "schema": "router_v1.6",
307
+ "columns": {
308
+ "chain_id": {
309
+ "name": "chain_id",
310
+ "type": "bigint",
311
+ "primaryKey": false,
312
+ "notNull": true
313
+ },
314
+ "maker": {
315
+ "name": "maker",
316
+ "type": "varchar(42)",
317
+ "primaryKey": false,
318
+ "notNull": true
319
+ },
320
+ "group": {
321
+ "name": "group",
322
+ "type": "varchar(66)",
323
+ "primaryKey": false,
324
+ "notNull": true
325
+ },
326
+ "consumed": {
327
+ "name": "consumed",
328
+ "type": "numeric(78, 0)",
329
+ "primaryKey": false,
330
+ "notNull": true
331
+ },
332
+ "block_number": {
333
+ "name": "block_number",
334
+ "type": "bigint",
335
+ "primaryKey": false,
336
+ "notNull": true
337
+ },
338
+ "updated_at": {
339
+ "name": "updated_at",
340
+ "type": "timestamp",
341
+ "primaryKey": false,
342
+ "notNull": true,
343
+ "default": "now()"
344
+ }
345
+ },
346
+ "indexes": {
347
+ "groups_chain_id_maker_group_consumed_idx": {
348
+ "name": "groups_chain_id_maker_group_consumed_idx",
349
+ "columns": [
350
+ {
351
+ "expression": "chain_id",
352
+ "isExpression": false,
353
+ "asc": true,
354
+ "nulls": "last"
355
+ },
356
+ {
357
+ "expression": "maker",
358
+ "isExpression": false,
359
+ "asc": true,
360
+ "nulls": "last"
361
+ },
362
+ {
363
+ "expression": "group",
364
+ "isExpression": false,
365
+ "asc": true,
366
+ "nulls": "last"
367
+ },
368
+ {
369
+ "expression": "consumed",
370
+ "isExpression": false,
371
+ "asc": true,
372
+ "nulls": "last"
373
+ }
374
+ ],
375
+ "isUnique": false,
376
+ "concurrently": false,
377
+ "method": "btree",
378
+ "with": {}
379
+ }
380
+ },
381
+ "foreignKeys": {},
382
+ "compositePrimaryKeys": {
383
+ "groups_pk": {
384
+ "name": "groups_pk",
385
+ "columns": ["chain_id", "maker", "group"]
386
+ }
387
+ },
388
+ "uniqueConstraints": {},
389
+ "policies": {},
390
+ "checkConstraints": {},
391
+ "isRLSEnabled": false
392
+ },
393
+ "router_v1.6.lots": {
394
+ "name": "lots",
395
+ "schema": "router_v1.6",
396
+ "columns": {
397
+ "chain_id": {
398
+ "name": "chain_id",
399
+ "type": "bigint",
400
+ "primaryKey": false,
401
+ "notNull": true
402
+ },
403
+ "user": {
404
+ "name": "user",
405
+ "type": "varchar(42)",
406
+ "primaryKey": false,
407
+ "notNull": true
408
+ },
409
+ "contract": {
410
+ "name": "contract",
411
+ "type": "varchar(42)",
412
+ "primaryKey": false,
413
+ "notNull": true
414
+ },
415
+ "group": {
416
+ "name": "group",
417
+ "type": "varchar(66)",
418
+ "primaryKey": false,
419
+ "notNull": true
420
+ },
421
+ "lower": {
422
+ "name": "lower",
423
+ "type": "numeric(78, 0)",
424
+ "primaryKey": false,
425
+ "notNull": true
426
+ },
427
+ "upper": {
428
+ "name": "upper",
429
+ "type": "numeric(78, 0)",
430
+ "primaryKey": false,
431
+ "notNull": true
432
+ }
433
+ },
434
+ "indexes": {},
435
+ "foreignKeys": {
436
+ "lots_positions_fk": {
437
+ "name": "lots_positions_fk",
438
+ "tableFrom": "lots",
439
+ "tableTo": "positions",
440
+ "schemaTo": "router_v1.6",
441
+ "columnsFrom": ["chain_id", "contract", "user"],
442
+ "columnsTo": ["chain_id", "contract", "user"],
443
+ "onDelete": "cascade",
444
+ "onUpdate": "no action"
445
+ },
446
+ "lots_groups_fk": {
447
+ "name": "lots_groups_fk",
448
+ "tableFrom": "lots",
449
+ "tableTo": "groups",
450
+ "schemaTo": "router_v1.6",
451
+ "columnsFrom": ["chain_id", "user", "group"],
452
+ "columnsTo": ["chain_id", "maker", "group"],
453
+ "onDelete": "cascade",
454
+ "onUpdate": "no action"
455
+ }
456
+ },
457
+ "compositePrimaryKeys": {
458
+ "lots_pk": {
459
+ "name": "lots_pk",
460
+ "columns": ["chain_id", "user", "contract", "group"]
461
+ }
462
+ },
463
+ "uniqueConstraints": {},
464
+ "policies": {},
465
+ "checkConstraints": {},
466
+ "isRLSEnabled": false
467
+ },
468
+ "router_v1.6.merkle_paths": {
469
+ "name": "merkle_paths",
470
+ "schema": "router_v1.6",
471
+ "columns": {
472
+ "offer_hash": {
473
+ "name": "offer_hash",
474
+ "type": "varchar(66)",
475
+ "primaryKey": true,
476
+ "notNull": true
477
+ },
478
+ "tree_root": {
479
+ "name": "tree_root",
480
+ "type": "varchar(66)",
481
+ "primaryKey": false,
482
+ "notNull": true
483
+ },
484
+ "proof_nodes": {
485
+ "name": "proof_nodes",
486
+ "type": "text",
487
+ "primaryKey": false,
488
+ "notNull": true
489
+ },
490
+ "created_at": {
491
+ "name": "created_at",
492
+ "type": "timestamp",
493
+ "primaryKey": false,
494
+ "notNull": true,
495
+ "default": "now()"
496
+ }
497
+ },
498
+ "indexes": {
499
+ "merkle_paths_tree_root_idx": {
500
+ "name": "merkle_paths_tree_root_idx",
501
+ "columns": [
502
+ {
503
+ "expression": "tree_root",
504
+ "isExpression": false,
505
+ "asc": true,
506
+ "nulls": "last"
507
+ }
508
+ ],
509
+ "isUnique": false,
510
+ "concurrently": false,
511
+ "method": "btree",
512
+ "with": {}
513
+ }
514
+ },
515
+ "foreignKeys": {
516
+ "merkle_paths_offer_hash_offers_hash_fk": {
517
+ "name": "merkle_paths_offer_hash_offers_hash_fk",
518
+ "tableFrom": "merkle_paths",
519
+ "tableTo": "offers",
520
+ "schemaTo": "router_v1.6",
521
+ "columnsFrom": ["offer_hash"],
522
+ "columnsTo": ["hash"],
523
+ "onDelete": "cascade",
524
+ "onUpdate": "no action"
525
+ },
526
+ "merkle_paths_tree_root_trees_root_fk": {
527
+ "name": "merkle_paths_tree_root_trees_root_fk",
528
+ "tableFrom": "merkle_paths",
529
+ "tableTo": "trees",
530
+ "schemaTo": "router_v1.6",
531
+ "columnsFrom": ["tree_root"],
532
+ "columnsTo": ["root"],
533
+ "onDelete": "cascade",
534
+ "onUpdate": "no action"
535
+ }
536
+ },
537
+ "compositePrimaryKeys": {},
538
+ "uniqueConstraints": {},
539
+ "policies": {},
540
+ "checkConstraints": {},
541
+ "isRLSEnabled": false
542
+ },
543
+ "router_v1.6.obligation_collaterals_v2": {
544
+ "name": "obligation_collaterals_v2",
545
+ "schema": "router_v1.6",
546
+ "columns": {
547
+ "obligation_id": {
548
+ "name": "obligation_id",
549
+ "type": "varchar(66)",
550
+ "primaryKey": false,
551
+ "notNull": true
552
+ },
553
+ "asset": {
554
+ "name": "asset",
555
+ "type": "varchar(42)",
556
+ "primaryKey": false,
557
+ "notNull": true
558
+ },
559
+ "oracle_chain_id": {
560
+ "name": "oracle_chain_id",
561
+ "type": "bigint",
562
+ "primaryKey": false,
563
+ "notNull": true
564
+ },
565
+ "oracle_address": {
566
+ "name": "oracle_address",
567
+ "type": "varchar(42)",
568
+ "primaryKey": false,
569
+ "notNull": true
570
+ },
571
+ "lltv": {
572
+ "name": "lltv",
573
+ "type": "bigint",
574
+ "primaryKey": false,
575
+ "notNull": true
576
+ },
577
+ "updated_at": {
578
+ "name": "updated_at",
579
+ "type": "timestamp",
580
+ "primaryKey": false,
581
+ "notNull": true,
582
+ "default": "now()"
583
+ }
584
+ },
585
+ "indexes": {
586
+ "obligation_collaterals_v2_obligation_id_idx": {
587
+ "name": "obligation_collaterals_v2_obligation_id_idx",
588
+ "columns": [
589
+ {
590
+ "expression": "obligation_id",
591
+ "isExpression": false,
592
+ "asc": true,
593
+ "nulls": "last"
594
+ }
595
+ ],
596
+ "isUnique": false,
597
+ "concurrently": false,
598
+ "method": "btree",
599
+ "with": {}
600
+ },
601
+ "obligation_collaterals_v2_oracle_fk_idx": {
602
+ "name": "obligation_collaterals_v2_oracle_fk_idx",
603
+ "columns": [
604
+ {
605
+ "expression": "oracle_chain_id",
606
+ "isExpression": false,
607
+ "asc": true,
608
+ "nulls": "last"
609
+ },
610
+ {
611
+ "expression": "oracle_address",
612
+ "isExpression": false,
613
+ "asc": true,
614
+ "nulls": "last"
615
+ }
616
+ ],
617
+ "isUnique": false,
618
+ "concurrently": false,
619
+ "method": "btree",
620
+ "with": {}
621
+ }
622
+ },
623
+ "foreignKeys": {
624
+ "obligation_collaterals_v2_obligation_id_obligations_obligation_id_fk": {
625
+ "name": "obligation_collaterals_v2_obligation_id_obligations_obligation_id_fk",
626
+ "tableFrom": "obligation_collaterals_v2",
627
+ "tableTo": "obligations",
628
+ "schemaTo": "router_v1.6",
629
+ "columnsFrom": ["obligation_id"],
630
+ "columnsTo": ["obligation_id"],
631
+ "onDelete": "cascade",
632
+ "onUpdate": "no action"
633
+ },
634
+ "obligation_collaterals_v2_oracles_fk": {
635
+ "name": "obligation_collaterals_v2_oracles_fk",
636
+ "tableFrom": "obligation_collaterals_v2",
637
+ "tableTo": "oracles",
638
+ "schemaTo": "router_v1.6",
639
+ "columnsFrom": ["oracle_chain_id", "oracle_address"],
640
+ "columnsTo": ["chain_id", "address"],
641
+ "onDelete": "no action",
642
+ "onUpdate": "no action"
643
+ }
644
+ },
645
+ "compositePrimaryKeys": {
646
+ "obligation_collaterals_v2_pk": {
647
+ "name": "obligation_collaterals_v2_pk",
648
+ "columns": ["obligation_id", "asset"]
649
+ }
650
+ },
651
+ "uniqueConstraints": {},
652
+ "policies": {},
653
+ "checkConstraints": {},
654
+ "isRLSEnabled": false
655
+ },
656
+ "router_v1.6.obligations": {
657
+ "name": "obligations",
658
+ "schema": "router_v1.6",
659
+ "columns": {
660
+ "obligation_id": {
661
+ "name": "obligation_id",
662
+ "type": "varchar(66)",
663
+ "primaryKey": true,
664
+ "notNull": true
665
+ },
666
+ "chain_id": {
667
+ "name": "chain_id",
668
+ "type": "bigint",
669
+ "primaryKey": false,
670
+ "notNull": true
671
+ },
672
+ "loan_token": {
673
+ "name": "loan_token",
674
+ "type": "varchar(42)",
675
+ "primaryKey": false,
676
+ "notNull": true
677
+ },
678
+ "maturity": {
679
+ "name": "maturity",
680
+ "type": "integer",
681
+ "primaryKey": false,
682
+ "notNull": true
683
+ }
684
+ },
685
+ "indexes": {},
686
+ "foreignKeys": {},
687
+ "compositePrimaryKeys": {},
688
+ "uniqueConstraints": {},
689
+ "policies": {},
690
+ "checkConstraints": {},
691
+ "isRLSEnabled": false
692
+ },
693
+ "router_v1.6.offers": {
694
+ "name": "offers",
695
+ "schema": "router_v1.6",
696
+ "columns": {
697
+ "hash": {
698
+ "name": "hash",
699
+ "type": "varchar(66)",
700
+ "primaryKey": true,
701
+ "notNull": true
702
+ },
703
+ "obligation_id": {
704
+ "name": "obligation_id",
705
+ "type": "varchar(66)",
706
+ "primaryKey": false,
707
+ "notNull": true
708
+ },
709
+ "assets": {
710
+ "name": "assets",
711
+ "type": "numeric(78, 0)",
712
+ "primaryKey": false,
713
+ "notNull": true
714
+ },
715
+ "obligation_units": {
716
+ "name": "obligation_units",
717
+ "type": "numeric(78, 0)",
718
+ "primaryKey": false,
719
+ "notNull": true,
720
+ "default": "'0'"
721
+ },
722
+ "obligation_shares": {
723
+ "name": "obligation_shares",
724
+ "type": "numeric(78, 0)",
725
+ "primaryKey": false,
726
+ "notNull": true,
727
+ "default": "'0'"
728
+ },
729
+ "price": {
730
+ "name": "price",
731
+ "type": "numeric(78, 0)",
732
+ "primaryKey": false,
733
+ "notNull": true
734
+ },
735
+ "maturity": {
736
+ "name": "maturity",
737
+ "type": "integer",
738
+ "primaryKey": false,
739
+ "notNull": true
740
+ },
741
+ "expiry": {
742
+ "name": "expiry",
743
+ "type": "integer",
744
+ "primaryKey": false,
745
+ "notNull": true
746
+ },
747
+ "start": {
748
+ "name": "start",
749
+ "type": "integer",
750
+ "primaryKey": false,
751
+ "notNull": true
752
+ },
753
+ "group_chain_id": {
754
+ "name": "group_chain_id",
755
+ "type": "bigint",
756
+ "primaryKey": false,
757
+ "notNull": true
758
+ },
759
+ "group_maker": {
760
+ "name": "group_maker",
761
+ "type": "varchar(42)",
762
+ "primaryKey": false,
763
+ "notNull": true
764
+ },
765
+ "group_group": {
766
+ "name": "group_group",
767
+ "type": "varchar(66)",
768
+ "primaryKey": false,
769
+ "notNull": true
770
+ },
771
+ "session": {
772
+ "name": "session",
773
+ "type": "varchar(66)",
774
+ "primaryKey": false,
775
+ "notNull": true
776
+ },
777
+ "buy": {
778
+ "name": "buy",
779
+ "type": "boolean",
780
+ "primaryKey": false,
781
+ "notNull": true
782
+ },
783
+ "callback_address": {
784
+ "name": "callback_address",
785
+ "type": "varchar(42)",
786
+ "primaryKey": false,
787
+ "notNull": true
788
+ },
789
+ "callback_data": {
790
+ "name": "callback_data",
791
+ "type": "text",
792
+ "primaryKey": false,
793
+ "notNull": true
794
+ },
795
+ "block_number": {
796
+ "name": "block_number",
797
+ "type": "bigint",
798
+ "primaryKey": false,
799
+ "notNull": true
800
+ },
801
+ "updated_at": {
802
+ "name": "updated_at",
803
+ "type": "timestamp",
804
+ "primaryKey": false,
805
+ "notNull": true,
806
+ "default": "now()"
807
+ }
808
+ },
809
+ "indexes": {
810
+ "offers_group_fk_idx": {
811
+ "name": "offers_group_fk_idx",
812
+ "columns": [
813
+ {
814
+ "expression": "group_chain_id",
815
+ "isExpression": false,
816
+ "asc": true,
817
+ "nulls": "last"
818
+ },
819
+ {
820
+ "expression": "group_maker",
821
+ "isExpression": false,
822
+ "asc": true,
823
+ "nulls": "last"
824
+ },
825
+ {
826
+ "expression": "group_group",
827
+ "isExpression": false,
828
+ "asc": true,
829
+ "nulls": "last"
830
+ }
831
+ ],
832
+ "isUnique": false,
833
+ "concurrently": false,
834
+ "method": "btree",
835
+ "with": {}
836
+ },
837
+ "offers_group_and_hash_idx": {
838
+ "name": "offers_group_and_hash_idx",
839
+ "columns": [
840
+ {
841
+ "expression": "group_chain_id",
842
+ "isExpression": false,
843
+ "asc": true,
844
+ "nulls": "last"
845
+ },
846
+ {
847
+ "expression": "group_maker",
848
+ "isExpression": false,
849
+ "asc": true,
850
+ "nulls": "last"
851
+ },
852
+ {
853
+ "expression": "group_group",
854
+ "isExpression": false,
855
+ "asc": true,
856
+ "nulls": "last"
857
+ },
858
+ {
859
+ "expression": "hash",
860
+ "isExpression": false,
861
+ "asc": true,
862
+ "nulls": "last"
863
+ }
864
+ ],
865
+ "isUnique": false,
866
+ "concurrently": false,
867
+ "method": "btree",
868
+ "with": {}
869
+ },
870
+ "offers_obligation_id_side_idx": {
871
+ "name": "offers_obligation_id_side_idx",
872
+ "columns": [
873
+ {
874
+ "expression": "obligation_id",
875
+ "isExpression": false,
876
+ "asc": true,
877
+ "nulls": "last"
878
+ },
879
+ {
880
+ "expression": "buy",
881
+ "isExpression": false,
882
+ "asc": true,
883
+ "nulls": "last"
884
+ }
885
+ ],
886
+ "isUnique": false,
887
+ "concurrently": false,
888
+ "method": "btree",
889
+ "with": {}
890
+ }
891
+ },
892
+ "foreignKeys": {
893
+ "offers_obligation_id_obligations_obligation_id_fk": {
894
+ "name": "offers_obligation_id_obligations_obligation_id_fk",
895
+ "tableFrom": "offers",
896
+ "tableTo": "obligations",
897
+ "schemaTo": "router_v1.6",
898
+ "columnsFrom": ["obligation_id"],
899
+ "columnsTo": ["obligation_id"],
900
+ "onDelete": "cascade",
901
+ "onUpdate": "no action"
902
+ },
903
+ "offers_groups_fk": {
904
+ "name": "offers_groups_fk",
905
+ "tableFrom": "offers",
906
+ "tableTo": "groups",
907
+ "schemaTo": "router_v1.6",
908
+ "columnsFrom": ["group_chain_id", "group_maker", "group_group"],
909
+ "columnsTo": ["chain_id", "maker", "group"],
910
+ "onDelete": "cascade",
911
+ "onUpdate": "no action"
912
+ }
913
+ },
914
+ "compositePrimaryKeys": {},
915
+ "uniqueConstraints": {},
916
+ "policies": {},
917
+ "checkConstraints": {},
918
+ "isRLSEnabled": false
919
+ },
920
+ "router_v1.6.offers_callbacks": {
921
+ "name": "offers_callbacks",
922
+ "schema": "router_v1.6",
923
+ "columns": {
924
+ "offer_hash": {
925
+ "name": "offer_hash",
926
+ "type": "varchar(66)",
927
+ "primaryKey": false,
928
+ "notNull": true
929
+ },
930
+ "callback_id": {
931
+ "name": "callback_id",
932
+ "type": "varchar(66)",
933
+ "primaryKey": false,
934
+ "notNull": false
935
+ }
936
+ },
937
+ "indexes": {},
938
+ "foreignKeys": {
939
+ "offers_callbacks_offer_hash_offers_hash_fk": {
940
+ "name": "offers_callbacks_offer_hash_offers_hash_fk",
941
+ "tableFrom": "offers_callbacks",
942
+ "tableTo": "offers",
943
+ "schemaTo": "router_v1.6",
944
+ "columnsFrom": ["offer_hash"],
945
+ "columnsTo": ["hash"],
946
+ "onDelete": "cascade",
947
+ "onUpdate": "no action"
948
+ }
949
+ },
950
+ "compositePrimaryKeys": {
951
+ "offers_callbacks_pk": {
952
+ "name": "offers_callbacks_pk",
953
+ "columns": ["offer_hash", "callback_id"]
954
+ }
955
+ },
956
+ "uniqueConstraints": {},
957
+ "policies": {},
958
+ "checkConstraints": {},
959
+ "isRLSEnabled": false
960
+ },
961
+ "router_v1.6.offsets": {
962
+ "name": "offsets",
963
+ "schema": "router_v1.6",
964
+ "columns": {
965
+ "chain_id": {
966
+ "name": "chain_id",
967
+ "type": "bigint",
968
+ "primaryKey": false,
969
+ "notNull": true
970
+ },
971
+ "user": {
972
+ "name": "user",
973
+ "type": "varchar(42)",
974
+ "primaryKey": false,
975
+ "notNull": true
976
+ },
977
+ "contract": {
978
+ "name": "contract",
979
+ "type": "varchar(42)",
980
+ "primaryKey": false,
981
+ "notNull": true
982
+ },
983
+ "group": {
984
+ "name": "group",
985
+ "type": "varchar(66)",
986
+ "primaryKey": false,
987
+ "notNull": true
988
+ },
989
+ "value": {
990
+ "name": "value",
991
+ "type": "numeric(78, 0)",
992
+ "primaryKey": false,
993
+ "notNull": true
994
+ }
995
+ },
996
+ "indexes": {},
997
+ "foreignKeys": {
998
+ "offsets_positions_fk": {
999
+ "name": "offsets_positions_fk",
1000
+ "tableFrom": "offsets",
1001
+ "tableTo": "positions",
1002
+ "schemaTo": "router_v1.6",
1003
+ "columnsFrom": ["chain_id", "contract", "user"],
1004
+ "columnsTo": ["chain_id", "contract", "user"],
1005
+ "onDelete": "cascade",
1006
+ "onUpdate": "no action"
1007
+ }
1008
+ },
1009
+ "compositePrimaryKeys": {
1010
+ "offsets_pk": {
1011
+ "name": "offsets_pk",
1012
+ "columns": ["chain_id", "user", "contract", "group"]
1013
+ }
1014
+ },
1015
+ "uniqueConstraints": {},
1016
+ "policies": {},
1017
+ "checkConstraints": {},
1018
+ "isRLSEnabled": false
1019
+ },
1020
+ "router_v1.6.oracles": {
1021
+ "name": "oracles",
1022
+ "schema": "router_v1.6",
1023
+ "columns": {
1024
+ "chain_id": {
1025
+ "name": "chain_id",
1026
+ "type": "bigint",
1027
+ "primaryKey": false,
1028
+ "notNull": true
1029
+ },
1030
+ "address": {
1031
+ "name": "address",
1032
+ "type": "varchar(42)",
1033
+ "primaryKey": false,
1034
+ "notNull": true
1035
+ },
1036
+ "price": {
1037
+ "name": "price",
1038
+ "type": "numeric(78, 0)",
1039
+ "primaryKey": false,
1040
+ "notNull": false
1041
+ },
1042
+ "block_number": {
1043
+ "name": "block_number",
1044
+ "type": "bigint",
1045
+ "primaryKey": false,
1046
+ "notNull": true
1047
+ },
1048
+ "updated_at": {
1049
+ "name": "updated_at",
1050
+ "type": "timestamp",
1051
+ "primaryKey": false,
1052
+ "notNull": true,
1053
+ "default": "now()"
1054
+ }
1055
+ },
1056
+ "indexes": {},
1057
+ "foreignKeys": {},
1058
+ "compositePrimaryKeys": {
1059
+ "oracles_pk": {
1060
+ "name": "oracles_pk",
1061
+ "columns": ["chain_id", "address"]
1062
+ }
1063
+ },
1064
+ "uniqueConstraints": {},
1065
+ "policies": {},
1066
+ "checkConstraints": {},
1067
+ "isRLSEnabled": false
1068
+ },
1069
+ "router_v1.6.position_types": {
1070
+ "name": "position_types",
1071
+ "schema": "router_v1.6",
1072
+ "columns": {
1073
+ "id": {
1074
+ "name": "id",
1075
+ "type": "serial",
1076
+ "primaryKey": true,
1077
+ "notNull": true
1078
+ },
1079
+ "type": {
1080
+ "name": "type",
1081
+ "type": "position_type",
1082
+ "typeSchema": "router_v1.6",
1083
+ "primaryKey": false,
1084
+ "notNull": true
1085
+ }
1086
+ },
1087
+ "indexes": {},
1088
+ "foreignKeys": {},
1089
+ "compositePrimaryKeys": {},
1090
+ "uniqueConstraints": {},
1091
+ "policies": {},
1092
+ "checkConstraints": {},
1093
+ "isRLSEnabled": false
1094
+ },
1095
+ "router_v1.6.positions": {
1096
+ "name": "positions",
1097
+ "schema": "router_v1.6",
1098
+ "columns": {
1099
+ "chain_id": {
1100
+ "name": "chain_id",
1101
+ "type": "bigint",
1102
+ "primaryKey": false,
1103
+ "notNull": true
1104
+ },
1105
+ "contract": {
1106
+ "name": "contract",
1107
+ "type": "varchar(42)",
1108
+ "primaryKey": false,
1109
+ "notNull": true
1110
+ },
1111
+ "user": {
1112
+ "name": "user",
1113
+ "type": "varchar(42)",
1114
+ "primaryKey": false,
1115
+ "notNull": true
1116
+ },
1117
+ "position_type_id": {
1118
+ "name": "position_type_id",
1119
+ "type": "integer",
1120
+ "primaryKey": false,
1121
+ "notNull": true
1122
+ },
1123
+ "balance": {
1124
+ "name": "balance",
1125
+ "type": "numeric(78, 0)",
1126
+ "primaryKey": false,
1127
+ "notNull": false
1128
+ },
1129
+ "asset": {
1130
+ "name": "asset",
1131
+ "type": "varchar(42)",
1132
+ "primaryKey": false,
1133
+ "notNull": false
1134
+ },
1135
+ "block_number": {
1136
+ "name": "block_number",
1137
+ "type": "bigint",
1138
+ "primaryKey": false,
1139
+ "notNull": true
1140
+ },
1141
+ "updated_at": {
1142
+ "name": "updated_at",
1143
+ "type": "timestamp",
1144
+ "primaryKey": false,
1145
+ "notNull": true,
1146
+ "default": "now()"
1147
+ }
1148
+ },
1149
+ "indexes": {},
1150
+ "foreignKeys": {
1151
+ "positions_position_type_id_position_types_id_fk": {
1152
+ "name": "positions_position_type_id_position_types_id_fk",
1153
+ "tableFrom": "positions",
1154
+ "tableTo": "position_types",
1155
+ "schemaTo": "router_v1.6",
1156
+ "columnsFrom": ["position_type_id"],
1157
+ "columnsTo": ["id"],
1158
+ "onDelete": "no action",
1159
+ "onUpdate": "no action"
1160
+ }
1161
+ },
1162
+ "compositePrimaryKeys": {
1163
+ "positions_pk": {
1164
+ "name": "positions_pk",
1165
+ "columns": ["chain_id", "contract", "user"]
1166
+ }
1167
+ },
1168
+ "uniqueConstraints": {},
1169
+ "policies": {},
1170
+ "checkConstraints": {},
1171
+ "isRLSEnabled": false
1172
+ },
1173
+ "router_v1.6.status": {
1174
+ "name": "status",
1175
+ "schema": "router_v1.6",
1176
+ "columns": {
1177
+ "id": {
1178
+ "name": "id",
1179
+ "type": "serial",
1180
+ "primaryKey": true,
1181
+ "notNull": true
1182
+ },
1183
+ "code": {
1184
+ "name": "code",
1185
+ "type": "status_code",
1186
+ "typeSchema": "router_v1.6",
1187
+ "primaryKey": false,
1188
+ "notNull": false
1189
+ }
1190
+ },
1191
+ "indexes": {},
1192
+ "foreignKeys": {},
1193
+ "compositePrimaryKeys": {},
1194
+ "uniqueConstraints": {
1195
+ "status_code_unique": {
1196
+ "name": "status_code_unique",
1197
+ "nullsNotDistinct": false,
1198
+ "columns": ["code"]
1199
+ }
1200
+ },
1201
+ "policies": {},
1202
+ "checkConstraints": {},
1203
+ "isRLSEnabled": false
1204
+ },
1205
+ "router_v1.6.transfers": {
1206
+ "name": "transfers",
1207
+ "schema": "router_v1.6",
1208
+ "columns": {
1209
+ "event_id": {
1210
+ "name": "event_id",
1211
+ "type": "varchar(128)",
1212
+ "primaryKey": true,
1213
+ "notNull": true
1214
+ },
1215
+ "chain_id": {
1216
+ "name": "chain_id",
1217
+ "type": "bigint",
1218
+ "primaryKey": false,
1219
+ "notNull": true
1220
+ },
1221
+ "contract": {
1222
+ "name": "contract",
1223
+ "type": "varchar(42)",
1224
+ "primaryKey": false,
1225
+ "notNull": true
1226
+ },
1227
+ "from": {
1228
+ "name": "from",
1229
+ "type": "varchar(42)",
1230
+ "primaryKey": false,
1231
+ "notNull": true
1232
+ },
1233
+ "to": {
1234
+ "name": "to",
1235
+ "type": "varchar(42)",
1236
+ "primaryKey": false,
1237
+ "notNull": true
1238
+ },
1239
+ "value": {
1240
+ "name": "value",
1241
+ "type": "numeric(78, 0)",
1242
+ "primaryKey": false,
1243
+ "notNull": true
1244
+ },
1245
+ "block_number": {
1246
+ "name": "block_number",
1247
+ "type": "bigint",
1248
+ "primaryKey": false,
1249
+ "notNull": true
1250
+ },
1251
+ "created_at": {
1252
+ "name": "created_at",
1253
+ "type": "timestamp",
1254
+ "primaryKey": false,
1255
+ "notNull": true,
1256
+ "default": "now()"
1257
+ }
1258
+ },
1259
+ "indexes": {
1260
+ "transfers_chain_contract_user_idx": {
1261
+ "name": "transfers_chain_contract_user_idx",
1262
+ "columns": [
1263
+ {
1264
+ "expression": "chain_id",
1265
+ "isExpression": false,
1266
+ "asc": true,
1267
+ "nulls": "last"
1268
+ },
1269
+ {
1270
+ "expression": "contract",
1271
+ "isExpression": false,
1272
+ "asc": true,
1273
+ "nulls": "last"
1274
+ },
1275
+ {
1276
+ "expression": "from",
1277
+ "isExpression": false,
1278
+ "asc": true,
1279
+ "nulls": "last"
1280
+ },
1281
+ {
1282
+ "expression": "to",
1283
+ "isExpression": false,
1284
+ "asc": true,
1285
+ "nulls": "last"
1286
+ },
1287
+ {
1288
+ "expression": "block_number",
1289
+ "isExpression": false,
1290
+ "asc": true,
1291
+ "nulls": "last"
1292
+ }
1293
+ ],
1294
+ "isUnique": false,
1295
+ "concurrently": false,
1296
+ "method": "btree",
1297
+ "with": {}
1298
+ }
1299
+ },
1300
+ "foreignKeys": {
1301
+ "transfers_positions_from_fk": {
1302
+ "name": "transfers_positions_from_fk",
1303
+ "tableFrom": "transfers",
1304
+ "tableTo": "positions",
1305
+ "schemaTo": "router_v1.6",
1306
+ "columnsFrom": ["chain_id", "contract", "from"],
1307
+ "columnsTo": ["chain_id", "contract", "user"],
1308
+ "onDelete": "cascade",
1309
+ "onUpdate": "no action"
1310
+ },
1311
+ "transfers_positions_to_fk": {
1312
+ "name": "transfers_positions_to_fk",
1313
+ "tableFrom": "transfers",
1314
+ "tableTo": "positions",
1315
+ "schemaTo": "router_v1.6",
1316
+ "columnsFrom": ["chain_id", "contract", "to"],
1317
+ "columnsTo": ["chain_id", "contract", "user"],
1318
+ "onDelete": "cascade",
1319
+ "onUpdate": "no action"
1320
+ }
1321
+ },
1322
+ "compositePrimaryKeys": {},
1323
+ "uniqueConstraints": {},
1324
+ "policies": {},
1325
+ "checkConstraints": {},
1326
+ "isRLSEnabled": false
1327
+ },
1328
+ "router_v1.6.trees": {
1329
+ "name": "trees",
1330
+ "schema": "router_v1.6",
1331
+ "columns": {
1332
+ "root": {
1333
+ "name": "root",
1334
+ "type": "varchar(66)",
1335
+ "primaryKey": true,
1336
+ "notNull": true
1337
+ },
1338
+ "root_signature": {
1339
+ "name": "root_signature",
1340
+ "type": "varchar(132)",
1341
+ "primaryKey": false,
1342
+ "notNull": true
1343
+ },
1344
+ "created_at": {
1345
+ "name": "created_at",
1346
+ "type": "timestamp",
1347
+ "primaryKey": false,
1348
+ "notNull": true,
1349
+ "default": "now()"
1350
+ }
1351
+ },
1352
+ "indexes": {},
1353
+ "foreignKeys": {},
1354
+ "compositePrimaryKeys": {},
1355
+ "uniqueConstraints": {},
1356
+ "policies": {},
1357
+ "checkConstraints": {},
1358
+ "isRLSEnabled": false
1359
+ },
1360
+ "router_v1.6.validations": {
1361
+ "name": "validations",
1362
+ "schema": "router_v1.6",
1363
+ "columns": {
1364
+ "offer_hash": {
1365
+ "name": "offer_hash",
1366
+ "type": "varchar(66)",
1367
+ "primaryKey": true,
1368
+ "notNull": true
1369
+ },
1370
+ "status_id": {
1371
+ "name": "status_id",
1372
+ "type": "integer",
1373
+ "primaryKey": false,
1374
+ "notNull": true
1375
+ },
1376
+ "updated_at": {
1377
+ "name": "updated_at",
1378
+ "type": "timestamp",
1379
+ "primaryKey": false,
1380
+ "notNull": true,
1381
+ "default": "now()"
1382
+ }
1383
+ },
1384
+ "indexes": {},
1385
+ "foreignKeys": {
1386
+ "validations_offer_hash_offers_hash_fk": {
1387
+ "name": "validations_offer_hash_offers_hash_fk",
1388
+ "tableFrom": "validations",
1389
+ "tableTo": "offers",
1390
+ "schemaTo": "router_v1.6",
1391
+ "columnsFrom": ["offer_hash"],
1392
+ "columnsTo": ["hash"],
1393
+ "onDelete": "cascade",
1394
+ "onUpdate": "no action"
1395
+ },
1396
+ "validations_status_id_status_id_fk": {
1397
+ "name": "validations_status_id_status_id_fk",
1398
+ "tableFrom": "validations",
1399
+ "tableTo": "status",
1400
+ "schemaTo": "router_v1.6",
1401
+ "columnsFrom": ["status_id"],
1402
+ "columnsTo": ["id"],
1403
+ "onDelete": "no action",
1404
+ "onUpdate": "no action"
1405
+ }
1406
+ },
1407
+ "compositePrimaryKeys": {},
1408
+ "uniqueConstraints": {},
1409
+ "policies": {},
1410
+ "checkConstraints": {},
1411
+ "isRLSEnabled": false
1412
+ }
1413
+ },
1414
+ "enums": {
1415
+ "router_v1.6.position_type": {
1416
+ "name": "position_type",
1417
+ "schema": "router_v1.6",
1418
+ "values": ["erc20", "vault_v1"]
1419
+ },
1420
+ "router_v1.6.status_code": {
1421
+ "name": "status_code",
1422
+ "schema": "router_v1.6",
1423
+ "values": ["VALID", "SIMULATION_ERROR"]
1424
+ }
1425
+ },
1426
+ "schemas": {},
1427
+ "sequences": {},
1428
+ "roles": {},
1429
+ "policies": {},
1430
+ "views": {},
1431
+ "_meta": {
1432
+ "columns": {},
1433
+ "schemas": {},
1434
+ "tables": {}
1435
+ }
1436
+ }