Documentation ¶
Overview ¶
tracesPkg implements the chifra traces command.
The chifra traces tool retrieves a transaction's traces. You may specify multiple transaction identifiers per invocation.
The --articulate option fetches the ABI from each encountered smart contract to better describe the reported data.
The --filter option calls your node's trace_filter routine (if available) using a bang-separated string of the same values used by trace_fitler.
Index ¶
- func ResetOptions(testMode bool)
- func RunTraces(cmd *cobra.Command, args []string) error
- func ServeTraces(w http.ResponseWriter, r *http.Request) error
- type TracesOptions
- func (opts *TracesOptions) HandleCount(rCtx *output.RenderCtx) error
- func (opts *TracesOptions) HandleDecache(rCtx *output.RenderCtx) error
- func (opts *TracesOptions) HandleFilter(rCtx *output.RenderCtx) error
- func (opts *TracesOptions) HandleShow(rCtx *output.RenderCtx) error
- func (opts *TracesOptions) String() string
- func (opts *TracesOptions) TracesInternal(rCtx *output.RenderCtx) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResetOptions ¶
func ResetOptions(testMode bool)
func RunTraces ¶
RunTraces handles the traces command for the command line. Returns error only as per cobra.
func ServeTraces ¶
func ServeTraces(w http.ResponseWriter, r *http.Request) error
ServeTraces handles the traces command for the API. Returns an error.
Types ¶
type TracesOptions ¶
type TracesOptions struct { Transactions []string `json:"transactions,omitempty"` // A space-separated list of one or more transaction identifiers TransactionIds []identifiers.Identifier `json:"transactionIds,omitempty"` // Transaction identifiers Articulate bool `json:"articulate,omitempty"` // Articulate the retrieved data if ABIs can be found Filter string `json:"filter,omitempty"` // Call the node's trace_filter routine with bang-separated filter Count bool `json:"count,omitempty"` // Display only the number of traces for the transaction (fast) Globals globals.GlobalOptions `json:"globals,omitempty"` // The global options Conn *rpc.Connection `json:"conn,omitempty"` // The connection to the RPC server BadFlag error `json:"badFlag,omitempty"` // An error flag if needed }
TracesOptions provides all command options for the chifra traces command.
func GetOptions ¶
func GetOptions() *TracesOptions
func GetTracesOptions ¶
func GetTracesOptions(args []string, g *globals.GlobalOptions) *TracesOptions
GetTracesOptions returns the options for this tool so other tools may use it.
func TracesFinishParseInternal ¶
func TracesFinishParseInternal(w io.Writer, values url.Values) *TracesOptions
func (*TracesOptions) HandleCount ¶
func (opts *TracesOptions) HandleCount(rCtx *output.RenderCtx) error
func (*TracesOptions) HandleDecache ¶
func (opts *TracesOptions) HandleDecache(rCtx *output.RenderCtx) error
func (*TracesOptions) HandleFilter ¶
func (opts *TracesOptions) HandleFilter(rCtx *output.RenderCtx) error
func (*TracesOptions) HandleShow ¶
func (opts *TracesOptions) HandleShow(rCtx *output.RenderCtx) error
func (*TracesOptions) String ¶
func (opts *TracesOptions) String() string
String implements the Stringer interface
func (*TracesOptions) TracesInternal ¶
func (opts *TracesOptions) TracesInternal(rCtx *output.RenderCtx) error
TracesInternal handles the internal workings of the traces command. Returns an error.