eth_call - Linea
Example code for the eth_call JSON-RPC method. Complete guide on how to use eth_call JSON-RPC in GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Transaction Object
Field
Type
Required
Description
Request
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [{"to": "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f", "data": "0x70a08231000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045"}, "latest"],
"id": "getblock.io"
}'const axios = require('axios');
const response = await axios.post('https://go.getblock.io/<ACCESS-TOKEN>/', {
jsonrpc: '2.0',
method: 'eth_call',
params: [{"to": "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f", "data": "0x70a08231000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045"}, "latest"],
id: 'getblock.io'
}, {
headers: { 'Content-Type': 'application/json' }
});
console.log(response.data.result);import requests
response = requests.post(
'https://go.getblock.io/<ACCESS-TOKEN>/',
headers={'Content-Type': 'application/json'},
json={
'jsonrpc': '2.0',
'method': 'eth_call',
'params': [{"to": "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f", "data": "0x70a08231000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045"}, "latest"],
'id': 'getblock.io'
}
)
print(response.json())Response
Response Parameters
Parameter
Type
Description
Use Cases
Error Handling
Error Code
Message
Description
Web3 Integration
Was this helpful?