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.

fix: harden Solana RPC fallback and URL guards; marketplace and cron refinements

nirholas522d9cb4f03f
diff --git a/.gitignore b/.gitignore
index 197d03642..07d01fd70 100644
--- a/.gitignore
+++ b/.gitignore
@@ -279,3 +279,4 @@ api/_lib/migrations/20260623170000_agent_bodies.sql
demo/
three-ws-prod-log-export-2026-06-24T04-15-25.json
pages/ibm/hello.html
+three-ws-prod-log-export-2026-06-24T13-33-58.json
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 96ed1c773..31b9cc5a1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -37,6 +37,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Buy live $THREE market intel over x402 — right on the IBM partnership page** — The IBM and three.ws partnership page now has a live $THREE Town Oracle: pay $0.01 in USDC from your own wallet and get back live $THREE market intel — price, 24-hour change, market cap, liquidity, 24-hour volume, and a bullish/bearish/neutral signal with a short rationale, formatted into a clean card right on the page. It's the same oracle the in-world paid kiosk in the $THREE town on /play buys from, settled over the x402 protocol, and it doubles as the live, working example for the eight-line drop-in paywall snippet. Data is live from DexScreener; nothing is mocked. (`/bazaar`) `[feature]`
- **Check your plan usage and billing from any AI agent over MCP** — A new Model Context Protocol server, @three-ws/billing-mcp, lets an AI agent self-serve its own account economics — no need to pull in the human account owner. Agents can read their plan tier and how much of each quota is left (avatars and storage, agents, MCP tool calls in the last 24 hours, LLM calls this month), roll their metered usage into an invoice statement for any period with per-action line items and totals, export that statement as a CSV, and pull the itemized receipt behind any single charge — including its on-chain settlement and explorer link — or the signed receipt for a skill purchase. It also surfaces the income side: earnings for the agents you own, broken down by skill and over time, plus creator-subscription income. Every account read is private and scoped to your three.ws session; only the public platform fee rate needs no credential. The server is read-only — it never signs or moves funds. `[sdk, feature]`
- **Fixed the inline Pose Studio embed 404** — The lite Pose Studio that runs inline on demo pages now loads in production. The /pose-mini route was being built but had no production rewrite, so the embedded poser returned a 404 instead of letting you orbit and pose the mannequin in place. The route is now wired and the embed loads live. `[fix]`
+- **Fixed the live $THREE price, bonding-curve, and trade-safety reads** — The on-chain reads that power the live $THREE price and bonding-curve view, plus the pre-trade safety check that tells you whether a coin can actually be sold before you buy, were erroring out whenever the server's Solana RPC address was configured with a small formatting slip — a missing https://, a websocket address, or stray quotes. Those reads now repair the address automatically and always fall through to a healthy public node, so the price widget and the safety verdict load reliably instead of failing. No action needed on your end. `[fix]`
- **Join Agora: post bounties, hire citizens, and vouch — as a real human** — Agora is no longer just for agents. Sign in and you become a citizen of the Commons yourself: your avatar appears in the world, and you can post a real bounty that escrows $THREE on-chain, hire a specific citizen for a job, claim and complete work yourself with a verifiable proof, and leave an on-chain vouch for someone whose deliverable you checked. Every action is the same real on-chain operation an agent runs — there's no fake 'human mode'. A 'you' panel shows your standing, balance, open bounties, and earnings live. Posting and escrow are server-side, spend-capped, and default to devnet; real-money mainnet $THREE stays gated behind explicit opt-in so nothing spends without you meaning it. Signed out, the world stays fully watchable with a clear prompt to join. (`/agora`) `[feature]`
- **King of the Totem: a new mini-game in the 3D worlds** — The /play worlds now run King of the Totem. A glowing gold ring sits at the base of the coin totem; stand inside it alone and you rack up points every second, with a 👑 crown floating over your head and a ring at your feet so everyone can see who's holding it. The moment a second person steps in, the zone is contested and nobody scores — push them out to take the crown back. Rounds last 90 seconds with a live countdown, a scoreboard that highlights your own row, and a winner banner plus a confetti burst when the round ends. Then a short intermission and the next round begins. Everything — who's in the zone, who scores, who wins — is decided on the server from real positions, so it can't be faked from outside the ring. Works with two or more players and handles people joining and leaving mid-round. (`/play`) `[feature]`
- **Pay for any three.ws service in $THREE — not just USDC** — $THREE is now a first-class payment token across every paid three.ws endpoint over x402, alongside USDC. When you pay, the wallet shows a token chooser: settle in USDC, or settle in $THREE on Solana. It works everywhere the 402 rail does — the paid Forge, the $THREE Town Oracle, and every service in the bazaar — because acceptance lives in the shared payment layer, not per-endpoint. The IBM partnership page's live demos now spell this out: pay a few cents in USDC, or in $THREE, from your own wallet. $THREE is priced at a flat per-call amount on Solana. (`/bazaar`) `[feature]`
@@ -44,6 +45,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Play Coin Clash from any AI agent over MCP** — A new Model Context Protocol server, @three-ws/clash-mcp, opens Coin Clash — the three.ws community faction war — to any AI agent. Agents can read the live battle board (which communities are matched this round, each army's rally power and momentum, the tug-of-war share, and the clock) and the all-time leaderboard of faction war records. They can also fight: enlisting proves the agent's wallet actually holds a faction's coin by signing a challenge with its Solana key, then rallying spends taps as real battle power for that faction this round. Reads are public and need no key; enlisting and rallying are wallet-scoped and never move funds. Factions and momentum come straight from CoinCommunities and pump.fun — the same live data the /clash arena runs on. (`/clash`) `[sdk, feature]`
- **Pose a figure by hand — the live Pose Studio rig now runs right on the IBM showcase** — The IBM × three.ws showcase page has a new demo: pose a 3D figure by hand. Orbit the mannequin, grab a limb to move it (with inverse kinematics on the hands and feet), nudge any joint with the sliders, or tap a preset to morph the whole pose at once. It's the exact rig that drives the full Pose Studio — the same canonical skeleton every avatar three.ws generates lands on — running live in the browser, with a focused embeddable version at /pose-mini you can drop into any page. (`/pose`) `[feature]`
- **Post bounties and hire agents in Agora** — Agora's economy now has real demand, not just supply. Citizens post genuine bounties to the job board — each one escrows its reward on-chain (in $THREE on mainnet; devnet uses test SOL while the flow is proven) — and other citizens claim and complete them to get paid and build reputation. High-value jobs sit behind a reputation ladder: apprentice work is open to everyone, while journeyman and master bounties require a track record, so newcomers grind up the ranks. Agents also hire each other — a citizen working a big job can pay a second agent for a sub-task, so value flows human → agent → sub-agent. The board only ever shows work that's genuinely still open: a background sweep re-reads the chain and drops anything that's been claimed, cancelled, or expired. And there's no fake infinite money — a patron that runs out of budget simply stops posting. (`/agora`) `[feature]`
+- **Reliability fixes: marketplace cards, avatar build status, and on-chain indexing** — A round of stability fixes. Marketplace cards for bred agents that carry a rare-pedigree badge no longer fail to render — every card in the grid shows cleanly again. The 3D avatar build-status check now returns its progress without erroring, so the create flow keeps updating while your model is generated. And the cross-chain agent indexer that powers Explore now identifies itself to its RPC providers, so a provider that was rejecting anonymous requests no longer blanks out fresh on-chain agent data. `[fix]`
- **The IBM × three.ws partnership page now updates itself after it ships** — The IBM partnership page — the webinar stage and the five live demos — can now be edited after it's published on a partner site, with no re-publish. The hosted file is fully self-contained, so it renders on its own with no dependency on three.ws; on load it also pulls the latest version from three.ws and swaps it in when available. So changing the webinar start time, dropping in the recording link, rewording the hero, or adding a demo goes live the moment it's saved — and if three.ws is ever unreachable, visitors still get the complete page (the last published version) instead of a blank screen. You can preview it at /ibm/hello. (`/ibm/hello`) `[improvement, infra]`
- **Verify any agent's on-chain work yourself, and read its living passport** — Agora's trust layer is now something you can check, not just take on faith. Click any completed job to see its full on-chain lifecycle — created, claimed, completed — each step with the actor and a link to the real Solana transaction. Then hit Verify deliverable: your browser re-downloads the artifact, re-hashes it (SHA-256), and shows whether it matches the proof recorded on-chain — a green check it actually computed, or a clear ✗ with both hashes if the file was changed. A verified 3D model renders right there so you can orbit it. Click any citizen to open its living passport: a derived A–D trust grade, slashable stake, status, $THREE earned, every task it has done or posted, and — for agents that prove an identity on both Ethereum and Solana — the cross-chain handshake showing how two chains resolve to one reputation, re-derived in your browser to prove it. Everything is keyboard-accessible, deep-linkable, and copyable. (`/agora`) `[feature, security]`
- **Watch Agora's economy come alive in 3D** — The Commons at /agora now renders the agent economy as a living world you can watch. A job board stands in the square with every open bounty glowing above it — coloured by profession and sized by its reward — so you can see at a glance what work is up for grabs (hover or tab to any marker for the title, reward, and who can take it). When an agent claims a task it walks to the board and works under a glowing busy ring; when it finishes, the deliverable materializes — a Sculptor's 3D model pops onto a plinth you can orbit — while a stream of $THREE coins flows from escrow to the worker and its reputation ticks up. A live ticker reads out the population, tasks completed and $THREE earned in the last 24h, the top earners, and a running feed of what just happened; click any line to fly the camera to the citizen or their deliverable. Quiet right now? The board shows an honest 'no open work' sign instead of faking it. Reduced-motion is fully respected. (`/agora`) `[feature]`
diff --git a/api/_lib/env.js b/api/_lib/env.js
index 6b5f26fcd..df9a755e6 100644
--- a/api/_lib/env.js
+++ b/api/_lib/env.js
@@ -51,26 +51,48 @@ function normalizeAppOrigin(raw) {
}
}
-// Repair the recurring `api-mainnet.helius-rpc.com` / `api-devnet.helius-rpc.com`
-// misconfiguration (Helius's JSON-RPC host is `mainnet.helius-rpc.com`, not the
-// `api.helius.xyz` REST host) before the URL reaches any Solana caller. A bad host
-// 404s every request and gets parked in a 30m cooldown forever; rewriting it keeps
-// SOLANA_RPC_URL a working primary. Kept dependency-free so env.js stays light —
-// mirrors normalizeRpcUrl() in solana/connection.js. Unrecognized URLs pass through.
+// Returns a Connection-safe http(s) URL, or '' when the value can't be salvaged.
+// Kept dependency-free so env.js stays light — mirrors normalizeRpcUrl()/isHttpUrl()
+// in solana/connection.js. Also repairs the recurring `api-mainnet.helius-rpc.com` /
+// `api-devnet.helius-rpc.com` misconfiguration (Helius's JSON-RPC host is
+// `mainnet.helius-rpc.com`, not the `api.helius.xyz` REST host); a bad host 404s
+// every request and gets parked in cooldown, so rewriting it keeps SOLANA_RPC_URL a
+// working primary.
+// Repairs the malformed shapes seen in prod env config before they reach a
+// `new Connection`/`fetch` consumer (where a scheme-less or ws:// value 500s with
+// "Endpoint URL must start with http: or https:"): surrounding quotes, a websocket
+// scheme (mapped to its http(s) form), and a missing scheme (assumed https). The
+// getters below coalesce '' to the public default so every consumer always sees a
+// valid URL. Mirrors normalizeRpcUrl()/isHttpUrl() in solana/connection.js.
function normalizeRpcUrl(raw) {
- const v = (raw ?? '').trim();
- if (!v) return v;
+ let v = (raw ?? '').trim();
+ if (!v) return '';
+ if ((v.startsWith('"') && v.endsWith('"')) || (v.startsWith("'") && v.endsWith("'"))) {
+ v = v.slice(1, -1).trim();
+ }
+ if (!v) return '';
+ let candidate = v;
+ if (/^wss:\/\//i.test(candidate)) candidate = candidate.replace(/^wss:/i, 'https:');
+ else if (/^ws:\/\//i.test(candidate)) candidate = candidate.replace(/^ws:/i, 'http:');
+ else if (!/^[a-z][a-z0-9+.-]*:\/\//i.test(candidate)) {
+ const host = candidate.split(/[/?#]/)[0];
+ if (!host.includes('.') && !/^localhost(:\d+)?$/i.test(host)) return '';
+ candidate = `https://${candidate}`;
+ }
+ let u;
try {
- const u = new URL(v);
- const fixed = u.hostname.replace(/^api-(mainnet|devnet)\.helius-rpc\.com$/i, '$1.helius-rpc.com');
- if (fixed !== u.hostname) {
- u.hostname = fixed;
- return u.toString();
- }
- return v;
+ u = new URL(candidate);
} catch {
- return v;
+ return '';
+ }
+ if (u.protocol !== 'http:' && u.protocol !== 'https:') return '';
+ const fixed = u.hostname.replace(/^api-(mainnet|devnet)\.helius-rpc\.com$/i, '$1.helius-rpc.com');
+ if (fixed !== u.hostname) {
+ return candidate.replace(/^([a-z][a-z0-9+.-]*:\/\/)([^/?#]+)/i, (_m, scheme, authority) =>
+ scheme + authority.replace(u.hostname, fixed),
+ );
}
+ return candidate;
}
// Platform owner wallets with standing admin access, independent of env config.
@@ -770,7 +792,10 @@ export const env = {
// Solana RPC URL — single source of truth for all Solana RPC calls.
// Set to a Helius/QuickNode/Triton URL in production to avoid public RPC rate limits.
get SOLANA_RPC_URL() {
- return normalizeRpcUrl(opt('SOLANA_RPC_URL', 'https://api.mainnet-beta.solana.com'));
+ // Coalesce to the public endpoint when unset OR when a configured value is
+ // malformed beyond repair — every direct consumer (fetch / new Connection)
+ // then always receives a valid http(s) URL.
+ return normalizeRpcUrl(opt('SOLANA_RPC_URL', '')) || 'https://api.mainnet-beta.solana.com';
},
// Helius API key — extracted from SOLANA_RPC_URL when it's a Helius endpoint,
@@ -787,7 +812,7 @@ export const env = {
// Solana devnet RPC URL. Falls back to the public devnet endpoint.
get SOLANA_RPC_URL_DEVNET() {
- return normalizeRpcUrl(opt('SOLANA_RPC_URL_DEVNET', 'https://api.devnet.solana.com'));
+ return normalizeRpcUrl(opt('SOLANA_RPC_URL_DEVNET', '')) || 'https://api.devnet.solana.com';
},
// ── threews.sol subdomain minting ─────────────────────────────────────
diff --git a/api/_lib/solana/connection.js b/api/_lib/solana/connection.js
index c6e1251ce..fa13925a8 100644
--- a/api/_lib/solana/connection.js
+++ b/api/_lib/solana/connection.js
@@ -32,31 +32,80 @@ function deriveWsUrl(httpUrl) {
return String(httpUrl).replace(/^https:/, 'wss:').replace(/^http:/, 'ws:');
}
-// Repair known-bad RPC hostnames sourced from env before they enter the endpoint
-// list. Helius's JSON-RPC host is `mainnet.helius-rpc.com` / `devnet.helius-rpc.com`;
-// a recurring prod misconfiguration set SOLANA_RPC_URL to `api-mainnet.helius-rpc.com`
-// (conflating the RPC host with the `api.helius.xyz` REST host), which 404s every
-// request and gets parked in a 30m cooldown forever. Rewriting the host turns a
-// perpetually-dead primary into a working endpoint instead of relying on failover
-// to silently route around it on every cold start. Unrecognized URLs pass through
-// untouched.
+// True only for a value @solana/web3.js's `new Connection` will accept — a parseable
+// URL whose protocol is http: or https:. Connection's `assertEndpointUrl` rejects
+// everything else (ws://, a scheme-less host, junk) by throwing
+// "Endpoint URL must start with `http:` or `https:`.", which is exactly the
+// unhandled 500 that hammered /api/pump/curve and /api/pump/safety in production.
+// Every URL that reaches a Connection constructor in this module is filtered through
+// this guard so that error can never recur.
+export function isHttpUrl(u) {
+ if (typeof u !== 'string' || !u) return false;
+ try {
+ const { protocol } = new URL(u);
+ return protocol === 'http:' || protocol === 'https:';
+ } catch {
+ return false;
+ }
+}
+
+// Coerce an env-sourced RPC value into a Connection-safe http(s) URL, or '' when it
+// cannot be salvaged. Repairs the malformed shapes seen in production env config
+// before they reach `new Connection` (where they 500 with "Endpoint URL must start
+// with http: or https:"):
+// • surrounding quotes — a dashboard paste artifact (`SOLANA_RPC_URL="https://…"`)
+// • a websocket URL (ws/wss) — a valid URL but not an HTTP JSON-RPC endpoint; the
+// RPC host serves both on the same origin, so we map it to its http(s) form
+// • a scheme-less host (`mainnet.helius-rpc.com/?api-key=…`) — assume https
+// It also keeps the original Helius host repair: the JSON-RPC host is
+// `mainnet.helius-rpc.com` / `devnet.helius-rpc.com`; a recurring misconfiguration
+// set SOLANA_RPC_URL to `api-mainnet.helius-rpc.com` (conflating it with the
+// `api.helius.xyz` REST host), which 404s every request. Returning '' for an
+// unsalvageable value lets a real fallback take over instead of crashing the
+// constructor; callers treat '' as "not configured".
export function normalizeRpcUrl(raw) {
- const v = (raw ?? '').trim();
- if (!v) return v;
+ let v = (raw ?? '').trim();
+ if (!v) return '';
+ // Strip a single pair of surrounding quotes.
+ if ((v.startsWith('"') && v.endsWith('"')) || (v.startsWith("'") && v.endsWith("'"))) {
+ v = v.slice(1, -1).trim();
+ }
+ if (!v) return '';
+
+ // Build a parseable candidate, repairing ws/wss and scheme-less inputs. String-
+ // level repairs (not URL.toString()) so a clean input round-trips byte-for-byte —
+ // no trailing-slash churn versus the hardcoded endpoint constants, which would
+ // otherwise defeat dedupe and list the same node twice.
+ let candidate = v;
+ if (/^wss:\/\//i.test(candidate)) candidate = candidate.replace(/^wss:/i, 'https:');
+ else if (/^ws:\/\//i.test(candidate)) candidate = candidate.replace(/^ws:/i, 'http:');
+ else if (!/^[a-z][a-z0-9+.-]*:\/\//i.test(candidate)) {
+ // Scheme-less: assume https only for a host-shaped value (has a dot, or
+ // localhost[:port]). A bare token like "helius" is a typo, not a host — drop
+ // it so it never becomes a bogus `https://helius` lane that wastes a failover
+ // round-trip before the real fallback answers.
+ const host = candidate.split(/[/?#]/)[0];
+ if (!host.includes('.') && !/^localhost(:\d+)?$/i.test(host)) return '';
+ candidate = `https://${candidate}`;
+ }
+
+ let u;
try {
- const u = new URL(v);
- const fixedHost = u.hostname.replace(
- /^api-(mainnet|devnet)\.helius-rpc\.com$/i,
- '$1.helius-rpc.com',
- );
- if (fixedHost !== u.hostname) {
- u.hostname = fixedHost;
- return u.toString();
- }
- return v;
+ u = new URL(candidate);
} catch {
- return v;
+ return '';
+ }
+ if (u.protocol !== 'http:' && u.protocol !== 'https:') return '';
+
+ // Helius host repair, spliced into the authority only (never the path/query) so
+ // the rest of the URL keeps its exact original form.
+ const fixedHost = u.hostname.replace(/^api-(mainnet|devnet)\.helius-rpc\.com$/i, '$1.helius-rpc.com');
+ if (fixedHost !== u.hostname) {
+ return candidate.replace(/^([a-z][a-z0-9+.-]*:\/\/)([^/?#]+)/i, (_m, scheme, authority) =>
+ scheme + authority.replace(u.hostname, fixedHost),
+ );
}
+ return candidate;
}
// Cooldown durations by failure class. Quota exhaustion (e.g. Helius -32429
@@ -131,7 +180,7 @@ function inferNetwork(url) {
function extraFallbackUrls() {
return (process.env.SOLANA_RPC_FALLBACK_URLS || '')
.split(',')
- .map((s) => s.trim())
+ .map((s) => normalizeRpcUrl(s))
.filter(Boolean);
}
@@ -149,6 +198,8 @@ export function solanaRpcEndpoints(network = 'mainnet', url = null) {
// on freetier"). Added in its authenticated form only when DRPC_API_KEY is set.
const drpc = process.env.DRPC_API_KEY;
if (network === 'devnet') {
+ // .filter(isHttpUrl) is the hard guarantee: only a value `new Connection`
+ // accepts survives, so a malformed env entry can never reach the constructor.
return dedupe([
normalizeRpcUrl(url),
normalizeRpcUrl(process.env.SOLANA_RPC_URL_DEVNET),
@@ -156,7 +207,7 @@ export function solanaRpcEndpoints(network = 'mainnet', url = null) {
alch && `https://solana-devnet.g.alchemy.com/v2/${alch}`,
drpc && `https://lb.drpc.org/ogrpc?network=solana-devnet&dkey=${drpc}`,
PUBLIC_DEVNET,
- ]);
+ ]).filter(isHttpUrl);
}
return dedupe([
normalizeRpcUrl(url),
@@ -195,7 +246,9 @@ export function solanaRpcEndpoints(network = 'mainnet', url = null) {
'https://api.tatum.io/v3/blockchain/node/solana-mainnet',
'https://solana.therpc.io',
PUBLIC_MAINNET,
- ]);
+ // .filter(isHttpUrl) is the hard guarantee: only a value `new Connection`
+ // accepts survives, so a malformed env entry can never reach the constructor.
+ ]).filter(isHttpUrl);
}
function maskUrl(url) {
diff --git a/api/_lib/solana/rpc-fallback.js b/api/_lib/solana/rpc-fallback.js
index fa19e1ce4..fdf09ec33 100644
--- a/api/_lib/solana/rpc-fallback.js
+++ b/api/_lib/solana/rpc-fallback.js
@@ -17,6 +17,8 @@ import {
isEndpointCooling,
markEndpointCooldown,
makeRotatingFetch,
+ normalizeRpcUrl,
+ isHttpUrl,
} from './connection.js';
const MAX_CONSECUTIVE_FAILS = 3;
@@ -72,8 +74,18 @@ function isRetryable(err) {
export class RpcFallback {
constructor({ url, fallbackUrls = [], commitment = 'confirmed' } = {}) {
- if (!url) throw new Error('RpcFallback: primary url is required');
- this.urls = [url, ...fallbackUrls];
+ // Normalize, then keep only Connection-safe http(s) endpoints. A malformed
+ // entry (scheme-less host, ws:// URL, quoted env value, junk) would otherwise
+ // reach `new Connection` in getConnection() and throw "Endpoint URL must start
+ // with `http:` or `https:`." — the unhandled 500 that hammered /api/pump/curve.
+ // Dedupe while preserving priority order.
+ const seen = new Set();
+ this.urls = [url, ...fallbackUrls]
+ .map((u) => normalizeRpcUrl(u))
+ .filter((u) => isHttpUrl(u) && !seen.has(u) && seen.add(u));
+ if (this.urls.length === 0) {
+ throw new Error('RpcFallback: no valid http(s) RPC endpoint configured');
+ }
this.commitment = commitment;
this.currentIndex = 0;
this.failCounts = new Array(this.urls.length).fill(0);
diff --git a/api/avatars/_actions.js b/api/avatars/_actions.js
index 5c34f504f..5302093ba 100644
--- a/api/avatars/_actions.js
+++ b/api/avatars/_actions.js
@@ -68,7 +68,12 @@ function maskSubmitError(res, err) {
// returned to any client (browser or bearer-token API consumer). Shared with the
// forge text→3D poll (api/forge.js) so both pipelines mask identically; re-exported
// here because the avatar tests and handlers already import it from this module.
-export { sanitizeJobError } from '../_lib/provider-job-error.js';
+// A bare `export { x } from './mod'` re-export does NOT bind `x` in this module's
+// scope, so the regenerate-status poll handler below (which calls sanitizeJobError)
+// threw `ReferenceError: sanitizeJobError is not defined` at runtime. Import the
+// local binding and re-export it so both this module and its consumers resolve it.
+import { sanitizeJobError } from '../_lib/provider-job-error.js';
+export { sanitizeJobError };
// ── presign ───────────────────────────────────────────────────────────────────
diff --git a/api/cron/[name].js b/api/cron/[name].js
index 2fd71dbf6..97d2dfdd4 100644
--- a/api/cron/[name].js
+++ b/api/cron/[name].js
@@ -201,6 +201,19 @@ const ERC8004_METADATA_BATCH = 25;
const ERC8004_FETCH_TIMEOUT_MS = 10_000;
+// Headers sent on every EVM JSON-RPC POST. Node/undici's fetch sends no
+// `User-Agent` by default, and PublicNode's gateway (ethereum.publicnode.com,
+// base.publicnode.com, the *-sepolia-rpc.publicnode.com testnet hosts) hard-403s
+// any request without an identifiable UA — which blanked the last lane of the
+// failover chain and surfaced as the "RPC HTTP 403 from …publicnode.com" storm in
+// the index-delegations and erc8004 crawl stages. A descriptive bot UA satisfies
+// the gateway; `accept` keeps strict providers from negotiating a non-JSON body.
+const EVM_RPC_HEADERS = {
+ 'content-type': 'application/json',
+ accept: 'application/json',
+ 'user-agent': 'three.ws-onchain-indexer/1.0 (+https://three.ws)',
+};
+
// Metadata URLs are external, user-controlled (on-chain agentURI) and often
// point at slow IPFS gateways. Cap each fetch tighter than RPC calls so a single
// hung gateway can't stall the whole enrichment batch toward Vercel's 300s kill.
@@ -407,7 +420,7 @@ async function erc8004RpcCall(urls, method, params) {
try {
const res = await fetch(url, {
method: 'POST',
- headers: { 'Content-Type': 'application/json' },
+ headers: EVM_RPC_HEADERS,
body: JSON.stringify({ jsonrpc: '2.0', id: 1, method, params }),
signal: ac.signal,
});
@@ -811,7 +824,7 @@ async function idxRpc(urls, method, params) {
try {
const res = await fetch(url, {
method: 'POST',
- headers: { 'content-type': 'application/json' },
+ headers: EVM_RPC_HEADERS,
body: JSON.stringify({ jsonrpc: '2.0', id: 1, method, params }),
signal: ac.signal,
});
diff --git a/data/changelog.json b/data/changelog.json
index 2f489ad11..9ada5201b 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,22 @@
{
"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-06-24",
+ "title": "Reliability fixes: marketplace cards, avatar build status, and on-chain indexing",
+ "summary": "A round of stability fixes. Marketplace cards for bred agents that carry a rare-pedigree badge no longer fail to render — every card in the grid shows cleanly again. The 3D avatar build-status check now returns its progress without erroring, so the create flow keeps updating while your model is generated. And the cross-chain agent indexer that powers Explore now identifies itself to its RPC providers, so a provider that was rejecting anonymous requests no longer blanks out fresh on-chain agent data.",
+ "tags": [
+ "fix"
+ ]
+ },
+ {
+ "date": "2026-06-24",
+ "title": "Fixed the live $THREE price, bonding-curve, and trade-safety reads",
+ "summary": "The on-chain reads that power the live $THREE price and bonding-curve view, plus the pre-trade safety check that tells you whether a coin can actually be sold before you buy, were erroring out whenever the server's Solana RPC address was configured with a small formatting slip — a missing https://, a websocket address, or stray quotes. Those reads now repair the address automatically and always fall through to a healthy public node, so the price widget and the safety verdict load reliably instead of failing. No action needed on your end.",
+ "tags": [
+ "fix"
+ ]
+ },
{
"date": "2026-06-24",
"title": "Any AI agent can now join Agora's workforce over MCP and earn $THREE",
diff --git a/public/changelog.json b/public/changelog.json
index 8b49ede40..87f9c6ebd 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-24T12:05:38.856Z",
+ "generated_at": "2026-06-24T13:47:33.738Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -305,6 +305,16 @@
"fix"
]
},
+ {
+ "date": "2026-06-24",
+ "type": "update",
+ "title": "Fixed the live $THREE price, bonding-curve, and trade-safety reads",
+ "summary": "The on-chain reads that power the live $THREE price and bonding-curve view, plus the pre-trade safety check that tells you whether a coin can actually be sold before you buy, were erroring out whenever the server's Solana RPC address was configured with a small formatting slip — a missing https://, a websocket address, or stray quotes. Those reads now repair the address automatically and always fall through to a healthy public node, so the price widget and the safety verdict load reliably instead of failing. No action needed on your end.",
+ "link": null,
+ "tags": [
+ "fix"
+ ]
+ },
{
"date": "2026-06-24",
"type": "update",
@@ -376,6 +386,16 @@
"feature"
]
},
+ {
+ "date": "2026-06-24",
+ "type": "update",
+ "title": "Reliability fixes: marketplace cards, avatar build status, and on-chain indexing",
+ "summary": "A round of stability fixes. Marketplace cards for bred agents that carry a rare-pedigree badge no longer fail to render — every card in the grid shows cleanly again. The 3D avatar build-status check now returns its progress without erroring, so the create flow keeps updating while your model is generated. And the cross-chain agent indexer that powers Explore now identifies itself to its RPC providers, so a provider that was rejecting anonymous requests no longer blanks out fresh on-chain agent data.",
+ "link": null,
+ "tags": [
+ "fix"
+ ]
+ },
{
"date": "2026-06-24",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 43e39fc20..187d0346b 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -230,6 +230,14 @@
<category>fix</category>
<description>The lite Pose Studio that runs inline on demo pages now loads in production. The /pose-mini route was being built but had no production rewrite, so the embedded poser returned a 404 instead of letting you orbit and pose the mannequin in place. The route is now wired and the embed loads live.</description>
</item>
+ <item>
+ <title>Fixed the live $THREE price, bonding-curve, and trade-safety reads</title>
+ <link>https://three.ws/changelog</link>
+ <guid isPermaLink="false">2026-06-24:Fixed the live $THREE price, bonding-curve, and trade-safety reads</guid>
+ <pubDate>Wed, 24 Jun 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>The on-chain reads that power the live $THREE price and bonding-curve view, plus the pre-trade safety check that tells you whether a coin can actually be sold before you buy, were erroring out whenever the server's Solana RPC address was configured with a small formatting slip — a missing https://, a websocket address, or stray quotes. Those reads now repair the address automatically and always fall through to a healthy public node, so the price widget and the safety verdict load reliably instead of failing. No action needed on your end.</description>
+ </item>
<item>
<title>Join Agora: post bounties, hire citizens, and vouch — as a real human</title>
<link>https://three.ws/agora</link>
@@ -286,6 +294,14 @@
<category>feature</category>
<description>Agora's economy now has real demand, not just supply. Citizens post genuine bounties to the job board — each one escrows its reward on-chain (in $THREE on mainnet; devnet uses test SOL while the flow is proven) — and other citizens claim and complete them to get paid and build reputation. High-value jobs sit behind a reputation ladder: apprentice work is open to everyone, while journeyman and master bounties require a track record, so newcomers grind up the ranks. Agents also hire each other — a citizen working a big job can pay a second agent for a sub-task, so value flows human → agent → sub-agent. The board only ever shows work that's genuinely still open: a background sweep re-reads the chain and drops anything that's been claimed, cancelled, or expired. And there's no fake infinite money — a patron that runs out of budget simply stops posting.</description>
</item>
+ <item>
+ <title>Reliability fixes: marketplace cards, avatar build status, and on-chain indexing</title>
+ <link>https://three.ws/changelog</link>
+ <guid isPermaLink="false">2026-06-24:Reliability fixes: marketplace cards, avatar build status, and on-chain indexing</guid>
+ <pubDate>Wed, 24 Jun 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>A round of stability fixes. Marketplace cards for bred agents that carry a rare-pedigree badge no longer fail to render — every card in the grid shows cleanly again. The 3D avatar build-status check now returns its progress without erroring, so the create flow keeps updating while your model is generated. And the cross-chain agent indexer that powers Explore now identifies itself to its RPC providers, so a provider that was rejecting anonymous requests no longer blanks out fresh on-chain agent data.</description>
+ </item>
<item>
<title>The IBM × three.ws partnership page now updates itself after it ships</title>
<link>https://three.ws/ibm/hello</link>
diff --git a/public/features.json b/public/features.json
index f2687fb83..10ed3b0fb 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-24T12:05:38.839Z",
+ "generated_at": "2026-06-24T13:47:33.721Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/scripts/restore-missing-tables.sh b/scripts/restore-missing-tables.sh
new file mode 100755
index 000000000..6cf2a8b53
--- /dev/null
+++ b/scripts/restore-missing-tables.sh
@@ -0,0 +1,83 @@
+#!/usr/bin/env bash
+# Restore the tables that exist on the LEGACY Neon DB but are MISSING on the new
+# canonical DB after the 2026-06-24 Vercel account switch. This is the data-safe
+# fix for the production "relation \"X\" does not exist" storm (~98% of error
+# volume in the 2026-06-24 log export): it copies ONLY the tables the new DB
+# lacks, so anything the new DB has already written since the switch is left
+# completely untouched.
+#
+# Usage:
+# export OLD_URL='postgres://…ep-floral-snow-afc6cye1…/neondb?sslmode=require' # SOURCE (legacy), UNPOOLED
+# export NEW_URL='postgres://…ep-curly-cherry-a6cvth74…/neondb?sslmode=require' # DESTINATION (canonical), UNPOOLED
+# bash scripts/restore-missing-tables.sh # dry-run: prints the missing-table plan
+# bash scripts/restore-missing-tables.sh --apply # actually copy the missing tables
+#
+# Notes:
+# - Use the UNPOOLED endpoints (no `-pooler`): pgbouncer breaks pg_dump.
+# - Needs postgresql-client-17 (both DBs are PG 17.10).
+# - Extensions: pg_dump --schema=public omits CREATE EXTENSION, and the schema
+# uses citext/pg_trgm/pgcrypto, so we pre-create them on the destination.
+set -euo pipefail
+
+APPLY=0
+[[ "${1:-}" == "--apply" ]] && APPLY=1
+
+: "${OLD_URL:?set OLD_URL to the legacy (source) unpooled connection string}"
+: "${NEW_URL:?set NEW_URL to the canonical (destination) unpooled connection string}"
+
+WORK="$(mktemp -d)"
+trap 'rm -rf "$WORK"' EXIT
+
+list_tables() { # $1=conn -> base-table names in public, one per line, sorted
+ psql "$1" -At -c \
+ "select tablename from pg_tables where schemaname='public' order by tablename"
+}
+
+echo "› Enumerating public tables on both databases…"
+list_tables "$OLD_URL" > "$WORK/old.txt"
+list_tables "$NEW_URL" > "$WORK/new.txt"
+comm -23 "$WORK/old.txt" "$WORK/new.txt" > "$WORK/missing.txt"
+
+OLD_N=$(wc -l < "$WORK/old.txt"); NEW_N=$(wc -l < "$WORK/new.txt"); MISS_N=$(wc -l < "$WORK/missing.txt")
+echo " legacy (source): $OLD_N tables"
+echo " canonical (dest): $NEW_N tables"
+echo " missing on dest: $MISS_N tables"
+echo
+if [[ "$MISS_N" -eq 0 ]]; then
+ echo "✓ Destination already has every legacy table. Nothing to restore."
+ exit 0
+fi
+echo "Missing tables to copy:"
+sed 's/^/ - /' "$WORK/missing.txt"
+echo
+
+if [[ "$APPLY" -ne 1 ]]; then
+ echo "Dry run. Re-run with --apply to copy the tables above (schema + data)."
+ exit 0
+fi
+
+# Build -t flags for exactly the missing tables.
+TFLAGS=()
+while IFS= read -r t; do [[ -n "$t" ]] && TFLAGS+=( -t "public.\"$t\"" ); done < "$WORK/missing.txt"
+
+echo "› Pre-creating required extensions on destination…"
+psql "$NEW_URL" -v ON_ERROR_STOP=1 -c \
+ "CREATE EXTENSION IF NOT EXISTS citext; CREATE EXTENSION IF NOT EXISTS pg_trgm; CREATE EXTENSION IF NOT EXISTS pgcrypto;"
+
+echo "› Dumping $MISS_N missing tables from legacy (custom format)…"
+pg_dump "$OLD_URL" -Fc --no-owner --no-acl "${TFLAGS[@]}" -f "$WORK/missing.dump"
+
+echo "› Restoring into canonical DB (parallel, no-owner/no-acl)…"
+# --no-acl/--no-owner: Neon roles differ across accounts. A benign
+# "schema public already exists" is expected and harmless.
+pg_restore --no-owner --no-acl -j 4 -d "$NEW_URL" "$WORK/missing.dump" || true
+
+echo "› Verifying the previously-missing tables now exist with row counts…"
+while IFS= read -r t; do
+ [[ -z "$t" ]] && continue
+ cnt=$(psql "$NEW_URL" -At -c "select count(*) from public.\"$t\"" 2>/dev/null || echo "MISSING")
+ printf ' %-34s %s\n' "$t" "$cnt"
+done < "$WORK/missing.txt"
+
+echo
+echo "✓ Done. Re-check production: the relation-does-not-exist errors should stop."
diff --git a/src/marketplace.js b/src/marketplace.js
index c0b22793b..71ee0c95d 100644
--- a/src/marketplace.js
+++ b/src/marketplace.js
@@ -4512,6 +4512,7 @@ function renderCard(a) {
const bmOn = bookmarkedAgents.has(a.id);
const starBtn = `<button type="button" class="card-star${bmOn ? ' on' : ''}" data-agent-bm="${escapeHtml(a.id)}" aria-label="Bookmark agent" aria-pressed="${bmOn}" title="${bmOn ? 'Remove bookmark' : 'Bookmark agent'}">${bmOn ? '★' : '☆'}</button>`;
const onchainBadge = onchainBadgeHTML(a);
+ const pedigreeBadge = pedigreeBadgeHTML(a);
return `<div class="card card--interactive market-card-agent" role="link" tabindex="0" data-id="${a.id}">
${previewStrip}
${priceBadge}
diff --git a/tests/pumpkit-helpers.test.js b/tests/pumpkit-helpers.test.js
index 25f1cc7ff..cb5e31946 100644
--- a/tests/pumpkit-helpers.test.js
+++ b/tests/pumpkit-helpers.test.js
@@ -54,8 +54,13 @@ describe('solana/rpc-fallback', () => {
expect(deriveWsUrl('http://localhost:8899')).toBe('ws://localhost:8899');
});
- it('throws when constructed without a primary url', () => {
- expect(() => new RpcFallback({})).toThrow(/primary url/i);
+ it('throws when constructed without any valid http(s) endpoint', () => {
+ expect(() => new RpcFallback({})).toThrow(/no valid http\(s\) RPC endpoint/i);
+ // A malformed-only set (dotless typo, junk, ftp://) is rejected up front
+ // rather than crashing later inside new Connection with assertEndpointUrl.
+ expect(() => new RpcFallback({ url: 'helius', fallbackUrls: ['also junk', 'ftp://y'] })).toThrow(
+ /no valid http\(s\) RPC endpoint/i,
+ );
});
it('createRpcFallback returns a working instance', () => {
diff --git a/tests/solana-rpc-url-guard.test.js b/tests/solana-rpc-url-guard.test.js
new file mode 100644
index 000000000..9bdcfba4f
--- /dev/null
+++ b/tests/solana-rpc-url-guard.test.js
@@ -0,0 +1,152 @@
+import { describe, it, expect, beforeEach, afterEach } from 'vitest';
+import {
+ isHttpUrl,
+ normalizeRpcUrl,
+ solanaRpcEndpoints,
+} from '../api/_lib/solana/connection.js';
+import { RpcFallback, rpcFallbackFromEnv } from '../api/_lib/solana/rpc-fallback.js';
+
+// Regression guard for the production 500 storm on /api/pump/curve and
+// /api/pump/safety:
+// TypeError: Endpoint URL must start with `http:` or `https:`.
+// at assertEndpointUrl ... at new Connection ...
+// at RpcFallback.getConnection ... / at solanaConnection ...
+// A malformed SOLANA_RPC_URL (scheme-less host, ws:// URL, quoted value) was pinned
+// first in the endpoint list and handed straight to `new Connection`, which rejects
+// anything that isn't http(s). Every URL must now be repaired or filtered out before
+// it can reach the constructor.
+
+describe('isHttpUrl', () => {
+ it('accepts http(s) URLs only', () => {
+ expect(isHttpUrl('https://mainnet.helius-rpc.com/?api-key=x')).toBe(true);
+ expect(isHttpUrl('http://localhost:8899')).toBe(true);
+ });
+ it('rejects ws/wss, scheme-less, empty and non-string values', () => {
+ expect(isHttpUrl('wss://mainnet.helius-rpc.com')).toBe(false);
+ expect(isHttpUrl('mainnet.helius-rpc.com')).toBe(false);
+ expect(isHttpUrl('')).toBe(false);
+ expect(isHttpUrl(null)).toBe(false);
+ expect(isHttpUrl(undefined)).toBe(false);
+ expect(isHttpUrl(12345)).toBe(false);
+ });
+});
+
+describe('normalizeRpcUrl — repairs the malformed env shapes that 500ed new Connection', () => {
+ it('prepends https:// to a scheme-less host', () => {
+ expect(normalizeRpcUrl('mainnet.helius-rpc.com/?api-key=abc')).toBe(
+ 'https://mainnet.helius-rpc.com/?api-key=abc',
+ );
+ });
+ it('maps a websocket URL to its http(s) form', () => {
+ expect(normalizeRpcUrl('wss://solana-rpc.publicnode.com')).toBe('https://solana-rpc.publicnode.com');
+ expect(normalizeRpcUrl('ws://localhost:8900')).toBe('http://localhost:8900');
+ });
+ it('strips a single pair of surrounding quotes', () => {
+ expect(normalizeRpcUrl('"https://api.mainnet-beta.solana.com"')).toBe('https://api.mainnet-beta.solana.com');
+ expect(normalizeRpcUrl("'https://api.mainnet-beta.solana.com'")).toBe('https://api.mainnet-beta.solana.com');
+ });
+ it('repairs the Helius REST host into the JSON-RPC host', () => {
+ expect(normalizeRpcUrl('https://api-mainnet.helius-rpc.com/?api-key=k')).toMatch(
+ /^https:\/\/mainnet\.helius-rpc\.com\//,
+ );
+ });
+ it('returns an already-clean URL unchanged (no trailing-slash churn)', () => {
+ expect(normalizeRpcUrl('https://api.mainnet-beta.solana.com')).toBe('https://api.mainnet-beta.solana.com');
+ });
+ it('returns "" for empty or unsalvageable values', () => {
+ expect(normalizeRpcUrl('')).toBe('');
+ expect(normalizeRpcUrl(' ')).toBe('');
+ expect(normalizeRpcUrl(null)).toBe('');
+ expect(normalizeRpcUrl('https://has a space.com')).toBe('');
+ expect(normalizeRpcUrl('ftp://example.com')).toBe('');
+ });
+});
+
+describe('solanaRpcEndpoints — every entry is Connection-safe', () => {
+ const saved = {};
+ const keys = ['SOLANA_RPC_URL', 'SOLANA_RPC_URL_DEVNET', 'SOLANA_RPC_FALLBACK_URLS', 'HELIUS_API_KEY', 'ALCHEMY_API_KEY'];
+ beforeEach(() => {
+ for (const k of keys) saved[k] = process.env[k];
+ for (const k of keys) delete process.env[k];
+ });
+ afterEach(() => {
+ for (const k of keys) {
+ if (saved[k] === undefined) delete process.env[k];
+ else process.env[k] = saved[k];
+ }
+ });
+
+ it('repairs a scheme-less primary and pins it first', () => {
+ process.env.SOLANA_RPC_URL = 'mainnet.helius-rpc.com/?api-key=test';
+ const eps = solanaRpcEndpoints('mainnet');
+ expect(eps[0]).toBe('https://mainnet.helius-rpc.com/?api-key=test');
+ expect(eps.every(isHttpUrl)).toBe(true);
+ });
+
+ it('drops an unsalvageable primary and falls back to a public node', () => {
+ process.env.SOLANA_RPC_URL = 'this is not a url at all';
+ const eps = solanaRpcEndpoints('mainnet');
+ expect(eps.length).toBeGreaterThan(0);
+ expect(eps.every(isHttpUrl)).toBe(true);
+ expect(eps).toContain('https://api.mainnet-beta.solana.com');
+ });
+
+ it('filters malformed operator fallbacks out of the list', () => {
+ process.env.SOLANA_RPC_FALLBACK_URLS = 'wss://good.example.com, , garbage value, https://fine.example.com';
+ const eps = solanaRpcEndpoints('mainnet');
+ expect(eps.every(isHttpUrl)).toBe(true);
+ expect(eps).toContain('https://good.example.com'); // wss repaired
+ expect(eps).toContain('https://fine.example.com');
+ expect(eps).not.toContain('garbage value');
+ });
+
+ it('never returns an empty list even with no env configured', () => {
+ const eps = solanaRpcEndpoints('mainnet');
+ expect(eps.length).toBeGreaterThan(0);
+ expect(eps.every(isHttpUrl)).toBe(true);
+ });
+});
+
+describe('RpcFallback — never hands new Connection a non-http(s) URL', () => {
+ const saved = {};
+ const keys = ['SOLANA_RPC_URL', 'HELIUS_API_KEY', 'ALCHEMY_API_KEY', 'SOLANA_RPC_FALLBACK_URLS'];
+ beforeEach(() => {
+ for (const k of keys) saved[k] = process.env[k];
+ for (const k of keys) delete process.env[k];
+ });
+ afterEach(() => {
+ for (const k of keys) {
+ if (saved[k] === undefined) delete process.env[k];
+ else process.env[k] = saved[k];
+ }
+ });
+
+ it('repairs a bad primary and getConnection() succeeds', () => {
+ const rpc = new RpcFallback({ url: 'wss://solana-rpc.publicnode.com', fallbackUrls: [] });
+ expect(rpc.currentUrl).toBe('https://solana-rpc.publicnode.com');
+ // The real prod crash was here — must not throw.
+ expect(() => rpc.getConnection()).not.toThrow();
+ });
+
+ it('keeps only http(s) endpoints and dedupes while preserving order', () => {
+ const rpc = new RpcFallback({
+ url: 'garbage',
+ fallbackUrls: ['https://a.example.com', 'wss://a.example.com', 'https://b.example.com'],
+ });
+ // 'garbage' dropped; 'wss://a' repairs to https://a == already present, deduped.
+ expect(rpc.urls).toEqual(['https://a.example.com', 'https://b.example.com']);
+ });
+
+ it('throws a clear error when no endpoint is salvageable', () => {
+ expect(() => new RpcFallback({ url: 'garbage', fallbackUrls: ['also bad', 'ftp://x'] })).toThrow(
+ /no valid http\(s\) RPC endpoint/,
+ );
+ });
+
+ it('rpcFallbackFromEnv tolerates a malformed SOLANA_RPC_URL (prod regression)', () => {
+ process.env.SOLANA_RPC_URL = 'mainnet.helius-rpc.com/?api-key=test';
+ const rpc = rpcFallbackFromEnv({ network: 'mainnet' });
+ expect(rpc.currentUrl).toBe('https://mainnet.helius-rpc.com/?api-key=test');
+ expect(() => rpc.getConnection()).not.toThrow();
+ });
+});