Skip to content
Draft
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
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
COSMOS_SDK_VERSION := v0.50.14-inj.9
COSMOS_SDK_REPO := https://github.com/InjectiveLabs/cosmos-sdk.git

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

INDEXER_VERSION := v1.19.0
INDEXER_VERSION := v1.19.41
INDEXER_REPO := https://github.com/InjectiveLabs/injective-indexer.git

IBC_GO_VERSION := v8.7.0-inj.4
Expand All @@ -17,10 +17,10 @@ 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.14.0
PYTHON_SDK_VERSION := v1.15.0-rc1
PYTHON_SDK_REPO := https://github.com/InjectiveLabs/sdk-python.git

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

# Temporary directories
Expand Down
110 changes: 109 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,112 @@ The markers look like this:
<!-- MARKDOWN-AUTO-DOCS:END -->


The API documentation is generated using [Slate](https://github.com/slatedocs/slate)
The API documentation is generated using [Slate](https://github.com/slatedocs/slate)

## Updating the docs for a new Injective chain version

Every chain release requires a set of manual steps before opening a PR. The steps below cover what changed between releases: regenerating protobuf-derived JSON tables, regenerating error-code tables, refreshing SDK code snippets, and recording the release in the changelog.

### Prerequisites

Make sure the following tools are available in your local environment before running any of the commands below:

| Tool | Purpose |
|---|---|
| `git` | Cloning source repositories |
| `go` | Running the error-code generation script inside `injective-core` |
| `jq` | Parsing `.pb.go` files in `scripts/generate_proto_json_files.sh` |
| `node` + `markdown-autodocs` (`npm i -g markdown-autodocs`) | Refreshing SDK code snippets |
| `ruby` + `bundler` + `middleman` | Building and serving the docs locally |

### Step 1 — Bump repository versions in the Makefile

Open `Makefile` and update the version variables at the top of the file. Two groups of variables exist:

**Chain-side repositories** (drive proto JSON table generation and error-code generation):

| Variable | Repository |
|---|---|
| `COSMOS_SDK_VERSION` | `InjectiveLabs/cosmos-sdk` |
| `INJECTIVE_CORE_VERSION` | `InjectiveLabs/injective-core` |
| `INDEXER_VERSION` | `InjectiveLabs/injective-indexer` |
| `IBC_GO_VERSION` | `InjectiveLabs/ibc-go` |
| `COMETBFT_VERSION` | `InjectiveLabs/cometbft` |
| `WASMD_VERSION` | `InjectiveLabs/wasmd` |

**SDK repositories** (drive SDK code snippet refresh via `make refresh-examples`):

| Variable | Repository |
|---|---|
| `PYTHON_SDK_VERSION` | `InjectiveLabs/sdk-python` |
| `GO_SDK_VERSION` | `InjectiveLabs/sdk-go` |

Set each variable to the exact Git tag published in the corresponding repository for the new release.

### Step 2 — Regenerate proto JSON tables and error codes

Run the single command that rebuilds both the protobuf-derived JSON tables and the error-code documentation:

```
make update-all-proto-related-files
```

This target clones all six chain-side repositories at the versions pinned in step 1, runs the two generators, then removes the cloned directories. It produces:

- `source/json_tables/{injective,cosmos,indexer,ibc,cometbft,wasmd}/**/*.json` — one JSON file per protobuf message type, consumed by `JSON_TO_HTML_TABLE` markdown-autodocs markers inside `source/includes/*.md`.
- `source/json_tables/errors/*.json` — one JSON file per module, generated by `injective-core/scripts/docs/document_error_codes_script.go`.
- `source/includes/_errors.md` — fully regenerated by `scripts/generate_errors_md.sh`. **Do not edit this file manually**; every run overwrites it entirely.

If you only need a partial regeneration, use the narrower targets `make update-proto-json` (proto tables only) or `make update-errors-documentation` (error codes only).

### Step 3 — Refresh SDK code snippets

```
make refresh-examples
```

This clones `sdk-python` and `sdk-go` at the versions pinned in step 1 into `tmp-python-sdk/` and `tmp-go-sdk/`, then runs `markdown-autodocs` over all `source/includes/*.md` files to update every code block enclosed in `MARKDOWN-AUTO-DOCS` markers.

**Important:** the deploy workflow (`.github/workflows/deploy.yml`) automatically re-runs `markdown-autodocs` on every push to `main`, but it does **not** regenerate the proto JSON tables or `_errors.md`. Those files must be committed as part of the PR.

### Step 4 — Update the changelog

Add a new dated entry at the top of `source/includes/_changelog.md`, following the existing pattern:

```markdown
## YYYY-MM-DD
- Updated all messages to reflect the changes included in the chain version vX.Y.Z, and the Indexer for that chain version
- Python SDK vA.B.C
- Go SDK vD.E.F
```

Include any additional bullet points for notable additions specific to this release (new modules documented, new query types, etc.).

### Step 5 — Verify locally

Build and serve the docs to confirm everything renders correctly before opening a PR:

```
./slate.sh serve
```

Navigate through the affected module pages and spot-check that parameter tables (rendered from the updated JSON files) and code snippets (rendered from the updated SDK examples) look correct.

### When the upgrade adds new pages or modules

Two less frequent actions may be required:

- **New top-level page**: add an entry to the `includes:` list in `source/index.html.md` and create the corresponding `source/includes/_<name>.md` file. The deploy order in that list controls the navigation order in the rendered site.
- **New proto directory layout in a repository**: if a repository restructures where it keeps `.pb.go` or `.proto` files, update the processing logic in `scripts/generate_proto_json_files.sh` to match the new layout. This happened, for example, when namespace-directory support was added to handle modules that do not follow the standard `types/` sub-folder convention.

### Files expected to change in the PR

Use this as a checklist before pushing:

- `Makefile` — version bumps
- `source/json_tables/**` — regenerated proto JSON tables
- `source/includes/_errors.md` — regenerated error-code page
- `source/includes/*.md` — refreshed SDK code snippets and updated parameter tables
- `source/includes/_changelog.md` — new dated release entry
- `source/index.html.md` — only if a new top-level page was added
- `scripts/generate_proto_json_files.sh` — only if the proto directory layout changed in one of the source repositories
8 changes: 6 additions & 2 deletions source/includes/_binaryoptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ func main() {
<tr ><td class="code-td td_num">10</td><td class="name-td td_text">BandIBC</td></tr>
<tr ><td class="code-td td_num">11</td><td class="name-td td_text">Provider</td></tr>
<tr ><td class="code-td td_num">12</td><td class="name-td td_text">Stork</td></tr>
<tr ><td class="code-td td_num">13</td><td class="name-td td_text">ChainlinkDataStreams</td></tr></tbody></table>
<tr ><td class="code-td td_num">13</td><td class="name-td td_text">ChainlinkDataStreams</td></tr>
<tr ><td class="code-td td_num">14</td><td class="name-td td_text">PythPro</td></tr>
<tr ><td class="code-td td_num">15</td><td class="name-td td_text">SedaFast</td></tr></tbody></table>
<!-- MARKDOWN-AUTO-DOCS:END -->

<br/>
Expand Down Expand Up @@ -434,7 +436,9 @@ func main() {
<tr ><td class="code-td td_num">10</td><td class="name-td td_text">BandIBC</td></tr>
<tr ><td class="code-td td_num">11</td><td class="name-td td_text">Provider</td></tr>
<tr ><td class="code-td td_num">12</td><td class="name-td td_text">Stork</td></tr>
<tr ><td class="code-td td_num">13</td><td class="name-td td_text">ChainlinkDataStreams</td></tr></tbody></table>
<tr ><td class="code-td td_num">13</td><td class="name-td td_text">ChainlinkDataStreams</td></tr>
<tr ><td class="code-td td_num">14</td><td class="name-td td_text">PythPro</td></tr>
<tr ><td class="code-td td_num">15</td><td class="name-td td_text">SedaFast</td></tr></tbody></table>
<!-- MARKDOWN-AUTO-DOCS:END -->

<br/>
Expand Down
3 changes: 2 additions & 1 deletion source/includes/_chainstream.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ Each message contains a list of events that are filtered by the request paramete
<tr ><td class="parameter-td td_text">order_hash</td><td class="type-td td_text">string</td><td class="description-td td_text">the order hash</td></tr>
<tr ><td class="parameter-td td_text">fee_recipient_address</td><td class="type-td td_text">string</td><td class="description-td td_text">the fee recipient address</td></tr>
<tr ><td class="parameter-td td_text">cid</td><td class="type-td td_text">string</td><td class="description-td td_text">the client order ID</td></tr>
<tr ><td class="parameter-td td_text">trade_id</td><td class="type-td td_text">string</td><td class="description-td td_text">the trade ID</td></tr></tbody></table>
<tr ><td class="parameter-td td_text">trade_id</td><td class="type-td td_text">string</td><td class="description-td td_text">the trade ID</td></tr>
<tr ><td class="parameter-td td_text">is_liquidation</td><td class="type-td td_text">bool</td><td class="description-td td_text">whether the trade resulted from a liquidation</td></tr></tbody></table>
<!-- MARKDOWN-AUTO-DOCS:END -->

<br/>
Expand Down
7 changes: 6 additions & 1 deletion source/includes/_changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## 2026-06-01
- Updated all messages to reflect the changes included in the chain version v1.20.0, and the Indexer for that chain version
- Python SDK v1.15.0
- Go SDK v1.62.0

## 2026-04-28
- Updated all messages to reflect the changes included in the chain version v1.19.0, and the Indexer for that chain version
- Python SDK v1.14.0
Expand Down Expand Up @@ -97,4 +102,4 @@
- Changed the cookies management logic. All cookies management is done now by Network

## 2023-08-28
- Added IP rate limits documentation
- Added IP rate limits documentation
Loading
Loading