nado-protocol 0.1.1__py3-none-any.whl → 0.1.3__py3-none-any.whl

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 (48) hide show
  1. nado_protocol/client/__init__.py +11 -2
  2. nado_protocol/client/apis/market/execute.py +10 -26
  3. nado_protocol/client/apis/market/query.py +2 -2
  4. nado_protocol/client/apis/rewards/execute.py +27 -27
  5. nado_protocol/client/apis/rewards/query.py +5 -4
  6. nado_protocol/client/apis/subaccount/query.py +1 -1
  7. nado_protocol/client/context.py +0 -2
  8. nado_protocol/contracts/__init__.py +41 -33
  9. nado_protocol/contracts/abis/Endpoint.json +151 -228
  10. nado_protocol/contracts/abis/FQuerier.json +91 -508
  11. nado_protocol/contracts/abis/IAirdrop.json +76 -0
  12. nado_protocol/contracts/abis/IClearinghouse.json +277 -390
  13. nado_protocol/contracts/abis/IEndpoint.json +42 -80
  14. nado_protocol/contracts/abis/IPerpEngine.json +69 -422
  15. nado_protocol/contracts/abis/IProductEngine.json +87 -205
  16. nado_protocol/contracts/abis/ISpotEngine.json +173 -362
  17. nado_protocol/contracts/abis/MockERC20.json +1 -1
  18. nado_protocol/contracts/deployments/{deployment.test.json → deployment.testing.json} +2 -5
  19. nado_protocol/contracts/deployments/deployment.testnet.json +15 -0
  20. nado_protocol/contracts/eip712/types.py +15 -20
  21. nado_protocol/contracts/types.py +15 -13
  22. nado_protocol/engine_client/execute.py +18 -39
  23. nado_protocol/engine_client/query.py +1 -1
  24. nado_protocol/engine_client/types/__init__.py +4 -8
  25. nado_protocol/engine_client/types/execute.py +37 -103
  26. nado_protocol/engine_client/types/models.py +3 -59
  27. nado_protocol/engine_client/types/query.py +3 -6
  28. nado_protocol/indexer_client/query.py +4 -9
  29. nado_protocol/indexer_client/types/__init__.py +4 -5
  30. nado_protocol/indexer_client/types/models.py +16 -23
  31. nado_protocol/indexer_client/types/query.py +12 -11
  32. nado_protocol/trigger_client/execute.py +1 -1
  33. nado_protocol/trigger_client/types/execute.py +3 -1
  34. nado_protocol/utils/__init__.py +18 -1
  35. nado_protocol/utils/backend.py +5 -2
  36. nado_protocol/utils/exceptions.py +3 -3
  37. nado_protocol/utils/execute.py +26 -67
  38. nado_protocol/utils/expiration.py +7 -28
  39. nado_protocol/utils/nonce.py +0 -4
  40. nado_protocol/utils/order.py +356 -0
  41. {nado_protocol-0.1.1.dist-info → nado_protocol-0.1.3.dist-info}/METADATA +4 -2
  42. nado_protocol-0.1.3.dist-info/RECORD +78 -0
  43. {nado_protocol-0.1.1.dist-info → nado_protocol-0.1.3.dist-info}/entry_points.txt +0 -1
  44. nado_protocol/contracts/abis/IERC20.json +0 -185
  45. nado_protocol/contracts/abis/IOffchainBook.json +0 -536
  46. nado_protocol/contracts/abis/IVrtxAirdrop.json +0 -138
  47. nado_protocol-0.1.1.dist-info/RECORD +0 -78
  48. {nado_protocol-0.1.1.dist-info → nado_protocol-0.1.3.dist-info}/WHEEL +0 -0
@@ -13,117 +13,91 @@
13
13
  "type": "event"
14
14
  },
