Skip to content
/ MoTS Public

Know Your Transactions: Real-time and Generic Transaction Semantic Representation on Blockchain & Web3 Ecosystem

Notifications You must be signed in to change notification settings

wuzhy1ng/MoTS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: Mots are merged into BlockchainSpider, see our documentation.

MoTS

A basic implementation of "Know Your Transactions: Real-time and Generic Transaction Semantic Representation on Blockchain & Web3 Ecosystem".

Installation

Use pip install to install dependency:

pip install -r requiremets.txt

Quickly start

  1. transaction data acquisition

Use blocks.eth to collect transactions from RPC interfaces e.g.

scrapy crawl blocks.eth -a start_blk=10000000 -a end_blk=11000000 -a types=external,internal,erc20,erc721,erc1155
  • start_blk: the start block for collecting transactions
  • end_blk: the end block for collecting transactions. if this option is not set, the data of the latest block will be continuously collected.
  • types: the collected transactions types. external denotes external transactions, internal denotes internal transactions, erc20 denotes ERC20 token transfers, erc721 denotes ERC721 token transfers, and erc1155 denotes ERC1155 token transfers
  1. transaction semantics extraction

Use blocks.semantic.eth to collect transaction data and transaction semantic vectors from RPC interfaces e.g.

scrapy crawl blocks.semantic.eth -a start_blk=10000000 -a end_blk=11000000 -a types=external,internal,erc20,erc721,erc1155
  • start_blk: the start block for collecting transactions
  • end_blk: the end block for collecting transactions. if this option is not set, the data of the latest block will be continuously collected.
  • types: the collected transactions types that would be used to compute semantic vectors. external denotes external transactions, internal denotes internal transactions, erc20 denotes ERC20 token transfers, erc721 denotes ERC721 token transfers, and erc1155 denotes ERC1155 token transfers
  1. crawl transaction semantics labels

Use labels.action to collect transaction semantics labels from Etherscan e.g.

scrapy crawl labels.action -a start_blk=10000000 -a end_blk=11000000
  • start_blk: the start block for collecting transactions
  • end_blk: the end block for collecting transactions.

Settings

  1. Currency see CONCURRENT_REQUESTS in settings.py.

  2. APIKey and RPC interfaces URL see APIKEYS and PROVIDERS in settings.py

Storage

All collected can be found ./data.

About

Know Your Transactions: Real-time and Generic Transaction Semantic Representation on Blockchain & Web3 Ecosystem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages