Sur

ClawSkills 作者 nkhromovweway v1.0.0

源码 ↗

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install clawskills:nkhromovweway~sur-pub
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/clawskills%3Ankhromovweway~sur-pub/file -o sur-pub.md
Git 仓库获取源码
git clone https://github.com/openclaw/skills/commit/aaa4425237b6b73d3b1598efa707eb4323a4bf4a
---
name: SURGE OpenClaw (Dev)
description: Create and trade tokens on SURGE via API (DEV). Full lifecycle — wallet setup, one-time free funding, token launch, and trading (pre-DEX + post-DEX). Base URL: back.surgedevs.xyz.
author: SURGE
version: 6.0.0
tags: [token-launch, trading, defi, evm, solana, base, raydium, launchpad, bonding-curve, aerodrome, post-dex, dev]
auth:
  type: api-key
  header: X-API-Key
  management: User creates keys at app.surgedevs.xyz → Settings → API Keys
---

# SURGE OpenClaw — AI Agent Skill (Dev)

**This is the DEV skill.** API base URL: **https://back.surgedevs.xyz**. Use this for development and testing.

You are helping the user create and trade tokens on the SURGE launchpad. This document tells you **everything** you need to know. Follow it step by step.

---

## TL;DR — What This Skill Does

- User can **create a token** on EVM (Base) or Solana — for **free** (one time)
- After creation, user can **buy and sell** tokens — both pre-DEX (bonding curve / launchpad) **and** post-DEX (Aerodrome on Base / Raydium CPMM on Solana)
- **Trading auto-routes** by token phase — same endpoints work for both pre-DEX and post-DEX
- All wallets are **server-managed** — no private keys needed from user
- You (the AI agent) handle the entire process through API calls

---

## Before You Start — Checklist

Before doing anything, make sure you have:

| # | What | How to check |
|---|------|-------------|
| 1 | **API Key** | User gives you a key starting with `sk-surge-...`. If they don't have one — see "How to Get an API Key" below. |
| 2 | **Working API** | Call `GET /openclaw/launch-info`. If 401 — key is bad. If 200 — you're good. |

### How to Get an API Key

If the user doesn't have an API key yet, tell them exactly this:

