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

Method TraceBlock

protocols/cpc/api_tracer.go:383–389  ·  view source on GitHub ↗

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

(ctx context.Context, blob []byte, config *TraceConfig)

Source from the content-addressed store, hash-verified

381// TraceBlock returns the structured logs created during the execution of EVM
382// and returns them as a JSON object.
383func (api *PrivateDebugAPI) TraceBlock(ctx context.Context, blob []byte, config *TraceConfig) ([]*txTraceResult, error) {
384 block := new(types.Block)
385 if err := rlp.Decode(bytes.NewReader(blob), block); err != nil {
386 return nil, fmt.Errorf("could not decode block: %v", err)
387 }
388 return api.traceBlock(ctx, block, config)
389}
390
391// TraceBlockFromFile returns the structured logs created during the execution of
392// EVM and returns them as a JSON object.

Callers 1

TraceBlockFromFileMethod · 0.95

Calls 1

traceBlockMethod · 0.95

Tested by

no test coverage detected