Skip to content

Commit 4b2d0a3

Browse files
Merge pull request #166 from InjectiveLabs/f/re-gen
F/re gen
2 parents 35e929e + 2185e51 commit 4b2d0a3

27 files changed

+4333
-723
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ Note that the [sync client](https://github.com/InjectiveLabs/sdk-python/blob/mas
7878

7979

8080
### Changelogs
81+
**0.5.9.0**
82+
* Re-gen proto
83+
* Fix MsgRewardsOptOut
84+
* Remove pysha3 dependency
85+
8186
**0.5.8.8**
8287
* Add grpc_explorer_endpoint in Network
8388
* Add explorer channel and stub

pyinjective/composer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,9 @@ def MsgBatchCancelSpotOrders(self, sender: str, data: List):
340340
sender=sender, data=data
341341
)
342342

343-
def MsgRewardsOptOut(self, sender: str, dmm_account: str):
343+
def MsgRewardsOptOut(self, sender: str):
344344
return injective_exchange_tx_pb.MsgRewardsOptOut(
345-
sender=sender, dmm_account=dmm_account
345+
sender=sender
346346
)
347347

348348
def MsgCreateDerivativeLimitOrder(

pyinjective/proto/injective/exchange/v1beta1/events_pb2.py

Lines changed: 195 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyinjective/proto/injective/exchange/v1beta1/exchange_pb2.py

Lines changed: 281 additions & 88 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyinjective/proto/injective/exchange/v1beta1/genesis_pb2.py

Lines changed: 91 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyinjective/proto/injective/exchange/v1beta1/query_pb2.py

Lines changed: 267 additions & 176 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyinjective/proto/injective/exchange/v1beta1/query_pb2_grpc.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ def __init__(self, channel):
245245
request_serializer=injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryTraderDerivativeConditionalOrdersRequest.SerializeToString,
246246
response_deserializer=injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryTraderDerivativeConditionalOrdersResponse.FromString,
247247
)
248+
self.MarketAtomicExecutionFeeMultiplier = channel.unary_unary(
249+
'/injective.exchange.v1beta1.Query/MarketAtomicExecutionFeeMultiplier',
250+
request_serializer=injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryMarketAtomicExecutionFeeMultiplierRequest.SerializeToString,
251+
response_deserializer=injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryMarketAtomicExecutionFeeMultiplierResponse.FromString,
252+
)
248253

249254

250255
class QueryServicer(object):
@@ -573,6 +578,12 @@ def TraderDerivativeConditionalOrders(self, request, context):
573578
context.set_details('Method not implemented!')
574579
raise NotImplementedError('Method not implemented!')
575580

581+
def MarketAtomicExecutionFeeMultiplier(self, request, context):
582+
"""Missing associated documentation comment in .proto file."""
583+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
584+
context.set_details('Method not implemented!')
585+
raise NotImplementedError('Method not implemented!')
586+
576587

