@morpho-dev/router 0.3.0 → 0.4.1

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