> For the complete documentation index, see [llms.txt](https://docs.zulunetwork.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zulunetwork.io/zulu-evm-layer/deploy-your-dapp/api-reference.md).

# API Reference

### Overview

The API exposed by the EN is designed to be Web3-compliant. Any deviation from the Ethereum behavior is likely unintended, and we encourage users to report such discrepancies.

### \`eth\_\` Namespace

Data getters in this namespace operate in the L2 domain. They deal with L2 block numbers, check balances in L2, and more.

<table><thead><tr><th width="436">Method</th><th>Notes</th></tr></thead><tbody><tr><td><code>eth_blockNumber</code></td><td></td></tr><tr><td><code>eth_chainId</code></td><td></td></tr><tr><td><code>eth_call</code></td><td></td></tr><tr><td><code>eth_estimateGas</code></td><td></td></tr><tr><td><code>eth_gasPrice</code></td><td></td></tr><tr><td><code>eth_newFilter</code></td><td>Maximum amount of installed filters is configurable</td></tr><tr><td><code>eth_newBlockFilter</code></td><td>Same as above</td></tr><tr><td><code>eth_newPendingTransactionsFilter</code></td><td>Same as above</td></tr><tr><td><code>eth_uninstallFilter</code></td><td></td></tr><tr><td><code>eth_getLogs</code></td><td>Maximum amount of returned entities can be configured</td></tr><tr><td><code>eth_getFilterLogs</code></td><td>Same as above</td></tr><tr><td><code>eth_getFilterChanges</code></td><td>Same as above</td></tr><tr><td><code>eth_getBalance</code></td><td></td></tr><tr><td><code>eth_getBlockByNumber</code></td><td></td></tr><tr><td><code>eth_getBlockByHash</code></td><td></td></tr><tr><td><code>eth_getBlockTransactionCountByNumber</code></td><td></td></tr><tr><td><code>eth_getBlockTransactionCountByHash</code></td><td></td></tr><tr><td><code>eth_getCode</code></td><td></td></tr><tr><td><code>eth_getStorageAt</code></td><td></td></tr><tr><td><code>eth_getTransactionCount</code></td><td></td></tr><tr><td><code>eth_getTransactionByHash</code></td><td></td></tr><tr><td><code>eth_getTransactionByBlockHashAndIndex</code></td><td></td></tr><tr><td><code>eth_getTransactionByBlockNumberAndIndex</code></td><td></td></tr><tr><td><code>eth_getTransactionReceipt</code></td><td></td></tr><tr><td><code>eth_protocolVersion</code></td><td></td></tr><tr><td><code>eth_sendRawTransaction</code></td><td></td></tr><tr><td><code>eth_syncing</code></td><td>EN is considered synced if it's less than 11 blocks behind the main node.</td></tr><tr><td><code>eth_coinbase</code></td><td>Always returns a zero address</td></tr><tr><td><code>eth_accounts</code></td><td>Always returns an empty list</td></tr><tr><td><code>eth_getCompilers</code></td><td>Always returns an empty list</td></tr><tr><td><code>eth_hashrate</code></td><td>Always returns zero</td></tr><tr><td><code>eth_getUncleCountByBlockHash</code></td><td>Always returns zero</td></tr><tr><td><code>eth_getUncleCountByBlockNumber</code></td><td>Always returns zero</td></tr><tr><td><code>eth_mining</code></td><td>Always returns false</td></tr></tbody></table>

### **PubSub**

This is exclusively available on the WebSocket servers.

| Method             | Notes                                           |
| ------------------ | ----------------------------------------------- |
| `eth_subscribe`    | Maximum amount of subscriptions is configurable |
| `eth_subscription` |                                                 |

### `net_` Namespace

| Method           | Notes                |
| ---------------- | -------------------- |
| `net_version`    |                      |
| `net_peer_count` | Always returns 0     |
| `net_listening`  | Always returns false |

### `web3_` Namespace

| Method               | Notes |
| -------------------- | ----- |
| `web3_clientVersion` |       |

### `debug_` Namespace\*\*

This namespace provides a set of non-standard RPC methods for developers to inspect and debug calls and transactions. By default, this namespace is disabled but can be activated using the `EN_API_NAMESPACES` setting. Please refer to the configuration section for more details.;

| Method                     | Notes |
| -------------------------- | ----- |
| `debug_traceBlockByNumber` |       |
| `debug_traceBlockByHash`   |       |
| `debug_traceCall`          |       |
| `debug_traceTransaction`   |       |

### `zks_` Namespace

This namespace holds rollup-specific extensions to the Web3 API. Only the methods documented are deemed public. Other methods in this namespace, though exposed, are not stable and may change without notice.

| Method                        | Notes |
| ----------------------------- | ----- |
| `zks_estimateFee`             |       |
| `zks_estimateGasL1ToL2`       |       |
| `zks_getAllAccountBalances`   |       |
| `zks_getBlockDetails`         |       |
| `zks_getBridgeContracts`      |       |
| `zks_getBytecodeByHash`       |       |
| `zks_getConfirmedTokens`      |       |
| `zks_getL1BatchBlockRange`    |       |
| `zks_getL1BatchDetails`       |       |
| `zks_getL2ToL1LogProof`       |       |
| `zks_getL2ToL1MsgProof`       |       |
| `zks_getMainContract`         |       |
| `zks_getRawBlockTransactions` |       |
| `zks_getTestnetPaymaster`     |       |
| `zks_getTokenPrice`           |       |
| `zks_getTransactionDetails`   |       |
| `zks_L1BatchNumber`           |       |
| `zks_L1ChainId`               |       |

### `en` Namespace

This namespace includes methods that external nodes call on the main node during syncing. If this namespace is active, other ENs can sync using this node.

### Reference

* <https://docs.zksync.io/build/api.html>