15
15
  {
16
- "inputs": [
16
+ "inputs": [],
17
+ "name": "getClearinghouse",
18
+ "outputs": [
17
19
  {
18
- "components": [
19
- {
20
- "internalType": "uint32",
21
- "name": "productId",
22
- "type": "uint32"
23
- },
24
- {
25
- "internalType": "bytes32",
26
- "name": "subaccount",
27
- "type": "bytes32"
28
- },
29
- {
30
- "internalType": "int128",
31
- "name": "amountDelta",
32
- "type": "int128"
33
- },
34
- {
35
- "internalType": "int128",
36
- "name": "vQuoteDelta",
37
- "type": "int128"
38
- }
39
- ],
40
- "internalType": "struct IProductEngine.ProductDelta[]",
41
- "name": "deltas",
42
- "type": "tuple[]"
20
+ "internalType": "address",
21
+ "name": "",
22
+ "type": "address"
43
23
  }
44
24
  ],
45
- "name": "applyDeltas",
46
- "outputs": [],
47
- "stateMutability": "nonpayable",
25
+ "stateMutability": "view",
48
26
  "type": "function"
49
27
  },
50
28
  {
51
29
  "inputs": [
52
- {
53
- "internalType": "uint32",
54
- "name": "productId",
55
- "type": "uint32"
56
- },
57
30
  {
58
31
  "internalType": "bytes32",
59
32
  "name": "subaccount",
60
33
  "type": "bytes32"
61
34
  },
62
35
  {
63
- "internalType": "int128",
64
- "name": "amountLp",
65
- "type": "int128"
36
+ "internalType": "uint32",
37
+ "name": "productId",
38
+ "type": "uint32"
39
+ },
40
+ {
41
+ "internalType": "enum IProductEngine.HealthType",
42
+ "name": "healthType",
43
+ "type": "uint8"
66
44
  }
67
45
  ],
68
- "name": "burnLp",
46
+ "name": "getCoreRisk",
69
47
  "outputs": [
70
48
  {
71
- "internalType": "int128",
72
- "name": "",
73
- "type": "int128"
74
- },
75
- {
76
- "internalType": "int128",
49
+ "components": [
50
+ {
51
+ "internalType": "int128",
52
+ "name": "amount",
53
+ "type": "int128"
54
+ },
55
+ {
56
+ "internalType": "int128",
57
+ "name": "price",
58
+ "type": "int128"
59
+ },
60
+ {
61
+ "internalType": "int128",
62
+ "name": "longWeight",
63
+ "type": "int128"
64
+ }
65
+ ],
66
+ "internalType": "struct IProductEngine.CoreRisk",
77
67
  "name": "",
78
- "type": "int128"
68
+ "type": "tuple"
79
69
  }
80
70
  ],
81
- "stateMutability": "nonpayable",
71
+ "stateMutability": "view",
82
72
  "type": "function"
83
73
  },
84
74
  {
85
- "inputs": [
86
- {
87
- "internalType": "bytes32",
88
- "name": "liquidatee",
89
- "type": "bytes32"
90
- },
91
- {
92
- "internalType": "bytes32",
93
- "name": "liquidator",
94
- "type": "bytes32"
95
- },
96
- {
97
- "internalType": "address",
98
- "name": "feeCalculator",
99
- "type": "address"
100
- }
101
- ],
102
- "name": "decomposeLps",
75
+ "inputs": [],
76
+ "name": "getEngineType",
103
77
  "outputs": [
104
78
  {
105
- "internalType": "int128",
79
+ "internalType": "enum IProductEngine.EngineType",
106
80
  "name": "",
107
- "type": "int128"
81
+ "type": "uint8"
108
82
  }
109
83
  ],
110
- "stateMutability": "nonpayable",
84
+ "stateMutability": "pure",
111
85
  "type": "function"
112
86
  },
113
87
  {
114
88
  "inputs": [
115
- {
116
- "internalType": "uint32",
117
- "name": "productId",
118
- "type": "uint32"
119
- },
120
89
  {
121
90
  "internalType": "bytes32",
122
91
  "name": "subaccount",
123
92
  "type": "bytes32"
93
+ },
94
+ {
95
+ "internalType": "enum IProductEngine.HealthType",
96
+ "name": "healthType",
97
+ "type": "uint8"
124
98
  }
125
99
  ],
126
- "name": "getBalanceAmount",
100
+ "name": "getHealthContribution",
127
101
  "outputs": [
128
102
  {
129
103
  "internalType": "int128",
@@ -136,30 +110,17 @@
136
110
  },
137
111
  {
138
112
  "inputs": [],
139
- "name": "getClearinghouse",
113
+ "name": "getProductIds",
140
114
  "outputs": [
141
115
  {
142
- "internalType": "address",
116
+ "internalType": "uint32[]",
143
117
  "name": "",
144
- "type": "address"
118
+ "type": "uint32[]"
145
119
  }
146
120
  ],
147
121
  "stateMutability": "view",
148
122
  "type": "function"
149
123
  },
150
- {
151
- "inputs": [],
152
- "name": "getEngineType",
153
- "outputs": [
154
- {
155
- "internalType": "enum IProductEngine.EngineType",
156
- "name": "",
157
- "type": "uint8"
158
- }
159
- ],
160
- "stateMutability": "pure",
161
- "type": "function"
162
- },
163
124
  {
164
125
  "inputs": [
165
126
  {
@@ -168,25 +129,39 @@
168
129
  "type": "uint32"
169
130
  }
170
131
  ],
171
- "name": "getOrderbook",
132
+ "name": "getRisk",
172
133
  "outputs": [
173
134
  {
174
- "internalType": "address",
175
- "name": "",
176
- "type": "address"
177
- }
178
- ],
179
- "stateMutability": "view",
180
- "type": "function"
181
- },
182
- {
183
- "inputs": [],
184
- "name": "getProductIds",
185
- "outputs": [
186
- {
187
- "internalType": "uint32[]",
135
+ "components": [
136
+ {
137
+ "internalType": "int128",
138
+ "name": "longWeightInitialX18",
139
+ "type": "int128"
140
+ },
141
+ {
142
+ "internalType": "int128",
143
+ "name": "shortWeightInitialX18",
144
+ "type": "int128"
145
+ },
146
+ {
147
+ "internalType": "int128",
148
+ "name": "longWeightMaintenanceX18",
149
+ "type": "int128"
150
+ },
151
+ {
152
+ "internalType": "int128",
153
+ "name": "shortWeightMaintenanceX18",
154
+ "type": "int128"
155
+ },
156
+ {
157
+ "internalType": "int128",
158
+ "name": "priceX18",
159
+ "type": "int128"
160
+ }
161
+ ],
162
+ "internalType": "struct RiskHelper.Risk",
188
163
  "name": "",
189
- "type": "uint32[]"
164
+ "type": "tuple"
190
165
  }
191
166
  ],
192
167
  "stateMutability": "view",
@@ -201,22 +176,22 @@
201
176
  },
202
177
  {
203
178
  "internalType": "address",
204
- "name": "_quote",
179
+ "name": "_offchainExchange",
205
180
  "type": "address"
206
181
  },
207
182
  {
208
183
  "internalType": "address",
209
- "name": "_endpoint",
184
+ "name": "_quote",
210
185
  "type": "address"
211
186
  },
212
187
  {
213
188
  "internalType": "address",
214
- "name": "_admin",
189
+ "name": "_endpoint",
215
190
  "type": "address"
216
191
  },
217
192
  {
218
193
  "internalType": "address",
219
- "name": "_fees",
194
+ "name": "_admin",
220
195
  "type": "address"
221
196
  }
222
197
  ],
@@ -232,107 +207,14 @@
232
207
  "name": "productId",
233
208
  "type": "uint32"
234
209
  },
235
- {
236
- "internalType": "bytes32",
237
- "name": "subaccount",
238
- "type": "bytes32"
239
- },
240
- {
241
- "internalType": "int128",
242
- "name": "amountBase",
243
- "type": "int128"
244
- },
245
- {
246
- "internalType": "int128",
247
- "name": "quoteAmountLow",
248
- "type": "int128"
249
- },
250
- {
251
- "internalType": "int128",
252
- "name": "quoteAmountHigh",
253
- "type": "int128"
254
- }
255
- ],
256
- "name": "mintLp",
257
- "outputs": [],
258
- "stateMutability": "nonpayable",
259
- "type": "function"
260
- },
261
- {
262
- "inputs": [
263
- {
264
- "internalType": "uint32",
265
- "name": "productId",
266
- "type": "uint32"
267
- },
268
- {
269
- "internalType": "int128",
270
- "name": "baseDelta",
271
- "type": "int128"
272
- },
273
- {
274
- "internalType": "int128",
275
- "name": "quoteDelta",
276
- "type": "int128"
277
- }
278
- ],
279
- "name": "swapLp",
280
- "outputs": [
281
- {
282
- "internalType": "int128",
283
- "name": "",
284
- "type": "int128"
285
- },
286
- {
287
- "internalType": "int128",
288
- "name": "",
289
- "type": "int128"
290
- }
291
- ],
292
- "stateMutability": "nonpayable",
293
- "type": "function"
294
- },
295
- {
296
- "inputs": [
297
- {
298
- "internalType": "uint32",
299
- "name": "productId",
300
- "type": "uint32"
301
- },
302
- {
303
- "internalType": "int128",
304
- "name": "amount",
305
- "type": "int128"
306
- },
307
210
  {
308
211
  "internalType": "int128",
309
212
  "name": "priceX18",
310
213
  "type": "int128"
311
- },
312
- {
313
- "internalType": "int128",
314
- "name": "sizeIncrement",
315
- "type": "int128"
316
- },
317
- {
318
- "internalType": "int128",
319
- "name": "lpSpreadX18",
320
- "type": "int128"
321
- }
322
- ],
323
- "name": "swapLp",
324
- "outputs": [
325
- {
326
- "internalType": "int128",
327
- "name": "",
328
- "type": "int128"
329
- },
330
- {
331
- "internalType": "int128",
332
- "name": "",
333
- "type": "int128"
334
214
  }
335
215
  ],
216
+ "name": "updatePrice",
217
+ "outputs": [],
336
218
  "stateMutability": "nonpayable",
337
219
  "type": "function"
338
220
  },
@@ -349,4 +231,4 @@
349
231
  "stateMutability": "nonpayable",
350
232
  "type": "function"
351
233
  }
352
- ]
234
+ ]