NEW! Build embedded wallets with MetaMask using the Embedded Wallets SDK (Web3Auth). Instantly onboard users with social logins, passkeys, and more.
Services documentation
Use high performance APIs provided by Infura to scale your dapp or Snap.
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
required
Transaction object generic to all Linea-supported transactions. All transaction call object parameters are optional.
type
enum
The transaction type as introduced in EIP-2718, in hexadecimal. Use:
0x00 for LegacyTxType
0x01 for AccessListTxType (EIP-2930)
0x02 for DynamicFeeTxType (EIP-1559)
Enum:
"0x00"
"0x01"
"0x02"
nonce
string
Account nonce; counter for the number of transactions sent from the account; for replay protection.
Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
to
oneOf
Address of the action receiver.
Contract Creation (null)
null
Contract Creation (null)
Address
string
Hex-encoded address.
Pattern: ^0x[0-9a-fA-F]{40}$
from
string
Address of the sender.
Pattern: ^0x[0-9a-fA-F]{40}$
gas
string
Gas provided by the sender. eth_call consumes zero gas, but this schema supports other executions that might need this parameter. eth_estimateGas ignores this value.
Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
value
string
Value to transfer in wei.
Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
input
string
Input data; alternative term for data.
Pattern: ^0x[0-9a-f]*$
gasPrice
string
The gas price the sender is willing to pay in wei. Used only in non-EIP-1559 transactions.
Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
Default: 0x0
maxPriorityFeePerGas
string
Maximum fee, in wei, the sender is willing to pay per gas above the base fee. Can be used only in EIP-1559 transactions. If used, must specify maxFeePerGas.
Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
maxFeePerGas
string
Maximum total fee (base fee + priority fee), in wei, the sender is willing to pay per gas. Can be used only in EIP-1559 transactions. If used, must specify maxPriorityFeePerGas.
Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
accessList
array
EIP-2930 access list; a list of addresses and storage keys that the transaction plans to access.
earliest: The lowest numbered block the client has available.
latest: The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions.
pending: A sample next block built by the client on top of latest and containing the set of transactions usually taken from local mempool.
Enum:
"earliest"
"latest"
"pending"
Block hash
string
32 byte hex value.
Pattern: ^0x[0-9a-f]{64}$
Returns
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.