fix: correct erc721_transfers column name and erc20_transfers signature hash#257
Open
dylantirandaz wants to merge 1 commit intoparadigmxyz:mainfrom
Open
fix: correct erc721_transfers column name and erc20_transfers signature hash#257dylantirandaz wants to merge 1 commit intoparadigmxyz:mainfrom
dylantirandaz wants to merge 1 commit intoparadigmxyz:mainfrom
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Two bugs in the ERC transfer datasets:
erc721_transfers (erc721_transfers has incorrect contract address column name #230): The contract address column is incorrectly named
erc20instead oferc721. This produces misleading output in both CLI and Python bindings.erc20_transfers (erc20_transfers collect_by_transaction uses Approval signature instead of Transfer signature #231): The
is_erc20_transferfilter function (used byCollectByTransaction) checks againstERC20::Approval::SIGNATURE_HASHinstead ofERC20::Transfer::SIGNATURE_HASH, causing it to match Approval events rather than Transfer events.Solution
store!reference fromerc20toerc721inerc721_transfers.rsERC20::Approval::SIGNATURE_HASHtoERC20::Transfer::SIGNATURE_HASHin theis_erc20_transferfunction inerc20_transfers.rs, aligning it with theCollectByBlockimplementation on line 62Fixes #230, Fixes #231
PR Checklist