curl --request POST \
--url https://monad-testnet.core.chainstack.com/9c5b265f20b3ea5df4f54f70eb74b800/ \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"to": "0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701",
"data": "0x06fdde03"
},
"latest"
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}curl --request POST \
--url https://monad-testnet.core.chainstack.com/9c5b265f20b3ea5df4f54f70eb74b800/ \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"to": "0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701",
"data": "0x06fdde03"
},
"latest"
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}object — the transaction call object:
from (optional) — address the transaction is sent fromto — address the transaction is directed togas (optional) — gas provided for the callgasPrice (optional) — gas price for the callvalue (optional) — value sent with the calldata (optional) — hash of the method signature and encoded parametersquantity or tag — integer block number, or the string latest, earliest, or pendingresult — the return value of the executed contract call.eth_call code examplesconst { ethers } = require("ethers");
const provider = new ethers.JsonRpcProvider("CHAINSTACK_NODE_URL");
async function callContract() {
// Call name() on Wrapped Monad (WMON) contract
const result = await provider.call({
to: "0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701",
data: "0x06fdde03" // name()
});
console.log(result);
}
callContract();
eth_call is reading data from smart contracts, such as token balances, contract state variables, or simulating complex transactions before sending them.Was this page helpful?