577588
def add_QueryServicer_to_server(servicer, server):
578589
rpc_method_handlers = {
@@ -806,6 +817,11 @@ def add_QueryServicer_to_server(servicer, server):
806817
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryTraderDerivativeConditionalOrdersRequest.FromString,
807818
response_serializer=injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryTraderDerivativeConditionalOrdersResponse.SerializeToString,
808819
),
820+
'MarketAtomicExecutionFeeMultiplier': grpc.unary_unary_rpc_method_handler(
821+
servicer.MarketAtomicExecutionFeeMultiplier,
822+
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryMarketAtomicExecutionFeeMultiplierRequest.FromString,
823+
response_serializer=injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryMarketAtomicExecutionFeeMultiplierResponse.SerializeToString,
824+
),
809825
}
810826
generic_handler = grpc.method_handlers_generic_handler(
811827
'injective.exchange.v1beta1.Query', rpc_method_handlers)
@@ -1598,3 +1614,20 @@ def TraderDerivativeConditionalOrders(request,
15981614
injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryTraderDerivativeConditionalOrdersResponse.FromString,
15991615
options, channel_credentials,
16001616
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
1617+
1618+
@staticmethod
1619+
def MarketAtomicExecutionFeeMultiplier(request,
1620+
target,
1621+
options=(),
1622+
channel_credentials=None,
1623+
call_credentials=None,
1624+
insecure=False,
1625+
compression=None,
1626+
wait_for_ready=None,
1627+
timeout=None,
1628+
metadata=None):
1629+
return grpc.experimental.unary_unary(request, target, '/injective.exchange.v1beta1.Query/MarketAtomicExecutionFeeMultiplier',
1630+
injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryMarketAtomicExecutionFeeMultiplierRequest.SerializeToString,
1631+
injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryMarketAtomicExecutionFeeMultiplierResponse.FromString,
1632+
options, channel_credentials,
1633+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

pyinjective/proto/injective/exchange/v1beta1/tx_pb2.py

Lines changed: 880 additions & 233 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyinjective/proto/injective/exchange/v1beta1/tx_pb2_grpc.py

Lines changed: 112 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
class MsgStub(object):
9-
"""Msg defines the staking Msg service.
9+
"""Msg defines the exchange Msg service.
1010
"""
1111

1212
def __init__(self, channel):
@@ -15,6 +15,16 @@ def __init__(self, channel):
1515
Args:
1616
channel: A grpc.Channel.
1717
"""
18+
self.TransferAndExecute = channel.unary_unary(
19+
'/injective.exchange.v1beta1.Msg/TransferAndExecute',
20+
request_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgTransferAndExecute.SerializeToString,
21+
response_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgTransferAndExecuteResponse.FromString,
22+
)
23+
self.MultiExecute = channel.unary_unary(
24+
'/injective.exchange.v1beta1.Msg/MultiExecute',
25+
request_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgMultiExecute.SerializeToString,
26+
response_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgMultiExecuteResponse.FromString,
27+
)
1828
self.Deposit = channel.unary_unary(
1929
'/injective.exchange.v1beta1.Msg/Deposit',
2030
request_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgDeposit.SerializeToString,
@@ -72,8 +82,8 @@ def __init__(self, channel):
7282
)
7383
self.Exec = channel.unary_unary(
7484
'/injective.exchange.v1beta1.Msg/Exec',
75-
request_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgExec.SerializeToString,
76-
response_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgExecResponse.FromString,
85+
request_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgPrivilegedExecuteContract.SerializeToString,
86+
response_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgPrivilegedExecuteContractResponse.FromString,
7787
)
7888
self.CreateDerivativeLimitOrder = channel.unary_unary(
7989
'/injective.exchange.v1beta1.Msg/CreateDerivativeLimitOrder',
@@ -155,12 +165,32 @@ def __init__(self, channel):
155165
request_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgAdminUpdateBinaryOptionsMarket.SerializeToString,
156166
response_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgAdminUpdateBinaryOptionsMarketResponse.FromString,
157167
)
168+
self.ReclaimLockedFunds = channel.unary_unary(
169+
'/injective.exchange.v1beta1.Msg/ReclaimLockedFunds',
170+
request_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgReclaimLockedFunds.SerializeToString,
171+
response_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgReclaimLockedFundsResponse.FromString,
172+
)
158173

159174

160175
class MsgServicer(object):
161-
"""Msg defines the staking Msg service.
176+
"""Msg defines the exchange Msg service.
162177
"""
163178

179+
def TransferAndExecute(self, request, context):
180+
"""TransferAndExecute defines a method for transferring coins to/from either the bank or default subaccount balances
181+
and then executing a Msg.
182+
"""
183+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
184+
context.set_details('Method not implemented!')
185+
raise NotImplementedError('Method not implemented!')
186+
187+
def MultiExecute(self, request, context):
188+
"""MultiExecute defines a method for executing multiple Msgs.
189+
"""
190+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
191+
context.set_details('Method not implemented!')
192+
raise NotImplementedError('Method not implemented!')
193+
164194
def Deposit(self, request, context):
165195
"""Deposit defines a method for transferring coins from the sender's bank balance into the subaccount's exchange deposits
166196
"""
@@ -357,9 +387,26 @@ def AdminUpdateBinaryOptionsMarket(self, request, context):
357387
context.set_details('Method not implemented!')
358388
raise NotImplementedError('Method not implemented!')
359389

390+
def ReclaimLockedFunds(self, request, context):
391+
"""
392+
"""
393+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
394+
context.set_details('Method not implemented!')
395+
raise NotImplementedError('Method not implemented!')
396+
360397

361398
def add_MsgServicer_to_server(servicer, server):
362399
rpc_method_handlers = {
400+
'TransferAndExecute': grpc.unary_unary_rpc_method_handler(
401+
servicer.TransferAndExecute,
402+
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgTransferAndExecute.FromString,
403+
response_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgTransferAndExecuteResponse.SerializeToString,
404+
),
405+
'MultiExecute': grpc.unary_unary_rpc_method_handler(
406+
servicer.MultiExecute,
407+
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgMultiExecute.FromString,
408+
response_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgMultiExecuteResponse.SerializeToString,
409+
),
363410
'Deposit': grpc.unary_unary_rpc_method_handler(
364411
servicer.Deposit,
365412
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgDeposit.FromString,
@@ -417,8 +464,8 @@ def add_MsgServicer_to_server(servicer, server):
417464
),
418465
'Exec': grpc.unary_unary_rpc_method_handler(
419466
servicer.Exec,
420-
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgExec.FromString,
421-
response_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgExecResponse.SerializeToString,
467+
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgPrivilegedExecuteContract.FromString,
468+
response_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgPrivilegedExecuteContractResponse.SerializeToString,
422469
),
423470
'CreateDerivativeLimitOrder': grpc.unary_unary_rpc_method_handler(
424471
servicer.CreateDerivativeLimitOrder,
@@ -500,6 +547,11 @@ def add_MsgServicer_to_server(servicer, server):
500547
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgAdminUpdateBinaryOptionsMarket.FromString,
501548
response_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgAdminUpdateBinaryOptionsMarketResponse.SerializeToString,
502549
),
550+
'ReclaimLockedFunds': grpc.unary_unary_rpc_method_handler(
551+
servicer.ReclaimLockedFunds,
552+
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgReclaimLockedFunds.FromString,
553+
response_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgReclaimLockedFundsResponse.SerializeToString,
554+
),
503555
}
504556
generic_handler = grpc.method_handlers_generic_handler(
505557
'injective.exchange.v1beta1.Msg', rpc_method_handlers)
@@ -508,9 +560,43 @@ def add_MsgServicer_to_server(servicer, server):
508560

509561
# This class is part of an EXPERIMENTAL API.
510562
class Msg(object):
511-
"""Msg defines the staking Msg service.
563+
"""Msg defines the exchange Msg service.
512564
"""
513565

566+
@staticmethod
567+
def TransferAndExecute(request,
568+
target,
569+
options=(),
570+
channel_credentials=None,
571+
call_credentials=None,
572+
insecure=False,
573+
compression=None,
574+
wait_for_ready=None,
575+
timeout=None,
576+
metadata=None):
577+
return grpc.experimental.unary_unary(request, target, '/injective.exchange.v1beta1.Msg/TransferAndExecute',
578+
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgTransferAndExecute.SerializeToString,
579+
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgTransferAndExecuteResponse.FromString,
580+
options, channel_credentials,
581+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
582+
583+
@staticmethod
584+
def MultiExecute(request,
585+
target,
586+
options=(),
587+
channel_credentials=None,
588+
call_credentials=None,
589+
insecure=False,
590+
compression=None,
591+
wait_for_ready=None,
592+
timeout=None,
593+
metadata=None):
594+
return grpc.experimental.unary_unary(request, target, '/injective.exchange.v1beta1.Msg/MultiExecute',
595+
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgMultiExecute.SerializeToString,
596+
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgMultiExecuteResponse.FromString,
597+
options, channel_credentials,
598+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
599+
514600
@staticmethod
515601
def Deposit(request,
516602
target,
@@ -710,8 +796,8 @@ def Exec(request,
710796
timeout=None,
711797
metadata=None):
712798
return grpc.experimental.unary_unary(request, target, '/injective.exchange.v1beta1.Msg/Exec',
713-
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgExec.SerializeToString,
714-
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgExecResponse.FromString,
799+
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgPrivilegedExecuteContract.SerializeToString,
800+
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgPrivilegedExecuteContractResponse.FromString,
715801
options, channel_credentials,
716802
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
717803

@@ -986,3 +1072,20 @@ def AdminUpdateBinaryOptionsMarket(request,
9861072
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgAdminUpdateBinaryOptionsMarketResponse.FromString,
9871073
options, channel_credentials,
9881074
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
1075+
1076+
@staticmethod
1077+
def ReclaimLockedFunds(request,
1078+
target,
1079+
options=(),
1080+
channel_credentials=None,
1081+
call_credentials=None,
1082+
insecure=False,
1083+
compression=None,
1084+
wait_for_ready=None,
1085+
timeout=None,
1086+
metadata=None):
1087+
return grpc.experimental.unary_unary(request, target, '/injective.exchange.v1beta1.Msg/ReclaimLockedFunds',
1088+
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgReclaimLockedFunds.SerializeToString,
1089+
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgReclaimLockedFundsResponse.FromString,
1090+
options, channel_credentials,
1091+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

0 commit comments

Comments
 (0)