@morpho-dev/router 0.1.18 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +29 -19
  2. package/dist/chunk-jass6xSI.mjs +13 -0
  3. package/dist/cli.js +6574 -6194
  4. package/dist/drizzle/migrations/0000_setup_single_migration_folder.sql +204 -0
  5. package/dist/drizzle/migrations/0001_add-trigger-for-consumed-events.sql +58 -0
  6. package/dist/drizzle/migrations/0002_insert-status-code.sql +1 -0
  7. package/dist/drizzle/migrations/0003_update-triggers-for-consumed-events.sql +3 -0
  8. package/dist/drizzle/migrations/0004_drop-status-offers-foreign-key-constraint.sql +1 -0
  9. package/dist/drizzle/migrations/0005_add-index-to-boost-group-query-and-offer-hash.sql +1 -0
  10. package/dist/drizzle/migrations/0006_add-callbacks-and-positions-relations.sql +37 -0
  11. package/dist/drizzle/migrations/0008_validation.sql +15 -0
  12. package/dist/drizzle/migrations/0009_add-transfers-table.sql +14 -0
  13. package/dist/drizzle/migrations/0010_add-price.sql +1 -0
  14. package/dist/drizzle/migrations/0011_nullable-callback-amount.sql +1 -0
  15. package/dist/drizzle/migrations/0012_add-position-asset.sql +1 -0
  16. package/dist/drizzle/migrations/0013_remove-depecrated-domains.sql +13 -0
  17. package/dist/drizzle/migrations/0014_rename-offers-v2-into-offers.sql +23 -0
  18. package/dist/drizzle/{router_v1.4 → migrations}/meta/0000_snapshot.json +858 -78
  19. package/dist/drizzle/migrations/meta/0001_snapshot.json +1752 -0
  20. package/dist/drizzle/migrations/meta/0002_snapshot.json +1752 -0
  21. package/dist/drizzle/migrations/meta/0003_snapshot.json +1752 -0
  22. package/dist/drizzle/{router_v1.4/meta/0001_snapshot.json → migrations/meta/0004_snapshot.json} +848 -78
  23. package/dist/drizzle/migrations/meta/0005_snapshot.json +1775 -0
  24. package/dist/drizzle/migrations/meta/0006_snapshot.json +1973 -0
  25. package/dist/drizzle/migrations/meta/0008_snapshot.json +1955 -0
  26. package/dist/drizzle/migrations/meta/0009_snapshot.json +2078 -0
  27. package/dist/drizzle/migrations/meta/0010_snapshot.json +2084 -0
  28. package/dist/drizzle/migrations/meta/0013_snapshot.json +1290 -0
  29. package/dist/drizzle/migrations/meta/0014_snapshot.json +1290 -0
  30. package/dist/drizzle/migrations/meta/_journal.json +104 -0
  31. package/dist/index.browser.d.mts +2794 -0
  32. package/dist/index.browser.d.mts.map +1 -0
  33. package/dist/index.browser.d.ts +2290 -1172
  34. package/dist/index.browser.d.ts.map +1 -0
  35. package/dist/index.browser.js +3820 -2519
  36. package/dist/index.browser.js.map +1 -1
  37. package/dist/index.browser.mjs +3615 -2467
  38. package/dist/index.browser.mjs.map +1 -1
  39. package/dist/index.node.d.mts +4987 -0
  40. package/dist/index.node.d.mts.map +1 -0
  41. package/dist/index.node.d.ts +4423 -2906
  42. package/dist/index.node.d.ts.map +1 -0
  43. package/dist/index.node.js +7810 -6141
  44. package/dist/index.node.js.map +1 -1
  45. package/dist/index.node.mjs +7556 -6102
  46. package/dist/index.node.mjs.map +1 -1
  47. package/package.json +29 -15
  48. package/dist/cli.js.map +0 -1
  49. package/dist/drizzle/router_v1.4/0000_add_obligation_id.sql +0 -112
  50. package/dist/drizzle/router_v1.4/0001_update-primary-key-on-link.sql +0 -3
  51. package/dist/drizzle/router_v1.4/meta/_journal.json +0 -20
  52. package/dist/index.browser.d.cts +0 -1675
  53. package/dist/index.node.d.cts +0 -3471
