Skip to content

Commit

Permalink
Merge pull request #166 from InjectiveLabs/f/re-gen
Browse files Browse the repository at this point in the history
F/re gen
  • Loading branch information
achilleas-kal committed Nov 22, 2022
2 parents 35e929e + 2185e51 commit 4b2d0a3
Show file tree
Hide file tree
Showing 27 changed files with 4,333 additions and 723 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ Note that the [sync client](https://github.com/InjectiveLabs/sdk-python/blob/mas


### Changelogs
**0.5.9.0**
* Re-gen proto
* Fix MsgRewardsOptOut
* Remove pysha3 dependency

**0.5.8.8**
* Add grpc_explorer_endpoint in Network
* Add explorer channel and stub
Expand Down
4 changes: 2 additions & 2 deletions pyinjective/composer.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,9 @@ def MsgBatchCancelSpotOrders(self, sender: str, data: List):
sender=sender, data=data
)

def MsgRewardsOptOut(self, sender: str, dmm_account: str):
def MsgRewardsOptOut(self, sender: str):
return injective_exchange_tx_pb.MsgRewardsOptOut(
sender=sender, dmm_account=dmm_account
sender=sender
)

def MsgCreateDerivativeLimitOrder(
Expand Down
196 changes: 195 additions & 1 deletion pyinjective/proto/injective/exchange/v1beta1/events_pb2.py

Large diffs are not rendered by default.

369 changes: 281 additions & 88 deletions pyinjective/proto/injective/exchange/v1beta1/exchange_pb2.py

Large diffs are not rendered by default.

119 changes: 91 additions & 28 deletions pyinjective/proto/injective/exchange/v1beta1/genesis_pb2.py

Large diffs are not rendered by default.

443 changes: 267 additions & 176 deletions pyinjective/proto/injective/exchange/v1beta1/query_pb2.py

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions pyinjective/proto/injective/exchange/v1beta1/query_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ def __init__(self, channel):
request_serializer=injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryTraderDerivativeConditionalOrdersRequest.SerializeToString,
response_deserializer=injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryTraderDerivativeConditionalOrdersResponse.FromString,
)
self.MarketAtomicExecutionFeeMultiplier = channel.unary_unary(
'/injective.exchange.v1beta1.Query/MarketAtomicExecutionFeeMultiplier',
request_serializer=injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryMarketAtomicExecutionFeeMultiplierRequest.SerializeToString,
response_deserializer=injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryMarketAtomicExecutionFeeMultiplierResponse.FromString,
)


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

