Skip to content

Pull one - #37

Open
tylermalin wants to merge 90 commits into
hex-explorerfrom
main
Open

tylermalin wants to merge 90 commits into
hex-explorerfrom
main

Conversation

@tylermalin

Copy link
Copy Markdown
Owner

Description

Checklist

Please verify the following before submitting your PR:

  • Tests Passing: All unit and integration tests are passing successfully.
  • Invariants Updated: Any changes to state logic or contract invariants have been fully documented in docs/audit/invariants.md.
  • Audit Impact Assessed: Considered security implications and audit checks for multi-chain functions, layer interfaces, and signed-data integrity.
  • Docs Updated: The README.md and relevant documentation inside docs/ have been updated to reflect these changes.

Additional Context

@vercel

vercel Bot commented May 23, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
malamalaunch Ready Ready Preview Sep 9, 2026 6:14pm UTC

tylermalin and others added 15 commits June 7, 2026 11:51
Implements the missing payout loop for partner referral commissions —
previously "auto-issued in USDC" was copy-only; commissions sat pending forever.

- lib/usdc-payout.ts: viem-based Base USDC sender. Dry-run + Base Sepolia by
  default; never moves real funds until PAYOUT_DRY_RUN=false and PAYOUT_NETWORK=base.
  Address validation (rejects zero/placeholder), hot-wallet balance check.
- kol-registry.ts: add `processing` status + commission lock/release (prevents
  double-send), payout-attempt audit log, listPendingCommissions.
- api/admin/payouts: GET pending grouped by partner w/ wallet validation + hot
  wallet balance; POST executes a batch with per-batch USD cap, balance guard,
  per-commission lock, and full audit record.
- partners-proxy: expose payouts (GET) + run-payouts (POST) behind email-session
  admin auth; records approving admin in the audit.
- admin/partners: Payouts section — mode banner (DRY RUN/LIVE), hot wallet status,
  per-partner Approve & Pay + Pay-all, invalid wallets blocked from payout.
- partner dashboard: render the new `processing` status.
- .env.example: PAYOUT_* vars documented with safety defaults.

Phase 1 of the partner program build. Payout-channel hardening, partner-facing
templates, and social/hashtag tracking follow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace hardcoded Base Sepolia across the runtime mint/transaction layer with
one source of truth: lib/evm-network.ts. Going live = set NEXT_PUBLIC_EVM_NETWORK=base
(+ the mainnet Genesis address). Defaults to base-sepolia so nothing hits
mainnet by accident.

evm-network.ts exposes the active chain, chainId, RPC, USDC token, explorer +
OpenSea URL builders, network label, and wallet_addEthereumChain params.

Refactored off hardcoded sepolia:
- admin-genesis-mint.ts: server card-purchase mint now uses getEvmChain()/RPC
  (was chain: baseSepolia); network-aware misconfig messages.
- GenesisMint.tsx: wallet switch/add-chain (0x14a34 → active), USDC token,
  explorer/OpenSea links, and copy now network-driven.
- MagicProvider.tsx: embedded-wallet chainId/RPC from the switch (was 84532).
- custodial/transfer + session-status: chain + explorer/OpenSea via the switch.
- launch/page.tsx: Magic RPC prop uses getEvmRpcUrl() (was forced sepolia).
- LaunchClient.tsx: explorer/OpenSea/labels via the switch.
- Providers.tsx (wagmi): transports prefer configured RPCs.
- .env.example: NEXT_PUBLIC_EVM_NETWORK + mainnet RPC/contract documented
  (mainnet Genesis 0x93c26c9B9fe702D7944aE62fc54e451d4470F21D).

NOTE: makes the REPO mainnet-ready. The live site currently runs Dom's build via
api.dagwelldev.com, so this is not yet the production path. Owner=Safe means the
card-mint signer needs an authorized minter role (see admin-genesis-mint caveat).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…metadata

- CHECKOUT_TEST_PRICE_CENTS env override (e.g. 100=$1) for whole-env testing;
  clamped to [50, 200000], defaults to real price, logs loudly when active.
- allow_promotion_codes: true so a Stripe coupon ($1999 off → $1) enables
  SELECTIVE live testing without changing the price for real buyers.
- Session metadata now carries unitAmountCents and testCheckout=true when a
  test price is in effect, so test purchases are filterable in Stripe + fulfillment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the unlabeled progress bars with a numbered + labeled stepper
