eth_call RPC Method
Parameters
transaction
object
REQUIRED
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...
Object
object
Loading...
balance
string
Loading...
nonce
string
Loading...
code
string
Loading...
state
object
Loading...
stateDiff
integer
Loading...
Returns
data
Loading...
Request
1curl https://docs-demo.sei-pacific.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{5"jsonrpc": "2.0",6"id": 1,7"method": "eth_call",8"params": [9{10"to": "0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460",11"data": "0x919840ad"12},13"latest",14{15"0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460": {16"code": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063919840ad14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b60005a90509056fea265627a7a72315820df124583906aafd283490b866399b6762e2075e1d84214363893c5993a13276f64736f6c63430005110032"17}18}19]20}'
1curl https://docs-demo.sei-pacific.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{5"jsonrpc": "2.0",6"id": 1,7"method": "eth_call",8"params": [9{10"to": "0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460",11"data": "0x919840ad"12},13"latest",14{15"0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460": {16"code": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063919840ad14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b60005a90509056fea265627a7a72315820df124583906aafd283490b866399b6762e2075e1d84214363893c5993a13276f64736f6c63430005110032"17}18}19]20}'
1require 'eth'23client = Eth::Client.create 'https://docs-demo.sei-pacific.quiknode.pro/'4payload = {5"jsonrpc": "2.0",6"method": "eth_call",7"params": [8{9"to": "0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460",10"data": "0x919840ad"11},12"latest",13{14"0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460": {15"code": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063919840ad14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b60005a90509056fea265627a7a72315820df124583906aafd283490b866399b6762e2075e1d84214363893c5993a13276f64736f6c63430005110032"16}17}18],19"id": "1"20}2122response = client.send(payload.to_json)23puts response
1require 'eth'23client = Eth::Client.create 'https://docs-demo.sei-pacific.quiknode.pro/'4payload = {5"jsonrpc": "2.0",6"method": "eth_call",7"params": [8{9"to": "0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460",10"data": "0x919840ad"11},12"latest",13{14"0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460": {15"code": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063919840ad14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b60005a90509056fea265627a7a72315820df124583906aafd283490b866399b6762e2075e1d84214363893c5993a13276f64736f6c63430005110032"16}17}18],19"id": "1"20}2122response = client.send(payload.to_json)23puts response
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider("https://docs-demo.sei-pacific.quiknode.pro/");4const response = await provider.send("eth_call", [5{6"to": "0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460",7"data": "0x919840ad"8},9"latest",10{11"0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460": {12"code": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063919840ad14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b60005a90509056fea265627a7a72315820df124583906aafd283490b866399b6762e2075e1d84214363893c5993a13276f64736f6c63430005110032"13}14}15]);16console.log(response);17})();
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider("https://docs-demo.sei-pacific.quiknode.pro/");4const response = await provider.send("eth_call", [5{6"to": "0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460",7"data": "0x919840ad"8},9"latest",10{11"0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460": {12"code": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063919840ad14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b60005a90509056fea265627a7a72315820df124583906aafd283490b866399b6762e2075e1d84214363893c5993a13276f64736f6c63430005110032"13}14}15]);16console.log(response);17})();
1var myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34var raw = JSON.stringify({5"method": "eth_call",6"params": [7{8"to": "0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460",9"data": "0x919840ad"10},11"latest",12{13"0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460": {14"code": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063919840ad14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b60005a90509056fea265627a7a72315820df124583906aafd283490b866399b6762e2075e1d84214363893c5993a13276f64736f6c63430005110032"15}16}17],18"id": 1,19"jsonrpc": "2.0"20});2122var requestOptions = {23method: 'POST',24headers: myHeaders,25body: raw,26redirect: 'follow'27};2829fetch("https://docs-demo.sei-pacific.quiknode.pro/", requestOptions)30.then(response => response.text())31.then(result => console.log(result))32.catch(error => console.log('error', error));
1var myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34var raw = JSON.stringify({5"method": "eth_call",6"params": [7{8"to": "0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460",9"data": "0x919840ad"10},11"latest",12{13"0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460": {14"code": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063919840ad14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b60005a90509056fea265627a7a72315820df124583906aafd283490b866399b6762e2075e1d84214363893c5993a13276f64736f6c63430005110032"15}16}17],18"id": 1,19"jsonrpc": "2.0"20});2122var requestOptions = {23method: 'POST',24headers: myHeaders,25body: raw,26redirect: 'follow'27};2829fetch("https://docs-demo.sei-pacific.quiknode.pro/", requestOptions)30.then(response => response.text())31.then(result => console.log(result))32.catch(error => console.log('error', error));
1import requests2import json34url = "https://docs-demo.sei-pacific.quiknode.pro/"56payload = json.dumps({7"method": "eth_call",8"params": [9{10"to": "0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460",11"data": "0x919840ad"12},13"latest",14{15"0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460": {16"code": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063919840ad14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b60005a90509056fea265627a7a72315820df124583906aafd283490b866399b6762e2075e1d84214363893c5993a13276f64736f6c63430005110032"17}18}19],20"id": 1,21"jsonrpc": "2.0"22})23headers = {24'Content-Type': 'application/json'25}2627response = requests.request("POST", url, headers=headers, data=payload)2829print(response.text)30
1import requests2import json34url = "https://docs-demo.sei-pacific.quiknode.pro/"56payload = json.dumps({7"method": "eth_call",8"params": [9{10"to": "0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460",11"data": "0x919840ad"12},13"latest",14{15"0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460": {16"code": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063919840ad14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b60005a90509056fea265627a7a72315820df124583906aafd283490b866399b6762e2075e1d84214363893c5993a13276f64736f6c63430005110032"17}18}19],20"id": 1,21"jsonrpc": "2.0"22})23headers = {24'Content-Type': 'application/json'25}2627response = requests.request("POST", url, headers=headers, data=payload)2829print(response.text)30
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.sei-pacific.quiknode.pro/")67https = Net::HTTP.new(url.host, url.port)8https.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Content-Type"] = "application/json"12request.body = JSON.dump({13"method": "eth_call",14"params": [15{16"to": "0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460",17"data": "0x919840ad"18},19"latest",20{21"0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460": {22"code": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063919840ad14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b60005a90509056fea265627a7a72315820df124583906aafd283490b866399b6762e2075e1d84214363893c5993a13276f64736f6c63430005110032"23}24}25],26"id": 1,27"jsonrpc": "2.0"28})2930response = https.request(request)31puts response.read_body32
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.sei-pacific.quiknode.pro/")67https = Net::HTTP.new(url.host, url.port)8https.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Content-Type"] = "application/json"12request.body = JSON.dump({13"method": "eth_call",14"params": [15{16"to": "0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460",17"data": "0x919840ad"18},19"latest",20{21"0x0fd43c8fabe26d70dfa4c8b6fa680db39f147460": {22"code": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c8063919840ad14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b60005a90509056fea265627a7a72315820df124583906aafd283490b866399b6762e2075e1d84214363893c5993a13276f64736f6c63430005110032"23}24}25],26"id": 1,27"jsonrpc": "2.0"28})2930response = https.request(request)31puts response.read_body32
1from web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.sei-pacific.quiknode.pro/'))3abi = '[{"constant":True,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"view","type":"function"}]'4myContract = w3.eth.contract(address="0x5D30afd1226640910357c194B5149645f9666271", abi=abi)5response = myContract.functions.balanceOf("0x6E0d01A76C3Cf4288372a29124A26D4353EE51BE").call()6print(response)
1from web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.sei-pacific.quiknode.pro/'))3abi = '[{"constant":True,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":False,"stateMutability":"view","type":"function"}]'4myContract = w3.eth.contract(address="0x5D30afd1226640910357c194B5149645f9666271", abi=abi)5response = myContract.functions.balanceOf("0x6E0d01A76C3Cf4288372a29124A26D4353EE51BE").call()6print(response)
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free