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

Token balances ethereum #4640

Merged
merged 34 commits into from
Nov 15, 2023
Merged

Token balances ethereum #4640

merged 34 commits into from
Nov 15, 2023

Conversation

aalan3
Copy link
Contributor

@aalan3 aalan3 commented Oct 20, 2023

This should be considered a beta version of token balances so this is not yet exposed. The tables are split by native and erc20 tokens because doing everything together uses too much memory in Trino, these are considered intermediary tables and are unioned together in the main table balances_base.

Some notes:

  • Gas fees and block rewards are not in transfers yet so they will not be counted here
  • We have to cast to double before the sum() because there's no way of catching overflows that happen inside of a aggregation at the moment
  • For other bigger chains we likely have to split up the tables to create even more intermediary tables

@aalan3 aalan3 changed the base branch from main to token_transfers October 20, 2023 09:55
@belen-pruvost belen-pruvost force-pushed the token_balances_ethereum branch 2 times, most recently from 65935ee to 4b63c2d Compare October 23, 2023 13:43
@belen-pruvost belen-pruvost force-pushed the token_balances_ethereum branch from 4b63c2d to 04ebaea Compare October 23, 2023 13:45
@belen-pruvost belen-pruvost force-pushed the token_balances_ethereum branch from 8be4f90 to e82a5e7 Compare October 24, 2023 07:52
@aalan3 aalan3 force-pushed the token_balances_ethereum branch from e82a5e7 to 01a6ce4 Compare October 26, 2023 09:40
@jeff-dude jeff-dude added WIP work in progress dune team created by dune team labels Nov 6, 2023
Base automatically changed from token_transfers to main November 7, 2023 16:38
@aalan3 aalan3 force-pushed the token_balances_ethereum branch from 95a735c to e056946 Compare November 8, 2023 12:54
@aalan3 aalan3 requested a review from jeff-dude November 14, 2023 13:40
@aalan3
Copy link
Contributor Author

aalan3 commented Nov 14, 2023

This is ready for reviews but native balances are not correct

@aalan3 aalan3 requested a review from Hosuke November 14, 2023 14:14
@jeff-dude jeff-dude self-assigned this Nov 14, 2023
@jeff-dude jeff-dude added in review Assignee is currently reviewing the PR and removed WIP work in progress labels Nov 14, 2023
@jeff-dude
Copy link
Member

are you good with my commits?

it timed out, as expected. we can still look to merge tomorrow, if you are good with the current state.

@aalan3
Copy link
Contributor Author

aalan3 commented Nov 15, 2023

Yeah thank you! I was going to do transfers in a separate PR but might as well do it here. Tests are also a good idea.

@jeff-dude jeff-dude removed the in review Assignee is currently reviewing the PR label Nov 15, 2023
@jeff-dude jeff-dude merged commit e72591b into main Nov 15, 2023
1 of 2 checks passed
@jeff-dude jeff-dude deleted the token_balances_ethereum branch November 15, 2023 13:33
@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 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.

3 participants