Join AWS, Dust Labs & OrangeDAO at QuickPitch. Win $80k — Apply Today.
The API credit value for this method is 1 . To learn more about API credits and each method's value, visit the API Credits page.
Please note that this RPC method requires the Trace Mode add-on enabled on your QuickNode endpoint. Also, it is supported only on OpenEthereum & Erigon.
Parameters:
Returns:
action - The ParityTrace object, which has the following fields:
from - The address of the sender
callType - The type of method such as call, delegatecall
gas - The gas provided by the sender, encoded as hexadecimal
input - The data sent along with the transaction
to - The address of the receiver
value - The integer of the value sent with this transaction, encoded as hexadecimal
blockHash - The hash of the block where this transaction was in
blockNumber - The block number where this transaction was in
result - The ParityTraceResult object which has the following fields:
gasUsed - The amount of gas used by this specific transaction alone
output - The value returned by the contract call, and it only contains the actual value sent by the RETURN method. If the RETURN method was not executed, the output is empty bytes
subtraces - The traces of contract calls made by the transaction
traceAddress - The list of addresses where the call executed, the address of the parents and the order of the current sub call
transactionHash - The hash of the transaction
transactionPosition - The transaction position
type - The value of the method such as call or create
Code Examples:
from web3 import HTTPProvider client = HTTPProvider('http://sample-endpoint-name.network.quiknode.pro/token-goes-here/') result = client.make_request('trace_block', ['0xccb93d']) print(result)
import requests import json url = "http://sample-endpoint-name.network.quiknode.pro/token-goes-here/" payload = json.dumps({ "method": "trace_block", "params": [ "0xccb93d" ], "id": 1, "jsonrpc": "2.0" }) headers = { 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
curl http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ \ -X POST \ -H "Content-Type: application/json" \ --data '{"method":"trace_block","params":["0xccb93d"],"id":1,"jsonrpc":"2.0"}'
var myHeaders = new Headers(); myHeaders.append("Content-Type", "application/json"); var raw = JSON.stringify({ "method": "trace_block", "params": [ "0xccb93d" ], "id": 1, "jsonrpc": "2.0" }); var requestOptions = { method: 'POST', headers: myHeaders, body: raw, redirect: 'follow' }; fetch("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));
const ethers = require("ethers"); (async () => { const provider = new ethers.providers.JsonRpcProvider("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/"); const block = await provider.send("trace_block", ["0xccb93d"]); console.log(block); })();
require 'ethereum.rb' client = Ethereum::HttpClient.new('http://sample-endpoint-name.network.quiknode.pro/token-goes-here/') block = client.send_command('trace_block', ['0xccb93d']) puts block["result"]
require "uri" require "json" require "net/http" url = URI("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = "application/json" request.body = JSON.dump({ "method": "trace_block", "params": [ "0xccb93d" ], "id": 1, "jsonrpc": "2.0" }) response = https.request(request) puts response.read_body