Open
Description
Description
In erc20_transfers.rs
, the is_erc20_transfer
function on line 101 is as follows:
fn is_erc20_transfer(log: &Log) -> bool {
log.topics().len() == 3 &&
log.data().data.len() == 32 &&
log.topics()[0] == ERC20::Approval::SIGNATURE_HASH
}
Note that it checks for an Approval
log signature hash instead of a Transfer
signature hash. Since this function is used in CollectByTransaction
, it will incorrectly collect Approval logs instead of Transfer logs.
Line 104 should instead be as follows, which mirrors the check on line 62 for CollectByBlock
:
log.topics()[0] == ERC20::Transfer::SIGNATURE_HASH