> **To get your API key (DEV):**
> 1. Go to [app.surgedevs.xyz](https://app.surgedevs.xyz)
> 2. Sign up / log in (you can use your wallet, email, or social login)
> 3. Go to **Settings → API Keys**
> 4. Click **Generate** and give it a name (e.g. "My Agent")
> 5. **Copy the key immediately** — it's shown only once!
> 6. Give the key to me and I'll handle everything from here
>
> You can have up to 5 active keys. If you lose one, revoke it and create a new one.

Once you have the key, proceed to Step 0.

---

## Step 0: Load Configuration (do this silently)

Call this **before talking to the user about tokens**:

```
GET /openclaw/launch-info
Header: X-API-Key: {key}
Base URL: https://back.surgedevs.xyz
```

This gives you live data — fees, chains, categories. **Never hardcode these values.**

You now know:
- Which chains are available and their fees
- `minBalance` — how much the wallet needs
- Available categories for tokens
- File size limits

If this fails with **401** — tell the user their API key is invalid and point them to app.surgedevs.xyz → Settings → API Keys.

---

## Step 1: Create a Wallet

The user needs a server-managed wallet. One wallet per chain type (EVM or Solana).

**For EVM (Base, BNB):**
```
POST /openclaw/wallet/create
Header: X-API-Key: {key}
```

**For Solana:**
```
POST /openclaw/wallet/create-solana
Header: X-API-Key: {key}
```

Response:
```json
{
  "walletId": "vun3srwayi6z1h8momm83tdr",
  "address": "0xD29c...Be2E",
  "chainType": "EVM",
  "needsFunding": true,
  "isNew": true
}
```

- Save `walletId` — you'll need it for everything
- If `isNew: false` — wallet already existed, that's fine
- The wallet is linked to the user's account

**Tell the user:**
> I've created a server-managed wallet for you. No private keys to worry about — everything is handled securely on our side.

---

## Step 2: Fund the Wallet (ONE TIME FREE)

**Important rule: The platform funds each wallet exactly ONCE for free.** This covers the gas + minimum buy for the first token launch. After that, the user pays for everything themselves.

```
POST /openclaw/wallet/{walletId}/fund
Header: X-API-Key: {key}
```

**If successful** (`needsFunding: false`):
> Your wallet has been funded! You get one free token launch from SURGE — gas and fees are covered.

**If already funded** (second call):
> This wallet was already funded. The free launch is a one-time gift. If you need more funds (for trading, etc.), send ETH/SOL directly to your wallet address: `{address}`

**If funding fails** (e.g. platform funder is low):
> Automatic funding didn't go through right now. You can either:
> 1. Try again in a few minutes
> 2. Send funds manually to your wallet address: `{address}` on the Base network
>
> The minimum balance needed is **{minBalance}** (from launch-info).

---

## Step 3: Check Balance

```
GET /openclaw/wallet/{walletId}/balance
Header: X-API-Key: {key}
```

Response includes `sufficient: true/false` and `minRequired` per chain.

**If `sufficient: true`** — proceed to token creation.

**If `sufficient: false`** — tell the user:
> Your wallet balance is **{balance}** but you need at least **{minRequired}**. Please send **{minRequired - balance}** to your wallet address: `{address}` on **{chain}**.

---

## Step 4: Collect Token Information

Now collect what's needed to launch the token. **Ask one group at a time. Don't dump everything at once.**

### 4a. Name, Ticker, Description (REQUIRED)

Ask:
> Let's create your token! I need three things to start:
> 1. **Token name** — the full name (e.g. "NeuralNet Token")
> 2. **Ticker** — short symbol, 3-5 letters (e.g. "NNET")
> 3. **Description** — one sentence about what the token is for (e.g. "Decentralized AI compute marketplace")

Rules:
- If user gives only a ticker — ask for the full name
- If user gives a paragraph as description — say: "Great, I'll use that as the detailed description. Can you give me a one-liner tagline too?"
- **Never make up names, tickers, or descriptions yourself**

### 4b. Logo Image (REQUIRED)

Ask:
> Now I need a logo for your token. Send me a **direct link** to an image file (PNG, JPG, or WEBP, max 5MB).

**How to get a direct image link:**

If the user has a file on their computer, tell them:

> Upload your image to get a direct link. The easiest way:
> ```
> curl -F "file=@your-logo.png" https://file.io
> ```
> This will give you a direct URL. Send it to me!
>
> **Other options:**
> - [imgur.com](https://imgur.com) → upload → right-click image → "Copy image address" (must start with `i.imgur.com`)
> - [postimages.org](https://postimages.org) → upload → copy "Direct link"
> - Any public URL that ends in .png / .jpg / .webp

**Validate before accepting:**
- URL must start with `http://` or `https://`
- Must be a **direct file link**, not a gallery page
  - GOOD: `https://i.imgur.com/abc123.png`, `https://file.io/abc123`
  - BAD: `https://imgur.com/abc123` (gallery page)
  - BAD: `https://drive.google.com/file/d/...` (preview page, not direct)

### 4c. Chain (REQUIRED)

Build this question from launch-info data:

> Which blockchain do you want to launch on?
>
> Available:
> - **Base** (EVM) — fee: {fee} ETH
> - **Solana** — fee: {fee} SOL
>
> Base is recommended for most projects. Solana is great for high-speed, low-cost trading.

Map the user's choice to the correct `chainId` from launch-info. The user should never see raw IDs.

**This determines everything else:**
- EVM → use `/launch`, needs `ethAmount`
- Solana → use `/launch-solana`, needs `preBuyAmount`

### 4d. Initial Buy Amount (REQUIRED)

**If EVM chain:**

Ask:
> How much ETH do you want for the initial buy? This buys the very first tokens when your contract launches.
>
> - Minimum: slightly more than **{fee} ETH** (the contract fee)
> - Recommended: **{fee × 2} ETH** for a good start
> - This determines the starting price — bigger amount = higher starting price

| User says | What to do |
|-----------|-----------|
| Less than or equal to fee | "The contract fee is {fee} ETH. Your amount must be higher. I'd recommend {fee × 2}." |
| Reasonable (0.01–1 ETH) | Accept |
| Very large (10+ ETH) | "That's {amount} ETH — are you sure?" |

**If Solana chain:**

First ask which currency