nado-protocol 0.1.0__py3-none-any.whl → 0.1.2__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.0.dist-info → nado_protocol-0.1.2.dist-info}/METADATA +4 -2
  42. nado_protocol-0.1.2.dist-info/RECORD +78 -0
  43. {nado_protocol-0.1.0.dist-info → nado_protocol-0.1.2.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.0.dist-info/RECORD +0 -78
  48. {nado_protocol-0.1.0.dist-info → nado_protocol-0.1.2.dist-info}/WHEEL +0 -0
@@ -130,14 +130,8 @@
130
130
  "type": "function"
131
131
  },
132
132
  {
133
- "inputs": [
134
- {
135
- "internalType": "uint32",
136
- "name": "count",
137
- "type": "uint32"
138
- }
139
- ],
140
- "name": "executeSlowModeTransactions",
133
+ "inputs": [],
134
+ "name": "executeSlowModeTransaction",
141
135
  "outputs": [],
142
136
  "stateMutability": "nonpayable",
143
137
  "type": "function"
@@ -145,12 +139,12 @@
145
139
  {
146
140
  "inputs": [
147
141
  {
148
- "internalType": "uint32",
149
- "name": "productId",
150
- "type": "uint32"
142
+ "internalType": "bytes32",
143
+ "name": "subaccount",
144
+ "type": "bytes32"
151
145
  }
152
146
  ],
153
- "name": "getBook",
147
+ "name": "getLinkedSigner",
154
148
  "outputs": [
155
149
  {
156
150
  "internalType": "address",
@@ -161,6 +155,41 @@
161
155
  "stateMutability": "view",
162
156
  "type": "function"
163
157
  },
158
+ {
159
+ "inputs": [],
160
+ "name": "getNlpPools",
161
+ "outputs": [
162
+ {
163
+ "components": [
164
+ {
165
+ "internalType": "uint64",
166
+ "name": "poolId",
167
+ "type": "uint64"
168
+ },
169
+ {
170
+ "internalType": "bytes32",
171
+ "name": "subaccount",
172
+ "type": "bytes32"
173
+ },
174
+ {
175
+ "internalType": "address",
176
+ "name": "owner",
177
+ "type": "address"
178
+ },
179
+ {
180
+ "internalType": "uint128",
181
+ "name": "balanceWeightX18",
182
+ "type": "uint128"
183
+ }
184
+ ],
185
+ "internalType": "struct IEndpoint.NlpPool[]",
186
+ "name": "",
187
+ "type": "tuple[]"
188
+ }
189
+ ],
190
+ "stateMutability": "view",
191
+ "type": "function"
192
+ },
164
193
  {
165
194
  "inputs": [
166
195
  {
@@ -180,6 +209,19 @@
180
209
  "stateMutability": "view",
181
210
  "type": "function"
182
211
  },
212
+ {
213
+ "inputs": [],
214
+ "name": "getOffchainExchange",
215
+ "outputs": [
216
+ {
217
+ "internalType": "address",
218
+ "name": "",
219
+ "type": "address"
220
+ }
221
+ ],
222
+ "stateMutability": "view",
223
+ "type": "function"
224
+ },
183
225
  {
184
226
  "inputs": [
185
227
  {
@@ -192,52 +234,67 @@
192
234
  "outputs": [
193
235
  {
194
236
  "internalType": "int128",
195
- "name": "priceX18",
237
+ "name": "_priceX18",
196
238
  "type": "int128"
197
239
  }
198
240
  ],
199
241
  "stateMutability": "view",
200
242
  "type": "function"
201
243
  },
244
+ {
245
+ "inputs": [],
246
+ "name": "getSequencer",
247
+ "outputs": [
248
+ {
249
+ "internalType": "address",
250
+ "name": "",
251
+ "type": "address"
252
+ }
253
+ ],
254
+ "stateMutability": "view",
255
+ "type": "function"
256
+ },
202
257
  {
203
258
  "inputs": [
204
259
  {
205
- "internalType": "uint32",
206
- "name": "healthGroup",
207
- "type": "uint32"
260
+ "internalType": "uint64",
261
+ "name": "idx",
262
+ "type": "uint64"
208
263
  }
209
264
  ],
210
- "name": "getPricesX18",
265
+ "name": "getSlowModeTx",
211
266
  "outputs": [
212
267
  {
213
268
  "components": [
214
269
  {
215
- "internalType": "int128",
216
- "name": "spotPriceX18",
217
- "type": "int128"
270
+ "internalType": "uint64",
271
+ "name": "executableAt",
272
+ "type": "uint64"
273
+ },
274
+ {
275
+ "internalType": "address",
276
+ "name": "sender",
277
+ "type": "address"
218
278
  },
219
279
  {
220
- "internalType": "int128",
221
- "name": "perpPriceX18",
222
- "type": "int128"
280
+ "internalType": "bytes",
281
+ "name": "tx",
282
+ "type": "bytes"
223
283
  }
224
284
  ],
225
- "internalType": "struct IEndpoint.Prices",
285
+ "internalType": "struct IEndpoint.SlowModeTx",
226
286
  "name": "",
227
287
  "type": "tuple"
228
- }
229
- ],
230
- "stateMutability": "view",
231
- "type": "function"
232
- },
233
- {
234
- "inputs": [],
235
- "name": "getSequencer",
236
- "outputs": [
288
+ },
237
289
  {
238
- "internalType": "address",
290
+ "internalType": "uint64",
239
291
  "name": "",
240
- "type": "address"
292
+ "type": "uint64"
293
+ },
294
+ {
295
+ "internalType": "uint64",
296
+ "name": "",
297
+ "type": "uint64"
241
298
  }
242
299
  ],
243
300
  "stateMutability": "view",
@@ -275,19 +332,6 @@
275
332
  "stateMutability": "view",
276
333
  "type": "function"
277
334
  },
278
- {
279
- "inputs": [],
280
- "name": "getVersion",
281
- "outputs": [
282
- {
283
- "internalType": "uint64",
284
- "name": "",
285
- "type": "uint64"
286
- }
287
- ],
288
- "stateMutability": "pure",
289
- "type": "function"
290
- },
291
335
  {
292
336
  "inputs": [
293
337
  {
@@ -301,23 +345,23 @@
301
345
  "type": "address"
302
346
  },
303
347
  {
304
- "internalType": "contract IClearinghouse",
305
- "name": "_clearinghouse",
348
+ "internalType": "address",
349
+ "name": "_offchainExchange",
306
350
  "type": "address"
307
351
  },
308
352
  {
309
- "internalType": "uint64",
310
- "name": "slowModeTimeout",
311
- "type": "uint64"
353
+ "internalType": "contract IClearinghouse",
354
+ "name": "_clearinghouse",
355
+ "type": "address"
312
356
  },
313
357
  {
314
- "internalType": "uint128",
315
- "name": "_time",
316
- "type": "uint128"
358
+ "internalType": "address",
359
+ "name": "_verifier",
360
+ "type": "address"
317
361
  },
318
362
  {
319
363
  "internalType": "int128[]",
320
- "name": "_prices",
364
+ "name": "initialPrices",
321
365
  "type": "int128[]"
322
366
  }
323
367
  ],
@@ -339,108 +383,35 @@
339
383
  "stateMutability": "view",
340
384
  "type": "function"
341
385
  },
342
- {
343
- "inputs": [],
344
- "name": "owner",
345
- "outputs": [
346
- {
347
- "internalType": "address",
348
- "name": "",
349
- "type": "address"
350
- }
351
- ],
352
- "stateMutability": "view",
353
- "type": "function"
354
- },
355
386
  {
356
387
  "inputs": [
357
388
  {
358
- "internalType": "address",
359
- "name": "sender",
360
- "type": "address"
361
- },
362
- {
363
- "internalType": "bytes",
364
- "name": "transaction",
365
- "type": "bytes"
366
- }
367
- ],
368
- "name": "processSlowModeTransaction",
369
- "outputs": [],
370
- "stateMutability": "nonpayable",
371
- "type": "function"
372
- },
373
- {
374
- "inputs": [
375
- {
376
- "internalType": "address",
389
+ "internalType": "uint256",
377
390
  "name": "",
378
- "type": "address"
391
+ "type": "uint256"
379
392
  }
380
393
  ],
381
- "name": "referralCodes",
394
+ "name": "nlpPools",
382
395
  "outputs": [
383
396
  {
384
- "internalType": "string",
385
- "name": "",
386
- "type": "string"
387
- }
388
- ],
389
- "stateMutability": "view",
390
- "type": "function"
391
- },
392
- {
393
- "inputs": [
394
- {
395
- "internalType": "address",
396
- "name": "wallet",
397
- "type": "address"
397
+ "internalType": "uint64",
398
+ "name": "poolId",
399
+ "type": "uint64"
398
400
  },
399
- {
400
- "internalType": "bool",
401
- "name": "transferable",
402
- "type": "bool"
403
- }
404
- ],
405
- "name": "registerTransferableWallet",
406
- "outputs": [],
407
- "stateMutability": "nonpayable",
408
- "type": "function"
409
- },
410
- {
411
- "inputs": [],
412
- "name": "renounceOwnership",
413
- "outputs": [],
414
- "stateMutability": "nonpayable",
415
- "type": "function"
416
- },
417
- {
418
- "inputs": [
419
401
  {
420
402
  "internalType": "bytes32",
421
403
  "name": "subaccount",
422
404
  "type": "bytes32"
423
- }
424
- ],
425
- "name": "requireSubaccount",
426
- "outputs": [],
427
- "stateMutability": "view",
428
- "type": "function"
429
- },
430
- {
431
- "inputs": [
405
+ },
432
406
  {
433
- "internalType": "uint32",
434
- "name": "",
435
- "type": "uint32"
436
- }
437
- ],
438
- "name": "sequencerFee",
439
- "outputs": [
407
+ "internalType": "address",
408
+ "name": "owner",
409
+ "type": "address"
410
+ },
440
411
  {
441
- "internalType": "int128",
442
- "name": "",
443
- "type": "int128"
412
+ "internalType": "uint128",
413
+ "name": "balanceWeightX18",
414
+ "type": "uint128"
444
415
  }
445
416
  ],
446
417
  "stateMutability": "view",
@@ -448,12 +419,12 @@
448
419
  },
449
420
  {
450
421
  "inputs": [],
451
- "name": "sequencerFees",
422
+ "name": "owner",
452
423
  "outputs": [
453
424
  {
454
- "internalType": "int128",
425
+ "internalType": "address",
455
426
  "name": "",
456
- "type": "int128"
427
+ "type": "address"
457
428
  }
458
429
  ],
459
430
  "stateMutability": "view",
@@ -461,18 +432,18 @@
461
432
  },
462
433
  {
463
434
  "inputs": [
464
- {
465
- "internalType": "uint32",
466
- "name": "productId",
467
- "type": "uint32"
468
- },
469
435
  {
470
436
  "internalType": "address",
471
- "name": "book",
437
+ "name": "sender",
472
438
  "type": "address"
439
+ },
440
+ {
441
+ "internalType": "bytes",
442
+ "name": "transaction",
443
+ "type": "bytes"
473
444
  }
474
445
  ],
475
- "name": "setBook",
446
+ "name": "processSlowModeTransaction",
476
447
  "outputs": [],
477
448
  "stateMutability": "nonpayable",
478
449
  "type": "function"
@@ -481,65 +452,26 @@
481
452
  "inputs": [
482
453
  {
483
454
  "internalType": "address",
484
- "name": "_sequencer",
455
+ "name": "",
485
456
  "type": "address"
486
457
  }
487
458
  ],
488
- "name": "setSequencer",
489
- "outputs": [],
490
- "stateMutability": "nonpayable",
491
- "type": "function"
492
- },
493
- {
494
- "inputs": [],
495
- "name": "slowModeConfig",
459
+ "name": "referralCodes",
496
460
  "outputs": [
497
461
  {
498
- "internalType": "uint64",
499
- "name": "timeout",
500
- "type": "uint64"
501
- },
502
- {
503
- "internalType": "uint64",
504
- "name": "txCount",
505
- "type": "uint64"
506
- },
507
- {
508
- "internalType": "uint64",
509
- "name": "txUpTo",
510
- "type": "uint64"
462
+ "internalType": "string",
463
+ "name": "",
464
+ "type": "string"
511
465
  }
512
466
  ],
513
467
  "stateMutability": "view",
514
468
  "type": "function"
515
469
  },
516
470
  {
517
- "inputs": [
518
- {
519
- "internalType": "uint64",
520
- "name": "",
521
- "type": "uint64"
522
- }
523
- ],
524
- "name": "slowModeTxs",
525
- "outputs": [
526
- {
527
- "internalType": "uint64",
528
- "name": "executableAt",
529
- "type": "uint64"
530
- },
531
- {
532
- "internalType": "address",
533
- "name": "sender",
534
- "type": "address"
535
- },
536
- {
537
- "internalType": "bytes",
538
- "name": "tx",
539
- "type": "bytes"
540
- }
541
- ],
542
- "stateMutability": "view",
471
+ "inputs": [],
472
+ "name": "renounceOwnership",
473
+ "outputs": [],
474
+ "stateMutability": "nonpayable",
543
475
  "type": "function"
544
476
  },
545
477
  {
@@ -555,19 +487,6 @@
555
487
  "stateMutability": "nonpayable",
556
488
  "type": "function"
557
489
  },
558
- {
559
- "inputs": [
560
- {
561
- "internalType": "bytes[]",
562
- "name": "transactions",
563
- "type": "bytes[]"
564
- }
565
- ],
566
- "name": "submitTransactions",
567
- "outputs": [],
568
- "stateMutability": "nonpayable",
569
- "type": "function"
570
- },
571
490
  {
572
491
  "inputs": [
573
492
  {
@@ -579,6 +498,21 @@
579
498
  "internalType": "bytes[]",
580
499
  "name": "transactions",
581
500
  "type": "bytes[]"
501
+ },
502
+ {
503
+ "internalType": "bytes32",
504
+ "name": "e",
505
+ "type": "bytes32"
506
+ },
507
+ {
508
+ "internalType": "bytes32",
509
+ "name": "s",
510
+ "type": "bytes32"
511
+ },
512
+ {
513
+ "internalType": "uint8",
514
+ "name": "signerBitmask",
515
+ "type": "uint8"
582
516
  }
583
517
  ],
584
518
  "name": "submitTransactionsChecked",
@@ -605,18 +539,7 @@
605
539
  }
606
540
  ],
607
541
  "name": "submitTransactionsCheckedWithGasLimit",
608
- "outputs": [
609
- {
610
- "internalType": "uint64",
611
- "name": "",
612
- "type": "uint64"
613
- },
614
- {
615
- "internalType": "uint256",
616
- "name": "",
617
- "type": "uint256"
618
- }
619
- ],
542
+ "outputs": [],
620
543
  "stateMutability": "nonpayable",
621
544
  "type": "function"
622
545
  },
@@ -633,4 +556,4 @@
633
556
  "stateMutability": "nonpayable",
634
557
  "type": "function"
635
558
  }
636
- ]
559
+ ]