Documentation
¶
Overview ¶
transactionsPkg implements the chifra transactions command.
The chifra transactions tool retrieves transactions directly from the Ethereum node or from the TrueBlocks cache (if present). You may specify multiple transaction identifiers per invocation. Unlike the Ethereum RPC, the reported transactions include the transaction's receipt and generated logs.
The --articulate option fetches the ABI from each encountered smart contract (including those encountered in a trace--if the --trace option is enabled) to better describe the reported data.
The --trace option attaches an array transaction traces to the output (if the node you're querying has --tracing enabled), while the --uniq option displays a list of uniq address appearances instead of the underlying data (including uniq addresses in traces if enabled).
Index ¶
- func ResetOptions(testMode bool)
- func RunTransactions(cmd *cobra.Command, args []string) error
- func ServeTransactions(w http.ResponseWriter, r *http.Request) error
- type TransactionsOptions
- func (opts *TransactionsOptions) HandleDecache(rCtx *output.RenderCtx) error
- func (opts *TransactionsOptions) HandleLogs(rCtx *output.RenderCtx) error
- func (opts *TransactionsOptions) HandleShow(rCtx *output.RenderCtx) (err error)
- func (opts *TransactionsOptions) HandleUniq(rCtx *output.RenderCtx) (err error)
- func (opts *TransactionsOptions) String() string
- func (opts *TransactionsOptions) TransactionsInternal(rCtx *output.RenderCtx) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResetOptions ¶
func ResetOptions(testMode bool)
func RunTransactions ¶
RunTransactions handles the transactions command for the command line. Returns error only as per cobra.
func ServeTransactions ¶
func ServeTransactions(w http.ResponseWriter, r *http.Request) error
ServeTransactions handles the transactions command for the API. Returns an error.
Types ¶
type TransactionsOptions ¶
type TransactionsOptions 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 Traces bool `json:"traces,omitempty"` // Include the transaction's traces in the results Uniq bool `json:"uniq,omitempty"` // Display a list of uniq addresses found in the transaction Flow string `json:"flow,omitempty"` // For the uniq option only, export only from or to (including trace from or to) Logs bool `json:"logs,omitempty"` // Display only the logs found in the transaction(s) Emitter []string `json:"emitter,omitempty"` // For the --logs option only, filter logs to show only those logs emitted by the given address(es) Topic []string `json:"topic,omitempty"` // For the --logs option only, filter logs to show only those with this topic(s) CacheTraces bool `json:"cacheTraces,omitempty"` // Force the transaction's traces into the cache 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 // EXISTING_CODE AccountForAddr base.Address `json:"-"` }
TransactionsOptions provides all command options for the chifra transactions command.
func GetOptions ¶
func GetOptions() *TransactionsOptions
func GetTransactionsOptions ¶
func GetTransactionsOptions(args []string, g *globals.GlobalOptions) *TransactionsOptions
GetTransactionsOptions returns the options for this tool so other tools may use it.
func TransactionsFinishParseInternal ¶
func TransactionsFinishParseInternal(w io.Writer, values url.Values) *TransactionsOptions
func (*TransactionsOptions) HandleDecache ¶
func (opts *TransactionsOptions) HandleDecache(rCtx *output.RenderCtx) error
func (*TransactionsOptions) HandleLogs ¶
func (opts *TransactionsOptions) HandleLogs(rCtx *output.RenderCtx) error
func (*TransactionsOptions) HandleShow ¶
func (opts *TransactionsOptions) HandleShow(rCtx *output.RenderCtx) (err error)
func (*TransactionsOptions) HandleUniq ¶
func (opts *TransactionsOptions) HandleUniq(rCtx *output.RenderCtx) (err error)
func (*TransactionsOptions) String ¶
func (opts *TransactionsOptions) String() string
String implements the Stringer interface
func (*TransactionsOptions) TransactionsInternal ¶
func (opts *TransactionsOptions) TransactionsInternal(rCtx *output.RenderCtx) error
TransactionsInternal handles the internal workings of the transactions command. Returns an error.