Skip to content

Commit 387b1fc

Browse files
authored
Merge pull request #348 from InjectiveLabs/fix/sync_dev_after_v170
fix/sync_dev_after_v170
2 parents a87553e + aad28f0 commit 387b1fc

File tree

10 files changed

+3899
-1443
lines changed

10 files changed

+3899
-1443
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.7.0] - 2024-09-18
6+
### Added
7+
- Added OFAC restricted addresses validations
8+
9+
## [1.6.3]
10+
### Fixed
11+
- Updated reference gas cost for messages in the gas limit estimator after chain upgrade v1.13
12+
13+
## [1.6.2]
14+
### Fixed
15+
- Fixed issue in the `listen_derivative_market_updates` method in the `AsyncClient` class
16+
517
## [1.6.1] - 2024-08-07
618
### Added
719
- Added support for the following messages in the chain "exchange" module:

poetry.lock

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

pyinjective/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2336,7 +2336,7 @@ async def listen_derivative_market_updates(
23362336
on_status_callback: Optional[Callable] = None,
23372337
market_ids: Optional[List[str]] = None,
23382338
):
2339-
await self.exchange_derivative_stream_api.stream_markets(
2339+
await self.exchange_derivative_stream_api.stream_market(
23402340
callback=callback,
23412341
on_end_callback=on_end_callback,
23422342
on_status_callback=on_status_callback,

pyinjective/core/gas_limit_estimator.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
tx_pb2 as injective_exchange_tx_pb,
1313
)
1414

15-
SPOT_ORDER_CREATION_GAS_LIMIT = 50_000
16-
DERIVATIVE_ORDER_CREATION_GAS_LIMIT = 70_000
15+
SPOT_ORDER_CREATION_GAS_LIMIT = 52_000
16+
DERIVATIVE_ORDER_CREATION_GAS_LIMIT = 84_000
1717
SPOT_ORDER_CANCELATION_GAS_LIMIT = 50_000
18-
DERIVATIVE_ORDER_CANCELATION_GAS_LIMIT = 60_000
18+
DERIVATIVE_ORDER_CANCELATION_GAS_LIMIT = 68_000
1919
# POST ONLY orders take around 50% more gas to create than normal orders due to the required validations
20-
SPOT_POST_ONLY_ORDER_MULTIPLIER = 0.5
21-
DERIVATIVE_POST_ONLY_ORDER_MULTIPLIER = 0.5
20+
SPOT_POST_ONLY_ORDER_MULTIPLIER = 0.62
21+
DERIVATIVE_POST_ONLY_ORDER_MULTIPLIER = 0.35
2222

2323

2424
class GasLimitEstimator(ABC):
25-
GENERAL_MESSAGE_GAS_LIMIT = 15_000
25+
GENERAL_MESSAGE_GAS_LIMIT = 25_000
2626
BASIC_REFERENCE_GAS_LIMIT = 150_000
2727

2828
@classmethod
@@ -183,7 +183,7 @@ def _message_class(self, message: any_pb2.Any):
183183
class BatchUpdateOrdersGasLimitEstimator(GasLimitEstimator):
184184
CANCEL_ALL_SPOT_MARKET_GAS_LIMIT = 40_000
185185
CANCEL_ALL_DERIVATIVE_MARKET_GAS_LIMIT = 50_000
186-
MESSAGE_GAS_LIMIT = 15_000
186+
MESSAGE_GAS_LIMIT = 30_000
187187

188188
AVERAGE_CANCEL_ALL_AFFECTED_ORDERS = 20
189189

@@ -246,7 +246,7 @@ def _message_class(self, message: any_pb2.Any):
246246

247247

248248
class ExecGasLimitEstimator(GasLimitEstimator):
249-
DEFAULT_GAS_LIMIT = 8_000
249+
DEFAULT_GAS_LIMIT = 20_000
250250

251251
def __init__(self, message: any_pb2.Any):
252252
self._message = self._parsed_message(message=message)

0 commit comments

Comments
 (0)