eth_call RPC 方法
參數
交易
物件
載入中...
來自
字串
載入中...
至
字串
必填
載入中...
氣體
整數
載入中...
gasPrice
整數
載入中...
值
整數
載入中...
資料
字串
載入中...
區塊編號/標籤
字串
載入中...
NOTE:
The TRON blockchain only supports the usage of the tag latest for this method
退貨
資料
載入中...
請求
1curl https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"eth_call","params":[{"to":"0x41a614f803b6fd780986a42c78ec9c7f77e6ded13c","data":"0x70a082310000000000000000000000415a67fa7cc56bd6d043a98e17d329c1dc9e14753f"}, "latest"],"id":1,"jsonrpc":"2.0"}'
1curl https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"eth_call","params":[{"to":"0x41a614f803b6fd780986a42c78ec9c7f77e6ded13c","data":"0x70a082310000000000000000000000415a67fa7cc56bd6d043a98e17d329c1dc9e14753f"}, "latest"],"id":1,"jsonrpc":"2.0"}'
1需要 'eth'23client = Eth::Client.create 'https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc'4有效載荷 = {5"jsonrpc": "2.0",6"method": "eth_call",7"params": [{"to":"0x41a614f803b6fd780986a42c78ec9c7f77e6ded13c","data":"0x70a082310000000000000000000000415a67fa7cc56bd6d043a98e17d329c1dc9e14753f"}, "latest"],8"id": "1"9}1011回應 = 客戶.傳送(有效載荷.to_json)12將回應
1需要 'eth'23client = Eth::Client.create 'https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc'4有效載荷 = {5"jsonrpc": "2.0",6"method": "eth_call",7"params": [{"to":"0x41a614f803b6fd780986a42c78ec9c7f77e6ded13c","data":"0x70a082310000000000000000000000415a67fa7cc56bd6d043a98e17d329c1dc9e14753f"}, "latest"],8"id": "1"9}1011回應 = 客戶.傳送(有效載荷.to_json)12將回應
1var myHeaders = new Headers();2myHeaders.追加("Content-Type", "application/json");34var raw = JSON.stringify({5「方法」: 「eth_call」,6"params": [7{8"to": "0x41a614f803b6fd780986a42c78ec9c7f77e6ded13c",9"data": "0x70a082310000000000000000000000415a67fa7cc56bd6d043a98e17d329c1dc9e14753f"10},11「最新」12],13"id": 1,14"jsonrpc": "2.0"15});1617var requestOptions = {18方法: 'POST',19標題: myHeaders,20正文: 原始,21redirect: 'follow'22};2324fetch("https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc", requestOptions)25.then(response => response.text())26.then(result => console.log(result))27.catch(error => console.log('error', error));
1var myHeaders = new Headers();2myHeaders.追加("Content-Type", "application/json");34var raw = JSON.stringify({5「方法」: 「eth_call」,6"params": [7{8"to": "0x41a614f803b6fd780986a42c78ec9c7f77e6ded13c",9"data": "0x70a082310000000000000000000000415a67fa7cc56bd6d043a98e17d329c1dc9e14753f"10},11「最新」12],13"id": 1,14"jsonrpc": "2.0"15});1617var requestOptions = {18方法: 'POST',19標題: myHeaders,20正文: 原始,21redirect: 'follow'22};2324fetch("https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc", requestOptions)25.then(response => response.text())26.then(result => console.log(result))27.catch(error => console.log('error', error));
1匯入 請求2import json34url = "https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc"56有效載荷 = json.dumps({7「方法」: 「eth_call」,8"params": [9{10"to": "0x41a614f803b6fd780986a42c78ec9c7f77e6ded13c",11"data": "0x70a082310000000000000000000000415a67fa7cc56bd6d043a98e17d329c1dc9e14753f"12},13「最新」14],15"id": 1,16"jsonrpc": "2.0"17})18標題 = {19「Content-Type」: 'application/json'20}2122回應 = 請求.請求("POST", url, headers=headers, data=有效載荷)2324列印(回應.text)25
1匯入 請求2import json34url = "https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc"56有效載荷 = json.dumps({7「方法」: 「eth_call」,8"params": [9{10"to": "0x41a614f803b6fd780986a42c78ec9c7f77e6ded13c",11"data": "0x70a082310000000000000000000000415a67fa7cc56bd6d043a98e17d329c1dc9e14753f"12},13「最新」14],15"id": 1,16"jsonrpc": "2.0"17})18標題 = {19「Content-Type」: 'application/json'20}2122回應 = 請求.請求("POST", url, headers=headers, data=有效載荷)2324列印(回應.text)25
1需要 "uri"2require "json"3需要 "net/http"45url = URI("https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc")67https = 網::HTTP.new(url.主機, url.port)8https.use_ssl = true910請求 = 淨::HTTP::POST.new(網址)11請求["Content-Type"] = "application/json"12請求。正文 = JSON.dump({13「方法」: 「eth_call」,14"params": [15{16"to": "0x41a614f803b6fd780986a42c78ec9c7f77e6ded13c",17"data": "0x70a082310000000000000000000000415a67fa7cc56bd6d043a98e17d329c1dc9e14753f"18},19「最新」20],21"id": 1,22"jsonrpc": "2.0"23})2425回應 = https.請求(請求)26將回應。read_body27
1需要 "uri"2require "json"3需要 "net/http"45url = URI("https://docs-demo.tron-mainnet.quiknode.pro/jsonrpc")67https = 網::HTTP.new(url.主機, url.port)8https.use_ssl = true910請求 = 淨::HTTP::POST.new(網址)11請求["Content-Type"] = "application/json"12請求。正文 = JSON.dump({13「方法」: 「eth_call」,14"params": [15{16"to": "0x41a614f803b6fd780986a42c78ec9c7f77e6ded13c",17"data": "0x70a082310000000000000000000000415a67fa7cc56bd6d043a98e17d329c1dc9e14753f"18},19「最新」20],21"id": 1,22"jsonrpc": "2.0"23})2425回應 = https.請求(請求)26將回應。read_body27