@@ -0,0 +1,1775 @@
1
+ {
2
+ "id": "4b798c66-1934-41a6-88fd-8befd4669a89",
3
+ "prevId": "453dc50d-cf38-44d6-810f-21d6554add96",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "router_v1.6.chains": {
8
+ "name": "chains",
9
+ "schema": "router_v1.6",
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.6.collectors": {
69
+ "name": "collectors",
70
+ "schema": "router_v1.6",
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.6.consumed_per_user_and_nonce": {
142
+ "name": "consumed_per_user_and_nonce",
143
+ "schema": "router_v1.6",
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.6.consumed_events": {
232
+ "name": "consumed_events",
233
+ "schema": "router_v1.6",
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
+ "consumed_events_group_idx": {
281
+ "name": "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
+ "consumed_events_block_number_idx": {
308
+ "name": "consumed_events_block_number_idx",
309
+ "columns": [
310
+ {
311
+ "expression": "block_number",
312
+ "isExpression": false,
313
+ "asc": true,
314
+ "nulls": "last"
315
+ }
316
+ ],
317
+ "isUnique": false,
318
+ "concurrently": false,
319
+ "method": "btree",
320
+ "with": {}
321
+ }
322
+ },
323
+ "foreignKeys": {
324
+ "consumed_events_groups_fk": {
325
+ "name": "consumed_events_groups_fk",
326
+ "tableFrom": "consumed_events",
327
+ "tableTo": "groups",
328
+ "schemaTo": "router_v1.6",
329
+ "columnsFrom": ["chain_id", "maker", "group"],
330
+ "columnsTo": ["chain_id", "maker", "group"],
331
+ "onDelete": "cascade",
332
+ "onUpdate": "no action"
333
+ }
334
+ },
335
+ "compositePrimaryKeys": {},
336
+ "uniqueConstraints": {},
337
+ "policies": {},
338
+ "checkConstraints": {},
339
+ "isRLSEnabled": false
340
+ },
341
+ "router_v1.6.groups": {
342
+ "name": "groups",
343
+ "schema": "router_v1.6",
344
+ "columns": {
345
+ "chain_id": {
346
+ "name": "chain_id",
347
+ "type": "bigint",
348
+ "primaryKey": false,
349
+ "notNull": true
350
+ },
351
+ "maker": {
352
+ "name": "maker",
353
+ "type": "varchar(42)",
354
+ "primaryKey": false,
355
+ "notNull": true
356
+ },
357
+ "group": {
358
+ "name": "group",
359
+ "type": "varchar(66)",
360
+ "primaryKey": false,
361
+ "notNull": true
362
+ },
363
+ "consumed": {
364
+ "name": "consumed",
365
+ "type": "numeric(78, 0)",
366
+ "primaryKey": false,
367
+ "notNull": true
368
+ },
369
+ "block_number": {
370
+ "name": "block_number",
371
+ "type": "bigint",
372
+ "primaryKey": false,
373
+ "notNull": true
374
+ },
375
+ "updated_at": {
376
+ "name": "updated_at",
377
+ "type": "timestamp",
378
+ "primaryKey": false,
379
+ "notNull": true,
380
+ "default": "now()"
381
+ }
382
+ },
383
+ "indexes": {
384
+ "groups_chain_id_maker_group_consumed_idx": {
385
+ "name": "groups_chain_id_maker_group_consumed_idx",
386
+ "columns": [
387
+ {
388
+ "expression": "chain_id",
389
+ "isExpression": false,
390
+ "asc": true,
391
+ "nulls": "last"
392
+ },
393
+ {
394
+ "expression": "maker",
395
+ "isExpression": false,
396
+ "asc": true,
397
+ "nulls": "last"
398
+ },
399
+ {
400
+ "expression": "group",
401
+ "isExpression": false,
402
+ "asc": true,
403
+ "nulls": "last"
404
+ },
405
+ {
406
+ "expression": "consumed",
407
+ "isExpression": false,
408
+ "asc": true,
409
+ "nulls": "last"
410
+ }
411
+ ],
412
+ "isUnique": false,
413
+ "concurrently": false,
414
+ "method": "btree",
415
+ "with": {}
416
+ }
417
+ },
418
+ "foreignKeys": {},
419
+ "compositePrimaryKeys": {
420
+ "groups_pk": {
421
+ "name": "groups_pk",
422
+ "columns": ["chain_id", "maker", "group"]
423
+ }
424
+ },
425
+ "uniqueConstraints": {},
426
+ "policies": {},
427
+ "checkConstraints": {},
428
+ "isRLSEnabled": false
429
+ },
430
+ "router_v1.6.liquidity_links": {
431
+ "name": "liquidity_links",
432
+ "schema": "router_v1.6",
433
+ "columns": {
434
+ "parent_pool_id": {
435
+ "name": "parent_pool_id",
436
+ "type": "varchar(255)",
437
+ "primaryKey": false,
438
+ "notNull": true
439
+ },
440
+ "child_pool_id": {
441
+ "name": "child_pool_id",
442
+ "type": "varchar(255)",
443
+ "primaryKey": false,
444
+ "notNull": true
445
+ },
446
+ "priority": {
447
+ "name": "priority",
448
+ "type": "integer",
449
+ "primaryKey": false,
450
+ "notNull": true
451
+ },
452
+ "block_number": {
453
+ "name": "block_number",
454
+ "type": "bigint",
455
+ "primaryKey": false,
456
+ "notNull": true
457
+ },
458
+ "updated_at": {
459
+ "name": "updated_at",
460
+ "type": "timestamp",
461
+ "primaryKey": false,
462
+ "notNull": true,
463
+ "default": "now()"
464
+ }
465
+ },
466
+ "indexes": {
467
+ "liquidity_links_parent_pool_id_idx": {
468
+ "name": "liquidity_links_parent_pool_id_idx",
469
+ "columns": [
470
+ {
471
+ "expression": "parent_pool_id",
472
+ "isExpression": false,
473
+ "asc": true,
474
+ "nulls": "last"
475
+ }
476
+ ],
477
+ "isUnique": false,
478
+ "concurrently": false,
479
+ "method": "btree",
480
+ "with": {}
481
+ },
482
+ "liquidity_links_child_pool_id_idx": {
483
+ "name": "liquidity_links_child_pool_id_idx",
484
+ "columns": [
485
+ {
486
+ "expression": "child_pool_id",
487
+ "isExpression": false,
488
+ "asc": true,
489
+ "nulls": "last"
490
+ }
491
+ ],
492
+ "isUnique": false,
493
+ "concurrently": false,
494
+ "method": "btree",
495
+ "with": {}
496
+ }
497
+ },
498
+ "foreignKeys": {
499
+ "liquidity_links_parent_pool_id_liquidity_pools_id_fk": {
500
+ "name": "liquidity_links_parent_pool_id_liquidity_pools_id_fk",
501
+ "tableFrom": "liquidity_links",
502
+ "tableTo": "liquidity_pools",
503
+ "schemaTo": "router_v1.6",
504
+ "columnsFrom": ["parent_pool_id"],
505
+ "columnsTo": ["id"],
506
+ "onDelete": "cascade",
507
+ "onUpdate": "no action"
508
+ },
509
+ "liquidity_links_child_pool_id_liquidity_pools_id_fk": {
510
+ "name": "liquidity_links_child_pool_id_liquidity_pools_id_fk",
511
+ "tableFrom": "liquidity_links",
512
+ "tableTo": "liquidity_pools",
513
+ "schemaTo": "router_v1.6",
514
+ "columnsFrom": ["child_pool_id"],
515
+ "columnsTo": ["id"],
516
+ "onDelete": "cascade",
517
+ "onUpdate": "no action"
518
+ }
519
+ },
520
+ "compositePrimaryKeys": {
521
+ "liquidity_links_pk": {
522
+ "name": "liquidity_links_pk",
523
+ "columns": ["parent_pool_id", "priority"]
524
+ }
525
+ },
526
+ "uniqueConstraints": {},
527
+ "policies": {},
528
+ "checkConstraints": {},
529
+ "isRLSEnabled": false
530
+ },
531
+ "router_v1.6.liquidity_pools": {
532
+ "name": "liquidity_pools",
533
+ "schema": "router_v1.6",
534
+ "columns": {
535
+ "id": {
536
+ "name": "id",
537
+ "type": "varchar(255)",
538
+ "primaryKey": true,
539
+ "notNull": true
540
+ },
541
+ "amount": {
542
+ "name": "amount",
543
+ "type": "numeric(78, 0)",
544
+ "primaryKey": false,
545
+ "notNull": true
546
+ },
547
+ "block_number": {
548
+ "name": "block_number",
549
+ "type": "bigint",
550
+ "primaryKey": false,
551
+ "notNull": true
552
+ },
553
+ "updated_at": {
554
+ "name": "updated_at",
555
+ "type": "timestamp",
556
+ "primaryKey": false,
557
+ "notNull": true,
558
+ "default": "now()"
559
+ }
560
+ },
561
+ "indexes": {},
562
+ "foreignKeys": {},
563
+ "compositePrimaryKeys": {},
564
+ "uniqueConstraints": {},
565
+ "policies": {},
566
+ "checkConstraints": {},
567
+ "isRLSEnabled": false
568
+ },
569
+ "router_v1.6.obligation_collaterals": {
570
+ "name": "obligation_collaterals",
571
+ "schema": "router_v1.6",
572
+ "columns": {
573
+ "obligation_id": {
574
+ "name": "obligation_id",
575
+ "type": "varchar(66)",
576
+ "primaryKey": false,
577
+ "notNull": true
578
+ },
579
+ "asset": {
580
+ "name": "asset",
581
+ "type": "varchar(42)",
582
+ "primaryKey": false,
583
+ "notNull": true
584
+ },
585
+ "oracle": {
586
+ "name": "oracle",
587
+ "type": "varchar(42)",
588
+ "primaryKey": false,
589
+ "notNull": true
590
+ },
591
+ "lltv": {
592
+ "name": "lltv",
593
+ "type": "bigint",
594
+ "primaryKey": false,
595
+ "notNull": true
596
+ }
597
+ },
598
+ "indexes": {
599
+ "obligation_collaterals_obligation_id_idx": {
600
+ "name": "obligation_collaterals_obligation_id_idx",
601
+ "columns": [
602
+ {
603
+ "expression": "obligation_id",
604
+ "isExpression": false,
605
+ "asc": true,
606
+ "nulls": "last"
607
+ }
608
+ ],
609
+ "isUnique": false,
610
+ "concurrently": false,
611
+ "method": "btree",
612
+ "with": {}
613
+ }
614
+ },
615
+ "foreignKeys": {
616
+ "obligation_collaterals_obligation_id_obligations_obligation_id_fk": {
617
+ "name": "obligation_collaterals_obligation_id_obligations_obligation_id_fk",
618
+ "tableFrom": "obligation_collaterals",
619
+ "tableTo": "obligations",
620
+ "schemaTo": "router_v1.6",
621
+ "columnsFrom": ["obligation_id"],
622
+ "columnsTo": ["obligation_id"],
623
+ "onDelete": "cascade",
624
+ "onUpdate": "no action"
625
+ }
626
+ },
627
+ "compositePrimaryKeys": {
628
+ "obligation_collaterals_pk": {
629
+ "name": "obligation_collaterals_pk",
630
+ "columns": ["obligation_id", "asset"]
631
+ }
632
+ },
633
+ "uniqueConstraints": {},
634
+ "policies": {},
635
+ "checkConstraints": {},
636
+ "isRLSEnabled": false
637
+ },
638
+ "router_v1.6.obligation_collaterals_v2": {
639
+ "name": "obligation_collaterals_v2",
640
+ "schema": "router_v1.6",
641
+ "columns": {
642
+ "obligation_id": {
643
+ "name": "obligation_id",
644
+ "type": "varchar(66)",
645
+ "primaryKey": false,
646
+ "notNull": true
647
+ },
648
+ "asset": {
649
+ "name": "asset",
650
+ "type": "varchar(42)",
651
+ "primaryKey": false,
652
+ "notNull": true
653
+ },
654
+ "oracle_chain_id": {
655
+ "name": "oracle_chain_id",
656
+ "type": "bigint",
657
+ "primaryKey": false,
658
+ "notNull": true
659
+ },
660
+ "oracle_address": {
661
+ "name": "oracle_address",
662
+ "type": "varchar(42)",
663
+ "primaryKey": false,
664
+ "notNull": true
665
+ },
666
+ "lltv": {
667
+ "name": "lltv",
668
+ "type": "bigint",
669
+ "primaryKey": false,
670
+ "notNull": true
671
+ },
672
+ "block_number": {
673
+ "name": "block_number",
674
+ "type": "bigint",
675
+ "primaryKey": false,
676
+ "notNull": true
677
+ },
678
+ "updated_at": {
679
+ "name": "updated_at",
680
+ "type": "timestamp",
681
+ "primaryKey": false,
682
+ "notNull": true,
683
+ "default": "now()"
684
+ }
685
+ },
686
+ "indexes": {
687
+ "obligation_collaterals_v2_obligation_id_idx": {
688
+ "name": "obligation_collaterals_v2_obligation_id_idx",
689
+ "columns": [
690
+ {
691
+ "expression": "obligation_id",
692
+ "isExpression": false,
693
+ "asc": true,
694
+ "nulls": "last"
695
+ }
696
+ ],
697
+ "isUnique": false,
698
+ "concurrently": false,
699
+ "method": "btree",
700
+ "with": {}
701
+ },
702
+ "obligation_collaterals_v2_oracle_fk_idx": {
703
+ "name": "obligation_collaterals_v2_oracle_fk_idx",
704
+ "columns": [
705
+ {
706
+ "expression": "oracle_chain_id",
707
+ "isExpression": false,
708
+ "asc": true,
709
+ "nulls": "last"
710
+ },
711
+ {
712
+ "expression": "oracle_address",
713
+ "isExpression": false,
714
+ "asc": true,
715
+ "nulls": "last"
716
+ }
717
+ ],
718
+ "isUnique": false,
719
+ "concurrently": false,
720
+ "method": "btree",
721
+ "with": {}
722
+ }
723
+ },
724
+ "foreignKeys": {
725
+ "obligation_collaterals_v2_obligation_id_obligations_obligation_id_fk": {
726
+ "name": "obligation_collaterals_v2_obligation_id_obligations_obligation_id_fk",
727
+ "tableFrom": "obligation_collaterals_v2",
728
+ "tableTo": "obligations",
729
+ "schemaTo": "router_v1.6",
730
+ "columnsFrom": ["obligation_id"],
731
+ "columnsTo": ["obligation_id"],
732
+ "onDelete": "cascade",
733
+ "onUpdate": "no action"
734
+ },
735
+ "obligation_collaterals_v2_oracles_fk": {
736
+ "name": "obligation_collaterals_v2_oracles_fk",
737
+ "tableFrom": "obligation_collaterals_v2",
738
+ "tableTo": "oracles",
739
+ "schemaTo": "router_v1.6",
740
+ "columnsFrom": ["oracle_chain_id", "oracle_address"],
741
+ "columnsTo": ["chain_id", "address"],
742
+ "onDelete": "no action",
743
+ "onUpdate": "no action"
744
+ }
745
+ },
746
+ "compositePrimaryKeys": {
747
+ "obligation_collaterals_v2_pk": {
748
+ "name": "obligation_collaterals_v2_pk",
749
+ "columns": ["obligation_id", "asset"]
750
+ }
751
+ },
752
+ "uniqueConstraints": {},
753
+ "policies": {},
754
+ "checkConstraints": {},
755
+ "isRLSEnabled": false
756
+ },
757
+ "router_v1.6.obligations": {
758
+ "name": "obligations",
759
+ "schema": "router_v1.6",
760
+ "columns": {
761
+ "obligation_id": {
762
+ "name": "obligation_id",
763
+ "type": "varchar(66)",
764
+ "primaryKey": true,
765
+ "notNull": true
766
+ },
767
+ "chain_id": {
768
+ "name": "chain_id",
769
+ "type": "bigint",
770
+ "primaryKey": false,
771
+ "notNull": true
772
+ },
773
+ "loan_token": {
774
+ "name": "loan_token",
775
+ "type": "varchar(42)",
776
+ "primaryKey": false,
777
+ "notNull": true
778
+ },
779
+ "maturity": {
780
+ "name": "maturity",
781
+ "type": "integer",
782
+ "primaryKey": false,
783
+ "notNull": true
784
+ }
785
+ },
786
+ "indexes": {},
787
+ "foreignKeys": {},
788
+ "compositePrimaryKeys": {},
789
+ "uniqueConstraints": {},
790
+ "policies": {},
791
+ "checkConstraints": {},
792
+ "isRLSEnabled": false
793
+ },
794
+ "router_v1.6.offer_liquidity_pools": {
795
+ "name": "offer_liquidity_pools",
796
+ "schema": "router_v1.6",
797
+ "columns": {
798
+ "offer_hash": {
799
+ "name": "offer_hash",
800
+ "type": "varchar(66)",
801
+ "primaryKey": false,
802
+ "notNull": true
803
+ },
804
+ "pool_id": {
805
+ "name": "pool_id",
806
+ "type": "varchar(255)",
807
+ "primaryKey": false,
808
+ "notNull": true
809
+ },
810
+ "amount": {
811
+ "name": "amount",
812
+ "type": "numeric(78, 0)",
813
+ "primaryKey": false,
814
+ "notNull": true
815
+ },
816
+ "block_number": {
817
+ "name": "block_number",
818
+ "type": "bigint",
819
+ "primaryKey": false,
820
+ "notNull": true
821
+ },
822
+ "updated_at": {
823
+ "name": "updated_at",
824
+ "type": "timestamp",
825
+ "primaryKey": false,
826
+ "notNull": true,
827
+ "default": "now()"
828
+ }
829
+ },
830
+ "indexes": {
831
+ "offer_liquidity_pools_pool_id_idx": {
832
+ "name": "offer_liquidity_pools_pool_id_idx",
833
+ "columns": [
834
+ {
835
+ "expression": "pool_id",
836
+ "isExpression": false,
837
+ "asc": true,
838
+ "nulls": "last"
839
+ }
840
+ ],
841
+ "isUnique": false,
842
+ "concurrently": false,
843
+ "method": "btree",
844
+ "with": {}
845
+ }
846
+ },
847
+ "foreignKeys": {
848
+ "offer_liquidity_pools_offer_hash_offers_hash_fk": {
849
+ "name": "offer_liquidity_pools_offer_hash_offers_hash_fk",
850
+ "tableFrom": "offer_liquidity_pools",
851
+ "tableTo": "offers",
852
+ "schemaTo": "router_v1.6",
853
+ "columnsFrom": ["offer_hash"],
854
+ "columnsTo": ["hash"],
855
+ "onDelete": "cascade",
856
+ "onUpdate": "no action"
857
+ },
858
+ "offer_liquidity_pools_pool_id_liquidity_pools_id_fk": {
859
+ "name": "offer_liquidity_pools_pool_id_liquidity_pools_id_fk",
860
+ "tableFrom": "offer_liquidity_pools",
861
+ "tableTo": "liquidity_pools",
862
+ "schemaTo": "router_v1.6",
863
+ "columnsFrom": ["pool_id"],
864
+ "columnsTo": ["id"],
865
+ "onDelete": "cascade",
866
+ "onUpdate": "no action"
867
+ }
868
+ },
869
+ "compositePrimaryKeys": {
870
+ "offer_liquidity_pools_pk": {
871
+ "name": "offer_liquidity_pools_pk",
872
+ "columns": ["offer_hash", "pool_id"]
873
+ }
874
+ },
875
+ "uniqueConstraints": {},
876
+ "policies": {},
877
+ "checkConstraints": {},
878
+ "isRLSEnabled": false
879
+ },
880
+ "router_v1.6.offer_status": {
881
+ "name": "offer_status",
882
+ "schema": "router_v1.6",
883
+ "columns": {
884
+ "offer_hash": {
885
+ "name": "offer_hash",
886
+ "type": "varchar(66)",
887
+ "primaryKey": true,
888
+ "notNull": true
889
+ },
890
+ "status_id": {
891
+ "name": "status_id",
892
+ "type": "serial",
893
+ "primaryKey": false,
894
+ "notNull": true
895
+ },
896
+ "block_number": {
897
+ "name": "block_number",
898
+ "type": "bigint",
899
+ "primaryKey": false,
900
+ "notNull": true
901
+ },
902
+ "updated_at": {
903
+ "name": "updated_at",
904
+ "type": "timestamp",
905
+ "primaryKey": false,
906
+ "notNull": true,
907
+ "default": "now()"
908
+ }
909
+ },
910
+ "indexes": {
911
+ "offer_status_status_hash_idx": {
912
+ "name": "offer_status_status_hash_idx",
913
+ "columns": [
914
+ {
915
+ "expression": "status_id",
916
+ "isExpression": false,
917
+ "asc": true,
918
+ "nulls": "last"
919
+ },
920
+ {
921
+ "expression": "offer_hash",
922
+ "isExpression": false,
923
+ "asc": true,
924
+ "nulls": "last"
925
+ }
926
+ ],
927
+ "isUnique": false,
928
+ "concurrently": false,
929
+ "method": "btree",
930
+ "with": {}
931
+ }
932
+ },
933
+ "foreignKeys": {
934
+ "offer_status_status_id_status_id_fk": {
935
+ "name": "offer_status_status_id_status_id_fk",
936
+ "tableFrom": "offer_status",
937
+ "tableTo": "status",
938
+ "schemaTo": "router_v1.6",
939
+ "columnsFrom": ["status_id"],
940
+ "columnsTo": ["id"],
941
+ "onDelete": "cascade",
942
+ "onUpdate": "no action"
943
+ }
944
+ },
945
+ "compositePrimaryKeys": {},
946
+ "uniqueConstraints": {},
947
+ "policies": {},
948
+ "checkConstraints": {},
949
+ "isRLSEnabled": false
950
+ },
951
+ "router_v1.6.offers": {
952
+ "name": "offers",
953
+ "schema": "router_v1.6",
954
+ "columns": {
955
+ "hash": {
956
+ "name": "hash",
957
+ "type": "varchar(66)",
958
+ "primaryKey": true,
959
+ "notNull": true
960
+ },
961
+ "obligation_id": {
962
+ "name": "obligation_id",
963
+ "type": "varchar(66)",
964
+ "primaryKey": false,
965
+ "notNull": true
966
+ },
967
+ "offering": {
968
+ "name": "offering",
969
+ "type": "varchar(42)",
970
+ "primaryKey": false,
971
+ "notNull": true
972
+ },
973
+ "assets": {
974
+ "name": "assets",
975
+ "type": "numeric(78, 0)",
976
+ "primaryKey": false,
977
+ "notNull": true
978
+ },
979
+ "rate": {
980
+ "name": "rate",
981
+ "type": "bigint",
982
+ "primaryKey": false,
983
+ "notNull": true
984
+ },
985
+ "maturity": {
986
+ "name": "maturity",
987
+ "type": "integer",
988
+ "primaryKey": false,
989
+ "notNull": true
990
+ },
991
+ "expiry": {
992
+ "name": "expiry",
993
+ "type": "integer",
994
+ "primaryKey": false,
995
+ "notNull": true
996
+ },
997
+ "start": {
998
+ "name": "start",
999
+ "type": "integer",
1000
+ "primaryKey": false,
1001
+ "notNull": true
1002
+ },
1003
+ "nonce": {
1004
+ "name": "nonce",
1005
+ "type": "bigint",
1006
+ "primaryKey": false,
1007
+ "notNull": true
1008
+ },
1009
+ "buy": {
1010
+ "name": "buy",
1011
+ "type": "boolean",
1012
+ "primaryKey": false,
1013
+ "notNull": true
1014
+ },
1015
+ "chain_id": {
1016
+ "name": "chain_id",
1017
+ "type": "bigint",
1018
+ "primaryKey": false,
1019
+ "notNull": true
1020
+ },
1021
+ "loan_token": {
1022
+ "name": "loan_token",
1023
+ "type": "varchar(42)",
1024
+ "primaryKey": false,
1025
+ "notNull": true
1026
+ },
1027
+ "callback_address": {
1028
+ "name": "callback_address",
1029
+ "type": "varchar(42)",
1030
+ "primaryKey": false,
1031
+ "notNull": true
1032
+ },
1033
+ "callback_data": {
1034
+ "name": "callback_data",
1035
+ "type": "text",
1036
+ "primaryKey": false,
1037
+ "notNull": true
1038
+ },
1039
+ "callback_gas_limit": {
1040
+ "name": "callback_gas_limit",
1041
+ "type": "bigint",
1042
+ "primaryKey": false,
1043
+ "notNull": true
1044
+ },
1045
+ "signature": {
1046
+ "name": "signature",
1047
+ "type": "varchar(132)",
1048
+ "primaryKey": false,
1049
+ "notNull": false
1050
+ },
1051
+ "created_at": {
1052
+ "name": "created_at",
1053
+ "type": "timestamp",
1054
+ "primaryKey": false,
1055
+ "notNull": true,
1056
+ "default": "now()"
1057
+ },
1058
+ "block_number": {
1059
+ "name": "block_number",
1060
+ "type": "bigint",
1061
+ "primaryKey": false,
1062
+ "notNull": true
1063
+ }
1064
+ },
1065
+ "indexes": {
1066
+ "offers_obligation_id_idx": {
1067
+ "name": "offers_obligation_id_idx",
1068
+ "columns": [
1069
+ {
1070
+ "expression": "obligation_id",
1071
+ "isExpression": false,
1072
+ "asc": true,
1073
+ "nulls": "last"
1074
+ }
1075
+ ],
1076
+ "isUnique": false,
1077
+ "concurrently": false,
1078
+ "method": "btree",
1079
+ "with": {}
1080
+ },
1081
+ "offers_offering_idx": {
1082
+ "name": "offers_offering_idx",
1083
+ "columns": [
1084
+ {
1085
+ "expression": "offering",
1086
+ "isExpression": false,
1087
+ "asc": true,
1088
+ "nulls": "last"
1089
+ }
1090
+ ],
1091
+ "isUnique": false,
1092
+ "concurrently": false,
1093
+ "method": "btree",
1094
+ "with": {}
1095
+ },
1096
+ "offers_buy_idx": {
1097
+ "name": "offers_buy_idx",
1098
+ "columns": [
1099
+ {
1100
+ "expression": "buy",
1101
+ "isExpression": false,
1102
+ "asc": true,
1103
+ "nulls": "last"
1104
+ }
1105
+ ],
1106
+ "isUnique": false,
1107
+ "concurrently": false,
1108
+ "method": "btree",
1109
+ "with": {}
1110
+ },
1111
+ "offers_chain_id_idx": {
1112
+ "name": "offers_chain_id_idx",
1113
+ "columns": [
1114
+ {
1115
+ "expression": "chain_id",
1116
+ "isExpression": false,
1117
+ "asc": true,
1118
+ "nulls": "last"
1119
+ }
1120
+ ],
1121
+ "isUnique": false,
1122
+ "concurrently": false,
1123
+ "method": "btree",
1124
+ "with": {}
1125
+ },
1126
+ "offers_loan_token_idx": {
1127
+ "name": "offers_loan_token_idx",
1128
+ "columns": [
1129
+ {
1130
+ "expression": "loan_token",
1131
+ "isExpression": false,
1132
+ "asc": true,
1133
+ "nulls": "last"
1134
+ }
1135
+ ],
1136
+ "isUnique": false,
1137
+ "concurrently": false,
1138
+ "method": "btree",
1139
+ "with": {}
1140
+ },
1141
+ "offers_maturity_idx": {
1142
+ "name": "offers_maturity_idx",
1143
+ "columns": [
1144
+ {
1145
+ "expression": "maturity",
1146
+ "isExpression": false,
1147
+ "asc": true,
1148
+ "nulls": "last"
1149
+ }
1150
+ ],
1151
+ "isUnique": false,
1152
+ "concurrently": false,
1153
+ "method": "btree",
1154
+ "with": {}
1155
+ },
1156
+ "offers_expiry_idx": {
1157
+ "name": "offers_expiry_idx",
1158
+ "columns": [
1159
+ {
1160
+ "expression": "expiry",
1161
+ "isExpression": false,
1162
+ "asc": true,
1163
+ "nulls": "last"
1164
+ }
1165
+ ],
1166
+ "isUnique": false,
1167
+ "concurrently": false,
1168
+ "method": "btree",
1169
+ "with": {}
1170
+ },
1171
+ "offers_rate_idx": {
1172
+ "name": "offers_rate_idx",
1173
+ "columns": [
1174
+ {
1175
+ "expression": "rate",
1176
+ "isExpression": false,
1177
+ "asc": true,
1178
+ "nulls": "last"
1179
+ }
1180
+ ],
1181
+ "isUnique": false,
1182
+ "concurrently": false,
1183
+ "method": "btree",
1184
+ "with": {}
1185
+ },
1186
+ "offers_assets_idx": {
1187
+ "name": "offers_assets_idx",
1188
+ "columns": [
1189
+ {
1190
+ "expression": "assets",
1191
+ "isExpression": false,
1192
+ "asc": true,
1193
+ "nulls": "last"
1194
+ }
1195
+ ],
1196
+ "isUnique": false,
1197
+ "concurrently": false,
1198
+ "method": "btree",
1199
+ "with": {}
1200
+ },
1201
+ "offers_created_at_idx": {
1202
+ "name": "offers_created_at_idx",
1203
+ "columns": [
1204
+ {
1205
+ "expression": "created_at",
1206
+ "isExpression": false,
1207
+ "asc": true,
1208
+ "nulls": "last"
1209
+ }
1210
+ ],
1211
+ "isUnique": false,
1212
+ "concurrently": false,
1213
+ "method": "btree",
1214
+ "with": {}
1215
+ },
1216
+ "offers_block_number_idx": {
1217
+ "name": "offers_block_number_idx",
1218
+ "columns": [
1219
+ {
1220
+ "expression": "block_number",
1221
+ "isExpression": false,
1222
+ "asc": true,
1223
+ "nulls": "last"
1224
+ }
1225
+ ],
1226
+ "isUnique": false,
1227
+ "concurrently": false,
1228
+ "method": "btree",
1229
+ "with": {}
1230
+ },
1231
+ "offers_rate_hash_idx": {
1232
+ "name": "offers_rate_hash_idx",
1233
+ "columns": [
1234
+ {
1235
+ "expression": "rate",
1236
+ "isExpression": false,
1237
+ "asc": true,
1238
+ "nulls": "last"
1239
+ },
1240
+ {
1241
+ "expression": "hash",
1242
+ "isExpression": false,
1243
+ "asc": true,
1244
+ "nulls": "last"
1245
+ }
1246
+ ],
1247
+ "isUnique": false,
1248
+ "concurrently": false,
1249
+ "method": "btree",
1250
+ "with": {}
1251
+ },
1252
+ "offers_maturity_hash_idx": {
1253
+ "name": "offers_maturity_hash_idx",
1254
+ "columns": [
1255
+ {
1256
+ "expression": "maturity",
1257
+ "isExpression": false,
1258
+ "asc": true,
1259
+ "nulls": "last"
1260
+ },
1261
+ {
1262
+ "expression": "hash",
1263
+ "isExpression": false,
1264
+ "asc": true,
1265
+ "nulls": "last"
1266
+ }
1267
+ ],
1268
+ "isUnique": false,
1269
+ "concurrently": false,
1270
+ "method": "btree",
1271
+ "with": {}
1272
+ },
1273
+ "offers_expiry_hash_idx": {
1274
+ "name": "offers_expiry_hash_idx",
1275
+ "columns": [
1276
+ {
1277
+ "expression": "expiry",
1278
+ "isExpression": false,
1279
+ "asc": true,
1280
+ "nulls": "last"
1281
+ },
1282
+ {
1283
+ "expression": "hash",
1284
+ "isExpression": false,
1285
+ "asc": true,
1286
+ "nulls": "last"
1287
+ }
1288
+ ],
1289
+ "isUnique": false,
1290
+ "concurrently": false,
1291
+ "method": "btree",
1292
+ "with": {}
1293
+ },
1294
+ "offers_assets_hash_idx": {
1295
+ "name": "offers_assets_hash_idx",
1296
+ "columns": [
1297
+ {
1298
+ "expression": "assets",
1299
+ "isExpression": false,
1300
+ "asc": true,
1301
+ "nulls": "last"
1302
+ },
1303
+ {
1304
+ "expression": "hash",
1305
+ "isExpression": false,
1306
+ "asc": true,
1307
+ "nulls": "last"
1308
+ }
1309
+ ],
1310
+ "isUnique": false,
1311
+ "concurrently": false,
1312
+ "method": "btree",
1313
+ "with": {}
1314
+ },
1315
+ "offers_rate_created_at_assets_hash_idx": {
1316
+ "name": "offers_rate_created_at_assets_hash_idx",
1317
+ "columns": [
1318
+ {
1319
+ "expression": "rate",
1320
+ "isExpression": false,
1321
+ "asc": true,
1322
+ "nulls": "last"
1323
+ },
1324
+ {
1325
+ "expression": "\"created_at\" asc",
1326
+ "asc": true,
1327
+ "isExpression": true,
1328
+ "nulls": "last"
1329
+ },
1330
+ {
1331
+ "expression": "\"assets\" desc",
1332
+ "asc": true,
1333
+ "isExpression": true,
1334
+ "nulls": "last"
1335
+ },
1336
+ {
1337
+ "expression": "\"hash\" asc",
1338
+ "asc": true,
1339
+ "isExpression": true,
1340
+ "nulls": "last"
1341
+ }
1342
+ ],
1343
+ "isUnique": false,
1344
+ "concurrently": false,
1345
+ "method": "btree",
1346
+ "with": {}
1347
+ }
1348
+ },
1349
+ "foreignKeys": {
1350
+ "offers_obligation_id_obligations_obligation_id_fk": {
1351
+ "name": "offers_obligation_id_obligations_obligation_id_fk",
1352
+ "tableFrom": "offers",
1353
+ "tableTo": "obligations",
1354
+ "schemaTo": "router_v1.6",
1355
+ "columnsFrom": ["obligation_id"],
1356
+ "columnsTo": ["obligation_id"],
1357
+ "onDelete": "cascade",
1358
+ "onUpdate": "no action"
1359
+ }
1360
+ },
1361
+ "compositePrimaryKeys": {},
1362
+ "uniqueConstraints": {},
1363
+ "policies": {},
1364
+ "checkConstraints": {},
1365
+ "isRLSEnabled": false
1366
+ },
1367
+ "router_v1.6.offers_v2": {
1368
+ "name": "offers_v2",
1369
+ "schema": "router_v1.6",
1370
+ "columns": {
1371
+ "hash": {
1372
+ "name": "hash",
1373
+ "type": "varchar(66)",
1374
+ "primaryKey": true,
1375
+ "notNull": true
1376
+ },
1377
+ "obligation_id": {
1378
+ "name": "obligation_id",
1379
+ "type": "varchar(66)",
1380
+ "primaryKey": false,
1381
+ "notNull": true
1382
+ },
1383
+ "assets": {
1384
+ "name": "assets",
1385
+ "type": "numeric(78, 0)",
1386
+ "primaryKey": false,
1387
+ "notNull": true
1388
+ },
1389
+ "rate": {
1390
+ "name": "rate",
1391
+ "type": "numeric(78, 0)",
1392
+ "primaryKey": false,
1393
+ "notNull": true
1394
+ },
1395
+ "maturity": {
1396
+ "name": "maturity",
1397
+ "type": "integer",
1398
+ "primaryKey": false,
1399
+ "notNull": true
1400
+ },
1401
+ "expiry": {
1402
+ "name": "expiry",
1403
+ "type": "integer",
1404
+ "primaryKey": false,
1405
+ "notNull": true
1406
+ },
1407
+ "start": {
1408
+ "name": "start",
1409
+ "type": "integer",
1410
+ "primaryKey": false,
1411
+ "notNull": true
1412
+ },
1413
+ "group_chain_id": {
1414
+ "name": "group_chain_id",
1415
+ "type": "bigint",
1416
+ "primaryKey": false,
1417
+ "notNull": true
1418
+ },
1419
+ "group_maker": {
1420
+ "name": "group_maker",
1421
+ "type": "varchar(42)",
1422
+ "primaryKey": false,
1423
+ "notNull": true
1424
+ },
1425
+ "group_group": {
1426
+ "name": "group_group",
1427
+ "type": "varchar(66)",
1428
+ "primaryKey": false,
1429
+ "notNull": true
1430
+ },
1431
+ "nonce": {
1432
+ "name": "nonce",
1433
+ "type": "varchar(66)",
1434
+ "primaryKey": false,
1435
+ "notNull": true
1436
+ },
1437
+ "buy": {
1438
+ "name": "buy",
1439
+ "type": "boolean",
1440
+ "primaryKey": false,
1441
+ "notNull": true
1442
+ },
1443
+ "callback_address": {
1444
+ "name": "callback_address",
1445
+ "type": "varchar(42)",
1446
+ "primaryKey": false,
1447
+ "notNull": true
1448
+ },
1449
+ "callback_data": {
1450
+ "name": "callback_data",
1451
+ "type": "text",
1452
+ "primaryKey": false,
1453
+ "notNull": true
1454
+ },
1455
+ "block_number": {
1456
+ "name": "block_number",
1457
+ "type": "bigint",
1458
+ "primaryKey": false,
1459
+ "notNull": true
1460
+ },
1461
+ "updated_at": {
1462
+ "name": "updated_at",
1463
+ "type": "timestamp",
1464
+ "primaryKey": false,
1465
+ "notNull": true,
1466
+ "default": "now()"
1467
+ }
1468
+ },
1469
+ "indexes": {
1470
+ "offers_v2_group_fk_idx": {
1471
+ "name": "offers_v2_group_fk_idx",
1472
+ "columns": [
1473
+ {
1474
+ "expression": "group_chain_id",
1475
+ "isExpression": false,
1476
+ "asc": true,
1477
+ "nulls": "last"
1478
+ },
1479
+ {
1480
+ "expression": "group_maker",
1481
+ "isExpression": false,
1482
+ "asc": true,
1483
+ "nulls": "last"
1484
+ },
1485
+ {
1486
+ "expression": "group_group",
1487
+ "isExpression": false,
1488
+ "asc": true,
1489
+ "nulls": "last"
1490
+ }
1491
+ ],
1492
+ "isUnique": false,
1493
+ "concurrently": false,
1494
+ "method": "btree",
1495
+ "with": {}
1496
+ },
1497
+ "offers_v2_group_and_hash_idx": {
1498
+ "name": "offers_v2_group_and_hash_idx",
1499
+ "columns": [
1500
+ {
1501
+ "expression": "group_chain_id",
1502
+ "isExpression": false,
1503
+ "asc": true,
1504
+ "nulls": "last"
1505
+ },
1506
+ {
1507
+ "expression": "group_maker",
1508
+ "isExpression": false,
1509
+ "asc": true,
1510
+ "nulls": "last"
1511
+ },
1512
+ {
1513
+ "expression": "group_group",
1514
+ "isExpression": false,
1515
+ "asc": true,
1516
+ "nulls": "last"
1517
+ },
1518
+ {
1519
+ "expression": "hash",
1520
+ "isExpression": false,
1521
+ "asc": true,
1522
+ "nulls": "last"
1523
+ }
1524
+ ],
1525
+ "isUnique": false,
1526
+ "concurrently": false,
1527
+ "method": "btree",
1528
+ "with": {}
1529
+ },
1530
+ "offers_v2_group_winner_sell_side_idx": {
1531
+ "name": "offers_v2_group_winner_sell_side_idx",
1532
+ "columns": [
1533
+ {
1534
+ "expression": "group_chain_id",
1535
+ "isExpression": false,
1536
+ "asc": true,
1537
+ "nulls": "last"
1538
+ },
1539
+ {
1540
+ "expression": "group_maker",
1541
+ "isExpression": false,
1542
+ "asc": true,
1543
+ "nulls": "last"
1544
+ },
1545
+ {
1546
+ "expression": "group_group",
1547
+ "isExpression": false,
1548
+ "asc": true,
1549
+ "nulls": "last"
1550
+ },
1551
+ {
1552
+ "expression": "\"rate\" desc",
1553
+ "asc": true,
1554
+ "isExpression": true,
1555
+ "nulls": "last"
1556
+ },
1557
+ {
1558
+ "expression": "\"block_number\" asc",
1559
+ "asc": true,
1560
+ "isExpression": true,
1561
+ "nulls": "last"
1562
+ },
1563
+ {
1564
+ "expression": "\"assets\" desc",
1565
+ "asc": true,
1566
+ "isExpression": true,
1567
+ "nulls": "last"
1568
+ },
1569
+ {
1570
+ "expression": "\"hash\" asc",
1571
+ "asc": true,
1572
+ "isExpression": true,
1573
+ "nulls": "last"
1574
+ }
1575
+ ],
1576
+ "isUnique": false,
1577
+ "concurrently": false,
1578
+ "method": "btree",
1579
+ "with": {}
1580
+ },
1581
+ "offers_v2_group_winner_buy_side_idx": {
1582
+ "name": "offers_v2_group_winner_buy_side_idx",
1583
+ "columns": [
1584
+ {
1585
+ "expression": "group_chain_id",
1586
+ "isExpression": false,
1587
+ "asc": true,
1588
+ "nulls": "last"
1589
+ },
1590
+ {
1591
+ "expression": "group_maker",
1592
+ "isExpression": false,
1593
+ "asc": true,
1594
+ "nulls": "last"
1595
+ },
1596
+ {
1597
+ "expression": "group_group",
1598
+ "isExpression": false,
1599
+ "asc": true,
1600
+ "nulls": "last"
1601
+ },
1602
+ {
1603
+ "expression": "\"rate\" asc",
1604
+ "asc": true,
1605
+ "isExpression": true,
1606
+ "nulls": "last"
1607
+ },
1608
+ {
1609
+ "expression": "\"block_number\" asc",
1610
+ "asc": true,
1611
+ "isExpression": true,
1612
+ "nulls": "last"
1613
+ },
1614
+ {
1615
+ "expression": "\"assets\" desc",
1616
+ "asc": true,
1617
+ "isExpression": true,
1618
+ "nulls": "last"
1619
+ },
1620
+ {
1621
+ "expression": "\"hash\" asc",
1622
+ "asc": true,
1623
+ "isExpression": true,
1624
+ "nulls": "last"
1625
+ }
1626
+ ],
1627
+ "isUnique": false,
1628
+ "concurrently": false,
1629
+ "method": "btree",
1630
+ "with": {}
1631
+ },
1632
+ "offers_v2_obligation_id_side_idx": {
1633
+ "name": "offers_v2_obligation_id_side_idx",
1634
+ "columns": [
1635
+ {
1636
+ "expression": "obligation_id",
1637
+ "isExpression": false,
1638
+ "asc": true,
1639
+ "nulls": "last"
1640
+ },
1641
+ {
1642
+ "expression": "buy",
1643
+ "isExpression": false,
1644
+ "asc": true,
1645
+ "nulls": "last"
1646
+ }
1647
+ ],
1648
+ "isUnique": false,
1649
+ "concurrently": false,
1650
+ "method": "btree",
1651
+ "with": {}
1652
+ }
1653
+ },
1654
+ "foreignKeys": {
1655
+ "offers_v2_obligation_id_obligations_obligation_id_fk": {
1656
+ "name": "offers_v2_obligation_id_obligations_obligation_id_fk",
1657
+ "tableFrom": "offers_v2",
1658
+ "tableTo": "obligations",
1659
+ "schemaTo": "router_v1.6",
1660
+ "columnsFrom": ["obligation_id"],
1661
+ "columnsTo": ["obligation_id"],
1662
+ "onDelete": "cascade",
1663
+ "onUpdate": "no action"
1664
+ },
1665
+ "offers_v2_groups_fk": {
1666
+ "name": "offers_v2_groups_fk",
1667
+ "tableFrom": "offers_v2",
1668
+ "tableTo": "groups",
1669
+ "schemaTo": "router_v1.6",
1670
+ "columnsFrom": ["group_chain_id", "group_maker", "group_group"],
1671
+ "columnsTo": ["chain_id", "maker", "group"],
1672
+ "onDelete": "cascade",
1673
+ "onUpdate": "no action"
1674
+ }
1675
+ },
1676
+ "compositePrimaryKeys": {},
1677
+ "uniqueConstraints": {},
1678
+ "policies": {},
1679
+ "checkConstraints": {},
1680
+ "isRLSEnabled": false
1681
+ },
1682
+ "router_v1.6.oracles": {
1683
+ "name": "oracles",
1684
+ "schema": "router_v1.6",
1685
+ "columns": {
1686
+ "chain_id": {
1687
+ "name": "chain_id",
1688
+ "type": "bigint",
1689
+ "primaryKey": false,
1690
+ "notNull": true
1691
+ },
1692
+ "address": {
1693
+ "name": "address",
1694
+ "type": "varchar(42)",
1695
+ "primaryKey": false,
1696
+ "notNull": true
1697
+ },
1698
+ "block_number": {
1699
+ "name": "block_number",
1700
+ "type": "bigint",
1701
+ "primaryKey": false,
1702
+ "notNull": true
1703
+ },
1704
+ "updated_at": {
1705
+ "name": "updated_at",
1706
+ "type": "timestamp",
1707
+ "primaryKey": false,
1708
+ "notNull": true,
1709
+ "default": "now()"
1710
+ }
1711
+ },
1712
+ "indexes": {},
1713
+ "foreignKeys": {},
1714
+ "compositePrimaryKeys": {
1715
+ "oracles_pk": {
1716
+ "name": "oracles_pk",
1717
+ "columns": ["chain_id", "address"]
1718
+ }
1719
+ },
1720
+ "uniqueConstraints": {},
1721
+ "policies": {},
1722
+ "checkConstraints": {},
1723
+ "isRLSEnabled": false
1724
+ },
1725
+ "router_v1.6.status": {
1726
+ "name": "status",
1727
+ "schema": "router_v1.6",
1728
+ "columns": {
1729
+ "id": {
1730
+ "name": "id",
1731
+ "type": "serial",
1732
+ "primaryKey": true,
1733
+ "notNull": true
1734
+ },
1735
+ "code": {
1736
+ "name": "code",
1737
+ "type": "status_code",
1738
+ "typeSchema": "router_v1.6",
1739
+ "primaryKey": false,
1740
+ "notNull": false
1741
+ }
1742
+ },
1743
+ "indexes": {},
1744
+ "foreignKeys": {},
1745
+ "compositePrimaryKeys": {},
1746
+ "uniqueConstraints": {
1747
+ "status_code_unique": {
1748
+ "name": "status_code_unique",
1749
+ "nullsNotDistinct": false,
1750
+ "columns": ["code"]
1751
+ }
1752
+ },
1753
+ "policies": {},
1754
+ "checkConstraints": {},
1755
+ "isRLSEnabled": false
1756
+ }
1757
+ },
1758
+ "enums": {
1759
+ "router_v1.6.status_code": {
1760
+ "name": "status_code",
1761
+ "schema": "router_v1.6",
1762
+ "values": ["VALID", "NOT_ENOUGH_LIQUIDITY"]
1763
+ }
1764
+ },
1765
+ "schemas": {},
1766
+ "sequences": {},
1767
+ "roles": {},
1768
+ "policies": {},
1769
+ "views": {},
1770
+ "_meta": {
1771
+ "columns": {},
1772
+ "schemas": {},
1773
+ "tables": {}
1774
+ }
1775
+ }