nado-protocol 0.2.3__py3-none-any.whl → 0.2.5__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.
- nado_protocol/client/__init__.py +11 -0
- nado_protocol/contracts/deployments/deployment.mainnet.json +15 -0
- nado_protocol/contracts/types.py +4 -0
- nado_protocol/engine_client/types/execute.py +68 -3
- nado_protocol/indexer_client/types/query.py +36 -4
- nado_protocol/trigger_client/types/execute.py +54 -3
- nado_protocol/utils/backend.py +5 -0
- {nado_protocol-0.2.3.dist-info → nado_protocol-0.2.5.dist-info}/METADATA +1 -1
- {nado_protocol-0.2.3.dist-info → nado_protocol-0.2.5.dist-info}/RECORD +11 -10
- {nado_protocol-0.2.3.dist-info → nado_protocol-0.2.5.dist-info}/WHEEL +0 -0
- {nado_protocol-0.2.3.dist-info → nado_protocol-0.2.5.dist-info}/entry_points.txt +0 -0
nado_protocol/client/__init__.py
CHANGED
|
@@ -24,6 +24,8 @@ class NadoClientMode(StrEnum):
|
|
|
24
24
|
NadoClientMode is an enumeration representing the operational modes of the NadoClient.
|
|
25
25
|
|
|
26
26
|
Attributes:
|
|
27
|
+
MAINNET: For operating in Nado's mainnet environment deployed on Ink.
|
|
28
|
+
|
|
27
29
|
DEVNET: For local development.
|
|
28
30
|
|
|
29
31
|
TESTING: For running tests.
|
|
@@ -36,6 +38,9 @@ class NadoClientMode(StrEnum):
|
|
|
36
38
|
# testnet
|
|
37
39
|
TESTNET = "testnet" # Ink Sepolia
|
|
38
40
|
|
|
41
|
+
# mainnet
|
|
42
|
+
MAINNET = "mainnet" # Ink Mainnet
|
|
43
|
+
|
|
39
44
|
|
|
40
45
|
class NadoClient:
|
|
41
46
|
"""
|
|
@@ -194,6 +199,12 @@ def client_mode_to_setup(
|
|
|
194
199
|
NadoBackendURL.TESTNET_TRIGGER.value,
|
|
195
200
|
NadoNetwork.TESTNET.value,
|
|
196
201
|
),
|
|
202
|
+
NadoClientMode.MAINNET: (
|
|
203
|
+
NadoBackendURL.MAINNET_GATEWAY.value,
|
|
204
|
+
NadoBackendURL.MAINNET_INDEXER.value,
|
|
205
|
+
NadoBackendURL.MAINNET_TRIGGER.value,
|
|
206
|
+
NadoNetwork.MAINNET.value,
|
|
207
|
+
),
|
|
197
208
|
}[client_mode]
|
|
198
209
|
except KeyError:
|
|
199
210
|
raise Exception(f"Mode provided `{client_mode}` not supported!")
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"publicNodeUrl": "https://ink.drpc.org",
|
|
3
|
+
"explorerUrl": "https://explorer.inkonchain.com",
|
|
4
|
+
"startBlock": 29851015,
|
|
5
|
+
"deployer": "0xC1cC56caB60e832665E6c3780BfEBe3C1C971603",
|
|
6
|
+
"quote": "0x0200C29006150606B650577BBE7B6248F58470c1",
|
|
7
|
+
"querier": "0x68798229F88251b31D534733D6C4098318c9dff8",
|
|
8
|
+
"clearinghouse": "0xD218103918C19D0A10cf35300E4CfAfbD444c5fE",
|
|
9
|
+
"endpoint": "0x05ec92D78ED421f3D3Ada77FFdE167106565974E",
|
|
10
|
+
"spotEngine": "0xFcD94770B95fd9Cc67143132BB172EB17A0907fE",
|
|
11
|
+
"perpEngine": "0xF8599D58d1137fC56EcDd9C16ee139C8BDf96da1",
|
|
12
|
+
"airdrop": "0x0000000000000000000000000000000000000000",
|
|
13
|
+
"staking": "0x0000000000000000000000000000000000000000",
|
|
14
|
+
"foundationRewardsAirdrop": "0x0000000000000000000000000000000000000000"
|
|
15
|
+
}
|
nado_protocol/contracts/types.py
CHANGED
|
@@ -17,6 +17,9 @@ class NadoNetwork(StrEnum):
|
|
|
17
17
|
# testnet
|
|
18
18
|
TESTNET = "testnet" # Ink Sepolia
|
|
19
19
|
|
|
20
|
+
# mainnet
|
|
21
|
+
MAINNET = "mainnet" # Ink Mainnet
|
|
22
|
+
|
|
20
23
|
|
|
21
24
|
class NadoAbiName(StrEnum):
|
|
22
25
|
"""
|
|
@@ -122,6 +125,7 @@ class NadoExecuteType(StrEnum):
|
|
|
122
125
|
"""
|
|
123
126
|
|
|
124
127
|
PLACE_ORDER = "place_order"
|
|
128
|
+
PLACE_ORDERS = "place_orders"
|
|
125
129
|
CANCEL_ORDERS = "cancel_orders"
|
|
126
130
|
CANCEL_PRODUCT_ORDERS = "cancel_product_orders"
|
|
127
131
|
CANCEL_AND_PLACE = "cancel_and_place"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Optional, Type, Union
|
|
1
|
+
from typing import Optional, Type, Union, Sequence
|
|
2
2
|
from pydantic import validator
|
|
3
3
|
from nado_protocol.contracts.types import NadoExecuteType
|
|
4
4
|
from nado_protocol.engine_client.types.models import ResponseStatus
|
|
@@ -44,6 +44,21 @@ class PlaceOrderParams(SignatureParams):
|
|
|
44
44
|
spot_leverage: Optional[bool]
|
|
45
45
|
|
|
46
46
|
|
|
47
|
+
class PlaceOrdersParams(NadoBaseModel):
|
|
48
|
+
"""
|
|
49
|
+
Class for defining the parameters needed to place multiple orders in a single request.
|
|
50
|
+
|
|
51
|
+
Attributes:
|
|
52
|
+
orders (list[PlaceOrderParams]): Array of orders to place.
|
|
53
|
+
|
|
54
|
+
stop_on_failure (Optional[bool]): If true, stops processing remaining orders when the first order fails.
|
|
55
|
+
Already successfully placed orders are NOT cancelled. Defaults to false.
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
orders: Sequence[PlaceOrderParams]
|
|
59
|
+
stop_on_failure: Optional[bool]
|
|
60
|
+
|
|
61
|
+
|
|
47
62
|
class PlaceMarketOrderParams(SignatureParams):
|
|
48
63
|
"""
|
|
49
64
|
Class for defining the parameters needed to place a market order.
|
|
@@ -215,6 +230,7 @@ class LinkSignerParams(BaseParamsSigned):
|
|
|
215
230
|
|
|
216
231
|
ExecuteParams = Union[
|
|
217
232
|
PlaceOrderParams,
|
|
233
|
+
PlaceOrdersParams,
|
|
218
234
|
CancelOrdersParams,
|
|
219
235
|
CancelProductOrdersParams,
|
|
220
236
|
WithdrawCollateralParams,
|
|
@@ -244,7 +260,7 @@ class PlaceOrderRequest(NadoBaseModel):
|
|
|
244
260
|
if v.order.nonce is None:
|
|
245
261
|
raise ValueError("Missing order `nonce`")
|
|
246
262
|
if v.signature is None:
|
|
247
|
-
raise ValueError("Missing `signature")
|
|
263
|
+
raise ValueError("Missing `signature`")
|
|
248
264
|
if isinstance(v.order.sender, bytes):
|
|
249
265
|
v.order.serialize_dict(["sender"], bytes32_to_hex)
|
|
250
266
|
v.order.serialize_dict(
|
|
@@ -253,6 +269,34 @@ class PlaceOrderRequest(NadoBaseModel):
|
|
|
253
269
|
return v
|
|
254
270
|
|
|
255
271
|
|
|
272
|
+
class PlaceOrdersRequest(NadoBaseModel):
|
|
273
|
+
"""
|
|
274
|
+
Parameters for a request to place multiple orders.
|
|
275
|
+
|
|
276
|
+
Attributes:
|
|
277
|
+
place_orders (PlaceOrdersParams): The parameters for the orders to be placed.
|
|
278
|
+
|
|
279
|
+
Methods:
|
|
280
|
+
serialize: Validates and serializes the order parameters.
|
|
281
|
+
"""
|
|
282
|
+
|
|
283
|
+
place_orders: PlaceOrdersParams
|
|
284
|
+
|
|
285
|
+
@validator("place_orders")
|
|
286
|
+
def serialize(cls, v: PlaceOrdersParams) -> PlaceOrdersParams:
|
|
287
|
+
for order_params in v.orders:
|
|
288
|
+
if order_params.order.nonce is None:
|
|
289
|
+
raise ValueError("Missing order `nonce`")
|
|
290
|
+
if order_params.signature is None:
|
|
291
|
+
raise ValueError("Missing `signature`")
|
|
292
|
+
if isinstance(order_params.order.sender, bytes):
|
|
293
|
+
order_params.order.serialize_dict(["sender"], bytes32_to_hex)
|
|
294
|
+
order_params.order.serialize_dict(
|
|
295
|
+
["nonce", "priceX18", "amount", "expiration", "appendix"], str
|
|
296
|
+
)
|
|
297
|
+
return v
|
|
298
|
+
|
|
299
|
+
|
|
256
300
|
class TxRequest(NadoBaseModel):
|
|
257
301
|
"""
|
|
258
302
|
Parameters for a transaction request.
|
|
@@ -511,6 +555,7 @@ class LinkSignerRequest(NadoBaseModel):
|
|
|
511
555
|
|
|
512
556
|
ExecuteRequest = Union[
|
|
513
557
|
PlaceOrderRequest,
|
|
558
|
+
PlaceOrdersRequest,
|
|
514
559
|
CancelOrdersRequest,
|
|
515
560
|
CancelProductOrdersRequest,
|
|
516
561
|
CancelAndPlaceRequest,
|
|
@@ -530,6 +575,23 @@ class PlaceOrderResponse(NadoBaseModel):
|
|
|
530
575
|
digest: str
|
|
531
576
|
|
|
532
577
|
|
|
578
|
+
class PlaceOrdersItemResponse(NadoBaseModel):
|
|
579
|
+
"""
|
|
580
|
+
Data model for a single order in place orders response.
|
|
581
|
+
"""
|
|
582
|
+
|
|
583
|
+
digest: Optional[str]
|
|
584
|
+
error: Optional[str]
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
class PlaceOrdersResponse(NadoBaseModel):
|
|
588
|
+
"""
|
|
589
|
+
Data model for place orders response.
|
|
590
|
+
"""
|
|
591
|
+
|
|
592
|
+
place_orders: list[PlaceOrdersItemResponse]
|
|
593
|
+
|
|
594
|
+
|
|
533
595
|
class CancelOrdersResponse(NadoBaseModel):
|
|
534
596
|
"""
|
|
535
597
|
Data model for cancelled orders response.
|
|
@@ -538,7 +600,9 @@ class CancelOrdersResponse(NadoBaseModel):
|
|
|
538
600
|
cancelled_orders: list[OrderData]
|
|
539
601
|
|
|
540
602
|
|
|
541
|
-
ExecuteResponseData = Union[
|
|
603
|
+
ExecuteResponseData = Union[
|
|
604
|
+
PlaceOrderResponse, PlaceOrdersResponse, CancelOrdersResponse
|
|
605
|
+
]
|
|
542
606
|
|
|
543
607
|
|
|
544
608
|
class ExecuteResponse(NadoBaseModel):
|
|
@@ -585,6 +649,7 @@ def to_execute_request(params: ExecuteParams) -> ExecuteRequest:
|
|
|
585
649
|
"""
|
|
586
650
|
execute_request_mapping = {
|
|
587
651
|
PlaceOrderParams: (PlaceOrderRequest, NadoExecuteType.PLACE_ORDER.value),
|
|
652
|
+
PlaceOrdersParams: (PlaceOrdersRequest, NadoExecuteType.PLACE_ORDERS.value),
|
|
588
653
|
CancelOrdersParams: (
|
|
589
654
|
CancelOrdersRequest,
|
|
590
655
|
NadoExecuteType.CANCEL_ORDERS.value,
|
|
@@ -54,6 +54,7 @@ class IndexerQueryType(StrEnum):
|
|
|
54
54
|
TOKEN_MERKLE_PROOFS = "token_merkle_proofs"
|
|
55
55
|
FOUNDATION_REWARDS_MERKLE_PROOFS = "foundation_rewards_merkle_proofs"
|
|
56
56
|
INTEREST_AND_FUNDING = "interest_and_funding"
|
|
57
|
+
INK_AIRDROP = "ink_airdrop"
|
|
57
58
|
|
|
58
59
|
|
|
59
60
|
class IndexerBaseParams(NadoBaseModel):
|
|
@@ -71,10 +72,10 @@ class IndexerBaseParams(NadoBaseModel):
|
|
|
71
72
|
|
|
72
73
|
class IndexerSubaccountHistoricalOrdersParams(IndexerBaseParams):
|
|
73
74
|
"""
|
|
74
|
-
Parameters for querying historical orders by
|
|
75
|
+
Parameters for querying historical orders by subaccounts.
|
|
75
76
|
"""
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
subaccounts: Optional[list[str]]
|
|
78
79
|
product_ids: Optional[list[int]]
|
|
79
80
|
trigger_types: Optional[list[str]]
|
|
80
81
|
isolated: Optional[bool]
|
|
@@ -93,7 +94,7 @@ class IndexerMatchesParams(IndexerBaseParams):
|
|
|
93
94
|
Parameters for querying matches.
|
|
94
95
|
"""
|
|
95
96
|
|
|
96
|
-
|
|
97
|
+
subaccounts: Optional[list[str]]
|
|
97
98
|
product_ids: Optional[list[int]]
|
|
98
99
|
isolated: Optional[bool]
|
|
99
100
|
|
|
@@ -122,7 +123,7 @@ class IndexerEventsParams(IndexerBaseParams):
|
|
|
122
123
|
Parameters for querying events.
|
|
123
124
|
"""
|
|
124
125
|
|
|
125
|
-
|
|
126
|
+
subaccounts: Optional[list[str]]
|
|
126
127
|
product_ids: Optional[list[int]]
|
|
127
128
|
event_types: Optional[list[IndexerEventType]]
|
|
128
129
|
isolated: Optional[bool]
|
|
@@ -304,6 +305,14 @@ class IndexerAccountSnapshotsParams(NadoBaseModel):
|
|
|
304
305
|
active: Optional[bool] = None
|
|
305
306
|
|
|
306
307
|
|
|
308
|
+
class IndexerInkAirdropParams(NadoBaseModel):
|
|
309
|
+
"""
|
|
310
|
+
Parameters for querying Ink airdrop allocation.
|
|
311
|
+
"""
|
|
312
|
+
|
|
313
|
+
address: str
|
|
314
|
+
|
|
315
|
+
|
|
307
316
|
IndexerParams = Union[
|
|
308
317
|
IndexerSubaccountHistoricalOrdersParams,
|
|
309
318
|
IndexerHistoricalOrdersByDigestParams,
|
|
@@ -327,6 +336,7 @@ IndexerParams = Union[
|
|
|
327
336
|
IndexerFoundationRewardsMerkleProofsParams,
|
|
328
337
|
IndexerInterestAndFundingParams,
|
|
329
338
|
IndexerAccountSnapshotsParams,
|
|
339
|
+
IndexerInkAirdropParams,
|
|
330
340
|
]
|
|
331
341
|
|
|
332
342
|
|
|
@@ -508,6 +518,14 @@ class IndexerAccountSnapshotsRequest(NadoBaseModel):
|
|
|
508
518
|
account_snapshots: IndexerAccountSnapshotsParams
|
|
509
519
|
|
|
510
520
|
|
|
521
|
+
class IndexerInkAirdropRequest(NadoBaseModel):
|
|
522
|
+
"""
|
|
523
|
+
Request object for querying Ink airdrop allocation.
|
|
524
|
+
"""
|
|
525
|
+
|
|
526
|
+
ink_airdrop: IndexerInkAirdropParams
|
|
527
|
+
|
|
528
|
+
|
|
511
529
|
IndexerRequest = Union[
|
|
512
530
|
IndexerHistoricalOrdersRequest,
|
|
513
531
|
IndexerMatchesRequest,
|
|
@@ -530,6 +548,7 @@ IndexerRequest = Union[
|
|
|
530
548
|
IndexerFoundationRewardsMerkleProofsRequest,
|
|
531
549
|
IndexerInterestAndFundingRequest,
|
|
532
550
|
IndexerAccountSnapshotsRequest,
|
|
551
|
+
IndexerInkAirdropRequest,
|
|
533
552
|
]
|
|
534
553
|
|
|
535
554
|
|
|
@@ -711,6 +730,14 @@ class IndexerAccountSnapshotsData(NadoBaseModel):
|
|
|
711
730
|
snapshots: Dict[str, Dict[str, list[IndexerEvent]]]
|
|
712
731
|
|
|
713
732
|
|
|
733
|
+
class IndexerInkAirdropData(NadoBaseModel):
|
|
734
|
+
"""
|
|
735
|
+
Data object for Ink airdrop allocation.
|
|
736
|
+
"""
|
|
737
|
+
|
|
738
|
+
amount: str
|
|
739
|
+
|
|
740
|
+
|
|
714
741
|
IndexerResponseData = Union[
|
|
715
742
|
IndexerHistoricalOrdersData,
|
|
716
743
|
IndexerMatchesData,
|
|
@@ -733,6 +760,7 @@ IndexerResponseData = Union[
|
|
|
733
760
|
IndexerLiquidationFeedData,
|
|
734
761
|
IndexerFundingRatesData,
|
|
735
762
|
IndexerAccountSnapshotsData,
|
|
763
|
+
IndexerInkAirdropData,
|
|
736
764
|
]
|
|
737
765
|
|
|
738
766
|
|
|
@@ -844,6 +872,10 @@ def to_indexer_request(params: IndexerParams) -> IndexerRequest:
|
|
|
844
872
|
IndexerAccountSnapshotsRequest,
|
|
845
873
|
IndexerQueryType.ACCOUNT_SNAPSHOTS.value,
|
|
846
874
|
),
|
|
875
|
+
IndexerInkAirdropParams: (
|
|
876
|
+
IndexerInkAirdropRequest,
|
|
877
|
+
IndexerQueryType.INK_AIRDROP.value,
|
|
878
|
+
),
|
|
847
879
|
}
|
|
848
880
|
|
|
849
881
|
RequestClass, field_name = indexer_request_mapping[type(params)]
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
from typing import Union
|
|
1
|
+
from typing import Union, Sequence
|
|
2
2
|
from pydantic import validator
|
|
3
3
|
from nado_protocol.contracts.types import NadoExecuteType
|
|
4
4
|
from nado_protocol.utils.bytes32 import bytes32_to_hex
|
|
5
5
|
from nado_protocol.utils.model import NadoBaseModel
|
|
6
6
|
from nado_protocol.engine_client.types.execute import (
|
|
7
7
|
PlaceOrderParams,
|
|
8
|
+
PlaceOrdersParams,
|
|
8
9
|
CancelOrdersParams,
|
|
9
10
|
CancelProductOrdersParams,
|
|
10
11
|
CancelOrdersRequest,
|
|
@@ -17,11 +18,28 @@ class PlaceTriggerOrderParams(PlaceOrderParams):
|
|
|
17
18
|
trigger: TriggerCriteria
|
|
18
19
|
|
|
19
20
|
|
|
21
|
+
class PlaceTriggerOrdersParams(PlaceOrdersParams):
|
|
22
|
+
"""
|
|
23
|
+
Class for defining the parameters needed to place multiple trigger orders in a single request.
|
|
24
|
+
|
|
25
|
+
Attributes:
|
|
26
|
+
orders (list[PlaceTriggerOrderParams]): Array of trigger orders to place.
|
|
27
|
+
|
|
28
|
+
stop_on_failure (Optional[bool]): If true, stops processing remaining orders when the first order fails.
|
|
29
|
+
Already successfully placed orders are NOT cancelled. Defaults to false.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
orders: Sequence[PlaceTriggerOrderParams]
|
|
33
|
+
|
|
34
|
+
|
|
20
35
|
CancelTriggerOrdersParams = CancelOrdersParams
|
|
21
36
|
CancelProductTriggerOrdersParams = CancelProductOrdersParams
|
|
22
37
|
|
|
23
38
|
TriggerExecuteParams = Union[
|
|
24
|
-
PlaceTriggerOrderParams,
|
|
39
|
+
PlaceTriggerOrderParams,
|
|
40
|
+
PlaceTriggerOrdersParams,
|
|
41
|
+
CancelTriggerOrdersParams,
|
|
42
|
+
CancelProductTriggerOrdersParams,
|
|
25
43
|
]
|
|
26
44
|
|
|
27
45
|
|
|
@@ -43,7 +61,7 @@ class PlaceTriggerOrderRequest(NadoBaseModel):
|
|
|
43
61
|
if v.order.nonce is None:
|
|
44
62
|
raise ValueError("Missing order `nonce`")
|
|
45
63
|
if v.signature is None:
|
|
46
|
-
raise ValueError("Missing `signature")
|
|
64
|
+
raise ValueError("Missing `signature`")
|
|
47
65
|
if isinstance(v.order.sender, bytes):
|
|
48
66
|
v.order.serialize_dict(["sender"], bytes32_to_hex)
|
|
49
67
|
v.order.serialize_dict(
|
|
@@ -52,11 +70,40 @@ class PlaceTriggerOrderRequest(NadoBaseModel):
|
|
|
52
70
|
return v
|
|
53
71
|
|
|
54
72
|
|
|
73
|
+
class PlaceTriggerOrdersRequest(NadoBaseModel):
|
|
74
|
+
"""
|
|
75
|
+
Parameters for a request to place multiple trigger orders.
|
|
76
|
+
|
|
77
|
+
Attributes:
|
|
78
|
+
place_orders (PlaceTriggerOrdersParams): The parameters for the trigger orders to be placed.
|
|
79
|
+
|
|
80
|
+
Methods:
|
|
81
|
+
serialize: Validates and serializes the order parameters.
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
place_orders: PlaceTriggerOrdersParams
|
|
85
|
+
|
|
86
|
+
@validator("place_orders")
|
|
87
|
+
def serialize(cls, v: PlaceTriggerOrdersParams) -> PlaceTriggerOrdersParams:
|
|
88
|
+
for order_params in v.orders:
|
|
89
|
+
if order_params.order.nonce is None:
|
|
90
|
+
raise ValueError("Missing order `nonce`")
|
|
91
|
+
if order_params.signature is None:
|
|
92
|
+
raise ValueError("Missing `signature`")
|
|
93
|
+
if isinstance(order_params.order.sender, bytes):
|
|
94
|
+
order_params.order.serialize_dict(["sender"], bytes32_to_hex)
|
|
95
|
+
order_params.order.serialize_dict(
|
|
96
|
+
["nonce", "priceX18", "amount", "expiration", "appendix"], str
|
|
97
|
+
)
|
|
98
|
+
return v
|
|
99
|
+
|
|
100
|
+
|
|
55
101
|
CancelTriggerOrdersRequest = CancelOrdersRequest
|
|
56
102
|
CancelProductTriggerOrdersRequest = CancelProductOrdersRequest
|
|
57
103
|
|
|
58
104
|
TriggerExecuteRequest = Union[
|
|
59
105
|
PlaceTriggerOrderRequest,
|
|
106
|
+
PlaceTriggerOrdersRequest,
|
|
60
107
|
CancelTriggerOrdersRequest,
|
|
61
108
|
CancelProductTriggerOrdersRequest,
|
|
62
109
|
]
|
|
@@ -77,6 +124,10 @@ def to_trigger_execute_request(params: TriggerExecuteParams) -> TriggerExecuteRe
|
|
|
77
124
|
PlaceTriggerOrderRequest,
|
|
78
125
|
NadoExecuteType.PLACE_ORDER.value,
|
|
79
126
|
),
|
|
127
|
+
PlaceTriggerOrdersParams: (
|
|
128
|
+
PlaceTriggerOrdersRequest,
|
|
129
|
+
NadoExecuteType.PLACE_ORDERS.value,
|
|
130
|
+
),
|
|
80
131
|
CancelTriggerOrdersParams: (
|
|
81
132
|
CancelTriggerOrdersRequest,
|
|
82
133
|
NadoExecuteType.CANCEL_ORDERS.value,
|
nado_protocol/utils/backend.py
CHANGED
|
@@ -18,6 +18,11 @@ class NadoBackendURL(StrEnum):
|
|
|
18
18
|
TESTNET_INDEXER = "https://archive.test.nado.xyz/v1"
|
|
19
19
|
TESTNET_TRIGGER = "https://trigger.test.nado.xyz/v1"
|
|
20
20
|
|
|
21
|
+
# mainnets
|
|
22
|
+
MAINNET_GATEWAY = "https://gateway.prod.nado.xyz/v1"
|
|
23
|
+
MAINNET_INDEXER = "https://archive.prod.nado.xyz/v1"
|
|
24
|
+
MAINNET_TRIGGER = "https://trigger.prod.nado.xyz/v1"
|
|
25
|
+
|
|
21
26
|
|
|
22
27
|
PrivateKey = str
|
|
23
28
|
Signer = Union[LocalAccount, PrivateKey]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
nado_protocol/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
nado_protocol/client/__init__.py,sha256=
|
|
2
|
+
nado_protocol/client/__init__.py,sha256=HdgwM9eDRcW6uE5LVc5U3dWmm5wYVXrgezZ7Mrgwjtg,8094
|
|
3
3
|
nado_protocol/client/apis/__init__.py,sha256=0wEscoemkmvyyTlUAaIM2vSO9LD_yCCVf3loHwasG_4,680
|
|
4
4
|
nado_protocol/client/apis/base.py,sha256=89g6va4wcqbV7XLO0UBkKmmM2C2oDcYSzRjzaUnFcGQ,1807
|
|
5
5
|
nado_protocol/client/apis/market/__init__.py,sha256=uILwdGeWOzQRT7x8bxvof6_u4GpsG9tL9I0VBuDPSoE,1102
|
|
@@ -30,6 +30,7 @@ nado_protocol/contracts/abis/IProductEngine.json,sha256=kue-r5zHk_4Xoalqfo5MZ8Qb
|
|
|
30
30
|
nado_protocol/contracts/abis/ISpotEngine.json,sha256=PHUyEwRClfB8raaV3fc8i4q6c-aathos12wbiDNJRnI,12894
|
|
31
31
|
nado_protocol/contracts/abis/IStaking.json,sha256=XhC143Lnmcv1ZBhiABXwc67_HyvbWsCuiNmJ0hzdq0s,5557
|
|
32
32
|
nado_protocol/contracts/abis/MockERC20.json,sha256=YaaVbvWsPuHyt1v6LIP34-oF8Df9yVe3UqLW3wTroD8,5697
|
|
33
|
+
nado_protocol/contracts/deployments/deployment.mainnet.json,sha256=eqrsYEEA4qbMzmwMYjjeH40PXVYmgz9XRVLvdgAVraY,742
|
|
33
34
|
nado_protocol/contracts/deployments/deployment.testing.json,sha256=jAPIL2cTWF9eEashUrBMrqOPBW5aUZyv4PEKDj-m6XY,704
|
|
34
35
|
nado_protocol/contracts/deployments/deployment.testnet.json,sha256=wuON868XxkJ6NI-doc17fYlR0FVzvYZK2Yyw-EcBDsk,768
|
|
35
36
|
nado_protocol/contracts/eip712/__init__.py,sha256=q8eJd5oY7AQ5iLsS1CfbZr6vBWLSPVZv2dfMnRzfqQo,416
|
|
@@ -37,12 +38,12 @@ nado_protocol/contracts/eip712/domain.py,sha256=dZ5aKq2Y45-vzZUMQLuUTbFhH9-R-YEg
|
|
|
37
38
|
nado_protocol/contracts/eip712/sign.py,sha256=WeipHcWaEP_vnmXpRH7_Ksm9uKDH2E4IkYYRI0_p2cY,2410
|
|
38
39
|
nado_protocol/contracts/eip712/types.py,sha256=uTfYD9hjoTozsUL2WTc_-2OREijbfv9FDBYuD1UjVHo,5117
|
|
39
40
|
nado_protocol/contracts/loader.py,sha256=_0W3ImcARs1bTu1lLMpHMrRNuEVYjrRWctvnEbKWoVg,1500
|
|
40
|
-
nado_protocol/contracts/types.py,sha256=
|
|
41
|
+
nado_protocol/contracts/types.py,sha256=km29Md8hCE8yivGdgbgMuQoO7GyE0yOVt9BaJatvjFY,4280
|
|
41
42
|
nado_protocol/engine_client/__init__.py,sha256=RE_MxQaQVIp0K5EDhR1_uTjLJgEJBx2fLnhepc3cuAg,1137
|
|
42
43
|
nado_protocol/engine_client/execute.py,sha256=Tmd1yvLTlvFFaSYqwOWTkzSxdE6QllGB8LHgsOim3Tc,15314
|
|
43
44
|
nado_protocol/engine_client/query.py,sha256=zCBLeBOY1wkRM42EMsluBRtVw2TuaqJHp4UuIdHWh4c,16265
|
|
44
45
|
nado_protocol/engine_client/types/__init__.py,sha256=pPjKLDJHclcbqROhU8B8OoxUjZkJI9a2qq5fUCVK7j4,2721
|
|
45
|
-
nado_protocol/engine_client/types/execute.py,sha256=
|
|
46
|
+
nado_protocol/engine_client/types/execute.py,sha256=ANF_QwtJAqb9zvga1fjOIiSDt_wjUo4sbf8rVkc-sQ0,20709
|
|
46
47
|
nado_protocol/engine_client/types/models.py,sha256=hf9HD8rct2XZIqPznfydBq7jqKiJ3vcdrL44GCjtnGQ,3873
|
|
47
48
|
nado_protocol/engine_client/types/query.py,sha256=N6kPuWSUowMeZnUKpxF9NnMKZBKKe-0Q_B9ccFZkjQA,12185
|
|
48
49
|
nado_protocol/engine_client/types/stream.py,sha256=F_AKqU4pClzUcM6D9Dc79f6RmraahJzj2-hQSXtQ0vQ,159
|
|
@@ -50,16 +51,16 @@ nado_protocol/indexer_client/__init__.py,sha256=ea2exePtguCxJsBlisOQPtnFk8hRmFug
|
|
|
50
51
|
nado_protocol/indexer_client/query.py,sha256=Tm4IYmU0T_9ayFTce8SMRPi_NN8QgyHDr4rFC3h7hSw,17102
|
|
51
52
|
nado_protocol/indexer_client/types/__init__.py,sha256=r3-jxMjrFNbA1nMRSGZjsE3qypmyWab6k20_gasdwL4,3548
|
|
52
53
|
nado_protocol/indexer_client/types/models.py,sha256=vD1YHHeK15hcU5_O4al7001Fi-gTl6EARMuR-Y8stOc,7533
|
|
53
|
-
nado_protocol/indexer_client/types/query.py,sha256=
|
|
54
|
+
nado_protocol/indexer_client/types/query.py,sha256=FCIIUv049AoBtB5VEolwgX51wycCIjyw4Qq__z0TodY,20559
|
|
54
55
|
nado_protocol/trigger_client/__init__.py,sha256=kD_WJWGOCDwX7GvGF5VGZibWR2uPYRcWpIWht31PYR4,545
|
|
55
56
|
nado_protocol/trigger_client/execute.py,sha256=VkVla3SF6MX-ZJC_wZG72em41MPAKX-jv1_Lh4ydezU,15089
|
|
56
57
|
nado_protocol/trigger_client/query.py,sha256=7M7opYEddNo0Wf9VQ7rha-WaoFQVv5F5OI-YLSRWrpk,2705
|
|
57
58
|
nado_protocol/trigger_client/types/__init__.py,sha256=Rj953ymGSNnVdOpDrwRuXmC_jhuPZU17BaSgBrc9cbk,183
|
|
58
|
-
nado_protocol/trigger_client/types/execute.py,sha256=
|
|
59
|
+
nado_protocol/trigger_client/types/execute.py,sha256=y1rxiFy3I7V3BHLKL8wQFDCwmf78AKuf8wB_1K8HlbU,4671
|
|
59
60
|
nado_protocol/trigger_client/types/models.py,sha256=ZVDF3MFWoR39JBaTmSOTl1WnRnw46hjX-WN_a-g6zKk,1638
|
|
60
61
|
nado_protocol/trigger_client/types/query.py,sha256=O6qhFLL2IREHc_mf-jFMyuVSzH1RuwjM-8noolLmEaQ,5288
|
|
61
62
|
nado_protocol/utils/__init__.py,sha256=heFEgVHHce8nAqQcmEMR69aZ8aaJAYXukJ2-W_KTFwY,1446
|
|
62
|
-
nado_protocol/utils/backend.py,sha256=
|
|
63
|
+
nado_protocol/utils/backend.py,sha256=JRzNVbsuLxamqI2cr6q3FEpiyju5mtPAFxUFibyFxf0,3944
|
|
63
64
|
nado_protocol/utils/balance.py,sha256=Pf6tdcxZSn2Ou8M3XJnBIhsMB85-E7VkZDUIaMuEIbg,7435
|
|
64
65
|
nado_protocol/utils/bytes32.py,sha256=FHeHs9Sf-S7GdFTF6ikuz_sEkM-fpRW-g3kbZawlMd4,5299
|
|
65
66
|
nado_protocol/utils/enum.py,sha256=_Ij7Ai1H_Bj0OPBjmLhGvQjATXYyqD0DLqpUC-br99s,99
|
|
@@ -75,7 +76,7 @@ nado_protocol/utils/order.py,sha256=Q9TlcotvnB395dPhaKpn0EeN1WNTkpYBTUovlirr1_Y,
|
|
|
75
76
|
nado_protocol/utils/subaccount.py,sha256=WJ7lgU2RekuzJAZH-hhCTbIBlRsl2oHozBm7OEMRV74,495
|
|
76
77
|
nado_protocol/utils/time.py,sha256=tEwmrkc5VdzKLlgkJIAq2ce-nhrduJZNtVPydrrnTHs,360
|
|
77
78
|
nado_protocol/utils/twap.py,sha256=hfBVK0CBa8m4uBArxTnNRoJr3o1rJucyopR_8_9gkOo,6197
|
|
78
|
-
nado_protocol-0.2.
|
|
79
|
-
nado_protocol-0.2.
|
|
80
|
-
nado_protocol-0.2.
|
|
81
|
-
nado_protocol-0.2.
|
|
79
|
+
nado_protocol-0.2.5.dist-info/METADATA,sha256=qavaKXhqYTQl7OAPCEf0Ax6LcaGAJP3AI_JxodRrIKs,9558
|
|
80
|
+
nado_protocol-0.2.5.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
81
|
+
nado_protocol-0.2.5.dist-info/entry_points.txt,sha256=Df0O9lFc-m0SyOh6_d9FHeG1OT-esxGm-p_z7rTT9h0,340
|
|
82
|
+
nado_protocol-0.2.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|