@morpho-dev/router 0.2.0 → 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 (65) hide show
  1. package/README.md +3 -3
  2. package/dist/chunk-jass6xSI.mjs +13 -0
  3. package/dist/cli.js +6566 -7032
  4. package/dist/drizzle/migrations/0000_setup_single_migration_folder.sql +204 -0
  5. package/dist/drizzle/{router_v1.5/0006_add-trigger-for-consumed-events.sql → migrations/0001_add-trigger-for-consumed-events.sql} +6 -6
  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.5/meta/0008_snapshot.json → migrations/meta/0000_snapshot.json} +50 -50
  19. package/dist/drizzle/{router_v1.5/meta/0006_snapshot.json → migrations/meta/0001_snapshot.json} +150 -62
  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.5/meta/0007_snapshot.json → migrations/meta/0004_snapshot.json} +57 -67
  23. package/dist/drizzle/{router_v1.5 → migrations}/meta/0005_snapshot.json +181 -70
  24. package/dist/drizzle/{router_v1.5/meta/0004_snapshot.json → migrations/meta/0006_snapshot.json} +466 -62
  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/{router_v1.5/meta/0001_snapshot.json → migrations/meta/0013_snapshot.json} +492 -606
  29. package/dist/drizzle/{router_v1.5/meta/0002_snapshot.json → migrations/meta/0014_snapshot.json} +538 -711
  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 +2127 -1737
  34. package/dist/index.browser.d.ts.map +1 -0
  35. package/dist/index.browser.js +3789 -2911
  36. package/dist/index.browser.js.map +1 -1
  37. package/dist/index.browser.mjs +3581 -2850
  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 +4279 -4410
  42. package/dist/index.node.d.ts.map +1 -0
  43. package/dist/index.node.js +7742 -7158
  44. package/dist/index.node.js.map +1 -1
  45. package/dist/index.node.mjs +7479 -7106
  46. package/dist/index.node.mjs.map +1 -1
  47. package/package.json +16 -6
  48. package/dist/cli.js.map +0 -1
  49. package/dist/drizzle/VERSION.ts +0 -3
  50. package/dist/drizzle/drizzle.config.ts +0 -18
  51. package/dist/drizzle/index.ts +0 -2
  52. package/dist/drizzle/router_v1.5/0000_add_block_number_to_liquidity_graph_and_offer_liquidity_pools_relation.sql +0 -122
  53. package/dist/drizzle/router_v1.5/0001_create_new_relations_to_prepare_new_liquidity_model.sql +0 -55
  54. package/dist/drizzle/router_v1.5/0002_add_new_offer_status_relation.sql +0 -9
  55. package/dist/drizzle/router_v1.5/0003_insert-status-code.sql +0 -1
  56. package/dist/drizzle/router_v1.5/0004_add_index_for_fast_book_lookup.sql +0 -3
  57. package/dist/drizzle/router_v1.5/0005_add_group_consumed_events_table.sql +0 -12
  58. package/dist/drizzle/router_v1.5/0007_update_index_for_fast_book_lookup.sql +0 -5
  59. package/dist/drizzle/router_v1.5/0008_rename_consumed_events_table.sql +0 -8
  60. package/dist/drizzle/router_v1.5/meta/0000_snapshot.json +0 -1028
  61. package/dist/drizzle/router_v1.5/meta/0003_snapshot.json +0 -1463
  62. package/dist/drizzle/router_v1.5/meta/_journal.json +0 -69
  63. package/dist/drizzle/schema.ts +0 -363
  64. package/dist/index.browser.d.cts +0 -2403
  65. package/dist/index.node.d.cts +0 -5119
