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