Skip to content

fix(datasets): correct erc20/erc721 transfer collection bugs#250

Open
AuburyEssentian wants to merge 1 commit intoparadigmxyz:mainfrom
AuburyEssentian:fix/erc20-erc721-dataset-bugs
Open

fix(datasets): correct erc20/erc721 transfer collection bugs#250
AuburyEssentian wants to merge 1 commit intoparadigmxyz:mainfrom
AuburyEssentian:fix/erc20-erc721-dataset-bugs

Conversation

@AuburyEssentian
Copy link
Copy Markdown

Two small bugs in transfer datasets, both filed by @ChadRosseau:

Fix 1: erc20_transfers — wrong signature hash in CollectByTransaction (#231)

is_erc20_transfer() in the CollectByTransaction path checks ERC20::Approval::SIGNATURE_HASH instead of ERC20::Transfer::SIGNATURE_HASH. This causes collect_by_transaction to silently return Approval events instead of Transfer events.

CollectByBlock already 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 Erc721Transfers is named erc20 throughout: the struct field, the default_columns entry, and the store! macro. This emits a column named erc20 in ERC-721 transfer output, which is confusing and incorrect. Renamed to erc721.

Fixes #230.

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.
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