Skip to content

fix: erc721_transfers contract column name and erc20_transfers transfer signature#252

Open
AuburyEssentian wants to merge 1 commit intoparadigmxyz:mainfrom
AuburyEssentian:fix/erc721-column-name-and-erc20-transfer-signature
Open

fix: erc721_transfers contract column name and erc20_transfers transfer signature#252
AuburyEssentian wants to merge 1 commit intoparadigmxyz:mainfrom
AuburyEssentian:fix/erc721-column-name-and-erc20-transfer-signature

Conversation

@AuburyEssentian
Copy link
Copy Markdown

Fixes two bugs reported in #230 and #231 (both by @ChadRosseau).

Fix 1: erc721_transfers incorrect contract column name (#230)

The erc721_transfers dataset had the contract address field named erc20 instead of erc721, resulting in the output column being named erc20_contract_address across both CLI and Python bindings.

Changed the struct field name, default column entry, and store! call from erc20erc721.

Fix 2: erc20_transfers collect_by_transaction uses wrong event signature (#231)

is_erc20_transfer() (used in CollectByTransaction) was checking for ERC20::Approval::SIGNATURE_HASH instead of ERC20::Transfer::SIGNATURE_HASH, causing it to collect Approval events instead of Transfer events.

Fixed to match the CollectByBlock path which correctly uses ERC20::Transfer::SIGNATURE_HASH.

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant