eth_getTransactionByBlockHashAndIndex RPC Method
Paramètres
blockHash
chaîne de caractères
OBLIGATOIRE
Chargement en cours...
index
chaîne de caractères
OBLIGATOIRE
Chargement en cours...
Retours
objet
objet
Chargement en cours...
blockHash
objet
Chargement en cours...
numéro de bloc
objet
Chargement en cours...
de
objet
Chargement en cours...
gas
objet
Chargement en cours...
gasPrice
objet
Chargement en cours...
hachage
objet
Chargement en cours...
input
objet
Chargement en cours...
nonce
objet
Chargement en cours...
à
objet
Chargement en cours...
transactionIndex
objet
Chargement en cours...
valeur
objet
Chargement en cours...
type
objet
Chargement en cours...
chainId
chaîne de caractères
Chargement en cours...
v
objet
Chargement en cours...
r
objet
Chargement en cours...
s
objet
Chargement en cours...
Demande
1curl https://docs-demo.injective-testnet.quiknode.pro/ \2-X POST \3-H « Content-Type : application/json » \4--data '{"method":"eth_getTransactionByBlockHashAndIndex","params":["0x50c40ccc6a796df550c812c8afedb7be87a6aad5e15999733ce68dd1a2e91082","0x0"],"id":1,"jsonrpc":"2.0"}'
1curl https://docs-demo.injective-testnet.quiknode.pro/ \2-X POST \3-H « Content-Type : application/json » \4--data '{"method":"eth_getTransactionByBlockHashAndIndex","params":["0x50c40ccc6a796df550c812c8afedb7be87a6aad5e15999733ce68dd1a2e91082","0x0"],"id":1,"jsonrpc":"2.0"}'
1require 'eth'23client = Eth::Client.create 'https://docs-demo.injective-testnet.quiknode.pro/'4charge utile = {5"jsonrpc": "2.0",6"method": "eth_getTransactionByBlockHashAndIndex",7"params": ["0x50c40ccc6a796df550c812c8afedb7be87a6aad5e15999733ce68dd1a2e91082", "0x1"],8"id": "1"9}10
1require 'eth'23client = Eth::Client.create 'https://docs-demo.injective-testnet.quiknode.pro/'4charge utile = {5"jsonrpc": "2.0",6"method": "eth_getTransactionByBlockHashAndIndex",7"params": ["0x50c40ccc6a796df550c812c8afedb7be87a6aad5e15999733ce68dd1a2e91082", "0x1"],8"id": "1"9}10
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider("https://docs-demo.injective-testnet.quiknode.pro/");4const txInfo = await provider.send("eth_getTransactionByBlockHashAndIndex", [5"0x50c40ccc6a796df550c812c8afedb7be87a6aad5e15999733ce68dd1a2e91082",6"0x0",7]);8console.log(txInfo);9})();
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider("https://docs-demo.injective-testnet.quiknode.pro/");4const txInfo = await provider.send("eth_getTransactionByBlockHashAndIndex", [5"0x50c40ccc6a796df550c812c8afedb7be87a6aad5e15999733ce68dd1a2e91082",6"0x0",7]);8console.log(txInfo);9})();
1var myHeaders = new Headers();2myHeaders.ajouter(« Content-Type », « application/json »);34var brut = JSON.stringify({5"method": "eth_getTransactionByBlockHashAndIndex",6« params »: [7"0x50c40ccc6a796df550c812c8afedb7be87a6aad5e15999733ce68dd1a2e91082",8"0x0"9],10« id »: 1,11"jsonrpc": "2.0"12});1314var requestOptions = {15méthode: « POST »,16en-têtes: myHeaders,17corps: brut,18redirection: « suivre »19};2021fetch("https://docs-demo.injective-testnet.quiknode.pro/", requestOptions)22.puis(réponse => réponse.text())23.puis(résultat => console.log(résultat))24.catch(erreur => console.log('erreur', erreur));25
1var myHeaders = new Headers();2myHeaders.ajouter(« Content-Type », « application/json »);34var brut = JSON.stringify({5"method": "eth_getTransactionByBlockHashAndIndex",6« params »: [7"0x50c40ccc6a796df550c812c8afedb7be87a6aad5e15999733ce68dd1a2e91082",8"0x0"9],10« id »: 1,11"jsonrpc": "2.0"12});1314var requestOptions = {15méthode: « POST »,16en-têtes: myHeaders,17corps: brut,18redirection: « suivre »19};2021fetch("https://docs-demo.injective-testnet.quiknode.pro/", requestOptions)22.puis(réponse => réponse.text())23.puis(résultat => console.log(résultat))24.catch(erreur => console.log('erreur', erreur));25
1import demandes2import json34url = "https://docs-demo.injective-testnet.quiknode.pro/"56charge utile = json.dumps({7"method": "eth_getTransactionByBlockHashAndIndex",8« params »: [9"0x50c40ccc6a796df550c812c8afedb7be87a6aad5e15999733ce68dd1a2e91082",10"0x0"11],12« id »: 1,13"jsonrpc": "2.0"14})15en-têtes = {16« Content-Type »: 'application/json'17}1819réponse = demandes.demande(« POST », url, en-têtes=en-têtes, données=charge utile)2021imprimer(réponse.texte)22
1import demandes2import json34url = "https://docs-demo.injective-testnet.quiknode.pro/"56charge utile = json.dumps({7"method": "eth_getTransactionByBlockHashAndIndex",8« params »: [9"0x50c40ccc6a796df550c812c8afedb7be87a6aad5e15999733ce68dd1a2e91082",10"0x0"11],12« id »: 1,13"jsonrpc": "2.0"14})15en-têtes = {16« Content-Type »: 'application/json'17}1819réponse = demandes.demande(« POST », url, en-têtes=en-têtes, données=charge utile)2021imprimer(réponse.texte)22
1nécessite « uri »2require « json »3nécessite « net/http »45url = URI("https://docs-demo.injective-testnet.quiknode.pro/")67https = Net::HTTP.new(url.serveur, url.port)8https.use_ssl = true910demande = Net::HTTP::POST.nouveau(URL)11demande[« Content-Type »] = « application/json »12demande.corps = JSON.dump({13"method": "eth_getTransactionByBlockHashAndIndex",14« params »: [15"0x50c40ccc6a796df550c812c8afedb7be87a6aad5e15999733ce68dd1a2e91082",16"0x0"17],18« id »: 1,19"jsonrpc": "2.0"20})2122réponse = https.requête(requête)23affiche la réponse.read_body24
1nécessite « uri »2require « json »3nécessite « net/http »45url = URI("https://docs-demo.injective-testnet.quiknode.pro/")67https = Net::HTTP.new(url.serveur, url.port)8https.use_ssl = true910demande = Net::HTTP::POST.nouveau(URL)11demande[« Content-Type »] = « application/json »12demande.corps = JSON.dump({13"method": "eth_getTransactionByBlockHashAndIndex",14« params »: [15"0x50c40ccc6a796df550c812c8afedb7be87a6aad5e15999733ce68dd1a2e91082",16"0x0"17],18« id »: 1,19"jsonrpc": "2.0"20})2122réponse = https.requête(requête)23affiche la réponse.read_body24
1Source : web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.injective-testnet.quiknode.pro/'))3print(w3.eth.get_transaction_by_block('0x50c40ccc6a796df550c812c8afedb7be87a6aad5e15999733ce68dd1a2e91082', '0x0'))4
1Source : web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.injective-testnet.quiknode.pro/'))3print(w3.eth.get_transaction_by_block('0x50c40ccc6a796df550c812c8afedb7be87a6aad5e15999733ce68dd1a2e91082', '0x0'))4
Vous n'avez pas encore de compte ?
Créez votreendpoint Quicknode endpoint quelques secondes et commencez à développer
Commencez gratuitement