0

I've modified the call_tracer.js file (https://github.com/ethereum/go-ethereum/tree/master/eth/tracers/internal/tracers)for my own requirements, however I'm unsure as to how include it along with the other tracers.

Right now, I'm feeding my tracer JS code as an input for debug_traceCall as below:

TxObj_TraceConfig := DebugTraceCallTraceConfig{
                                Tracer: "{My TRACER JS CODE}",
                            }

                            var raw json.RawMessage
                            err := rpcClient.CallContext(context.Background(), &raw, "debug_traceCall", TxObj, "latest", TxObj_TraceConfig)
                            var res DebugTraceCallTraceResponse
                            json.Unmarshal(raw, &res)

I'd like to instead specify the Tracer file as you do usually i.e. Tracer :"callTracer" or in my case Tracer : "customTracer".

I'm assuming that I will need to include my Tracer in assets.go ?

1 Answers1

0

It should be sufficient to place the *.js file into the go-ethereum/eth/tracers/js/internal/tracers/tracers/ directory.

The code in tracers.go should include all JS files into the geth binary and make it available as the filename without the extension.

Honza
  • 974
  • 10
  • 18