JSON-RPC reference
Request formats, block tags, methods and errors for MCN execution RPC.
MCN exposes Ethereum execution JSON-RPC at https://rpc.mcnblockchain.com. A local full node exposes the same interface at http://127.0.0.1:8545 by default.
Request format
curl --fail-with-body -sS https://rpc.mcnblockchain.com \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'{"jsonrpc":"2.0","id":1,"result":"0x915"}Match response IDs to requests. A JSON-RPC error can arrive with HTTP 200; check both layers. For batch responses, correlate by ID rather than array position.
Encoding
- Quantities are hexadecimal integers:
0x0,0x915. Convert withBigIntin JavaScript. - Data is byte-aligned hexadecimal: addresses are 20 bytes, transaction hashes are 32 bytes.
- Balances and native values are base-unit integers with 18 decimals. Do not use floating-point arithmetic.
Block tags
| Tag | Meaning |
|---|---|
latest | Current canonical execution head |
pending | Node's pending view; useful for nonce selection |
safe | Safe execution block supplied by consensus |
finalized | Finalized execution block; use for settlement |
0x… | Explicit hexadecimal block height |
latest balances can include activity that is not finalized. Historical state availability depends on node retention; a full node is not an unlimited archive of past account state.
Accounts and network
The symbols address, hash and transaction in the tables stand for actual request values.
| Method | Parameters | Result |
|---|---|---|
eth_chainId | [] | 0x915 on MCN Mainnet |
eth_blockNumber | [] | Latest execution height |
eth_syncing | [] | false or execution sync progress |
net_peerCount | [] | Connected execution peers |
web3_clientVersion | [] | Serving client version |
eth_getBalance | [address, "finalized"] | Native balance |
eth_getTransactionCount | [address, "pending"] | Next nonce in this node's pending view |
eth_getCode | [address, "latest"] | Code at an address; 0x if empty |
Account history is provided by the MCNScan API, rather than a standard execution RPC history method. eth_syncing: false alone does not establish that the consensus client is ready; use the full-node status.
Blocks and transactions
| Method | Parameters | Result |
|---|---|---|
eth_getBlockByNumber | ["finalized", false] | Block with transaction hashes |
eth_getBlockByNumber | ["0xHEIGHT", true] | Block with full transaction objects |
eth_getBlockByHash | [hash, false] | Block identified by hash |
eth_getTransactionByHash | [hash] | Transaction, or null if unknown |
eth_getTransactionReceipt | [hash] | Included execution outcome, or null |
eth_sendRawTransaction | ["0xSIGNED_TRANSACTION"] | Transaction hash on submission |
A returned broadcast hash acknowledges submission, not inclusion or finality. Receipt status: 0x1 means success; 0x0 means execution failure. See transaction states and offline signing.
Fees, calls and logs
| Method | Parameters | Use |
|---|---|---|
eth_gasPrice | [] | Legacy gas-price estimate |
eth_maxPriorityFeePerGas | [] | Suggested type 2 priority fee |
eth_feeHistory | ["0x5", "latest", [50]] | Recent base fees and priority-fee observations |
eth_estimateGas | [transaction] | Gas estimate for the supplied call |
eth_call | [{to, data}, "latest"] | Read or simulate a contract call |
eth_getLogs | [{fromBlock, toBlock, address, topics}] | Contract logs within a bounded range |
Inspect baseFeePerGas in the latest block and obtain current fee suggestions before signing. Do not hard-code a permanent Mainnet fee. An estimate is based on current state; later execution can differ.
Errors and retries
| Situation | Application response |
|---|---|
| HTTP timeout / 5xx on a read | Retry with bounded exponential backoff |
| HTTP 429 | Back off; respect Retry-After when supplied |
| Invalid params / method not found | Correct the request; do not loop retries |
| Missing receipt | Keep the transaction unresolved; reconcile nonce and replacement hashes |
| Timeout after broadcasting | Look up the known signed hash before retrying the same payload |
| Finalized state unavailable or hashes disagree | Pause settlement and inspect node health |
The public RPC has no published throughput SLA. Use bounded queries and your own full node for sustained exchange workloads. Public WebSocket, archive and tracing service guarantees are not documented. Never expose admin, signing, Engine API or validator management interfaces as public application RPC.