(1 Locate Hex · 2 Crypto or Card · 3 Review · 4 Pay · 5 Reserved) driven by the
existing `step` state: current step highlighted, completed steps checked,
upcoming muted. Labels collapse to numbers on mobile.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… underway

Owned-node status now reads "Hardware Order & Customization Underway" with
"Shipment expected by Dec 31, 2026" (was the misleading "Hardware Shipped /
In Transit - Expected in 6 Months").

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Consolidating onto ready-to-go: bring the permission allowlist (npm/pnpm/
hardhat/aiken/pytest/git read+commit; denies rm -rf, force-push, hard reset)
onto the canonical branch so it's complete in one place.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… spam

The pay handler was gated only by async `loading` state; a rapid re-trigger
before it commits could re-enter and re-POST /api/nft/claim, spamming 409s
(hex already claimed) in the console. Add a synchronous useRef lock so the
pay flow can never run concurrently. The 409 was already handled as a resume
(non-fatal), so this removes the redundant requests + console noise.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add app/favicon.ico (16/32/48 multi-size), app/icon.png, app/apple-icon.png
  generated from the official mark — fixes the /favicon.ico 404 (Next App Router
  auto-serves + links these).
- Add public/logo.svg (brand SVG logo) for in-app use.
- Footer: add "User Docs" → https://docs.malamalabs.com (external) in the
  Documentation column.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… *.png)

These are intentional Next App Router icon assets; the repo's broad *.png ignore
was excluding them. favicon.ico already shipped in the prior commit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Update footer brand tagline to the two-product-line messaging (carbon dMRV +
AI compute monitoring, one signing architecture). Add LinkedIn, YouTube, Medium,
and Twitter/X icon links (currentColor → matches theme, open in new tab).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…olia")

User-facing copy (Step 2, card-pay step, Launch success) hardcodes "Base" rather
than getNetworkLabel(), which renders "Base Sepolia" while the env defaults to
testnet. The actual chain switch stays dynamic via lib/evm-network. The technical
network chip + wallet-switch error keep the accurate label.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Apply form:
- Fix "Tyler Malin" default → "Your name" placeholder.
- Prefill email + Base wallet from the signed-in account; link the application
  to that account (userId) when an email session exists.
- Capture Telegram / LinkedIn / Reddit handles alongside X.

Model: KOLPartner gains telegram, linkedin, reddit, promoMethod, userId (all
persisted via the apply route; registerKOL already spreads input).

Amplify (lib/amplify.ts): channel-specific ready-to-post copy with the partner's
referral link baked in + one-click share intents — X (tweet composer), Reddit
(link-post into r/depin + suggested DePIN subs), LinkedIn (share-offsite),
Telegram (share sheet), Discord (copy/paste).

Approved partner dashboard: new "Amplify — push your link" section rendering all
channels with Share + Copy actions, subreddit chips, and per-sale earnings nudge
to drive organic distribution.

Follow-up (next): admin UI to edit channel messaging/links + view all partner
activity (admin already has stats + 4 templates to build on).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… docs reorg

- Partner dashboard: a 403 (application pending) was set as `data`, then
  data.clicks.toLocaleString() crashed the page. Handle 403/pending explicitly
  with an "Application under review" view; only render the dashboard with a valid
  stats payload (guards toLocaleString/toFixed on undefined).
- Lace connect: enable() was raced against a 12s timeout and the late result
  discarded, so a successful (but slow) sign-in still showed "Lace is still
  starting up — click Connect again." Extend to 60s and recover a late enable()
  resolution (connect + clear the error automatically).
- Footer Documentation: rename "Docs hub" → "Protocol Policy & Documentation"
  and move to top; reorder Whitepaper, Tokenomics, Pricing & Dynamics, Operator
  Guide, User Documentation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Admins can edit the per-channel push copy + campaign hashtag from /admin/partners
  ("Amplify Messaging" editor). Stored in KV (lib/amplify-config.ts, server-only);
  blank fields fall back to built-in defaults.
- buildAmplifyPosts now accepts AmplifyOverrides and derives share URLs from the
  final (possibly edited) text, so X/Telegram composers reflect admin copy.
- /api/partners/me returns the overrides; the partner dashboard applies them — so
  admin edits flow to every partner's Amplify toolkit.
