eth_call RPC Method
Parameters
transaction
object
Loading...
from
string
Loading...
to
string
REQUIRED
Loading...
gas
integer
Loading...
gasPrice
integer
Loading...
value
integer
Loading...
data
string
Loading...
blockNumber/tag
string
REQUIRED
Loading...
Returns
data
string
Loading...
Request
curl https://docs-demo.monad-testnet.quiknode.pro/ \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_call","params":[{"from":null,"to":"0x219f1811f77252137196cB3D7d81bD491A3a7a92","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}, "latest"],"id":1,"jsonrpc":"2.0"}'require 'eth'
client = Eth::Client.create 'https://docs-demo.monad-testnet.quiknode.pro/'
payload = {
"jsonrpc": "2.0",
"method": "eth_call",
"params": [{"from":nil,"to":"0x219f1811f77252137196cB3D7d81bD491A3a7a92","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}, "latest"],
"id": "1"
}
response = client.send(payload.to_json)
puts responseimport { ethers } from "ethers";
(async () => {
const provider = new ethers.JsonRpcProvider("https://docs-demo.monad-testnet.quiknode.pro/");
const response = await provider.send("eth_call", [
{
"from": null,
"to": "0x219f1811f77252137196cB3D7d81bD491A3a7a92",
"data":
"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE",
},
"latest",
]);
console.log(response);
})();
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"method": "eth_call",
"params": [
{
"from": null,
"to": "0x219f1811f77252137196cB3D7d81bD491A3a7a92",
"data": "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"
},
"latest"
],
"id": 1,
"jsonrpc": "2.0"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://docs-demo.monad-testnet.quiknode.pro/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));import requests
import json
url = "https://docs-demo.monad-testnet.quiknode.pro/"
payload = json.dumps({
"method": "eth_call",
"params": [
{
"from": None,
"to": "0x219f1811f77252137196cB3D7d81bD491A3a7a92",
"data": "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"
},
"latest"
],
"id": 1,
"jsonrpc": "2.0"
})
headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://docs-demo.monad-testnet.quiknode.pro/")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"method": "eth_call",
"params": [
{
"from": nil,
"to": "0x219f1811f77252137196cB3D7d81bD491A3a7a92",
"data": "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"
},
"latest"
],
"id": 1,
"jsonrpc": "2.0"
})
response = https.request(request)
puts response.read_body
from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider('https://docs-demo.monad-testnet.quiknode.pro/'))
abi = '[{"constant":True,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"view","type":"function"}]'
myContract = w3.eth.contract(address="0x219f1811f77252137196cB3D7d81bD491A3a7a92", abi=abi)
response = myContract.functions.balanceOf("0x6E0d01A76C3Cf4288372a29124A26D4353EE51BE").call()
print(response)import { Core } from '@quicknode/sdk'
const core = new Core({
endpointUrl: "https://docs-demo.monad-testnet.quiknode.pro/",
})
core.client
.call({
account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
})
.then(res => console.log(res))
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free