This doc contains suggestedDocumentation Index
Fetch the complete documentation index at: https://injectivelabs-mintlify-jp-developers-first-half-1777019423.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
gasWanted values for specific Exchange messages. Values were obtained heuristically
by observing gas consumption during MsgServer execution for a transaction containing a single Msg type. Conceptually,
for any transaction the following formula applies:
ante_gas is the gas consumed during AnteHandler and the subsequent sum of msg_gas is gas consumed
by MsgServer of each particular msg (highest observed ante_gas is 120_000).
With fixed_gas_enabled set to true in Exchange params, the following values can be used as gasWanted in order to
ensure a transaction does not run out of gas:
Note: It is assumed that the transaction contains a single message`.
| Message Type | Gas Wanted |
|---|---|
| MsgCreateDerivativeLimitOrder | 240,000 (post-only: 260,000) |
| MsgCreateDerivativeMarketOrder | 235,000 |
| MsgCancelDerivativeOrder | 190,000 |
| MsgCreateSpotLimitOrder | 220,000 (post-only: 240,000) |
| MsgCreateSpotMarketOrder | 170,000 |
| MsgCancelSpotOrder | 185,000 |
| MsgCreateBinaryOptionsLimitOrder | 240,000 (post-only: 260,000) |
| MsgCreateBinaryOptionsMarketOrder | 225,000 |
| MsgCancelBinaryOptionsOrder | 190,000 |
| MsgDeposit | 158,000 |
| MsgWithdrawGas | 155,000 |
| MsgSubaccountTransferGas | 135,000 |
| MsgExternalTransferGas | 160,000 |
| MsgIncreasePositionMarginGas | 171,000 |
| MsgDecreasePositionMarginGas | 180,000 |
ante_gas scales with the
number of orders (noticeably around 3000 added gas, included in this formula).:
N - is the number of orders
MsgBatchCreateSpotLimitOrders:tx_gas = 120_000 + N x 103_000(e.g. for 3 orders you get329_000)MsgBatchCancelSpotOrders:tx_gas = 120_000 + N x 68_000MsgBatchCreateDerivativeLimitOrders:tx_gas = 120_000 + N x 123_000MsgBatchCancelDerivativeOrders:tx_gas = 120_000 + N x 73_000MsgBatchCancelBinaryOptionsOrders:tx_gas = 120_000 + N x 123_000
- cancel 3 spot orders in market A
- create 2 derivative orders in market B
- create 1 binary-options post-only order in market C
- cancel all orders in spot markets X and Y (2 orders in X and 2 orders in Y)
955_000 gas.