Documentation ¶
Overview ¶
listPkg implements the chifra list command.
chifra list takes one or more addresses, queries the index of appearances, and builds TrueBlocks monitors. A TrueBlocks monitor is a file that contains blockNumber.transactionIndex pairs (transaction identifiers) representing the history of the address.
Because TrueBlocks only extracts data from the Ethereum node when it's requested, the first time you list an address it takes about a minute. Subsequent queries are much faster because TrueBlocks caches the results.
Note that chifra list only queries the index, it does not extract the full transactional details. You may use chifra export for that.
Index ¶
- func ResetOptions(testMode bool)
- func RunList(cmd *cobra.Command, args []string) error
- func ServeList(w http.ResponseWriter, r *http.Request) error
- type ListOptions
- func (opts *ListOptions) FreshenMonitorsForList(monitorArray *[]monitor.Monitor) (bool, error)
- func (opts *ListOptions) GetMax() uint64
- func (opts *ListOptions) HandleBounds(rCtx *output.RenderCtx, monitorArray []monitor.Monitor) error
- func (opts *ListOptions) HandleCount(rCtx *output.RenderCtx, monitorArray []monitor.Monitor) error
- func (opts *ListOptions) HandleShow(rCtx *output.RenderCtx, monitorArray []monitor.Monitor) error
- func (opts *ListOptions) IsMax(cnt uint64) bool
- func (opts *ListOptions) ListInternal(rCtx *output.RenderCtx) error
- func (opts *ListOptions) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResetOptions ¶
func ResetOptions(testMode bool)
Types ¶
type ListOptions ¶
type ListOptions struct { Addrs []string `json:"addrs,omitempty"` // One or more addresses (0x...) to list Count bool `json:"count,omitempty"` // Display only the count of records for each monitor NoZero bool `json:"noZero,omitempty"` // For the --count option only, suppress the display of zero appearance accounts Bounds bool `json:"bounds,omitempty"` // Report first and last block this address appears Unripe bool `json:"unripe,omitempty"` // List transactions labeled unripe (i.e. less than 28 blocks old) Silent bool `json:"silent,omitempty"` // Freshen the monitor only (no reporting) FirstRecord uint64 `json:"firstRecord,omitempty"` // The first record to process MaxRecords uint64 `json:"maxRecords,omitempty"` // The maximum number of records to process Reversed bool `json:"reversed,omitempty"` // Produce results in reverse chronological order Publisher string `json:"publisher,omitempty"` // For some query options, the publisher of the index FirstBlock base.Blknum `json:"firstBlock,omitempty"` // First block to export (inclusive, ignored when freshening) LastBlock base.Blknum `json:"lastBlock,omitempty"` // Last block to export (inclusive, ignored when freshening) 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 PublisherAddr base.Address `json:"-"` }
ListOptions provides all command options for the chifra list command.
func GetListOptions ¶
func GetListOptions(args []string, g *globals.GlobalOptions) *ListOptions
GetListOptions returns the options for this tool so other tools may use it.
func GetOptions ¶
func GetOptions() *ListOptions
func ListFinishParseInternal ¶
func ListFinishParseInternal(w io.Writer, values url.Values) *ListOptions
func (*ListOptions) FreshenMonitorsForList ¶
func (opts *ListOptions) FreshenMonitorsForList(monitorArray *[]monitor.Monitor) (bool, error)
func (*ListOptions) GetMax ¶
func (opts *ListOptions) GetMax() uint64
func (*ListOptions) HandleBounds ¶
func (*ListOptions) HandleCount ¶
func (*ListOptions) HandleShow ¶
func (*ListOptions) IsMax ¶
func (opts *ListOptions) IsMax(cnt uint64) bool
func (*ListOptions) ListInternal ¶
func (opts *ListOptions) ListInternal(rCtx *output.RenderCtx) error
ListInternal handles the internal workings of the list command. Returns an error.
func (*ListOptions) String ¶
func (opts *ListOptions) String() string
String implements the Stringer interface