MoTS
February 20, 2024 ยท View on GitHub
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
- 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.
externaldenotes external transactions,internaldenotes internal transactions,erc20denotes ERC20 token transfers,erc721denotes ERC721 token transfers, anderc1155denotes ERC1155 token transfers
- 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.
externaldenotes external transactions,internaldenotes internal transactions,erc20denotes ERC20 token transfers,erc721denotes ERC721 token transfers, anderc1155denotes ERC1155 token transfers
- 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
-
Currency see
CONCURRENT_REQUESTSinsettings.py. -
APIKey and RPC interfaces URL see
APIKEYSandPROVIDERSinsettings.py
Storage
All collected can be found ./data.