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