- New /api/admin/amplify (x-admin-secret) + partners-proxy actions amplify-config
  (GET) and set-amplify (POST), behind email-session admin auth.
- Admin activity overview: aggregate cards (partners, active, total clicks,
  conversions, total commissions) computed from the partner list.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Brings the full ready-to-go feature set to main so Vercel can deploy this repo
as a standalone production/backup independent of Dom's server:
payout engine, Base mainnet network switch, cheap-test/promo checkout, presale
stepper, dashboard hardware status, favicon/brand, full partner program
(apply → amplify → admin messaging/activity → payouts), and recent fixes.

Clean merge (no conflicts). The 3 main-only commits were historical
hex-explorer PR-merge bubbles with no unique content.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tylermalin and others added 2 commits June 7, 2026 23:25
The gate redirected /logo-mark.png (and other root public files) to /password,
so the password page's own logo rendered broken. Add a static-asset extension
bypass to isPublicPath so images/PDFs/fonts/css/js serve through the gate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tylermalin and others added 2 commits June 8, 2026 01:34
…RPC)

approve/mint waited via waitForTransactionReceipt with no timeout/recheck, so a
rate-limited public RPC raised a confirmation-timeout even though the tx
succeeded on-chain (observed: approve confirmed on Base Sepolia, UI reported
timeout). Add waitForTx(): generous timeout + a direct getTransactionReceipt
re-check before failing, and a non-alarming message with the explorer link if it
genuinely isn't mined. (Set a dedicated NEXT_PUBLIC_BASE[_SEPOLIA]_RPC_URL to
avoid the rate limits at the source.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tylermalin and others added 2 commits June 8, 2026 02:13
…nfig

- Add @layerzerolabs/lz-evm-protocol-v2 (peer of lz-evm-oapp-v2, imported by
  OAppSender.sol) — was missing from package.json, breaking `hardhat compile`
  (HH411). Project now compiles cleanly (29 files).
- hardhat.config.ts: add `base` mainnet network + etherscan/customChains for
  Blockscout (Base Sepolia + Base mainnet), so contracts verify with one command:
    npx hardhat verify --network baseSepolia <address> <constructorArgs...>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tylermalin and others added 2 commits June 8, 2026 09:20
Top nav now links /data-solutions ("Data", after Explorer).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tylermalin and others added 4 commits June 8, 2026 09:38
…y loop)

When adminMintToAddress threw (502), the issueClaim reservation was left
orphaned, so every retry hit 409 "already reserved." Now the catch releases the
reservation (releaseClaim self-guards: it refuses to release a hex that actually
minted), so a buyer can retry once the underlying mint issue is fixed.

NOTE: the 502 itself is a mint-config issue, not this code — adminMintToAddress
throws when GENESIS_OWNER_PRIVATE_KEY is missing or not authorized to mint on the
configured Genesis contract/network.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…rt check

The 120s waitForTransactionReceipt could exceed the serverless function budget
on the card/Magic mint path → gateway 502 (and the route catch never runs, so
the reservation stranded → 409 loop). Now: confirmed revert still throws; a slow
confirmation returns the txHash (caller persists it + backfills tokenId async).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Every ci.yml run fails at startup (~2s, no steps/logs) because GitHub Actions is
not running jobs on this account. Switched to workflow_dispatch-only so pushes/PRs
stop showing failing checks. Restore the push/pull_request triggers (commented in
the file) once the account's Actions/billing is resolved.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…s account)

workflow_dispatch-only so a develop push no longer fails at startup. Restore the
develop push trigger (commented in the file) once Actions/billing is resolved.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tylermalin and others added 2 commits June 11, 2026 15:24
….com)

- Top nav reduced to 5 primary items: Sensors · Reserve · Explore · Docs · Data Buyers
  (Explore→/explorer, Reserve→/presale, Data Buyers→/data-solutions). Timeline,
  Partners, and Dashboard move to the mobile menu (Dashboard stays auth-gated) and
  the footer already carries Timeline/Partners.
- Added a mobile hamburger + dropdown panel. Previously all links rendered inline
  with no mobile menu, crowding/overlapping the logo on small screens. Desktop links
  now hidden < lg; hamburger toggles a full-width panel listing all destinations.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tylermalin and others added 12 commits September 3, 2026 23:50
