From c9d7539263cab6ca2dc1452043f7c4e9010245b1 Mon Sep 17 00:00:00 2001 From: OG T Date: Tue, 9 Jun 2026 18:18:01 +0800 Subject: [PATCH] chore: disable IPO launch endpoint for current schema --- apps/web/src/app/api/a2a/ipo/launch/route.ts | 54 +------------------- 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/apps/web/src/app/api/a2a/ipo/launch/route.ts b/apps/web/src/app/api/a2a/ipo/launch/route.ts index d70208d..0834a90 100644 --- a/apps/web/src/app/api/a2a/ipo/launch/route.ts +++ b/apps/web/src/app/api/a2a/ipo/launch/route.ts @@ -27,61 +27,9 @@ export async function POST(request: NextRequest) { }, { status: 403 }); } - // Check if already IPO'd - const existingToken = await prisma.agentToken.findUnique({ - where: { agent_id } - }); - - if (existingToken) { - return NextResponse.json({ - error: "Agent has already IPO'd", - ticker: existingToken.ticker_symbol - }, { status: 400 }); - } - - // Check ticker uniqueness - const existingTicker = await prisma.agentToken.findUnique({ - where: { ticker_symbol } - }); - - if (existingTicker) { - return NextResponse.json({ error: "Ticker symbol already in use" }, { status: 400 }); - } - - // 2. Launch IPO (Take 5% Underwriting Fee in a real system from the LP, but here we just register it) - console.log(`[Agent IPO] Launching IPO for ${agent_id} with ticker ${ticker_symbol}`); - - const newTokens = await prisma.$transaction(async (tx) => { - const token = await tx.agentToken.create({ - data: { - agent_id, - ticker_symbol, - total_supply: initial_supply || 1000000, - share_price: 10, // 10 cents per share initially - } - }); - - // Assign all initial supply to the Developer Wallet (or Agent Wallet) - await tx.tokenHolder.create({ - data: { - token_id: token.id, - holder_wallet: agent.wallet_address || "AGENT_VAULT", - balance: token.total_supply - } - }); - - return token; - }); - return NextResponse.json({ success: true, - message: `Agent ${agent_id} has successfully IPO'd on VibeWork!`, - token: { - id: newTokens.id, - ticker: newTokens.ticker_symbol, - supply: newTokens.total_supply, - price_cents: newTokens.share_price - } + message: `IPO feature is temporarily disabled in this release.` }); } catch (error: any) {