Skip to content

Commit f54b4d1

Browse files
author
abel
committed
(fix) Updated gas cost for messages in gas estimator. Updated core dependencies to version 1.12.1
1 parent 6c47732 commit f54b4d1

File tree

287 files changed

+6019
-6118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+6019
-6118
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ clean-all:
2828
$(call clean_repos)
2929

3030
clone-injective-core:
31-
git clone https://github.com/InjectiveLabs/injective-core.git -b v1.12.0 --depth 1 --single-branch
31+
git clone https://github.com/InjectiveLabs/injective-core.git -b v1.12.1 --depth 1 --single-branch
3232

3333
clone-injective-indexer:
3434
git clone https://github.com/InjectiveLabs/injective-indexer.git -b v1.12.79.1 --depth 1 --single-branch

pyinjective/core/gas_limit_estimator.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
class GasLimitEstimator(ABC):
12-
GENERAL_MESSAGE_GAS_LIMIT = 5_000
12+
GENERAL_MESSAGE_GAS_LIMIT = 10_000
1313
BASIC_REFERENCE_GAS_LIMIT = 150_000
1414

1515
@classmethod
@@ -74,7 +74,7 @@ def _message_class(self, message: any_pb2.Any):
7474

7575

7676
class BatchCreateSpotLimitOrdersGasLimitEstimator(GasLimitEstimator):
77-
ORDER_GAS_LIMIT = 45_000
77+
ORDER_GAS_LIMIT = 50_000
7878

7979
def __init__(self, message: any_pb2.Any):
8080
self._message = self._parsed_message(message=message)
@@ -95,7 +95,7 @@ def _message_class(self, message: any_pb2.Any):
9595

9696

9797
class BatchCancelSpotOrdersGasLimitEstimator(GasLimitEstimator):
98-
ORDER_GAS_LIMIT = 45_000
98+
ORDER_GAS_LIMIT = 50_000
9999

100100
def __init__(self, message: any_pb2.Any):
101101
self._message = self._parsed_message(message=message)
@@ -116,7 +116,7 @@ def _message_class(self, message: any_pb2.Any):
116116

117117

118118
class BatchCreateDerivativeLimitOrdersGasLimitEstimator(GasLimitEstimator):
119-
ORDER_GAS_LIMIT = 60_000
119+
ORDER_GAS_LIMIT = 66_000
120120

121121
def __init__(self, message: any_pb2.Any):
122122
self._message = self._parsed_message(message=message)
@@ -137,7 +137,7 @@ def _message_class(self, message: any_pb2.Any):
137137

138138

139139
class BatchCancelDerivativeOrdersGasLimitEstimator(GasLimitEstimator):
140-
ORDER_GAS_LIMIT = 55_000
140+
ORDER_GAS_LIMIT = 60_000
141141

142142
def __init__(self, message: any_pb2.Any):
143143
self._message = self._parsed_message(message=message)
@@ -158,13 +158,13 @@ def _message_class(self, message: any_pb2.Any):
158158

159159

160160
class BatchUpdateOrdersGasLimitEstimator(GasLimitEstimator):
161-
SPOT_ORDER_CREATION_GAS_LIMIT = 40_000
162-
DERIVATIVE_ORDER_CREATION_GAS_LIMIT = 60_000
163-
SPOT_ORDER_CANCELATION_GAS_LIMIT = 45_000
164-
DERIVATIVE_ORDER_CANCELATION_GAS_LIMIT = 55_000
165-
CANCEL_ALL_SPOT_MARKET_GAS_LIMIT = 35_000
166-
CANCEL_ALL_DERIVATIVE_MARKET_GAS_LIMIT = 45_000
167-
MESSAGE_GAS_LIMIT = 10_000
161+
SPOT_ORDER_CREATION_GAS_LIMIT = 45_000
162+
DERIVATIVE_ORDER_CREATION_GAS_LIMIT = 66_000
163+
SPOT_ORDER_CANCELATION_GAS_LIMIT = 50_000
164+
DERIVATIVE_ORDER_CANCELATION_GAS_LIMIT = 60_000
165+
CANCEL_ALL_SPOT_MARKET_GAS_LIMIT = 40_000
166+
CANCEL_ALL_DERIVATIVE_MARKET_GAS_LIMIT = 50_000
167+
MESSAGE_GAS_LIMIT = 15_000
168168

169169
AVERAGE_CANCEL_ALL_AFFECTED_ORDERS = 20
170170

@@ -208,7 +208,7 @@ def _message_class(self, message: any_pb2.Any):
208208

209209

210210
class ExecGasLimitEstimator(GasLimitEstimator):
211-
DEFAULT_GAS_LIMIT = 5_000
211+
DEFAULT_GAS_LIMIT = 8_000
212212

213213
def __init__(self, message: any_pb2.Any):
214214
self._message = self._parsed_message(message=message)
@@ -297,7 +297,7 @@ def _message_class(self, message: any_pb2.Any):
297297

298298

299299
class GenericExchangeGasLimitEstimator(GasLimitEstimator):
300-
BASIC_REFERENCE_GAS_LIMIT = 100_000
300+
BASIC_REFERENCE_GAS_LIMIT = 120_000
301301

302302
def __init__(self, message: any_pb2.Any):
303303
self._message = message

pyinjective/denoms_devnet.ini

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,6 @@ min_display_price_tick_size = 0.001
169169
min_quantity_tick_size = 10000000000000
170170
min_display_quantity_tick_size = 0.00001
171171

172-
[0xdf9317eac1739a23bc385e264afde5d480c0b3d2322660b5efd206071d4e70b7]
173-
description = 'Devnet Spot NINJA/INJ'
174-
base = 6
175-
quote = 18
176-
min_price_tick_size = 1000000
177-
min_display_price_tick_size = 0.000001
178-
min_quantity_tick_size = 10000000
179-
min_display_quantity_tick_size = 10
180-
181172
[0x1422a13427d5eabd4d8de7907c8340f7e58cb15553a9fd4ad5c90406561886f9]
182173
description = 'Devnet Derivative COMP/USDT PERP'
183174
base = 0
@@ -308,10 +299,6 @@ decimals = 18
308299
peggy_denom = peggy0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0
309300
decimals = 18
310301

311-
[NINJA]
312-
peggy_denom = factory/inj1xtel2knkt8hmc9dnzpjz6kdmacgcfmlv5f308w/ninja
313-
decimals = 6
314-
315302
[PROJ]
316303
peggy_denom = proj
317304
decimals = 18

pyinjective/denoms_mainnet.ini

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,15 @@ min_display_price_tick_size = 0.0001
637637
min_quantity_tick_size = 1000000000000000
638638
min_display_quantity_tick_size = 0.001
639639

640+
[0xb6c24e9a586a50062f2fac059ddd79f8b0cf1c101e263f4b2c7484b0e20d2899]
641+
description = 'Mainnet Spot GINGER/INJ'
642+
base = 6
643+
quote = 18
644+
min_price_tick_size = 100
645+
min_display_price_tick_size = 0.0000000001
646+
min_quantity_tick_size = 10000000000
647+
min_display_quantity_tick_size = 10000
648+
640649
[0x9b13c89f8f10386b61dd3a58aae56d5c7995133534ed65ac9835bb8d54890961]
641650
description = 'Mainnet Spot SNOWY/INJ'
642651
base = 6
@@ -790,6 +799,24 @@ min_display_price_tick_size = 0.001
790799
min_quantity_tick_size = 0.1
791800
min_display_quantity_tick_size = 0.1
792801

802+
[0x7a70d95e24ba42b99a30121e6a4ff0d6161847d5b86cbfc3d4b3a81d8e190a70]
803+
description = 'Mainnet Derivative ZRO/USDT PERP'
804+
base = 0
805+
quote = 6
806+
min_price_tick_size = 1000
807+
min_display_price_tick_size = 0.001
808+
min_quantity_tick_size = 0.1
809+
min_display_quantity_tick_size = 0.1
810+
811+
[0x03841e74624fd885d1ee28453f921d18c211e78a0d7646c792c7903054eb152c]
812+
description = 'Mainnet Derivative JUP/USDT PERP'
813+
base = 0
814+
quote = 6
815+
min_price_tick_size = 10
816+
min_display_price_tick_size = 0.00001
817+
min_quantity_tick_size = 1
818+
min_display_quantity_tick_size = 1
819+
793820
[AAVE]
794821
peggy_denom = peggy0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9
795822
decimals = 18
@@ -850,6 +877,10 @@ decimals = 18
850877
peggy_denom = peggy0xAaEf88cEa01475125522e117BFe45cF32044E238
851878
decimals = 18
852879

880+
[GINGER]
881+
peggy_denom = factory/inj172ccd0gddgz203e4pf86ype7zjx573tn8g0df9/GINGER
882+
decimals = 6
883+
853884
[GRT]
854885
peggy_denom = peggy0xc944E90C64B2c07662A292be6244BDf05Cda44a7
855886
decimals = 18

pyinjective/proto/amino/amino_pb2.py

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

pyinjective/proto/cosmos/app/runtime/v1alpha1/module_pb2.py

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

pyinjective/proto/cosmos/app/v1alpha1/config_pb2.py

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

pyinjective/proto/cosmos/app/v1alpha1/module_pb2.py

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyinjective/proto/cosmos/app/v1alpha1/query_pb2.py

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

pyinjective/proto/cosmos/auth/module/v1/module_pb2.py

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

0 commit comments

Comments
 (0)