Skip to content
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

Closed
wants to merge 10 commits into from
Closed

Erc20 transfers macro #4522

wants to merge 10 commits into from

Conversation

aalan3
Copy link
Contributor

@aalan3 aalan3 commented Oct 4, 2023

This PR is part of #4521.

I've updated the following:

  • Uses the incremental_predicate macro
  • amount_raw is no longer converted to double - it should be uint256
  • Updated Polygon to comply

@aalan3 aalan3 mentioned this pull request Oct 4, 2023
6 tasks
@henrystats
Copy link
Contributor

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

@aalan3
Copy link
Contributor Author

aalan3 commented Oct 5, 2023

@henrystats have a look at the current version, this is now using try_cast to get to int256.

@henrystats
Copy link
Contributor

awesome, looks good to me!

@jeff-dude jeff-dude added dune team created by dune team balances labels Oct 9, 2023
contract_address as token_address,
CAST(value as double) as amount_raw
FROM
try_cast(value as int256) as amount_raw
Copy link

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)

@jeff-dude
Copy link
Member

(assuming this is old, in favor of #4633, closing this now)

@jeff-dude jeff-dude closed this Nov 6, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
balances dune team created by dune team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants