@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,1569 @@
1
+ {
2
+ "id": "cbe54031-2a53-4a3e-ba28-064fd1dab7e9",
3
+ "prevId": "2711b2a7-fa21-472d-ac88-455b90d74bd1",
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.groups": {
232
+ "name": "groups",
233
+ "schema": "router_v1.5",
234
+ "columns": {
235
+ "chain_id": {
236
+ "name": "chain_id",
237
+ "type": "bigint",
238
+ "primaryKey": false,
239
+ "notNull": true
240
+ },
241
+ "maker": {
242
+ "name": "maker",
243
+ "type": "varchar(42)",
244
+ "primaryKey": false,
245
+ "notNull": true
246
+ },
247
+ "group": {
248
+ "name": "group",
249
+ "type": "varchar(66)",
250
+ "primaryKey": false,
251
+ "notNull": true
252
+ },
253
+ "consumed": {
254
+ "name": "consumed",
255
+ "type": "numeric(78, 0)",
256
+ "primaryKey": false,
257
+ "notNull": true
258
+ },
259
+ "block_number": {
260
+ "name": "block_number",
261
+ "type": "bigint",
262
+ "primaryKey": false,
263
+ "notNull": true
264
+ },
265
+ "updated_at": {
266
+ "name": "updated_at",
267
+ "type": "timestamp",
268
+ "primaryKey": false,
269
+ "notNull": true,
270
+ "default": "now()"
271
+ }
272
+ },
273
+ "indexes": {},
274
+ "foreignKeys": {},
275
+ "compositePrimaryKeys": {
276
+ "groups_pk": {
277
+ "name": "groups_pk",
278
+ "columns": ["chain_id", "maker", "group"]
279
+ }
280
+ },
281
+ "uniqueConstraints": {},
282
+ "policies": {},
283
+ "checkConstraints": {},
284
+ "isRLSEnabled": false
285
+ },
286
+ "router_v1.5.liquidity_links": {
287
+ "name": "liquidity_links",
288
+ "schema": "router_v1.5",
289
+ "columns": {
290
+ "parent_pool_id": {
291
+ "name": "parent_pool_id",
292
+ "type": "varchar(255)",
293
+ "primaryKey": false,
294
+ "notNull": true
295
+ },
296
+ "child_pool_id": {
297
+ "name": "child_pool_id",
298
+ "type": "varchar(255)",
299
+ "primaryKey": false,
300
+ "notNull": true
301
+ },
302
+ "priority": {
303
+ "name": "priority",
304
+ "type": "integer",
305
+ "primaryKey": false,
306
+ "notNull": true
307
+ },
308
+ "block_number": {
309
+ "name": "block_number",
310
+ "type": "bigint",
311
+ "primaryKey": false,
312
+ "notNull": true
313
+ },
314
+ "updated_at": {
315
+ "name": "updated_at",
316
+ "type": "timestamp",
317
+ "primaryKey": false,
318
+ "notNull": true,
319
+ "default": "now()"
320
+ }
321
+ },
322
+ "indexes": {
323
+ "liquidity_links_parent_pool_id_idx": {
324
+ "name": "liquidity_links_parent_pool_id_idx",
325
+ "columns": [
326
+ {
327
+ "expression": "parent_pool_id",
328
+ "isExpression": false,
329
+ "asc": true,
330
+ "nulls": "last"
331
+ }
332
+ ],
333
+ "isUnique": false,
334
+ "concurrently": false,
335
+ "method": "btree",
336
+ "with": {}
337
+ },
338
+ "liquidity_links_child_pool_id_idx": {
339
+ "name": "liquidity_links_child_pool_id_idx",
340
+ "columns": [
341
+ {
342
+ "expression": "child_pool_id",
343
+ "isExpression": false,
344
+ "asc": true,
345
+ "nulls": "last"
346
+ }
347
+ ],
348
+ "isUnique": false,
349
+ "concurrently": false,
350
+ "method": "btree",
351
+ "with": {}
352
+ }
353
+ },
354
+ "foreignKeys": {
355
+ "liquidity_links_parent_pool_id_liquidity_pools_id_fk": {
356
+ "name": "liquidity_links_parent_pool_id_liquidity_pools_id_fk",
357
+ "tableFrom": "liquidity_links",
358
+ "tableTo": "liquidity_pools",
359
+ "schemaTo": "router_v1.5",
360
+ "columnsFrom": ["parent_pool_id"],
361
+ "columnsTo": ["id"],
362
+ "onDelete": "cascade",
363
+ "onUpdate": "no action"
364
+ },
365
+ "liquidity_links_child_pool_id_liquidity_pools_id_fk": {
366
+ "name": "liquidity_links_child_pool_id_liquidity_pools_id_fk",
367
+ "tableFrom": "liquidity_links",
368
+ "tableTo": "liquidity_pools",
369
+ "schemaTo": "router_v1.5",
370
+ "columnsFrom": ["child_pool_id"],
371
+ "columnsTo": ["id"],
372
+ "onDelete": "cascade",
373
+ "onUpdate": "no action"
374
+ }
375
+ },
376
+ "compositePrimaryKeys": {
377
+ "liquidity_links_pk": {
378
+ "name": "liquidity_links_pk",
379
+ "columns": ["parent_pool_id", "priority"]
380
+ }
381
+ },
382
+ "uniqueConstraints": {},
383
+ "policies": {},
384
+ "checkConstraints": {},
385
+ "isRLSEnabled": false
386
+ },
387
+ "router_v1.5.liquidity_pools": {
388
+ "name": "liquidity_pools",
389
+ "schema": "router_v1.5",
390
+ "columns": {
391
+ "id": {
392
+ "name": "id",
393
+ "type": "varchar(255)",
394
+ "primaryKey": true,
395
+ "notNull": true
396
+ },
397
+ "amount": {
398
+ "name": "amount",
399
+ "type": "numeric(78, 0)",
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
+ "foreignKeys": {},
419
+ "compositePrimaryKeys": {},
420
+ "uniqueConstraints": {},
421
+ "policies": {},
422
+ "checkConstraints": {},
423
+ "isRLSEnabled": false
424
+ },
425
+ "router_v1.5.obligation_collaterals": {
426
+ "name": "obligation_collaterals",
427
+ "schema": "router_v1.5",
428
+ "columns": {
429
+ "obligation_id": {
430
+ "name": "obligation_id",
431
+ "type": "varchar(66)",
432
+ "primaryKey": false,
433
+ "notNull": true
434
+ },
435
+ "asset": {
436
+ "name": "asset",
437
+ "type": "varchar(42)",
438
+ "primaryKey": false,
439
+ "notNull": true
440
+ },
441
+ "oracle": {
442
+ "name": "oracle",
443
+ "type": "varchar(42)",
444
+ "primaryKey": false,
445
+ "notNull": true
446
+ },
447
+ "lltv": {
448
+ "name": "lltv",
449
+ "type": "bigint",
450
+ "primaryKey": false,
451
+ "notNull": true
452
+ }
453
+ },
454
+ "indexes": {
455
+ "obligation_collaterals_obligation_id_idx": {
456
+ "name": "obligation_collaterals_obligation_id_idx",
457
+ "columns": [
458
+ {
459
+ "expression": "obligation_id",
460
+ "isExpression": false,
461
+ "asc": true,
462
+ "nulls": "last"
463
+ }
464
+ ],
465
+ "isUnique": false,
466
+ "concurrently": false,
467
+ "method": "btree",
468
+ "with": {}
469
+ }
470
+ },
471
+ "foreignKeys": {
472
+ "obligation_collaterals_obligation_id_obligations_obligation_id_fk": {
473
+ "name": "obligation_collaterals_obligation_id_obligations_obligation_id_fk",
474
+ "tableFrom": "obligation_collaterals",
475
+ "tableTo": "obligations",
476
+ "schemaTo": "router_v1.5",
477
+ "columnsFrom": ["obligation_id"],
478
+ "columnsTo": ["obligation_id"],
479
+ "onDelete": "cascade",
480
+ "onUpdate": "no action"
481
+ }
482
+ },
483
+ "compositePrimaryKeys": {
484
+ "obligation_collaterals_pk": {
485
+ "name": "obligation_collaterals_pk",
486
+ "columns": ["obligation_id", "asset"]
487
+ }
488
+ },
489
+ "uniqueConstraints": {},
490
+ "policies": {},
491
+ "checkConstraints": {},
492
+ "isRLSEnabled": false
493
+ },
494
+ "router_v1.5.obligation_collaterals_v2": {
495
+ "name": "obligation_collaterals_v2",
496
+ "schema": "router_v1.5",
497
+ "columns": {
498
+ "obligation_id": {
499
+ "name": "obligation_id",
500
+ "type": "varchar(66)",
501
+ "primaryKey": false,
502
+ "notNull": true
503
+ },
504
+ "asset": {
505
+ "name": "asset",
506
+ "type": "varchar(42)",
507
+ "primaryKey": false,
508
+ "notNull": true
509
+ },
510
+ "oracle_chain_id": {
511
+ "name": "oracle_chain_id",
512
+ "type": "bigint",
513
+ "primaryKey": false,
514
+ "notNull": true
515
+ },
516
+ "oracle_address": {
517
+ "name": "oracle_address",
518
+ "type": "varchar(42)",
519
+ "primaryKey": false,
520
+ "notNull": true
521
+ },
522
+ "lltv": {
523
+ "name": "lltv",
524
+ "type": "bigint",
525
+ "primaryKey": false,
526
+ "notNull": true
527
+ },
528
+ "block_number": {
529
+ "name": "block_number",
530
+ "type": "bigint",
531
+ "primaryKey": false,
532
+ "notNull": true
533
+ },
534
+ "updated_at": {
535
+ "name": "updated_at",
536
+ "type": "timestamp",
537
+ "primaryKey": false,
538
+ "notNull": true,
539
+ "default": "now()"
540
+ }
541
+ },
542
+ "indexes": {
543
+ "obligation_collaterals_v2_obligation_id_idx": {
544
+ "name": "obligation_collaterals_v2_obligation_id_idx",
545
+ "columns": [
546
+ {
547
+ "expression": "obligation_id",
548
+ "isExpression": false,
549
+ "asc": true,
550
+ "nulls": "last"
551
+ }
552
+ ],
553
+ "isUnique": false,
554
+ "concurrently": false,
555
+ "method": "btree",
556
+ "with": {}
557
+ },
558
+ "obligation_collaterals_v2_oracle_fk_idx": {
559
+ "name": "obligation_collaterals_v2_oracle_fk_idx",
560
+ "columns": [
561
+ {
562
+ "expression": "oracle_chain_id",
563
+ "isExpression": false,
564
+ "asc": true,
565
+ "nulls": "last"
566
+ },
567
+ {
568
+ "expression": "oracle_address",
569
+ "isExpression": false,
570
+ "asc": true,
571
+ "nulls": "last"
572
+ }
573
+ ],
574
+ "isUnique": false,
575
+ "concurrently": false,
576
+ "method": "btree",
577
+ "with": {}
578
+ }
579
+ },
580
+ "foreignKeys": {
581
+ "obligation_collaterals_v2_obligation_id_obligations_obligation_id_fk": {
582
+ "name": "obligation_collaterals_v2_obligation_id_obligations_obligation_id_fk",
583
+ "tableFrom": "obligation_collaterals_v2",
584
+ "tableTo": "obligations",
585
+ "schemaTo": "router_v1.5",
586
+ "columnsFrom": ["obligation_id"],
587
+ "columnsTo": ["obligation_id"],
588
+ "onDelete": "cascade",
589
+ "onUpdate": "no action"
590
+ },
591
+ "obligation_collaterals_v2_oracles_fk": {
592
+ "name": "obligation_collaterals_v2_oracles_fk",
593
+ "tableFrom": "obligation_collaterals_v2",
594
+ "tableTo": "oracles",
595
+ "schemaTo": "router_v1.5",
596
+ "columnsFrom": ["oracle_chain_id", "oracle_address"],
597
+ "columnsTo": ["chain_id", "address"],
598
+ "onDelete": "no action",
599
+ "onUpdate": "no action"
600
+ }
601
+ },
602
+ "compositePrimaryKeys": {
603
+ "obligation_collaterals_v2_pk": {
604
+ "name": "obligation_collaterals_v2_pk",
605
+ "columns": ["obligation_id", "asset"]
606
+ }
607
+ },
608
+ "uniqueConstraints": {},
609
+ "policies": {},
610
+ "checkConstraints": {},
611
+ "isRLSEnabled": false
612
+ },
613
+ "router_v1.5.obligations": {
614
+ "name": "obligations",
615
+ "schema": "router_v1.5",
616
+ "columns": {
617
+ "obligation_id": {
618
+ "name": "obligation_id",
619
+ "type": "varchar(66)",
620
+ "primaryKey": true,
621
+ "notNull": true
622
+ },
623
+ "chain_id": {
624
+ "name": "chain_id",
625
+ "type": "bigint",
626
+ "primaryKey": false,
627
+ "notNull": true
628
+ },
629
+ "loan_token": {
630
+ "name": "loan_token",
631
+ "type": "varchar(42)",
632
+ "primaryKey": false,
633
+ "notNull": true
634
+ },
635
+ "maturity": {
636
+ "name": "maturity",
637
+ "type": "integer",
638
+ "primaryKey": false,
639
+ "notNull": true
640
+ }
641
+ },
642
+ "indexes": {},
643
+ "foreignKeys": {},
644
+ "compositePrimaryKeys": {},
645
+ "uniqueConstraints": {},
646
+ "policies": {},
647
+ "checkConstraints": {},
648
+ "isRLSEnabled": false
649
+ },
650
+ "router_v1.5.offer_liquidity_pools": {
651
+ "name": "offer_liquidity_pools",
652
+ "schema": "router_v1.5",
653
+ "columns": {
654
+ "offer_hash": {
655
+ "name": "offer_hash",
656
+ "type": "varchar(66)",
657
+ "primaryKey": false,
658
+ "notNull": true
659
+ },
660
+ "pool_id": {
661
+ "name": "pool_id",
662
+ "type": "varchar(255)",
663
+ "primaryKey": false,
664
+ "notNull": true
665
+ },
666
+ "amount": {
667
+ "name": "amount",
668
+ "type": "numeric(78, 0)",
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
+ "offer_liquidity_pools_pool_id_idx": {
688
+ "name": "offer_liquidity_pools_pool_id_idx",
689
+ "columns": [
690
+ {
691
+ "expression": "pool_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
+ },
703
+ "foreignKeys": {
704
+ "offer_liquidity_pools_offer_hash_offers_hash_fk": {
705
+ "name": "offer_liquidity_pools_offer_hash_offers_hash_fk",
706
+ "tableFrom": "offer_liquidity_pools",
707
+ "tableTo": "offers",
708
+ "schemaTo": "router_v1.5",
709
+ "columnsFrom": ["offer_hash"],
710
+ "columnsTo": ["hash"],
711
+ "onDelete": "cascade",
712
+ "onUpdate": "no action"
713
+ },
714
+ "offer_liquidity_pools_pool_id_liquidity_pools_id_fk": {
715
+ "name": "offer_liquidity_pools_pool_id_liquidity_pools_id_fk",
716
+ "tableFrom": "offer_liquidity_pools",
717
+ "tableTo": "liquidity_pools",
718
+ "schemaTo": "router_v1.5",
719
+ "columnsFrom": ["pool_id"],
720
+ "columnsTo": ["id"],
721
+ "onDelete": "cascade",
722
+ "onUpdate": "no action"
723
+ }
724
+ },
725
+ "compositePrimaryKeys": {
726
+ "offer_liquidity_pools_pk": {
727
+ "name": "offer_liquidity_pools_pk",
728
+ "columns": ["offer_hash", "pool_id"]
729
+ }
730
+ },
731
+ "uniqueConstraints": {},
732
+ "policies": {},
733
+ "checkConstraints": {},
734
+ "isRLSEnabled": false
735
+ },
736
+ "router_v1.5.offer_status": {
737
+ "name": "offer_status",
738
+ "schema": "router_v1.5",
739
+ "columns": {
740
+ "offer_hash": {
741
+ "name": "offer_hash",
742
+ "type": "varchar(66)",
743
+ "primaryKey": true,
744
+ "notNull": true
745
+ },
746
+ "status_id": {
747
+ "name": "status_id",
748
+ "type": "serial",
749
+ "primaryKey": false,
750
+ "notNull": true
751
+ },
752
+ "block_number": {
753
+ "name": "block_number",
754
+ "type": "bigint",
755
+ "primaryKey": false,
756
+ "notNull": true
757
+ },
758
+ "updated_at": {
759
+ "name": "updated_at",
760
+ "type": "timestamp",
761
+ "primaryKey": false,
762
+ "notNull": true,
763
+ "default": "now()"
764
+ }
765
+ },
766
+ "indexes": {
767
+ "offer_status_status_hash_idx": {
768
+ "name": "offer_status_status_hash_idx",
769
+ "columns": [
770
+ {
771
+ "expression": "status_id",
772
+ "isExpression": false,
773
+ "asc": true,
774
+ "nulls": "last"
775
+ },
776
+ {
777
+ "expression": "offer_hash",
778
+ "isExpression": false,
779
+ "asc": true,
780
+ "nulls": "last"
781
+ }
782
+ ],
783
+ "isUnique": false,
784
+ "concurrently": false,
785
+ "method": "btree",
786
+ "with": {}
787
+ }
788
+ },
789
+ "foreignKeys": {
790
+ "offer_status_offer_hash_offers_v2_hash_fk": {
791
+ "name": "offer_status_offer_hash_offers_v2_hash_fk",
792
+ "tableFrom": "offer_status",
793
+ "tableTo": "offers_v2",
794
+ "schemaTo": "router_v1.5",
795
+ "columnsFrom": ["offer_hash"],
796
+ "columnsTo": ["hash"],
797
+ "onDelete": "cascade",
798
+ "onUpdate": "no action"
799
+ },
800
+ "offer_status_status_id_status_id_fk": {
801
+ "name": "offer_status_status_id_status_id_fk",
802
+ "tableFrom": "offer_status",
803
+ "tableTo": "status",
804
+ "schemaTo": "router_v1.5",
805
+ "columnsFrom": ["status_id"],
806
+ "columnsTo": ["id"],
807
+ "onDelete": "cascade",
808
+ "onUpdate": "no action"
809
+ }
810
+ },
811
+ "compositePrimaryKeys": {},
812
+ "uniqueConstraints": {},
813
+ "policies": {},
814
+ "checkConstraints": {},
815
+ "isRLSEnabled": false
816
+ },
817
+ "router_v1.5.offers": {
818
+ "name": "offers",
819
+ "schema": "router_v1.5",
820
+ "columns": {
821
+ "hash": {
822
+ "name": "hash",
823
+ "type": "varchar(66)",
824
+ "primaryKey": true,
825
+ "notNull": true
826
+ },
827
+ "obligation_id": {
828
+ "name": "obligation_id",
829
+ "type": "varchar(66)",
830
+ "primaryKey": false,
831
+ "notNull": true
832
+ },
833
+ "offering": {
834
+ "name": "offering",
835
+ "type": "varchar(42)",
836
+ "primaryKey": false,
837
+ "notNull": true
838
+ },
839
+ "assets": {
840
+ "name": "assets",
841
+ "type": "numeric(78, 0)",
842
+ "primaryKey": false,
843
+ "notNull": true
844
+ },
845
+ "rate": {
846
+ "name": "rate",
847
+ "type": "bigint",
848
+ "primaryKey": false,
849
+ "notNull": true
850
+ },
851
+ "maturity": {
852
+ "name": "maturity",
853
+ "type": "integer",
854
+ "primaryKey": false,
855
+ "notNull": true
856
+ },
857
+ "expiry": {
858
+ "name": "expiry",
859
+ "type": "integer",
860
+ "primaryKey": false,
861
+ "notNull": true
862
+ },
863
+ "start": {
864
+ "name": "start",
865
+ "type": "integer",
866
+ "primaryKey": false,
867
+ "notNull": true
868
+ },
869
+ "nonce": {
870
+ "name": "nonce",
871
+ "type": "bigint",
872
+ "primaryKey": false,
873
+ "notNull": true
874
+ },
875
+ "buy": {
876
+ "name": "buy",
877
+ "type": "boolean",
878
+ "primaryKey": false,
879
+ "notNull": true
880
+ },
881
+ "chain_id": {
882
+ "name": "chain_id",
883
+ "type": "bigint",
884
+ "primaryKey": false,
885
+ "notNull": true
886
+ },
887
+ "loan_token": {
888
+ "name": "loan_token",
889
+ "type": "varchar(42)",
890
+ "primaryKey": false,
891
+ "notNull": true
892
+ },
893
+ "callback_address": {
894
+ "name": "callback_address",
895
+ "type": "varchar(42)",
896
+ "primaryKey": false,
897
+ "notNull": true
898
+ },
899
+ "callback_data": {
900
+ "name": "callback_data",
901
+ "type": "text",
902
+ "primaryKey": false,
903
+ "notNull": true
904
+ },
905
+ "callback_gas_limit": {
906
+ "name": "callback_gas_limit",
907
+ "type": "bigint",
908
+ "primaryKey": false,
909
+ "notNull": true
910
+ },
911
+ "signature": {
912
+ "name": "signature",
913
+ "type": "varchar(132)",
914
+ "primaryKey": false,
915
+ "notNull": false
916
+ },
917
+ "created_at": {
918
+ "name": "created_at",
919
+ "type": "timestamp",
920
+ "primaryKey": false,
921
+ "notNull": true,
922
+ "default": "now()"
923
+ },
924
+ "block_number": {
925
+ "name": "block_number",
926
+ "type": "bigint",
927
+ "primaryKey": false,
928
+ "notNull": true
929
+ }
930
+ },
931
+ "indexes": {
932
+ "offers_obligation_id_idx": {
933
+ "name": "offers_obligation_id_idx",
934
+ "columns": [
935
+ {
936
+ "expression": "obligation_id",
937
+ "isExpression": false,
938
+ "asc": true,
939
+ "nulls": "last"
940
+ }
941
+ ],
942
+ "isUnique": false,
943
+ "concurrently": false,
944
+ "method": "btree",
945
+ "with": {}
946
+ },
947
+ "offers_offering_idx": {
948
+ "name": "offers_offering_idx",
949
+ "columns": [
950
+ {
951
+ "expression": "offering",
952
+ "isExpression": false,
953
+ "asc": true,
954
+ "nulls": "last"
955
+ }
956
+ ],
957
+ "isUnique": false,
958
+ "concurrently": false,
959
+ "method": "btree",
960
+ "with": {}
961
+ },
962
+ "offers_buy_idx": {
963
+ "name": "offers_buy_idx",
964
+ "columns": [
965
+ {
966
+ "expression": "buy",
967
+ "isExpression": false,
968
+ "asc": true,
969
+ "nulls": "last"
970
+ }
971
+ ],
972
+ "isUnique": false,
973
+ "concurrently": false,
974
+ "method": "btree",
975
+ "with": {}
976
+ },
977
+ "offers_chain_id_idx": {
978
+ "name": "offers_chain_id_idx",
979
+ "columns": [
980
+ {
981
+ "expression": "chain_id",
982
+ "isExpression": false,
983
+ "asc": true,
984
+ "nulls": "last"
985
+ }
986
+ ],
987
+ "isUnique": false,
988
+ "concurrently": false,
989
+ "method": "btree",
990
+ "with": {}
991
+ },
992
+ "offers_loan_token_idx": {
993
+ "name": "offers_loan_token_idx",
994
+ "columns": [
995
+ {
996
+ "expression": "loan_token",
997
+ "isExpression": false,
998
+ "asc": true,
999
+ "nulls": "last"
1000
+ }
1001
+ ],
1002
+ "isUnique": false,
1003
+ "concurrently": false,
1004
+ "method": "btree",
1005
+ "with": {}
1006
+ },
1007
+ "offers_maturity_idx": {
1008
+ "name": "offers_maturity_idx",
1009
+ "columns": [
1010
+ {
1011
+ "expression": "maturity",
1012
+ "isExpression": false,
1013
+ "asc": true,
1014
+ "nulls": "last"
1015
+ }
1016
+ ],
1017
+ "isUnique": false,
1018
+ "concurrently": false,
1019
+ "method": "btree",
1020
+ "with": {}
1021
+ },
1022
+ "offers_expiry_idx": {
1023
+ "name": "offers_expiry_idx",
1024
+ "columns": [
1025
+ {
1026
+ "expression": "expiry",
1027
+ "isExpression": false,
1028
+ "asc": true,
1029
+ "nulls": "last"
1030
+ }
1031
+ ],
1032
+ "isUnique": false,
1033
+ "concurrently": false,
1034
+ "method": "btree",
1035
+ "with": {}
1036
+ },
1037
+ "offers_rate_idx": {
1038
+ "name": "offers_rate_idx",
1039
+ "columns": [
1040
+ {
1041
+ "expression": "rate",
1042
+ "isExpression": false,
1043
+ "asc": true,
1044
+ "nulls": "last"
1045
+ }
1046
+ ],
1047
+ "isUnique": false,
1048
+ "concurrently": false,
1049
+ "method": "btree",
1050
+ "with": {}
1051
+ },
1052
+ "offers_assets_idx": {
1053
+ "name": "offers_assets_idx",
1054
+ "columns": [
1055
+ {
1056
+ "expression": "assets",
1057
+ "isExpression": false,
1058
+ "asc": true,
1059
+ "nulls": "last"
1060
+ }
1061
+ ],
1062
+ "isUnique": false,
1063
+ "concurrently": false,
1064
+ "method": "btree",
1065
+ "with": {}
1066
+ },
1067
+ "offers_created_at_idx": {
1068
+ "name": "offers_created_at_idx",
1069
+ "columns": [
1070
+ {
1071
+ "expression": "created_at",
1072
+ "isExpression": false,
1073
+ "asc": true,
1074
+ "nulls": "last"
1075
+ }
1076
+ ],
1077
+ "isUnique": false,
1078
+ "concurrently": false,
1079
+ "method": "btree",
1080
+ "with": {}
1081
+ },
1082
+ "offers_block_number_idx": {
1083
+ "name": "offers_block_number_idx",
1084
+ "columns": [
1085
+ {
1086
+ "expression": "block_number",
1087
+ "isExpression": false,
1088
+ "asc": true,
1089
+ "nulls": "last"
1090
+ }
1091
+ ],
1092
+ "isUnique": false,
1093
+ "concurrently": false,
1094
+ "method": "btree",
1095
+ "with": {}
1096
+ },
1097
+ "offers_rate_hash_idx": {
1098
+ "name": "offers_rate_hash_idx",
1099
+ "columns": [
1100
+ {
1101
+ "expression": "rate",
1102
+ "isExpression": false,
1103
+ "asc": true,
1104
+ "nulls": "last"
1105
+ },
1106
+ {
1107
+ "expression": "hash",
1108
+ "isExpression": false,
1109
+ "asc": true,
1110
+ "nulls": "last"
1111
+ }
1112
+ ],
1113
+ "isUnique": false,
1114
+ "concurrently": false,
1115
+ "method": "btree",
1116
+ "with": {}
1117
+ },
1118
+ "offers_maturity_hash_idx": {
1119
+ "name": "offers_maturity_hash_idx",
1120
+ "columns": [
1121
+ {
1122
+ "expression": "maturity",
1123
+ "isExpression": false,
1124
+ "asc": true,
1125
+ "nulls": "last"
1126
+ },
1127
+ {
1128
+ "expression": "hash",
1129
+ "isExpression": false,
1130
+ "asc": true,
1131
+ "nulls": "last"
1132
+ }
1133
+ ],
1134
+ "isUnique": false,
1135
+ "concurrently": false,
1136
+ "method": "btree",
1137
+ "with": {}
1138
+ },
1139
+ "offers_expiry_hash_idx": {
1140
+ "name": "offers_expiry_hash_idx",
1141
+ "columns": [
1142
+ {
1143
+ "expression": "expiry",
1144
+ "isExpression": false,
1145
+ "asc": true,
1146
+ "nulls": "last"
1147
+ },
1148
+ {
1149
+ "expression": "hash",
1150
+ "isExpression": false,
1151
+ "asc": true,
1152
+ "nulls": "last"
1153
+ }
1154
+ ],
1155
+ "isUnique": false,
1156
+ "concurrently": false,
1157
+ "method": "btree",
1158
+ "with": {}
1159
+ },
1160
+ "offers_assets_hash_idx": {
1161
+ "name": "offers_assets_hash_idx",
1162
+ "columns": [
1163
+ {
1164
+ "expression": "assets",
1165
+ "isExpression": false,
1166
+ "asc": true,
1167
+ "nulls": "last"
1168
+ },
1169
+ {
1170
+ "expression": "hash",
1171
+ "isExpression": false,
1172
+ "asc": true,
1173
+ "nulls": "last"
1174
+ }
1175
+ ],
1176
+ "isUnique": false,
1177
+ "concurrently": false,
1178
+ "method": "btree",
1179
+ "with": {}
1180
+ },
1181
+ "offers_rate_created_at_assets_hash_idx": {
1182
+ "name": "offers_rate_created_at_assets_hash_idx",
1183
+ "columns": [
1184
+ {
1185
+ "expression": "rate",
1186
+ "isExpression": false,
1187
+ "asc": true,
1188
+ "nulls": "last"
1189
+ },
1190
+ {
1191
+ "expression": "\"created_at\" asc",
1192
+ "asc": true,
1193
+ "isExpression": true,
1194
+ "nulls": "last"
1195
+ },
1196
+ {
1197
+ "expression": "\"assets\" desc",
1198
+ "asc": true,
1199
+ "isExpression": true,
1200
+ "nulls": "last"
1201
+ },
1202
+ {
1203
+ "expression": "\"hash\" asc",
1204
+ "asc": true,
1205
+ "isExpression": true,
1206
+ "nulls": "last"
1207
+ }
1208
+ ],
1209
+ "isUnique": false,
1210
+ "concurrently": false,
1211
+ "method": "btree",
1212
+ "with": {}
1213
+ }
1214
+ },
1215
+ "foreignKeys": {
1216
+ "offers_obligation_id_obligations_obligation_id_fk": {
1217
+ "name": "offers_obligation_id_obligations_obligation_id_fk",
1218
+ "tableFrom": "offers",
1219
+ "tableTo": "obligations",
1220
+ "schemaTo": "router_v1.5",
1221
+ "columnsFrom": ["obligation_id"],
1222
+ "columnsTo": ["obligation_id"],
1223
+ "onDelete": "cascade",
1224
+ "onUpdate": "no action"
1225
+ }
1226
+ },
1227
+ "compositePrimaryKeys": {},
1228
+ "uniqueConstraints": {},
1229
+ "policies": {},
1230
+ "checkConstraints": {},
1231
+ "isRLSEnabled": false
1232
+ },
1233
+ "router_v1.5.offers_v2": {
1234
+ "name": "offers_v2",
1235
+ "schema": "router_v1.5",
1236
+ "columns": {
1237
+ "hash": {
1238
+ "name": "hash",
1239
+ "type": "varchar(66)",
1240
+ "primaryKey": true,
1241
+ "notNull": true
1242
+ },
1243
+ "obligation_id": {
1244
+ "name": "obligation_id",
1245
+ "type": "varchar(66)",
1246
+ "primaryKey": false,
1247
+ "notNull": true
1248
+ },
1249
+ "assets": {
1250
+ "name": "assets",
1251
+ "type": "numeric(78, 0)",
1252
+ "primaryKey": false,
1253
+ "notNull": true
1254
+ },
1255
+ "rate": {
1256
+ "name": "rate",
1257
+ "type": "numeric(78, 0)",
1258
+ "primaryKey": false,
1259
+ "notNull": true
1260
+ },
1261
+ "maturity": {
1262
+ "name": "maturity",
1263
+ "type": "integer",
1264
+ "primaryKey": false,
1265
+ "notNull": true
1266
+ },
1267
+ "expiry": {
1268
+ "name": "expiry",
1269
+ "type": "integer",
1270
+ "primaryKey": false,
1271
+ "notNull": true
1272
+ },
1273
+ "start": {
1274
+ "name": "start",
1275
+ "type": "integer",
1276
+ "primaryKey": false,
1277
+ "notNull": true
1278
+ },
1279
+ "group_chain_id": {
1280
+ "name": "group_chain_id",
1281
+ "type": "bigint",
1282
+ "primaryKey": false,
1283
+ "notNull": true
1284
+ },
1285
+ "group_maker": {
1286
+ "name": "group_maker",
1287
+ "type": "varchar(42)",
1288
+ "primaryKey": false,
1289
+ "notNull": true
1290
+ },
1291
+ "group_group": {
1292
+ "name": "group_group",
1293
+ "type": "varchar(66)",
1294
+ "primaryKey": false,
1295
+ "notNull": true
1296
+ },
1297
+ "nonce": {
1298
+ "name": "nonce",
1299
+ "type": "varchar(66)",
1300
+ "primaryKey": false,
1301
+ "notNull": true
1302
+ },
1303
+ "buy": {
1304
+ "name": "buy",
1305
+ "type": "boolean",
1306
+ "primaryKey": false,
1307
+ "notNull": true
1308
+ },
1309
+ "callback_address": {
1310
+ "name": "callback_address",
1311
+ "type": "varchar(42)",
1312
+ "primaryKey": false,
1313
+ "notNull": true
1314
+ },
1315
+ "callback_data": {
1316
+ "name": "callback_data",
1317
+ "type": "text",
1318
+ "primaryKey": false,
1319
+ "notNull": true
1320
+ },
1321
+ "block_number": {
1322
+ "name": "block_number",
1323
+ "type": "bigint",
1324
+ "primaryKey": false,
1325
+ "notNull": true
1326
+ },
1327
+ "updated_at": {
1328
+ "name": "updated_at",
1329
+ "type": "timestamp",
1330
+ "primaryKey": false,
1331
+ "notNull": true,
1332
+ "default": "now()"
1333
+ }
1334
+ },
1335
+ "indexes": {
1336
+ "offers_v2_group_fk_idx": {
1337
+ "name": "offers_v2_group_fk_idx",
1338
+ "columns": [
1339
+ {
1340
+ "expression": "group_chain_id",
1341
+ "isExpression": false,
1342
+ "asc": true,
1343
+ "nulls": "last"
1344
+ },
1345
+ {
1346
+ "expression": "group_maker",
1347
+ "isExpression": false,
1348
+ "asc": true,
1349
+ "nulls": "last"
1350
+ },
1351
+ {
1352
+ "expression": "group_group",
1353
+ "isExpression": false,
1354
+ "asc": true,
1355
+ "nulls": "last"
1356
+ }
1357
+ ],
1358
+ "isUnique": false,
1359
+ "concurrently": false,
1360
+ "method": "btree",
1361
+ "with": {}
1362
+ },
1363
+ "offers_v2_group_winner_idx": {
1364
+ "name": "offers_v2_group_winner_idx",
1365
+ "columns": [
1366
+ {
1367
+ "expression": "group_chain_id",
1368
+ "isExpression": false,
1369
+ "asc": true,
1370
+ "nulls": "last"
1371
+ },
1372
+ {
1373
+ "expression": "group_maker",
1374
+ "isExpression": false,
1375
+ "asc": true,
1376
+ "nulls": "last"
1377
+ },
1378
+ {
1379
+ "expression": "group_group",
1380
+ "isExpression": false,
1381
+ "asc": true,
1382
+ "nulls": "last"
1383
+ },
1384
+ {
1385
+ "expression": "buy",
1386
+ "isExpression": false,
1387
+ "asc": true,
1388
+ "nulls": "last"
1389
+ },
1390
+ {
1391
+ "expression": "obligation_id",
1392
+ "isExpression": false,
1393
+ "asc": true,
1394
+ "nulls": "last"
1395
+ },
1396
+ {
1397
+ "expression": "\"rate\" desc",
1398
+ "asc": true,
1399
+ "isExpression": true,
1400
+ "nulls": "last"
1401
+ },
1402
+ {
1403
+ "expression": "\"block_number\" asc",
1404
+ "asc": true,
1405
+ "isExpression": true,
1406
+ "nulls": "last"
1407
+ },
1408
+ {
1409
+ "expression": "\"assets\" desc",
1410
+ "asc": true,
1411
+ "isExpression": true,
1412
+ "nulls": "last"
1413
+ },
1414
+ {
1415
+ "expression": "\"hash\" asc",
1416
+ "asc": true,
1417
+ "isExpression": true,
1418
+ "nulls": "last"
1419
+ }
1420
+ ],
1421
+ "isUnique": false,
1422
+ "concurrently": false,
1423
+ "method": "btree",
1424
+ "with": {}
1425
+ },
1426
+ "offers_v2_obligation_id_side_idx": {
1427
+ "name": "offers_v2_obligation_id_side_idx",
1428
+ "columns": [
1429
+ {
1430
+ "expression": "obligation_id",
1431
+ "isExpression": false,
1432
+ "asc": true,
1433
+ "nulls": "last"
1434
+ },
1435
+ {
1436
+ "expression": "buy",
1437
+ "isExpression": false,
1438
+ "asc": true,
1439
+ "nulls": "last"
1440
+ }
1441
+ ],
1442
+ "isUnique": false,
1443
+ "concurrently": false,
1444
+ "method": "btree",
1445
+ "with": {}
1446
+ }
1447
+ },
1448
+ "foreignKeys": {
1449
+ "offers_v2_obligation_id_obligations_obligation_id_fk": {
1450
+ "name": "offers_v2_obligation_id_obligations_obligation_id_fk",
1451
+ "tableFrom": "offers_v2",
1452
+ "tableTo": "obligations",
1453
+ "schemaTo": "router_v1.5",
1454
+ "columnsFrom": ["obligation_id"],
1455
+ "columnsTo": ["obligation_id"],
1456
+ "onDelete": "cascade",
1457
+ "onUpdate": "no action"
1458
+ },
1459
+ "offers_v2_groups_fk": {
1460
+ "name": "offers_v2_groups_fk",
1461
+ "tableFrom": "offers_v2",
1462
+ "tableTo": "groups",
1463
+ "schemaTo": "router_v1.5",
1464
+ "columnsFrom": ["group_chain_id", "group_maker", "group_group"],
1465
+ "columnsTo": ["chain_id", "maker", "group"],
1466
+ "onDelete": "cascade",
1467
+ "onUpdate": "no action"
1468
+ }
1469
+ },
1470
+ "compositePrimaryKeys": {},
1471
+ "uniqueConstraints": {},
1472
+ "policies": {},
1473
+ "checkConstraints": {},
1474
+ "isRLSEnabled": false
1475
+ },
1476
+ "router_v1.5.oracles": {
1477
+ "name": "oracles",
1478
+ "schema": "router_v1.5",
1479
+ "columns": {
1480
+ "chain_id": {
1481
+ "name": "chain_id",
1482
+ "type": "bigint",
1483
+ "primaryKey": false,
1484
+ "notNull": true
1485
+ },
1486
+ "address": {
1487
+ "name": "address",
1488
+ "type": "varchar(42)",
1489
+ "primaryKey": false,
1490
+ "notNull": true
1491
+ },
1492
+ "block_number": {
1493
+ "name": "block_number",
1494
+ "type": "bigint",
1495
+ "primaryKey": false,
1496
+ "notNull": true
1497
+ },
1498
+ "updated_at": {
1499
+ "name": "updated_at",
1500
+ "type": "timestamp",
1501
+ "primaryKey": false,
1502
+ "notNull": true,
1503
+ "default": "now()"
1504
+ }
1505
+ },
1506
+ "indexes": {},
1507
+ "foreignKeys": {},
1508
+ "compositePrimaryKeys": {
1509
+ "oracles_pk": {
1510
+ "name": "oracles_pk",
1511
+ "columns": ["chain_id", "address"]
1512
+ }
1513
+ },
1514
+ "uniqueConstraints": {},
1515
+ "policies": {},
1516
+ "checkConstraints": {},
1517
+ "isRLSEnabled": false
1518
+ },
1519
+ "router_v1.5.status": {
1520
+ "name": "status",
1521
+ "schema": "router_v1.5",
1522
+ "columns": {
1523
+ "id": {
1524
+ "name": "id",
1525
+ "type": "serial",
1526
+ "primaryKey": true,
1527
+ "notNull": true
1528
+ },
1529
+ "code": {
1530
+ "name": "code",
1531
+ "type": "status_code",
1532
+ "typeSchema": "router_v1.5",
1533
+ "primaryKey": false,
1534
+ "notNull": false
1535
+ }
1536
+ },
1537
+ "indexes": {},
1538
+ "foreignKeys": {},
1539
+ "compositePrimaryKeys": {},
1540
+ "uniqueConstraints": {
1541
+ "status_code_unique": {
1542
+ "name": "status_code_unique",
1543
+ "nullsNotDistinct": false,
1544
+ "columns": ["code"]
1545
+ }
1546
+ },
1547
+ "policies": {},
1548
+ "checkConstraints": {},
1549
+ "isRLSEnabled": false
1550
+ }
1551
+ },
1552
+ "enums": {
1553
+ "router_v1.5.status_code": {
1554
+ "name": "status_code",
1555
+ "schema": "router_v1.5",
1556
+ "values": ["VALID", "NOT_ENOUGH_LIQUIDITY"]
1557
+ }
1558
+ },
1559
+ "schemas": {},
1560
+ "sequences": {},
1561
+ "roles": {},
1562
+ "policies": {},
1563
+ "views": {},
1564
+ "_meta": {
1565
+ "columns": {},
1566
+ "schemas": {},
1567
+ "tables": {}
1568
+ }
1569
+ }