Skip to content

Conversation

@aarmoa
Copy link
Contributor

@aarmoa aarmoa commented Apr 7, 2025

  • added a documentation page for the new txfees module
  • updated all messages and queries parameters reflect the changes for chain v1.15 upgrade

Summary by CodeRabbit

  • Documentation

    • Introduced a new section detailing market balance parameters with updated guidance on derivative and binary options.
    • Enhanced transaction fees documentation with clear examples and response formats for retrieving the current chain gas fee.
    • Expanded gas estimation fine-tuning documentation with detailed tables of configurable parameters.
    • Updated numerous code examples to improve clarity, formatting, and asynchronous usage patterns.
  • New Features

    • Launched a transaction fees module with EIP-1559 support for fetching the latest chain gas price.
    • Updated the market balance response schema for improved clarity.
  • Bug Fixes / Improvements

    • Replaced static gas price constants with dynamic fetching and 10% adjustment across all example scripts.
    • Improved transaction output formatting by printing responses as formatted JSON in Python examples.
    • Modernized Python SDK usage to asynchronous client models with explicit gas price handling.
    • Cleaned up and reordered imports in Go examples for clarity and removed deprecated usage.

@coderabbitai
Copy link

coderabbitai bot commented Apr 7, 2025

Walkthrough

The pull request updates multiple example codes and documentation to replace static gas price constants with dynamic retrieval of the current chain gas price, adjusted by a 10% buffer, before transaction fee calculation and broadcasting. This applies to Python and Go examples across various modules including account, auction, authz, bank, binary options, broadcaster, derivatives, insurance, oracle, permissions, portfolio, spot, staking, tokenfactory, wasm, and wasmx. The MsgBroadcasterWithPk examples are modernized to use asynchronous clients and include detailed gas estimation parameter documentation. Additionally, the new txfees module is introduced with the GetEipBaseFee method for fetching the chain gas price per EIP-1559, along with updated market balance documentation and JSON schema changes. The index is updated to include the new txfees module, and a changelog entry records the additions and SDK releases.

Changes

File(s) Change Summary
source/includes/_chainexchange.md
source/json_tables/chain/exchange/queryMarketBalanceResponse.json
Added a new MarketBalance section with parameters market_id and balance. Changed balance parameter type from "Decimal" to "MarketBalance".
source/includes/_txfees.md
source/index.html.md
source/json_tables/chain/txfees/eipBaseFee.json
source/json_tables/chain/txfees/queryEipBaseFeeResponse.json
Added new txfees module documenting GetEipBaseFee method for retrieving current chain gas price per EIP-1559, with example requests, responses, and JSON schema. Added txfees entry to index.
source/includes/_account.md
source/includes/_auction.md
source/includes/_authz.md
source/includes/_bank.md
source/includes/_binaryoptions.md
source/includes/_derivatives.md
source/includes/_ibctransfer.md
source/includes/_insurance.md
source/includes/_oracle.md
source/includes/_permissions.md
source/includes/_portfoliorpc.md
source/includes/_spot.md
source/includes/_staking.md
source/includes/_tokenfactory.md
source/includes/_wasm.md
source/includes/_wasmx.md
Replaced static gas price constants with dynamic fetching of current chain gas price asynchronously (Python) or synchronously (Go), multiplied by 1.1 to buffer for price changes. Adjusted gas price is set explicitly on clients or broadcasters before and after transaction broadcasts. Updated import statements accordingly. Python examples now print transaction responses as formatted JSON. Modernized broadcaster examples to use asynchronous clients and updated gas estimation documentation.
source/includes/_broadcaster.md Modernized MsgBroadcasterWithPk examples to use asynchronous AsyncClient and composer retrieval. Added detailed tables documenting global gas estimation parameters for different estimator classes. Reformatted notes on gas cost estimation.
source/includes/_derivativesrpc.md Updated Python example method call from fetch_subaccount_orders_list to fetch_derivative_subaccount_orders_list.
source/includes/_changelog.md Added changelog entry for April 21, 2025, documenting the addition of the TXFees module, updates to messages for chain v1.15 and Indexer, and SDK releases (Python 1.10.0, Go 1.57.0).

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant TxFees as "txfees Module"
    participant Chain as "Blockchain"
    
    Client->>TxFees: Call GetEipBaseFee()
    TxFees->>Chain: Request current gas price
    Chain-->>TxFees: Return base fee
    TxFees-->>Client: Respond with JSON { "baseFee": value }
Loading

Poem

I'm a cheerful rabbit in the code-lane,
Hopping over txfees with a joyful refrain.
MarketBalance tables now gleam like a star,
Guiding each call, both near and far.
In every update, I dance with delight—
Celebrating changes from morning 'til night!
🐇✨📜


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
source/includes/_txfees.md (1)

39-42: Styling Improvement for EipBaseFee Label

The EipBaseFee label on line 39 is formatted using bold emphasis. For improved consistency and to comply with markdownlint MD036 (no emphasis-as-heading), consider converting it into a proper heading (e.g., ### EipBaseFee).

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

39-39: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)

source/includes/_chainexchange.md (1)

4608-4617: New MarketBalance Section: Heading Format and Type Consistency