def MarketAtomicExecutionFeeMultiplier(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')


def add_QueryServicer_to_server(servicer, server):
rpc_method_handlers = {
Expand Down Expand Up @@ -806,6 +817,11 @@ def add_QueryServicer_to_server(servicer, server):
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryTraderDerivativeConditionalOrdersRequest.FromString,
response_serializer=injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryTraderDerivativeConditionalOrdersResponse.SerializeToString,
),
'MarketAtomicExecutionFeeMultiplier': grpc.unary_unary_rpc_method_handler(
servicer.MarketAtomicExecutionFeeMultiplier,
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryMarketAtomicExecutionFeeMultiplierRequest.FromString,
response_serializer=injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryMarketAtomicExecutionFeeMultiplierResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'injective.exchange.v1beta1.Query', rpc_method_handlers)
Expand Down Expand Up @@ -1598,3 +1614,20 @@ def TraderDerivativeConditionalOrders(request,
injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryTraderDerivativeConditionalOrdersResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def MarketAtomicExecutionFeeMultiplier(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/injective.exchange.v1beta1.Query/MarketAtomicExecutionFeeMultiplier',
injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryMarketAtomicExecutionFeeMultiplierRequest.SerializeToString,
injective_dot_exchange_dot_v1beta1_dot_query__pb2.QueryMarketAtomicExecutionFeeMultiplierResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
1,113 changes: 880 additions & 233 deletions pyinjective/proto/injective/exchange/v1beta1/tx_pb2.py

Large diffs are not rendered by default.

121 changes: 112 additions & 9 deletions pyinjective/proto/injective/exchange/v1beta1/tx_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class MsgStub(object):
"""Msg defines the staking Msg service.
"""Msg defines the exchange Msg service.
"""

def __init__(self, channel):
Expand All @@ -15,6 +15,16 @@ def __init__(self, channel):
Args:
channel: A grpc.Channel.
"""
self.TransferAndExecute = channel.unary_unary(
'/injective.exchange.v1beta1.Msg/TransferAndExecute',
request_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgTransferAndExecute.SerializeToString,
response_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgTransferAndExecuteResponse.FromString,
)
self.MultiExecute = channel.unary_unary(
'/injective.exchange.v1beta1.Msg/MultiExecute',
request_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgMultiExecute.SerializeToString,
response_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgMultiExecuteResponse.FromString,
)
self.Deposit = channel.unary_unary(
'/injective.exchange.v1beta1.Msg/Deposit',
request_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgDeposit.SerializeToString,
Expand Down Expand Up @@ -72,8 +82,8 @@ def __init__(self, channel):
)
self.Exec = channel.unary_unary(
'/injective.exchange.v1beta1.Msg/Exec',
request_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgExec.SerializeToString,
response_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgExecResponse.FromString,
request_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgPrivilegedExecuteContract.SerializeToString,
response_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgPrivilegedExecuteContractResponse.FromString,
)
self.CreateDerivativeLimitOrder = channel.unary_unary(
'/injective.exchange.v1beta1.Msg/CreateDerivativeLimitOrder',
Expand Down Expand Up @@ -155,12 +165,32 @@ def __init__(self, channel):
request_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgAdminUpdateBinaryOptionsMarket.SerializeToString,
response_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgAdminUpdateBinaryOptionsMarketResponse.FromString,
)
self.ReclaimLockedFunds = channel.unary_unary(
'/injective.exchange.v1beta1.Msg/ReclaimLockedFunds',
request_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgReclaimLockedFunds.SerializeToString,
response_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgReclaimLockedFundsResponse.FromString,
)


class MsgServicer(object):
"""Msg defines the staking Msg service.
"""Msg defines the exchange Msg service.
"""

def TransferAndExecute(self, request, context):
"""TransferAndExecute defines a method for transferring coins to/from either the bank or default subaccount balances
and then executing a Msg.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def MultiExecute(self, request, context):
"""MultiExecute defines a method for executing multiple Msgs.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def Deposit(self, request, context):
"""Deposit defines a method for transferring coins from the sender's bank balance into the subaccount's exchange deposits
"""
Expand Down Expand Up @@ -357,9 +387,26 @@ def AdminUpdateBinaryOptionsMarket(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def ReclaimLockedFunds(self, request, context):
"""
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')


def add_MsgServicer_to_server(servicer, server):
rpc_method_handlers = {
'TransferAndExecute': grpc.unary_unary_rpc_method_handler(
servicer.TransferAndExecute,
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgTransferAndExecute.FromString,
response_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgTransferAndExecuteResponse.SerializeToString,
),
'MultiExecute': grpc.unary_unary_rpc_method_handler(
servicer.MultiExecute,
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgMultiExecute.FromString,
response_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgMultiExecuteResponse.SerializeToString,
),
'Deposit': grpc.unary_unary_rpc_method_handler(
servicer.Deposit,
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgDeposit.FromString,
Expand Down Expand Up @@ -417,8 +464,8 @@ def add_MsgServicer_to_server(servicer, server):
),
'Exec': grpc.unary_unary_rpc_method_handler(
servicer.Exec,
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgExec.FromString,
response_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgExecResponse.SerializeToString,
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgPrivilegedExecuteContract.FromString,
response_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgPrivilegedExecuteContractResponse.SerializeToString,
),
'CreateDerivativeLimitOrder': grpc.unary_unary_rpc_method_handler(
servicer.CreateDerivativeLimitOrder,
Expand Down Expand Up @@ -500,6 +547,11 @@ def add_MsgServicer_to_server(servicer, server):
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgAdminUpdateBinaryOptionsMarket.FromString,
response_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgAdminUpdateBinaryOptionsMarketResponse.SerializeToString,
),
'ReclaimLockedFunds': grpc.unary_unary_rpc_method_handler(
servicer.ReclaimLockedFunds,
request_deserializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgReclaimLockedFunds.FromString,
response_serializer=injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgReclaimLockedFundsResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'injective.exchange.v1beta1.Msg', rpc_method_handlers)
Expand All @@ -508,9 +560,43 @@ def add_MsgServicer_to_server(servicer, server):

# This class is part of an EXPERIMENTAL API.
class Msg(object):
"""Msg defines the staking Msg service.
"""Msg defines the exchange Msg service.
"""

@staticmethod
def TransferAndExecute(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/injective.exchange.v1beta1.Msg/TransferAndExecute',
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgTransferAndExecute.SerializeToString,
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgTransferAndExecuteResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def MultiExecute(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/injective.exchange.v1beta1.Msg/MultiExecute',
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgMultiExecute.SerializeToString,
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgMultiExecuteResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def Deposit(request,
target,
Expand Down Expand Up @@ -710,8 +796,8 @@ def Exec(request,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/injective.exchange.v1beta1.Msg/Exec',
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgExec.SerializeToString,
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgExecResponse.FromString,
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgPrivilegedExecuteContract.SerializeToString,
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgPrivilegedExecuteContractResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

Expand Down Expand Up @@ -986,3 +1072,20 @@ def AdminUpdateBinaryOptionsMarket(request,
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgAdminUpdateBinaryOptionsMarketResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def ReclaimLockedFunds(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/injective.exchange.v1beta1.Msg/ReclaimLockedFunds',
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgReclaimLockedFunds.SerializeToString,
injective_dot_exchange_dot_v1beta1_dot_tx__pb2.MsgReclaimLockedFundsResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
Loading

0 comments on commit 4b2d0a3

Please sign in to comment.