Skip to content

Add Vara mainnet faucet MVP - #2595

Open
MedovTimur wants to merge 8 commits into
mainfrom
mainnet-faucet-mvp
Open

Add Vara mainnet faucet MVP#2595
MedovTimur wants to merge 8 commits into
mainfrom
mainnet-faucet-mvp

Conversation

@MedovTimur

Copy link
Copy Markdown

Summary

Adds a guarded Vara mainnet faucet flow to IDEA:

  • public challenge/claim/status API with one-time wallet, device, network, and global faucet limits
  • payout worker that sends finalized transferKeepAlive payouts and moves uncertain outcomes to reconciliation
  • admin reconciliation, metrics, alerts, and lifecycle cleanup for expired/rejected/audit data
  • IDEA balance dropdown button for mainnet users, matching the existing testnet balance flow

Flow

  1. The connected wallet requests a challenge.
  2. The wallet signs the challenge and optionally completes Turnstile verification.
  3. The backend validates eligibility and queues an approved claim.
  4. The worker sends the payout from the configured mainnet faucet hot wallet.
  5. The frontend polls claim status and shows user-friendly messages for limit, verification, and capacity failures.

Validation

  • yarn build:gear-idea-faucet
  • yarn workspace gear-idea-frontend build
  • yarn workspace gear-idea-faucet test:coverage (100%)
  • git diff --check

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

children: ReactNode;
};

function VerificationOverlay({ isVisible, children }: VerificationOverlayProps) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

VerificationOverlay is copied from GetTestBalance instead of being extracted to a shared faucet helper. Please dedupe rather than maintaining two near-identical portal overlays and importing styles from get-test-balance.module.scss.

You can create separate component in idea\gear\frontend\src\features\balance\ui\verification-overlay

parameters?: object;
};

const fetchMainnetJson = async <T>(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

fetchMainnetJson largely duplicates fetchWithGuard, mainly to pass custom headers (Idempotency-Key). Prefer extending fetchWithGuard (or a thin wrapper) so error parsing stays in one place.

@MedovTimur
MedovTimur requested a review from vraja-nayaka July 23, 2026 12:07
Comment on lines +34 to +40
const activePayoutClaims = claims.filter(({ status }) => activePayoutStatuses.includes(status));
const activePayoutClaims1h = activePayoutClaims.filter(
({ payoutStartedAt }) => payoutStartedAt && payoutStartedAt >= hourAgo,
);
const activePayoutClaims24h = activePayoutClaims.filter(
({ payoutStartedAt }) => payoutStartedAt && payoutStartedAt >= dayAgo,
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe it all can be just the part of the db query

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.

4 participants