Skip to content

fix: correct erc721_transfers column name and erc20_transfers signature hash#257

Open
dylantirandaz wants to merge 1 commit intoparadigmxyz:mainfrom
dylantirandaz:fix/erc-transfer-bugs
Open

fix: correct erc721_transfers column name and erc20_transfers signature hash#257
dylantirandaz wants to merge 1 commit intoparadigmxyz:mainfrom
dylantirandaz:fix/erc-transfer-bugs

Conversation

@dylantirandaz
Copy link
Copy Markdown

Motivation

Two bugs in the ERC transfer datasets:

  1. erc721_transfers (erc721_transfers has incorrect contract address column name #230): The contract address column is incorrectly named erc20 instead of erc721. This produces misleading output in both CLI and Python bindings.

  2. erc20_transfers (erc20_transfers collect_by_transaction uses Approval signature instead of Transfer signature #231): The is_erc20_transfer filter function (used by CollectByTransaction) checks against ERC20::Approval::SIGNATURE_HASH instead of ERC20::Transfer::SIGNATURE_HASH, causing it to match Approval events rather than Transfer events.

Solution

  • Renamed the struct field, default column name, and store! reference from erc20 to erc721 in erc721_transfers.rs
  • Changed ERC20::Approval::SIGNATURE_HASH to ERC20::Transfer::SIGNATURE_HASH in the is_erc20_transfer function in erc20_transfers.rs, aligning it with the CollectByBlock implementation on line 62

Fixes #230, Fixes #231

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

…re hash

In erc721_transfers.rs, the contract address column was incorrectly
named "erc20" instead of "erc721". This affected the struct field,
default_columns(), and the store! macro call in process_erc721_transfers.

In erc20_transfers.rs, the is_erc20_transfer filter function used
ERC20::Approval::SIGNATURE_HASH instead of ERC20::Transfer::SIGNATURE_HASH,
causing CollectByTransaction to match Approval events rather than
Transfer events.

Fixes paradigmxyz#230, Fixes paradigmxyz#231
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant