-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Erc20 transfers macro #4522
Erc20 transfers macro #4522
Conversation
@aalan3 it's casted to double because uint256 can't be negative, I think you'd have to cast to INT256? Which I think wasn't working as well but id on't remember why.. |
@henrystats have a look at the current version, this is now using |
awesome, looks good to me! |
contract_address as token_address, | ||
CAST(value as double) as amount_raw | ||
FROM | ||
try_cast(value as int256) as amount_raw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that this would produce some data loss on some potentially relevant pieces of data. Are we confident these are not relevant cases?
For example, a treasury address receiving more than half the token supply of a token which total supply is 2^256-1
would be filtered out by the try_cast
here.
See my comment there: #4521 (comment)
(assuming this is old, in favor of #4633, closing this now) |
This PR is part of #4521.
I've updated the following:
incremental_predicate
macroamount_raw
is no longer converted to double - it should beuint256