Skip to content

[#914] Add missing pl_airdrop_proofs table#918

Merged
realproject7 merged 1 commit intomainfrom
task/914-airdrop-proofs-table
Apr 21, 2026
Merged

[#914] Add missing pl_airdrop_proofs table#918
realproject7 merged 1 commit intomainfrom
task/914-airdrop-proofs-table

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Creates migration 00036_airdrop_proofs.sql with pl_airdrop_proofs table (address PK, amount, proof, merkle_root, timestamps)
  • Adds TypeScript types for the new table in Database interface and PlAirdropProof alias
  • Removes as never type assertions from proof and results API routes now that types are defined
  • Bumps patch version to 0.1.28

Fixes #914

Test plan

  • Run migration against Supabase (local or staging)
  • Verify finalize script can upsert proofs into pl_airdrop_proofs
  • Verify GET /api/airdrop/proof?address=0x... returns proof data
  • Verify GET /api/airdrop/results returns finalized campaign stats
  • Confirm no new TypeScript errors introduced (npm run typecheck)

🤖 Generated with Claude Code

- Create migration 00036 with pl_airdrop_proofs table (address PK, amount, proof, merkle_root)
- Add TypeScript types for pl_airdrop_proofs in Database interface
- Remove `as never` assertions from proof and results API routes
- Bump patch version to 0.1.28

Fixes #914

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Apr 21, 2026 9:38am

Request Review

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

This PR adds the missing pl_airdrop_proofs migration and aligns the typed Supabase queries with the new schema. The change is narrow and matches issue #914's acceptance criteria.

Findings

  • None.

Decision

Approve. I did not find a correctness or design issue in the submitted diff. CI checks were still pending at review time, so runtime verification remains with the normal check pipeline.

@realproject7
Copy link
Copy Markdown
Owner Author

re2 Review — APPROVED ✅

Reviewed:

  • 00036_airdrop_proofs.sql: table schema is correct (address PK, TEXT columns for bigint precision, timestamps with defaults)
  • lib/supabase.ts: Database interface + PlAirdropProof alias match the migration
  • proof/route.ts and results/route.ts: as never casts cleanly removed, Supabase client now infers types properly
  • Finalize script (scripts/airdrop-finalize.ts) already references the table without casts — will now get correct type checking for free
  • Patch bump 0.1.28 ✓

CI note: lint failure is pre-existing (useDraft.ts setState-in-effect) — not introduced by this PR.

No RLS needed — consistent with other pl_ tables and access is server-side only via API routes.

@realproject7 realproject7 merged commit ac6d9a6 into main Apr 21, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Airdrop] Missing pl_airdrop_proofs table in migration

2 participants