eth_getUncleCountByBlockHash RPC Method
Please note that for this RPC method the response will always be zero.
Parâmetros
hash
cadeia de caracteres
OBRIGATÓRIO
Carregando...
Devoluções
resultado
cadeia de caracteres
Carregando...
Pedido
1curl https://docs-demo.soneium-mainnet.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"eth_getUncleCountByBlockHash","params":["0xe219186113686bfd921bf88ce6d335abd627ccd02f9be1948d17265f43b706d5"],"id":1,"jsonrpc":"2.0"}'5
1curl https://docs-demo.soneium-mainnet.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"eth_getUncleCountByBlockHash","params":["0xe219186113686bfd921bf88ce6d335abd627ccd02f9be1948d17265f43b706d5"],"id":1,"jsonrpc":"2.0"}'5
1require 'eth'23client = Eth::Client.create 'https://docs-demo.soneium-mainnet.quiknode.pro/'4carga útil = {5"jsonrpc": "2.0",6"method": "eth_getUncleCountByBlockHash",7"params": ["0xe219186113686bfd921bf88ce6d335abd627ccd02f9be1948d17265f43b706d5"],8"id": "1"9}1011response = client.send(payload.to_json)12puts response
1require 'eth'23client = Eth::Client.create 'https://docs-demo.soneium-mainnet.quiknode.pro/'4carga útil = {5"jsonrpc": "2.0",6"method": "eth_getUncleCountByBlockHash",7"params": ["0xe219186113686bfd921bf88ce6d335abd627ccd02f9be1948d17265f43b706d5"],8"id": "1"9}1011response = client.send(payload.to_json)12puts response
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider("https://docs-demo.soneium-mainnet.quiknode.pro/");4const uncleCount = await provider.send("eth_getUncleCountByBlockHash", [5"0xe219186113686bfd921bf88ce6d335abd627ccd02f9be1948d17265f43b706d5",6]);7console.log(uncleCount);8})();9
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider("https://docs-demo.soneium-mainnet.quiknode.pro/");4const uncleCount = await provider.send("eth_getUncleCountByBlockHash", [5"0xe219186113686bfd921bf88ce6d335abd627ccd02f9be1948d17265f43b706d5",6]);7console.log(uncleCount);8})();9
1var myHeaders = new Headers();2myHeaders.acrescentar("Content-Type", "application/json");34var raw = JSON.stringify({5"method": "eth_getUncleCountByBlockHash",6«params»: [7"0xe219186113686bfd921bf88ce6d335abd627ccd02f9be1948d17265f43b706d5"8],9"id": 1,10"jsonrpc": "2.0"11});1213var requestOptions = {14método: 'POST',15cabeçalhos: myHeaders,16body: raw,17redirect: 'follow'18};1920fetch("https://docs-demo.soneium-mainnet.quiknode.pro/", requestOptions)21.then(response => response.text())22.then(result => console.log(result))23.catch(error => console.log('error', error));24
1var myHeaders = new Headers();2myHeaders.acrescentar("Content-Type", "application/json");34var raw = JSON.stringify({5"method": "eth_getUncleCountByBlockHash",6«params»: [7"0xe219186113686bfd921bf88ce6d335abd627ccd02f9be1948d17265f43b706d5"8],9"id": 1,10"jsonrpc": "2.0"11});1213var requestOptions = {14método: 'POST',15cabeçalhos: myHeaders,16body: raw,17redirect: 'follow'18};1920fetch("https://docs-demo.soneium-mainnet.quiknode.pro/", requestOptions)21.then(response => response.text())22.then(result => console.log(result))23.catch(error => console.log('error', error));24
1importar pedidos2import json34url = "https://docs-demo.soneium-mainnet.quiknode.pro/"56carga útil = json.dumps({7"method": "eth_getUncleCountByBlockHash",8«params»: [9"0xe219186113686bfd921bf88ce6d335abd627ccd02f9be1948d17265f43b706d5"10],11"id": 1,12"jsonrpc": "2.0"13})14cabeçalhos = {15'Content-Type': 'application/json'16}1718resposta = pedidos.pedido("POST", url, headers=headers, dados=carga útil)1920imprimir(resposta.texto)21
1importar pedidos2import json34url = "https://docs-demo.soneium-mainnet.quiknode.pro/"56carga útil = json.dumps({7"method": "eth_getUncleCountByBlockHash",8«params»: [9"0xe219186113686bfd921bf88ce6d335abd627ccd02f9be1948d17265f43b706d5"10],11"id": 1,12"jsonrpc": "2.0"13})14cabeçalhos = {15'Content-Type': 'application/json'16}1718resposta = pedidos.pedido("POST", url, headers=headers, dados=carga útil)1920imprimir(resposta.texto)21
1exigir "uri"2require "json"3necessita de "net/http"45url = URI("https://docs-demo.soneium-mainnet.quiknode.pro/")67https = Net::HTTP.novo(url.host, url.porta)8https.use_ssl = true910pedido = Líquido::HTTP::POST.novo(url)11pedido["Content-Type"] = "application/json"12request.body = JSON.dump({13"method": "eth_getUncleCountByBlockHash",14«params»: [15"0xe219186113686bfd921bf88ce6d335abd627ccd02f9be1948d17265f43b706d5"16],17"id": 1,18"jsonrpc": "2.0"19})2021resposta = https.pedido(pedido)22insere a resposta.read_body23
1exigir "uri"2require "json"3necessita de "net/http"45url = URI("https://docs-demo.soneium-mainnet.quiknode.pro/")67https = Net::HTTP.novo(url.host, url.porta)8https.use_ssl = true910pedido = Líquido::HTTP::POST.novo(url)11pedido["Content-Type"] = "application/json"12request.body = JSON.dump({13"method": "eth_getUncleCountByBlockHash",14«params»: [15"0xe219186113686bfd921bf88ce6d335abd627ccd02f9be1948d17265f43b706d5"16],17"id": 1,18"jsonrpc": "2.0"19})2021resposta = https.pedido(pedido)22insere a resposta.read_body23
1de web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.soneium-mainnet.quiknode.pro/'))3print (w3.eth.get_uncle_count('0xe219186113686bfd921bf88ce6d335abd627ccd02f9be1948d17265f43b706d5'))4
1de web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.soneium-mainnet.quiknode.pro/'))3print (w3.eth.get_uncle_count('0xe219186113686bfd921bf88ce6d335abd627ccd02f9be1948d17265f43b706d5'))4
Ainda não tem uma conta?
Crieendpoint seuendpoint Quicknode endpoint segundos e comece a desenvolver
Comece gratuitamente