@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,1632 @@
1
+ {
2
+ "id": "62cf8e33-a383-471f-a75f-3344cb566e84",
3
+ "prevId": "4ada708e-eb8c-4926-baa7-94e52cc05836",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "router_v1.10.callbacks": {
8
+ "name": "callbacks",
9
+ "schema": "router_v1.10",
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.10",
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.10",
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.10.chains": {
83
+ "name": "chains",
84
+ "schema": "router_v1.10",
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.10.collectors": {
138
+ "name": "collectors",
139
+ "schema": "router_v1.10",
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.10",
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.10.consumed_events": {
216
+ "name": "consumed_events",
217
+ "schema": "router_v1.10",
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.10",
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.10.groups": {
326
+ "name": "groups",
327
+ "schema": "router_v1.10",
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.10.lots": {
415
+ "name": "lots",
416
+ "schema": "router_v1.10",
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.10",
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.10",
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.10.lots_positions": {
496
+ "name": "lots_positions",
497
+ "schema": "router_v1.10",
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.10",
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.10",
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.10.merkle_paths": {
559
+ "name": "merkle_paths",
560
+ "schema": "router_v1.10",
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.10",
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.10",
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.10.obligation_collaterals_v2": {
634
+ "name": "obligation_collaterals_v2",
635
+ "schema": "router_v1.10",
636
+ "columns": {
637
+ "obligation_key": {
638
+ "name": "obligation_key",
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_address": {
650
+ "name": "oracle_address",
651
+ "type": "varchar(42)",
652
+ "primaryKey": false,
653
+ "notNull": true
654
+ },
655
+ "lltv": {
656
+ "name": "lltv",
657
+ "type": "bigint",
658
+ "primaryKey": false,
659
+ "notNull": true
660
+ },
661
+ "updated_at": {
662
+ "name": "updated_at",
663
+ "type": "timestamp",
664
+ "primaryKey": false,
665
+ "notNull": true,
666
+ "default": "now()"
667
+ }
668
+ },
669
+ "indexes": {
670
+ "obligation_collaterals_v2_obligation_key_idx": {
671
+ "name": "obligation_collaterals_v2_obligation_key_idx",
672
+ "columns": [
673
+ {
674
+ "expression": "obligation_key",
675
+ "isExpression": false,
676
+ "asc": true,
677
+ "nulls": "last"
678
+ }
679
+ ],
680
+ "isUnique": false,
681
+ "concurrently": false,
682
+ "method": "btree",
683
+ "with": {}
684
+ },
685
+ "obligation_collaterals_v2_oracle_address_idx": {
686
+ "name": "obligation_collaterals_v2_oracle_address_idx",
687
+ "columns": [
688
+ {
689
+ "expression": "oracle_address",
690
+ "isExpression": false,
691
+ "asc": true,
692
+ "nulls": "last"
693
+ }
694
+ ],
695
+ "isUnique": false,
696
+ "concurrently": false,
697
+ "method": "btree",
698
+ "with": {}
699
+ }
700
+ },
701
+ "foreignKeys": {
702
+ "obligation_collaterals_v2_obligation_key_obligations_obligation_key_fk": {
703
+ "name": "obligation_collaterals_v2_obligation_key_obligations_obligation_key_fk",
704
+ "tableFrom": "obligation_collaterals_v2",
705
+ "tableTo": "obligations",
706
+ "schemaTo": "router_v1.10",
707
+ "columnsFrom": ["obligation_key"],
708
+ "columnsTo": ["obligation_key"],
709
+ "onDelete": "cascade",
710
+ "onUpdate": "no action"
711
+ }
712
+ },
713
+ "compositePrimaryKeys": {
714
+ "obligation_collaterals_v2_pk": {
715
+ "name": "obligation_collaterals_v2_pk",
716
+ "columns": ["obligation_key", "asset"]
717
+ }
718
+ },
719
+ "uniqueConstraints": {},
720
+ "policies": {},
721
+ "checkConstraints": {},
722
+ "isRLSEnabled": false
723
+ },
724
+ "router_v1.10.obligation_id_keys": {
725
+ "name": "obligation_id_keys",
726
+ "schema": "router_v1.10",
727
+ "columns": {
728
+ "obligation_id": {
729
+ "name": "obligation_id",
730
+ "type": "varchar(66)",
731
+ "primaryKey": true,
732
+ "notNull": true
733
+ },
734
+ "obligation_key": {
735
+ "name": "obligation_key",
736
+ "type": "varchar(66)",
737
+ "primaryKey": false,
738
+ "notNull": true
739
+ },
740
+ "chain_id": {
741
+ "name": "chain_id",
742
+ "type": "bigint",
743
+ "primaryKey": false,
744
+ "notNull": true
745
+ },
746
+ "morpho_v2": {
747
+ "name": "morpho_v2",
748
+ "type": "varchar(42)",
749
+ "primaryKey": false,
750
+ "notNull": true
751
+ }
752
+ },
753
+ "indexes": {
754
+ "obligation_id_keys_obligation_key_idx": {
755
+ "name": "obligation_id_keys_obligation_key_idx",
756
+ "columns": [
757
+ {
758
+ "expression": "obligation_key",
759
+ "isExpression": false,
760
+ "asc": true,
761
+ "nulls": "last"
762
+ }
763
+ ],
764
+ "isUnique": false,
765
+ "concurrently": false,
766
+ "method": "btree",
767
+ "with": {}
768
+ },
769
+ "obligation_id_keys_chain_id_idx": {
770
+ "name": "obligation_id_keys_chain_id_idx",
771
+ "columns": [
772
+ {
773
+ "expression": "chain_id",
774
+ "isExpression": false,
775
+ "asc": true,
776
+ "nulls": "last"
777
+ }
778
+ ],
779
+ "isUnique": false,
780
+ "concurrently": false,
781
+ "method": "btree",
782
+ "with": {}
783
+ }
784
+ },
785
+ "foreignKeys": {
786
+ "obligation_id_keys_obligation_key_obligations_obligation_key_fk": {
787
+ "name": "obligation_id_keys_obligation_key_obligations_obligation_key_fk",
788
+ "tableFrom": "obligation_id_keys",
789
+ "tableTo": "obligations",
790
+ "schemaTo": "router_v1.10",
791
+ "columnsFrom": ["obligation_key"],
792
+ "columnsTo": ["obligation_key"],
793
+ "onDelete": "cascade",
794
+ "onUpdate": "no action"
795
+ }
796
+ },
797
+ "compositePrimaryKeys": {},
798
+ "uniqueConstraints": {},
799
+ "policies": {},
800
+ "checkConstraints": {},
801
+ "isRLSEnabled": false
802
+ },
803
+ "router_v1.10.obligations": {
804
+ "name": "obligations",
805
+ "schema": "router_v1.10",
806
+ "columns": {
807
+ "obligation_key": {
808
+ "name": "obligation_key",
809
+ "type": "varchar(66)",
810
+ "primaryKey": true,
811
+ "notNull": true
812
+ },
813
+ "loan_token": {
814
+ "name": "loan_token",
815
+ "type": "varchar(42)",
816
+ "primaryKey": false,
817
+ "notNull": true
818
+ },
819
+ "maturity": {
820
+ "name": "maturity",
821
+ "type": "integer",
822
+ "primaryKey": false,
823
+ "notNull": true
824
+ }
825
+ },
826
+ "indexes": {},
827
+ "foreignKeys": {},
828
+ "compositePrimaryKeys": {},
829
+ "uniqueConstraints": {},
830
+ "policies": {},
831
+ "checkConstraints": {},
832
+ "isRLSEnabled": false
833
+ },
834
+ "router_v1.10.offers": {
835
+ "name": "offers",
836
+ "schema": "router_v1.10",
837
+ "columns": {
838
+ "hash": {
839
+ "name": "hash",
840
+ "type": "varchar(66)",
841
+ "primaryKey": true,
842
+ "notNull": true
843
+ },
844
+ "obligation_id": {
845
+ "name": "obligation_id",
846
+ "type": "varchar(66)",
847
+ "primaryKey": false,
848
+ "notNull": true
849
+ },
850
+ "assets": {
851
+ "name": "assets",
852
+ "type": "numeric(78, 0)",
853
+ "primaryKey": false,
854
+ "notNull": true
855
+ },
856
+ "obligation_units": {
857
+ "name": "obligation_units",
858
+ "type": "numeric(78, 0)",
859
+ "primaryKey": false,
860
+ "notNull": true,
861
+ "default": "'0'"
862
+ },
863
+ "obligation_shares": {
864
+ "name": "obligation_shares",
865
+ "type": "numeric(78, 0)",
866
+ "primaryKey": false,
867
+ "notNull": true,
868
+ "default": "'0'"
869
+ },
870
+ "tick": {
871
+ "name": "tick",
872
+ "type": "integer",
873
+ "primaryKey": false,
874
+ "notNull": true
875
+ },
876
+ "maturity": {
877
+ "name": "maturity",
878
+ "type": "integer",
879
+ "primaryKey": false,
880
+ "notNull": true
881
+ },
882
+ "expiry": {
883
+ "name": "expiry",
884
+ "type": "integer",
885
+ "primaryKey": false,
886
+ "notNull": true
887
+ },
888
+ "start": {
889
+ "name": "start",
890
+ "type": "integer",
891
+ "primaryKey": false,
892
+ "notNull": true
893
+ },
894
+ "group_chain_id": {
895
+ "name": "group_chain_id",
896
+ "type": "bigint",
897
+ "primaryKey": false,
898
+ "notNull": true
899
+ },
900
+ "group_maker": {
901
+ "name": "group_maker",
902
+ "type": "varchar(42)",
903
+ "primaryKey": false,
904
+ "notNull": true
905
+ },
906
+ "group_group": {
907
+ "name": "group_group",
908
+ "type": "varchar(66)",
909
+ "primaryKey": false,
910
+ "notNull": true
911
+ },
912
+ "session": {
913
+ "name": "session",
914
+ "type": "varchar(66)",
915
+ "primaryKey": false,
916
+ "notNull": true
917
+ },
918
+ "buy": {
919
+ "name": "buy",
920
+ "type": "boolean",
921
+ "primaryKey": false,
922
+ "notNull": true
923
+ },
924
+ "callback_address": {
925
+ "name": "callback_address",
926
+ "type": "varchar(42)",
927
+ "primaryKey": false,
928
+ "notNull": true
929
+ },
930
+ "callback_data": {
931
+ "name": "callback_data",
932
+ "type": "text",
933
+ "primaryKey": false,
934
+ "notNull": true
935
+ },
936
+ "receiver_if_maker_is_seller": {
937
+ "name": "receiver_if_maker_is_seller",
938
+ "type": "varchar(42)",
939
+ "primaryKey": false,
940
+ "notNull": false
941
+ },
942
+ "block_number": {
943
+ "name": "block_number",
944
+ "type": "bigint",
945
+ "primaryKey": false,
946
+ "notNull": true
947
+ },
948
+ "updated_at": {
949
+ "name": "updated_at",
950
+ "type": "timestamp",
951
+ "primaryKey": false,
952
+ "notNull": true,
953
+ "default": "now()"
954
+ }
955
+ },
956
+ "indexes": {
957
+ "offers_group_fk_idx": {
958
+ "name": "offers_group_fk_idx",
959
+ "columns": [
960
+ {
961
+ "expression": "group_chain_id",
962
+ "isExpression": false,
963
+ "asc": true,
964
+ "nulls": "last"
965
+ },
966
+ {
967
+ "expression": "group_maker",
968
+ "isExpression": false,
969
+ "asc": true,
970
+ "nulls": "last"
971
+ },
972
+ {
973
+ "expression": "group_group",
974
+ "isExpression": false,
975
+ "asc": true,
976
+ "nulls": "last"
977
+ }
978
+ ],
979
+ "isUnique": false,
980
+ "concurrently": false,
981
+ "method": "btree",
982
+ "with": {}
983
+ },
984
+ "offers_group_and_hash_idx": {
985
+ "name": "offers_group_and_hash_idx",
986
+ "columns": [
987
+ {
988
+ "expression": "group_chain_id",
989
+ "isExpression": false,
990
+ "asc": true,
991
+ "nulls": "last"
992
+ },
993
+ {
994
+ "expression": "group_maker",
995
+ "isExpression": false,
996
+ "asc": true,
997
+ "nulls": "last"
998
+ },
999
+ {
1000
+ "expression": "group_group",
1001
+ "isExpression": false,
1002
+ "asc": true,
1003
+ "nulls": "last"
1004
+ },
1005
+ {
1006
+ "expression": "hash",
1007
+ "isExpression": false,
1008
+ "asc": true,
1009
+ "nulls": "last"
1010
+ }
1011
+ ],
1012
+ "isUnique": false,
1013
+ "concurrently": false,
1014
+ "method": "btree",
1015
+ "with": {}
1016
+ },
1017
+ "offers_obligation_id_side_idx": {
1018
+ "name": "offers_obligation_id_side_idx",
1019
+ "columns": [
1020
+ {
1021
+ "expression": "obligation_id",
1022
+ "isExpression": false,
1023
+ "asc": true,
1024
+ "nulls": "last"
1025
+ },
1026
+ {
1027
+ "expression": "buy",
1028
+ "isExpression": false,
1029
+ "asc": true,
1030
+ "nulls": "last"
1031
+ }
1032
+ ],
1033
+ "isUnique": false,
1034
+ "concurrently": false,
1035
+ "method": "btree",
1036
+ "with": {}
1037
+ }
1038
+ },
1039
+ "foreignKeys": {
1040
+ "offers_obligation_id_obligation_id_keys_obligation_id_fk": {
1041
+ "name": "offers_obligation_id_obligation_id_keys_obligation_id_fk",
1042
+ "tableFrom": "offers",
1043
+ "tableTo": "obligation_id_keys",
1044
+ "schemaTo": "router_v1.10",
1045
+ "columnsFrom": ["obligation_id"],
1046
+ "columnsTo": ["obligation_id"],
1047
+ "onDelete": "cascade",
1048
+ "onUpdate": "no action"
1049
+ },
1050
+ "offers_groups_fk": {
1051
+ "name": "offers_groups_fk",
1052
+ "tableFrom": "offers",
1053
+ "tableTo": "groups",
1054
+ "schemaTo": "router_v1.10",
1055
+ "columnsFrom": ["group_chain_id", "group_maker", "group_group"],
1056
+ "columnsTo": ["chain_id", "maker", "group"],
1057
+ "onDelete": "cascade",
1058
+ "onUpdate": "no action"
1059
+ }
1060
+ },
1061
+ "compositePrimaryKeys": {},
1062
+ "uniqueConstraints": {},
1063
+ "policies": {},
1064
+ "checkConstraints": {},
1065
+ "isRLSEnabled": false
1066
+ },
1067
+ "router_v1.10.offers_callbacks": {
1068
+ "name": "offers_callbacks",
1069
+ "schema": "router_v1.10",
1070
+ "columns": {
1071
+ "offer_hash": {
1072
+ "name": "offer_hash",
1073
+ "type": "varchar(66)",
1074
+ "primaryKey": false,
1075
+ "notNull": true
1076
+ },
1077
+ "callback_id": {
1078
+ "name": "callback_id",
1079
+ "type": "varchar(66)",
1080
+ "primaryKey": false,
1081
+ "notNull": false
1082
+ }
1083
+ },
1084
+ "indexes": {},
1085
+ "foreignKeys": {
1086
+ "offers_callbacks_offer_hash_offers_hash_fk": {
1087
+ "name": "offers_callbacks_offer_hash_offers_hash_fk",
1088
+ "tableFrom": "offers_callbacks",
1089
+ "tableTo": "offers",
1090
+ "schemaTo": "router_v1.10",
1091
+ "columnsFrom": ["offer_hash"],
1092
+ "columnsTo": ["hash"],
1093
+ "onDelete": "cascade",
1094
+ "onUpdate": "no action"
1095
+ }
1096
+ },
1097
+ "compositePrimaryKeys": {
1098
+ "offers_callbacks_pk": {
1099
+ "name": "offers_callbacks_pk",
1100
+ "columns": ["offer_hash", "callback_id"]
1101
+ }
1102
+ },
1103
+ "uniqueConstraints": {},
1104
+ "policies": {},
1105
+ "checkConstraints": {},
1106
+ "isRLSEnabled": false
1107
+ },
1108
+ "router_v1.10.offsets": {
1109
+ "name": "offsets",
1110
+ "schema": "router_v1.10",
1111
+ "columns": {
1112
+ "chain_id": {
1113
+ "name": "chain_id",
1114
+ "type": "bigint",
1115
+ "primaryKey": false,
1116
+ "notNull": true
1117
+ },
1118
+ "user": {
1119
+ "name": "user",
1120
+ "type": "varchar(42)",
1121
+ "primaryKey": false,
1122
+ "notNull": true
1123
+ },
1124
+ "contract": {
1125
+ "name": "contract",
1126
+ "type": "varchar(42)",
1127
+ "primaryKey": false,
1128
+ "notNull": true
1129
+ },
1130
+ "group": {
1131
+ "name": "group",
1132
+ "type": "varchar(66)",
1133
+ "primaryKey": false,
1134
+ "notNull": true
1135
+ },
1136
+ "obligation_id": {
1137
+ "name": "obligation_id",
1138
+ "type": "varchar(66)",
1139
+ "primaryKey": false,
1140
+ "notNull": true
1141
+ },
1142
+ "value": {
1143
+ "name": "value",
1144
+ "type": "numeric(78, 0)",
1145
+ "primaryKey": false,
1146
+ "notNull": true
1147
+ }
1148
+ },
1149
+ "indexes": {},
1150
+ "foreignKeys": {
1151
+ "offsets_lots_positions_fk": {
1152
+ "name": "offsets_lots_positions_fk",
1153
+ "tableFrom": "offsets",
1154
+ "tableTo": "lots_positions",
1155
+ "schemaTo": "router_v1.10",
1156
+ "columnsFrom": ["chain_id", "contract", "user"],
1157
+ "columnsTo": ["chain_id", "contract", "user"],
1158
+ "onDelete": "cascade",
1159
+ "onUpdate": "no action"
1160
+ }
1161
+ },
1162
+ "compositePrimaryKeys": {
1163
+ "offsets_pk": {
1164
+ "name": "offsets_pk",
1165
+ "columns": ["chain_id", "user", "contract", "group", "obligation_id"]
1166
+ }
1167
+ },
1168
+ "uniqueConstraints": {},
1169
+ "policies": {},
1170
+ "checkConstraints": {},
1171
+ "isRLSEnabled": false
1172
+ },
1173
+ "router_v1.10.oracles": {
1174
+ "name": "oracles",
1175
+ "schema": "router_v1.10",
1176
+ "columns": {
1177
+ "chain_id": {
1178
+ "name": "chain_id",
1179
+ "type": "bigint",
1180
+ "primaryKey": false,
1181
+ "notNull": true
1182
+ },
1183
+ "address": {
1184
+ "name": "address",
1185
+ "type": "varchar(42)",
1186
+ "primaryKey": false,
1187
+ "notNull": true
1188
+ },
1189
+ "price": {
1190
+ "name": "price",
1191
+ "type": "numeric(78, 0)",
1192
+ "primaryKey": false,
1193
+ "notNull": false
1194
+ },
1195
+ "block_number": {
1196
+ "name": "block_number",
1197
+ "type": "bigint",
1198
+ "primaryKey": false,
1199
+ "notNull": true
1200
+ },
1201
+ "updated_at": {
1202
+ "name": "updated_at",
1203
+ "type": "timestamp",
1204
+ "primaryKey": false,
1205
+ "notNull": true,
1206
+ "default": "now()"
1207
+ }
1208
+ },
1209
+ "indexes": {},
1210
+ "foreignKeys": {},
1211
+ "compositePrimaryKeys": {
1212
+ "oracles_pk": {
1213
+ "name": "oracles_pk",
1214
+ "columns": ["chain_id", "address"]
1215
+ }
1216
+ },
1217
+ "uniqueConstraints": {},
1218
+ "policies": {},
1219
+ "checkConstraints": {},
1220
+ "isRLSEnabled": false
1221
+ },
1222
+ "router_v1.10.position_types": {
1223
+ "name": "position_types",
1224
+ "schema": "router_v1.10",
1225
+ "columns": {
1226
+ "id": {
1227
+ "name": "id",
1228
+ "type": "serial",
1229
+ "primaryKey": true,
1230
+ "notNull": true
1231
+ },
1232
+ "type": {
1233
+ "name": "type",
1234
+ "type": "position_type",
1235
+ "typeSchema": "router_v1.10",
1236
+ "primaryKey": false,
1237
+ "notNull": true
1238
+ }
1239
+ },
1240
+ "indexes": {},
1241
+ "foreignKeys": {},
1242
+ "compositePrimaryKeys": {},
1243
+ "uniqueConstraints": {},
1244
+ "policies": {},
1245
+ "checkConstraints": {},
1246
+ "isRLSEnabled": false
1247
+ },
1248
+ "router_v1.10.positions": {
1249
+ "name": "positions",
1250
+ "schema": "router_v1.10",
1251
+ "columns": {
1252
+ "chain_id": {
1253
+ "name": "chain_id",
1254
+ "type": "bigint",
1255
+ "primaryKey": false,
1256
+ "notNull": true
1257
+ },
1258
+ "contract": {
1259
+ "name": "contract",
1260
+ "type": "varchar(66)",
1261
+ "primaryKey": false,
1262
+ "notNull": true
1263
+ },
1264
+ "user": {
1265
+ "name": "user",
1266
+ "type": "varchar(42)",
1267
+ "primaryKey": false,
1268
+ "notNull": true
1269
+ },
1270
+ "position_type_id": {
1271
+ "name": "position_type_id",
1272
+ "type": "integer",
1273
+ "primaryKey": false,
1274
+ "notNull": true
1275
+ },
1276
+ "balance": {
1277
+ "name": "balance",
1278
+ "type": "numeric(78, 0)",
1279
+ "primaryKey": false,
1280
+ "notNull": false
1281
+ },
1282
+ "asset": {
1283
+ "name": "asset",
1284
+ "type": "varchar(42)",
1285
+ "primaryKey": false,
1286
+ "notNull": false
1287
+ },
1288
+ "block_number": {
1289
+ "name": "block_number",
1290
+ "type": "bigint",
1291
+ "primaryKey": false,
1292
+ "notNull": true
1293
+ },
1294
+ "updated_at": {
1295
+ "name": "updated_at",
1296
+ "type": "timestamp",
1297
+ "primaryKey": false,
1298
+ "notNull": true,
1299
+ "default": "now()"
1300
+ }
1301
+ },
1302
+ "indexes": {},
1303
+ "foreignKeys": {
1304
+ "positions_position_type_id_position_types_id_fk": {
1305
+ "name": "positions_position_type_id_position_types_id_fk",
1306
+ "tableFrom": "positions",
1307
+ "tableTo": "position_types",
1308
+ "schemaTo": "router_v1.10",
1309
+ "columnsFrom": ["position_type_id"],
1310
+ "columnsTo": ["id"],
1311
+ "onDelete": "no action",
1312
+ "onUpdate": "no action"
1313
+ }
1314
+ },
1315
+ "compositePrimaryKeys": {
1316
+ "positions_pk": {
1317
+ "name": "positions_pk",
1318
+ "columns": ["chain_id", "contract", "user", "position_type_id"]
1319
+ }
1320
+ },
1321
+ "uniqueConstraints": {},
1322
+ "policies": {},
1323
+ "checkConstraints": {},
1324
+ "isRLSEnabled": false
1325
+ },
1326
+ "router_v1.10.status": {
1327
+ "name": "status",
1328
+ "schema": "router_v1.10",
1329
+ "columns": {
1330
+ "id": {
1331
+ "name": "id",
1332
+ "type": "serial",
1333
+ "primaryKey": true,
1334
+ "notNull": true
1335
+ },
1336
+ "code": {
1337
+ "name": "code",
1338
+ "type": "status_code",
1339
+ "typeSchema": "router_v1.10",
1340
+ "primaryKey": false,
1341
+ "notNull": false
1342
+ }
1343
+ },
1344
+ "indexes": {},
1345
+ "foreignKeys": {},
1346
+ "compositePrimaryKeys": {},
1347
+ "uniqueConstraints": {
1348
+ "status_code_unique": {
1349
+ "name": "status_code_unique",
1350
+ "nullsNotDistinct": false,
1351
+ "columns": ["code"]
1352
+ }
1353
+ },
1354
+ "policies": {},
1355
+ "checkConstraints": {},
1356
+ "isRLSEnabled": false
1357
+ },
1358
+ "router_v1.10.transfers": {
1359
+ "name": "transfers",
1360
+ "schema": "router_v1.10",
1361
+ "columns": {
1362
+ "event_id": {
1363
+ "name": "event_id",
1364
+ "type": "varchar(128)",
1365
+ "primaryKey": true,
1366
+ "notNull": true
1367
+ },
1368
+ "chain_id": {
1369
+ "name": "chain_id",
1370
+ "type": "bigint",
1371
+ "primaryKey": false,
1372
+ "notNull": true
1373
+ },
1374
+ "contract": {
1375
+ "name": "contract",
1376
+ "type": "varchar(66)",
1377
+ "primaryKey": false,
1378
+ "notNull": true
1379
+ },
1380
+ "from": {
1381
+ "name": "from",
1382
+ "type": "varchar(42)",
1383
+ "primaryKey": false,
1384
+ "notNull": true
1385
+ },
1386
+ "to": {
1387
+ "name": "to",
1388
+ "type": "varchar(42)",
1389
+ "primaryKey": false,
1390
+ "notNull": true
1391
+ },
1392
+ "value": {
1393
+ "name": "value",
1394
+ "type": "numeric(78, 0)",
1395
+ "primaryKey": false,
1396
+ "notNull": true
1397
+ },
1398
+ "position_type_id": {
1399
+ "name": "position_type_id",
1400
+ "type": "integer",
1401
+ "primaryKey": false,
1402
+ "notNull": true
1403
+ },
1404
+ "block_number": {
1405
+ "name": "block_number",
1406
+ "type": "bigint",
1407
+ "primaryKey": false,
1408
+ "notNull": true
1409
+ },
1410
+ "created_at": {
1411
+ "name": "created_at",
1412
+ "type": "timestamp",
1413
+ "primaryKey": false,
1414
+ "notNull": true,
1415
+ "default": "now()"
1416
+ }
1417
+ },
1418
+ "indexes": {
1419
+ "transfers_chain_contract_user_idx": {
1420
+ "name": "transfers_chain_contract_user_idx",
1421
+ "columns": [
1422
+ {
1423
+ "expression": "chain_id",
1424
+ "isExpression": false,
1425
+ "asc": true,
1426
+ "nulls": "last"
1427
+ },
1428
+ {
1429
+ "expression": "contract",
1430
+ "isExpression": false,
1431
+ "asc": true,
1432
+ "nulls": "last"
1433
+ },
1434
+ {
1435
+ "expression": "from",
1436
+ "isExpression": false,
1437
+ "asc": true,
1438
+ "nulls": "last"
1439
+ },
1440
+ {
1441
+ "expression": "to",
1442
+ "isExpression": false,
1443
+ "asc": true,
1444
+ "nulls": "last"
1445
+ },
1446
+ {
1447
+ "expression": "block_number",
1448
+ "isExpression": false,
1449
+ "asc": true,
1450
+ "nulls": "last"
1451
+ }
1452
+ ],
1453
+ "isUnique": false,
1454
+ "concurrently": false,
1455
+ "method": "btree",
1456
+ "with": {}
1457
+ },
1458
+ "transfers_chain_type_block_idx": {
1459
+ "name": "transfers_chain_type_block_idx",
1460
+ "columns": [
1461
+ {
1462
+ "expression": "chain_id",
1463
+ "isExpression": false,
1464
+ "asc": true,
1465
+ "nulls": "last"
1466
+ },
1467
+ {
1468
+ "expression": "position_type_id",
1469
+ "isExpression": false,
1470
+ "asc": true,
1471
+ "nulls": "last"
1472
+ },
1473
+ {
1474
+ "expression": "block_number",
1475
+ "isExpression": false,
1476
+ "asc": true,
1477
+ "nulls": "last"
1478
+ }
1479
+ ],
1480
+ "isUnique": false,
1481
+ "concurrently": false,
1482
+ "method": "btree",
1483
+ "with": {}
1484
+ }
1485
+ },
1486
+ "foreignKeys": {
1487
+ "transfers_position_type_id_position_types_id_fk": {
1488
+ "name": "transfers_position_type_id_position_types_id_fk",
1489
+ "tableFrom": "transfers",
1490
+ "tableTo": "position_types",
1491
+ "schemaTo": "router_v1.10",
1492
+ "columnsFrom": ["position_type_id"],
1493
+ "columnsTo": ["id"],
1494
+ "onDelete": "no action",
1495
+ "onUpdate": "no action"
1496
+ },
1497
+ "transfers_positions_from_fk": {
1498
+ "name": "transfers_positions_from_fk",
1499
+ "tableFrom": "transfers",
1500
+ "tableTo": "positions",
1501
+ "schemaTo": "router_v1.10",
1502
+ "columnsFrom": ["chain_id", "contract", "from", "position_type_id"],
1503
+ "columnsTo": ["chain_id", "contract", "user", "position_type_id"],
1504
+ "onDelete": "cascade",
1505
+ "onUpdate": "no action"
1506
+ },
1507
+ "transfers_positions_to_fk": {
1508
+ "name": "transfers_positions_to_fk",
1509
+ "tableFrom": "transfers",
1510
+ "tableTo": "positions",
1511
+ "schemaTo": "router_v1.10",
1512
+ "columnsFrom": ["chain_id", "contract", "to", "position_type_id"],
1513
+ "columnsTo": ["chain_id", "contract", "user", "position_type_id"],
1514
+ "onDelete": "cascade",
1515
+ "onUpdate": "no action"
1516
+ }
1517
+ },
1518
+ "compositePrimaryKeys": {},
1519
+ "uniqueConstraints": {},
1520
+ "policies": {},
1521
+ "checkConstraints": {},
1522
+ "isRLSEnabled": false
1523
+ },
1524
+ "router_v1.10.trees": {
1525
+ "name": "trees",
1526
+ "schema": "router_v1.10",
1527
+ "columns": {
1528
+ "root": {
1529
+ "name": "root",
1530
+ "type": "varchar(66)",
1531
+ "primaryKey": true,
1532
+ "notNull": true
1533
+ },
1534
+ "root_signature": {
1535
+ "name": "root_signature",
1536
+ "type": "varchar(132)",
1537
+ "primaryKey": false,
1538
+ "notNull": true
1539
+ },
1540
+ "created_at": {
1541
+ "name": "created_at",
1542
+ "type": "timestamp",
1543
+ "primaryKey": false,
1544
+ "notNull": true,
1545
+ "default": "now()"
1546
+ }
1547
+ },
1548
+ "indexes": {},
1549
+ "foreignKeys": {},
1550
+ "compositePrimaryKeys": {},
1551
+ "uniqueConstraints": {},
1552
+ "policies": {},
1553
+ "checkConstraints": {},
1554
+ "isRLSEnabled": false
1555
+ },
1556
+ "router_v1.10.validations": {
1557
+ "name": "validations",
1558
+ "schema": "router_v1.10",
1559
+ "columns": {
1560
+ "offer_hash": {
1561
+ "name": "offer_hash",
1562
+ "type": "varchar(66)",
1563
+ "primaryKey": true,
1564
+ "notNull": true
1565
+ },
1566
+ "status_id": {
1567
+ "name": "status_id",
1568
+ "type": "integer",
1569
+ "primaryKey": false,
1570
+ "notNull": true
1571
+ },
1572
+ "updated_at": {
1573
+ "name": "updated_at",
1574
+ "type": "timestamp",
1575
+ "primaryKey": false,
1576
+ "notNull": true,
1577
+ "default": "now()"
1578
+ }
1579
+ },
1580
+ "indexes": {},
1581
+ "foreignKeys": {
1582
+ "validations_offer_hash_offers_hash_fk": {
1583
+ "name": "validations_offer_hash_offers_hash_fk",
1584
+ "tableFrom": "validations",
1585
+ "tableTo": "offers",
1586
+ "schemaTo": "router_v1.10",
1587
+ "columnsFrom": ["offer_hash"],
1588
+ "columnsTo": ["hash"],
1589
+ "onDelete": "cascade",
1590
+ "onUpdate": "no action"
1591
+ },
1592
+ "validations_status_id_status_id_fk": {
1593
+ "name": "validations_status_id_status_id_fk",
1594
+ "tableFrom": "validations",
1595
+ "tableTo": "status",
1596
+ "schemaTo": "router_v1.10",
1597
+ "columnsFrom": ["status_id"],
1598
+ "columnsTo": ["id"],
1599
+ "onDelete": "no action",
1600
+ "onUpdate": "no action"
1601
+ }
1602
+ },
1603
+ "compositePrimaryKeys": {},
1604
+ "uniqueConstraints": {},
1605
+ "policies": {},
1606
+ "checkConstraints": {},
1607
+ "isRLSEnabled": false
1608
+ }
1609
+ },
1610
+ "enums": {
1611
+ "router_v1.10.position_type": {
1612
+ "name": "position_type",
1613
+ "schema": "router_v1.10",
1614
+ "values": ["erc20", "vault_v1", "debtOf"]
1615
+ },
1616
+ "router_v1.10.status_code": {
1617
+ "name": "status_code",
1618
+ "schema": "router_v1.10",
1619
+ "values": ["VALID", "SIMULATION_ERROR"]
1620
+ }
1621
+ },
1622
+ "schemas": {},
1623
+ "sequences": {},
1624
+ "roles": {},
1625
+ "policies": {},
1626
+ "views": {},
1627
+ "_meta": {
1628
+ "columns": {},
1629
+ "schemas": {},
1630
+ "tables": {}
1631
+ }
1632
+ }