RPC-Methode „eth_getTransactionByBlockHashAndIndex“
Parameter
blockHash
Zeichenkette
ERFORDERLICH
Wird geladen...
Inhaltsverzeichnis
Zeichenkette
ERFORDERLICH
Wird geladen...
Rücksendungen
Ergebnis
Objekt
Wird geladen...
blockHash
Zeichenkette
Wird geladen...
Blocknummer
Zeichenkette
Wird geladen...
aus
Zeichenkette
Wird geladen...
Gas
Zeichenkette
Wird geladen...
Benzinpreis
Zeichenkette
Wird geladen...
Hash
Zeichenkette
Wird geladen...
Eingabe
Zeichenkette
Wird geladen...
Nonce
Zeichenkette
Wird geladen...
zu
Zeichenkette
Wird geladen...
Transaktionsindex
Zeichenkette
Wird geladen...
Wert
Zeichenkette
Wird geladen...
Typ
Zeichenkette
Wird geladen...
chainId
Zeichenkette
Wird geladen...
v
Zeichenkette
Wird geladen...
r
Zeichenkette
Wird geladen...
s
Zeichenkette
Wird geladen...
Anfrage
1curl https://docs-demo.moca-testnet.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"eth_getTransactionByBlockHashAndIndex","params":["0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b","0x0"],"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_getTransactionByBlockHashAndIndex","params":["0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b","0x0"],"id":1,"jsonrpc":"2.0"}'
1erfordern 'eth'23client = Eth::Client.create 'https://docs-demo.moca-testnet.quiknode.pro/'4Nutzlast = {5„jsonrpc“: "2.0",6"method": "eth_getTransactionByBlockHashAndIndex",7"params": ["0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b", "0x1"],8„id“: „1“9}10
1erfordern 'eth'23client = Eth::Client.create 'https://docs-demo.moca-testnet.quiknode.pro/'4Nutzlast = {5„jsonrpc“: "2.0",6"method": "eth_getTransactionByBlockHashAndIndex",7"params": ["0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b", "0x1"],8„id“: „1“9}10
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider("https://docs-demo.moca-testnet.quiknode.pro/");4const txInfo = await provider.send("eth_getTransactionByBlockHashAndIndex", [5"0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b",6„0x0“,7]);8console.log(txInfo);9})();
1import { ethers } from "ethers";2(async () => {3const provider = new ethers.JsonRpcProvider("https://docs-demo.moca-testnet.quiknode.pro/");4const txInfo = await provider.send("eth_getTransactionByBlockHashAndIndex", [5"0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b",6„0x0“,7]);8console.log(txInfo);9})();
1var myHeaders = new Headers();2myHeaders.anhängen("Content-Type", "application/json");34var raw = JSON.stringify({5„Methode“: „eth_getTransactionByBlockHashAndIndex“,6„params“: [7"0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b",8„0x0“9],10„id“: 1,11„jsonrpc“: "2.0"12});1314var requestOptions = {15Methode: 'POST',16Überschriften: myHeaders,17Körper: raw,18Weiterleitung: 'follow'19};2021fetch("https://docs-demo.moca-testnet.quiknode.pro/", requestOptions)22.dann(Antwort => Antwort.text())23.dann(Ergebnis => Konsole.log(Ergebnis))24.catch(Fehler => Konsole.log('Fehler', Fehler));25
1var myHeaders = new Headers();2myHeaders.anhängen("Content-Type", "application/json");34var raw = JSON.stringify({5„Methode“: „eth_getTransactionByBlockHashAndIndex“,6„params“: [7"0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b",8„0x0“9],10„id“: 1,11„jsonrpc“: "2.0"12});1314var requestOptions = {15Methode: 'POST',16Überschriften: myHeaders,17Körper: raw,18Weiterleitung: 'follow'19};2021fetch("https://docs-demo.moca-testnet.quiknode.pro/", requestOptions)22.dann(Antwort => Antwort.text())23.dann(Ergebnis => Konsole.log(Ergebnis))24.catch(Fehler => Konsole.log('Fehler', Fehler));25
1import Anfragen2import json34url = "https://docs-demo.moca-testnet.quiknode.pro/"56Nutzlast = json.dumps({7„Methode“: „eth_getTransactionByBlockHashAndIndex“,8„params“: [9"0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b",10„0x0“11],12„id“: 1,13„jsonrpc“: "2.0"14})15Überschriften = {16„Content-Type“: 'application/json'17}1819Antwort = Anfragen.Anfrage("POST", url, headers=headers, Daten=Nutzdaten)2021Drucken(Antwort.text)22
1import Anfragen2import json34url = "https://docs-demo.moca-testnet.quiknode.pro/"56Nutzlast = json.dumps({7„Methode“: „eth_getTransactionByBlockHashAndIndex“,8„params“: [9"0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b",10„0x0“11],12„id“: 1,13„jsonrpc“: "2.0"14})15Überschriften = {16„Content-Type“: 'application/json'17}1819Antwort = Anfragen.Anfrage("POST", url, headers=headers, Daten=Nutzdaten)2021Drucken(Antwort.text)22
1require "uri"2require "json"3require „net/http“45url = URI("https://docs-demo.moca-testnet.quiknode.pro/")67https = Net::HTTP.new(url.host, URL.Port)8https.use_ssl = true910Anfrage = Netto::HTTP::POST.new(URL)11Anfrage[„Content-Type“] = „application/json“12Anfrage.Inhalt = JSON.dump({13„Methode“: „eth_getTransactionByBlockHashAndIndex“,14„params“: [15"0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b",16„0x0“17],18„id“: 1,19„jsonrpc“: "2.0"20})2122Antwort = https.Anfrage(Anfrage)23gibt die Antwort aus.read_body24
1require "uri"2require "json"3require „net/http“45url = URI("https://docs-demo.moca-testnet.quiknode.pro/")67https = Net::HTTP.new(url.host, URL.Port)8https.use_ssl = true910Anfrage = Netto::HTTP::POST.new(URL)11Anfrage[„Content-Type“] = „application/json“12Anfrage.Inhalt = JSON.dump({13„Methode“: „eth_getTransactionByBlockHashAndIndex“,14„params“: [15"0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b",16„0x0“17],18„id“: 1,19„jsonrpc“: "2.0"20})2122Antwort = https.Anfrage(Anfrage)23gibt die Antwort aus.read_body24
1aus web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.moca-testnet.quiknode.pro/'))3print(w3.eth.get_transaction_by_block('0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b', '0x0'))4
1aus web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.moca-testnet.quiknode.pro/'))3print(w3.eth.get_transaction_by_block('0xc0286ef29ca431b8742735bc0cfc0fdc3173764bfe77ad7872765cc937c98d8b', '0x0'))4
Haben Sie noch kein Konto?
Erstellen Sie Ihren Quicknode-Endpunkt in Sekundenschnelle und legen Sie los
Kostenlos loslegen