Pull one - #37
Open
tylermalin wants to merge 78 commits into
Open
Conversation
Hex explorer
Hex explorer
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Hex explorer
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>
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>
…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>
…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>
… allowlist Default ADMIN_EMAILS now includes tyler@malamaproject.org, dagwell@malamalabs.com, jeffrey@malamalabs.com — they can sign in (email session) at /admin/partners to approve partners, send onboarding emails, and edit Amplify social copy. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…rawer Open an Active Partner → pick a template (Invite / Follow-up / KOL Social / Newsletter) → "✉ Send to <email>" sends the personalized email via Resend ([NAME]/[REFERRAL_URL]/[COMMISSION] filled) instead of copy-to-clipboard. Copy is kept as a secondary action. Tracking: each send is recorded (recordKOLEmail → KV audit) and surfaced as "✉ N sent" on the partner + in getKOLStats (emailsSent / lastEmailAt). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… system Ported pages/Data Solutions.html into a native Next route, on-brand with the site (Fraunces + Inter Tight + JetBrains Mono + #c4f061 on green-black): - Hero, 01 Use Cases (8-card grid), 02 Buyer Advantage, 03 Market Outlook (animated, clearly-labeled "Modeled · Illustrative" demand chart), 04 Process, CTA → data@malamalabs.com. - Scoped CSS (.ds-root namespace, reuses the site's loaded fonts; no global leak). - DemandChart client component animates the bars on scroll-in. - Uses the global site nav/footer; added "Data Solutions" to the footer Product column. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… of mailto - New /api/data-solutions/request: stores the lead in KV, notifies Info@malamaproject.org (reply-to the requester) + sends a confirmation, via Resend. GET (x-admin-secret) lists requests. - CTA now renders DataRequestForm (email + name + org + use-case + message), styled with the design tokens, with loading/success/error states. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Top nav now links /data-solutions ("Data", after Explorer).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…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>
….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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Checklist
Please verify the following before submitting your PR:
docs/audit/invariants.md.README.mdand relevant documentation insidedocs/have been updated to reflect these changes.Additional Context