Skip to content

fix(first-squeezer): default eligibility gate to public testnet RPC#274

Merged
Danswar merged 1 commit into
developfrom
fix/first-squeezer-gate-public-rpc
Jul 6, 2026
Merged

fix(first-squeezer): default eligibility gate to public testnet RPC#274
Danswar merged 1 commit into
developfrom
fix/first-squeezer-gate-public-rpc

Conversation

@Danswar

@Danswar Danswar commented Jul 6, 2026

Copy link
Copy Markdown

What

The First Squeezer mainnet claim gate checks the wallet's historical testnet NFT claim via hasClaimedTestnetNFT, reading CITREA_5115_RPC_URL. In prod that env points at DFX's local citread node (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:

const rpcUrl = process.env.CITREA_5115_RPC_URL || "https://rpc.testnet.citrea.xyz"

Why the public testnet RPC (and not mainnet)

  • The testnet chain lives on public infra (rpc.testnet.citrea.xyz, chainId 0x13fb/5115) after DFX's node dies, and the Oct 2025 claim data is immutable → durable + correct.
  • Verified on-chain: the contract 0x428B… has code there and hasClaimed(...) responds.
  • ⚠️ The same address on mainnet is a different contract (different bytecode — the deployment-nonce coincidence noted in campaigns.ts), so CITREA_4114_RPC_URL can'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_URL lines for jsw-api/jsw-ponder become 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)

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.
@Danswar
Danswar merged commit 77d6ad8 into develop Jul 6, 2026
7 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.

1 participant