@@ -1,1028 +0,0 @@
1
- {
2
- "id": "ebc5db1e-f7e2-4441-b9c0-4789d0715e09",
3
- "prevId": "00000000-0000-0000-0000-000000000000",
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.liquidity_links": {
232
- "name": "liquidity_links",
233
- "schema": "router_v1.5",
234
- "columns": {
235
- "parent_pool_id": {
236
- "name": "parent_pool_id",
237
- "type": "varchar(255)",
238
- "primaryKey": false,
239
- "notNull": true
240
- },
241
- "child_pool_id": {
242
- "name": "child_pool_id",
243
- "type": "varchar(255)",
244
- "primaryKey": false,
245
- "notNull": true
246
- },
247
- "priority": {
248
- "name": "priority",
249
- "type": "integer",
250
- "primaryKey": false,
251
- "notNull": true
252
- },
253
- "block_number": {
254
- "name": "block_number",
255
- "type": "bigint",
256
- "primaryKey": false,
257
- "notNull": true
258
- },
259
- "updated_at": {
260
- "name": "updated_at",
261
- "type": "timestamp",
262
- "primaryKey": false,
263
- "notNull": true,
264
- "default": "now()"
265
- }
266
- },
267
- "indexes": {
268
- "liquidity_links_parent_pool_id_idx": {
269
- "name": "liquidity_links_parent_pool_id_idx",
270
- "columns": [
271
- {
272
- "expression": "parent_pool_id",
273
- "isExpression": false,
274
- "asc": true,
275
- "nulls": "last"
276
- }
277
- ],
278
- "isUnique": false,
279
- "concurrently": false,
280
- "method": "btree",
281
- "with": {}
282
- },
283
- "liquidity_links_child_pool_id_idx": {
284
- "name": "liquidity_links_child_pool_id_idx",
285
- "columns": [
286
- {
287
- "expression": "child_pool_id",
288
- "isExpression": false,
289
- "asc": true,
290
- "nulls": "last"
291
- }
292
- ],
293
- "isUnique": false,
294
- "concurrently": false,
295
- "method": "btree",
296
- "with": {}
297
- }
298
- },
299
- "foreignKeys": {
300
- "liquidity_links_parent_pool_id_liquidity_pools_id_fk": {
301
- "name": "liquidity_links_parent_pool_id_liquidity_pools_id_fk",
302
- "tableFrom": "liquidity_links",
303
- "tableTo": "liquidity_pools",
304
- "schemaTo": "router_v1.5",
305
- "columnsFrom": ["parent_pool_id"],
306
- "columnsTo": ["id"],
307
- "onDelete": "cascade",
308
- "onUpdate": "no action"
309
- },
310
- "liquidity_links_child_pool_id_liquidity_pools_id_fk": {
311
- "name": "liquidity_links_child_pool_id_liquidity_pools_id_fk",
312
- "tableFrom": "liquidity_links",
313
- "tableTo": "liquidity_pools",
314
- "schemaTo": "router_v1.5",
315
- "columnsFrom": ["child_pool_id"],
316
- "columnsTo": ["id"],
317
- "onDelete": "cascade",
318
- "onUpdate": "no action"
319
- }
320
- },
321
- "compositePrimaryKeys": {
322
- "liquidity_links_pk": {
323
- "name": "liquidity_links_pk",
324
- "columns": ["parent_pool_id", "priority"]
325
- }
326
- },
327
- "uniqueConstraints": {},
328
- "policies": {},
329
- "checkConstraints": {},
330
- "isRLSEnabled": false
331
- },
332
- "router_v1.5.liquidity_pools": {
333
- "name": "liquidity_pools",
334
- "schema": "router_v1.5",
335
- "columns": {
336
- "id": {
337
- "name": "id",
338
- "type": "varchar(255)",
339
- "primaryKey": true,
340
- "notNull": true
341
- },
342
- "amount": {
343
- "name": "amount",
344
- "type": "numeric(78, 0)",
345
- "primaryKey": false,
346
- "notNull": true
347
- },
348
- "block_number": {
349
- "name": "block_number",
350
- "type": "bigint",
351
- "primaryKey": false,
352
- "notNull": true
353
- },
354
- "updated_at": {
355
- "name": "updated_at",
356
- "type": "timestamp",
357
- "primaryKey": false,
358
- "notNull": true,
359
- "default": "now()"
360
- }
361
- },
362
- "indexes": {},
363
- "foreignKeys": {},
364
- "compositePrimaryKeys": {},
365
- "uniqueConstraints": {},
366
- "policies": {},
367
- "checkConstraints": {},
368
- "isRLSEnabled": false
369
- },
370
- "router_v1.5.obligation_collaterals": {
371
- "name": "obligation_collaterals",
372
- "schema": "router_v1.5",
373
- "columns": {
374
- "obligation_id": {
375
- "name": "obligation_id",
376
- "type": "varchar(66)",
377
- "primaryKey": false,
378
- "notNull": true
379
- },
380
- "asset": {
381
- "name": "asset",
382
- "type": "varchar(42)",
383
- "primaryKey": false,
384
- "notNull": true
385
- },
386
- "oracle": {
387
- "name": "oracle",
388
- "type": "varchar(42)",
389
- "primaryKey": false,
390
- "notNull": true
391
- },
392
- "lltv": {
393
- "name": "lltv",
394
- "type": "bigint",
395
- "primaryKey": false,
396
- "notNull": true
397
- }
398
- },
399
- "indexes": {
400
- "obligation_collaterals_obligation_id_idx": {
401
- "name": "obligation_collaterals_obligation_id_idx",
402
- "columns": [
403
- {
404
- "expression": "obligation_id",
405
- "isExpression": false,
406
- "asc": true,
407
- "nulls": "last"
408
- }
409
- ],
410
- "isUnique": false,
411
- "concurrently": false,
412
- "method": "btree",
413
- "with": {}
414
- }
415
- },
416
- "foreignKeys": {
417
- "obligation_collaterals_obligation_id_obligations_obligation_id_fk": {
418
- "name": "obligation_collaterals_obligation_id_obligations_obligation_id_fk",
419
- "tableFrom": "obligation_collaterals",
420
- "tableTo": "obligations",
421
- "schemaTo": "router_v1.5",
422
- "columnsFrom": ["obligation_id"],
423
- "columnsTo": ["obligation_id"],
424
- "onDelete": "cascade",
425
- "onUpdate": "no action"
426
- }
427
- },
428
- "compositePrimaryKeys": {
429
- "obligation_collaterals_pk": {
430
- "name": "obligation_collaterals_pk",
431
- "columns": ["obligation_id", "asset"]
432
- }
433
- },
434
- "uniqueConstraints": {},
435
- "policies": {},
436
- "checkConstraints": {},
437
- "isRLSEnabled": false
438
- },
439
- "router_v1.5.obligations": {
440
- "name": "obligations",
441
- "schema": "router_v1.5",
442
- "columns": {
443
- "obligation_id": {
444
- "name": "obligation_id",
445
- "type": "varchar(66)",
446
- "primaryKey": true,
447
- "notNull": true
448
- },
449
- "chain_id": {
450
- "name": "chain_id",
451
- "type": "bigint",
452
- "primaryKey": false,
453
- "notNull": true
454
- },
455
- "loan_token": {
456
- "name": "loan_token",
457
- "type": "varchar(42)",
458
- "primaryKey": false,
459
- "notNull": true
460
- },
461
- "maturity": {
462
- "name": "maturity",
463
- "type": "integer",
464
- "primaryKey": false,
465
- "notNull": true
466
- }
467
- },
468
- "indexes": {},
469
- "foreignKeys": {},
470
- "compositePrimaryKeys": {},
471
- "uniqueConstraints": {},
472
- "policies": {},
473
- "checkConstraints": {},
474
- "isRLSEnabled": false
475
- },
476
- "router_v1.5.offer_liquidity_pools": {
477
- "name": "offer_liquidity_pools",
478
- "schema": "router_v1.5",
479
- "columns": {
480
- "offer_hash": {
481
- "name": "offer_hash",
482
- "type": "varchar(66)",
483
- "primaryKey": false,
484
- "notNull": true
485
- },
486
- "pool_id": {
487
- "name": "pool_id",
488
- "type": "varchar(255)",
489
- "primaryKey": false,
490
- "notNull": true
491
- },
492
- "amount": {
493
- "name": "amount",
494
- "type": "numeric(78, 0)",
495
- "primaryKey": false,
496
- "notNull": true
497
- },
498
- "block_number": {
499
- "name": "block_number",
500
- "type": "bigint",
501
- "primaryKey": false,
502
- "notNull": true
503
- },
504
- "updated_at": {
505
- "name": "updated_at",
506
- "type": "timestamp",
507
- "primaryKey": false,
508
- "notNull": true,
509
- "default": "now()"
510
- }
511
- },
512
- "indexes": {
513
- "offer_liquidity_pools_pool_id_idx": {
514
- "name": "offer_liquidity_pools_pool_id_idx",
515
- "columns": [
516
- {
517
- "expression": "pool_id",
518
- "isExpression": false,
519
- "asc": true,
520
- "nulls": "last"
521
- }
522
- ],
523
- "isUnique": false,
524
- "concurrently": false,
525
- "method": "btree",
526
- "with": {}
527
- }
528
- },
529
- "foreignKeys": {
530
- "offer_liquidity_pools_offer_hash_offers_hash_fk": {
531
- "name": "offer_liquidity_pools_offer_hash_offers_hash_fk",
532
- "tableFrom": "offer_liquidity_pools",
533
- "tableTo": "offers",
534
- "schemaTo": "router_v1.5",
535
- "columnsFrom": ["offer_hash"],
536
- "columnsTo": ["hash"],
537
- "onDelete": "cascade",
538
- "onUpdate": "no action"
539
- },
540
- "offer_liquidity_pools_pool_id_liquidity_pools_id_fk": {
541
- "name": "offer_liquidity_pools_pool_id_liquidity_pools_id_fk",
542
- "tableFrom": "offer_liquidity_pools",
543
- "tableTo": "liquidity_pools",
544
- "schemaTo": "router_v1.5",
545
- "columnsFrom": ["pool_id"],
546
- "columnsTo": ["id"],
547
- "onDelete": "cascade",
548
- "onUpdate": "no action"
549
- }
550
- },
551
- "compositePrimaryKeys": {
552
- "offer_liquidity_pools_pk": {
553
- "name": "offer_liquidity_pools_pk",
554
- "columns": ["offer_hash", "pool_id"]
555
- }
556
- },
557
- "uniqueConstraints": {},
558
- "policies": {},
559
- "checkConstraints": {},
560
- "isRLSEnabled": false
561
- },
562
- "router_v1.5.offers": {
563
- "name": "offers",
564
- "schema": "router_v1.5",
565
- "columns": {
566
- "hash": {
567
- "name": "hash",
568
- "type": "varchar(66)",
569
- "primaryKey": true,
570
- "notNull": true
571
- },
572
- "obligation_id": {
573
- "name": "obligation_id",
574
- "type": "varchar(66)",
575
- "primaryKey": false,
576
- "notNull": true
577
- },
578
- "offering": {
579
- "name": "offering",
580
- "type": "varchar(42)",
581
- "primaryKey": false,
582
- "notNull": true
583
- },
584
- "assets": {
585
- "name": "assets",
586
- "type": "numeric(78, 0)",
587
- "primaryKey": false,
588
- "notNull": true
589
- },
590
- "rate": {
591
- "name": "rate",
592
- "type": "bigint",
593
- "primaryKey": false,
594
- "notNull": true
595
- },
596
- "maturity": {
597
- "name": "maturity",
598
- "type": "integer",
599
- "primaryKey": false,
600
- "notNull": true
601
- },
602
- "expiry": {
603
- "name": "expiry",
604
- "type": "integer",
605
- "primaryKey": false,
606
- "notNull": true
607
- },
608
- "start": {
609
- "name": "start",
610
- "type": "integer",
611
- "primaryKey": false,
612
- "notNull": true
613
- },
614
- "nonce": {
615
- "name": "nonce",
616
- "type": "bigint",
617
- "primaryKey": false,
618
- "notNull": true
619
- },
620
- "buy": {
621
- "name": "buy",
622
- "type": "boolean",
623
- "primaryKey": false,
624
- "notNull": true
625
- },
626
- "chain_id": {
627
- "name": "chain_id",
628
- "type": "bigint",
629
- "primaryKey": false,
630
- "notNull": true
631
- },
632
- "loan_token": {
633
- "name": "loan_token",
634
- "type": "varchar(42)",
635
- "primaryKey": false,
636
- "notNull": true
637
- },
638
- "callback_address": {
639
- "name": "callback_address",
640
- "type": "varchar(42)",
641
- "primaryKey": false,
642
- "notNull": true
643
- },
644
- "callback_data": {
645
- "name": "callback_data",
646
- "type": "text",
647
- "primaryKey": false,
648
- "notNull": true
649
- },
650
- "callback_gas_limit": {
651
- "name": "callback_gas_limit",
652
- "type": "bigint",
653
- "primaryKey": false,
654
- "notNull": true
655
- },
656
- "signature": {
657
- "name": "signature",
658
- "type": "varchar(132)",
659
- "primaryKey": false,
660
- "notNull": false
661
- },
662
- "created_at": {
663
- "name": "created_at",
664
- "type": "timestamp",
665
- "primaryKey": false,
666
- "notNull": true,
667
- "default": "now()"
668
- },
669
- "block_number": {
670
- "name": "block_number",
671
- "type": "bigint",
672
- "primaryKey": false,
673
- "notNull": true
674
- }
675
- },
676
- "indexes": {
677
- "offers_obligation_id_idx": {
678
- "name": "offers_obligation_id_idx",
679
- "columns": [
680
- {
681
- "expression": "obligation_id",
682
- "isExpression": false,
683
- "asc": true,
684
- "nulls": "last"
685
- }
686
- ],
687
- "isUnique": false,
688
- "concurrently": false,
689
- "method": "btree",
690
- "with": {}
691
- },
692
- "offers_offering_idx": {
693
- "name": "offers_offering_idx",
694
- "columns": [
695
- {
696
- "expression": "offering",
697
- "isExpression": false,
698
- "asc": true,
699
- "nulls": "last"
700
- }
701
- ],
702
- "isUnique": false,
703
- "concurrently": false,
704
- "method": "btree",
705
- "with": {}
706
- },
707
- "offers_buy_idx": {
708
- "name": "offers_buy_idx",
709
- "columns": [
710
- {
711
- "expression": "buy",
712
- "isExpression": false,
713
- "asc": true,
714
- "nulls": "last"
715
- }
716
- ],
717
- "isUnique": false,
718
- "concurrently": false,
719
- "method": "btree",
720
- "with": {}
721
- },
722
- "offers_chain_id_idx": {
723
- "name": "offers_chain_id_idx",
724
- "columns": [
725
- {
726
- "expression": "chain_id",
727
- "isExpression": false,
728
- "asc": true,
729
- "nulls": "last"
730
- }
731
- ],
732
- "isUnique": false,
733
- "concurrently": false,
734
- "method": "btree",
735
- "with": {}
736
- },
737
- "offers_loan_token_idx": {
738
- "name": "offers_loan_token_idx",
739
- "columns": [
740
- {
741
- "expression": "loan_token",
742
- "isExpression": false,
743
- "asc": true,
744
- "nulls": "last"
745
- }
746
- ],
747
- "isUnique": false,
748
- "concurrently": false,
749
- "method": "btree",
750
- "with": {}
751
- },
752
- "offers_maturity_idx": {
753
- "name": "offers_maturity_idx",
754
- "columns": [
755
- {
756
- "expression": "maturity",
757
- "isExpression": false,
758
- "asc": true,
759
- "nulls": "last"
760
- }
761
- ],
762
- "isUnique": false,
763
- "concurrently": false,
764
- "method": "btree",
765
- "with": {}
766
- },
767
- "offers_expiry_idx": {
768
- "name": "offers_expiry_idx",
769
- "columns": [
770
- {
771
- "expression": "expiry",
772
- "isExpression": false,
773
- "asc": true,
774
- "nulls": "last"
775
- }
776
- ],
777
- "isUnique": false,
778
- "concurrently": false,
779
- "method": "btree",
780
- "with": {}
781
- },
782
- "offers_rate_idx": {
783
- "name": "offers_rate_idx",
784
- "columns": [
785
- {
786
- "expression": "rate",
787
- "isExpression": false,
788
- "asc": true,
789
- "nulls": "last"
790
- }
791
- ],
792
- "isUnique": false,
793
- "concurrently": false,
794
- "method": "btree",
795
- "with": {}
796
- },
797
- "offers_assets_idx": {
798
- "name": "offers_assets_idx",
799
- "columns": [
800
- {
801
- "expression": "assets",
802
- "isExpression": false,
803
- "asc": true,
804
- "nulls": "last"
805
- }
806
- ],
807
- "isUnique": false,
808
- "concurrently": false,
809
- "method": "btree",
810
- "with": {}
811
- },
812
- "offers_created_at_idx": {
813
- "name": "offers_created_at_idx",
814
- "columns": [
815
- {
816
- "expression": "created_at",
817
- "isExpression": false,
818
- "asc": true,
819
- "nulls": "last"
820
- }
821
- ],
822
- "isUnique": false,
823
- "concurrently": false,
824
- "method": "btree",
825
- "with": {}
826
- },
827
- "offers_block_number_idx": {
828
- "name": "offers_block_number_idx",
829
- "columns": [
830
- {
831
- "expression": "block_number",
832
- "isExpression": false,
833
- "asc": true,
834
- "nulls": "last"
835
- }
836
- ],
837
- "isUnique": false,
838
- "concurrently": false,
839
- "method": "btree",
840
- "with": {}
841
- },
842
- "offers_rate_hash_idx": {
843
- "name": "offers_rate_hash_idx",
844
- "columns": [
845
- {
846
- "expression": "rate",
847
- "isExpression": false,
848
- "asc": true,
849
- "nulls": "last"
850
- },
851
- {
852
- "expression": "hash",
853
- "isExpression": false,
854
- "asc": true,
855
- "nulls": "last"
856
- }
857
- ],
858
- "isUnique": false,
859
- "concurrently": false,
860
- "method": "btree",
861
- "with": {}
862
- },
863
- "offers_maturity_hash_idx": {
864
- "name": "offers_maturity_hash_idx",
865
- "columns": [
866
- {
867
- "expression": "maturity",
868
- "isExpression": false,
869
- "asc": true,
870
- "nulls": "last"
871
- },
872
- {
873
- "expression": "hash",
874
- "isExpression": false,
875
- "asc": true,
876
- "nulls": "last"
877
- }
878
- ],
879
- "isUnique": false,
880
- "concurrently": false,
881
- "method": "btree",
882
- "with": {}
883
- },
884
- "offers_expiry_hash_idx": {
885
- "name": "offers_expiry_hash_idx",
886
- "columns": [
887
- {
888
- "expression": "expiry",
889
- "isExpression": false,
890
- "asc": true,
891
- "nulls": "last"
892
- },
893
- {
894
- "expression": "hash",
895
- "isExpression": false,
896
- "asc": true,
897
- "nulls": "last"
898
- }
899
- ],
900
- "isUnique": false,
901
- "concurrently": false,
902
- "method": "btree",
903
- "with": {}
904
- },
905
- "offers_assets_hash_idx": {
906
- "name": "offers_assets_hash_idx",
907
- "columns": [
908
- {
909
- "expression": "assets",
910
- "isExpression": false,
911
- "asc": true,
912
- "nulls": "last"
913
- },
914
- {
915
- "expression": "hash",
916
- "isExpression": false,
917
- "asc": true,
918
- "nulls": "last"
919
- }
920
- ],
921
- "isUnique": false,
922
- "concurrently": false,
923
- "method": "btree",
924
- "with": {}
925
- },
926
- "offers_rate_created_at_assets_hash_idx": {
927
- "name": "offers_rate_created_at_assets_hash_idx",
928
- "columns": [
929
- {
930
- "expression": "rate",
931
- "isExpression": false,
932
- "asc": true,
933
- "nulls": "last"
934
- },
935
- {
936
- "expression": "\"created_at\" asc",
937
- "asc": true,
938
- "isExpression": true,
939
- "nulls": "last"
940
- },
941
- {
942
- "expression": "\"assets\" desc",
943
- "asc": true,
944
- "isExpression": true,
945
- "nulls": "last"
946
- },
947
- {
948
- "expression": "\"hash\" asc",
949
- "asc": true,
950
- "isExpression": true,
951
- "nulls": "last"
952
- }
953
- ],
954
- "isUnique": false,
955
- "concurrently": false,
956
- "method": "btree",
957
- "with": {}
958
- }
959
- },
960
- "foreignKeys": {
961
- "offers_obligation_id_obligations_obligation_id_fk": {
962
- "name": "offers_obligation_id_obligations_obligation_id_fk",
963
- "tableFrom": "offers",
964
- "tableTo": "obligations",
965
- "schemaTo": "router_v1.5",
966
- "columnsFrom": ["obligation_id"],
967
- "columnsTo": ["obligation_id"],
968
- "onDelete": "cascade",
969
- "onUpdate": "no action"
970
- }
971
- },
972
- "compositePrimaryKeys": {},
973
- "uniqueConstraints": {},
974
- "policies": {},
975
- "checkConstraints": {},
976
- "isRLSEnabled": false
977
- },
978
- "router_v1.5.status": {
979
- "name": "status",
980
- "schema": "router_v1.5",
981
- "columns": {
982
- "id": {
983
- "name": "id",
984
- "type": "serial",
985
- "primaryKey": true,
986
- "notNull": true
987
- },
988
- "code": {
989
- "name": "code",
990
- "type": "status_code",
991
- "typeSchema": "router_v1.5",
992
- "primaryKey": false,
993
- "notNull": false
994
- }
995
- },
996
- "indexes": {},
997
- "foreignKeys": {},
998
- "compositePrimaryKeys": {},
999
- "uniqueConstraints": {
1000
- "status_code_unique": {
1001
- "name": "status_code_unique",
1002
- "nullsNotDistinct": false,
1003
- "columns": ["code"]
1004
- }
1005
- },
1006
- "policies": {},
1007
- "checkConstraints": {},
1008
- "isRLSEnabled": false
1009
- }
1010
- },
1011
- "enums": {
1012
- "router_v1.5.status_code": {
1013
- "name": "status_code",
1014
- "schema": "router_v1.5",
1015
- "values": ["VALID", "NOT_ENOUGH_LIQUIDITY"]
1016
- }
1017
- },
1018
- "schemas": {},
1019
- "sequences": {},
1020
- "roles": {},
1021
- "policies": {},
1022
- "views": {},
1023
- "_meta": {
1024
- "columns": {},
1025
- "schemas": {},
1026
- "tables": {}
1027
- }
1028
- }