Haircut

The following arguments for the Haircut transaction subgraph spiders can be set, including:

  • source: a source address that can not exist with file argument.

  • file: the source address json file, which cannot exist with source argument.

  • out: the output directory, default is ./data.

  • fields: the output fields joined by , for each transaction, the default is hash,from,to,value,timeStamp,blockNumber,tokenSymbol,contractAddress, and other fields include isError, input, nonce, blockHash, gas, gasPrice, gasUsed, and confirmations.

  • types: the transaction types joined by , that spider crawled, default is external, and the options including: external, internal.

  • start_blk: the start block for collecting transactions, the default is 0.

  • end_blk: the end block for collecting transactions, the default is 99999999.

  • auto_page: whether to obtain all transactions of each node. The default is False, that is, obtain the first 10k transactions at most.

  • min_weight: the minimum pollution weight for Haircut strategy, default is 0.001.

Crawl from an address

The following command shows how to get the transaction subgraph of an address:

scrapy crawl txs.eth.haircut \
-a source=0xeb31973e0febf3e3d7058234a5ebbae1ab4b8c23 \
-a out=/path/to/output/data \
-a fields=hash,from,to,value,timeStamp,blockNumber,isError,input \
-a types=external,internal
-a min_weight=0.0001

Crawl from multiple addresses

The following command shows how to get the transaction subgraphs of two addresses:

Well, the input file file.json is formatted as follow:

Last updated