fix(datasets): correct erc20/erc721 transfer collection bugs#250
Open
AuburyEssentian wants to merge 1 commit intoparadigmxyz:mainfrom
Open
fix(datasets): correct erc20/erc721 transfer collection bugs#250AuburyEssentian wants to merge 1 commit intoparadigmxyz:mainfrom
AuburyEssentian wants to merge 1 commit intoparadigmxyz:mainfrom
Conversation
Two related bugs in transfer dataset collection: 1. erc20_transfers: is_erc20_transfer() in CollectByTransaction path checks ERC20::Approval::SIGNATURE_HASH instead of ERC20::Transfer::SIGNATURE_HASH, causing collect_by_transaction to return Approval events instead of Transfer events. CollectByBlock already had the correct signature on line 62. Fixes paradigmxyz#231. 2. erc721_transfers: the contract address field is named 'erc20' throughout (struct field, default_columns entry, store! macro), emitting a column named 'erc20' in ERC-721 transfer output. Renamed to 'erc721'. Fixes paradigmxyz#230.
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.
Two small bugs in transfer datasets, both filed by @ChadRosseau:
Fix 1: erc20_transfers — wrong signature hash in CollectByTransaction (#231)
is_erc20_transfer()in theCollectByTransactionpath checksERC20::Approval::SIGNATURE_HASHinstead ofERC20::Transfer::SIGNATURE_HASH. This causescollect_by_transactionto silently return Approval events instead of Transfer events.CollectByBlockalready used the correct signature (line 62) — only the transaction path was broken.Fixes #231.
Fix 2: erc721_transfers — contract address column named 'erc20' (#230)
The contract address field in
Erc721Transfersis namederc20throughout: the struct field, thedefault_columnsentry, and thestore!macro. This emits a column namederc20in ERC-721 transfer output, which is confusing and incorrect. Renamed toerc721.Fixes #230.