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 withsource
argument.out: the output directory, default is
./data
.fields: the output fields joined by
,
for each transaction, the default ishash,from,to,value,timeStamp,blockNumber,tokenSymbol,contractAddress
, and other fields includeisError
,input
,nonce
,blockHash
,gas
,gasPrice
,gasUsed
, andconfirmations
.types: the transaction types joined by
,
that spider crawled, default isexternal
, 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:
scrapy crawl txs.eth.haircut -a file=/path/to/source/file.json
Well, the input file file.json
is formatted as follow:
[
{
"source": "0xeb31973e0febf3e3d7058234a5ebbae1ab4b8c23",
"types": "external,internal",
"start_blk": 10933499,
"out": "/path/to/output/data/0xeb3",
"min_weight": 0.0001
},
{
"source": "0xc8a65fadf0e0ddaf421f28feab69bf6e2e589963",
"types": "external,internal",
"start_blk": 12990635,
"out": "/path/to/output/data/0xc8a",
"min_weight": 0.0001
}
]
Last updated