Skip to content

EVM-first frontend v2 — full game loop against deployed contracts#58

Merged
heyradcode merged 55 commits into
mainfrom
feat/frontend-v2-evm
Jun 19, 2026
Merged

EVM-first frontend v2 — full game loop against deployed contracts#58
heyradcode merged 55 commits into
mainfrom
feat/frontend-v2-evm

Conversation

@cdsaidev

@cdsaidev cdsaidev commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the complete EVM/Ethereum frontend against the deployed v2 contracts,
covering the full game loop: pet creation, training, levelling, breeding, marriage,
and battle — all wired to on-chain interactions via Pyth Entropy async flows.

Core game flows

  • Pet creation: requestMintStarter on GameLogic + Pyth Entropy async settle; gates Create button until entropy fee loads
  • Breeding: Two-tab UI (My Pets / With Spouse); cross-owner breed via marriage; blocks breeding between related pets; Entropy async settle with fulfillment watcher
  • Marriage: Full propose/accept/cancel/divorce cycle; PetSearchDropdown for partner search; incoming proposals inbox with confirm modal; sent proposals list with per-pet cancel
  • Battle: Real battle records and per-action cooldowns; pre-fight win probability from indexer combat sim; Entropy fulfillment watcher replacing Chainlink VRF
  • Sign-in gate: Requires wallet sign-in before accessing the game; JWT validity check; restores session on refresh without flash

Infrastructure

  • useWatchEntropyFulfillment replaces the old Chainlink VRF watcher across battle and breed flows
  • useSearchPets + PetSearchDropdown: portal-based autocomplete that escapes overflow clipping
  • useIncomingProposals: batch-reads on-chain marriage proposals for the user's pets
  • useAllPets / useWinEstimate: indexer-backed hooks for opponent lookup and combat sim
  • active-networks.json controls deployment targets; defaults to Base Sepolia
  • All EVM reads pinned to the configured chain via chainId; wagmi cache invalidated after writes
  • Entropy fee read via getFeeV2() directly; added to requestBattle and requestCreateFromDNA payable values

Test plan

  • Create a pet on EVM (Base Sepolia) — confirm Entropy async flow, pet appears after settle
  • Train / level up / rename a pet
  • Breed two own pets — confirm related-pet block, success message, gallery refresh
  • Send a marriage proposal, accept from second wallet, breed cross-owner
  • Start a battle, verify win probability shown, result appears after Entropy settle
  • Sign out and verify sign-in gate; refresh and verify session restored without flash
  • Confirm all CI checks pass (coverage + deployment jobs)

cdsaidev added 30 commits June 17, 2026 22:54
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
do-not-stop-frontend Ready Ready Preview, Comment Jun 19, 2026 3:01pm
do-not-stop-website Ready Ready Preview, Comment Jun 19, 2026 3:01pm

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

🧪 Coverage

Package Statements Branches Functions Lines Overall
backend 78.92% (573/726) 73.84% (288/390) 82.27% (130/158) 79.84% (531/665) 78.49% (1522/1939)
frontend 65.57% (1025/1563) 58.62% (802/1368) 65.61% (250/381) 65.95% (928/1407) 63.68% (3005/4719)
shared 54.26% (979/1804) 56.94% (631/1108) 57.02% (203/356) 56.81% (913/1607) 55.92% (2726/4875)

@heyradcode heyradcode left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@cdsaidev great job!
Can we remove L1 networks to get rid of confusion.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can we make this per-action gate rather than frontmost gate?
because the NFT data is public blockchain data anyway, forcing a signature before showing it usually doesn't add much security.

@heyradcode heyradcode merged commit ff5442b into main Jun 19, 2026
4 checks passed
@heyradcode heyradcode deleted the feat/frontend-v2-evm branch June 19, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants