@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,1752 @@
1
+ {
2
+ "id": "b79047f3-0ca5-4e5f-adec-6dc9bc3261cc",
3
+ "prevId": "8f0682ec-34c8-4b3b-9065-e61367f63703",
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
+ "with": {},
57
+ "method": "btree",
58
+ "concurrently": false
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
+ "with": {},
130
+ "method": "btree",
131
+ "concurrently": false
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
+ "isExpression": true,
214
+ "asc": true,
215
+ "nulls": "last"
216
+ }
217
+ ],
218
+ "isUnique": false,
219
+ "with": {},
220
+ "method": "btree",
221
+ "concurrently": false
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
+ "with": {},
304
+ "method": "btree",
305
+ "concurrently": false
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
+ "with": {},
319
+ "method": "btree",
320
+ "concurrently": false
321
+ }
322
+ },
323
+ "foreignKeys": {
324
+ "consumed_events_groups_fk": {
325
+ "name": "consumed_events_groups_fk",
326
+ "tableFrom": "consumed_events",
327
+ "columnsFrom": ["chain_id", "maker", "group"],
328
+ "tableTo": "groups",
329
+ "schemaTo": "router_v1.6",
330
+ "columnsTo": ["chain_id", "maker", "group"],
331
+ "onUpdate": "no action",
332
+ "onDelete": "cascade"
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
+ "with": {},
414
+ "method": "btree",
415
+ "concurrently": false
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
+ "with": {},
479
+ "method": "btree",
480
+ "concurrently": false
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
+ "with": {},
494
+ "method": "btree",
495
+ "concurrently": false
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
+ "columnsFrom": ["parent_pool_id"],
503
+ "tableTo": "liquidity_pools",
504
+ "schemaTo": "router_v1.6",
505
+ "columnsTo": ["id"],
506
+ "onUpdate": "no action",
507
+ "onDelete": "cascade"
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
+ "columnsFrom": ["child_pool_id"],
513
+ "tableTo": "liquidity_pools",
514
+ "schemaTo": "router_v1.6",
515
+ "columnsTo": ["id"],
516
+ "onUpdate": "no action",
517
+ "onDelete": "cascade"
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
+ "with": {},
611
+ "method": "btree",
612
+ "concurrently": false
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
+ "columnsFrom": ["obligation_id"],
620
+ "tableTo": "obligations",
621
+ "schemaTo": "router_v1.6",
622
+ "columnsTo": ["obligation_id"],
623
+ "onUpdate": "no action",
624
+ "onDelete": "cascade"
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
+ "with": {},
699
+ "method": "btree",
700
+ "concurrently": false
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
+ "with": {},
720
+ "method": "btree",
721
+ "concurrently": false
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
+ "columnsFrom": ["obligation_id"],
729
+ "tableTo": "obligations",
730
+ "schemaTo": "router_v1.6",
731
+ "columnsTo": ["obligation_id"],
732
+ "onUpdate": "no action",
733
+ "onDelete": "cascade"
734
+ },
735
+ "obligation_collaterals_v2_oracles_fk": {
736
+ "name": "obligation_collaterals_v2_oracles_fk",
737
+ "tableFrom": "obligation_collaterals_v2",
738
+ "columnsFrom": ["oracle_chain_id", "oracle_address"],
739
+ "tableTo": "oracles",
740
+ "schemaTo": "router_v1.6",
741
+ "columnsTo": ["chain_id", "address"],
742
+ "onUpdate": "no action",
743
+ "onDelete": "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
+ "with": {},
843
+ "method": "btree",
844
+ "concurrently": false
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
+ "columnsFrom": ["offer_hash"],
852
+ "tableTo": "offers",
853
+ "schemaTo": "router_v1.6",
854
+ "columnsTo": ["hash"],
855
+ "onUpdate": "no action",
856
+ "onDelete": "cascade"
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
+ "columnsFrom": ["pool_id"],
862
+ "tableTo": "liquidity_pools",
863
+ "schemaTo": "router_v1.6",
864
+ "columnsTo": ["id"],
865
+ "onUpdate": "no action",
866
+ "onDelete": "cascade"
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
+ "with": {},
929
+ "method": "btree",
930
+ "concurrently": false
931
+ }
932
+ },
933
+ "foreignKeys": {
934
+ "offer_status_offer_hash_offers_v2_hash_fk": {
935
+ "name": "offer_status_offer_hash_offers_v2_hash_fk",
936
+ "tableFrom": "offer_status",
937
+ "columnsFrom": ["offer_hash"],
938
+ "tableTo": "offers_v2",
939
+ "schemaTo": "router_v1.6",
940
+ "columnsTo": ["hash"],
941
+ "onUpdate": "no action",
942
+ "onDelete": "cascade"
943
+ },
944
+ "offer_status_status_id_status_id_fk": {
945
+ "name": "offer_status_status_id_status_id_fk",
946
+ "tableFrom": "offer_status",
947
+ "columnsFrom": ["status_id"],
948
+ "tableTo": "status",
949
+ "schemaTo": "router_v1.6",
950
+ "columnsTo": ["id"],
951
+ "onUpdate": "no action",
952
+ "onDelete": "cascade"
953
+ }
954
+ },
955
+ "compositePrimaryKeys": {},
956
+ "uniqueConstraints": {},
957
+ "policies": {},
958
+ "checkConstraints": {},
959
+ "isRLSEnabled": false
960
+ },
961
+ "router_v1.6.offers": {
962
+ "name": "offers",
963
+ "schema": "router_v1.6",
964
+ "columns": {
965
+ "hash": {
966
+ "name": "hash",
967
+ "type": "varchar(66)",
968
+ "primaryKey": true,
969
+ "notNull": true
970
+ },
971
+ "obligation_id": {
972
+ "name": "obligation_id",
973
+ "type": "varchar(66)",
974
+ "primaryKey": false,
975
+ "notNull": true
976
+ },
977
+ "offering": {
978
+ "name": "offering",
979
+ "type": "varchar(42)",
980
+ "primaryKey": false,
981
+ "notNull": true
982
+ },
983
+ "assets": {
984
+ "name": "assets",
985
+ "type": "numeric(78, 0)",
986
+ "primaryKey": false,
987
+ "notNull": true
988
+ },
989
+ "rate": {
990
+ "name": "rate",
991
+ "type": "bigint",
992
+ "primaryKey": false,
993
+ "notNull": true
994
+ },
995
+ "maturity": {
996
+ "name": "maturity",
997
+ "type": "integer",
998
+ "primaryKey": false,
999
+ "notNull": true
1000
+ },
1001
+ "expiry": {
1002
+ "name": "expiry",
1003
+ "type": "integer",
1004
+ "primaryKey": false,
1005
+ "notNull": true
1006
+ },
1007
+ "start": {
1008
+ "name": "start",
1009
+ "type": "integer",
1010
+ "primaryKey": false,
1011
+ "notNull": true
1012
+ },
1013
+ "nonce": {
1014
+ "name": "nonce",
1015
+ "type": "bigint",
1016
+ "primaryKey": false,
1017
+ "notNull": true
1018
+ },
1019
+ "buy": {
1020
+ "name": "buy",
1021
+ "type": "boolean",
1022
+ "primaryKey": false,
1023
+ "notNull": true
1024
+ },
1025
+ "chain_id": {
1026
+ "name": "chain_id",
1027
+ "type": "bigint",
1028
+ "primaryKey": false,
1029
+ "notNull": true
1030
+ },
1031
+ "loan_token": {
1032
+ "name": "loan_token",
1033
+ "type": "varchar(42)",
1034
+ "primaryKey": false,
1035
+ "notNull": true
1036
+ },
1037
+ "callback_address": {
1038
+ "name": "callback_address",
1039
+ "type": "varchar(42)",
1040
+ "primaryKey": false,
1041
+ "notNull": true
1042
+ },
1043
+ "callback_data": {
1044
+ "name": "callback_data",
1045
+ "type": "text",
1046
+ "primaryKey": false,
1047
+ "notNull": true
1048
+ },
1049
+ "callback_gas_limit": {
1050
+ "name": "callback_gas_limit",
1051
+ "type": "bigint",
1052
+ "primaryKey": false,
1053
+ "notNull": true
1054
+ },
1055
+ "signature": {
1056
+ "name": "signature",
1057
+ "type": "varchar(132)",
1058
+ "primaryKey": false,
1059
+ "notNull": false
1060
+ },
1061
+ "created_at": {
1062
+ "name": "created_at",
1063
+ "type": "timestamp",
1064
+ "primaryKey": false,
1065
+ "notNull": true,
1066
+ "default": "now()"
1067
+ },
1068
+ "block_number": {
1069
+ "name": "block_number",
1070
+ "type": "bigint",
1071
+ "primaryKey": false,
1072
+ "notNull": true
1073
+ }
1074
+ },
1075
+ "indexes": {
1076
+ "offers_obligation_id_idx": {
1077
+ "name": "offers_obligation_id_idx",
1078
+ "columns": [
1079
+ {
1080
+ "expression": "obligation_id",
1081
+ "isExpression": false,
1082
+ "asc": true,
1083
+ "nulls": "last"
1084
+ }
1085
+ ],
1086
+ "isUnique": false,
1087
+ "with": {},
1088
+ "method": "btree",
1089
+ "concurrently": false
1090
+ },
1091
+ "offers_offering_idx": {
1092
+ "name": "offers_offering_idx",
1093
+ "columns": [
1094
+ {
1095
+ "expression": "offering",
1096
+ "isExpression": false,
1097
+ "asc": true,
1098
+ "nulls": "last"
1099
+ }
1100
+ ],
1101
+ "isUnique": false,
1102
+ "with": {},
1103
+ "method": "btree",
1104
+ "concurrently": false
1105
+ },
1106
+ "offers_buy_idx": {
1107
+ "name": "offers_buy_idx",
1108
+ "columns": [
1109
+ {
1110
+ "expression": "buy",
1111
+ "isExpression": false,
1112
+ "asc": true,
1113
+ "nulls": "last"
1114
+ }
1115
+ ],
1116
+ "isUnique": false,
1117
+ "with": {},
1118
+ "method": "btree",
1119
+ "concurrently": false
1120
+ },
1121
+ "offers_chain_id_idx": {
1122
+ "name": "offers_chain_id_idx",
1123
+ "columns": [
1124
+ {
1125
+ "expression": "chain_id",
1126
+ "isExpression": false,
1127
+ "asc": true,
1128
+ "nulls": "last"
1129
+ }
1130
+ ],
1131
+ "isUnique": false,
1132
+ "with": {},
1133
+ "method": "btree",
1134
+ "concurrently": false
1135
+ },
1136
+ "offers_loan_token_idx": {
1137
+ "name": "offers_loan_token_idx",
1138
+ "columns": [
1139
+ {
1140
+ "expression": "loan_token",
1141
+ "isExpression": false,
1142
+ "asc": true,
1143
+ "nulls": "last"
1144
+ }
1145
+ ],
1146
+ "isUnique": false,
1147
+ "with": {},
1148
+ "method": "btree",
1149
+ "concurrently": false
1150
+ },
1151
+ "offers_maturity_idx": {
1152
+ "name": "offers_maturity_idx",
1153
+ "columns": [
1154
+ {
1155
+ "expression": "maturity",
1156
+ "isExpression": false,
1157
+ "asc": true,
1158
+ "nulls": "last"
1159
+ }
1160
+ ],
1161
+ "isUnique": false,
1162
+ "with": {},
1163
+ "method": "btree",
1164
+ "concurrently": false
1165
+ },
1166
+ "offers_expiry_idx": {
1167
+ "name": "offers_expiry_idx",
1168
+ "columns": [
1169
+ {
1170
+ "expression": "expiry",
1171
+ "isExpression": false,
1172
+ "asc": true,
1173
+ "nulls": "last"
1174
+ }
1175
+ ],
1176
+ "isUnique": false,
1177
+ "with": {},
1178
+ "method": "btree",
1179
+ "concurrently": false
1180
+ },
1181
+ "offers_rate_idx": {
1182
+ "name": "offers_rate_idx",
1183
+ "columns": [
1184
+ {
1185
+ "expression": "rate",
1186
+ "isExpression": false,
1187
+ "asc": true,
1188
+ "nulls": "last"
1189
+ }
1190
+ ],
1191
+ "isUnique": false,
1192
+ "with": {},
1193
+ "method": "btree",
1194
+ "concurrently": false
1195
+ },
1196
+ "offers_assets_idx": {
1197
+ "name": "offers_assets_idx",
1198
+ "columns": [
1199
+ {
1200
+ "expression": "assets",
1201
+ "isExpression": false,
1202
+ "asc": true,
1203
+ "nulls": "last"
1204
+ }
1205
+ ],
1206
+ "isUnique": false,
1207
+ "with": {},
1208
+ "method": "btree",
1209
+ "concurrently": false
1210
+ },
1211
+ "offers_created_at_idx": {
1212
+ "name": "offers_created_at_idx",
1213
+ "columns": [
1214
+ {
1215
+ "expression": "created_at",
1216
+ "isExpression": false,
1217
+ "asc": true,
1218
+ "nulls": "last"
1219
+ }
1220
+ ],
1221
+ "isUnique": false,
1222
+ "with": {},
1223
+ "method": "btree",
1224
+ "concurrently": false
1225
+ },
1226
+ "offers_block_number_idx": {
1227
+ "name": "offers_block_number_idx",
1228
+ "columns": [
1229
+ {
1230
+ "expression": "block_number",
1231
+ "isExpression": false,
1232
+ "asc": true,
1233
+ "nulls": "last"
1234
+ }
1235
+ ],
1236
+ "isUnique": false,
1237
+ "with": {},
1238
+ "method": "btree",
1239
+ "concurrently": false
1240
+ },
1241
+ "offers_rate_hash_idx": {
1242
+ "name": "offers_rate_hash_idx",
1243
+ "columns": [
1244
+ {
1245
+ "expression": "rate",
1246
+ "isExpression": false,
1247
+ "asc": true,
1248
+ "nulls": "last"
1249
+ },
1250
+ {
1251
+ "expression": "hash",
1252
+ "isExpression": false,
1253
+ "asc": true,
1254
+ "nulls": "last"
1255
+ }
1256
+ ],
1257
+ "isUnique": false,
1258
+ "with": {},
1259
+ "method": "btree",
1260
+ "concurrently": false
1261
+ },
1262
+ "offers_maturity_hash_idx": {
1263
+ "name": "offers_maturity_hash_idx",
1264
+ "columns": [
1265
+ {
1266
+ "expression": "maturity",
1267
+ "isExpression": false,
1268
+ "asc": true,
1269
+ "nulls": "last"
1270
+ },
1271
+ {
1272
+ "expression": "hash",
1273
+ "isExpression": false,
1274
+ "asc": true,
1275
+ "nulls": "last"
1276
+ }
1277
+ ],
1278
+ "isUnique": false,
1279
+ "with": {},
1280
+ "method": "btree",
1281
+ "concurrently": false
1282
+ },
1283
+ "offers_expiry_hash_idx": {
1284
+ "name": "offers_expiry_hash_idx",
1285
+ "columns": [
1286
+ {
1287
+ "expression": "expiry",
1288
+ "isExpression": false,
1289
+ "asc": true,
1290
+ "nulls": "last"
1291
+ },
1292
+ {
1293
+ "expression": "hash",
1294
+ "isExpression": false,
1295
+ "asc": true,
1296
+ "nulls": "last"
1297
+ }
1298
+ ],
1299
+ "isUnique": false,
1300
+ "with": {},
1301
+ "method": "btree",
1302
+ "concurrently": false
1303
+ },
1304
+ "offers_assets_hash_idx": {
1305
+ "name": "offers_assets_hash_idx",
1306
+ "columns": [
1307
+ {
1308
+ "expression": "assets",
1309
+ "isExpression": false,
1310
+ "asc": true,
1311
+ "nulls": "last"
1312
+ },
1313
+ {
1314
+ "expression": "hash",
1315
+ "isExpression": false,
1316
+ "asc": true,
1317
+ "nulls": "last"
1318
+ }
1319
+ ],
1320
+ "isUnique": false,
1321
+ "with": {},
1322
+ "method": "btree",
1323
+ "concurrently": false
1324
+ },
1325
+ "offers_rate_created_at_assets_hash_idx": {
1326
+ "name": "offers_rate_created_at_assets_hash_idx",
1327
+ "columns": [
1328
+ {
1329
+ "expression": "rate",
1330
+ "isExpression": false,
1331
+ "asc": true,
1332
+ "nulls": "last"
1333
+ },
1334
+ {
1335
+ "expression": "\"created_at\" asc",
1336
+ "isExpression": true,
1337
+ "asc": true,
1338
+ "nulls": "last"
1339
+ },
1340
+ {
1341
+ "expression": "\"assets\" desc",
1342
+ "isExpression": true,
1343
+ "asc": true,
1344
+ "nulls": "last"
1345
+ },
1346
+ {
1347
+ "expression": "\"hash\" asc",
1348
+ "isExpression": true,
1349
+ "asc": true,
1350
+ "nulls": "last"
1351
+ }
1352
+ ],
1353
+ "isUnique": false,
1354
+ "with": {},
1355
+ "method": "btree",
1356
+ "concurrently": false
1357
+ }
1358
+ },
1359
+ "foreignKeys": {
1360
+ "offers_obligation_id_obligations_obligation_id_fk": {
1361
+ "name": "offers_obligation_id_obligations_obligation_id_fk",
1362
+ "tableFrom": "offers",
1363
+ "columnsFrom": ["obligation_id"],
1364
+ "tableTo": "obligations",
1365
+ "schemaTo": "router_v1.6",
1366
+ "columnsTo": ["obligation_id"],
1367
+ "onUpdate": "no action",
1368
+ "onDelete": "cascade"
1369
+ }
1370
+ },
1371
+ "compositePrimaryKeys": {},
1372
+ "uniqueConstraints": {},
1373
+ "policies": {},
1374
+ "checkConstraints": {},
1375
+ "isRLSEnabled": false
1376
+ },
1377
+ "router_v1.6.offers_v2": {
1378
+ "name": "offers_v2",
1379
+ "schema": "router_v1.6",
1380
+ "columns": {
1381
+ "hash": {
1382
+ "name": "hash",
1383
+ "type": "varchar(66)",
1384
+ "primaryKey": true,
1385
+ "notNull": true
1386
+ },
1387
+ "obligation_id": {
1388
+ "name": "obligation_id",
1389
+ "type": "varchar(66)",
1390
+ "primaryKey": false,
1391
+ "notNull": true
1392
+ },
1393
+ "assets": {
1394
+ "name": "assets",
1395
+ "type": "numeric(78, 0)",
1396
+ "primaryKey": false,
1397
+ "notNull": true
1398
+ },
1399
+ "rate": {
1400
+ "name": "rate",
1401
+ "type": "numeric(78, 0)",
1402
+ "primaryKey": false,
1403
+ "notNull": true
1404
+ },
1405
+ "maturity": {
1406
+ "name": "maturity",
1407
+ "type": "integer",
1408
+ "primaryKey": false,
1409
+ "notNull": true
1410
+ },
1411
+ "expiry": {
1412
+ "name": "expiry",
1413
+ "type": "integer",
1414
+ "primaryKey": false,
1415
+ "notNull": true
1416
+ },
1417
+ "start": {
1418
+ "name": "start",
1419
+ "type": "integer",
1420
+ "primaryKey": false,
1421
+ "notNull": true
1422
+ },
1423
+ "group_chain_id": {
1424
+ "name": "group_chain_id",
1425
+ "type": "bigint",
1426
+ "primaryKey": false,
1427
+ "notNull": true
1428
+ },
1429
+ "group_maker": {
1430
+ "name": "group_maker",
1431
+ "type": "varchar(42)",
1432
+ "primaryKey": false,
1433
+ "notNull": true
1434
+ },
1435
+ "group_group": {
1436
+ "name": "group_group",
1437
+ "type": "varchar(66)",
1438
+ "primaryKey": false,
1439
+ "notNull": true
1440
+ },
1441
+ "nonce": {
1442
+ "name": "nonce",
1443
+ "type": "varchar(66)",
1444
+ "primaryKey": false,
1445
+ "notNull": true
1446
+ },
1447
+ "buy": {
1448
+ "name": "buy",
1449
+ "type": "boolean",
1450
+ "primaryKey": false,
1451
+ "notNull": true
1452
+ },
1453
+ "callback_address": {
1454
+ "name": "callback_address",
1455
+ "type": "varchar(42)",
1456
+ "primaryKey": false,
1457
+ "notNull": true
1458
+ },
1459
+ "callback_data": {
1460
+ "name": "callback_data",
1461
+ "type": "text",
1462
+ "primaryKey": false,
1463
+ "notNull": true
1464
+ },
1465
+ "block_number": {
1466
+ "name": "block_number",
1467
+ "type": "bigint",
1468
+ "primaryKey": false,
1469
+ "notNull": true
1470
+ },
1471
+ "updated_at": {
1472
+ "name": "updated_at",
1473
+ "type": "timestamp",
1474
+ "primaryKey": false,
1475
+ "notNull": true,
1476
+ "default": "now()"
1477
+ }
1478
+ },
1479
+ "indexes": {
1480
+ "offers_v2_group_fk_idx": {
1481
+ "name": "offers_v2_group_fk_idx",
1482
+ "columns": [
1483
+ {
1484
+ "expression": "group_chain_id",
1485
+ "isExpression": false,
1486
+ "asc": true,
1487
+ "nulls": "last"
1488
+ },
1489
+ {
1490
+ "expression": "group_maker",
1491
+ "isExpression": false,
1492
+ "asc": true,
1493
+ "nulls": "last"
1494
+ },
1495
+ {
1496
+ "expression": "group_group",
1497
+ "isExpression": false,
1498
+ "asc": true,
1499
+ "nulls": "last"
1500
+ }
1501
+ ],
1502
+ "isUnique": false,
1503
+ "with": {},
1504
+ "method": "btree",
1505
+ "concurrently": false
1506
+ },
1507
+ "offers_v2_group_winner_sell_side_idx": {
1508
+ "name": "offers_v2_group_winner_sell_side_idx",
1509
+ "columns": [
1510
+ {
1511
+ "expression": "group_chain_id",
1512
+ "isExpression": false,
1513
+ "asc": true,
1514
+ "nulls": "last"
1515
+ },
1516
+ {
1517
+ "expression": "group_maker",
1518
+ "isExpression": false,
1519
+ "asc": true,
1520
+ "nulls": "last"
1521
+ },
1522
+ {
1523
+ "expression": "group_group",
1524
+ "isExpression": false,
1525
+ "asc": true,
1526
+ "nulls": "last"
1527
+ },
1528
+ {
1529
+ "expression": "\"rate\" desc",
1530
+ "isExpression": true,
1531
+ "asc": true,
1532
+ "nulls": "last"
1533
+ },
1534
+ {
1535
+ "expression": "\"block_number\" asc",
1536
+ "isExpression": true,
1537
+ "asc": true,
1538
+ "nulls": "last"
1539
+ },
1540
+ {
1541
+ "expression": "\"assets\" desc",
1542
+ "isExpression": true,
1543
+ "asc": true,
1544
+ "nulls": "last"
1545
+ },
1546
+ {
1547
+ "expression": "\"hash\" asc",
1548
+ "isExpression": true,
1549
+ "asc": true,
1550
+ "nulls": "last"
1551
+ }
1552
+ ],
1553
+ "isUnique": false,
1554
+ "with": {},
1555
+ "method": "btree",
1556
+ "concurrently": false
1557
+ },
1558
+ "offers_v2_group_winner_buy_side_idx": {
1559
+ "name": "offers_v2_group_winner_buy_side_idx",
1560
+ "columns": [
1561
+ {
1562
+ "expression": "group_chain_id",
1563
+ "isExpression": false,
1564
+ "asc": true,
1565
+ "nulls": "last"
1566
+ },
1567
+ {
1568
+ "expression": "group_maker",
1569
+ "isExpression": false,
1570
+ "asc": true,
1571
+ "nulls": "last"
1572
+ },
1573
+ {
1574
+ "expression": "group_group",
1575
+ "isExpression": false,
1576
+ "asc": true,
1577
+ "nulls": "last"
1578
+ },
1579
+ {
1580
+ "expression": "\"rate\" asc",
1581
+ "isExpression": true,
1582
+ "asc": true,
1583
+ "nulls": "last"
1584
+ },
1585
+ {
1586
+ "expression": "\"block_number\" asc",
1587
+ "isExpression": true,
1588
+ "asc": true,
1589
+ "nulls": "last"
1590
+ },
1591
+ {
1592
+ "expression": "\"assets\" desc",
1593
+ "isExpression": true,
1594
+ "asc": true,
1595
+ "nulls": "last"
1596
+ },
1597
+ {
1598
+ "expression": "\"hash\" asc",
1599
+ "isExpression": true,
1600
+ "asc": true,
1601
+ "nulls": "last"
1602
+ }
1603
+ ],
1604
+ "isUnique": false,
1605
+ "with": {},
1606
+ "method": "btree",
1607
+ "concurrently": false
1608
+ },
1609
+ "offers_v2_obligation_id_side_idx": {
1610
+ "name": "offers_v2_obligation_id_side_idx",
1611
+ "columns": [
1612
+ {
1613
+ "expression": "obligation_id",
1614
+ "isExpression": false,
1615
+ "asc": true,
1616
+ "nulls": "last"
1617
+ },
1618
+ {
1619
+ "expression": "buy",
1620
+ "isExpression": false,
1621
+ "asc": true,
1622
+ "nulls": "last"
1623
+ }
1624
+ ],
1625
+ "isUnique": false,
1626
+ "with": {},
1627
+ "method": "btree",
1628
+ "concurrently": false
1629
+ }
1630
+ },
1631
+ "foreignKeys": {
1632
+ "offers_v2_obligation_id_obligations_obligation_id_fk": {
1633
+ "name": "offers_v2_obligation_id_obligations_obligation_id_fk",
1634
+ "tableFrom": "offers_v2",
1635
+ "columnsFrom": ["obligation_id"],
1636
+ "tableTo": "obligations",
1637
+ "schemaTo": "router_v1.6",
1638
+ "columnsTo": ["obligation_id"],
1639
+ "onUpdate": "no action",
1640
+ "onDelete": "cascade"
1641
+ },
1642
+ "offers_v2_groups_fk": {
1643
+ "name": "offers_v2_groups_fk",
1644
+ "tableFrom": "offers_v2",
1645
+ "columnsFrom": ["group_chain_id", "group_maker", "group_group"],
1646
+ "tableTo": "groups",
1647
+ "schemaTo": "router_v1.6",
1648
+ "columnsTo": ["chain_id", "maker", "group"],
1649
+ "onUpdate": "no action",
1650
+ "onDelete": "cascade"
1651
+ }
1652
+ },
1653
+ "compositePrimaryKeys": {},
1654
+ "uniqueConstraints": {},
1655
+ "policies": {},
1656
+ "checkConstraints": {},
1657
+ "isRLSEnabled": false
1658
+ },
1659
+ "router_v1.6.oracles": {
1660
+ "name": "oracles",
1661
+ "schema": "router_v1.6",
1662
+ "columns": {
1663
+ "chain_id": {
1664
+ "name": "chain_id",
1665
+ "type": "bigint",
1666
+ "primaryKey": false,
1667
+ "notNull": true
1668
+ },
1669
+ "address": {
1670
+ "name": "address",
1671
+ "type": "varchar(42)",
1672
+ "primaryKey": false,
1673
+ "notNull": true
1674
+ },
1675
+ "block_number": {
1676
+ "name": "block_number",
1677
+ "type": "bigint",
1678
+ "primaryKey": false,
1679
+ "notNull": true
1680
+ },
1681
+ "updated_at": {
1682
+ "name": "updated_at",
1683
+ "type": "timestamp",
1684
+ "primaryKey": false,
1685
+ "notNull": true,
1686
+ "default": "now()"
1687
+ }
1688
+ },
1689
+ "indexes": {},
1690
+ "foreignKeys": {},
1691
+ "compositePrimaryKeys": {
1692
+ "oracles_pk": {
1693
+ "name": "oracles_pk",
1694
+ "columns": ["chain_id", "address"]
1695
+ }
1696
+ },
1697
+ "uniqueConstraints": {},
1698
+ "policies": {},
1699
+ "checkConstraints": {},
1700
+ "isRLSEnabled": false
1701
+ },
1702
+ "router_v1.6.status": {
1703
+ "name": "status",
1704
+ "schema": "router_v1.6",
1705
+ "columns": {
1706
+ "id": {
1707
+ "name": "id",
1708
+ "type": "serial",
1709
+ "primaryKey": true,
1710
+ "notNull": true
1711
+ },
1712
+ "code": {
1713
+ "name": "code",
1714
+ "type": "status_code",
1715
+ "typeSchema": "router_v1.6",
1716
+ "primaryKey": false,
1717
+ "notNull": false
1718
+ }
1719
+ },
1720
+ "indexes": {},
1721
+ "foreignKeys": {},
1722
+ "compositePrimaryKeys": {},
1723
+ "uniqueConstraints": {
1724
+ "status_code_unique": {
1725
+ "name": "status_code_unique",
1726
+ "columns": ["code"],
1727
+ "nullsNotDistinct": false
1728
+ }
1729
+ },
1730
+ "policies": {},
1731
+ "checkConstraints": {},
1732
+ "isRLSEnabled": false
1733
+ }
1734
+ },
1735
+ "enums": {
1736
+ "router_v1.6.status_code": {
1737
+ "name": "status_code",
1738
+ "schema": "router_v1.6",
1739
+ "values": ["VALID", "NOT_ENOUGH_LIQUIDITY"]
1740
+ }
1741
+ },
1742
+ "schemas": {},
1743
+ "views": {},
1744
+ "sequences": {},
1745
+ "roles": {},
1746
+ "policies": {},
1747
+ "_meta": {
1748
+ "columns": {},
1749
+ "schemas": {},
1750
+ "tables": {}
1751
+ }
1752
+ }