eth_feeHistory RPC 方法
參數
blockCount
字串/整數
必填
載入中...
最新區塊
字串
必填
載入中...
獎勵百分位數
整數
必填
載入中...
退貨
oldestBlock
載入中...
baseFeePerGas
載入中...
gasUsedRatio
載入中...
獎勵
載入中...
請求
1curl https://docs-demo.flow-mainnet.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"eth_feeHistory","params":[4, "latest", [25, 75]],"id":1,"jsonrpc":"2.0"}'
1curl https://docs-demo.flow-mainnet.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"eth_feeHistory","params":[4, "latest", [25, 75]],"id":1,"jsonrpc":"2.0"}'
1需要 'eth'23client = Eth::Client.create 'https://docs-demo.flow-mainnet.quiknode.pro/'4有效載荷 = {5"jsonrpc": "2.0",6"method": "eth_feeHistory",7"params": [4, "latest", [25, 75]],8"id": "1"9}1011回應 = 客戶.傳送(有效載荷.to_json)12將回應
1需要 'eth'23client = Eth::Client.create 'https://docs-demo.flow-mainnet.quiknode.pro/'4有效載荷 = {5"jsonrpc": "2.0",6"method": "eth_feeHistory",7"params": [4, "latest", [25, 75]],8"id": "1"9}1011回應 = 客戶.傳送(有效載荷.to_json)12將回應
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider(4"https://docs-demo.flow-mainnet.quiknode.pro/"5);6const response = await provider.send("eth_feeHistory", [4, "latest", [25, 75]]);7console.log(response);8})();
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider(4"https://docs-demo.flow-mainnet.quiknode.pro/"5);6const response = await provider.send("eth_feeHistory", [4, "latest", [25, 75]]);7console.log(response);8})();
1var myHeaders = new Headers();2myHeaders.追加("Content-Type", "application/json");34var raw = JSON.stringify({5「方法」: "eth_feeHistory",6"params": [74,8「最新」,9[1025,117512]13],14"id": 1,15"jsonrpc": "2.0"16});1718var requestOptions = {19方法: 'POST',20標題: myHeaders,21正文: 原始,22redirect: 'follow'23};2425fetch("https://docs-demo.flow-mainnet.quiknode.pro/", requestOptions)26.then(response => response.text())27.then(result => console.log(result))28.catch(error => console.log('error', error));
1var myHeaders = new Headers();2myHeaders.追加("Content-Type", "application/json");34var raw = JSON.stringify({5「方法」: "eth_feeHistory",6"params": [74,8「最新」,9[1025,117512]13],14"id": 1,15"jsonrpc": "2.0"16});1718var requestOptions = {19方法: 'POST',20標題: myHeaders,21正文: 原始,22redirect: 'follow'23};2425fetch("https://docs-demo.flow-mainnet.quiknode.pro/", requestOptions)26.then(response => response.text())27.then(result => console.log(result))28.catch(error => console.log('error', error));
1匯入 請求2import json34url = "https://docs-demo.flow-mainnet.quiknode.pro/"56有效載荷 = json.dumps({7「方法」: "eth_feeHistory",8"params": [94,10「最新」,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匯入 請求2import json34url = "https://docs-demo.flow-mainnet.quiknode.pro/"56有效載荷 = json.dumps({7「方法」: "eth_feeHistory",8"params": [94,10「最新」,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.flow-mainnet.quiknode.pro/")67https = 網::HTTP.new(url.主機, url.port)8https.use_ssl = true910請求 = 淨::HTTP::POST.new(網址)11請求["Content-Type"] = "application/json"12請求。正文 = JSON.dump({13「方法」: "eth_feeHistory",14"params": [154,16「最新」,17[1825,197520]21],22"id": 1,23"jsonrpc": "2.0"24})2526回應 = https.請求(請求)27將回應。read_body28
1需要 "uri"2require "json"3需要 "net/http"45url = URI("https://docs-demo.flow-mainnet.quiknode.pro/")67https = 網::HTTP.new(url.主機, url.port)8https.use_ssl = true910請求 = 淨::HTTP::POST.new(網址)11請求["Content-Type"] = "application/json"12請求。正文 = JSON.dump({13「方法」: "eth_feeHistory",14"params": [154,16「最新」,17[1825,197520]21],22"id": 1,23"jsonrpc": "2.0"24})2526回應 = https.請求(請求)27將回應。read_body28
1出自 web3 import Web3, HTTPProvider2provider = Web3.HTTPProvider("https://docs-demo.flow-mainnet.quiknode.pro/")3result = provider.make_request('eth_feeHistory', [4, "latest", [25, 75]])4print(result)
1出自 web3 import Web3, HTTPProvider2provider = Web3.HTTPProvider("https://docs-demo.flow-mainnet.quiknode.pro/")3result = provider.make_request('eth_feeHistory', [4, "latest", [25, 75]])4print(result)