fix: erc721_transfers contract column name and erc20_transfers transfer signature#252
Open
AuburyEssentian wants to merge 1 commit intoparadigmxyz:mainfrom
Conversation
…er signature Two related bugs: 1. erc721_transfers struct had field named 'erc20' instead of 'erc721', causing the contract address column to be output as 'erc20_contract_address' instead of 'erc721_contract_address'. Fixed field name, default column name, and store! call. 2. erc20_transfers is_erc20_transfer() checked for ERC20::Approval::SIGNATURE_HASH instead of ERC20::Transfer::SIGNATURE_HASH, causing collect_by_transaction to collect Approval events instead of Transfer events. Fixed to match the CollectByBlock path on line 62. 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.
Fixes two bugs reported in #230 and #231 (both by @ChadRosseau).
Fix 1: erc721_transfers incorrect contract column name (#230)
The
erc721_transfersdataset had the contract address field namederc20instead oferc721, resulting in the output column being namederc20_contract_addressacross both CLI and Python bindings.Changed the struct field name, default column entry, and
store!call fromerc20→erc721.Fix 2: erc20_transfers collect_by_transaction uses wrong event signature (#231)
is_erc20_transfer()(used inCollectByTransaction) was checking forERC20::Approval::SIGNATURE_HASHinstead ofERC20::Transfer::SIGNATURE_HASH, causing it to collect Approval events instead of Transfer events.Fixed to match the
CollectByBlockpath which correctly usesERC20::Transfer::SIGNATURE_HASH.