nado-protocol 0.1.1__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.1.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.1.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.1.dist-info/RECORD +0 -78
  48. {nado_protocol-0.1.1.dist-info → nado_protocol-0.1.2.dist-info}/WHEEL +0 -0
@@ -1,536 +0,0 @@
1
- [
2
- {
3
- "anonymous": false,
4
- "inputs": [
5
- {
6
- "indexed": true,
7
- "internalType": "bytes32",
8
- "name": "digest",
9
- "type": "bytes32"
10
- },
11
- {
12
- "indexed": true,
13
- "internalType": "bytes32",
14
- "name": "subaccount",
15
- "type": "bytes32"
16
- },
17
- {
18
- "indexed": false,
19
- "internalType": "int128",
20
- "name": "priceX18",
21
- "type": "int128"
22
- },
23
- {
24
- "indexed": false,
25
- "internalType": "int128",
26
- "name": "amount",
27
- "type": "int128"
28
- },
29
- {
30
- "indexed": false,
31
- "internalType": "uint64",
32
- "name": "expiration",
33
- "type": "uint64"
34
- },
35
- {
36
- "indexed": false,
37
- "internalType": "uint64",
38
- "name": "nonce",
39
- "type": "uint64"
40
- },
41
- {
42
- "indexed": false,
43
- "internalType": "bool",
44
- "name": "isTaker",
45
- "type": "bool"
46
- },
47
- {
48
- "indexed": false,
49
- "internalType": "int128",
50
- "name": "feeAmount",
51
- "type": "int128"
52
- },
53
- {
54
- "indexed": false,
55
- "internalType": "int128",
56
- "name": "baseDelta",
57
- "type": "int128"
58
- },
59
- {
60
- "indexed": false,
61
- "internalType": "int128",
62
- "name": "quoteDelta",
63
- "type": "int128"
64
- }
65
- ],
66
- "name": "FillOrder",
67
- "type": "event"
68
- },
69
- {
70
- "inputs": [],
71
- "name": "claimSequencerFee",
72
- "outputs": [
73
- {
74
- "internalType": "int128",
75
- "name": "",
76
- "type": "int128"
77
- }
78
- ],
79
- "stateMutability": "nonpayable",
80
- "type": "function"
81
- },
82
- {
83
- "inputs": [],
84
- "name": "dumpFees",
85
- "outputs": [],
86
- "stateMutability": "nonpayable",
87
- "type": "function"
88
- },
89
- {
90
- "inputs": [
91
- {
92
- "components": [
93
- {
94
- "internalType": "bytes32",
95
- "name": "sender",
96
- "type": "bytes32"
97
- },
98
- {
99
- "internalType": "int128",
100
- "name": "priceX18",
101
- "type": "int128"
102
- },
103
- {
104
- "internalType": "int128",
105
- "name": "amount",
106
- "type": "int128"
107
- },
108
- {
109
- "internalType": "uint64",
110
- "name": "expiration",
111
- "type": "uint64"
112
- },
113
- {
114
- "internalType": "uint64",
115
- "name": "nonce",
116
- "type": "uint64"
117
- }
118
- ],
119
- "internalType": "struct IEndpoint.Order",
120
- "name": "order",
121
- "type": "tuple"
122
- }
123
- ],
124
- "name": "getDigest",
125
- "outputs": [
126
- {
127
- "internalType": "bytes32",
128
- "name": "",
129
- "type": "bytes32"
130
- }
131
- ],
132
- "stateMutability": "view",
133
- "type": "function"
134
- },
135
- {
136
- "inputs": [],
137
- "name": "getMarket",
138
- "outputs": [
139
- {
140
- "components": [
141
- {
142
- "internalType": "uint32",
143
- "name": "productId",
144
- "type": "uint32"
145
- },
146
- {
147
- "internalType": "int128",
148
- "name": "sizeIncrement",
149
- "type": "int128"
150
- },
151
- {
152
- "internalType": "int128",
153
- "name": "priceIncrementX18",
154
- "type": "int128"
155
- },
156
- {
157
- "internalType": "int128",
158
- "name": "lpSpreadX18",
159
- "type": "int128"
160
- },
161
- {
162
- "internalType": "int128",
163
- "name": "collectedFees",
164
- "type": "int128"
165
- },
166
- {
167
- "internalType": "int128",
168
- "name": "sequencerFees",
169
- "type": "int128"
170
- }
171
- ],
172
- "internalType": "struct IOffchainBook.Market",
173
- "name": "",
174
- "type": "tuple"
175
- }
176
- ],
177
- "stateMutability": "view",
178
- "type": "function"
179
- },
180
- {
181
- "inputs": [],
182
- "name": "getMinSize",
183
- "outputs": [
184
- {
185
- "internalType": "int128",
186
- "name": "",
187
- "type": "int128"
188
- }
189
- ],
190
- "stateMutability": "view",
191
- "type": "function"
192
- },
193
- {
194
- "inputs": [],
195
- "name": "getVersion",
196
- "outputs": [
197
- {
198
- "internalType": "uint64",
199
- "name": "",
200
- "type": "uint64"
201
- }
202
- ],
203
- "stateMutability": "nonpayable",
204
- "type": "function"
205
- },
206
- {
207
- "inputs": [
208
- {
209
- "internalType": "contract IClearinghouse",
210
- "name": "_clearinghouse",
211
- "type": "address"
212
- },
213
- {
214
- "internalType": "contract IProductEngine",
215
- "name": "_engine",
216
- "type": "address"
217
- },
218
- {
219
- "internalType": "address",
220
- "name": "_endpoint",
221
- "type": "address"
222
- },
223
- {
224
- "internalType": "address",
225
- "name": "_admin",
226
- "type": "address"
227
- },
228
- {
229
- "internalType": "contract IFeeCalculator",
230
- "name": "_fees",
231
- "type": "address"
232
- },
233
- {
234
- "internalType": "uint32",
235
- "name": "_productId",
236
- "type": "uint32"
237
- },
238
- {
239
- "internalType": "int128",
240
- "name": "_sizeIncrement",
241
- "type": "int128"
242
- },
243
- {
244
- "internalType": "int128",
245
- "name": "_priceIncrementX18",
246
- "type": "int128"
247
- },
248
- {
249
- "internalType": "int128",
250
- "name": "_minSize",
251
- "type": "int128"
252
- },
253
- {
254
- "internalType": "int128",
255
- "name": "_lpSpreadX18",
256
- "type": "int128"
257
- }
258
- ],
259
- "name": "initialize",
260
- "outputs": [],
261
- "stateMutability": "nonpayable",
262
- "type": "function"
263
- },
264
- {
265
- "inputs": [
266
- {
267
- "components": [
268
- {
269
- "internalType": "uint32",
270
- "name": "productId",
271
- "type": "uint32"
272
- },
273
- {
274
- "internalType": "int128",
275
- "name": "baseDelta",
276
- "type": "int128"
277
- },
278
- {
279
- "internalType": "int128",
280
- "name": "quoteDelta",
281
- "type": "int128"
282
- },
283
- {
284
- "components": [
285
- {
286
- "components": [
287
- {
288
- "internalType": "bytes32",
289
- "name": "sender",
290
- "type": "bytes32"
291
- },
292
- {
293
- "internalType": "int128",
294
- "name": "priceX18",
295
- "type": "int128"
296
- },
297
- {
298
- "internalType": "int128",
299
- "name": "amount",
300
- "type": "int128"
301
- },
302
- {
303
- "internalType": "uint64",
304
- "name": "expiration",
305
- "type": "uint64"
306
- },
307
- {
308
- "internalType": "uint64",
309
- "name": "nonce",
310
- "type": "uint64"
311
- }
312
- ],
313
- "internalType": "struct IEndpoint.Order",
314
- "name": "order",
315
- "type": "tuple"
316
- },
317
- {
318
- "internalType": "bytes",
319
- "name": "signature",
320
- "type": "bytes"
321
- }
322
- ],
323
- "internalType": "struct IEndpoint.SignedOrder",
324
- "name": "taker",
325
- "type": "tuple"
326
- }
327
- ],
328
- "internalType": "struct IEndpoint.MatchOrderAMM",
329
- "name": "tx",
330
- "type": "tuple"
331
- },
332
- {
333
- "internalType": "address",
334
- "name": "takerLinkedSigner",
335
- "type": "address"
336
- }
337
- ],
338
- "name": "matchOrderAMM",
339
- "outputs": [],
340
- "stateMutability": "nonpayable",
341
- "type": "function"
342
- },
343
- {
344
- "inputs": [
345
- {
346
- "components": [
347
- {
348
- "components": [
349
- {
350
- "internalType": "uint32",
351
- "name": "productId",
352
- "type": "uint32"
353
- },
354
- {
355
- "internalType": "bool",
356
- "name": "amm",
357
- "type": "bool"
358
- },
359
- {
360
- "components": [
361
- {
362
- "components": [
363
- {
364
- "internalType": "bytes32",
365
- "name": "sender",
366
- "type": "bytes32"
367
- },
368
- {
369
- "internalType": "int128",
370
- "name": "priceX18",
371
- "type": "int128"
372
- },
373
- {
374
- "internalType": "int128",
375
- "name": "amount",
376
- "type": "int128"
377
- },
378
- {
379
- "internalType": "uint64",
380
- "name": "expiration",
381
- "type": "uint64"
382
- },
383
- {
384
- "internalType": "uint64",
385
- "name": "nonce",
386
- "type": "uint64"
387
- }
388
- ],
389
- "internalType": "struct IEndpoint.Order",
390
- "name": "order",
391
- "type": "tuple"
392
- },
393
- {
394
- "internalType": "bytes",
395
- "name": "signature",
396
- "type": "bytes"
397
- }
398
- ],
399
- "internalType": "struct IEndpoint.SignedOrder",
400
- "name": "taker",
401
- "type": "tuple"
402
- },
403
- {
404
- "components": [
405
- {
406
- "components": [
407
- {
408
- "internalType": "bytes32",
409
- "name": "sender",
410
- "type": "bytes32"
411
- },
412
- {
413
- "internalType": "int128",
414
- "name": "priceX18",
415
- "type": "int128"
416
- },
417
- {
418
- "internalType": "int128",
419
- "name": "amount",
420
- "type": "int128"
421
- },
422
- {
423
- "internalType": "uint64",
424
- "name": "expiration",
425
- "type": "uint64"
426
- },
427
- {
428
- "internalType": "uint64",
429
- "name": "nonce",
430
- "type": "uint64"
431
- }
432
- ],
433
- "internalType": "struct IEndpoint.Order",
434
- "name": "order",
435
- "type": "tuple"
436
- },
437
- {
438
- "internalType": "bytes",
439
- "name": "signature",
440
- "type": "bytes"
441
- }
442
- ],
443
- "internalType": "struct IEndpoint.SignedOrder",
444
- "name": "maker",
445
- "type": "tuple"
446
- }
447
- ],
448
- "internalType": "struct IEndpoint.MatchOrders",
449
- "name": "matchOrders",
450
- "type": "tuple"
451
- },
452
- {
453
- "internalType": "address",
454
- "name": "takerLinkedSigner",
455
- "type": "address"
456
- },
457
- {
458
- "internalType": "address",
459
- "name": "makerLinkedSigner",
460
- "type": "address"
461
- }
462
- ],
463
- "internalType": "struct IEndpoint.MatchOrdersWithSigner",
464
- "name": "tx",
465
- "type": "tuple"
466
- }
467
- ],
468
- "name": "matchOrders",
469
- "outputs": [],
470
- "stateMutability": "nonpayable",
471
- "type": "function"
472
- },
473
- {
474
- "inputs": [
475
- {
476
- "internalType": "int128",
477
- "name": "_sizeIncrement",
478
- "type": "int128"
479
- },
480
- {
481
- "internalType": "int128",
482
- "name": "_priceIncrementX18",
483
- "type": "int128"
484
- },
485
- {
486
- "internalType": "int128",
487
- "name": "_minSize",
488
- "type": "int128"
489
- },
490
- {
491
- "internalType": "int128",
492
- "name": "_lpSpreadX18",
493
- "type": "int128"
494
- }
495
- ],
496
- "name": "modifyConfig",
497
- "outputs": [],
498
- "stateMutability": "nonpayable",
499
- "type": "function"
500
- },
501
- {
502
- "inputs": [
503
- {
504
- "components": [
505
- {
506
- "internalType": "bytes32",
507
- "name": "sender",
508
- "type": "bytes32"
509
- },
510
- {
511
- "internalType": "uint32",
512
- "name": "productId",
513
- "type": "uint32"
514
- },
515
- {
516
- "internalType": "int128",
517
- "name": "amount",
518
- "type": "int128"
519
- },
520
- {
521
- "internalType": "int128",
522
- "name": "priceX18",
523
- "type": "int128"
524
- }
525
- ],
526
- "internalType": "struct IEndpoint.SwapAMM",
527
- "name": "tx",
528
- "type": "tuple"
529
- }
530
- ],
531
- "name": "swapAMM",
532
- "outputs": [],
533
- "stateMutability": "nonpayable",
534
- "type": "function"
535
- }
536
- ]
@@ -1,138 +0,0 @@
1
- [
2
- {
3
- "anonymous": false,
4
- "inputs": [
5
- {
6
- "indexed": true,
7
- "internalType": "address",
8
- "name": "account",
9
- "type": "address"
10
- },
11
- {
12
- "indexed": false,
13
- "internalType": "uint32",
14
- "name": "epoch",
15
- "type": "uint32"
16
- },
17
- {
18
- "indexed": false,
19
- "internalType": "uint256",
20
- "name": "amount",
21
- "type": "uint256"
22
- }
23
- ],
24
- "name": "ClaimVrtx",
25
- "type": "event"
26
- },
27
- {
28
- "inputs": [
29
- {
30
- "internalType": "uint32",
31
- "name": "epoch",
32
- "type": "uint32"
33
- },
34
- {
35
- "internalType": "uint256",
36
- "name": "amount",
37
- "type": "uint256"
38
- },
39
- {
40
- "internalType": "uint256",
41
- "name": "totalAmount",
42
- "type": "uint256"
43
- },
44
- {
45
- "internalType": "bytes32[]",
46
- "name": "proof",
47
- "type": "bytes32[]"
48
- }
49
- ],
50
- "name": "claim",
51
- "outputs": [],
52
- "stateMutability": "nonpayable",
53
- "type": "function"
54
- },
55
- {
56
- "inputs": [
57
- {
58
- "internalType": "uint32",
59
- "name": "epoch",
60
- "type": "uint32"
61
- },
62
- {
63
- "internalType": "uint256",
64
- "name": "amount",
65
- "type": "uint256"
66
- },
67
- {
68
- "internalType": "uint256",
69
- "name": "totalAmount",
70
- "type": "uint256"
71
- },
72
- {
73
- "internalType": "bytes32[]",
74
- "name": "proof",
75
- "type": "bytes32[]"
76
- }
77
- ],
78
- "name": "claimAndStake",
79
- "outputs": [],
80
- "stateMutability": "nonpayable",
81
- "type": "function"
82
- },
83
- {
84
- "inputs": [
85
- {
86
- "internalType": "uint256",
87
- "name": "amount",
88
- "type": "uint256"
89
- },
90
- {
91
- "internalType": "uint256",
92
- "name": "totalAmount",
93
- "type": "uint256"
94
- },
95
- {
96
- "internalType": "bytes32[]",
97
- "name": "proof",
98
- "type": "bytes32[]"
99
- }
100
- ],
101
- "name": "claimToLBA",
102
- "outputs": [],
103
- "stateMutability": "nonpayable",
104
- "type": "function"
105
- },
106
- {
107
- "inputs": [
108
- {
109
- "internalType": "address",
110
- "name": "account",
111
- "type": "address"
112
- }
113
- ],
114
- "name": "getClaimed",
115
- "outputs": [
116
- {
117
- "internalType": "uint256[]",
118
- "name": "",
119
- "type": "uint256[]"
120
- }
121
- ],
122
- "stateMutability": "view",
123
- "type": "function"
124
- },
125
- {
126
- "inputs": [],
127
- "name": "getClaimingDeadlines",
128
- "outputs": [
129
- {
130
- "internalType": "uint64[]",
131
- "name": "",
132
- "type": "uint64[]"
133
- }
134
- ],
135
- "stateMutability": "view",
136
- "type": "function"
137
- }
138
- ]