🦋 Launch a BNB Token on Flap
Launch a token on Flap (BNB Chain). Execute each step in order. Read each reference file at the step that requires it — do not pre-load them.
⚠️ Security Notice
This skill requires sensitive capabilities that must be provided:
- - EVM wallet with signing capability — hardware wallet, browser wallet, MPC, or other secure signing method for BNB Chain (chain ID 56). The skill mainly focuses on constructing transaction data and then the transaction should be signed by the EVM wallet. Always verify transaction details independently before signing.
- BNB mainnet RPC endpoint — a trusted RPC URL for reading blockchain state and broadcasting transactions. If not presently available, this skill will use the public fallback
https://bsc-dataseed.binance.org/.
Directory structure
CODEBLOCK0
Step 0 — Preflight check
Before starting, verify that all required reference files are present. If any are missing, you MUST obtain them before proceeding:
Required files:
- - INLINECODE1
- INLINECODE2
- INLINECODE3
- INLINECODE4
- INLINECODE5
- INLINECODE6
Check each file exists, then read references/preflight.md and verify every prerequisite is satisfied before continuing.
Step 1 — Choose token type
Determine the token configuration:
- 1. Tax token or standard (non-tax) token?
- If tax token: Use a Vault Factory for revenue management?
Decision map:
| Choice | Contract to call |
|---|
| Standard token | INLINECODE8 with INLINECODE9 |
| Tax token, no vault |
Portal.newTokenV6 with
tokenVersion = TOKEN_TAXED_V3 |
| Tax token + vault |
VaultPortal.newTokenV6WithVault with
tokenVersion = TOKEN_TAXED_V3 |
Step 2 — Vault Factory setup (tax + vault only)
Read references/vault-factory.md to:
- 1. Determine the vault factory address to use.
- Call the factory's
vaultDataSchema() to understand the required vaultData encoding. - Determine the values needed to encode
vaultData.
Skip this step for standard tokens or tax tokens without a vault.
Step 3 — Token metadata
Determine the following token metadata fields:
- - Required:
name, symbol, image file path - Optional:
description, twitter handle, telegram handle (omit if not available)
Read references/meta-upload.md when ready to upload the image and construct the metadata JSON.
Step 4 — Tax parameters (tax token only)
Read references/tax-params.md to determine and validate:
- -
buyTaxRate, INLINECODE26 - INLINECODE27 , INLINECODE28
- INLINECODE29 ,
deflationBps, dividendBps, INLINECODE32 - INLINECODE33
- INLINECODE34 address (only for tax token without vault)
Skip this step for standard tokens.
Step 5 — Launch buy amount
Determine quoteAmt: the amount of BNB to spend on the initial buy at launch (in BNB, will be converted to wei). This becomes both the quoteAmt field and the msg.value of the transaction. Use 0 to skip the initial buy.
Step 6 — Upload metadata
Follow references/meta-upload.md to upload the image and metadata JSON to Flap's upload API. Store the returned IPFS CID as meta.
Step 7 — Find the salt
Read references/salt-finding.md to mine a vanity salt using CREATE2 prediction:
- - Tax token address must end in
7777. - Standard token address must end in
8888.
Save the resulting salt (bytes32) and the predicted tokenAddress.
Step 8 — Construct the EVM transaction
Read references/construct-tx.md to assemble the full calldata, value, and to address for the correct contract entry point (Portal or VaultPortal).
Step 9 — Send the transaction
Broadcast the constructed transaction to BNB Chain using the available wallet. After confirmation, report the token address and a link to https://flap.sh/bnb/<tokenAddress>.
🦋 在 Flap 上启动 BNB 代币
在 Flap(BNB 链)上启动代币。按顺序执行每一步。在需要时阅读每个参考文件——不要预先加载它们。
⚠️ 安全须知
此技能需要提供敏感能力:
- - 具备签名功能的 EVM 钱包——硬件钱包、浏览器钱包、MPC 或其他用于 BNB 链(链 ID 56)的安全签名方式。该技能主要专注于构建交易数据,然后交易应由 EVM 钱包签名。在签名前务必独立验证交易详情。
- BNB 主网 RPC 端点——用于读取区块链状态和广播交易的可信 RPC URL。如果当前不可用,此技能将使用公共备用地址 https://bsc-dataseed.binance.org/。
目录结构
skills/launch-bnb-token-on-flap/
├── SKILL.md ← 本文件
└── references/
├── preflight.md ← 步骤 0:前置条件
├── vault-factory.md ← 步骤 2:金库工厂设置
├── meta-upload.md ← 步骤 3 和 6:元数据上传
├── tax-params.md ← 步骤 4:税收参数
├── salt-finding.md ← 步骤 7:虚荣盐值挖掘
└── construct-tx.md ← 步骤 8:交易构建
步骤 0 — 前置检查
在开始之前,验证所有必需的参考文件是否存在。如果缺少任何文件,你必须在继续之前获取它们:
必需文件:
- - references/preflight.md
- references/vault-factory.md
- references/meta-upload.md
- references/tax-params.md
- references/salt-finding.md
- references/construct-tx.md
检查每个文件是否存在,然后阅读 references/preflight.md 并验证所有前置条件是否满足,之后再继续。
步骤 1 — 选择代币类型
确定代币配置:
- 1. 税收代币还是标准(非税收)代币?
- 如果是税收代币:是否使用金库工厂进行收入管理?
决策表:
| 选择 | 调用的合约 |
|---|
| 标准代币 | Portal.newTokenV6,tokenVersion = TOKENV2PERMIT |
| 税收代币,无金库 |
Portal.newTokenV6,tokenVersion = TOKEN
TAXEDV3 |
| 税收代币 + 金库 | VaultPortal.newTokenV6WithVault,tokenVersion = TOKEN
TAXEDV3 |
步骤 2 — 金库工厂设置 (仅限税收代币 + 金库)
阅读 references/vault-factory.md 以:
- 1. 确定要使用的金库工厂地址。
- 调用工厂的 vaultDataSchema() 以了解所需的 vaultData 编码方式。
- 确定编码 vaultData 所需的值。
对于标准代币或无金库的税收代币,跳过此步骤。
步骤 3 — 代币元数据
确定以下代币元数据字段:
- - 必需: name、symbol、图片文件路径
- 可选: description、twitter 账号、telegram 账号(如果没有则省略)
准备好上传图片并构建元数据 JSON 时,阅读 references/meta-upload.md。
步骤 4 — 税收参数 (仅限税收代币)
阅读 references/tax-params.md 以确定并验证:
- - buyTaxRate、sellTaxRate
- taxDuration、antiFarmerDuration
- mktBps、deflationBps、dividendBps、lpBps
- minimumShareBalance
- beneficiary 地址 (仅限无金库的税收代币)
对于标准代币,跳过此步骤。
步骤 5 — 启动购买金额
确定 quoteAmt:启动时用于初始购买的 BNB 数量(以 BNB 为单位,将转换为 wei)。这既是 quoteAmt 字段,也是交易的 msg.value。使用 0 跳过初始购买。
步骤 6 — 上传元数据
按照 references/meta-upload.md 将图片和元数据 JSON 上传到 Flap 的上传 API。将返回的 IPFS CID 存储为 meta。
步骤 7 — 查找盐值
阅读 references/salt-finding.md 以使用 CREATE2 预测挖掘虚荣盐值:
- - 税收代币地址必须以 7777 结尾。
- 标准代币地址必须以 8888 结尾。
保存生成的 salt(bytes32)和预测的 tokenAddress。
步骤 8 — 构建 EVM 交易
阅读 references/construct-tx.md 以组装完整的 calldata、value 和 to 地址,用于正确的合约入口点(Portal 或 VaultPortal)。
步骤 9 — 发送交易
使用可用的钱包将构建的交易广播到 BNB 链。确认后,报告代币地址和指向 https://flap.sh/bnb/ 的链接。