ERC-8446 CCIP-Read cross-chain gateway (Cross-Chain Client Gateway for CCIP-Read)

Draft · Other · created 2026-10-16

An extension standard that, when a contract needs to read a value on another chain, lets the client call that chain directly through its own trusted RPC, without going through an off-chain gateway, and return the result to the ERC-3668 callback.

Why it is needed

Off-chain lookups built on ERC-3668 require either that the gateway's result be trusted outright, or that the gateway return a proof the contract can verify on the original chain. But it is often difficult to cryptographically prove the state of another chain, so there are many reads for which a valid proof cannot be produced. Even then, the read itself is not necessarily unsafe. Clients (such as wallets) already trust their RPC connection to the destination chain, so the client can call that chain directly and get a result with the same level of trust, without going through a third-party gateway. This ERC lets a contract specify a chain and contract address so the client responds directly using its own RPC, removing unnecessary third-party trust from cross-chain reads where a proof is impossible.

What to implement

In depth

x-chain URL format

The format is x-chain:0x<interoperable-address>[?finalized=<value>]. interoperable-address is a version-1 ERC-7930 Interoperable Address, encoded as lowercase hexadecimal, that contains both the chain reference and the target address. The AddressLength field must not be zero, the hex string must be lowercase, and it must not contain bytes beyond the end of the Interoperable Address. For example, x-chain:0x0001000002210514833589fcd6edb6e08f4c7c32d4f71b54bda02913 refers to the contract 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 on chain ID 8453 (Base). A URL that does not match the format defined in this section is treated as unsupported.

The finalized parameter

The OPTIONAL finalized query parameter selects which block the call is made against. If the value is present and non-empty (e.g. ?finalized=true, ?finalized=1), the client calls at the finalized block; otherwise it calls at the latest block. If the client cannot provide the destination chain's finalized block, the call must fail and must not fall back to latest. Since the callback's response contains no block metadata, there is no way to know which block was used, so contracts that need the block number must have the remote function return that value directly.

Contract-side behavior and the data: fallback

The contract makes the request by reverting ERC-3668's OffchainLookup error, placing the x-chain URL in urls and leaving callData as the unwrapped call data for the target contract. For clients that do not support this ERC, it is RECOMMENDED (SHOULD) to place a data: URL fallback such as data:application/json,{"data":"0xff"} after the x-chain URL, which clients supporting this ERC must never use. The callback must interpret a 1-byte 0xff response only as a signal that the client is unsupported, not as a remote result, and must decode a successful response as bytes before interpreting it.

The client's authority to choose the chain and RPC

A client supporting this ERC uses only the first x-chain URL among urls and ignores all others. Whether it is safe to call on the destination chain is a decision the client makes alone, which includes knowing and trusting an RPC endpoint for that chain and supporting its virtual machine. The client must use its own RPC endpoint and must not accept an endpoint or chain metadata supplied by the contract. Supporting one EVM chain does not imply support for another. If the call cannot be made or the URL is unsupported, the call must fail with a result equivalent to a gateway's HTTP 4xx response.

Guaranteeing block consistency

The client must choose a block only once per x-chain read and use that same block for every read-only call on the destination chain belonging to that read, including the callback. When using latest, it must identify the block in a way that guarantees every call uses the same block, such as by block hash; on EVM chains, EIP-1898's block hash selection for eth_call can be used. If this cannot be guaranteed or the selected block cannot be provided, the read must fail.

Handling nested lookups on the destination chain

If the call reverts, the client should fail the call, and it is recommended that it expose the revert data. If the target contract itself reverts with OffchainLookup, the client should treat it as a normal ERC-3668 lookup performed on the destination chain and pass the gateway response straight through to the callback. If an x-chain URL appears in this lookup or in a subsequent destination-chain lookup (including inside a batch request), the client must fail the entire outer x-chain read. Lookups performed on the destination chain count toward the original call's ERC-3668 lookup limit.

ENSIP-21 batching and remote batch gateways

When a client processes an ENSIP-21 batch locally, it must apply this ERC to each inner request. A remote batch gateway, on the other hand, must not execute x-chain URLs, and if one is present it must proceed to the next URL. This is because if the gateway executed the x-chain URL, the client's trusted RPC connection would be replaced by the gateway's connection.

Standard status

This ERC is currently in Draft status, a proposal that has not yet been finalized and whose content may change or be discontinued depending on discussion.

Things to watch out for

Original ERC · ← ERCs