I am trying to build a custom tracer, similar to these. To be specific, I am trying to add transaction hash info to call_tracer.js.
I have tried looking at Go code which initializes the tracers and checking every possible function call or property I could find, but I was unable to get the current transaction ID. Is this information even available to the tracer?
I am running code like this:
$ nc -U /opt/geth1.8/geth.ipc
{"id": 1, "method": "debug_subscribe", "params": ["traceChain", "0x6714a", "0x6714b", {"tracer": "{ step: function(log, db) {}, fault: function(log, db) {}, result: function(ctx, db) { return {ctx: ctx}; }, }"}]}
Tracer is an object which defines 3 functions, step
, fault
and result
- my question is, how do I get current transaction hash in either step()
or result()
?