fix(first-squeezer): default eligibility gate to public testnet RPC#274
Merged
Conversation
The First Squeezer mainnet claim gate reads the historical testnet NFT claim via CITREA_5115_RPC_URL, which in prod points at DFX's local citread node (host.docker.internal:8085) — being decommissioned in the Citrea Testnet sunset. Default to the public testnet RPC in code so the gate keeps working after the node is gone; the env var remains an optional override. The testnet chain lives on public infra and the Oct 2025 claim data is immutable, so reading rpc.testnet.citrea.xyz is durable and correct. (Mainnet's same-address contract is a different contract — can't be used.) Lets the server-repo CITREA_5115_RPC_URL env lines be removed later as a safe no-op.
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.
What
The First Squeezer mainnet claim gate checks the wallet's historical testnet NFT claim via
hasClaimedTestnetNFT, readingCITREA_5115_RPC_URL. In prod that env points at DFX's localcitreadnode (host.docker.internal:8085), which is being decommissioned in the Citrea Testnet sunset — so the gate would break (fail closed → nobody eligible).This defaults the gate's RPC to the public testnet RPC in code; the env var stays as an optional override:
Why the public testnet RPC (and not mainnet)
rpc.testnet.citrea.xyz, chainId0x13fb/5115) after DFX's node dies, and the Oct 2025 claim data is immutable → durable + correct.0x428B…has code there andhasClaimed(...)responds.campaigns.ts), soCITREA_4114_RPC_URLcan't be used — it wouldn't reflect testnet claims.Fail-closed behavior is preserved (RPC/contract errors still throw → callers reject the claim).
Follow-up (separate, later)
Once this is on prod, the server-repo
CITREA_5115_RPC_URLlines forjsw-api/jsw-ponderbecome removable as a safe no-op (jsw-ponder's is already dead; jsw-api's is now covered by this code default).Checks (local)
tsc --noEmit✅prettier --check✅jest✅ (103 passed, 3 skipped)