MCPcopy Create free account
hub / github.com/CPChain/chain / TraceBlockFromFile

Method TraceBlockFromFile

protocols/cpc/api_tracer.go:393–399  ·  view source on GitHub ↗

TraceBlockFromFile returns the structured logs created during the execution of EVM and returns them as a JSON object.

(ctx context.Context, file string, config *TraceConfig)

Source from the content-addressed store, hash-verified

391// TraceBlockFromFile returns the structured logs created during the execution of
392// EVM and returns them as a JSON object.
393func (api *PrivateDebugAPI) TraceBlockFromFile(ctx context.Context, file string, config *TraceConfig) ([]*txTraceResult, error) {
394 blob, err := ioutil.ReadFile(file)
395 if err != nil {
396 return nil, fmt.Errorf("could not read file: %v", err)
397 }
398 return api.TraceBlock(ctx, blob, config)
399}
400
401// traceBlock configures a new tracer according to the provided configuration, and
402// executes all the transactions contained within. The return value will be one item

Callers

nothing calls this directly

Calls 1

TraceBlockMethod · 0.95

Tested by

no test coverage detected