[Supanode](https://supanode.xyz/)[Learn](https://supanode.xyz/learn)Diagnose an empty eth\_call result

# Diagnose an empty eth\_call result

Check deployed code and ABI expectations before decoding an empty byte string.

**On this page**[Empty bytes are not a numeric zero](https://supanode.xyz/learn/eth-call-returns-0x#empty-bytes-are-not-a-numeric-zero)[Inspect the target and the call](https://supanode.xyz/learn/eth-call-returns-0x#inspect-the-target-and-the-call)[Work through the likely causes](https://supanode.xyz/learn/eth-call-returns-0x#work-through-the-likely-causes)[Decode only after validation](https://supanode.xyz/learn/eth-call-returns-0x#decode-only-after-validation)[Sources](https://supanode.xyz/learn/eth-call-returns-0x#sources)

## Empty bytes are not a numeric zero

A successful `eth_call` can return `0x`, meaning no return bytes. A uint256 zero is normally encoded as a full 32-byte ABI word. Treating both as the same value can conceal a wrong contract address or a function that never returned the value you expected.

## Inspect the target and the call

```
[{"jsonrpc":"2.0","id":"code","method":"eth_getCode","params":["CONTRACT","latest"]},{"jsonrpc":"2.0","id":"call","method":"eth_call","params":[{"to":"CONTRACT","data":"FUNCTION_SELECTOR_AND_ARGUMENTS"},"latest"]}]
```

This is an inspection template. Derive calldata with a tested ABI encoder rather than hand-padding strings. For historical debugging, use an explicit supported block so code and state refer to the same moment.

## Work through the likely causes

1.  Verify chain ID. A valid address can be undeployed on this chain.
2.  Check deployed code at the requested block. A contract created later cannot answer a call in an earlier state.
3.  Verify the function selector and argument types against the deployed implementation ABI.
4.  Check whether the function returns anything or whether fallback handling accepted an unknown selector.

## Decode only after validation

A JSON-RPC error containing revert data is a different response from a successful empty result. Preserve that distinction in your client. For proxies, inspect the correct implementation version at the selected block. Reject unexpected return lengths rather than silently converting them into zeros, and keep the raw bytes in diagnostic logs so an ABI mismatch can be reproduced.

## Sources

-   [Ethereum JSON-RPC](https://ethereum.org/en/developers/docs/apis/json-rpc/)
-   [EIP-1898](https://eips.ethereum.org/EIPS/eip-1898)
-   [Solidity ABI encoding](https://docs.soliditylang.org/en/latest/abi-spec.html#function-selector)

## Continue reading

[Robinhood RPC and WebSocket](https://supanode.xyz/blog/robinhood-chain-rpc-websocket)[Robinhood methods](https://supanode.xyz/docs/robinhood/rpc/whats-available)[Learn library](https://supanode.xyz/learn)

---
Source: https://supanode.xyz/learn/eth-call-returns-0x