This newly added block introduces a "MarketBalance" section with a table describing the parameters “market_id” and “balance.” Two points to note:

  1. Heading Format: The section title is written as an emphasized inline text (“MarketBalance”). For consistency with the rest of the document (where sections use Markdown headings such as “## SubaccountDeposits” and “## SubaccountDeposit”), please change it to a proper heading. For example, replace:
    - **MarketBalance**
    + ## MarketBalance
  2. Type Verification: The table shows the type for the “balance” parameter as “Decimal.” However, the latest update indicates that this type should now be “MarketBalance” (as reflected in the PR summary). Please verify whether this is intentional or if the table should be updated accordingly.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

4610-4610: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 71aaa07 and 63575ac.

📒 Files selected for processing (6)
  • source/includes/_chainexchange.md (1 hunks)
  • source/includes/_txfees.md (1 hunks)
  • source/index.html.md (1 hunks)
  • source/json_tables/chain/exchange/queryMarketBalanceResponse.json (1 hunks)
  • source/json_tables/chain/txfees/eipBaseFee.json (1 hunks)
  • source/json_tables/chain/txfees/queryEipBaseFeeResponse.json (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
source/includes/_txfees.md

39-39: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)

source/includes/_chainexchange.md

4610-4610: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Redirect rules - injective-docs
  • GitHub Check: Header rules - injective-docs
  • GitHub Check: Pages changed - injective-docs
  • GitHub Check: test (2.7)
🔇 Additional comments (5)
source/index.html.md (1)

49-49: New txfees Entry Added

The new txfees entry is correctly inserted into the includes list. This addition is in line with the documentation enhancements for the txfees module. Please verify that it appears as expected in the generated API reference navigation.

source/json_tables/chain/txfees/queryEipBaseFeeResponse.json (1)

1-3: New EIP-1559 Response Definition

This JSON file correctly defines the base_fee parameter with type EipBaseFee, aligning with the expected response schema for the GetEipBaseFee method. Ensure that downstream documentation and API implementations reference this schema consistently.

source/json_tables/chain/exchange/queryMarketBalanceResponse.json (1)

1-3: Updated MarketBalance Parameter Type

The change from "Decimal" to "MarketBalance" for the balance parameter is clearly reflected in this JSON file. Please double-check that all related documentation and code references are updated accordingly.

source/json_tables/chain/txfees/eipBaseFee.json (1)

1-3: New EIP Base Fee Schema Added

This file introduces the eipBaseFee JSON structure, defining base_fee with type Decimal as intended. Confirm that this definition is used appropriately in tandem with the response structure defined in queryEipBaseFeeResponse.json.

source/includes/_txfees.md (1)

1-38: Comprehensive txfees Module Documentation

The documentation clearly outlines the functionality of the txfees module, including the GetEipBaseFee method. Code examples for both Python and Go are auto-included via MARKDOWN-AUTO-DOCS, which enhances clarity and developer usability.

@aarmoa aarmoa merged commit 50190a7 into main Apr 21, 2025
8 of 9 checks passed
@aarmoa aarmoa deleted the feat/chain_upgrade_v1_15 branch April 21, 2025 02:16
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (24)
source/includes/_account.md (20)

192-195: Refresh Go gas price after deposit broadcast.
Re‐fetching and updating the gas price post-broadcast prevents stale fee configurations.


371-373: Apply dynamic gas price in withdraw example.
Consistent with deposit, using the live gas price with a 10% buffer ensures accurate fee estimation.


462-465: Initialize dynamic gas price in Go withdraw example.
Switching to CurrentChainGasPrice and SetGasPrice ensures fee calculation aligns with network conditions.


493-496: Refresh Go gas price after withdraw broadcast.
Maintains up-to-date fee settings for further transactions by updating gas price post-broadcast.


625-625: Import buffer constant in subaccount transfer.
The buffer constant import standardizes gas fee computation across related examples.


680-682: Use dynamic gas price in subaccount transfer.
Fetching, buffering, and applying the current gas price improves example accuracy.


725-725: Add client/common import for subaccount transfer.
Mirrors other examples by moving gas price setup into example code.


770-773: Initialize dynamic gas price in Go subaccount transfer.
The example now fetches, buffers, and sets the gas price manually.


802-805: Refresh Go gas price after subaccount transfer.
Ensures subsequent broadcasts use current network rates by updating the gas price post-broadcast.


935-935: Import buffer constant in external transfer example.
Standardizes the buffer usage across all transaction scenarios.


990-992: Apply dynamic gas price in external transfer.
Maintains consistent fee calculation by using live gas data with a safety buffer.


1030-1031: Adjust Go imports for external transfer.
The rpchttp and sdktypes imports support the reorganized gas price strategy.


1035-1035: Include client/common import in external transfer.
Matches other examples by centralizing gas configuration logic in code.


1080-1083: Initialize gas price dynamically in Go external transfer.
Fetching and setting gas price manually improves accuracy in fee management.


1112-1115: Refresh gas price after external transfer.
Consistent post-broadcast update maintains correct fee configuration.


1245-1245: Import buffer constant in MsgSendToEth example.
Ensures the gas buffer is consistently applied across peggy examples.


1305-1307: Fetch and buffer gas price in MsgSendToEth.
Follows the established pattern for dynamic fee calculation.


1350-1350: Include client/common import for MsgSendToEth.
Mirrors other examples by moving gas price configuration into example code.


1395-1398: Initialize gas price in Go MsgSendToEth.
Manual gas price retrieval and buffering replace static defaults, improving representativeness.


1434-1437: Update gas price after MsgSendToEth broadcast.
Consistent post-broadcast refresh ensures fee accuracy for future calls.

source/includes/_broadcaster.md (4)

173-173: Duplicate: ensure accurate gas price buffer calculation
This segment duplicates the truncating pattern at lines 44–46. See that comment for switching to math.ceil.


197-199: Duplicate: ensure accurate gas price buffer calculation
Same truncation logic is repeated here; please round up instead of using int(...) to preserve the 10% margin.


310-312: Duplicate: ensure accurate gas price buffer calculation
Again, this mirrors lines 44–46. Refer to that suggestion to use math.ceil.


441-443: Duplicate: ensure accurate gas price buffer calculation
The same pattern appears here—please apply the rounding-up fix from the primary example.

🧹 Nitpick comments (31)
source/includes/_portfoliorpc.md (1)

54-62: Remove hard tabs to satisfy markdownlint (MD010)
Markdown linting is failing due to hard tabs at the start of these lines. Replace leading tabs with spaces. For example:

-	network := common.LoadNetwork("devnet", "lb")
+    network := common.LoadNetwork("devnet", "lb")
-	exchangeClient, err := exchangeclient.NewExchangeClient(network)
+    exchangeClient, err := exchangeclient.NewExchangeClient(network)
-	if err != nil {
+    if err != nil {
-		panic(err)
+        panic(err)
-	}
+    }
-	ctx := context.Background()
+    ctx := context.Background()
-	res, err := exchangeClient.GetAccountPortfolioBalances(ctx, accountAddress, true)
+    res, err := exchangeClient.GetAccountPortfolioBalances(ctx, accountAddress, true)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

54-54: Hard tabs
Column: 1

(MD010, no-hard-tabs)


55-55: Hard tabs
Column: 1

(MD010, no-hard-tabs)


56-56: Hard tabs
Column: 1

(MD010, no-hard-tabs)


57-57: Hard tabs
Column: 1

(MD010, no-hard-tabs)


58-58: Hard tabs
Column: 1

(MD010, no-hard-tabs)


60-60: Hard tabs
Column: 1

(MD010, no-hard-tabs)


61-61: Hard tabs
Column: 1

(MD010, no-hard-tabs)


62-62: Hard tabs
Column: 1

(MD010, no-hard-tabs)

source/includes/_insurance.md (1)

78-81: Extract buffer multiplier into a constant
The logic to fetch gas_price dynamically and apply a 10% buffer is correct. Consider pulling the 1.1 multiplier into a named constant (e.g., GAS_PRICE_BUFFER_RATIO) for readability and to avoid magic numbers across examples.

source/includes/_txfees.md (1)

16-16: Heading vs. method name mismatch
The documentation heading uses GetEipBaseFee (PascalCase) but the Python example calls client.fetch_eip_base_fee() (snake_case). Please align the heading or snippet so that readers see the same method name.

source/includes/_oracle.md (3)

74-76: DRY the gas price buffer logic
The asynchronous fetch and 10% buffer are applied correctly. To reduce duplication across modules, consider extracting this into a helper function (e.g., get_buffered_gas_price(client)).


163-167: Go: initial gas price setup
Fetching and setting the buffered gas price on the Go client immediately after initialization is correct. Factoring this into a reusable utility (e.g., SetupBufferedGasPrice(chainClient)) will improve maintainability.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

163-163: Hard tabs
Column: 1

(MD010, no-hard-tabs)


164-164: Hard tabs
Column: 1

(MD010, no-hard-tabs)


165-165: Hard tabs
Column: 1

(MD010, no-hard-tabs)


166-166: Hard tabs
Column: 1

(MD010, no-hard-tabs)


188-192: Go: post-broadcast gas price refresh
Reapplying the buffered gas price after broadcasting helps maintain accurate fee calculations. Centralizing this pattern in a shared helper would eliminate boilerplate.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

188-188: Hard tabs
Column: 1

(MD010, no-hard-tabs)


189-189: Hard tabs
Column: 1

(MD010, no-hard-tabs)


190-190: Hard tabs
Column: 1

(MD010, no-hard-tabs)


191-191: Hard tabs
Column: 1

(MD010, no-hard-tabs)

source/includes/_authz.md (5)

91-93: Python: gas price buffering
The pattern await client.current_chain_gas_price() followed by multiplying by 1.1 works as intended. You may want to wrap this in a helper (e.g., buffered_gas_price(client)) to apply consistently.


178-182: Go: dynamic gas price on init
Correctly fetching and setting the buffered gas price on the Go chain client. Consider a shared InitializeBufferedGasPrice(client) helper to avoid repetition.


219-223: Go: dynamic gas price after execution
Refreshing the gas price buffer post-execution ensures fee accuracy. A common helper would streamline this across all Authz examples.


368-372: Python MsgExec: buffer logic
You've mirrored the buffering pattern in the MsgExec example. Extracting this into a utility function will keep all Python examples DRY.


792-795: Python MsgRevoke: buffer logic
The dynamic gas price and buffer are applied correctly for MsgRevoke. Consider the same helper approach for consistency.

source/includes/_auction.md (3)

69-71: Python: dynamic gas price buffer
Good implementation. Extracting this snippet into a shared helper will reduce duplication across modules.


159-163: Go: initial buffered gas price
Applying the 10% buffer after fetching CurrentChainGasPrice is appropriate. A helper would make this pattern consistent across all Go examples.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

159-159: Hard tabs
Column: 1

(MD010, no-hard-tabs)


160-160: Hard tabs
Column: 1

(MD010, no-hard-tabs)


161-161: Hard tabs
Column: 1

(MD010, no-hard-tabs)


162-162: Hard tabs
Column: 1

(MD010, no-hard-tabs)


193-197: Go: post‑bid buffer refresh
Reapplying the gas price buffer after broadcasting helps maintain accurate gas fee tracking. Consider consolidating this logic into a utility function.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

193-193: Hard tabs
Column: 1

(MD010, no-hard-tabs)


194-194: Hard tabs
Column: 1

(MD010, no-hard-tabs)


195-195: Hard tabs
Column: 1

(MD010, no-hard-tabs)


196-196: Hard tabs
Column: 1

(MD010, no-hard-tabs)

source/includes/_chainexchange.md (1)

4614-4618: Documented the MarketBalance object
A new MarketBalance section has been added to describe its fields (market_id and balance). Consider tweaking the descriptions for consistency with other tables—e.g., change "ID of the market" to "The market ID" and "Current market balance" to "The market's current balance".

source/includes/_tokenfactory.md (5)

617-623: Organize imports correctly
Consider grouping standard library imports (json, os) above third-party imports (dotenv, pyinjective). Adhering to PEP8 import ordering (stdlib, third-party, local) will improve readability and maintainability.


638-641: Add dynamic gas price buffer
Fetching the current chain gas price and applying a 10% buffer addresses volatility. Confirm that converting to int via int(gas_price * 1.1) maintains sufficient precision for on‑chain fee estimation.


668-672: Refresh gas price after broadcast
Re‑fetching and updating message_broadcaster.update_gas_price ensures accuracy for subsequent broadcasts. Consider extracting this logic into a helper function to reduce repetition.


736-739: Dynamic gas pricing & formatting nit
The Go example correctly fetches CurrentChainGasPrice, applies a 10% buffer, and sets it on the client. However, lint warnings indicate hard tabs—replace them with spaces in the Markdown code block for consistency.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

736-736: Hard tabs
Column: 1

(MD010, no-hard-tabs)


737-737: Hard tabs
Column: 1

(MD010, no-hard-tabs)


738-738: Hard tabs
Column: 1

(MD010, no-hard-tabs)


739-739: Hard tabs
Column: 1

(MD010, no-hard-tabs)


758-762: Repeat gas price adjustment after broadcast
Refreshing the Go client’s gas price post-broadcast maintains parity with Python docs. As with the initial adjustment, extract into a reusable helper to adhere to DRY principles, and convert hard tabs to spaces.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

758-758: Hard tabs
Column: 1

(MD010, no-hard-tabs)


759-759: Hard tabs
Column: 1

(MD010, no-hard-tabs)


760-760: Hard tabs
Column: 1

(MD010, no-hard-tabs)


761-761: Hard tabs
Column: 1

(MD010, no-hard-tabs)

source/includes/_permissions.md (3)

2969-2969: Import json for pretty-printing transaction responses
Adding import json is necessary to use json.dumps for formatted output. Consider grouping your standard‐library imports (asyncio, json, os) together and separating them from third‑party imports by a blank line for readability.

Also applies to: 3411-3411, 3806-3806, 4102-4102


2989-2991: Dynamically fetch and buffer the gas price
Using await client.current_chain_gas_price() plus a 10% buffer guards against underpayment during volatility. To avoid rounding down, you might opt for math.ceil(gas_price * 1.1) instead of int(...).

Also applies to: 3432-3434, 3826-3828, 4122-4124


2996-2998: Pass dynamic parameters into the broadcaster
Supplying gas_price, client, and composer into MsgBroadcasterWithPk.new_using_simulation centralizes configuration. Consider extracting this boilerplate into a helper function to DRY up repeated setup across examples.

Also applies to: 3439-3442, 3833-3836, 4129-4132

source/includes/_broadcaster.md (4)

98-101: Extract repeated gas-price-update logic into a helper (optional)
The block for fetching and adjusting gas_price after broadcast is duplicated. Consider a helper:

async def fetch_buffered_gas_price(client):
    import math
    base = await client.current_chain_gas_price()
    return math.ceil(base * 1.1)

Then replace:

- gas_price = await client.current_chain_gas_price()
- gas_price = math.ceil(gas_price * 1.1)
+ gas_price = await fetch_buffered_gas_price(client)

491-492: Fix grammar in note introduction
The sentence “There an important consideration…” is missing a verb. For clarity:

There is an important consideration when using the Transaction Broadcaster…

Optionally, switch to an ATX-style admonition (e.g., > **Note:**) for consistency.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~491-~491: “There” seems less likely than “they’re”.
Context: ...ulation`.

--- NOTE: There an important consideration when using t...

(AI_HYDRA_LEO_CP_THERE_THEYARE)

🪛 markdownlint-cli2 (0.17.2)

491-491: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)


492-492: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


492-492: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


495-496: Improve readability with comma and typo fix
The long sentence should be punctuated and “fine-tunning” corrected:

- To improve the gas cost calculation when using the _MsgBatchUpdateOrders_ message to cancel all orders for one or more markets you can change the number of estimated orders to cancel per market. Check in the fine-tunning section the proper `AVERAGE_CANCEL_ALL_AFFECTED_ORDERS` global variable to change.
+ To improve the gas cost calculation when using the _MsgBatchUpdateOrders_ message to cancel all orders for one or more markets, you can change the number of estimated orders to cancel per market. Check in the fine-tuning section for the `AVERAGE_CANCEL_ALL_AFFECTED_ORDERS` variable.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~495-~495: Possible missing comma found.
Context: ...ge to cancel all orders for one or more markets you can change the number of estimated ...

(AI_HYDRA_LEO_MISSING_COMMA)

🪛 markdownlint-cli2 (0.17.2)

495-495: Trailing punctuation in heading
Punctuation: '.'

(MD026, no-trailing-punctuation)


495-495: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


495-495: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


499-499: Correct heading spelling and hyphenation
Update the heading to:

## Fine-tuning message-based gas fee estimation
  • “tunning” → “tuning”
  • Add hyphen in “message-based”
🧰 Tools
🪛 LanguageTool

[uncategorized] ~499-~499: This expression is usually spelled with a hyphen.
Context: ...riable to change. --- ## Fine-tunning message based gas fee estimation As mentioned before...

(BASED_HYPHEN)

source/includes/_staking.md (4)

1353-1353: Group standard library imports
The import json lines in these Python snippets should be grouped with other standard library imports at the top of each example (per PEP 8). Please reorder imports in each Python block to separate standard library, third‑party, and local imports.

Also applies to: 1598-1598, 1861-1861


1372-1375: Consolidate dynamic gas price logic
Across multiple examples you fetch current_chain_gas_price(), apply a 10% buffer, and then update the broadcaster/client. Extracting this into a shared helper (e.g. def update_gas_price(client): ...) will reduce duplication and ensure consistency.

Also applies to: 1401-1404, 1618-1621, 1647-1650, 1881-1884, 1908-1911, 2418-2421


1422-1422: Standardize Go import ordering
Go best practice is to list standard library imports first, then third‑party (e.g. github.com/cometbft/...), then project‑specific modules. Please reorder the newly added imports to match this grouping.

Also applies to: 1669-1669, 1929-1929, 2458-2458


1471-1474: DRY up Go gas price updates
The pattern of calling CurrentChainGasPrice(), adjusting by 1.1, and SetGasPrice() repeats in each example. Consider adding a method on ChainClient (e.g. client.UpdateGasPriceBuffer(1.1)) to encapsulate this logic.

Also applies to: 1493-1496, 1717-1720, 1744-1747, 1978-1981, 1999-2002, 2508-2511, 2538-2541

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 63575ac and 782546c.

📒 Files selected for processing (21)
  • source/includes/_account.md (23 hunks)
  • source/includes/_auction.md (5 hunks)
  • source/includes/_authz.md (14 hunks)
  • source/includes/_bank.md (8 hunks)
  • source/includes/_binaryoptions.md (14 hunks)
  • source/includes/_broadcaster.md (14 hunks)
  • source/includes/_chainexchange.md (17 hunks)
  • source/includes/_changelog.md (1 hunks)
  • source/includes/_derivatives.md (53 hunks)
  • source/includes/_derivativesrpc.md (1 hunks)
  • source/includes/_ibctransfer.md (5 hunks)
  • source/includes/_insurance.md (6 hunks)
  • source/includes/_oracle.md (6 hunks)
  • source/includes/_permissions.md (21 hunks)
  • source/includes/_portfoliorpc.md (2 hunks)
  • source/includes/_spot.md (32 hunks)
  • source/includes/_staking.md (28 hunks)
  • source/includes/_tokenfactory.md (27 hunks)
  • source/includes/_txfees.md (1 hunks)
  • source/includes/_wasm.md (2 hunks)
  • source/includes/_wasmx.md (5 hunks)
✅ Files skipped from review due to trivial changes (1)
  • source/includes/_changelog.md
👮 Files not reviewed due to content moderation or server errors (1)
  • source/includes/_wasm.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
source/includes/_portfoliorpc.md

54-54: Hard tabs
Column: 1

(MD010, no-hard-tabs)


55-55: Hard tabs
Column: 1

(MD010, no-hard-tabs)


56-56: Hard tabs
Column: 1

(MD010, no-hard-tabs)


57-57: Hard tabs
Column: 1

(MD010, no-hard-tabs)


58-58: Hard tabs
Column: 1

(MD010, no-hard-tabs)


60-60: Hard tabs
Column: 1

(MD010, no-hard-tabs)


61-61: Hard tabs
Column: 1

(MD010, no-hard-tabs)


62-62: Hard tabs
Column: 1

(MD010, no-hard-tabs)

source/includes/_oracle.md

163-163: Hard tabs
Column: 1

(MD010, no-hard-tabs)


164-164: Hard tabs
Column: 1

(MD010, no-hard-tabs)


165-165: Hard tabs
Column: 1

(MD010, no-hard-tabs)


166-166: Hard tabs
Column: 1

(MD010, no-hard-tabs)


188-188: Hard tabs
Column: 1

(MD010, no-hard-tabs)


189-189: Hard tabs
Column: 1

(MD010, no-hard-tabs)


190-190: Hard tabs
Column: 1

(MD010, no-hard-tabs)


191-191: Hard tabs
Column: 1

(MD010, no-hard-tabs)

source/includes/_wasmx.md

121-121: Hard tabs
Column: 1

(MD010, no-hard-tabs)


169-169: Hard tabs
Column: 1

(MD010, no-hard-tabs)


170-170: Hard tabs
Column: 1

(MD010, no-hard-tabs)


171-171: Hard tabs
Column: 1

(MD010, no-hard-tabs)


172-172: Hard tabs
Column: 1

(MD010, no-hard-tabs)


207-207: Hard tabs
Column: 1

(MD010, no-hard-tabs)


208-208: Hard tabs
Column: 1

(MD010, no-hard-tabs)


209-209: Hard tabs
Column: 1

(MD010, no-hard-tabs)


210-210: Hard tabs
Column: 1

(MD010, no-hard-tabs)

source/includes/_auction.md

109-109: Hard tabs
Column: 1

(MD010, no-hard-tabs)


110-110: Hard tabs
Column: 1

(MD010, no-hard-tabs)


112-112: Hard tabs
Column: 1

(MD010, no-hard-tabs)


113-113: Hard tabs
Column: 1

(MD010, no-hard-tabs)


114-114: Hard tabs
Column: 1

(MD010, no-hard-tabs)


159-159: Hard tabs
Column: 1

(MD010, no-hard-tabs)


160-160: Hard tabs
Column: 1

(MD010, no-hard-tabs)


161-161: Hard tabs
Column: 1

(MD010, no-hard-tabs)


162-162: Hard tabs
Column: 1

(MD010, no-hard-tabs)


193-193: Hard tabs
Column: 1

(MD010, no-hard-tabs)


194-194: Hard tabs
Column: 1

(MD010, no-hard-tabs)


195-195: Hard tabs
Column: 1

(MD010, no-hard-tabs)


196-196: Hard tabs
Column: 1

(MD010, no-hard-tabs)

source/includes/_broadcaster.md

491-491: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)


492-492: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


492-492: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


493-493: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


493-493: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


495-495: Trailing punctuation in heading
Punctuation: '.'

(MD026, no-trailing-punctuation)


495-495: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)


495-495: Emphasis style
Expected: asterisk; Actual: underscore

(MD049, emphasis-style)

source/includes/_tokenfactory.md

736-736: Hard tabs
Column: 1

(MD010, no-hard-tabs)


737-737: Hard tabs
Column: 1

(MD010, no-hard-tabs)


738-738: Hard tabs
Column: 1

(MD010, no-hard-tabs)


739-739: Hard tabs
Column: 1

(MD010, no-hard-tabs)


758-758: Hard tabs
Column: 1

(MD010, no-hard-tabs)


759-759: Hard tabs
Column: 1

(MD010, no-hard-tabs)


760-760: Hard tabs
Column: 1

(MD010, no-hard-tabs)


761-761: Hard tabs
Column: 1

(MD010, no-hard-tabs)


990-990: Hard tabs
Column: 1

(MD010, no-hard-tabs)


991-991: Hard tabs
Column: 1

(MD010, no-hard-tabs)


992-992: Hard tabs
Column: 1

(MD010, no-hard-tabs)


993-993: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1012-1012: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1013-1013: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1014-1014: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1015-1015: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1250-1250: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1251-1251: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1252-1252: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1253-1253: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1272-1272: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1273-1273: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1274-1274: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1275-1275: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1474-1474: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1475-1475: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1523-1523: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1524-1524: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1525-1525: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1526-1526: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1569-1569: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1570-1570: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1571-1571: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1572-1572: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1773-1773: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1821-1821: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1822-1822: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1823-1823: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1824-1824: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1842-1842: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1843-1843: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1844-1844: Hard tabs
Column: 1

(MD010, no-hard-tabs)


1845-1845: Hard tabs
Column: 1

(MD010, no-hard-tabs)

source/includes/_spot.md

2010-2010: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2011-2011: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2012-2012: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2013-2013: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2047-2047: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2048-2048: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2049-2049: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2050-2050: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2324-2324: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2325-2325: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2326-2326: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2327-2327: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2395-2395: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2396-2396: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2397-2397: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2398-2398: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2722-2722: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2723-2723: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2724-2724: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2725-2725: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2791-2791: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2792-2792: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2793-2793: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2794-2794: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3100-3100: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3101-3101: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3102-3102: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3103-3103: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3130-3130: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3131-3131: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3132-3132: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3133-3133: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3500-3500: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3501-3501: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3502-3502: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3503-3503: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3593-3593: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3594-3594: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3595-3595: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3596-3596: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3940-3940: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3941-3941: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3942-3942: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3943-3943: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3974-3974: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3975-3975: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3976-3976: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3977-3977: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4438-4438: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4439-4439: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4440-4440: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4441-4441: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4515-4515: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4516-4516: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4517-4517: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4518-4518: Hard tabs
Column: 1

(MD010, no-hard-tabs)

source/includes/_derivatives.md

3227-3227: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3228-3228: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3229-3229: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3230-3230: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3264-3264: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3265-3265: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3266-3266: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3267-3267: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3535-3535: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3536-3536: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3537-3537: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3538-3538: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3573-3573: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3574-3574: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3575-3575: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3576-3576: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3876-3876: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3877-3877: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3878-3878: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3879-3879: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3946-3946: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3947-3947: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3948-3948: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3949-3949: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4277-4277: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4278-4278: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4279-4279: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4280-4280: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4348-4348: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4349-4349: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4350-4350: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4351-4351: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4610-4610: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4612-4612: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4613-4613: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4614-4614: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4659-4659: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4660-4660: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4661-4661: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4662-4662: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4689-4689: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4690-4690: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4691-4691: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4692-4692: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5080-5080: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5081-5081: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5082-5082: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5083-5083: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5173-5173: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5174-5174: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5175-5175: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5176-5176: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5571-5571: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5572-5572: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5573-5573: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5574-5574: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5620-5620: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5621-5621: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5622-5622: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5623-5623: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5874-5874: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5876-5876: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5877-5877: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5878-5878: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5923-5923: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5924-5924: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5925-5925: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5926-5926: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5954-5954: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5955-5955: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5956-5956: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5957-5957: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6157-6157: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6159-6159: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6160-6160: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6161-6161: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6206-6206: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6207-6207: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6208-6208: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6209-6209: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6231-6231: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6232-6232: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6233-6233: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6234-6234: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6482-6482: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6483-6483: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6484-6484: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6485-6485: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6516-6516: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6517-6517: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6518-6518: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6519-6519: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6982-6982: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6983-6983: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6984-6984: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6985-6985: Hard tabs
Column: 1

(MD010, no-hard-tabs)


7059-7059: Hard tabs
Column: 1

(MD010, no-hard-tabs)


7060-7060: Hard tabs
Column: 1

(MD010, no-hard-tabs)


7061-7061: Hard tabs
Column: 1

(MD010, no-hard-tabs)


7062-7062: Hard tabs
Column: 1

(MD010, no-hard-tabs)

source/includes/_permissions.md

3143-3143: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3144-3144: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3145-3145: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3146-3146: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3226-3226: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3227-3227: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3228-3228: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3229-3229: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3520-3520: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3569-3569: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3570-3570: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3571-3571: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3572-3572: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3630-3630: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3631-3631: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3632-3632: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3633-3633: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3944-3944: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3945-3945: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3946-3946: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3947-3947: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3984-3984: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3985-3985: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3986-3986: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3987-3987: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4221-4221: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4222-4222: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4223-4223: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4224-4224: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4243-4243: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4244-4244: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4245-4245: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4246-4246: Hard tabs
Column: 1

(MD010, no-hard-tabs)

source/includes/_txfees.md

43-43: Hard tabs
Column: 1

(MD010, no-hard-tabs)


44-44: Hard tabs
Column: 1

(MD010, no-hard-tabs)


45-45: Hard tabs
Column: 1

(MD010, no-hard-tabs)


47-47: Hard tabs
Column: 1

(MD010, no-hard-tabs)


49-49: Hard tabs
Column: 1

(MD010, no-hard-tabs)


50-50: Hard tabs
Column: 1

(MD010, no-hard-tabs)


51-51: Hard tabs
Column: 1

(MD010, no-hard-tabs)


52-52: Hard tabs
Column: 1

(MD010, no-hard-tabs)


56-56: Hard tabs
Column: 1

(MD010, no-hard-tabs)


57-57: Hard tabs
Column: 1

(MD010, no-hard-tabs)


58-58: Hard tabs
Column: 1

(MD010, no-hard-tabs)


59-59: Hard tabs
Column: 1

(MD010, no-hard-tabs)


60-60: Hard tabs
Column: 1

(MD010, no-hard-tabs)


62-62: Hard tabs
Column: 1

(MD010, no-hard-tabs)


63-63: Hard tabs
Column: 1

(MD010, no-hard-tabs)


64-64: Hard tabs
Column: 1

(MD010, no-hard-tabs)


65-65: Hard tabs
Column: 1

(MD010, no-hard-tabs)


66-66: Hard tabs
Column: 1

(MD010, no-hard-tabs)


67-67: Hard tabs
Column: 1

(MD010, no-hard-tabs)


68-68: Hard tabs
Column: 1

(MD010, no-hard-tabs)


69-69: Hard tabs
Column: 1

(MD010, no-hard-tabs)


70-70: Hard tabs
Column: 1

(MD010, no-hard-tabs)


72-72: Hard tabs
Column: 1

(MD010, no-hard-tabs)


73-73: Hard tabs
Column: 1

(MD010, no-hard-tabs)


74-74: Hard tabs
Column: 1

(MD010, no-hard-tabs)


76-76: Hard tabs
Column: 1

(MD010, no-hard-tabs)


77-77: Hard tabs
Column: 1

(MD010, no-hard-tabs)


78-78: Hard tabs
Column: 1

(MD010, no-hard-tabs)


79-79: Hard tabs
Column: 1

(MD010, no-hard-tabs)


80-80: Hard tabs
Column: 1

(MD010, no-hard-tabs)


82-82: Hard tabs
Column: 1

(MD010, no-hard-tabs)


83-83: Hard tabs
Column: 1

(MD010, no-hard-tabs)


84-84: Hard tabs
Column: 1

(MD010, no-hard-tabs)


86-86: Hard tabs
Column: 1

(MD010, no-hard-tabs)


88-88: Hard tabs
Column: 1

(MD010, no-hard-tabs)


89-89: Hard tabs
Column: 1

(MD010, no-hard-tabs)


90-90: Hard tabs
Column: 1

(MD010, no-hard-tabs)


91-91: Hard tabs
Column: 1

(MD010, no-hard-tabs)


92-92: Hard tabs
Column: 1

(MD010, no-hard-tabs)


94-94: Hard tabs
Column: 1

(MD010, no-hard-tabs)


95-95: Hard tabs
Column: 1

(MD010, no-hard-tabs)


96-96: Hard tabs
Column: 1

(MD010, no-hard-tabs)


98-98: Hard tabs
Column: 1

(MD010, no-hard-tabs)


100-100: Hard tabs
Column: 1

(MD010, no-hard-tabs)


101-101: Hard tabs
Column: 1

(MD010, no-hard-tabs)


102-102: Hard tabs
Column: 1

(MD010, no-hard-tabs)


103-103: Hard tabs
Column: 1

(MD010, no-hard-tabs)


105-105: Hard tabs
Column: 1

(MD010, no-hard-tabs)


106-106: Hard tabs
Column: 1

(MD010, no-hard-tabs)


131-131: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)

🪛 LanguageTool
source/includes/_broadcaster.md

[uncategorized] ~491-~491: “There” seems less likely than “they’re”.
Context: ...ulation`.

--- NOTE: There an important consideration when using t...

(AI_HYDRA_LEO_CP_THERE_THEYARE)


[uncategorized] ~493-~493: Did you mean: “By default,”?
Context: ...n the number of orders to be cancelled. By default the estimation logic calculates a gas c...

(BY_DEFAULT_COMMA)


[uncategorized] ~495-~495: Possible missing comma found.
Context: ...ge to cancel all orders for one or more markets you can change the number of estimated ...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~499-~499: This expression is usually spelled with a hyphen.
Context: ...riable to change. --- ## Fine-tunning message based gas fee estimation As mentioned before...

(BASED_HYPHEN)


[formatting] ~500-~500: Consider inserting a comma after an introductory phrase.
Context: ...nning message based gas fee estimation As mentioned before the gas estimation without using simula...

(AS_SAID_COMMA)


[style] ~501-~501: Consider a shorter alternative to avoid wordiness.
Context: ...er to fine-tune certain gas cost values in order to improve the gas cost estimation. In the...

(IN_ORDER_TO_PREMIUM)


[uncategorized] ~502-~502: Possible missing comma found.
Context: ...ve the gas cost estimation. In the next tables you can find the global values used for...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~519-~519: Do not mix variants of the same word (‘cancellation’ and ‘cancelation’) within a single text.
Context: ... | The gas cost associated to the cancellation of one spot order ...

(EN_WORD_COHERENCY)


[uncategorized] ~520-~520: Do not mix variants of the same word (‘cancellation’ and ‘cancelation’) within a single text.
Context: ... | The gas cost associated to the cancellation of one derivative order ...

(EN_WORD_COHERENCY)


[uncategorized] ~521-~521: Do not mix variants of the same word (‘cancellation’ and ‘cancelation’) within a single text.
Context: ... | The gas cost associated to the cancellation of one binary options order ...

(EN_WORD_COHERENCY)


[uncategorized] ~565-~565: Possible missing comma found.
Context: ...Each type of message will calculate its cost multiplying this reference cost by a mu...

(AI_HYDRA_LEO_MISSING_COMMA)

⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: Redirect rules - injective-docs
  • GitHub Check: Header rules - injective-docs
  • GitHub Check: Pages changed - injective-docs
  • GitHub Check: test (3.2)
  • GitHub Check: test (2.7)
🔇 Additional comments (85)
source/includes/_portfoliorpc.md (3)

29-29: Explicitly passing the usd parameter improves clarity
Adding usd=False makes it clear that balances are fetched in native tokens, not USD. This explicitness guards against future default changes in the SDK.


54-54: Environment switched to devnet for consistency
Updating the Go example to use devnet aligns it with other Go snippets in this release.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

54-54: Hard tabs
Column: 1

(MD010, no-hard-tabs)


62-62: Include explicit boolean flag for subaccount details
The added true argument ensures that subaccount balances are returned. This matches the updated SDK signature and improves example accuracy.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

62-62: Hard tabs
Column: 1

(MD010, no-hard-tabs)

source/includes/_derivativesrpc.md (1)

3885-3887: Method name update aligns with SDK.

The Python example now correctly calls fetch_derivative_subaccount_orders_list, matching the updated SDK naming and the Go example’s GetSubaccountDerivativeOrdersList.

source/includes/_insurance.md (1)

22-22: Consistent import replacement
Swapping out the static GAS_PRICE import for GAS_FEE_BUFFER_AMOUNT aligns with the new buffering logic. Please double‑check that any leftover references to GAS_PRICE have been removed.

source/includes/_txfees.md (2)

1-1: New module scaffold is clear
The txfees module is introduced with a descriptive heading. Ensure that this module is also listed in the main index (source/index.html.md).


117-127: Casing inconsistency in response example
The JSON example shows "baseFee", while the JSON schema (eipBaseFee.json) and table reference base_fee. Verify whether the API actually returns baseFee or base_fee and update the schema or example accordingly.

source/includes/_oracle.md (1)

22-22: Use of buffer constant in import
Good replacement of a static gas price constant with the buffer amount. Confirm removal of any unused GAS_PRICE import.

source/includes/_authz.md (2)

24-24: Importing GAS_FEE_BUFFER_AMOUNT
The new import of GAS_FEE_BUFFER_AMOUNT correctly replaces the outdated static gas price constant. Ensure there are no lingering GAS_PRICE references.


130-134: Go imports cleaned up
The removal of common.OptionGasPrices and reordering of imports tidies the example. Confirm that the client no longer relies on a default gas price option.

source/includes/_auction.md (2)

22-22: Import buffer constant
Switching to GAS_FEE_BUFFER_AMOUNT is correct. Make sure there are no leftover static GAS_PRICE imports.


109-113: Go import ordering
You’ve correctly reordered and cleaned imports (rpchttp, sdktypes, etc.). Ensure this matches the project’s import grouping and style guide.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

109-109: Hard tabs
Column: 1

(MD010, no-hard-tabs)


110-110: Hard tabs
Column: 1

(MD010, no-hard-tabs)


112-112: Hard tabs
Column: 1

(MD010, no-hard-tabs)


113-113: Hard tabs
Column: 1

(MD010, no-hard-tabs)

source/includes/_spot.md (12)

1880-1880: Add missing JSON import for pretty printing
The import json line is necessary for print(json.dumps(...)) to work. Grouping this with other stdlib imports is correct.


1903-1903: Retrieve composer asynchronously
Ensuring that composer = await client.composer() is called after initializing tokens aligns with the updated async API.


1904-1906: Fetch and buffer gas price dynamically
Using await client.current_chain_gas_price() and applying a 10% buffer guards against fluctuations between estimate and broadcast.


1911-1913: Pass dynamic gas price into broadcaster
Supplying gas_price, client, and composer into new_using_simulation() correctly replaces the old static constant.


1938-1938: Format transaction response as JSON
Switching to print(json.dumps(result, indent=2)) improves readability of the broadcast response.


1940-1943: Update gas price post-broadcast
Re-fetching and updating gas_price on the broadcaster ensures subsequent messages use the latest fee.


2010-2013: Fetch and buffer gas price in Go example
Calling chainClient.CurrentChainGasPrice(), multiplying by 1.1, and then SetGasPrice mirrors the Python changes.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

2010-2010: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2011-2011: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2012-2012: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2013-2013: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2047-2050: Refresh gas price after broadcasting in Go
Re-applying the 10% buffer after broadcasting maintains consistency for any further transactions.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

2047-2047: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2048-2048: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2049-2049: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2050-2050: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2166-2166: Import GAS_FEE_BUFFER_AMOUNT for gas calculations
Bringing in GAS_FEE_BUFFER_AMOUNT allows safe buffer addition to simulated gas.


2232-2235: Calculate dynamic gas fee before building transaction
Using live gas price from current_chain_gas_price() with a 10% buffer ensures accurate fee computation.


2324-2327: Apply dynamic gas price in Go before simulation
Consistently updating gas price here aligns the Go example with the new dynamic approach.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

2324-2324: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2325-2325: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2326-2326: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2327-2327: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2395-2398: Re-apply updated gas price post-simulation in Go
Ensuring you call SetGasPrice again after simulation maintains correctness if multiple steps follow.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

2395-2395: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2396-2396: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2397-2397: Hard tabs
Column: 1

(MD010, no-hard-tabs)


2398-2398: Hard tabs
Column: 1

(MD010, no-hard-tabs)

source/includes/_binaryoptions.md (11)

435-435: Approve import of gas buffer constant
Importing GAS_FEE_BUFFER_AMOUNT from pyinjective.constant is necessary for the subsequent gas fee computation.


513-516: Fetch and buffer dynamic gas price in Python example
Replacing the static gas price with await client.current_chain_gas_price() and applying a 10% buffer aligns with the new dynamic fee model.


254-257: Fetch and buffer dynamic gas price in Go example (initial)
The code now retrieves the current chain gas price via CurrentChainGasPrice(), applies a 1.1 multiplier, and sets it on the client—this matches the updated async Python behavior.


291-295: Re-apply buffered gas price post-broadcast in Go example
Re-fetching and re-setting the gas price after the transaction ensures consistency if the base fee changed during broadcast.


700-700: Approve import of gas buffer constant in limit-order example
Adding GAS_FEE_BUFFER_AMOUNT import enables use of the buffer when computing the final fee.


766-768: Fetch and buffer dynamic gas price in limit-order example
Correctly replaces static gas price with current_chain_gas_price() plus a 10% buffer before fee calculation.


1008-1011: Fetch and buffer dynamic gas price in cancel-order example
The dynamic gas price retrieval and 1.1× buffer are applied consistently for the cancellation transaction.


1233-1236: Fetch and buffer dynamic gas price in admin-update example
Dynamic gas price fetch with buffer is correctly integrated into the admin-update flow.


1541-1544: Fetch and buffer dynamic gas price in batch-update example
Applies the same dynamic gas price retrieval and 10% buffer for the batch update transaction.


1635-1638: Fetch and buffer dynamic gas price in Go batch-update example (initial)
Introduces dynamic gas price retrieval and buffer logic in the Go batch-update client initialization.


1727-1732: Re-apply buffered gas price after fee fetch in Go batch-update example
Secondary fetch and buffer ensure the gas price stays current through the entire transaction lifecycle.

source/includes/_wasmx.md (5)

24-24: Approve import of GAS_FEE_BUFFER_AMOUNT.
The addition of from pyinjective.constant import GAS_FEE_BUFFER_AMOUNT enables buffering of the gas limit after simulation.


82-85: Approve dynamic gas price retrieval and buffering.
Fetching client.current_chain_gas_price(), applying a 10% buffer, and casting to int ensures the gas price remains valid across simulation and broadcast.


121-122: Approve reorder of rpchttp import.
Moving rpchttp before SDK-go imports aligns external and internal import grouping for clarity.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

121-121: Hard tabs
Column: 1

(MD010, no-hard-tabs)


169-173: Approve dynamic gas price setup on chainClient.
The calls to CurrentChainGasPrice(), buffer with 1.1 multiplier, and SetGasPrice(...) correctly replace the static gas price option.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

169-169: Hard tabs
Column: 1

(MD010, no-hard-tabs)


170-170: Hard tabs
Column: 1

(MD010, no-hard-tabs)


171-171: Hard tabs
Column: 1

(MD010, no-hard-tabs)


172-172: Hard tabs
Column: 1

(MD010, no-hard-tabs)


207-211: Approve post-broadcast gas price update.
Refreshing and reapplying the buffered gas price after the transaction broadcast helps maintain accuracy for subsequent transactions.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

207-207: Hard tabs
Column: 1

(MD010, no-hard-tabs)


208-208: Hard tabs
Column: 1

(MD010, no-hard-tabs)


209-209: Hard tabs
Column: 1

(MD010, no-hard-tabs)


210-210: Hard tabs
Column: 1

(MD010, no-hard-tabs)

source/includes/_bank.md (4)

22-22: Approve import of GAS_FEE_BUFFER_AMOUNT.
Required to compute an extra buffer on the simulated gas limit.


74-77: Approve dynamic gas price retrieval in Python MsgSend.
The pattern await client.current_chain_gas_price(), multiplied by 1.1 then cast to int, accurately replaces the static constant.


163-167: Approve dynamic gas price setup in Go MsgSend.
Calling chainClient.CurrentChainGasPrice(), adjusting by 10%, and chainClient.SetGasPrice(...) properly replaces the previous default gas-prices option.


372-376: Approve dynamic gas price setup in Go MsgMultiSend.
Consistent application of fetching the current gas price, adding the buffer, and setting it on the client matches the pattern across modules.

source/includes/_chainexchange.md (2)

4575-4579: Added explicit error handling after chain client creation
Introducing the if err != nil { panic(err) } block immediately after NewChainClient ensures that any initialization failures are caught early in the example. This improves the robustness and clarity of the Go snippet.


4609-4611: Updated response type to MarketBalance
The response table for queryMarketBalanceResponse.json now uses type MarketBalance instead of Decimal. Please verify that the corresponding JSON schema (marketBalance.json) indeed defines a MarketBalance object and that all downstream references (e.g., code examples and schema tables) are updated accordingly.

source/includes/_ibctransfer.md (6)

759-759: Add JSON import for formatted output.
The json module is imported to enable pretty‐printing of transaction responses with json.dumps(..., indent=2), improving readability in examples.


783-785: Fetch and buffer dynamic gas price.
Replacing static gas constants with await client.current_chain_gas_price() and applying a 10% buffer ensures fees adapt to current chain conditions.


819-819: Pretty‐print transaction response.
Using print(json.dumps(result, indent=2)) formats the output as readable JSON—beneficial for debugging and documentation.


821-823: Refresh gas price after broadcast.
Updating the gas price post‐broadcast guards against price fluctuations before subsequent transactions.


892-896: Set dynamic gas price on Go client.
Fetching the on‐chain gas price with CurrentChainGasPrice(), applying a 10% buffer, and calling SetGasPrice replaces static defaults, aligning Go examples with the Python pattern.


925-928: Refresh Go client gas price post‐broadcast.
Updating the gas price after broadcasting ensures subsequent operations use up‐to‐date fee rates.

source/includes/_account.md (7)

23-23: Introduce GAS_FEE_BUFFER_AMOUNT constant import.
The import of GAS_FEE_BUFFER_AMOUNT replaces hardcoded buffers, leveraging a shared constant for simulating gas fee overhead.


73-75: Switch to dynamic gas price with buffer in deposit.
Using await client.current_chain_gas_price() * 1.1 derives fees from real‐time on‐chain rates and adds a 10% safety buffer.


113-113: Add rpchttp import for Go deposit example.
The HTTP RPC client from rpchttp is now explicitly imported to support chainclient operations.


118-118: Import client/common instead of default gas price option.
Removing the static gas price option import and manually configuring gas price enhances clarity and control.


161-164: Initialize dynamic gas price in Go deposit example.
After creating ChainClient, fetching and buffering the latest gas price via CurrentChainGasPrice and SetGasPrice replaces the removed default gas price option.


720-721: Update Go imports for subaccount transfer.
Added rpchttp and sdktypes imports to support manual gas price configuration.


1345-1346: Add RPC and SDK imports for MsgSendToEth.
The rpchttp and sdktypes imports align this example with the updated fee‐handling approach.

source/includes/_tokenfactory.md (3)

635-637: Fetch client composer asynchronously
The addition of composer = await client.composer() aligns with the SDK’s async patterns. Ensure your installed SDK version supports the composer() method on AsyncClient to prevent runtime AttributeError.


642-647: Update broadcaster signature
The updated MsgBroadcasterWithPk.new_using_simulation call now explicitly passes gas_price, client, and composer. Verify that this matches the constructor signature in your SDK v1.15 to avoid mismatches.


666-667: Format broadcast output as JSON
Using json.dumps(result, indent=2) greatly improves the readability of transaction responses in docs.

source/includes/_permissions.md (4)

2974-2974: Switch to asynchronous client usage
Replacing synchronous Composer instantiation with AsyncClient(network) follows the new SDK pattern and enables non‑blocking I/O. This change aligns with the broader migration to async examples.

Also applies to: 3416-3416, 3811-3811, 4106-4106


2986-2987: Initialize AsyncClient and await the composer
Instantiating client = AsyncClient(network) and then composer = await client.composer() correctly replaces the old sync composer. This pattern standardizes how messages are built across examples.

Also applies to: 3428-3431, 3823-3825, 4119-4121


3072-3072: Pretty-print broadcast results
Switching from raw print(result) to print(json.dumps(result, indent=2)) greatly improves the readability of transaction responses in the docs.

Also applies to: 3497-3497, 3871-3871, 4148-4148


3074-3077: Refresh gas price after broadcasting
Updating the gas price with message_broadcaster.update_gas_price(...) post‑broadcast ensures subsequent transactions use up‑to‑date fees. This completes the dynamic fee workflow as intended.

Also applies to: 3499-3503, 3873-3877, 4150-4153

source/includes/_derivatives.md (11)

3091-3091: Good addition for improved response formatting.

Adding the JSON module allows for prettier printing of responses with proper indentation, making the output more readable for developers.


3115-3118: Excellent improvement for dynamic gas price management.

Fetching the current chain gas price dynamically and adding a 10% buffer is a robust approach that ensures transactions don't fail due to gas price fluctuations between request and broadcast time.


3122-3125: Good update to the MsgBroadcasterWithPk initialization.

Passing the dynamic gas price to the message broadcaster improves the reliability of transaction broadcasting by ensuring appropriate gas pricing.


3154-3159: Well-implemented gas price refresh pattern.

Updating the gas price after transaction broadcasting is an excellent practice to ensure subsequent transactions use the most up-to-date gas price information.


3227-3231: Good equivalent implementation of dynamic gas pricing in Go.

The Go implementation properly retrieves the current chain gas price, adds a 10% buffer for resilience, and sets it on the chain client - consistent with the Python implementation.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

3227-3227: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3228-3228: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3229-3229: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3230-3230: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3264-3267: Consistent implementation of gas price refresh in Go.

The pattern of refreshing the gas price after transaction broadcasting is consistently applied in the Go example, ensuring both language implementations follow the same best practices.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

3264-3264: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3265-3265: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3266-3266: Hard tabs
Column: 1

(MD010, no-hard-tabs)


3267-3267: Hard tabs
Column: 1

(MD010, no-hard-tabs)


4484-4487: Comprehensive gas fee calculation approach.

This approach to gas fee calculation includes:

  1. Dynamic gas price retrieval with buffer
  2. Adding additional buffer to gas limit
  3. Converting to proper format for fee specification

This ensures transactions have sufficient gas while maintaining efficiency.

Also applies to: 3786-3796


4753-4796: Chain upgrade compatibility enhancement.

These gas pricing changes align with chain version 1.15 upgrade requirements for more dynamic gas pricing, ensuring examples remain functional with the updated chain behavior.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

4771-4771: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


4781-4781: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


4790-4790: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


5080-5084: Consistent pattern application across all example code.

The dynamic gas price pattern has been consistently applied across all transaction examples in the document, which provides users with a reliable template for their own implementations.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

5080-5080: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5081-5081: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5082-5082: Hard tabs
Column: 1

(MD010, no-hard-tabs)


5083-5083: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6982-6986: Good example of gas price handling in LocalOrderHashComputation.

The implementation in the LocalOrderHashComputation section demonstrates how to properly handle gas prices for high-frequency trading scenarios, which is particularly important for sophisticated API users.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

6982-6982: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6983-6983: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6984-6984: Hard tabs
Column: 1

(MD010, no-hard-tabs)


6985-6985: Hard tabs
Column: 1

(MD010, no-hard-tabs)


7114-7127: Helpful notes on gas calculation for HFT users.

The documentation provides valuable insights about gas calculation for high-frequency trading, including:

  1. Manual gas calculation techniques
  2. Handling transaction failures
  3. Refreshing account sequence and subaccount nonce

This information is crucial for advanced API users building high-performance trading systems.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

7116-7116: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)

