eth_call RPC メソッド
パラメータ
取引
オブジェクト
必須
読み込み中...
出典:
文字列
読み込み中...
~へ
文字列
必須
読み込み中...
ガス
整数
読み込み中...
gasPrice
整数
読み込み中...
値
整数
読み込み中...
データ
文字列
読み込み中...
ブロック番号/タグ
文字列
必須
読み込み中...
目的
オブジェクト
読み込み中...
バランス
文字列
読み込み中...
ノンス
文字列
読み込み中...
コード
文字列
読み込み中...
状態
オブジェクト
読み込み中...
stateDiff
整数
読み込み中...
返品
データ
文字列
読み込み中...
リクエスト
1curl https://docs-demo.hedera-testnet.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": "0x047F8c7569B9beECaB790902BA29DaAD143041d7",11"data": "0x313ce567"12},13「最新」14]15}'16
1curl https://docs-demo.hedera-testnet.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": "0x047F8c7569B9beECaB790902BA29DaAD143041d7",11"data": "0x313ce567"12},13「最新」14]15}'16
1require 'eth'23クライアント = Eth::クライアント.create 'https://docs-demo.hedera-testnet.quiknode.pro/'4ペイロード = {5"jsonrpc": "2.0",6「メソッド」: "eth_call",7"params": [8{9"to": "0x047F8c7569B9beECaB790902BA29DaAD143041d7",10"data": "0x313ce567"11},12「最新」13],14"id": "1"15}1617回答 = クライアント.送信(ペイロード.to_json)18レスポンスを格納する19
1require 'eth'23クライアント = Eth::クライアント.create 'https://docs-demo.hedera-testnet.quiknode.pro/'4ペイロード = {5"jsonrpc": "2.0",6「メソッド」: "eth_call",7"params": [8{9"to": "0x047F8c7569B9beECaB790902BA29DaAD143041d7",10"data": "0x313ce567"11},12「最新」13],14"id": "1"15}1617回答 = クライアント.送信(ペイロード.to_json)18レスポンスを格納する19
1import { ethers } from "ethers";2(async () => {3const プロバイダー = new ethers.JsonRpcProvider(「https://docs-demo.hedera-testnet.quiknode.pro/」);4const response = await provider.send("eth_call", [5{6"to": "0x047F8c7569B9beECaB790902BA29DaAD143041d7",7"data": "0x313ce567"8},9「最新」10]);11コンソール.log(レスポンス);12})();13
1import { ethers } from "ethers";2(async () => {3const プロバイダー = new ethers.JsonRpcProvider(「https://docs-demo.hedera-testnet.quiknode.pro/」);4const response = await provider.send("eth_call", [5{6"to": "0x047F8c7569B9beECaB790902BA29DaAD143041d7",7"data": "0x313ce567"8},9「最新」10]);11コンソール.log(レスポンス);12})();13
1var myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34var raw = JSON.stringify({5「メソッド」: "eth_call",6"params": [7{8"to": "0x047F8c7569B9beECaB790902BA29DaAD143041d7",9"data": "0x313ce567"10},11「最新」12],13"id": 1,14"jsonrpc": "2.0"15});1617var requestOptions = {18メソッド: 'POST',19ヘッダー: myHeaders,20本文: raw,21リダイレクト: 'follow'22};2324取得(「https://docs-demo.hedera-testnet.quiknode.pro/」, requestOptions)25.その後(レスポンス => レスポンス.text())26.その後(結果 => コンソール.log(result))27.catchcatch(エラー => console.log('error', error));28
1var myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34var raw = JSON.stringify({5「メソッド」: "eth_call",6"params": [7{8"to": "0x047F8c7569B9beECaB790902BA29DaAD143041d7",9"data": "0x313ce567"10},11「最新」12],13"id": 1,14"jsonrpc": "2.0"15});1617var requestOptions = {18メソッド: 'POST',19ヘッダー: myHeaders,20本文: raw,21リダイレクト: 'follow'22};2324取得(「https://docs-demo.hedera-testnet.quiknode.pro/」, requestOptions)25.その後(レスポンス => レスポンス.text())26.その後(結果 => コンソール.log(result))27.catchcatch(エラー => console.log('error', error));28
1import リクエスト2import json34url = "https://docs-demo.hedera-testnet.quiknode.pro/"56ペイロード = json.dumps({7「メソッド」: "eth_call",8"params": [9{10"to": "0x047F8c7569B9beECaB790902BA29DaAD143041d7",11"data": "0x313ce567"12},13「最新」14],15"id": 1,16"jsonrpc": "2.0"17})18ヘッダー = {19「Content-Type」: 'application/json'20}2122回答 = リクエスト.リクエスト("POST", url, headers=headers, データ=ペイロード)2324印刷(レスポンス.text)25
1import リクエスト2import json34url = "https://docs-demo.hedera-testnet.quiknode.pro/"56ペイロード = json.dumps({7「メソッド」: "eth_call",8"params": [9{10"to": "0x047F8c7569B9beECaB790902BA29DaAD143041d7",11"data": "0x313ce567"12},13「最新」14],15"id": 1,16"jsonrpc": "2.0"17})18ヘッダー = {19「Content-Type」: 'application/json'20}2122回答 = リクエスト.リクエスト("POST", url, headers=headers, データ=ペイロード)2324印刷(レスポンス.text)25
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.hedera-testnet.quiknode.pro/")67https = ネット::HTTP.new(url.ホスト, url.ポート)8https.use_ssl = true910リクエスト = ネット::HTTP::POST.new(URL)11リクエスト["Content-Type"] = "application/json"12リクエスト.本文 = JSON.dump({13「メソッド」: "eth_call",14"params": [15{16"to": "0x047F8c7569B9beECaB790902BA29DaAD143041d7",17"data": "0x313ce567"18},19「最新」20],21"id": 1,22"jsonrpc": "2.0"23})2425回答 = https.リクエスト(リクエスト)26レスポンスを格納する.read_body27
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.hedera-testnet.quiknode.pro/")67https = ネット::HTTP.new(url.ホスト, url.ポート)8https.use_ssl = true910リクエスト = ネット::HTTP::POST.new(URL)11リクエスト["Content-Type"] = "application/json"12リクエスト.本文 = JSON.dump({13「メソッド」: "eth_call",14"params": [15{16"to": "0x047F8c7569B9beECaB790902BA29DaAD143041d7",17"data": "0x313ce567"18},19「最新」20],21"id": 1,22"jsonrpc": "2.0"23})2425回答 = https.リクエスト(リクエスト)26レスポンスを格納する.read_body27
1出典: web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.hedera-testnet.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="0x6B175474E89094C44Da98b954EedeAC495271d0F", abi=abi)5response = myContract.functions.balanceOf("0x6E0d01A76C3Cf4288372a29124A26D4353EE51BE").call()6印刷(レスポンス)
1出典: web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.hedera-testnet.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="0x6B175474E89094C44Da98b954EedeAC495271d0F", abi=abi)5response = myContract.functions.balanceOf("0x6E0d01A76C3Cf4288372a29124A26D4353EE51BE").call()6印刷(レスポンス)