curl --request POST \
--url https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_call",
"id": 1,
"params": [
{
"to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"data": "0x70a082310000000000000000000000001985ea6e9c68e1c272d8209f3b478ac2fdb25c87"
},
"latest"
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}
curl --request POST \
--url https://base-mainnet.core.chainstack.com/2fc1de7f08c0465f6a28e3c355e0cb14 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_call",
"id": 1,
"params": [
{
"to": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"data": "0x70a082310000000000000000000000001985ea6e9c68e1c272d8209f3b478ac2fdb25c87"
},
"latest"
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}
balanceOf
method on the USDC contract..
Base API method eth_call
executes a smart contract function call directly and returns the result without requiring a transaction or changing the state on the blockchain. This method is widely used for reading data from smart contracts.
transactionObject
— an object containing transaction parameters, including:
to
— the address of the contract to call.data
— the call data, typically including the function signature and parameters.blockParameter
— a string specifying the block number (in hexadecimal) or one of the strings "earliest"
, "latest"
, or "pending"
, indicating the blockchain state to use for the call. Most commonly, "latest"
is used.result
— the result of the call, encoded as a hexadecimal string. The format of the result depends on the function called.eth_call
method is essential for:
The result of the call
The response is of type object
.
Was this page helpful?