- New RegisterInterestForm + POST /api/interest: stores hexinterest:{id} +
  hexinterests set in the shared Upstash DB (name,email,org,country,cells,
  participation,notes,ts,ip_hash,source:launch); Resend confirmation from
  jeffrey@malamalabs.com, reply-to jeffrey@malamaproject.org.
- /presale now renders the interest form (map deep-links /presale?hex= prefill).
- Disabled all purchase/checkout/reservation/payment endpoints (Stripe checkout,
  webhooks, presale POST, nft claim/mint, custodial claim, shipping) -> 410.
- Stripped prices/availability/delivery dates from home, presale, explorer panel,
  list; nav 'Reserve' -> 'Register interest'; removed Genesis Pricing, Pricing &
  Dynamics, Validator Fees, Phase 1 Timeline from docs hub + footer nav.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYQDZDY5MKcS5K2ARpmqD
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYQDZDY5MKcS5K2ARpmqD
… pages

- proxy.ts: drop the site-wide password gate (home, explorer, docs now public);
  gate only /docs/pricing, /docs/pricing-roi, /legal/hex-node-purchase to
  logged-in holders (redirect to /auth otherwise).
- Remove the four withdrawn pages + purchase agreement from docs/legal nav shells
  (DocsPageShell, DocsLayout, LegalPageShell, legal hub, docs disclaimer).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYQDZDY5MKcS5K2ARpmqD
- proxy.ts: gate now verifies the account owns >=1 Genesis hex (via /api/user
  account.hexIds), not just a login cookie.
- GenesisHexDetail: remove the price block + reserve CTA (-> Register interest),
  drop the public purchase-agreement link and unused price imports.
- HexPanel: remove the audit-date line and the 'By reserving' purchase-agreement
  link (keep Terms + Token risk as reference).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYQDZDY5MKcS5K2ARpmqD
- Replace the Public-Hex-Launch home with the value-prop v3 copy: hero, network
  (illustrative cells + explorer link), why-it-matters, three-step build, where
  it runs. No prices/dates.
- Navbar top-level: Sensors, Network, Tokenomics, Register interest, Data Buyers,
  Learn (dropdown menus + Sensors-style unification to follow).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYQDZDY5MKcS5K2ARpmqD
…s.com)

Log In / Register is now the last nav item after Learn.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYQDZDY5MKcS5K2ARpmqD
…oter links

- Global Navbar restyled to the Sensors aesthetic (Inter Tight, light text) with
  hover dropdowns: Network, Tokenomics, Learn (Sensors, Register interest, Data
  Buyers stay direct links).
- ChromeGate is now a passthrough; /sensors uses the global header + footer
  (removed its standalone SensorsNavbar/SensorsFooter).
- SiteFooter: quick links row (Terms, Contact, Privacy, Docs · X, Discord,
  r/malamalabs).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYQDZDY5MKcS5K2ARpmqD
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYQDZDY5MKcS5K2ARpmqD
… imagery

- 01: SVG hexagon grid; click any cell for state-specific detail (verified soil
  reading / pending demand / offline / no-sensor geo).
- 02: restore Estimated wide-error-band vs Measured narrow-band visual.
- 03: auto-cycling + hover highlight sequence Measure -> Sign -> Anchor.
- 04: field sensor image for Carbon dMRV (51,466+ signed records), data-center
  rack graphic for AI compute (placeholder for real photo).
- framer-motion scroll reveals + hover micro-interactions.
- Footer: remove the malamalabs.com back-link.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYQDZDY5MKcS5K2ARpmqD
…uced-motion)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYQDZDY5MKcS5K2ARpmqD
The /partners page advertised Genesis hex node prices ($2,000) and per-sale
USDC commissions — a sales path that conflicts with the board decision to pull
down active sales. Board decision: remove it.

- Delete /partners, /partners/apply, /partners/dashboard pages
- 410 the public POST /api/partners/apply intake (matches the other closed
  sales routes via salesClosed())
- Redirect stray /partners* links to home in proxy.ts
- Remove "Partners" from the Learn nav dropdown and "Become a partner" from
  the footer
- Drop the dead /partners/apply link + commission copy from the holder dashboard

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GjYQDZDY5MKcS5K2ARpmqD
Rename Genesis 300 → Genesis 200 across homepage copy and node spec.
Set the live dMRV stat to 51,466+ signed records.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KacaCWFvL8mfMoBNbok2mw
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