Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions .github/workflows/release-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Release Manual

on:
workflow_dispatch:
inputs:
deploy_production:
description: Deploy production on Vercel
required: true
default: true
type: boolean

permissions:
contents: read

jobs:
preflight:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Type check
run: pnpm typecheck

release:
if: ${{ inputs.deploy_production }}
needs: preflight
runs-on: ubuntu-latest
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
PRODUCTION_HEALTHCHECK_URL: ${{ secrets.PRODUCTION_HEALTHCHECK_URL }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Validate deploy secrets
run: |
missing=0
for key in VERCEL_TOKEN VERCEL_ORG_ID VERCEL_PROJECT_ID; do
if [ -z "${!key}" ]; then
echo "::error::Missing ${key} secret"
missing=1
fi
done
if [ "${missing}" -ne 0 ]; then
exit 1
fi

- name: Install Vercel CLI
run: npm install -g vercel@latest

- name: Pull project settings
run: vercel pull --yes --environment=production --token="${VERCEL_TOKEN}"

- name: Build deployment artifact
run: vercel build --prod --token="${VERCEL_TOKEN}"

- name: Deploy production artifact
run: vercel deploy --prebuilt --prod --yes --token="${VERCEL_TOKEN}"

- name: Smoke check
if: ${{ env.PRODUCTION_HEALTHCHECK_URL != '' }}
run: |
curl --fail --silent --show-error "${PRODUCTION_HEALTHCHECK_URL}"
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
/**
* Stats V2 Dashboard (Experimental)
*
* This page uses the shared Monarch API to provide cross-chain Monarch
* transaction data across all chains with a single GraphQL endpoint.
* This page uses a new cross-chain indexer API that provides Monarch transaction
* data across all chains with a single API call.
*
* NOTE: This API is experimental and may be reverted due to cost concerns.
* The old stats page at /admin/stats should be kept as a fallback.
Expand All @@ -25,9 +25,11 @@ import { PasswordGate } from '@/features/admin-v2/components/password-gate';
import { StatsOverviewCards } from '@/features/admin-v2/components/stats-overview-cards';
import { StatsVolumeChart } from '@/features/admin-v2/components/stats-volume-chart';
import { ChainVolumeChart } from '@/features/admin-v2/components/chain-volume-chart';
import { StatsAttributionOverview } from '@/features/admin-v2/components/stats-attribution-overview';
import { StatsTransactionsTable } from '@/features/admin-v2/components/stats-transactions-table';
import { StatsAssetTable } from '@/features/admin-v2/components/stats-asset-table';
import { StatsMarketTable } from '@/features/admin-v2/components/stats-market-table';
import { useAttributionScoreboard } from '@/hooks/useAttributionScoreboard';
import { useMonarchTransactions, type TimeFrame } from '@/hooks/useMonarchTransactions';
import { useAdminAuth } from '@/stores/useAdminAuth';

Expand All @@ -47,6 +49,7 @@ function StatsV2Content() {
isLoading,
error,
} = useMonarchTransactions(timeframe);
const attribution = useAttributionScoreboard(timeframe);

const timeframeOptions = [
{ key: '1D', label: '1D', value: '1D' },
Expand Down Expand Up @@ -121,6 +124,13 @@ function StatsV2Content() {
chainStats={chainStats}
/>

<StatsAttributionOverview
summary={attribution.summary}
breakdown={attribution.breakdown}
revenueBps={attribution.data?.revenueBps ?? 0}
isLoading={attribution.isLoading}
/>

{/* Charts Grid */}
<div className="grid gap-6 lg:grid-cols-1">
{/* Aggregated Volume Chart */}
Expand Down
Loading