tx-categorize is a tool to parse & auto-categorize Ethereum transactions based on some schema-defined traits.
You feed in a tx history data structure that roughly conforms to Etherscan's transaction history endpoint's data structure and an array of transaction type schema objects found here to categorize the transaction by applying each schema object to the transaction to determine which schemas fit, then selects the schema object with the highest priority.
This transaction will categorize the transaction types to be a UNISWAP_V2_EXCHANGE
transaction, a 1INCH_V3_EXCHANGE
transaction and an ERC_20_TRANSFER
transaction, but will select the 1INCH_V3_EXCHANGE
tx type because of it's higher priority.
A schema applied to a transaction can be validated based off of simple things like the from
address of a tx is a specific address (as is the case with mining pool payout transactions or some exchange withdraws), or containing a specific log topic
or methodID
The cli tool is used to improve the processes of adding / updating / monitoring schemas and their test configs.
- Add commands:
-
- Generate schema template
-
- Generate tests from schemaid and tx hash
-
- List all unique schema types
-
- Run a test attempt of categorizing a tx
-
- Validate a schema
-
- Create schemas based on subgraphs (optional)
- Create build ci to auto-update the s3 storage of schemas
- Write documentation on tx-categorize process and schema outline
Schema applied to a transaction can be validated based off simple things like the from address of a tx is a specific address (as is the case with mining pool payout transactions or some exchange withdraws), or containing a specific log topic or methodID