trace_rawTransaction RPC Method
This RPC method requires the Build plan or higher. Upgrade from your Free Trial to access this API Method. See our pricing for more information.
Parameters
data
REQUIRED
Loading...
array
array
REQUIRED
Loading...
vmTrace
Loading...
trace
Loading...
stateDiff
Loading...
Returns
array
Loading...
output
Loading...
stateDiff
Loading...
trace
Loading...
action
Loading...
from
Loading...
callType
Loading...
gas
Loading...
input
Loading...
to
Loading...
value
Loading...
result
Loading...
gasUsed
Loading...
output
Loading...
subtraces
Loading...
traceAddress
Loading...
type
Loading...
vmTrace
Loading...
Request
curl https://docs-demo.quiknode.pro/ \ -X POST \ -H "Content-Type: application/json" \ --data '{"method":"trace_rawTransaction","params":["RAW_TRANSACTION_DATA",["trace"]],"id":1,"jsonrpc":"2.0"}'
require 'eth' client = Eth::Client.create 'https://docs-demo.quiknode.pro/' payload = { "jsonrpc": "2.0", "method": "trace_rawTransaction", "params": ["RAW_TRANSACTION_DATA",["trace"]], "id": "1" } response = client.send(payload.to_json) puts response
import { ethers } from "ethers"; (async () => { const provider = new ethers.JsonRpcProvider("https://docs-demo.quiknode.pro/"); const rawTransaction = await provider.send("trace_rawTransaction", [ "RAW_TRANSACTION_DATA", ["trace"], ]); console.log(rawTransaction); })();
var myHeaders = new Headers(); myHeaders.append("Content-Type", "application/json"); var raw = JSON.stringify({ "method": "trace_rawTransaction", "params": [ "RAW_TRANSACTION_DATA", [ "trace" ] ], "id": 1, "jsonrpc": "2.0" }); var requestOptions = { method: 'POST', headers: myHeaders, body: raw, redirect: 'follow' }; fetch("https://docs-demo.quiknode.pro/", requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));
import requests import json url = "https://docs-demo.quiknode.pro/" payload = json.dumps({ "method": "trace_rawTransaction", "params": [ "RAW_TRANSACTION_DATA", [ "trace" ] ], "id": 1, "jsonrpc": "2.0" }) headers = { 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
require "uri" require "json" require "net/http" url = URI("https://docs-demo.quiknode.pro/") 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_rawTransaction", "params": [ "RAW_TRANSACTION_DATA", [ "trace" ] ], "id": 1, "jsonrpc": "2.0" }) response = https.request(request) puts response.read_body
from web3 import HTTPProvider client = HTTPProvider('https://docs-demo.quiknode.pro/') result = client.make_request('trace_rawTransaction', ['RAW_TRANSACTION_DATA',['trace']]) print(result)
Response
{ "jsonrpc": "2.0", "id": 1, "result": [ { "output": "0x", "stateDiff": null, "trace": [ { "action": { "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57", "callType": "call", "gas": "0x7a120", "input": "0xa9059cbb000000000000000000000000d46e8dd67c5d32be8058bb8eb970870f0724456700000000000000000000000000000000000000000000000000de0b6b3a7640000", "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", "value": "0x0" }, "result": { "gasUsed": "0x51c8", "output": "0x0000000000000000000000000000000000000000000000000000000000000001" }, "subtraces": 1, "traceAddress": [], "type": "call" }, { "action": { "from": "0xdac17f958d2ee523a2206206994597c13d831ec7", "callType": "call", "gas": "0x73e5f", "input": "0x", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x0" }, "result": { "gasUsed": "0x0", "output": "0x" }, "subtraces": 0, "traceAddress": [ 0 ], "type": "call" } ], "vmTrace": { "code": "0x608060405260043610610087577c01000000000000000000000000000000000000000000000000000000006000350463095ea7b3811461008c57806318160ddd146100d...", "ops": [ { "cost": 3, "ex": { "mem": null, "push": [ "0x60" ], "store": null, "used": 16756199 }, "pc": 0, "sub": null }, { "cost": 3, "ex": { "mem": null, "push": [ "0x40" ], "store": null, "used": 16756196 }, "pc": 2, "sub": null } ] } } ] }
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free