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