@morpho-dev/router 0.1.11 → 0.1.15
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.
- package/README.md +97 -64
- package/dist/cli.js +6043 -0
- package/dist/cli.js.map +1 -0
- package/dist/drizzle/router_v1.4/0000_add_obligation_id.sql +112 -0
- package/dist/drizzle/router_v1.4/0001_update-primary-key-on-link.sql +3 -0
- package/dist/drizzle/{offers_v1.1/meta/0006_snapshot.json → router_v1.4/meta/0000_snapshot.json} +344 -256
- package/dist/drizzle/{offers_v1.1/meta/0007_snapshot.json → router_v1.4/meta/0001_snapshot.json} +306 -266
- package/dist/drizzle/router_v1.4/meta/_journal.json +20 -0
- package/dist/index.browser.d.cts +1367 -559
- package/dist/index.browser.d.ts +1367 -559
- package/dist/index.browser.js +1911 -835
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +1878 -830
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.cts +2827 -1562
- package/dist/index.node.d.ts +2827 -1562
- package/dist/index.node.js +5964 -2718
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +5915 -2710
- package/dist/index.node.mjs.map +1 -1
- package/package.json +16 -10
- package/dist/drizzle/offers_v1.1/0000_init.sql +0 -95
- package/dist/drizzle/offers_v1.1/0001_new_table_for_collectors_block_numbers.sql +0 -5
- package/dist/drizzle/offers_v1.1/0002_update-liquidity-tables.sql +0 -8
- package/dist/drizzle/offers_v1.1/0003_add-not-null-for-queue-id.sql +0 -1
- package/dist/drizzle/offers_v1.1/0004_add-callback-id-to-offer.sql +0 -1
- package/dist/drizzle/offers_v1.1/0005_add-missing-indices-to-liquidity-tables.sql +0 -2
- package/dist/drizzle/offers_v1.1/0006_add-callback-amount-to-queues-table.sql +0 -1
- package/dist/drizzle/offers_v1.1/0007_add-index-to-created-at.sql +0 -2
- package/dist/drizzle/offers_v1.1/meta/0000_snapshot.json +0 -827
- package/dist/drizzle/offers_v1.1/meta/0001_snapshot.json +0 -827
- package/dist/drizzle/offers_v1.1/meta/0002_snapshot.json +0 -833
- package/dist/drizzle/offers_v1.1/meta/0003_snapshot.json +0 -833
- package/dist/drizzle/offers_v1.1/meta/0004_snapshot.json +0 -839
- package/dist/drizzle/offers_v1.1/meta/0005_snapshot.json +0 -877
- package/dist/drizzle/offers_v1.1/meta/_journal.json +0 -62
package/dist/drizzle/{offers_v1.1/meta/0006_snapshot.json → router_v1.4/meta/0000_snapshot.json}
RENAMED
|
@@ -1,65 +1,27 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "
|
|
3
|
-
"prevId": "
|
|
2
|
+
"id": "bfd47937-9ca3-488e-96ec-b040b921e884",
|
|
3
|
+
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
4
4
|
"version": "7",
|
|
5
5
|
"dialect": "postgresql",
|
|
6
6
|
"tables": {
|
|
7
|
-
"
|
|
8
|
-
"name": "
|
|
9
|
-
"schema": "
|
|
7
|
+
"router_v1.4.chains": {
|
|
8
|
+
"name": "chains",
|
|
9
|
+
"schema": "router_v1.4",
|
|
10
10
|
"columns": {
|
|
11
|
-
"
|
|
12
|
-
"name": "
|
|
13
|
-
"type": "
|
|
14
|
-
"primaryKey": true,
|
|
15
|
-
"notNull": true
|
|
16
|
-
},
|
|
17
|
-
"amount": {
|
|
18
|
-
"name": "amount",
|
|
19
|
-
"type": "numeric(78, 0)",
|
|
20
|
-
"primaryKey": false,
|
|
21
|
-
"notNull": true
|
|
22
|
-
},
|
|
23
|
-
"updated_at": {
|
|
24
|
-
"name": "updated_at",
|
|
25
|
-
"type": "timestamp",
|
|
26
|
-
"primaryKey": false,
|
|
27
|
-
"notNull": true,
|
|
28
|
-
"default": "now()"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"indexes": {},
|
|
32
|
-
"foreignKeys": {},
|
|
33
|
-
"compositePrimaryKeys": {},
|
|
34
|
-
"uniqueConstraints": {},
|
|
35
|
-
"policies": {},
|
|
36
|
-
"checkConstraints": {},
|
|
37
|
-
"isRLSEnabled": false
|
|
38
|
-
},
|
|
39
|
-
"offers_v1.1.available_liquidity_queues": {
|
|
40
|
-
"name": "available_liquidity_queues",
|
|
41
|
-
"schema": "offers_v1.1",
|
|
42
|
-
"columns": {
|
|
43
|
-
"queue_id": {
|
|
44
|
-
"name": "queue_id",
|
|
45
|
-
"type": "varchar(255)",
|
|
46
|
-
"primaryKey": false,
|
|
47
|
-
"notNull": true
|
|
48
|
-
},
|
|
49
|
-
"available_liquidity_pool_id": {
|
|
50
|
-
"name": "available_liquidity_pool_id",
|
|
51
|
-
"type": "varchar(255)",
|
|
11
|
+
"chain_id": {
|
|
12
|
+
"name": "chain_id",
|
|
13
|
+
"type": "bigint",
|
|
52
14
|
"primaryKey": false,
|
|
53
15
|
"notNull": true
|
|
54
16
|
},
|
|
55
|
-
"
|
|
56
|
-
"name": "
|
|
57
|
-
"type": "
|
|
17
|
+
"block_number": {
|
|
18
|
+
"name": "block_number",
|
|
19
|
+
"type": "bigint",
|
|
58
20
|
"primaryKey": false,
|
|
59
21
|
"notNull": true
|
|
60
22
|
},
|
|
61
|
-
"
|
|
62
|
-
"name": "
|
|
23
|
+
"epoch": {
|
|
24
|
+
"name": "epoch",
|
|
63
25
|
"type": "numeric(78, 0)",
|
|
64
26
|
"primaryKey": false,
|
|
65
27
|
"notNull": true,
|
|
@@ -74,54 +36,38 @@
|
|
|
74
36
|
}
|
|
75
37
|
},
|
|
76
38
|
"indexes": {
|
|
77
|
-
"
|
|
78
|
-
"name": "
|
|
39
|
+
"chains_id_epoch_idx": {
|
|
40
|
+
"name": "chains_id_epoch_idx",
|
|
79
41
|
"columns": [
|
|
80
42
|
{
|
|
81
|
-
"expression": "
|
|
43
|
+
"expression": "chain_id",
|
|
82
44
|
"isExpression": false,
|
|
83
45
|
"asc": true,
|
|
84
46
|
"nulls": "last"
|
|
85
47
|
},
|
|
86
48
|
{
|
|
87
|
-
"expression": "
|
|
49
|
+
"expression": "epoch",
|
|
88
50
|
"isExpression": false,
|
|
89
51
|
"asc": true,
|
|
90
52
|
"nulls": "last"
|
|
91
53
|
}
|
|
92
54
|
],
|
|
93
|
-
"isUnique":
|
|
55
|
+
"isUnique": true,
|
|
94
56
|
"concurrently": false,
|
|
95
57
|
"method": "btree",
|
|
96
58
|
"with": {}
|
|
97
59
|
}
|
|
98
60
|
},
|
|
99
|
-
"foreignKeys": {
|
|
100
|
-
|
|
101
|
-
"name": "available_liquidity_queues_available_liquidity_pool_id_available_liquidity_pools_id_fk",
|
|
102
|
-
"tableFrom": "available_liquidity_queues",
|
|
103
|
-
"tableTo": "available_liquidity_pools",
|
|
104
|
-
"schemaTo": "offers_v1.1",
|
|
105
|
-
"columnsFrom": ["available_liquidity_pool_id"],
|
|
106
|
-
"columnsTo": ["id"],
|
|
107
|
-
"onDelete": "cascade",
|
|
108
|
-
"onUpdate": "no action"
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
"compositePrimaryKeys": {
|
|
112
|
-
"available_liquidity_queues_pk": {
|
|
113
|
-
"name": "available_liquidity_queues_pk",
|
|
114
|
-
"columns": ["queue_id", "available_liquidity_pool_id"]
|
|
115
|
-
}
|
|
116
|
-
},
|
|
61
|
+
"foreignKeys": {},
|
|
62
|
+
"compositePrimaryKeys": {},
|
|
117
63
|
"uniqueConstraints": {},
|
|
118
64
|
"policies": {},
|
|
119
65
|
"checkConstraints": {},
|
|
120
66
|
"isRLSEnabled": false
|
|
121
67
|
},
|
|
122
|
-
"
|
|
123
|
-
"name": "
|
|
124
|
-
"schema": "
|
|
68
|
+
"router_v1.4.collectors": {
|
|
69
|
+
"name": "collectors",
|
|
70
|
+
"schema": "router_v1.4",
|
|
125
71
|
"columns": {
|
|
126
72
|
"chain_id": {
|
|
127
73
|
"name": "chain_id",
|
|
@@ -141,6 +87,13 @@
|
|
|
141
87
|
"primaryKey": false,
|
|
142
88
|
"notNull": true
|
|
143
89
|
},
|
|
90
|
+
"epoch": {
|
|
91
|
+
"name": "epoch",
|
|
92
|
+
"type": "numeric(78, 0)",
|
|
93
|
+
"primaryKey": false,
|
|
94
|
+
"notNull": true,
|
|
95
|
+
"default": "'0'"
|
|
96
|
+
},
|
|
144
97
|
"updated_at": {
|
|
145
98
|
"name": "updated_at",
|
|
146
99
|
"type": "timestamp",
|
|
@@ -150,8 +103,8 @@
|
|
|
150
103
|
}
|
|
151
104
|
},
|
|
152
105
|
"indexes": {
|
|
153
|
-
"
|
|
154
|
-
"name": "
|
|
106
|
+
"collectors_chain_name_epoch_idx": {
|
|
107
|
+
"name": "collectors_chain_name_epoch_idx",
|
|
155
108
|
"columns": [
|
|
156
109
|
{
|
|
157
110
|
"expression": "chain_id",
|
|
@@ -164,6 +117,12 @@
|
|
|
164
117
|
"isExpression": false,
|
|
165
118
|
"asc": true,
|
|
166
119
|
"nulls": "last"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"expression": "epoch",
|
|
123
|
+
"isExpression": false,
|
|
124
|
+
"asc": true,
|
|
125
|
+
"nulls": "last"
|
|
167
126
|
}
|
|
168
127
|
],
|
|
169
128
|
"isUnique": true,
|
|
@@ -179,9 +138,9 @@
|
|
|
179
138
|
"checkConstraints": {},
|
|
180
139
|
"isRLSEnabled": false
|
|
181
140
|
},
|
|
182
|
-
"
|
|
141
|
+
"router_v1.4.consumed_per_user_and_nonce": {
|
|
183
142
|
"name": "consumed_per_user_and_nonce",
|
|
184
|
-
"schema": "
|
|
143
|
+
"schema": "router_v1.4",
|
|
185
144
|
"columns": {
|
|
186
145
|
"id": {
|
|
187
146
|
"name": "id",
|
|
@@ -213,6 +172,12 @@
|
|
|
213
172
|
"primaryKey": false,
|
|
214
173
|
"notNull": true
|
|
215
174
|
},
|
|
175
|
+
"block_number": {
|
|
176
|
+
"name": "block_number",
|
|
177
|
+
"type": "bigint",
|
|
178
|
+
"primaryKey": false,
|
|
179
|
+
"notNull": true
|
|
180
|
+
},
|
|
216
181
|
"created_at": {
|
|
217
182
|
"name": "created_at",
|
|
218
183
|
"type": "timestamp",
|
|
@@ -222,8 +187,8 @@
|
|
|
222
187
|
}
|
|
223
188
|
},
|
|
224
189
|
"indexes": {
|
|
225
|
-
"
|
|
226
|
-
"name": "
|
|
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",
|
|
227
192
|
"columns": [
|
|
228
193
|
{
|
|
229
194
|
"expression": "chain_id",
|
|
@@ -244,7 +209,7 @@
|
|
|
244
209
|
"nulls": "last"
|
|
245
210
|
},
|
|
246
211
|
{
|
|
247
|
-
"expression": "\"
|
|
212
|
+
"expression": "\"block_number\" desc",
|
|
248
213
|
"asc": true,
|
|
249
214
|
"isExpression": true,
|
|
250
215
|
"nulls": "last"
|
|
@@ -263,47 +228,42 @@
|
|
|
263
228
|
"checkConstraints": {},
|
|
264
229
|
"isRLSEnabled": false
|
|
265
230
|
},
|
|
266
|
-
"
|
|
267
|
-
"name": "
|
|
268
|
-
"schema": "
|
|
231
|
+
"router_v1.4.liquidity_links": {
|
|
232
|
+
"name": "liquidity_links",
|
|
233
|
+
"schema": "router_v1.4",
|
|
269
234
|
"columns": {
|
|
270
|
-
"
|
|
271
|
-
"name": "
|
|
272
|
-
"type": "
|
|
273
|
-
"primaryKey": true,
|
|
274
|
-
"notNull": true
|
|
275
|
-
},
|
|
276
|
-
"offer_hash": {
|
|
277
|
-
"name": "offer_hash",
|
|
278
|
-
"type": "varchar(66)",
|
|
235
|
+
"parent_pool_id": {
|
|
236
|
+
"name": "parent_pool_id",
|
|
237
|
+
"type": "varchar(255)",
|
|
279
238
|
"primaryKey": false,
|
|
280
239
|
"notNull": true
|
|
281
240
|
},
|
|
282
|
-
"
|
|
283
|
-
"name": "
|
|
284
|
-
"type": "varchar(
|
|
241
|
+
"child_pool_id": {
|
|
242
|
+
"name": "child_pool_id",
|
|
243
|
+
"type": "varchar(255)",
|
|
285
244
|
"primaryKey": false,
|
|
286
245
|
"notNull": true
|
|
287
246
|
},
|
|
288
|
-
"
|
|
289
|
-
"name": "
|
|
290
|
-
"type": "
|
|
247
|
+
"priority": {
|
|
248
|
+
"name": "priority",
|
|
249
|
+
"type": "integer",
|
|
291
250
|
"primaryKey": false,
|
|
292
251
|
"notNull": true
|
|
293
252
|
},
|
|
294
|
-
"
|
|
295
|
-
"name": "
|
|
296
|
-
"type": "
|
|
253
|
+
"updated_at": {
|
|
254
|
+
"name": "updated_at",
|
|
255
|
+
"type": "timestamp",
|
|
297
256
|
"primaryKey": false,
|
|
298
|
-
"notNull": true
|
|
257
|
+
"notNull": true,
|
|
258
|
+
"default": "now()"
|
|
299
259
|
}
|
|
300
260
|
},
|
|
301
261
|
"indexes": {
|
|
302
|
-
"
|
|
303
|
-
"name": "
|
|
262
|
+
"liquidity_links_parent_pool_id_idx": {
|
|
263
|
+
"name": "liquidity_links_parent_pool_id_idx",
|
|
304
264
|
"columns": [
|
|
305
265
|
{
|
|
306
|
-
"expression": "
|
|
266
|
+
"expression": "parent_pool_id",
|
|
307
267
|
"isExpression": false,
|
|
308
268
|
"asc": true,
|
|
309
269
|
"nulls": "last"
|
|
@@ -314,11 +274,11 @@
|
|
|
314
274
|
"method": "btree",
|
|
315
275
|
"with": {}
|
|
316
276
|
},
|
|
317
|
-
"
|
|
318
|
-
"name": "
|
|
277
|
+
"liquidity_links_child_pool_id_idx": {
|
|
278
|
+
"name": "liquidity_links_child_pool_id_idx",
|
|
319
279
|
"columns": [
|
|
320
280
|
{
|
|
321
|
-
"expression": "
|
|
281
|
+
"expression": "child_pool_id",
|
|
322
282
|
"isExpression": false,
|
|
323
283
|
"asc": true,
|
|
324
284
|
"nulls": "last"
|
|
@@ -328,39 +288,108 @@
|
|
|
328
288
|
"concurrently": false,
|
|
329
289
|
"method": "btree",
|
|
330
290
|
"with": {}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"foreignKeys": {
|
|
294
|
+
"liquidity_links_parent_pool_id_liquidity_pools_id_fk": {
|
|
295
|
+
"name": "liquidity_links_parent_pool_id_liquidity_pools_id_fk",
|
|
296
|
+
"tableFrom": "liquidity_links",
|
|
297
|
+
"tableTo": "liquidity_pools",
|
|
298
|
+
"schemaTo": "router_v1.4",
|
|
299
|
+
"columnsFrom": ["parent_pool_id"],
|
|
300
|
+
"columnsTo": ["id"],
|
|
301
|
+
"onDelete": "cascade",
|
|
302
|
+
"onUpdate": "no action"
|
|
331
303
|
},
|
|
332
|
-
"
|
|
333
|
-
"name": "
|
|
334
|
-
"
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
"
|
|
304
|
+
"liquidity_links_child_pool_id_liquidity_pools_id_fk": {
|
|
305
|
+
"name": "liquidity_links_child_pool_id_liquidity_pools_id_fk",
|
|
306
|
+
"tableFrom": "liquidity_links",
|
|
307
|
+
"tableTo": "liquidity_pools",
|
|
308
|
+
"schemaTo": "router_v1.4",
|
|
309
|
+
"columnsFrom": ["child_pool_id"],
|
|
310
|
+
"columnsTo": ["id"],
|
|
311
|
+
"onDelete": "cascade",
|
|
312
|
+
"onUpdate": "no action"
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"compositePrimaryKeys": {
|
|
316
|
+
"liquidity_links_pk": {
|
|
317
|
+
"name": "liquidity_links_pk",
|
|
318
|
+
"columns": ["parent_pool_id", "child_pool_id"]
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"uniqueConstraints": {},
|
|
322
|
+
"policies": {},
|
|
323
|
+
"checkConstraints": {},
|
|
324
|
+
"isRLSEnabled": false
|
|
325
|
+
},
|
|
326
|
+
"router_v1.4.liquidity_pools": {
|
|
327
|
+
"name": "liquidity_pools",
|
|
328
|
+
"schema": "router_v1.4",
|
|
329
|
+
"columns": {
|
|
330
|
+
"id": {
|
|
331
|
+
"name": "id",
|
|
332
|
+
"type": "varchar(255)",
|
|
333
|
+
"primaryKey": true,
|
|
334
|
+
"notNull": true
|
|
335
|
+
},
|
|
336
|
+
"amount": {
|
|
337
|
+
"name": "amount",
|
|
338
|
+
"type": "numeric(78, 0)",
|
|
339
|
+
"primaryKey": false,
|
|
340
|
+
"notNull": true
|
|
346
341
|
},
|
|
347
|
-
"
|
|
348
|
-
"name": "
|
|
342
|
+
"updated_at": {
|
|
343
|
+
"name": "updated_at",
|
|
344
|
+
"type": "timestamp",
|
|
345
|
+
"primaryKey": false,
|
|
346
|
+
"notNull": true,
|
|
347
|
+
"default": "now()"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"indexes": {},
|
|
351
|
+
"foreignKeys": {},
|
|
352
|
+
"compositePrimaryKeys": {},
|
|
353
|
+
"uniqueConstraints": {},
|
|
354
|
+
"policies": {},
|
|
355
|
+
"checkConstraints": {},
|
|
356
|
+
"isRLSEnabled": false
|
|
357
|
+
},
|
|
358
|
+
"router_v1.4.obligation_collaterals": {
|
|
359
|
+
"name": "obligation_collaterals",
|
|
360
|
+
"schema": "router_v1.4",
|
|
361
|
+
"columns": {
|
|
362
|
+
"obligation_id": {
|
|
363
|
+
"name": "obligation_id",
|
|
364
|
+
"type": "varchar(66)",
|
|
365
|
+
"primaryKey": false,
|
|
366
|
+
"notNull": true
|
|
367
|
+
},
|
|
368
|
+
"asset": {
|
|
369
|
+
"name": "asset",
|
|
370
|
+
"type": "varchar(42)",
|
|
371
|
+
"primaryKey": false,
|
|
372
|
+
"notNull": true
|
|
373
|
+
},
|
|
374
|
+
"oracle": {
|
|
375
|
+
"name": "oracle",
|
|
376
|
+
"type": "varchar(42)",
|
|
377
|
+
"primaryKey": false,
|
|
378
|
+
"notNull": true
|
|
379
|
+
},
|
|
380
|
+
"lltv": {
|
|
381
|
+
"name": "lltv",
|
|
382
|
+
"type": "bigint",
|
|
383
|
+
"primaryKey": false,
|
|
384
|
+
"notNull": true
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
"indexes": {
|
|
388
|
+
"obligation_collaterals_obligation_id_idx": {
|
|
389
|
+
"name": "obligation_collaterals_obligation_id_idx",
|
|
349
390
|
"columns": [
|
|
350
391
|
{
|
|
351
|
-
"expression": "
|
|
352
|
-
"isExpression": false,
|
|
353
|
-
"asc": true,
|
|
354
|
-
"nulls": "last"
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
"expression": "oracle",
|
|
358
|
-
"isExpression": false,
|
|
359
|
-
"asc": true,
|
|
360
|
-
"nulls": "last"
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
"expression": "lltv",
|
|
392
|
+
"expression": "obligation_id",
|
|
364
393
|
"isExpression": false,
|
|
365
394
|
"asc": true,
|
|
366
395
|
"nulls": "last"
|
|
@@ -373,53 +402,89 @@
|
|
|
373
402
|
}
|
|
374
403
|
},
|
|
375
404
|
"foreignKeys": {
|
|
376
|
-
"
|
|
377
|
-
"name": "
|
|
378
|
-
"tableFrom": "
|
|
379
|
-
"tableTo": "
|
|
380
|
-
"schemaTo": "
|
|
381
|
-
"columnsFrom": ["
|
|
382
|
-
"columnsTo": ["
|
|
405
|
+
"obligation_collaterals_obligation_id_obligations_obligation_id_fk": {
|
|
406
|
+
"name": "obligation_collaterals_obligation_id_obligations_obligation_id_fk",
|
|
407
|
+
"tableFrom": "obligation_collaterals",
|
|
408
|
+
"tableTo": "obligations",
|
|
409
|
+
"schemaTo": "router_v1.4",
|
|
410
|
+
"columnsFrom": ["obligation_id"],
|
|
411
|
+
"columnsTo": ["obligation_id"],
|
|
383
412
|
"onDelete": "cascade",
|
|
384
413
|
"onUpdate": "no action"
|
|
385
414
|
}
|
|
386
415
|
},
|
|
387
|
-
"compositePrimaryKeys": {
|
|
416
|
+
"compositePrimaryKeys": {
|
|
417
|
+
"obligation_collaterals_pk": {
|
|
418
|
+
"name": "obligation_collaterals_pk",
|
|
419
|
+
"columns": ["obligation_id", "asset"]
|
|
420
|
+
}
|
|
421
|
+
},
|
|
388
422
|
"uniqueConstraints": {},
|
|
389
423
|
"policies": {},
|
|
390
424
|
"checkConstraints": {},
|
|
391
425
|
"isRLSEnabled": false
|
|
392
426
|
},
|
|
393
|
-
"
|
|
394
|
-
"name": "
|
|
395
|
-
"schema": "
|
|
427
|
+
"router_v1.4.obligations": {
|
|
428
|
+
"name": "obligations",
|
|
429
|
+
"schema": "router_v1.4",
|
|
396
430
|
"columns": {
|
|
397
|
-
"
|
|
398
|
-
"name": "
|
|
399
|
-
"type": "
|
|
431
|
+
"obligation_id": {
|
|
432
|
+
"name": "obligation_id",
|
|
433
|
+
"type": "varchar(66)",
|
|
400
434
|
"primaryKey": true,
|
|
401
435
|
"notNull": true
|
|
402
436
|
},
|
|
437
|
+
"chain_id": {
|
|
438
|
+
"name": "chain_id",
|
|
439
|
+
"type": "bigint",
|
|
440
|
+
"primaryKey": false,
|
|
441
|
+
"notNull": true
|
|
442
|
+
},
|
|
443
|
+
"loan_token": {
|
|
444
|
+
"name": "loan_token",
|
|
445
|
+
"type": "varchar(42)",
|
|
446
|
+
"primaryKey": false,
|
|
447
|
+
"notNull": true
|
|
448
|
+
},
|
|
449
|
+
"maturity": {
|
|
450
|
+
"name": "maturity",
|
|
451
|
+
"type": "integer",
|
|
452
|
+
"primaryKey": false,
|
|
453
|
+
"notNull": true
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
"indexes": {},
|
|
457
|
+
"foreignKeys": {},
|
|
458
|
+
"compositePrimaryKeys": {},
|
|
459
|
+
"uniqueConstraints": {},
|
|
460
|
+
"policies": {},
|
|
461
|
+
"checkConstraints": {},
|
|
462
|
+
"isRLSEnabled": false
|
|
463
|
+
},
|
|
464
|
+
"router_v1.4.offer_liquidity_pools": {
|
|
465
|
+
"name": "offer_liquidity_pools",
|
|
466
|
+
"schema": "router_v1.4",
|
|
467
|
+
"columns": {
|
|
403
468
|
"offer_hash": {
|
|
404
469
|
"name": "offer_hash",
|
|
405
470
|
"type": "varchar(66)",
|
|
406
471
|
"primaryKey": false,
|
|
407
472
|
"notNull": true
|
|
408
473
|
},
|
|
409
|
-
"
|
|
410
|
-
"name": "
|
|
411
|
-
"type": "
|
|
474
|
+
"pool_id": {
|
|
475
|
+
"name": "pool_id",
|
|
476
|
+
"type": "varchar(255)",
|
|
412
477
|
"primaryKey": false,
|
|
413
478
|
"notNull": true
|
|
414
479
|
},
|
|
415
|
-
"
|
|
416
|
-
"name": "
|
|
417
|
-
"type": "
|
|
480
|
+
"amount": {
|
|
481
|
+
"name": "amount",
|
|
482
|
+
"type": "numeric(78, 0)",
|
|
418
483
|
"primaryKey": false,
|
|
419
|
-
"notNull":
|
|
484
|
+
"notNull": true
|
|
420
485
|
},
|
|
421
|
-
"
|
|
422
|
-
"name": "
|
|
486
|
+
"updated_at": {
|
|
487
|
+
"name": "updated_at",
|
|
423
488
|
"type": "timestamp",
|
|
424
489
|
"primaryKey": false,
|
|
425
490
|
"notNull": true,
|
|
@@ -427,32 +492,11 @@
|
|
|
427
492
|
}
|
|
428
493
|
},
|
|
429
494
|
"indexes": {
|
|
430
|
-
"
|
|
431
|
-
"name": "
|
|
432
|
-
"columns": [
|
|
433
|
-
{
|
|
434
|
-
"expression": "offer_hash",
|
|
435
|
-
"isExpression": false,
|
|
436
|
-
"asc": true,
|
|
437
|
-
"nulls": "last"
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
"expression": "\"created_at\" desc",
|
|
441
|
-
"asc": true,
|
|
442
|
-
"isExpression": true,
|
|
443
|
-
"nulls": "last"
|
|
444
|
-
}
|
|
445
|
-
],
|
|
446
|
-
"isUnique": false,
|
|
447
|
-
"concurrently": false,
|
|
448
|
-
"method": "btree",
|
|
449
|
-
"with": {}
|
|
450
|
-
},
|
|
451
|
-
"offer_status_status_idx": {
|
|
452
|
-
"name": "offer_status_status_idx",
|
|
495
|
+
"offer_liquidity_pools_pool_id_idx": {
|
|
496
|
+
"name": "offer_liquidity_pools_pool_id_idx",
|
|
453
497
|
"columns": [
|
|
454
498
|
{
|
|
455
|
-
"expression": "
|
|
499
|
+
"expression": "pool_id",
|
|
456
500
|
"isExpression": false,
|
|
457
501
|
"asc": true,
|
|
458
502
|
"nulls": "last"
|
|
@@ -465,26 +509,41 @@
|
|
|
465
509
|
}
|
|
466
510
|
},
|
|
467
511
|
"foreignKeys": {
|
|
468
|
-
"
|
|
469
|
-
"name": "
|
|
470
|
-
"tableFrom": "
|
|
512
|
+
"offer_liquidity_pools_offer_hash_offers_hash_fk": {
|
|
513
|
+
"name": "offer_liquidity_pools_offer_hash_offers_hash_fk",
|
|
514
|
+
"tableFrom": "offer_liquidity_pools",
|
|
471
515
|
"tableTo": "offers",
|
|
472
|
-
"schemaTo": "
|
|
516
|
+
"schemaTo": "router_v1.4",
|
|
473
517
|
"columnsFrom": ["offer_hash"],
|
|
474
518
|
"columnsTo": ["hash"],
|
|
475
519
|
"onDelete": "cascade",
|
|
476
520
|
"onUpdate": "no action"
|
|
521
|
+
},
|
|
522
|
+
"offer_liquidity_pools_pool_id_liquidity_pools_id_fk": {
|
|
523
|
+
"name": "offer_liquidity_pools_pool_id_liquidity_pools_id_fk",
|
|
524
|
+
"tableFrom": "offer_liquidity_pools",
|
|
525
|
+
"tableTo": "liquidity_pools",
|
|
526
|
+
"schemaTo": "router_v1.4",
|
|
527
|
+
"columnsFrom": ["pool_id"],
|
|
528
|
+
"columnsTo": ["id"],
|
|
529
|
+
"onDelete": "cascade",
|
|
530
|
+
"onUpdate": "no action"
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
"compositePrimaryKeys": {
|
|
534
|
+
"offer_liquidity_pools_pk": {
|
|
535
|
+
"name": "offer_liquidity_pools_pk",
|
|
536
|
+
"columns": ["offer_hash", "pool_id"]
|
|
477
537
|
}
|
|
478
538
|
},
|
|
479
|
-
"compositePrimaryKeys": {},
|
|
480
539
|
"uniqueConstraints": {},
|
|
481
540
|
"policies": {},
|
|
482
541
|
"checkConstraints": {},
|
|
483
542
|
"isRLSEnabled": false
|
|
484
543
|
},
|
|
485
|
-
"
|
|
544
|
+
"router_v1.4.offers": {
|
|
486
545
|
"name": "offers",
|
|
487
|
-
"schema": "
|
|
546
|
+
"schema": "router_v1.4",
|
|
488
547
|
"columns": {
|
|
489
548
|
"hash": {
|
|
490
549
|
"name": "hash",
|
|
@@ -492,6 +551,12 @@
|
|
|
492
551
|
"primaryKey": true,
|
|
493
552
|
"notNull": true
|
|
494
553
|
},
|
|
554
|
+
"obligation_id": {
|
|
555
|
+
"name": "obligation_id",
|
|
556
|
+
"type": "varchar(66)",
|
|
557
|
+
"primaryKey": false,
|
|
558
|
+
"notNull": true
|
|
559
|
+
},
|
|
495
560
|
"offering": {
|
|
496
561
|
"name": "offering",
|
|
497
562
|
"type": "varchar(42)",
|
|
@@ -576,21 +641,36 @@
|
|
|
576
641
|
"primaryKey": false,
|
|
577
642
|
"notNull": false
|
|
578
643
|
},
|
|
579
|
-
"callback_id": {
|
|
580
|
-
"name": "callback_id",
|
|
581
|
-
"type": "varchar(256)",
|
|
582
|
-
"primaryKey": false,
|
|
583
|
-
"notNull": false
|
|
584
|
-
},
|
|
585
644
|
"created_at": {
|
|
586
645
|
"name": "created_at",
|
|
587
646
|
"type": "timestamp",
|
|
588
647
|
"primaryKey": false,
|
|
589
648
|
"notNull": true,
|
|
590
649
|
"default": "now()"
|
|
650
|
+
},
|
|
651
|
+
"block_number": {
|
|
652
|
+
"name": "block_number",
|
|
653
|
+
"type": "bigint",
|
|
654
|
+
"primaryKey": false,
|
|
655
|
+
"notNull": true
|
|
591
656
|
}
|
|
592
657
|
},
|
|
593
658
|
"indexes": {
|
|
659
|
+
"offers_obligation_id_idx": {
|
|
660
|
+
"name": "offers_obligation_id_idx",
|
|
661
|
+
"columns": [
|
|
662
|
+
{
|
|
663
|
+
"expression": "obligation_id",
|
|
664
|
+
"isExpression": false,
|
|
665
|
+
"asc": true,
|
|
666
|
+
"nulls": "last"
|
|
667
|
+
}
|
|
668
|
+
],
|
|
669
|
+
"isUnique": false,
|
|
670
|
+
"concurrently": false,
|
|
671
|
+
"method": "btree",
|
|
672
|
+
"with": {}
|
|
673
|
+
},
|
|
594
674
|
"offers_offering_idx": {
|
|
595
675
|
"name": "offers_offering_idx",
|
|
596
676
|
"columns": [
|
|
@@ -711,6 +791,36 @@
|
|
|
711
791
|
"method": "btree",
|
|
712
792
|
"with": {}
|
|
713
793
|
},
|
|
794
|
+
"offers_created_at_idx": {
|
|
795
|
+
"name": "offers_created_at_idx",
|
|
796
|
+
"columns": [
|
|
797
|
+
{
|
|
798
|
+
"expression": "created_at",
|
|
799
|
+
"isExpression": false,
|
|
800
|
+
"asc": true,
|
|
801
|
+
"nulls": "last"
|
|
802
|
+
}
|
|
803
|
+
],
|
|
804
|
+
"isUnique": false,
|
|
805
|
+
"concurrently": false,
|
|
806
|
+
"method": "btree",
|
|
807
|
+
"with": {}
|
|
808
|
+
},
|
|
809
|
+
"offers_block_number_idx": {
|
|
810
|
+
"name": "offers_block_number_idx",
|
|
811
|
+
"columns": [
|
|
812
|
+
{
|
|
813
|
+
"expression": "block_number",
|
|
814
|
+
"isExpression": false,
|
|
815
|
+
"asc": true,
|
|
816
|
+
"nulls": "last"
|
|
817
|
+
}
|
|
818
|
+
],
|
|
819
|
+
"isUnique": false,
|
|
820
|
+
"concurrently": false,
|
|
821
|
+
"method": "btree",
|
|
822
|
+
"with": {}
|
|
823
|
+
},
|
|
714
824
|
"offers_rate_hash_idx": {
|
|
715
825
|
"name": "offers_rate_hash_idx",
|
|
716
826
|
"columns": [
|
|
@@ -794,66 +904,33 @@
|
|
|
794
904
|
"concurrently": false,
|
|
795
905
|
"method": "btree",
|
|
796
906
|
"with": {}
|
|
797
|
-
}
|
|
798
|
-
},
|
|
799
|
-
"foreignKeys": {},
|
|
800
|
-
"compositePrimaryKeys": {},
|
|
801
|
-
"uniqueConstraints": {},
|
|
802
|
-
"policies": {},
|
|
803
|
-
"checkConstraints": {},
|
|
804
|
-
"isRLSEnabled": false
|
|
805
|
-
},
|
|
806
|
-
"offers_v1.1.user_positions": {
|
|
807
|
-
"name": "user_positions",
|
|
808
|
-
"schema": "offers_v1.1",
|
|
809
|
-
"columns": {
|
|
810
|
-
"id": {
|
|
811
|
-
"name": "id",
|
|
812
|
-
"type": "varchar(255)",
|
|
813
|
-
"primaryKey": true,
|
|
814
|
-
"notNull": true
|
|
815
|
-
},
|
|
816
|
-
"available_liquidity_queue_id": {
|
|
817
|
-
"name": "available_liquidity_queue_id",
|
|
818
|
-
"type": "varchar(255)",
|
|
819
|
-
"primaryKey": false,
|
|
820
|
-
"notNull": true
|
|
821
907
|
},
|
|
822
|
-
"
|
|
823
|
-
"name": "
|
|
824
|
-
"type": "varchar(255)",
|
|
825
|
-
"primaryKey": false,
|
|
826
|
-
"notNull": true
|
|
827
|
-
},
|
|
828
|
-
"chain_id": {
|
|
829
|
-
"name": "chain_id",
|
|
830
|
-
"type": "bigint",
|
|
831
|
-
"primaryKey": false,
|
|
832
|
-
"notNull": true
|
|
833
|
-
},
|
|
834
|
-
"amount": {
|
|
835
|
-
"name": "amount",
|
|
836
|
-
"type": "numeric(78, 0)",
|
|
837
|
-
"primaryKey": false,
|
|
838
|
-
"notNull": true
|
|
839
|
-
},
|
|
840
|
-
"updated_at": {
|
|
841
|
-
"name": "updated_at",
|
|
842
|
-
"type": "timestamp",
|
|
843
|
-
"primaryKey": false,
|
|
844
|
-
"notNull": true,
|
|
845
|
-
"default": "now()"
|
|
846
|
-
}
|
|
847
|
-
},
|
|
848
|
-
"indexes": {
|
|
849
|
-
"user_positions_available_liquidity_queue_id_idx": {
|
|
850
|
-
"name": "user_positions_available_liquidity_queue_id_idx",
|
|
908
|
+
"offers_rate_created_at_assets_hash_idx": {
|
|
909
|
+
"name": "offers_rate_created_at_assets_hash_idx",
|
|
851
910
|
"columns": [
|
|
852
911
|
{
|
|
853
|
-
"expression": "
|
|
912
|
+
"expression": "rate",
|
|
854
913
|
"isExpression": false,
|
|
855
914
|
"asc": true,
|
|
856
915
|
"nulls": "last"
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
"expression": "\"created_at\" asc",
|
|
919
|
+
"asc": true,
|
|
920
|
+
"isExpression": true,
|
|
921
|
+
"nulls": "last"
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
"expression": "\"assets\" desc",
|
|
925
|
+
"asc": true,
|
|
926
|
+
"isExpression": true,
|
|
927
|
+
"nulls": "last"
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
"expression": "\"hash\" asc",
|
|
931
|
+
"asc": true,
|
|
932
|
+
"isExpression": true,
|
|
933
|
+
"nulls": "last"
|
|
857
934
|
}
|
|
858
935
|
],
|
|
859
936
|
"isUnique": false,
|
|
@@ -862,7 +939,18 @@
|
|
|
862
939
|
"with": {}
|
|
863
940
|
}
|
|
864
941
|
},
|
|
865
|
-
"foreignKeys": {
|
|
942
|
+
"foreignKeys": {
|
|
943
|
+
"offers_obligation_id_obligations_obligation_id_fk": {
|
|
944
|
+
"name": "offers_obligation_id_obligations_obligation_id_fk",
|
|
945
|
+
"tableFrom": "offers",
|
|
946
|
+
"tableTo": "obligations",
|
|
947
|
+
"schemaTo": "router_v1.4",
|
|
948
|
+
"columnsFrom": ["obligation_id"],
|
|
949
|
+
"columnsTo": ["obligation_id"],
|
|
950
|
+
"onDelete": "cascade",
|
|
951
|
+
"onUpdate": "no action"
|
|
952
|
+
}
|
|
953
|
+
},
|
|
866
954
|
"compositePrimaryKeys": {},
|
|
867
955
|
"uniqueConstraints": {},
|
|
868
956
|
"policies": {},
|