For the complete documentation index, see llms.txt. This page is also available as Markdown.

Frontend Integration

Stack

Layer
Tech

Framework

Next.js 14 (App Router)

Styling

Tailwind CSS + CSS variables

Web3

wagmi v2 + viem

Auth & Wallets

Privy (@privy-io/react-auth) + MOSS Wallet (@megaeth-labs/wallet-wagmi-connector)

Account Abstraction

ERC-4337 via Privy smart wallets + Pimlico bundler

Database

Supabase

Bridge/Swap

LiFi SDK

Fonts

Geist Sans + JetBrains Mono


Key Files

File
Purpose

frontend/app/layout.tsx

Root layout — metadata, OG tags, JSON-LD, fonts

frontend/app/providers.tsx

PrivyProvider + SmartWalletsProvider + WagmiProvider

frontend/app/page.tsx

Landing page — hero, ticker, CTAs

frontend/app/markets/page.tsx

Markets list

frontend/app/markets/[id]/page.tsx

Market detail + trade panel

frontend/app/markets/create/page.tsx

Create market form

frontend/components/Header.tsx

Top nav with evently wordmark

frontend/components/EventlyLogo.tsx

evently icon (M+E Heart) + wordmark

frontend/components/MarketModal.tsx

Trade panel — buy/sell YES/NO shares

frontend/components/QuickTradePanel.tsx

Floating quick trade drawer

frontend/components/LiveFeed.tsx

Real-time trade feed

frontend/config/privy.ts

Privy app config (login methods, embedded wallet)

frontend/config/markets.ts

Contract addresses + ABI

frontend/config/wagmi.ts

Wagmi chain config

frontend/lib/paymaster.ts

Bundler/paymaster clients, sponsored function whitelist

frontend/hooks/useSmartAccount.ts

Unified wallet hook — gasless + EOA fallback

frontend/hooks/useSessionKeys.ts

Session key lifecycle (sign once, trade up to 100×)


Authentication & Wallets (Privy)

evently uses Privy for authentication. Users sign in with email or social accounts — no wallet extension required.

Supported login methods: Email · Google · Twitter · Discord · GitHub · Apple · External wallets (MetaMask, Rabby, Coinbase Wallet, Rainbow)

On first login, Privy automatically creates an embedded wallet (EOA) in the background. This is then wrapped in an ERC-4337 Kernel smart account for gasless transactions.

MOSS Wallet (MegaETH embedded SDK)

Privy coexists with the MOSS Wallet SDK — MegaETH's native embedded wallet. The MOSS wagmi connector is registered in providers.tsx and is selectable via any standard wagmi useConnect() flow.

MOSS exposes additional MegaETH-native methods through the EIP-1193 provider (wallet_balances, wallet_swap, wallet_grantPermissions, …) — useful for paymaster setup, smart approvals, and the policy engine. See the Methods Reference and Paymaster Guide upstream.


Gas Sponsorship

Core Evently operations are gasless. The protocol sponsors gas via a Pimlico paymaster (ERC-4337).

Sponsored functions: placeOrder, sellToAMM, createMarket, resolveMarket, claimRewards, approve (USDM).

See frontend/lib/paymaster.ts for the full whitelist and rate-limiting logic.


Logo Component

The evently logo is rendered via the EventlyLogo component:

Wordmark — "event" in #19191A (dark), "ly" in #70BAD2 (blue):


Brand Colors


MegaETH Chain Config (wagmi)


Real-Time Events (MegaETH ~10ms blocks)

Use watchContractEvent for live trade feed — critical for MegaETH's ~10ms block finality:


Wiring Checklist


Contract Addresses


Gas Settings (MegaETH)

Last updated

Was this helpful?