BlockchainSpider
  • What is BlockchainSpider?
  • Guides
    • Crawl a transaction subgraph
    • Collect label data
    • Collect transaction data
  • subgraph spiders
    • Overview
    • BFS
    • Poison
    • Haircut
    • APPR
    • TTR
  • label spiders
    • Overview
    • CryptoScamsDB
    • LabelCloud
    • OFAC
    • Tor
  • Transaction spiders
    • Overview
    • Collect by block order
    • Collect by transaction hash
  • Extractors
    • Overview
    • Deduplicate
    • Local community
  • Settings
    • APIKeys
    • Cache
    • Customizing your workflow
Powered by GitBook
On this page
  • Use case: collect receipt and token transfer in a block range
  • Use case: collect block, transaction, receipt, token transfer to the latest
  1. Transaction spiders

Collect by block order

The following arguments for trans.block.evm can be set, including:

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

  • start_blk: the start block for collecting transaction data; the default is 0.

  • end_blk: the end block for collecting transaction data; if not set, the spider will continue to monitor the latest block's transaction data.

  • providers: the HTTP JSON RPC providers. If you have two or more providers, you can use , to join them.

  • enable: Specify the transaction crawler middleware to be started. If multiple middlewares are enabled, please separate them with ,. Middlewares determine which data will be collected. BlockchainSpider provides the following middlewares:

    • BlockchainSpider.middlewares.trans.TransactionReceiptMiddleware

    • BlockchainSpider.middlewares.trans.TraceMiddleware

    • BlockchainSpider.middlewares.trans.TokenTransferMiddleware

    • BlockchainSpider.middlewares.trans.TokenPropertyMiddleware

    • BlockchainSpider.middlewares.trans.ContractMiddleware

    • BlockchainSpider.middlewares.trans.DCFGMiddleware

Use case: collect receipt and token transfer in a block range

scrapy crawl trans.block.evm \
-a out=/path/to/output/data \
-a start_blk=19000000 \
-a end_blk=19001000 \
-a providers=https://freerpc.merkle.io \
-a enable=BlockchainSpider.middlewares.trans.TransactionReceiptMiddleware,BlockchainSpider.middlewares.trans.TokenTransferMiddleware,BlockchainSpider.middlewares.trans.TokenPropertyMiddleware

Use case: collect block, transaction, receipt, token transfer to the latest

scrapy crawl trans.block.evm \
-a out=/path/to/output/data \
-a start_blk=19000000 \
-a providers=https://freerpc.merkle.io \
-a enable=BlockchainSpider.middlewares.trans.TransactionReceiptMiddleware,BlockchainSpider.middlewares.trans.TraceMiddleware,BlockchainSpider.middlewares.trans.TokenTransferMiddleware,BlockchainSpider.middlewares.trans.TokenPropertyMiddleware

PreviousOverviewNextCollect by transaction hash

Last updated 11 months ago