Skip to content

[P5-9] Zap Frontend Integration #30

@realproject7

Description

@realproject7

Context

§4.5 — the frontend needs a zap helper that estimates costs and executes the multi-hop buy. Follow the MintPad pattern (mintpad/src/helpers/zap.ts and hunt.town-ai agent-skills).

Revised Approach (2026-03-22)

Unblocked by using PL_TEST token instead of waiting for $PLOT:

  1. Zap contract: Fork ZapUniV4MCV2.sol, make target token owner-updatable (onlyOwner setter) instead of immutable. Deploy with PL_TEST address.
  2. Frontend integration: Build and test against PL_TEST + test Uniswap pool.
  3. Production cutover: When $PLOT launches, call setPlotToken() on Zap contract — no redeploy needed. Update constants.

Sub-tickets (all T3)

  • P5-8a: Create Uniswap pool (PL_TEST/WETH) on Base Sepolia using deployer wallet. Seed with small liquidity (~100 PL_TEST + ~0.005 ETH).
  • P5-8b: Zap contract — fork ZapUniV4MCV2.sol with owner-updatable plot token address. Deploy to Base Sepolia with PL_TEST address. (plotlink-contracts repo)
  • P5-8c: Update lib/contracts/constants.ts with Uniswap pool + Zap contract addresses.
  • OPERATOR GATE — T1 adds Zap contract address to .env.local
  • P5-9a: Create lib/zap.tsgetZapQuote() and executeZapMint() functions. Apply slippage buffer (default 0.5%).
  • P5-9b: Add input token selector to trading widget — let readers choose ETH, USDC, HUNT, or $PLOT. Route through Zap for non-$PLOT inputs, direct MCV2 for $PLOT.

Deployer Wallet Balance (Base Sepolia)

  • 0.0275 ETH
  • 1816.345 PL_TEST

Note

MCV2_BondPeriphery (0x20fBC8a650d75e4C2Dab8b7e85C27135f0D64e89 on Base Sepolia) provides exact-input routing for MCV2_Bond.mint(). The Zap integration should leverage BondPeriphery for computing multi-hop swap amounts.

Proposal Reference

§4.5 (Frontend Integration)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions