Git Product home page Git Product logo

mots's Introduction

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.

mots's People

Contributors

wuzhy1ng avatar

Stargazers

 avatar  avatar  avatar Zhijie Liu avatar  avatar Jing (Ethan) Li avatar threadshare avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.