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
59 changes: 59 additions & 0 deletions src/openrpc/chains/_components/injective/methods.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,65 @@
# Injective-specific method definitions (extends shared custom methods where network coverage differs).
components:
methods:
eth_getBlockByNumber:
name: eth_getBlockByNumber
description: |
Returns information about a block by its number.

<Note>
Alchemy's Injective endpoint provides historical block access starting at block **127,250,000** (`0x795ae50`), where Injective's native EVM upgrade was introduced.
</Note>
x-compute-units: 20
params:
- name: Block number or tag
required: true
description: The block number or special tags like 'latest', 'earliest', or 'pending'.
schema:
$ref: "../evm/block.yaml#/components/schemas/BlockNumberOrTag"
- name: Hydrated transactions
required: true
description: If true, returns full transaction objects; if false, returns only transaction hashes.
schema:
title: hydrated
type: boolean
result:
name: Block information
description: The block object containing various properties of the block.
schema:
oneOf:
- $ref: "../evm/base-types.yaml#/components/schemas/notFound"
- $ref: "../evm/block.yaml#/components/schemas/Block"
examples:
- name: eth_getBlockByNumber example
params:
- name: Block number or tag
value: "0x795ae50"
- name: Hydrated transactions
value: false
result:
name: Block information
value:
number: "0x795ae50"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use a response that matches the Injective cutoff block

When users run the newly shown request for 0x795ae50, the generated docs present a response whose hash, parent hash, timestamp, and transactions were copied unchanged from the shared EVM example (whose block number is 0x68b3). Since a block hash uniquely identifies its block, this cannot be a response for the requested Injective cutoff height, so the example cannot be used to validate an integration. Replace the copied body with an actual response from Injective at this height.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

done

hash: "0xdf7ca2f662e315782555113f77e2b11543b5365f424c156a0b5aa56a3ff34ce4"
parentHash: "0xd43c94193f45e7709496ef87e240baedcd401bf79578e4c6d350a6922e97d63a"
nonce: "0x0000000000000000"
mixHash: "0x0000000000000000000000000000000000000000000000000000000000000000"
sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
transactionsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
stateRoot: "0x0000000000000000000000000000000000000000000000000000000000000000"
receiptsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
miner: "0x0000000000000000000000000000000000000000"
difficulty: "0x0"
totalDifficulty: "0x0"
extraData: "0x"
size: "0x0"
gasLimit: "0x0"
gasUsed: "0x4f0c80"
timestamp: "0x688b8418"
uncles: []
transactions: []

eth_getBlockReceipts:
name: eth_getBlockReceipts
description: |
Expand Down
4 changes: 3 additions & 1 deletion src/openrpc/chains/injective/injective.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ methods:
- $ref: ../_components/evm/methods.yaml#/components/methods/eth_getAccount
- $ref: ../_components/evm/methods.yaml#/components/methods/eth_getBalance
- $ref: ../_components/evm/methods.yaml#/components/methods/eth_getBlockByHash
- $ref: ../_components/evm/methods.yaml#/components/methods/eth_getBlockByNumber
- $ref: >-
../_components/injective/methods.yaml#/components/methods/eth_getBlockByNumber
- $ref: >-
../_components/evm/methods.yaml#/components/methods/eth_getBlockTransactionCountByHash
- $ref: >-
Expand Down Expand Up @@ -74,6 +75,7 @@ methods:
- $ref: ../_components/injective/methods.yaml#/components/methods/eth_syncing
- $ref: ../_components/injective/methods.yaml#/components/methods/net_listening
x-bot-ignore:
- eth_getBlockByNumber
- eth_getBlockReceipts
- eth_syncing
- net_listening
Loading