source/includes/_broadcaster.md (5)

21-21: Imports for JSON pretty-printing are correctly added
Including import json is necessary for the print(json.dumps(...)) calls later in the example.


28-28: AsyncClient import aligns with async examples
Swapping out the old synchronous Composer for AsyncClient imports aligns with the rest of the async-based examples.


41-42: Async client and composer initialization is correct
Instantiating client = AsyncClient(network) and immediately awaiting composer = await client.composer() follows the updated SDK pattern.


51-53: Passing new parameters to the broadcaster constructor
Supplying gas_price, client, and composer in the call to new_using_simulation correctly reflects the new constructor signature.


96-97: Pretty-printing the transaction response
Using print(json.dumps(result, indent=2)) improves readability of the JSON output.

source/includes/_staking.md (3)

1399-1399: Approve JSON‑formatted output
Switching to print(json.dumps(..., indent=2)) for transaction responses greatly improves readability.

Also applies to: 1645-1645, 1906-1906


1379-1379: Skip: parameter passing is correct
Passing gas_price directly into the broadcaster initialization (gas_price=gas_price) is intentional under the new dynamic fee handling. No change needed here.

Also applies to: 1625-1625


2366-2366: Verify constant import
Please confirm that GAS_FEE_BUFFER_AMOUNT is defined and exported in pyinjective.constant. You might run a quick search across the pyinjective package to ensure the constant exists and has the intended value.

Comment on lines +44 to +46
gas_price = await client.current_chain_gas_price()
# adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted
gas_price = int(gas_price * 1.1)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Ensure accurate gas price buffer calculation
Using int(gas_price * 1.1) truncates any fractional part, which could undercut your intended 10% buffer. To always honor the buffer, round up instead:

+ import math
- gas_price = int(gas_price * 1.1)
+ gas_price = math.ceil(gas_price * 1.1)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
gas_price = await client.current_chain_gas_price()
# adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted
gas_price = int(gas_price * 1.1)
import math
gas_price = await client.current_chain_gas_price()
# adjust gas price to make it valid even if it changes between the time it is requested and the TX is broadcasted
gas_price = math.ceil(gas_price * 1.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants