eth_getUncleCountByBlockHash RPC Method
Parámetros
hash
cadena
OBLIGATORIO
Cargando...
Devoluciones
resultado
cadena
Cargando...
Solicitud
1curl https://docs-demo.moca-testnet.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"eth_getUncleCountByBlockHash","params":["0x0fb61d9cab6d409217d7f8ef452e8f3abe0a0f41fb97657505bba54f0260d60d"],"id":1,"jsonrpc":"2.0"}'
1curl https://docs-demo.moca-testnet.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"eth_getUncleCountByBlockHash","params":["0x0fb61d9cab6d409217d7f8ef452e8f3abe0a0f41fb97657505bba54f0260d60d"],"id":1,"jsonrpc":"2.0"}'
1requiere 'eth'23client = Eth::Client.create 'https://docs-demo.moca-testnet.quiknode.pro/'4carga útil = {5«jsonrpc»: "2.0",6"method": "eth_getUncleCountByBlockHash",7"params":["0x0fb61d9cab6d409217d7f8ef452e8f3abe0a0f41fb97657505bba54f0260d60d"],8«id»: «1»9}1011respuesta = cliente.enviar(carga.to_json)12muestra la respuesta
1requiere 'eth'23client = Eth::Client.create 'https://docs-demo.moca-testnet.quiknode.pro/'4carga útil = {5«jsonrpc»: "2.0",6"method": "eth_getUncleCountByBlockHash",7"params":["0x0fb61d9cab6d409217d7f8ef452e8f3abe0a0f41fb97657505bba54f0260d60d"],8«id»: «1»9}1011respuesta = cliente.enviar(carga.to_json)12muestra la respuesta
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider("https://docs-demo.moca-testnet.quiknode.pro/");4const uncleCount = await provider.send("eth_getUncleCountByBlockHash", [5"0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b",6]);7console.log(uncleCount);8})();
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider("https://docs-demo.moca-testnet.quiknode.pro/");4const uncleCount = await provider.send("eth_getUncleCountByBlockHash", [5"0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b",6]);7console.log(uncleCount);8})();
1var myHeaders = new Headers();2myHeaders.añadir(«Content-Type», "application/json");34var sin procesar = JSON.convertir a cadena({5"method": "eth_getUncleCountByBlockHash",6"params":["0x0fb61d9cab6d409217d7f8ef452e8f3abe0a0f41fb97657505bba54f0260d60d"],7«id»: 1,8«jsonrpc»: "2.0"9});1011var requestOptions = {12método: 'POST',13encabezados: myHeaders,14cuerpo: sin procesar,15redirigir: «seguir»16};1718fetch("https://docs-demo.moca-testnet.quiknode.pro/", requestOptions)19.entonces(respuesta => respuesta.texto())20.entonces(resultado => console.log(resultado))21.captura(error => console.log('error', error));22
1var myHeaders = new Headers();2myHeaders.añadir(«Content-Type», "application/json");34var sin procesar = JSON.convertir a cadena({5"method": "eth_getUncleCountByBlockHash",6"params":["0x0fb61d9cab6d409217d7f8ef452e8f3abe0a0f41fb97657505bba54f0260d60d"],7«id»: 1,8«jsonrpc»: "2.0"9});1011var requestOptions = {12método: 'POST',13encabezados: myHeaders,14cuerpo: sin procesar,15redirigir: «seguir»16};1718fetch("https://docs-demo.moca-testnet.quiknode.pro/", requestOptions)19.entonces(respuesta => respuesta.texto())20.entonces(resultado => console.log(resultado))21.captura(error => console.log('error', error));22
1import solicitudes2import json34url = "https://docs-demo.moca-testnet.quiknode.pro/"56carga útil = json.dumps({7"method": "eth_getUncleCountByBlockHash",8"params":["0x0fb61d9cab6d409217d7f8ef452e8f3abe0a0f41fb97657505bba54f0260d60d"],9«id»: 1,10«jsonrpc»: "2.0"11})12encabezados = {13«Content-Type»: 'application/json'14}1516respuesta = solicitudes.solicitud(«POST», url, encabezados=encabezados, datos=carga útil)1718imprimir(respuesta.texto)19
1import solicitudes2import json34url = "https://docs-demo.moca-testnet.quiknode.pro/"56carga útil = json.dumps({7"method": "eth_getUncleCountByBlockHash",8"params":["0x0fb61d9cab6d409217d7f8ef452e8f3abe0a0f41fb97657505bba54f0260d60d"],9«id»: 1,10«jsonrpc»: "2.0"11})12encabezados = {13«Content-Type»: 'application/json'14}1516respuesta = solicitudes.solicitud(«POST», url, encabezados=encabezados, datos=carga útil)1718imprimir(respuesta.texto)19
1requiere «uri»2require "json"3require «net/http»45url = URI("https://docs-demo.moca-testnet.quiknode.pro/")67https = Net::HTTP.nuevo(url.host, url.puerto)8https.use_ssl = true910solicitud = Net::HTTP::POST.nuevo(URL)11solicitud[«Content-Type»] = "application/json"12solicitud.cuerpo = JSON.dump({13"method": "eth_getUncleCountByBlockHash",14"params":["0x0fb61d9cab6d409217d7f8ef452e8f3abe0a0f41fb97657505bba54f0260d60d"],15«id»: 1,16«jsonrpc»: "2.0"17})1819respuesta = https.solicitud(solicitud)20inserta la respuesta.read_body21
1requiere «uri»2require "json"3require «net/http»45url = URI("https://docs-demo.moca-testnet.quiknode.pro/")67https = Net::HTTP.nuevo(url.host, url.puerto)8https.use_ssl = true910solicitud = Net::HTTP::POST.nuevo(URL)11solicitud[«Content-Type»] = "application/json"12solicitud.cuerpo = JSON.dump({13"method": "eth_getUncleCountByBlockHash",14"params":["0x0fb61d9cab6d409217d7f8ef452e8f3abe0a0f41fb97657505bba54f0260d60d"],15«id»: 1,16«jsonrpc»: "2.0"17})1819respuesta = https.solicitud(solicitud)20inserta la respuesta.read_body21
1de web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.moca-testnet.quiknode.pro/'))3print (w3.eth.get_uncle_count('0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b'))4
1de web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.moca-testnet.quiknode.pro/'))3print (w3.eth.get_uncle_count('0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b'))4
¿Aún no tienes una cuenta?
Crea tu punto de conexión de Quicknode en cuestión de segundos y empieza a desarrollar
Empieza gratis