You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/src/pages/en/subgraphs/developing/creating/graph-ts/api.mdx
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -372,6 +372,30 @@ store.remove('Transfer', id)
372
372
373
373
The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data.
Following Ethereum's [transition to Proof of Stake](https://ethereum.org/en/roadmap/merge/), the Execution Layer JSON-RPC schema was updated to reflect changes in block metadata.
378
+
379
+
The `totalDifficulty` field was [officially removed](https://github.com/ethereum/execution-apis/pull/570) from the `eth_getBlockByNumber` response. Additionally, the `difficulty` field—previously used in Proof of Work—was retained as **optional** but is now considered obsolete and typically returned as `"0x0"` by spec-compliant clients. While some clients continue to include these fields for backward compatibility, developers relying on them should update their subgraphs and tooling to accommodate these schema changes. Full schema details are available in the [Ethereum Execution APIs documentation](https://ethereum.github.io/execution-apis/). We've added a chart with the current client compatibility with these updates as of July 17, 2025. **Please check for specific client updates as needed**.
|**Erigon v3**| Not returned | Non-zero | Usually present | Strict spec compliance, noted [here](https://github.com/erigontech/erigon/issues/13012)|
394
+
|**Geth**| Returned | Non-zero | Returned | Maintains legacy behavior, noted [here](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getblockbyhash)|
395
+
|**Nethermind**| Returned | Non-zero | Returned | Maintains legacy behavior, noted [here](https://docs.nethermind.io/interacting/json-rpc-ns/eth/#eth_getblockbynumber)|
396
+
|**Besu**| Returns `0` for an uncle block | Non-zero | Returned | Returns deprecated fields with valid values, noted [here](https://besu.hyperledger.org/public-networks/reference/api/objects)|
397
+
|**Reth**| Not Returned |`"0x0"`| Returned | Highly spec-compliant, aligns with post-Merge schema |
398
+
375
399
#### Support for Ethereum Types
376
400
377
401
As with entities, `graph codegen` generates classes for all smart contracts and events used in a Subgraph. For this, the contract ABIs need to be part of the data source in the Subgraph manifest. Typically, the ABI files are stored in an `abis/` folder.
0 commit comments