feat(scripts): migration-candidates CSV for upgrader.co deposit list#97
Open
r4topunk wants to merge 3 commits into
Open
feat(scripts): migration-candidates CSV for upgrader.co deposit list#97r4topunk wants to merge 3 commits into
r4topunk wants to merge 3 commits into
Conversation
Walk the Gnars-backed pool graph (1 hop from GNARS, 1 hop from each member
creator coin) and emit a ranked migration deposit list. Adds ~676 lines to
scripts/export-creator-liquidity.ts.
What's new:
- New stage: gecko `/tokens/{seed}/pools` enumeration for GNARS + every
member-created coin (cached per seed under output/cache/gecko-backed-pools).
- New stage: Zora `getCoin` for downstream content coins discovered via the
pool walk so we get symbol/creator/holders for non-member coins.
- buildMigrationCandidates() tags each coin with a backing tier:
tier_1_gnars, tier_2_member_creator_coin, tier_3_paired_with_gnars,
tier_4_paired_with_member_creator, skip
and a recommended_action (must/should/consider/skip) by TVL + holders.
- New `migration-candidates-{stamp}.csv` ranked list ready for upgrader.co.
- creators CSV now surfaces creator_coin_address/symbol/tvl + total holders
across coins (airdrop scope sizing).
- fetchAllMembers cross-checks dao.ownerCount and discards/refetches when the
cached member count looks truncated (prevents the "only 14 of 1011 members"
bug we hit on the prior run).
- Constants: rename GNARS_CREATOR_COIN -> GNARS_ZORA_TOKEN with alias; add
ZORA/USDC/WETH root tokens used to identify creator coins.
- Docs note that NEXT_PUBLIC_TOKEN_ADDRESS in .env.local can override the DAO;
pass it inline when running this script.
Verified with LIMIT=20 against the real Gnars subgraph: 1011 members fetched,
3 must_include + 3 should_include + 10 consider candidates emitted, t1=1
t2=2 t3=18 t4=0. Migration CSV schema matches kompreni's upgrader.co list
shape.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
… creators The previous strict `creatorAddr !== m.owner` filter dropped 30+ DAO members whose Zora deployer wallet differs from their DAO holder address. Notable miss: gami (DAO holder 0x387a..., Zora deployer 0x347c...) had all 82 of her coins dropped — including her ether/gami creator coins with $79k+ TVL across 982 holders. Fix: - buildCoinRows now uses `m.owner` as the canonical creator (DAO membership is the signal we care about) and surfaces the actual on-chain deployer in a new `deployer_address` column on the coins CSV. - buildMigrationCandidates adds a coin->member reverse map from the profileMap so member-attribution falls back to "this coin appeared on member X's Zora profile" when the on-chain deployer isn't a holder. - Renamed the leftover `GNARS_CREATOR_COIN` references to `GNARS_ZORA_TOKEN` for consistency. Verified by rerunning against the full Gnars subgraph (1011 holders): - creators with coins: 4 -> 35 - coin rows: 13 -> 620 - migration candidates by tier: t1=1, t2=2->26, t3=18, t4=0 - migration recs: must=3->27, should=3, consider=10 - gami appears at rank 3 (must_include, $79k TVL, 982 holders) Known limitation: when a member's profile lookup misses their canonical creator coin (because the coin was deployed by a linked wallet not queried), our heuristic picks the WETH/USDC-paired coin instead. The proper fix is to capture `profile.creatorCoin.address` from the Zora SDK response — left for a follow-up since the current output is already useful and correct on member-attribution. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Some creators we want in the migration list (skatehacker/sktbrd.eth, linked wallets of existing members, ex-holders, governance contributors) don't currently hold the Gnars DAO NFT, so they're invisible to the holders-based member walk. Add an env-driven allow-list so operators can include arbitrary wallets without touching code. Usage: EXTRA_MEMBERS="0x41cb…,0xdf42…,0x1c89…" pnpm tsx scripts/export-creator-liquidity.ts Behavior: - Parsed as comma/whitespace-separated address list, deduped against existing DAO holders, appended with daoTokenCount=0. - Rest of the pipeline (profileCoins, gecko pools, backed-pool walk, Zora metadata, ENS/Farcaster enrichment, migration ranking) treats them identically to real members. Verified by rerunning with skatehacker's three Zora-linked wallets: - creators with coins: 35 -> 38 - coin rows: 620 -> 761 - must_include: 27 -> 28 - total TVL: $237k -> $315k - skatehacker creator coin (0x774e…6d04) now appears at rank 49 with $1,921 best-pool TVL, $6,088 across 12 pools, 138 holders Known limitation: the heuristic for picking a member's "canonical" creator coin still grabs the first root-paired coin (WETH/USDC/ZORA), which can mis-tag the canonical Zora creator coin as skip. The proper fix is to capture `profile.creatorCoin.address` from the Zora SDK response and use that authoritatively. Tracked for a follow-up. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
backing_tier(gnars / member-creator / paired-with-gnars / paired-with-member-creator / skip) and arecommended_action(must / should / consider / skip) by TVL and holders.fetchAllMembersnow cross-checksdao.ownerCountand refetches when the cache looks truncated.Changes
scripts/export-creator-liquidity.ts/tokens/{seed}/poolsenumeration for GNARS + every member-created coin (cached per seed underoutput/cache/gecko-backed-pools).getCoinfor downstream content coins (caches underoutput/cache/zora-coins).buildMigrationCandidates+ new CSV writer producingmigration-candidates-{stamp}.csv.creator_coin_address/symbol/tvl_usdandtotal_holders_across_coins(airdrop scope).GNARS_CREATOR_COIN→GNARS_ZORA_TOKEN(alias kept for back-compat), added ZORA/USDC/WETH root-token constants used to identify creator coins.NEXT_PUBLIC_TOKEN_ADDRESSin.env.localcan shadow the DAO — pass it inline when running this script.Test plan
tscwith bundler resolution — clean.LIMIT=20: 1011 members fetched, 4 creators in top-20 holders, 127 unique created coins, 20 downstream content coins enriched, 13 ENS resolved,migration-candidatesCSV schema verified (rank, backing_tier, recommended_action, coin_, creator_, backing_token_, best_pool_, total_tvl_all_pools_usd, holders_count, …).LIMITonce Gecko paid tier or longer wall-clock is acceptable.Operator notes
Run with explicit DAO address override (mandatory if
.env.localpoints elsewhere):Caches under
output/cache/; rerun resumes. To force-refresh one stage, delete the matching folder.Generated with Claude Code