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