Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Repository versions and URLs
COSMOS_SDK_VERSION := v0.50.14-inj.9
COSMOS_SDK_VERSION := v0.50.14-inj.11
COSMOS_SDK_REPO := https://github.com/InjectiveLabs/cosmos-sdk.git

INJECTIVE_CORE_VERSION := v1.20.0
INJECTIVE_CORE_VERSION := v1.20.1
INJECTIVE_CORE_REPO := https://github.com/InjectiveLabs/injective-core.git

INDEXER_VERSION := v1.20.2
INDEXER_VERSION := v1.20.49
INDEXER_REPO := https://github.com/InjectiveLabs/injective-indexer.git

IBC_GO_VERSION := v8.7.0-inj.4
IBC_GO_REPO := https://github.com/InjectiveLabs/ibc-go.git

COMETBFT_VERSION := v1.0.1-inj.7
COMETBFT_VERSION := v1.0.1-inj.9
COMETBFT_REPO := https://github.com/InjectiveLabs/cometbft.git

WASMD_VERSION := v0.53.3-inj.3
WASMD_REPO := https://github.com/InjectiveLabs/wasmd.git

PYTHON_SDK_VERSION := v1.15.0
PYTHON_SDK_VERSION := v1.16.0
PYTHON_SDK_REPO := https://github.com/InjectiveLabs/sdk-python.git

GO_SDK_VERSION := v1.62.0
GO_SDK_VERSION := v1.63.0
GO_SDK_REPO := https://github.com/InjectiveLabs/sdk-go.git

# Temporary directories
Expand Down
21 changes: 21 additions & 0 deletions source/includes/_errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,27 @@ This section lists all error codes from various modules in the Injective ecosyst
<tr ><td class="module-name-td td_text">07-tendermint</td><td class="error-code-td td_num">14</td><td class="description-td td_text">invalid validator set</td></tr></tbody></table>
<!-- MARKDOWN-AUTO-DOCS:END -->

## 08-cardano-probabilistic module

<!-- MARKDOWN-AUTO-DOCS:START (JSON_TO_HTML_TABLE:src=./source/json_tables/errors/08-cardano-probabilistic_errors.json) -->
<table class="JSON-TO-HTML-TABLE"><thead><tr><th class="module-name-th">module_name</th><th class="error-code-th">error_code</th><th class="description-th">description</th></tr></thead><tbody ><tr ><td class="module-name-td td_text">08-cardano-probabilistic</td><td class="error-code-td td_num">2</td><td class="description-td td_text">invalid chain-id</td></tr>
<tr ><td class="module-name-td td_text">08-cardano-probabilistic</td><td class="error-code-td td_num">3</td><td class="description-td td_text">invalid trusting period</td></tr>
<tr ><td class="module-name-td td_text">08-cardano-probabilistic</td><td class="error-code-td td_num">4</td><td class="description-td td_text">invalid probabilistic header height</td></tr>
<tr ><td class="module-name-td td_text">08-cardano-probabilistic</td><td class="error-code-td td_num">5</td><td class="description-td td_text">invalid probabilistic header</td></tr>
<tr ><td class="module-name-td td_text">08-cardano-probabilistic</td><td class="error-code-td td_num">6</td><td class="description-td td_text">processed time not found</td></tr>
<tr ><td class="module-name-td td_text">08-cardano-probabilistic</td><td class="error-code-td td_num">7</td><td class="description-td td_text">processed height not found</td></tr>
<tr ><td class="module-name-td td_text">08-cardano-probabilistic</td><td class="error-code-td td_num">8</td><td class="description-td td_text">packet-specified delay period has not been reached</td></tr>
<tr ><td class="module-name-td td_text">08-cardano-probabilistic</td><td class="error-code-td td_num">9</td><td class="description-td td_text">time since latest trusted state has passed the trusting period</td></tr>
<tr ><td class="module-name-td td_text">08-cardano-probabilistic</td><td class="error-code-td td_num">10</td><td class="description-td td_text">invalid current epoch</td></tr>
<tr ><td class="module-name-td td_text">08-cardano-probabilistic</td><td class="error-code-td td_num">12</td><td class="description-td td_text">invalid security score</td></tr>
<tr ><td class="module-name-td td_text">08-cardano-probabilistic</td><td class="error-code-td td_num">13</td><td class="description-td td_text">invalid unique pool count</td></tr>
<tr ><td class="module-name-td td_text">08-cardano-probabilistic</td><td class="error-code-td td_num">14</td><td class="description-td td_text">invalid qualified unique stake basis points</td></tr>
<tr ><td class="module-name-td td_text">08-cardano-probabilistic</td><td class="error-code-td td_num">15</td><td class="description-td td_text">invalid accepted block</td></tr>
<tr ><td class="module-name-td td_text">08-cardano-probabilistic</td><td class="error-code-td td_num">16</td><td class="description-td td_text">invalid host state commitment evidence</td></tr>
<tr ><td class="module-name-td td_text">08-cardano-probabilistic</td><td class="error-code-td td_num">17</td><td class="description-td td_text">invalid timestamp</td></tr>
<tr ><td class="module-name-td td_text">08-cardano-probabilistic</td><td class="error-code-td td_num">18</td><td class="description-td td_text">not implemented</td></tr></tbody></table>
<!-- MARKDOWN-AUTO-DOCS:END -->

## Auction module

<!-- MARKDOWN-AUTO-DOCS:START (JSON_TO_HTML_TABLE:src=./source/json_tables/errors/auction_errors.json) -->
Expand Down
82 changes: 82 additions & 0 deletions source/json_tables/errors/08-cardano-probabilistic_errors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
[
{
"module_name": "08-cardano-probabilistic",
"error_code": 2,
"description": "invalid chain-id"
},
{
"module_name": "08-cardano-probabilistic",
"error_code": 3,
"description": "invalid trusting period"
},
{
"module_name": "08-cardano-probabilistic",
"error_code": 4,
"description": "invalid probabilistic header height"
},
{
"module_name": "08-cardano-probabilistic",
"error_code": 5,
"description": "invalid probabilistic header"
},
{
"module_name": "08-cardano-probabilistic",
"error_code": 6,
"description": "processed time not found"
},
{
"module_name": "08-cardano-probabilistic",
"error_code": 7,
"description": "processed height not found"
},
{
"module_name": "08-cardano-probabilistic",
"error_code": 8,
"description": "packet-specified delay period has not been reached"
},
{
"module_name": "08-cardano-probabilistic",
"error_code": 9,
"description": "time since latest trusted state has passed the trusting period"
},
{
"module_name": "08-cardano-probabilistic",
"error_code": 10,
"description": "invalid current epoch"
},
{
"module_name": "08-cardano-probabilistic",
"error_code": 12,
"description": "invalid security score"
},
{
"module_name": "08-cardano-probabilistic",
"error_code": 13,
"description": "invalid unique pool count"
},
{
"module_name": "08-cardano-probabilistic",
"error_code": 14,
"description": "invalid qualified unique stake basis points"
},
{
"module_name": "08-cardano-probabilistic",
"error_code": 15,
"description": "invalid accepted block"
},
{
"module_name": "08-cardano-probabilistic",
"error_code": 16,
"description": "invalid host state commitment evidence"
},
{
"module_name": "08-cardano-probabilistic",
"error_code": 17,
"description": "invalid timestamp"
},
{
"module_name": "08-cardano-probabilistic",
"error_code": 18,
"description": "not implemented"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,11 @@
"Type": "bool",
"Description": "When true, fills gaps in derivative candles using oracle/mark prices anchored to neighboring real trade candles.",
"Required": "Yes"
},
{
"Parameter": "index_prices",
"Type": "bool",
"Description": "When true, we'll use index prices. Supersedes useOraclePrices and fillGaps. Disabled for binary options markets.",
Comment on lines +51 to +53

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="$(fd '^DerivativeMarketHistoryRequest\.json$' source/json_tables/indexer/injective_chart_rpc)"
echo "== Context from ${file} =="
nl -ba "$file" | sed -n '1,90p'

echo
echo "== Nearby field-name variants under chart RPC docs =="
rg -n '"Parameter": "(use_oracle_prices|fill_gaps|useOraclePrices|fillGaps|index_prices)"' source/json_tables/indexer/injective_chart_rpc

Repository: InjectiveLabs/api-exchange-docs

Length of output: 311


🏁 Script executed:

set -euo pipefail

file="source/json_tables/indexer/injective_chart_rpc/DerivativeMarketHistoryRequest.json"

echo "== file exists =="
[ -f "$file" ] && echo "$file"

echo
echo "== relevant section =="
sed -n '1,120p' "$file"

echo
echo "== nearby field-name variants under chart RPC docs =="
rg -n '"Parameter": "(use_oracle_prices|fill_gaps|useOraclePrices|fillGaps|index_prices)"' source/json_tables/indexer/injective_chart_rpc || true

Repository: InjectiveLabs/api-exchange-docs

Length of output: 2620


Keep the precedence note in snake_case.

This schema uses use_oracle_prices and fill_gaps, so useOraclePrices / fillGaps points readers at the wrong request keys.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@source/json_tables/indexer/injective_chart_rpc/DerivativeMarketHistoryRequest.json`
around lines 51 - 53, The Parameter description in
DerivativeMarketHistoryRequest.json uses camelCase names that do not match the
schema keys. Update the text in the index_prices entry to refer to
use_oracle_prices and fill_gaps instead of useOraclePrices and fillGaps, keeping
the precedence note consistent with the snake_case request fields.

"Required": "Yes"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"Parameter": "grantee_address",
"Type": "string",
"Description": "Address that receives the feegrant",
"Required": "Yes"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[
{
"Parameter": "granter_address",
"Type": "string",
"Description": "Feegrant granter address"
},
{
"Parameter": "grantee_address",
"Type": "string",
"Description": "Grantee address"
},
{
"Parameter": "tx_hash",
"Type": "string",
"Description": "Feegrant transaction hash"
},
{
"Parameter": "expiration",
"Type": "uint64",
"Description": "Feegrant expiration timestamp in Unix milliseconds"
},
{
"Parameter": "spend_limit",
"Type": "CosmosCoin",
"Description": "Feegrant spend limit"
Comment on lines +23 to +25

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the underlying protobuf schema for PrepareFeeGrantResponse.
rg -n "message PrepareFeeGrantResponse|spend_limit|allowed_messages|PrepareFeeGrantRequest" source

Repository: InjectiveLabs/api-exchange-docs

Length of output: 1891


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n## PrepareFeeGrantResponse.json\n'
cat -n source/json_tables/indexer/injective_exchange_rpc/PrepareFeeGrantResponse.json | sed -n '1,120p'

printf '\n## Related feegrant docs\n'
for f in \
  source/json_tables/cosmos/feegrant/BasicAllowance.json \
  source/json_tables/cosmos/feegrant/AllowedMsgAllowance.json \
  source/json_tables/cosmos/feegrant/PeriodicAllowance.json \
  source/json_tables/injective/exchange/GenericExchangeAuthorization.json \
  source/json_tables/injective/exchange/v2/GenericExchangeAuthorization.json
do
  echo "\n### $f"
  cat -n "$f" | sed -n '1,120p'
done

Repository: InjectiveLabs/api-exchange-docs

Length of output: 4436


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '## CosmosCoin / Coins usage\n'
rg -n '"Type": "(CosmosCoin|Coins)"' source/json_tables | sed -n '1,200p'

printf '\n## CosmosCoin table definitions\n'
rg -n '"Type": "CosmosCoin"|CosmosCoin' source/json_tables | sed -n '1,200p'

Repository: InjectiveLabs/api-exchange-docs

Length of output: 5683


Align spend_limit with the feegrant contract

spend_limit is documented as a single CosmosCoin here, but the feegrant allowance docs model it as Coins (a coin list). Update this field to match the API shape.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@source/json_tables/indexer/injective_exchange_rpc/PrepareFeeGrantResponse.json`
around lines 23 - 25, The `spend_limit` field in `PrepareFeeGrantResponse` is
documented with the wrong API shape; it should match the feegrant allowance
contract as a coin list rather than a single coin. Update the `spend_limit`
entry in `PrepareFeeGrantResponse.json` so its `Type` reflects `Coins` and keep
the description aligned with the feegrant allowance model. Use the `spend_limit`
parameter name in `PrepareFeeGrantResponse` to locate and adjust the schema
consistently with the other feegrant docs.

},
{
"Parameter": "allowed_messages",
"Type": "string array",
"Description": "Message type URLs allowed by the feegrant"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@
"Type": "string",
"Description": "Client order ID echoed through to the on-chain trade event. Used to correlate a trade event back to the originating UI order. Not used server-side."
},
{
"Parameter": "simulate",
"Type": "bool",
"Description": "Simulate the tx on chain and use the estimated gas (with adjustment buffer) instead of the fee payer max gas. Falls back to max gas if the simulation fails."
},
{
"Parameter": "tx_body_memo",
"Type": "string",
"Description": "Optional outer Cosmos TxBody memo"
},
{
"Parameter": "taker_address",
"Type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@
"Type": "string",
"Description": "Client order ID echoed through to the on-chain trade event. Used to correlate a trade event back to the originating UI order. Not used server-side."
},
{
"Parameter": "simulate",
"Type": "bool",
"Description": "Simulate the tx on chain and use the estimated gas (with adjustment buffer) instead of the fee payer max gas. Falls back to max gas if the simulation fails."
},
{
"Parameter": "tx_body_memo",
"Type": "string",
"Description": "Optional outer Cosmos TxBody memo"
},
{
"Parameter": "taker_address",
"Type": "string",
Expand All @@ -102,6 +112,6 @@
{
"Parameter": "gas",
"Type": "uint64",
"Description": "Optional gas limit override"
"Description": "Optional gas limit override. Takes precedence over simulate"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@
"Type": "string",
"Description": "Client order ID echoed through to the on-chain trade event. Used to correlate a trade event back to the originating UI order. Not used server-side."
},
{
"Parameter": "simulate",
"Type": "bool",
"Description": "Simulate the tx on chain and use the estimated gas (with adjustment buffer) instead of the fee payer max gas. Falls back to max gas if the simulation fails."
},
{
"Parameter": "tx_body_memo",
"Type": "string",
"Description": "Optional outer Cosmos TxBody memo"
},
{
"Parameter": "eth_chain_id",
"Type": "uint64",
Expand All @@ -97,6 +107,6 @@
{
"Parameter": "gas",
"Type": "uint64",
"Description": "Optional gas limit override"
"Description": "Optional gas limit override. Takes precedence over simulate"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,15 @@
"Parameter": "cid",
"Type": "string",
"Description": "Client order ID echoed through to the on-chain trade event. Used to correlate a trade event back to the originating UI order. Not used server-side."
},
{
"Parameter": "simulate",
"Type": "bool",
"Description": "Simulate the tx on chain and use the estimated gas (with adjustment buffer) instead of the fee payer max gas. Falls back to max gas if the simulation fails."
},
{
"Parameter": "tx_body_memo",
"Type": "string",
"Description": "Optional outer Cosmos TxBody memo"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@
"Parameter": "status",
"Type": "string",
"Description": "Status of the operation"
},
{
"Parameter": "taker",
"Type": "string",
"Description": "Taker address"
}
]
12 changes: 11 additions & 1 deletion source/json_tables/indexer/injective_rfq_rpc/StreamError.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
{
"Parameter": "id",
"Type": "string",
"Description": "ID to identify the request or quote in the stream. RFQ_ID for quotes. CLIENT_ID for requests."
"Description": "Client ID. Only filled in taker streams"
},
{
"Parameter": "taker",
"Type": "string",
"Description": "Taker address. Only filled in the maker stream"
},
{
"Parameter": "rfq_id",
"Type": "uint64",
"Description": "RFQ ID. Only filled if available"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"Parameter": "market_id",
"Type": "string",
"Description": "Derivative Market ID"
},
{
"Parameter": "subaccount_id",
"Type": "string",
"Description": "The subaccountId that the position belongs to"
Comment on lines +8 to +10

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep the field name consistent in the description.

The parameter is subaccount_id, but the description switches to subaccountId, which makes the table read like there are two valid names for the same field.

Suggested doc fix
   {
     "Parameter": "subaccount_id",
     "Type": "string",
-    "Description": "The subaccountId that the position belongs to"
+    "Description": "Subaccount ID that the position belongs to"
   },
📝 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
"Parameter": "subaccount_id",
"Type": "string",
"Description": "The subaccountId that the position belongs to"
"Parameter": "subaccount_id",
"Type": "string",
"Description": "Subaccount ID that the position belongs to"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@source/json_tables/indexer/injective_tc_derivatives_rpc/FundingPayment.json`
around lines 8 - 10, The FundingPayment JSON table has an inconsistent field
name in the description, where the Parameter uses subaccount_id but the
Description switches to subaccountId. Update the description text in
FundingPayment so it uses the same snake_case name as the Parameter field, and
keep the naming consistent across the entry to avoid implying two valid field
names.

},
{
"Parameter": "amount",
"Type": "string",
"Description": "Amount of the funding payment"
},
{
"Parameter": "timestamp",
"Type": "int64",
"Description": "Timestamp of funding payment in UNIX millis"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"Parameter": "market_ids",
"Type": "string array",
"Description": "Market IDs to filter funding payments",
"Required": "Yes"
},
{
"Parameter": "per_page",
"Type": "int32",
"Description": "Number of results per page",
"Required": "Yes"
},
{
"Parameter": "token",
"Type": "string",
"Description": "Pagination token",
"Required": "Yes"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"Parameter": "payments",
"Type": "FundingPayment array",
"Description": "List of funding payments"
},
{
"Parameter": "next",
"Type": "string array",
"Description": "Next tokens for pagination"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,11 @@
"Type": "string",
"Description": "filter synthetic trades by RFQ maker address",
"Required": "Yes"
},
{
"Parameter": "participant",
"Type": "string",
"Description": "filter trades including the address as RFQ maker or the trade account address",
"Required": "Yes"
Comment on lines +69 to +72

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Document participant as optional.

The description reads like an additional filter, but "Required": "Yes" makes it mandatory and changes the request contract for callers that only use the existing filters.

Suggested doc fix
   {
     "Parameter": "participant",
     "Type": "string",
-    "Description": "filter trades including the address as RFQ maker or the trade account address",
-    "Required": "Yes"
+    "Description": "Filter trades where the address matches the RFQ maker or the trade account address",
+    "Required": "No"
   }
📝 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
"Parameter": "participant",
"Type": "string",
"Description": "filter trades including the address as RFQ maker or the trade account address",
"Required": "Yes"
"Parameter": "participant",
"Type": "string",
"Description": "Filter trades where the address matches the RFQ maker or the trade account address",
"Required": "No"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@source/json_tables/indexer/injective_tc_derivatives_rpc/TradesRequest.json`
around lines 69 - 72, Update the TradesRequest JSON documentation entry for
participant so it is marked optional rather than required. Keep the existing
description, but change the Required flag for the participant field in
TradesRequest.json to reflect that it is an additional filter and should not
alter the request contract for callers using other filters.

}
]
8 changes: 7 additions & 1 deletion source/json_tables/injective/peggy/MsgCreateRateLimit.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{
"Parameter": "token_price_id",
"Type": "string",
"Description": "a Pyth-specific ID used to obtain USD price of the ERC20 token",
"Description": "unique ID used to obtain the notional USD value of the ERC20 token from oracle",
"Required": "Yes"
},
{
Expand All @@ -40,5 +40,11 @@
"Type": "uint64",
"Description": "length of the sliding window in which inbound (outbound) traffic is measured",
"Required": "Yes"
},
{
"Parameter": "token_oracle_type",
"Type": "OracleType",
"Description": "token_oracle_type is used to obtain the USD price of the ERC20 token (in relation with token_price_id)",
"Required": "Yes"
}
]
Loading
Loading