Skip to content

Commit a054d14

Browse files
committed
cp-235: updated the gas limit estimator logic to reflect the new logic for gas heuristics in exchange module (chain v1.15)
1 parent f8f5ce8 commit a054d14

File tree

4 files changed

+648
-100
lines changed

4 files changed

+648
-100
lines changed

pyinjective/core/broadcaster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ async def configure_gas_fee_for_transaction(
280280

281281

282282
class MessageBasedTransactionFeeCalculator(TransactionFeeCalculator):
283-
TRANSACTION_GAS_LIMIT = 60_000
283+
TRANSACTION_ANTE_GAS_LIMIT = 105_000
284284

285285
def __init__(self, client: AsyncClient, composer: Composer, gas_price: Optional[int] = None):
286286
self._client = client
@@ -294,7 +294,7 @@ async def configure_gas_fee_for_transaction(
294294
public_key: PublicKey,
295295
):
296296
messages_gas_limit = math.ceil(self._calculate_gas_limit(messages=transaction.msgs))
297-
transaction_gas_limit = messages_gas_limit + self.TRANSACTION_GAS_LIMIT
297+
transaction_gas_limit = messages_gas_limit + self.TRANSACTION_ANTE_GAS_LIMIT
298298

299299
fee = [
300300
self._composer.coin(

0 commit comments

Comments
 (0)