Skip to main content

eth_call

Executes a new message call immediately without creating a transaction on the blockchain.

Parameters

transaction object
required

from string

20 bytes Address the transaction is sent from.

to string

20 bytes - Address the transaction is directed to.

gas string

Hexadecimal value of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.

gasPrice string

Hexadecimal value of the gasPrice used for each paid gas.

maxPriorityFeePerGas string

Maximum fee, in wei, the sender is willing to pay per gas above the base fee.

maxFeePerGas string

Maximum total fee (base fee + priority fee), in wei, the sender is willing to pay per gas.

value string

Hexadecimal of the value sent with this transaction.

data string

Hash of the method signature and encoded parameters.

block parameter string
required

block parameter

Returns

The returned value of the executed contract.
call object
required

id integer

result string

Customize request

Connect MetaMask to test requests using your wallet

Request
await window.ethereum.request({
"method": "eth_call",
"params": [],
});