Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat(launch-detail): surface the shared terminal links on launch pages and the token dashboard

nirholas92f0539750e3
diff --git a/api/_lib/three-brand.js b/api/_lib/three-brand.js
index 8d8c43917..4febb8e65 100644
--- a/api/_lib/three-brand.js
+++ b/api/_lib/three-brand.js
@@ -19,6 +19,7 @@
*/
import { env } from './env.js';
+import { gmgnTokenUrl, axiomTokenUrl, padreTokenUrl, fomoTokenUrl } from '../../src/shared/trading-terminals.js';
// ── Canonical brand ──────────────────────────────────────────────────────────
@@ -56,6 +57,13 @@ export function threeTokenLinks(mint = threeTokenMint()) {
phantom: `https://phantom.com/tokens/solana/${mint}`,
dexscreener: `https://dexscreener.com/solana/${mint}`,
coingecko: 'https://www.coingecko.com/en/coins/three-ws',
+ // Trading terminals. GMGN's carries our referral inline; the other three
+ // have no documented deep-link referral form, so they stay clean deep
+ // links. See src/shared/trading-terminals.js.
+ gmgn: gmgnTokenUrl(mint),
+ axiom: axiomTokenUrl(mint),
+ padre: padreTokenUrl(mint),
+ fomo: fomoTokenUrl(mint),
};
}
diff --git a/src/dashboard-next/pages/three-token.js b/src/dashboard-next/pages/three-token.js
index 0c9d794b6..1cae049a3 100644
--- a/src/dashboard-next/pages/three-token.js
+++ b/src/dashboard-next/pages/three-token.js
@@ -14,6 +14,7 @@ import { mountShell } from '../shell.js';
import { requireUser, esc, relTime, ApiError } from '../api.js';
import { fetchTokenConfig, fetchTokenPrice } from '../../token-pay.js';
import { fetchAllowanceStatus, grantAllowance, revokeAllowance } from '../../three-allowance.js';
+import { terminalLinks } from '../../shared/trading-terminals.js';
import { createThreeTokenData } from '../../pump/three-token-data.js';
import { errorStateHTML, ensureStateKitStyles } from '../../shared/state-kit.js';
import { toast } from '../../shared/toast.js';
@@ -1172,6 +1173,16 @@ function renderTokenInfo() {
Copy Contract Address
</button>
</div>
+ <div style="margin-top:12px">
+ <div style="font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--dn-dim,#8a8a9c);margin-bottom:6px">Trade $THREE on</div>
+ <div style="display:flex;gap:8px;flex-wrap:wrap">
+ ${terminalLinks(THREE_MINT).map((t) => `
+ <a class="dn-btn" href="${esc(t.url)}" target="_blank" rel="noopener" style="font-size:12.5px">
+ ${esc(t.label)} &#8599;
+ </a>
+ `).join('')}
+ </div>
+ </div>
`;
section.querySelector('[data-action="copy-ca"]').addEventListener('click', async () => {
diff --git a/src/launch-detail.css b/src/launch-detail.css
index 4921da151..aa76f4d27 100644
--- a/src/launch-detail.css
+++ b/src/launch-detail.css
@@ -395,6 +395,27 @@ body {
transition: color var(--duration-fast);
}
.ld-chart-open:hover { color: var(--ink-bright); }
+
+/* Trading terminals for this mint, beside the chart's DexScreener link. */
+.ld-chart-terminals { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
+.ld-chart-terminal {
+ font-size: 11px;
+ line-height: 1;
+ padding: 4px 8px;
+ border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
+ border-radius: 999px;
+ color: var(--ink-dim, #8a8a9c);
+ text-decoration: none;
+ white-space: nowrap;
+ transition: color .15s ease, border-color .15s ease, background-color .15s ease;
+}
+.ld-chart-terminal:hover,
+.ld-chart-terminal:focus-visible {
+ color: var(--ink-bright, #fff);
+ border-color: var(--accent, #6ce0c8);
+ background: rgba(108, 224, 200, 0.08);
+}
+.ld-chart-terminal:focus-visible { outline: 2px solid var(--accent, #6ce0c8); outline-offset: 2px; }
.ld-dex-wrap {
position: relative;
min-height: 460px;
diff --git a/src/launch-detail.js b/src/launch-detail.js
index 05de70cc5..07a7a95f8 100644
--- a/src/launch-detail.js
+++ b/src/launch-detail.js
@@ -38,6 +38,7 @@ import {
import { walletChipEl } from './shared/agent-wallet-chip.js';
import { agentAvatarGlb, hasCustomAvatar, seeInWorldHref } from './shared/agent-3d.js';
import { resolveDevR2Url } from './shared/dev-r2-proxy.js';
+import { terminalLinks } from './shared/trading-terminals.js';
import { flashValue, rippleOnce, liveDot, setLiveDot } from './ui-juice.js';
const GRADUATION_CAP_USD = 69_000; // pump.fun bonding-curve graduation threshold
@@ -1136,9 +1137,30 @@ function dexLink() {
});
}
+// DexScreener is a chart, not a place to fill an order. Every coin page also
+// offers the trading terminals people actually execute on, straight to this
+// mint. Sourced from src/shared/trading-terminals.js so the links (and the GMGN
+// referral baked into its deep link) stay identical across the product.
+function terminalLinksEl() {
+ return el(
+ 'div',
+ { class: 'ld-chart-terminals' },
+ terminalLinks(state.mint).map((t) =>
+ el('a', {
+ class: 'ld-chart-terminal',
+ href: t.url,
+ target: '_blank',
+ rel: 'noopener',
+ title: `Trade this coin on ${t.label}`,
+ text: t.label,
+ }),
+ ),
+ );
+}
+
function renderDexChart(target) {
clearTimeout(state.dexFrameTimer);
- const controls = el('div', { class: 'ld-chart-controls' }, [chartViewBar(), dexLink()]);
+ const controls = el('div', { class: 'ld-chart-controls' }, [chartViewBar(), terminalLinksEl(), dexLink()]);
const wrap = el('div', { class: 'ld-dex-wrap' });
const iframe = el('iframe', {
class: 'ld-dex-frame',
diff --git a/tests/trading-terminals.test.js b/tests/trading-terminals.test.js
index 69bf42cda..b14e2dc5e 100644
--- a/tests/trading-terminals.test.js
+++ b/tests/trading-terminals.test.js
@@ -53,10 +53,25 @@ describe('GMGN deep links carry the referral inline', () => {
expect(gmgnAddressUrl(WALLET)).toBe(`https://gmgn.ai/sol/address/nichxbt_${WALLET}`);
});
- it('maps chains to GMGN slugs, defaulting to sol', () => {
- expect(gmgnAddressUrl('0xabc', 'bsc')).toContain('/bsc/address/');
+ it('passes through every chain slug GMGN serves', () => {
+ // Collapsing these to `sol` would point an Ethereum or Base token at a
+ // Solana URL that cannot resolve.
+ for (const slug of ['sol', 'eth', 'base', 'bsc', 'tron', 'blast']) {
+ expect(gmgnTokenUrl(MINT, slug)).toContain(`/${slug}/token/`);
+ expect(gmgnAddressUrl('0xabc', slug)).toContain(`/${slug}/address/`);
+ }
+ });
+
+ it('normalizes case and whitespace on the chain slug', () => {
+ expect(gmgnTokenUrl(MINT, ' BSC ')).toContain('/bsc/token/');
+ expect(gmgnTokenUrl(MINT, 'Base')).toContain('/base/token/');
+ });
+
+ it('falls back to sol for an unknown or missing chain', () => {
expect(gmgnAddressUrl('0xabc', 'ethereum')).toContain('/sol/address/');
- expect(gmgnTokenUrl(MINT, 'bsc')).toContain('/bsc/token/');
+ expect(gmgnAddressUrl('0xabc', '')).toContain('/sol/address/');
+ expect(gmgnAddressUrl('0xabc', null)).toContain('/sol/address/');
+ expect(gmgnAddressUrl('0xabc', undefined)).toContain('/sol/address/');
});
it('keeps the underscore separator unescaped so GMGN can split it', () => {