Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 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
4 changes: 4 additions & 0 deletions .gitbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ root: ./docs/
structure:
readme: README.md
summary: SUMMARY.md

redirects:
dev/read/rpc/eth_callAfter: dev/read/overview.md#available-methods
dev/read/rpc/eth_getLogsWithCursor: dev/read/overview.md#available-methods
2 changes: 1 addition & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tools]
lychee = "latest"
lychee = "0.24.2"
"npm:markdownlint-cli2" = "latest"
# Pinned: prettier >= 3.9.0 mangles GitBook template tags ({% tab %}/{% endtab %})
# into markdown table rows, breaking page rendering. Re-evaluate before bumping.
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This file provides guidance to AI agents (e.g., Claude Code, Codex, Cursor, etc.

MegaETH Documentation — the official documentation site for MegaETH, hosted at [docs.megaeth.com](https://docs.megaeth.com).
Documentation is written in GitBook-flavored Markdown and deployed via GitBook with Git Sync.
For GitBook syntax, custom blocks, configuration, and best practices, follow the [official GitBook skill file](https://raw.githubusercontent.com/GitbookIO/public-docs/refs/heads/main/skill.md).
For GitBook syntax, custom blocks, configuration, and best practices, follow the [official GitBook `write-docs` skill](https://raw.githubusercontent.com/GitBookIO/gitbook-skills/main/skills/write-docs/SKILL.md).

## Documentation Architecture

Expand Down
2 changes: 1 addition & 1 deletion docs/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Use these exact forms consistently. Do not alternate between variants.

## Formatting

- **GitBook Markdown**: Use GitBook-flavored Markdown with custom blocks. See `/skill.md` for full syntax reference.
- **GitBook Markdown**: Use GitBook-flavored Markdown with custom blocks. Follow the [official GitBook `write-docs` skill](https://raw.githubusercontent.com/GitBookIO/gitbook-skills/main/skills/write-docs/SKILL.md) for the full syntax reference.
- **One sentence, one line**: Each sentence goes on its own line for better diffs.
- **Frontmatter**: Every page must have YAML frontmatter with at least `description` for SEO.
- **Headings**: Use `#` for the page title (H1), `##` for sections (H2), `###` for subsections (H3). One H1 per page. Use sentence case: "Gas forwarding rules" not "Gas Forwarding Rules." Capitalize only proper nouns (MegaETH, Ethereum, Rex4).
Expand Down
53 changes: 50 additions & 3 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,58 @@
- [Force Inclusion — Foundry](dev/send-tx/force-inclusion.md)
- [Read from MegaETH](dev/read/overview.md)
- [Realtime API](dev/read/realtime-api.md)
- RPC Reference
- [RPC Reference](dev/read/rpc/README.md)
- [debug_getHistoryTransactionCount](dev/read/rpc/debug_getHistoryTransactionCount.md)
- [debug_getRawHeader](dev/read/rpc/debug_getRawHeader.md)
- [debug_traceBlockByHash](dev/read/rpc/debug_traceBlockByHash.md)
- [debug_traceBlockByNumber](dev/read/rpc/debug_traceBlockByNumber.md)
- [debug_traceTransaction](dev/read/rpc/debug_traceTransaction.md)
- [eth_accounts](dev/read/rpc/eth_accounts.md)
- [eth_blockNumber](dev/read/rpc/eth_blockNumber.md)
- [eth_call](dev/read/rpc/eth_call.md)
- [eth_callMany](dev/read/rpc/eth_callMany.md)
- [eth_chainId](dev/read/rpc/eth_chainId.md)
- [eth_createAccessList](dev/read/rpc/eth_createAccessList.md)
- [eth_estimateGas](dev/read/rpc/eth_estimateGas.md)
- [eth_feeHistory](dev/read/rpc/eth_feeHistory.md)
- [eth_gasPrice](dev/read/rpc/eth_gasPrice.md)
- [eth_getBalance](dev/read/rpc/eth_getBalance.md)
- [eth_getBlockByHash](dev/read/rpc/eth_getBlockByHash.md)
- [eth_getBlockByNumber](dev/read/rpc/eth_getBlockByNumber.md)
- [eth_getBlockReceipts](dev/read/rpc/eth_getBlockReceipts.md)
- [eth_getBlockTransactionCountByHash](dev/read/rpc/eth_getBlockTransactionCountByHash.md)
- [eth_getBlockTransactionCountByNumber](dev/read/rpc/eth_getBlockTransactionCountByNumber.md)
- [eth_getCode](dev/read/rpc/eth_getCode.md)
- [eth_getCodeByHash](dev/read/rpc/eth_getCodeByHash.md)
- [eth_getHeaderByHash](dev/read/rpc/eth_getHeaderByHash.md)
- [eth_getHeaderByNumber](dev/read/rpc/eth_getHeaderByNumber.md)
- [eth_getLogs](dev/read/rpc/eth_getLogs.md)
- [eth_getStorageAt](dev/read/rpc/eth_getStorageAt.md)
- [eth_getTransactionByHash](dev/read/rpc/eth_getTransactionByHash.md)
- [eth_getTransactionCount](dev/read/rpc/eth_getTransactionCount.md)
- [eth_getTransactionReceipt](dev/read/rpc/eth_getTransactionReceipt.md)
- [eth_getUncleByBlockHashAndIndex](dev/read/rpc/eth_getUncleByBlockHashAndIndex.md)
- [eth_getUncleByBlockNumberAndIndex](dev/read/rpc/eth_getUncleByBlockNumberAndIndex.md)
- [eth_getUncleCountByBlockHash](dev/read/rpc/eth_getUncleCountByBlockHash.md)
- [eth_getUncleCountByBlockNumber](dev/read/rpc/eth_getUncleCountByBlockNumber.md)
- [eth_getWithdrawalProof](dev/read/rpc/eth_getWithdrawalProof.md)
- [eth_maxPriorityFeePerGas](dev/read/rpc/eth_maxPriorityFeePerGas.md)
- [eth_protocolVersion](dev/read/rpc/eth_protocolVersion.md)
- [eth_sendRawTransaction](dev/read/rpc/eth_sendRawTransaction.md)
- [eth_sendRawTransactionSync](dev/read/rpc/eth_sendRawTransactionSync.md)
- [eth_subscribe](dev/read/rpc/eth_subscribe.md)
- [eth_callAfter](dev/read/rpc/eth_callAfter.md)
- [eth_getLogsWithCursor](dev/read/rpc/eth_getLogsWithCursor.md)
- [eth_syncing](dev/read/rpc/eth_syncing.md)
- [eth_uninstallFilter](dev/read/rpc/eth_uninstallFilter.md)
- [eth_unsubscribe](dev/read/rpc/eth_unsubscribe.md)
- [mega_getBlockWitness](dev/read/rpc/mega_getBlockWitness.md)
- [mega_getWithdrawalProof](dev/read/rpc/mega_getWithdrawalProof.md)
- [mega_outputAtBlock](dev/read/rpc/mega_outputAtBlock.md)
- [net_listening](dev/read/rpc/net_listening.md)
- [net_peerCount](dev/read/rpc/net_peerCount.md)
- [net_version](dev/read/rpc/net_version.md)
- [optimism_outputAtBlock](dev/read/rpc/optimism_outputAtBlock.md)
- [realtime_sendRawTransaction](dev/read/rpc/realtime_sendRawTransaction.md)
- [web3_clientVersion](dev/read/rpc/web3_clientVersion.md)
- [Error Codes](dev/read/rpc/error-codes.md)
- [Transaction Execution](dev/execution/overview.md)
- [Gas Model](dev/execution/gas-model.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/execution/system-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Code deposit costs 10,000 storage gas per byte on MegaETH.
A 24 KB contract costs roughly 240M storage gas.
If `gasLimitOverride` is too low for this cost, the inner deployment will fail (out of gas) but the outer call still succeeds — check `errorData` and `deployedAddress`, and note the outer call is still charged the gas the failed attempt consumed.
Simulate the transaction with [`mega-evme`](../send-tx/debugging.md#simulating-a-new-transaction) to find the required gas — it has no gas cap and fully implements MegaETH's gas model.
Alternatively, use `eth_estimateGas` on a MegaETH endpoint (subject to the [RPC compute gas cap](../send-tx/gas-estimation.md#the-rpc-compute-gas-cap)).
Alternatively, use `eth_estimateGas` on a MegaETH endpoint (subject to the [public RPC simulation limits](../send-tx/gas-estimation.md#public-rpc-simulation-limits)).
{% endhint %}

{% hint style="info" %}
Expand Down
11 changes: 7 additions & 4 deletions docs/dev/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ See the [Contract Limits specification](https://docs.megaeth.com/spec/megaevm/co

## Transaction Lifecycle & Txpool

### What is the gas limit of `eth_call` / `eth_estimateGas`?
### What limits apply to `eth_call` and `eth_estimateGas`?

60,000,000 compute gas on the public RPC endpoint.
The public gateway adds a 60,000,000 compute-gas limit to `eth_call`.
It preserves the caller's total `gas` field, so this is a compute limit rather than a replacement total-gas limit.

Note that this limit is _different_ from the protocol per-transaction gas limit of 10,000,000,000.
It applies only to RPC simulation calls.
`eth_estimateGas` instead uses the node's CPU-limited estimator; the gateway's source default is 500,000,000 nanoseconds (0.5 seconds).
It does not add the same 60M compute-gas override.

These RPC simulation limits are _different_ from the protocol per-transaction gas limit of 10,000,000,000.
Managed RPC providers may allow higher limits.

### What is the maximum number of transactions I can have in the txpool?
Expand Down
Loading
Loading