-
Notifications
You must be signed in to change notification settings - Fork 17
db: add token_balances (RLS, trigger) + backfill #2004
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
base: docs_add_hodler_verification_plan
Are you sure you want to change the base?
db: add token_balances (RLS, trigger) + backfill #2004
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
06ea370 to
401915c
Compare
871cfb2 to
36abf87
Compare
36abf87 to
c509af8
Compare
401915c to
1a13ada
Compare
c509af8 to
4c24cdd
Compare
|
Vercel Unique URL: https://sendapp-beqsfufrd-0xsend.vercel.app |
Why: - Optimize for speed and a single source of truth. The DB trigger on send_token_transfers already upserts token_balances and inserts/updates send_token_hodler DV when balance exceeds hodler_min_balance. - Remove app-layer DV upsert path to avoid duplicate writes and race conditions. - Backfill migration now uses only send_token_transfers (no native receives). Test plan: - yarn workspace @my/supabase reset - yarn workspace @my/supabase generate - yarn lint - SQL: supabase/tests/distribution_send_token_hodler_test.sql (inserts a SEND transfer → verifies token_balances and DV updated)
1a13ada to
47d833e
Compare
4c24cdd to
4644579
Compare

Why:
(exclude internal transfers). Historical backfill aggregates SEND net transfers and ETH deposits.
Test plan: