Documentation ¶
Overview ¶
Package tracesPkg handles the chifra traces command. It The 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 ¶
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 (*TracesOptions) HandleCounts ¶
func (opts *TracesOptions) HandleCounts() error
func (*TracesOptions) HandleDecache ¶
func (opts *TracesOptions) HandleDecache() error
func (*TracesOptions) HandleFilter ¶
func (opts *TracesOptions) HandleFilter() error
func (*TracesOptions) HandleShow ¶
func (opts *TracesOptions) HandleShow() error
func (*TracesOptions) String ¶
func (opts *TracesOptions) String() string
String implements the Stringer interface
func (*TracesOptions) TracesInternal ¶
func (opts *TracesOptions) TracesInternal() error
TracesInternal handles the internal workings of the traces command. Returns an error.