eth_feeHistory RPC Method
參數
blockCount
字串
必填
載入中...
newestBlock
字串
必填
載入中...
rewardPercentiles
整數
必填
載入中...
退貨
oldestBlock
字串
載入中...
baseFeePerGas
陣列
載入中...
gasUsedRatio
陣列
載入中...
獎勵
陣列
載入中...
請求
1curl https://docs-demo.hedera-testnet.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"eth_feeHistory","params":["0x1", "latest", [25, 75]],"id":1,"jsonrpc":"2.0"}'
1curl https://docs-demo.hedera-testnet.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"eth_feeHistory","params":["0x1", "latest", [25, 75]],"id":1,"jsonrpc":"2.0"}'
1require 'eth'23client = Eth::Client.create 'https://docs-demo.hedera-testnet.quiknode.pro/'4有效載荷 = {5"jsonrpc": "2.0",6"method": "eth_feeHistory",7"params": ["0x1", "latest", [25, 75]],8"id": "1"9}1011response = client.send(payload.to_json)12puts response
1require 'eth'23client = Eth::Client.create 'https://docs-demo.hedera-testnet.quiknode.pro/'4有效載荷 = {5"jsonrpc": "2.0",6"method": "eth_feeHistory",7"params": ["0x1", "latest", [25, 75]],8"id": "1"9}1011response = client.send(payload.to_json)12puts response
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider(4"https://docs-demo.hedera-testnet.quiknode.pro/"5);6const response = await provider.send("eth_feeHistory", ["0x1", "latest", [25, 75]]);7console.log(response);8})();
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider(4"https://docs-demo.hedera-testnet.quiknode.pro/"5);6const response = await provider.send("eth_feeHistory", ["0x1", "latest", [25, 75]]);7console.log(response);8})();
1var myHeaders = new Headers();2myHeaders.追加("Content-Type", "application/json");34var 原始 = JSON.stringify({5"method": "eth_feeHistory",6"params": [7"0x1",8"latest",9[1025,117512]13],14"id": 1,15"jsonrpc": "2.0"16});1718var requestOptions = {19方法: 'POST',20標題: myHeaders,21正文: 原始,22重定向: '追蹤'23};2425fetch("https://docs-demo.hedera-testnet.quiknode.pro/", requestOptions)26.接著(回應 => response.text())27.接著(結果 => 控制台.log(結果))28.catchcatch(錯誤 => console.log('error', error));
1var myHeaders = new Headers();2myHeaders.追加("Content-Type", "application/json");34var 原始 = JSON.stringify({5"method": "eth_feeHistory",6"params": [7"0x1",8"latest",9[1025,117512]13],14"id": 1,15"jsonrpc": "2.0"16});1718var requestOptions = {19方法: 'POST',20標題: myHeaders,21正文: 原始,22重定向: '追蹤'23};2425fetch("https://docs-demo.hedera-testnet.quiknode.pro/", requestOptions)26.接著(回應 => response.text())27.接著(結果 => 控制台.log(結果))28.catchcatch(錯誤 => console.log('error', error));
1匯入 請求2匯入 json34url = "https://docs-demo.hedera-testnet.quiknode.pro/"56有效載荷 = json.dumps({7"method": "eth_feeHistory",8"params": [9"0x1",10"latest",11[1225,137514]15],16"id": 1,17"jsonrpc": "2.0"18})19標題 = {20「Content-Type」: 'application/json'21}2223回應 = 請求.請求("POST", url, headers=headers, data=有效載荷)2425列印(回應.text)26
1匯入 請求2匯入 json34url = "https://docs-demo.hedera-testnet.quiknode.pro/"56有效載荷 = json.dumps({7"method": "eth_feeHistory",8"params": [9"0x1",10"latest",11[1225,137514]15],16"id": 1,17"jsonrpc": "2.0"18})19標題 = {20「Content-Type」: 'application/json'21}2223回應 = 請求.請求("POST", url, headers=headers, data=有效載荷)2425列印(回應.text)26
1需要 "uri"2require "json"3需要 "net/http"45url = URI("https://docs-demo.hedera-testnet.quiknode.pro/")67https = 網::HTTP.new(url.主機, 網址.port)8https.use_ssl = true910請求 = 淨額::HTTP::POST.新增(網址)11請求["Content-Type"] = "application/json"12請求。主體 = JSON.dump({13"method": "eth_feeHistory",14"params": [15"0x1",16"latest",17[1825,197520]21],22"id": 1,23"jsonrpc": "2.0"24})2526回應 = https.請求(請求)27puts 回應。read_body28
1需要 "uri"2require "json"3需要 "net/http"45url = URI("https://docs-demo.hedera-testnet.quiknode.pro/")67https = 網::HTTP.new(url.主機, 網址.port)8https.use_ssl = true910請求 = 淨額::HTTP::POST.新增(網址)11請求["Content-Type"] = "application/json"12請求。主體 = JSON.dump({13"method": "eth_feeHistory",14"params": [15"0x1",16"latest",17[1825,197520]21],22"id": 1,23"jsonrpc": "2.0"24})2526回應 = https.請求(請求)27puts 回應。read_body28
1來源: web3 import Web3, HTTPProvider2provider = Web3.HTTPProvider("https://docs-demo.hedera-testnet.quiknode.pro/")3result = provider.make_request('eth_feeHistory', ["0x1", "latest", [25, 75]])4列印(結果)
1來源: web3 import Web3, HTTPProvider2provider = Web3.HTTPProvider("https://docs-demo.hedera-testnet.quiknode.pro/")3result = provider.make_request('eth_feeHistory', ["0x1", "latest", [25, 75]])4列印(結果)