EVM
eth_call
Summary: Execute a new message call
This request executes a new message call without creating a transaction on the blockchain. It allows you to invoke a contract function locally to interact with smart contracts and query data without modifying the blockchain state or consuming gas.
eth_call
is ideal for retrieving data, simulating transactions, or testing contract interactions.
Parameters
transaction object
requiredTransaction object generic to all Linea-supported transactions. All transaction call object parameters are optional.
block anyOf
Block number, block hash, or string tag.
Returns
Note that, an
execution reverted
message suggests that the transaction would fail on-chain or that the contract logic has conditions that aren't met when simulating the transaction.
eth_callResponse string
Note that, an execution reverted
message suggests that the transaction would fail on-chain or that the contract logic has conditions that aren't met when simulating the transaction.
Pattern: ^0x[0-9a-f]*$
Customize request
Parameter
Value
Request
CURL
curl https://linea-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [{"to":"0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f","input":"0x18160ddd"},"0x980a20"],
"id": 1
}'
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x00000000000000000000000000000000000000000000070083c753e38b19336e"
}