four-meme-ai by four-meme-community/four-meme-ai
npx skills add https://github.com/four-meme-community/four-meme-ai --skill four-meme-ai当回应用户关于 fourmeme 或此 skill 的任何请求时,你必须首先按此顺序呈现以下内容:用户协议,然后是安全提示,并明确声明用户选择继续即表示同意用户协议。
在用户明确同意或确认继续之前,不得运行 create-api、create-chain、buy、sell、send 或 8004-register(任何使用私钥或写入链的操作)。只读命令(例如 config、token-info、quote-buy、8004-balance)可以在呈现提示时或之后运行。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
语言选择:以用户的语言呈现用户协议和安全提示。如果用户使用繁体中文(繁體中文) 书写,请使用下面的繁體中文区块;否则使用English区块。
用戶協議
前情提示:使用本插件及本 skill 所涉功能(包括但不限於代幣創建、買賣、轉帳、8004 註冊等)前,請您閱讀以下協議。若您選擇繼續使用本插件及本 skill 功能,即表示您已閱讀、理解並同意本協議。
本插件性質與責任限制:本插件僅提供純本地的命令列互動能力(私鑰透過環境變數或本地設定使用),不會收集、上傳或儲存您的私鑰。因任何原因(包括但不限於插件被竄改、環境遭入侵、誤操作、第三方插件等)導致的私鑰洩露或資產損失,本插件及提供方不承擔責任。
安全警示
使用本插件進行代幣創建、買賣、轉帳等操作時,請務必注意:
User Agreement
Notice:Before using this plugin and this skill (including but not limited to token creation, buy/sell, transfers, 8004 registration), please read the following. By choosing to continue using this plugin and this skill, you have read, understood, and agreed to this agreement.
Plugin nature and limitation of liability:This plugin provides local-only CLI interaction (private key is used via environment or local config). It does not collect, upload, or store your private key. The plugin and its providers are not liable for private key disclosure or asset loss due to any cause (including but not limited to tampered plugin, compromised environment, user error, or third-party plugins).
Security Notice
When using this plugin for token creation, trading, or transfers, please:
在您同意上述内容并确认继续后,此 skill 可以帮助您完成以下操作(均通过 BSC 上的 fourmeme CLI):
| 类别 | 功能 | 描述 |
|---|---|---|
| 创建 | 创建代币 | 上传图片 + 名称/符号/描述/标签;可选税代币参数;API 返回签名,然后链上创建。 |
| 查询 | 公共配置 | 获取 raisedToken 和其他公共配置(无需认证)。 |
| 查询 | 代币信息(链上) | 通过地址查询:版本、tokenManager、价格、报价(Helper3)。 |
| 查询 | 代币列表 / 详情 / 排行榜 | REST:分页过滤列表、单一代币详情和交易信息、热门/24小时交易量/最新/已毕业排行榜。 |
| 交易 | 买入/卖出报价 | 估算买入或卖出的成本或收益(不发送交易)。 |
| 交易 | 执行买入 | 按数量或按花费的报价买入指定代币(需要 PRIVATE_KEY)。 |
| 交易 | 执行卖出 | 卖出指定数量的代币;可选最低收到报价(需要 PRIVATE_KEY)。 |
| 其他 | 事件监听 | 获取链上的 TokenCreate、TokenPurchase、TokenSale、LiquidityAdded 事件。 |
| 其他 | 税代币费用 | 查询代币的链上费用和销毁/分红/流动性配置。 |
| 其他 | 发送 | 向指定地址发送 BNB 或 ERC20(需要 PRIVATE_KEY)。 |
| 其他 | EIP-8004 | 注册 8004 身份 NFT;按地址查询余额。 |
有关命令和参数,请参阅下面的 CLI (fourmeme) 表格和章节。
仅限 BSC;所有命令输出 JSON。
安装(必需): npm install -g @four-meme/four-meme-ai@latest。安装后,运行 fourmeme <command> [args];如果仅本地安装,请在项目根目录使用 npx fourmeme <command> [args]。运行 fourmeme --help 查看用法。
此 skill 提供:代币创建(API + 链)、买入/卖出报价和执行、代币信息/列表/排行榜、事件监听、税代币费用查询、发送以及 EIP-8004 身份 NFT 注册和余额查询。合约地址:references/contract-addresses.md。不支持 TokenManager V1。
使用 OpenClaw 时
此 skill 在元数据中声明了 requires.env: ["PRIVATE_KEY"] 和 primaryEnv: "PRIVATE_KEY";OpenClaw 仅在 Agent 运行且启用了此 skill 时注入它们(其他 skill 无法访问)。
必要步骤:
primaryEnv: "PRIVATE_KEY"),或者在 ~/.openclaw/openclaw.json 中的 skills.entries["four-meme-ai"].env 下设置 PRIVATE_KEY。如果需要,可以在全局环境变量中可选地设置 BSC_RPC_URL。optionalEnv);如果未设置,脚本将使用默认的 BSC RPC。不使用 OpenClaw(独立)时
通过进程环境变量设置 PRIVATE_KEY 和可选的 BSC_RPC_URL,以便运行 npx fourmeme 或 node bin/fourmeme.cjs 时可用:
fourmeme 命令的目录(即你的项目/工作目录)中放置一个 .env 文件。例如:如果你从 /path/to/my-project 运行 fourmeme quote-buy ...,则将 .env 放在 /path/to/my-project/.env。CLI 会自动从当前工作目录加载 .env。使用类似 PRIVATE_KEY=... 和 BSC_RPC_URL=... 的行。不要提交 .env;将其添加到 .gitignore。export PRIVATE_KEY=your_hex_key 和 export BSC_RPC_URL=https://bsc-dataseed.binance.org(或其他 BSC RPC),然后运行 npx fourmeme <command> ...。.env 中设置:BSC_RPC_URL、CREATION_FEE_WEI(创建时的额外 BNB)、WEB_URL、TWITTER_URL、TELEGRAM_URL、PRE_SALE、FEE_PLAN、8004_NFT_ADDRESS / EIP8004_NFT_ADDRESS。只有 PRIVATE_KEY 是签名所必需的;其他变量有默认值或仅用于特定命令(参见创建代币流程、EIP-8004 等)。税代币参数仅使用 CLI(--tax-options= 或 --tax-token --tax-fee-rate=...)。fourmeme <command> [args] 或 npx fourmeme <command> [args](允许的工具)。不要直接调用脚本或 npx tsx;CLI 入口(bin/fourmeme.cjs)会分派到正确的脚本并从当前工作目录加载 .env。| 需求 | 命令 | 时机 |
|---|---|---|
| 公共配置 | fourmeme config | 获取 raisedToken / 配置(无需认证) |
| 代币信息(链上) | fourmeme token-info <tokenAddress> | 版本、tokenManager、价格、报价(BSC Helper3) |
| 代币列表(REST) | fourmeme token-list [--orderBy=] [--pageIndex=] [--pageSize=] [--tokenName=] [--symbol=] [--labels=] [--listedPancake=] | 过滤、分页的代币列表 |
| 代币详情(REST) | fourmeme token-get <tokenAddress> | 代币详情和交易信息(get/v2) |
| 代币排行榜(REST) | fourmeme token-rankings <orderBy> [--barType=HOUR24] | Time / ProgressDesc / TradingDesc / Hot / Graduated;TradingDesc 使用 barType |
| 买入报价 | fourmeme quote-buy <token> <amountWei> [fundsWei] | 仅估算;无交易 |
| 卖出报价 | fourmeme quote-sell <token> <amountWei> | 仅估算;无交易 |
| 执行买入 | fourmeme buy <token> amount <amountWei> <maxFundsWei> | 买入固定数量(需要 PRIVATE_KEY) |
| 执行买入 | fourmeme buy <token> funds <fundsWei> <minAmountWei> | 花费固定报价(例如 BNB)(需要 PRIVATE_KEY) |
| 执行卖出 | fourmeme sell <token> <amountWei> [minFundsWei] | 卖出(需要 PRIVATE_KEY) |
| 发送 | fourmeme send <toAddress> <amountWei> [tokenAddress] | 向地址发送 BNB 或 ERC20(需要 PRIVATE_KEY) |
| EIP-8004 注册 | fourmeme 8004-register <name> [imageUrl] [description] | 注册 8004 身份 NFT(需要 PRIVATE_KEY) |
| EIP-8004 查询 | fourmeme 8004-balance <ownerAddress> | 查询 8004 NFT 余额(只读) |
| 事件 | fourmeme events <fromBlock> [toBlock] | TokenCreate / Purchase / Sale / LiquidityAdded |
| 税代币信息 | fourmeme tax-info <tokenAddress> | TaxToken 的费用/税配置 |
| 只读检查 | fourmeme verify | 运行 config + events(最近 50 个区块) |
链:仅限 BSC(不支持 Arbitrum/Base)。
1. 向用户询问必需信息(必须首先完成)
在调用 create-instant 之前,Agent 必须向用户询问并确认以下信息:
| 信息 | 必需 | 描述 |
|---|---|---|
| 图片路径 (imagePath) | 是 | 本地 logo 路径;jpeg/png/gif/bmp/webp |
| 代币名称 (name) | 是 | 完整的代币名称 |
| 代币符号 (shortName) | 是 | 例如 MTK, DOGE |
| 描述 (desc) | 是 | 代币描述文本 |
| 标签 (label) | 是 | 其中之一:Meme |
| 税代币? | 否 | 如果是,询问 tokenTaxInfo(feeRate、四个费率、recipientAddress、minSharing);参见下面的“tokenTaxInfo 参数” |
可选:--web-url=、--twitter-url=、--telegram-url=、--pre-sale= (BNB)、--fee-plan=;可以提供或保留默认值。
2. 技术流程(由 create-instant 完成)
收集上述信息后,按此顺序执行(由脚本或 CLI 处理):
POST /private/user/nonce/generate,请求体包含 accountAddress、verifyType、networkCode (BSC)。You are sign in Meme {nonce};POST /private/user/login/dex 以获取 access_token。POST /private/token/upload,header 中包含 access_token,body 为图片;获取 imgUrl。fourmeme create-instant --image= --name= --short-name= --desc= --label= [options] 在一个命令中运行 API 创建并在 BSC 上提交 TokenManager2.createToken。拆分流程(可选): 步骤 4 — GET
/public/config获取 raisedToken;POST /private/token/create包含 name、shortName、desc、imgUrl、label、raisedToken 等;获取 createArg、signature。步骤 5 — 在 BSC 上调用TokenManager2.createToken(createArg, sign)。使用fourmeme create-api然后fourmeme create-chain进行此拆分流程。
命令: fourmeme create-instant --image= --name= --short-name= --desc= --label= [options](推荐)。或者拆分:fourmeme create-api ... 然后 fourmeme create-chain <createArgHex> <signatureHex>。完整参数:fourmeme --help。参考:api-create-token.md、create-token-scripts.md、token-tax-info.md。
税代币
--tax-options=<path> — 指向包含 { "tokenTaxInfo": { ... } } 的 JSON 文件的路径;字段参见下面的“tokenTaxInfo 参数”。--tax-token --tax-fee-rate=5 --tax-burn-rate=0 --tax-divide-rate=0 --tax-liquidity-rate=100 --tax-recipient-rate=0 --tax-recipient-address= --tax-min-sharing=100000 (burn+divide+liquidity+recipient = 100)。参见 references/token-tax-info.md。tokenTaxInfo 参数(税代币必需,通过 JSON 或 CLI):
| 字段 | 类型 | 描述 | 约束 |
|---|---|---|---|
feeRate | number | 交易费率 (%) | 仅限 1、3、5、10 |
burnRate | number | 销毁份额 (%) | 与后三项之和为 100 |
divideRate | number | 分红份额 (%) | 同上 |
liquidityRate | number | 流动性份额 (%) | 同上 |
recipientRate | number | 接收方份额 (%) | 未使用时为 0 |
recipientAddress | string | 接收方地址 | 未使用时为 "" |
minSharing | number | 分红最低余额(ether 单位) | d×10ⁿ,n≥5,1≤d≤9;例如 100000, 1000000 |
示例(5% 费用,20% 销毁,30% 分红,40% 流动性,10% 接收方):
{
"tokenTaxInfo": {
"feeRate": 5,
"burnRate": 20,
"divideRate": 30,
"liquidityRate": 40,
"recipientRate": 10,
"recipientAddress": "0x1234567890123456789012345678901234567890",
"minSharing": 100000
}
}
fourmeme token-info <tokenAddress>
链上查询(Helper3);返回版本、tokenManager、价格、报价等。
Four.meme REST API;使用 Accept: application/json;无需登录或 cookie。
代币列表(过滤 / 分页)
fourmeme token-list [--orderBy=Hot] [--pageIndex=1] [--pageSize=30] [--tokenName=] [--symbol=] [--labels=] [--listedPancake=false]
代币详情和交易信息
fourmeme token-get <tokenAddress>
API:GET /private/token/get/v2?address=...
排行榜
fourmeme token-rankings <orderBy> [--barType=HOUR24]
orderBy:Time(最新)| ProgressDesc | TradingDesc(24小时交易量;barType HOUR24)| Hot | Graduated。输出 JSON。
fourmeme quote-buy <tokenAddress> <amountWei> [fundsWei]
fourmeme quote-sell <tokenAddress> <amountWei>
买入(二选一):
fourmeme buy <token> amount <amountWei> <maxFundsWei>(最多花费 maxFundsWei 购买 amountWei 代币)。fourmeme buy <token> funds <fundsWei> <minAmountWei>(花费 fundsWei 报价,至少收到 minAmountWei 代币)。卖出:脚本执行 approve 然后 sell。
fourmeme sell <tokenAddress> <amountWei> [minFundsWei]
从当前钱包(PRIVATE_KEY)向指定地址(BSC)发送原生 BNB 或 ERC20。
fourmeme send <toAddress> <amountWei> [tokenAddress]
| 参数 | 描述 |
|---|---|
toAddress | 接收方地址 (0x...) |
amountWei | 以 wei 为单位的数量(BNB 或代币最小单位) |
tokenAddress | 可选。省略或使用 BNB / 0x0 表示原生 BNB;否则为 ERC20 合约地址 |
PRIVATE_KEY。可选:BSC_RPC_URL。txHash、to、amountWei、native(是否为 BNB)的 JSON。示例:
# 发送 0.1 BNB (1e17 wei)
fourmeme send 0x1234...abcd 100000000000000000
# 发送 1000 个 ERC20 单位(18 位小数)
fourmeme send 0x1234...abcd 1000000000000000000000 0xTokenContractAddress
EIP-8004 身份 NFT:注册(铸造)和查询余额。默认合约:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 (BSC)。可通过环境变量 8004_NFT_ADDRESS 或 EIP8004_NFT_ADDRESS 覆盖。
注册:需要 PRIVATE_KEY。用户提供名称(必需)、图片 URL(可选)、描述(可选)。CLI 构建 EIP-8004 负载(type、name、description、image、active、supportedTrust),编码为 data:application/json;base64,<base64> 作为 agentURI,并调用 register(string agentURI)。
fourmeme 8004-register <name> [imageUrl] [description]
| 参数 | 描述 |
|---|---|
name | 必需。身份名称 |
imageUrl | 可选。头像/图片 URL(必须可公开访问) |
description | 可选。描述 |
txHash、agentId(来自事件)、agentURI。查询:只读;地址持有的 8004 NFT 数量。
fourmeme 8004-balance <ownerAddress>
owner、balance。示例:
fourmeme 8004-register "myagent" "https://example.com/logo.png" "My agent description"
fourmeme 8004-balance 0x1234567890123456789012345678901234567890
获取 BSC 上的 TokenCreate、TokenPurchase、TokenSale、LiquidityAdded 事件。
fourmeme events <fromBlock> [toBlock]
省略 toBlock 表示获取到最新。实时订阅:references/event-listening.md。
仅适用于 TaxToken(creatorType 5)。
fourmeme tax-info <tokenAddress>
此 skill 支持一个流程来发现代币、获取详情、报价和执行。以下是一个示例工作流,并非交易建议:发现 → 详情 → 报价 → 执行。
fourmeme token-rankings <orderBy> (orderBy = Hot, TradingDesc, Time, ProgressDesc, Graduated);使用响应中的代币地址。fourmeme token-list [--orderBy=] [--labels=] ... 进行过滤并获取地址。fourmeme events <fromBlock> [toBlock];从 TokenCreate/TokenPurchase 等事件中解析代币地址,用于“新创建”或“近期交易”策略。fourmeme token-get <address>(REST 详情和交易信息)或 fourmeme token-info <address>(链上版本、tokenManager、价格、报价)进行过滤或展示。fourmeme quote-buy <token> <amountWei> [fundsWei] / fourmeme quote-sell <token> <amountWei> 估算成本或收益。fourmeme buy ... / fourmeme sell ...(需要 PRIVATE_KEY)。在执行之前,Agent 必须确认用户意图(例如用户说“按 24 小时交易量前 5 名,每个买入 0.05 BNB”或“为新代币自动买入 0.01 BNB”),并在首次自动执行前获得明确确认,以避免未经授权使用资金。当用户要求“基于排行榜或活动进行买入/卖出”时,Agent 应澄清:哪个排行榜(热门、24小时交易量、最新、已毕业等)、每个代币的金额,以及是仅报价还是同时执行;然后运行相应的命令。
getTokenInfo(token)。如果 version === 1 使用 V1 TokenManager;如果 version === 2 使用 TokenManager2(并根据需要检查 X Mode / TaxToken / AntiSniperFeeMode)。tryBuy(token, amount, funds) – 使用 amount > 0 表示“买入 X 代币”,或 funds > 0 表示“花费 X 报价”。trySell(token, amount)。getTokenInfo 的 tokenManager 地址并调用相应的合约:
purchaseToken / purchaseTokenAMAP、saleToken。buyToken / buyTokenAMAP、sellToken。对于卖出,用户必须先 ERC20.approve(tokenManager, amount)。buyToken(bytes args, uint256 time, bytes signature) 和编码的 BuyTokenParams。GET /private/token/get?address=<token>、GET /private/token/getById?id=<requestId>(requestId 来自 TokenCreate 事件)。响应可能包含 data.aiCreator(由 Agent 创建的代币)。列表/排行榜:references/token-query-api.md。isAgent(wallet))用于识别 agent 钱包。参见 references/agent-creator-and-wallets.md 和 references/contract-addresses.md。GET https://four.meme/meme-api/v1/public/config 获取当前 raisedToken;在创建请求体中按原样使用;不要修改其字段。| 文档 | 描述 |
|---|---|
| contract-addresses.md | TokenManager / TokenManager2 / Helper3 地址 (BSC) |
| api-create-token.md | 创建代币 API (nonce / login / upload / create) |
| create-token-scripts.md | 创建代币脚本流程和示例 |
| token-tax-info.md | 税代币 tokenTaxInfo 参数和约束 |
| token-query-api.md | 代币列表 / 详情 / 排行榜 REST API |
| errors.md | buy/sell 错误代码;X Mode / TaxToken / AntiSniperFeeMode;Agent Creator |
| agent-creator-and-wallets.md | 由 Agent Creator 创建的代币;AgentIdentifier 合约和 Agent 钱包 |
| execute-trade.md | 执行买入/卖出 CLI 和合约使用 |
| event-listening.md | TokenManager2 事件监听 (V2) |
| tax-token-query.md | TaxToken 链上费用/税查询 (tax-info) |
| 官方 four.meme API 和合约(在线):Protocol Integration | API 文档,ABI:TokenManager、TokenManager2、Helper3、TaxToken、AgentIdentifier 等。 |
每周安装次数
215
仓库
GitHub Stars
11
首次出现
Mar 4, 2026
安全审计
安装于
codex214
opencode213
kimi-cli201
gemini-cli201
cursor201
github-copilot201