Executes a new message call immediately without creating a transaction on the blockchain. This method is used to call smart contract functions and retrieve data without modifying the blockchain state.
eth_call JSON-RPC method executes a new message call immediately without creating a transaction on the blockchain. This method is essential for reading data from smart contracts, calling view functions, and retrieving blockchain state without modifying it or paying gas fees.
to (string, required) — The contract address to calldata (string, optional) — The hash of the method signature and encoded parametersfrom (string, optional) — The address the call is made fromgas (string, optional) — Gas limit for the call executiongasPrice (string, optional) — Gas price for the callvalue (string, optional) — Value sent with the call"latest" (only the latest block is supported on Hyperliquid)result — The return value of the executed contract method as a hexadecimal string0x prefix indicates hexadecimal format0xtotalSupply() → 0x18160dddtotalSupply() → 0x18160dddbalanceOf(address) → 0x70a08231 + encoded addressallowance(address,address) → 0xdd62ed3e + encoded addresseseth_call method is essential for applications that need to:
eth_call only supports the latest block. Historical state queries are not supported in the default RPC implementation.