Blockscout ETH RPC Methods Reference
Complete reference for all 16 Ethereum JSON-RPC methods supported by Blockscout.📋 Quick Reference
PRO API Methods use POST requests toapi.blockscout.com/{chain_id}/json-rpc with JSON-RPC 2.0 format. An API key is required, including on the free tier.Per instance methods use POST requests to
{instance_url}/api/eth-rpc with JSON-RPC 2.0 format. An API key is not required but will increase RPS for your calls.
PRO API usage
Ethereum: https://api.blockscout.com/1/json-rpcOptimism: https://api.blockscout.com/10/json-rpc
Base URL Pattern (per instance)
Ethereum: https://eth.blockscout.com/api/eth-rpcOptimism: https://optimism.blockscout.com/api/eth-rpc
🔢 Methods Overview
Read Operations (State Queries)
Transaction Operations
Block Operations
Call Operations
Log Operations
📚 Detailed Method Specifications
1. eth_blockNumber
Purpose: Get the latest block number in the chain. Request:2. eth_getBalance
Purpose: Get the balance of an account at a given address. Parameters:address(string): 20-byte address to checkblock(string): Block number in hex, or “latest”, “earliest”, “pending”
3. eth_getLogs
Purpose: Get event logs matching a filter. Parameters:filter(object): Filter criteriafromBlock(string): Starting blocktoBlock(string): Ending blockaddress(string|array): Contract address(es)topics(array): Topic filters
4. eth_gasPrice
Purpose: Get current gas price. Request:5. eth_getTransactionByHash
Purpose: Get transaction details by hash. Parameters:hash(string): 32-byte transaction hash
6. eth_getTransactionReceipt
Purpose: Get transaction receipt including logs and status. Parameters:hash(string): 32-byte transaction hash
0x1= Success0x0= Failure
7. eth_chainId
Purpose: Get the chain ID for signing replay-protected transactions. Request:0x1= Ethereum Mainnet0x2105= Base0xa= Optimism0x64= Gnosis Chain
8. eth_maxPriorityFeePerGas
Purpose: Get max priority fee per gas for EIP-1559 transactions. Request:9. eth_getTransactionCount
Purpose: Get the nonce (transaction count) for an address. Parameters:address(string): 20-byte addressblock(string): Block number in hex, or “latest”, “earliest”, “pending”
10. eth_getCode
Purpose: Get the bytecode at a given address (smart contract code). Parameters:address(string): 20-byte addressblock(string): Block number in hex, or “latest”, “earliest”, “pending”
11. eth_getStorageAt
Purpose: Get value from a storage position at a given address. Parameters:address(string): 20-byte address of the storageposition(string): Position in hexblock(string): Block number in hex, or “latest”, “earliest”, “pending”
12. eth_estimateGas
Purpose: Estimate gas required to execute a transaction. Parameters:transaction(object): Transaction call objectfrom(string, optional): Sender addressto(string): Recipient addressvalue(string, optional): Value in hexdata(string, optional): Call datagas(string, optional): Gas limit in hexgasPrice(string, optional): Gas price in hex
block(string, optional): Block number or “latest”
13. eth_getBlockByNumber
Purpose: Get block information by block number. Parameters:block(string): Block number in hex, or “latest”, “earliest”, “pending”fullTx(boolean): If true, returns full transaction objects; if false, only hashes
14. eth_getBlockByHash
Purpose: Get block information by block hash. Parameters:hash(string): 32-byte block hashfullTx(boolean): If true, returns full transaction objects; if false, only hashes
15. eth_sendRawTransaction
Purpose: Submit a pre-signed transaction for broadcast. Parameters:data(string): Signed transaction data in hex
16. eth_call
Purpose: Execute a contract call immediately without creating a transaction. Parameters:transaction(object): Transaction call objectto(string): Contract addressfrom(string, optional): Sender addressdata(string): Encoded function callgas(string, optional): Gas limitgasPrice(string, optional): Gas pricevalue(string, optional): Value to send
block(string, optional): Block number or “latest”
- Reading contract state
- Simulating transactions
- Calling view/pure functions
- Checking balances of ERC-20 tokens
🧪 Recipes
Read a no-argument view function on a verified contract
Useeth_call with data set to the first 4 bytes of keccak256("<functionSignature>"). For a function like rewardRate(), the selector is 0x7b0a47ee.
result is the ABI-encoded return value, right-padded to 32 bytes. For a uint256 return, parse the full hex string as an integer.
To find the function selector for any signature, hash it with keccak256 (any Web3 library exposes this, for example ethers.id("rewardRate()").slice(0, 10)).
For functions with arguments, ABI-encode the parameters and append them to the selector (cast calldata "balanceOf(address)" 0x… from Foundry produces the full data payload).
Read the implementation address of an EIP-1967 proxy
EIP-1967 proxies keep the implementation address at storage slot0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bb3. Fetch it with eth_getStorageAt:
getsourcecode contract RPC action returns ImplementationAddress and IsProxy directly, so you can skip the storage read.
🔧 Usage Tips
Batch Requests
You can send multiple requests in a single HTTP call:Error Handling
JSON-RPC errors follow this format:-32700= Parse error-32600= Invalid request-32601= Method not found-32602= Invalid params-32603= Internal error