🛠️ Fomo3d
BNB Chain上でFomo3Dゲームのプレイ、スロットマシンの利用、予測市場への参加、トークンの売買、ウォレット管理など、様々な操作をCLIで実行するためのSkillです。
📜 元の英語説明(参考)
Play Fomo3D, Slot Machine, and Prediction Market on BNB Chain (BSC). Fomo3D is a blockchain game where players buy shares using tokens — the last buyer before the countdown ends wins the grand prize. Includes a Slot Machine mini-game with VRF-powered random spins and a Prediction Market for betting on outcomes (sports, crypto prices, events). This skill provides a CLI to check game status, purchase shares, claim dividends, spin the slot machine, create/bet on prediction markets, and more. Use this skill whenever the user wants to interact with Fomo3D, buy/sell FOMO tokens, check game status, spin the slot machine, trade on FLAP Portal or PancakeSwap, create prediction markets, place bets, settle markets, or manage their BNB Chain gaming wallet.
🇯🇵 日本人クリエイター向け解説
BNB Chain上でFomo3Dゲームのプレイ、スロットマシンの利用、予測市場への参加、トークンの売買、ウォレット管理など、様々な操作をCLIで実行するためのSkillです。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o fomo3d.zip https://jpskill.com/download/5148.zip && unzip -o fomo3d.zip && rm fomo3d.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/5148.zip -OutFile "$d\fomo3d.zip"; Expand-Archive "$d\fomo3d.zip" -DestinationPath $d -Force; ri "$d\fomo3d.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
fomo3d.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
fomo3dフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
💬 こう話しかけるだけ — サンプルプロンプト
- › Fomo3d を使って、最小構成のサンプルコードを示して
- › Fomo3d の主な使い方と注意点を教えて
- › Fomo3d を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[Skill 名] fomo3d
Fomo3D — BNB Chain ブロックチェーンゲーム
Fomo3D は、BNB Chain (BSC) 上の分散型ゲームで、3つのゲームモードがあります。
-
Fomo3D メインゲーム — トークンでシェアを購入します。購入ごとにカウントダウンタイマーがリセットされます。タイマーがゼロになったときに最後に購入したプレイヤーが、グランドプライズプールを獲得します。すべての株主は、購入ごとに配当を獲得します。
-
スロットマシン — VRF を利用したランダムスピンにトークンを賭けます。シンボルが一致すると、倍率付きの配当(最大100倍)を獲得します。預金者は、すべてのスピンから配当シェアを獲得します。
-
予測市場 — イベントの結果(Yes/No/Draw)に賭けます。市場は、Oracle(Chainlink 価格フィード)または Optimistic(人間による提案 + チャレンジ)のいずれかの決済を使用します。ベッターは、同じ市場での他のベットから配当を獲得し、勝者は賞金プールを共有します。
インストールと設定(必須)
リポジトリのルートで依存関係がインストールされていることを確認してください(npm install)。
プライベートキーが必要です。ユーザーがまだスキルを設定していない場合は、リポジトリのルートから fomo3d setup を実行してください。これにより、以下の情報を求めるインタラクティブな CLI が実行されます。
- BSC プライベートキー(トランザクション署名用)
- ネットワーク(testnet または mainnet)
- オプションのカスタム RPC URL
または、環境変数を設定することもできます(setup は不要です)。
FOMO3D_PRIVATE_KEY— BSC ウォレットのプライベートキー(16進数、0xプレフィックスの有無は問わない)FOMO3D_NETWORK—testnetまたはmainnet(デフォルト: testnet)FOMO3D_RPC_URL— カスタム RPC エンドポイント(オプション)FOMO3D_FLAP_TOKEN— buy/sell コマンドの FLAP トークンアドレスを上書きします(オプション、テスト用)
重要: ウォレットは EOA(外部所有アカウント)である必要があり、スマートコントラクトウォレットであってはなりません。ゲームコントラクトは msg.sender == tx.origin を要求します。
実行方法(CLI)
リポジトリのルート(package.json がある場所)から実行してください。機械可読な出力が必要な場合は、常に --json を追加してください。CLI は --json モードで JSON を標準出力に出力します。
fomo3d <command> [options] --json
エラーが発生した場合、CLI は {"success":false,"error":"message"} を標準出力に出力し、終了コード1で終了します。成功した場合、CLI は {"success":true,"data":{...}} を出力します。
重要な概念
トークン量
CLI 引数および JSON 出力におけるすべてのトークン量は、wei(18桁の小数)で表されます。例:
- 1トークン =
1000000000000000000(1e18) - 0.5トークン =
500000000000000000(5e17)
ユーザーに金額を表示する際は、人間が読める値にするために 1e18 で割ってください。
シェア量
purchase --shares のシェア量は整数です(wei ではありません)。1シェア = 1シェアです。
自動承認
CLI は、purchase、buy、sell、slot spin、slot deposit、pred bet、pred propose、および pred dispute の前に、ERC20 トークンのアローアンスを自動的にチェックし、必要に応じて承認します。手動での承認ステップは不要です。
FOMO トークン取引
FOMO トークンは FLAP プラットフォーム(BNB Chain ボンディングカーブ)でローンチされています。取引には、クォートトークンとして BNB が使用されます。
- 内盤 (Portal): ネイティブ BNB を使用して FLAP Portal の
swapExactInputを直接呼び出します。 - 外盤 (PancakeSwap V2): トークンが DEX に移行した後、PancakeSwap V2 Router を使用します。
CLI は getTokenV6 を介して現在のフェーズを自動検出し、それに応じてルーティングします。buy/sell コマンドは、testnet と mainnet の両方で機能します。
VRF (Verifiable Random Function)
スロットマシンのスピンは、Binance Oracle VRF を使用して、証明可能な公平なランダム性を実現しています。各 spin には、msg.value として少額の BNB 手数料(約0.00015 BNB)が必要です。スピン結果は VRF コールバック(1〜3ブロック後)によって決定されます。CLI はスピンリクエストトランザクションを返し、結果は返しません。結果は後で fomo3d slot status または fomo3d player で確認してください。
コマンドリファレンス
Setup
fomo3d setup --json
インタラクティブな設定です。プライベートキー、ネットワーク、オプションの RPC URL を求めます。config.json に保存されます。
Wallet — 残高の確認
fomo3d wallet --json
設定されたウォレットの BNB 残高とゲームトークン残高を返します。
出力フィールド: address、bnbBalance (wei)、tokenBalance (wei)、tokenSymbol、tokenDecimals
Status — ゲームラウンド情報
fomo3d status --json
カウントダウン、プライズプール、シェア価格、最後の購入者を含む現在のラウンドステータスを返します。
出力フィールド: currentRound、roundStatus (NotStarted/Active/Ended)、paused、countdownRemaining (秒)、grandPrizePool (wei)、dividendPool (wei)、sharePrice (wei)、totalShares、lastBuyers (address[])、pools
戦略のヒント: countdownRemaining が低い場合、グランドプライズを獲得する可能性があるため、シェアを購入する方が期待値が高くなります。購入ごとにカウントダウンは一定量リセットされます。
Player — プレイヤー情報
fomo3d player --json
fomo3d player --address 0x1234... --json
プレイヤーのシェア、収益、保留中の引き出しを返します。--address がない場合、設定されたウォレットを使用します。
出力フィールド: address、shares、totalEarnings (wei)、pendingEarnings (wei)、pendingWithdrawal (wei)、hasExited、currentRound
意思決定ガイド:
pendingWithdrawal > 0の場合: シェアを追加購入する前にfomo3d settleを実行する必要があります。pendingEarnings > 0でラウンドがアクティブな場合:exitして収益を確定するか、さらに配当を待つことができます。hasExited == trueの場合: このラウンドはすでに終了しているため、ラウンドが終了するか決済されるのを待ちます。
Purchase — シェアの購入
fomo3d purchase --shares <integer> --json
現在のラウンドでシェアを購入します。--shares の値は整数カウントです(wei ではありません)。トークンコスト = シェア数 × シェア価格(自動計算)。
自動的に実行される事前チェック:
- ゲームが一時停止されていないこと
- 保留中の引き出しがないこと(最初に
settleする必要があります) - トークンの承認(必要に応じて自動承認されます)
出力フィールド: txHash、blockNumber、status、sharesAmount、tokensCost (wei)
Exit — ゲームの終了
fomo3d exit --json
現在のラウンドを終了し、配当収益を確定します。
出力フィールド: txHash、blockNumber、status
Settle — 配当と賞金の請求
fomo3d settle --json
ラウンド終了後に配当を決済し、グランドプライズを請求します。pendingEarnings > 0 または pendingWithdrawal > 0 の場合に呼び出す必要があります。
出力フィールド: tx
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Fomo3D — BNB Chain Blockchain Game
Fomo3D is a decentralized game on BNB Chain (BSC) with three game modes:
-
Fomo3D Main Game — Buy shares with tokens. Each purchase resets a countdown timer. The last buyer when the timer hits zero wins the grand prize pool. All shareholders earn dividends from each purchase.
-
Slot Machine — Bet tokens for a VRF-powered random spin. Matching symbols win multiplied payouts (up to 100x). Depositors earn dividend shares from every spin.
-
Prediction Market — Bet on the outcome of events (Yes/No/Draw). Markets use either Oracle (Chainlink price feeds) or Optimistic (human proposal + challenge) settlement. Bettors earn dividends from other bets on the same market, and winners share the prize pool.
Installation and Config (required)
Ensure dependencies are installed at repo root (npm install).
A private key is required. If the user has not configured the skill yet, run fomo3d setup from the repo root. This runs an interactive CLI that prompts for:
- BSC private key (for signing transactions)
- Network (testnet or mainnet)
- Optional custom RPC URL
Alternatively, set environment variables (no setup needed):
FOMO3D_PRIVATE_KEY— BSC wallet private key (hex, with or without 0x prefix)FOMO3D_NETWORK—testnetormainnet(default: testnet)FOMO3D_RPC_URL— custom RPC endpoint (optional)FOMO3D_FLAP_TOKEN— override FLAP token address for buy/sell commands (optional, for testing)
Important: The wallet must be an EOA (externally owned account), not a smart contract wallet. The game contracts require msg.sender == tx.origin.
How to run (CLI)
Run from the repo root (where package.json lives). For machine-readable output, always append --json. The CLI prints JSON to stdout in --json mode.
fomo3d <command> [options] --json
On error the CLI prints {"success":false,"error":"message"} to stdout and exits with code 1. On success the CLI prints {"success":true,"data":{...}}.
Important Concepts
Token Amounts
All token amounts in CLI arguments and JSON output are in wei (18 decimals). For example:
- 1 token =
1000000000000000000(1e18) - 0.5 tokens =
500000000000000000(5e17)
When displaying amounts to users, divide by 1e18 for human-readable values.
Share Amounts
Share amounts for purchase --shares are integers (not wei). 1 share = 1 share.
Auto-Approve
The CLI automatically checks ERC20 token allowance and approves if needed before purchase, buy, sell, slot spin, slot deposit, pred bet, pred propose, and pred dispute. No manual approval step required.
FOMO Token Trading
The FOMO token is launched on the FLAP platform (BNB Chain bonding curve). Trading uses BNB as the quote token:
- 内盘 (Portal): Directly calls FLAP Portal's
swapExactInputwith native BNB - 外盘 (PancakeSwap V2): After the token graduates to DEX, uses PancakeSwap V2 Router
The CLI auto-detects the current phase via getTokenV6 and routes accordingly. Buy/sell commands work on both testnet and mainnet.
VRF (Verifiable Random Function)
Slot machine spins use Binance Oracle VRF for provably fair randomness. Each spin requires a small BNB fee (~0.00015 BNB) sent as msg.value. The spin result is determined by a VRF callback (1-3 blocks later) — the CLI returns the spin request transaction, not the result. Check the result with fomo3d slot status or fomo3d player afterward.
Commands Reference
Setup
fomo3d setup --json
Interactive configuration. Prompts for private key, network, and optional RPC URL. Saves to config.json.
Wallet — Check Balances
fomo3d wallet --json
Returns BNB balance and game token balance for the configured wallet.
Output fields: address, bnbBalance (wei), tokenBalance (wei), tokenSymbol, tokenDecimals
Status — Game Round Info
fomo3d status --json
Returns current round status including countdown, prize pools, share price, and last buyers.
Output fields: currentRound, roundStatus (NotStarted/Active/Ended), paused, countdownRemaining (seconds), grandPrizePool (wei), dividendPool (wei), sharePrice (wei), totalShares, lastBuyers (address[]), pools
Strategy tip: When countdownRemaining is low, buying shares has higher expected value because you may win the grand prize. Each purchase resets the countdown by a fixed increment.
Player — Player Info
fomo3d player --json
fomo3d player --address 0x1234... --json
Returns player's shares, earnings, and pending withdrawals. Without --address, uses the configured wallet.
Output fields: address, shares, totalEarnings (wei), pendingEarnings (wei), pendingWithdrawal (wei), hasExited, currentRound
Decision guide:
- If
pendingWithdrawal > 0: Must runfomo3d settlebefore purchasing more shares - If
pendingEarnings > 0and round is active: Canexitto lock in earnings, or hold for more dividends - If
hasExited == true: Already exited this round, wait for round to end or settle
Purchase — Buy Shares
fomo3d purchase --shares <integer> --json
Buy shares in the current round. The --shares value is an integer count (not wei). Token cost = shares × sharePrice (auto-calculated).
Pre-checks performed automatically:
- Game must not be paused
- No pending withdrawal (must
settlefirst) - Token approval (auto-approved if needed)
Output fields: txHash, blockNumber, status, sharesAmount, tokensCost (wei)
Exit — Exit Game
fomo3d exit --json
Exit the current round and lock in your dividend earnings.
Output fields: txHash, blockNumber, status
Settle — Claim Dividends & Prize
fomo3d settle --json
Settle dividends and claim any grand prize after a round ends. Must be called if pendingEarnings > 0 or pendingWithdrawal > 0.
Output fields: txHash, blockNumber, status, pendingEarnings (wei), pendingWithdrawal (wei)
End Round — End Expired Round
fomo3d end-round --json
End a round whose countdown has reached zero. Anyone can call this. The grand prize is distributed to the last buyer.
Output fields: txHash, blockNumber, status
Faucet — Claim Test Tokens (testnet only)
fomo3d faucet --json
Claim 10000 test FOMO game tokens on BSC Testnet. Rate limited to 1 claim per address per hour.
Output fields: txHash, amount, token, account
Buy — Buy FOMO with BNB
fomo3d buy --amount <bnb_amount_in_wei> --json
Buy FOMO tokens using BNB via the FLAP platform. Auto-detects market phase: Portal (内盘) or PancakeSwap V2 (外盘).
Example: Buy with 0.01 BNB:
fomo3d buy --amount 10000000000000000 --json
Output fields: txHash, blockNumber, status, bnbSpent (wei), token, market
Note: Buy and sell commands use minOutputAmount=0 (no slippage protection). For large trades, consider splitting into smaller amounts.
Sell — Sell FOMO for BNB
# 按数量卖出
fomo3d sell --amount <token_amount_in_wei> --json
# 按持仓比例卖出
fomo3d sell --percent <bps> --json
Sell FOMO tokens for BNB. Two modes:
--amount: Sell exact token amount (in wei, 18 decimals)--percent: Sell by percentage of holdings in basis points (10000=100%, 5000=50%, 1000=10%)
Cannot use both flags simultaneously. Token allowance is auto-approved for Portal/PancakeSwap.
Example: Sell 50% of holdings:
fomo3d sell --percent 5000 --json
Output fields: txHash, blockNumber, status, tokensSold (wei), market, method
Token Info — Token Status & Balances
fomo3d token-info --json
fomo3d token-info --address 0x1234... --json
Query FOMO token status on the FLAP platform and balances. Works without private key (shows token status only). Supports --address flag to check another wallet.
Output fields: token, network, portal, status (Invalid/Tradable/InDuel/Killed/DEX/Staged), phase (内盘/外盘), quoteToken, price (wei), reserve (wei), circulatingSupply (wei), taxRate, progress (wei), fomoBalance (wei), bnbBalance (wei), account
Decision guide:
status == Tradable: Token is on 内盘 (bonding curve), buy/sell via Portalstatus == DEX: Token has graduated to 外盘 (PancakeSwap), buy/sell via DEXprogress: How close to graduation (higher = closer to DEX)
Slot Status — Slot Machine Info
fomo3d slot status --json
Returns slot machine configuration, prize pool, and statistics.
Output fields: paused, token, minBet (wei), maxBet (wei), prizePool (wei), totalShares, vrfFee (wei), stats { totalSpins, totalBetAmount, totalWinAmount, totalDividendsDistributed }
Note: maxBet = prizePool / 100 (dynamic). If prize pool is low, max bet is low.
Slot Spin — Spin the Slot Machine
fomo3d slot spin --bet <amount_in_wei> --json
Spin the slot machine. Requires token balance for the bet AND BNB for VRF fee (~0.00015 BNB).
Constraints:
minBet <= bet <= maxBet- Wallet must have enough BNB for VRF fee
- Cannot spin while a previous spin is pending
Payout table: | Symbols | Multiplier | |---------|-----------| | 💎💎💎 | 100x | | 🍒🍒🍒 | 50x | | 🔔🔔🔔 | 50x | | 🍋🍋🍋 | 20x |
Output fields: txHash, blockNumber, status, betAmount (wei), vrfFee (wei), note
Important: The spin result is NOT in this response. The VRF callback determines the outcome 1-3 blocks later. Check fomo3d player --json or fomo3d slot status --json afterward.
Slot Cancel — Cancel Timed-Out Spin
fomo3d slot cancel --json
Cancel a spin that timed out waiting for VRF callback. Only needed if VRF fails to respond.
Output fields: txHash, blockNumber, status
Slot Deposit — Deposit to Prize Pool
fomo3d slot deposit --amount <amount_in_wei> --json
Deposit tokens into the slot machine prize pool. WARNING: Deposited tokens are permanently locked. You receive dividend shares in return — each spin distributes 5% of the bet amount to all depositors proportionally.
Output fields: txHash, blockNumber, status, amount (wei)
Slot Claim — Claim Slot Dividends
fomo3d slot claim --json
Claim accumulated dividends from slot machine deposits.
Output fields: txHash, blockNumber, status, dividends (wei)
Pred Config — Prediction Market Config
fomo3d pred config --json
Returns global prediction market configuration.
Output fields: network, diamond, token, minBet (wei), devFeeBps, creatorFeeBps, dividendBps, nextMarketId, totalMarkets, paused, minDuration (seconds)
Pred Market — Market Details
fomo3d pred market --id <marketId> --json
Returns detailed info for a specific prediction market.
Output fields: marketId, title, creator, status (Active/Closed/Resolved), outcome (Yes/No/Draw, only when Resolved), settlementType (Oracle/Optimistic), drawEnabled, endTime, timeRemaining (seconds), prizePool (wei), totalYesShares (wei), totalNoShares (wei), totalDrawShares (wei), totalShares (wei), totalBets, totalBetAmount (wei), totalDividendsDistributed (wei), metadataURI
Decision guide:
status == Active: Market is open for bettingstatus == Closed: Market ended, waiting for settlementstatus == Resolved: Settlement complete, winners canpred claimtimeRemaining == 0: Market has ended, needs settlement
Pred Position — Player Position
fomo3d pred position --id <marketId> --json
fomo3d pred position --id <marketId> --address 0x1234... --json
Returns player's position in a specific market. Without --address, uses the configured wallet.
Output fields: marketId, player, yesShares (wei), noShares (wei), drawShares (wei), pendingYesDividends (wei), pendingNoDividends (wei), pendingDrawDividends (wei), estimatedPrizeIfYes (wei), estimatedPrizeIfNo (wei), estimatedPrizeIfDraw (wei), exited, settled
Decision guide:
pendingXxxDividends > 0: Accumulated dividends, claim viapred exitorpred claimestimatedPrizeIfXxx: How much you'd win if that side wins (before fees)exited == true: Already exited all sidessettled == true: Already claimed settlement
Pred Bet — Place a Bet
fomo3d pred bet --id <marketId> --side <yes|no|draw> --amount <wei> --json
Place a bet on a prediction market. The --side value is yes, no, or draw. Amount is in wei. A portion (dividendBps%) of each bet goes to existing holders as dividends; the rest goes to the prize pool.
Pre-checks performed automatically:
- Market must be Active (not paused)
- Amount must be >= minBet
- Token approval (auto-approved if needed)
Output fields: txHash, blockNumber, status, marketId, side, amount (wei)
Pred Exit — Exit a Side
fomo3d pred exit --id <marketId> --side <yes|no|draw> --json
Exit one direction and claim accumulated dividends for that side. Can be called even when the contract is paused (user safety). Dev fee + creator fee are deducted from dividends.
Output fields: txHash, blockNumber, status, marketId, side
Pred Claim — Claim Settlement
fomo3d pred claim --id <marketId> --json
After a market is Resolved, claim your winnings. Winners receive: accumulated dividends + prize pool share. Losers receive: accumulated dividends only. Dev fee + creator fee are deducted.
Output fields: txHash, blockNumber, status, marketId
Pred Create — Create Optimistic Market
fomo3d pred create --title <string> --end-time <unix_timestamp> --bond <amount_in_wei> --challenge-period <seconds> [--draw] --json
Create a new prediction market using optimistic oracle settlement. Anyone can create a market.
Parameters:
--title: Market question (max 200 bytes)--end-time: Unix timestamp when betting closes--bond: Bond amount required for proposing/disputing outcome (in wei, min 0.01 FOMO)--challenge-period: Time window for disputes in seconds (min 600s = 10min, max 604800s = 7 days)--draw: Include this flag to enable Draw as a third option
Output fields: txHash, blockNumber, status, marketId, title, endTime, bondAmount (wei), challengePeriod (seconds), drawEnabled
Pred Oracle — Oracle Market Info
fomo3d pred oracle --id <marketId> --json
View Chainlink oracle configuration for an Oracle-type market. Shows price feed, strike price, condition, and current price.
Output fields: marketId, feedAddress, feedDescription, feedDecimals, strikePrice, strikePriceFormatted, isAbove, condition, currentPrice, currentPriceFormatted, settlementPrice, settlementPriceFormatted
Pred Optimistic — Optimistic Settlement Status
fomo3d pred optimistic --id <marketId> --json
View optimistic oracle status for an Optimistic-type market. Shows proposal state, challenge deadline, and available actions.
Output fields: marketId, bondAmount (wei), challengePeriod (seconds), hasProposal, proposer, proposedOutcome, proposalTime, disputed, disputer, challengeDeadline, challengeRemaining (seconds), canFinalize, canDispute
Decision guide:
hasProposal == false: Market needs someone topred proposean outcomecanDispute == true: Proposal is open for challenge viapred disputecanFinalize == true: Challenge period passed, callpred finalizedisputed == true: Needs arbiter topred resolve
Pred Settle Oracle — Settle with Oracle
fomo3d pred settle-oracle --id <marketId> --json
Settle an Oracle-type market using Chainlink price feed. Permissionless — anyone can call this after market ends.
Output fields: txHash, blockNumber, status, marketId
Pred Propose — Propose Outcome
fomo3d pred propose --id <marketId> --outcome <yes|no|draw> --json
Propose the outcome for an Optimistic-type market. Requires bond (auto-approved from token balance). Bond is returned if proposal is not disputed and is finalized.
Output fields: txHash, blockNumber, status, marketId, outcome, bondAmount (wei)
Pred Dispute — Dispute Proposal
fomo3d pred dispute --id <marketId> --json
Challenge a proposed outcome within the challenge period. Requires same bond amount (auto-approved). If you win the dispute, you get your bond back + 50% of proposer's bond.
Output fields: txHash, blockNumber, status, marketId, bondAmount (wei)
Pred Finalize — Finalize Outcome
fomo3d pred finalize --id <marketId> --json
Finalize a proposed outcome after the challenge period expires without dispute. Returns the proposer's bond and resolves the market.
Output fields: txHash, blockNumber, status, marketId
Pred Resolve — Arbiter Resolve Dispute
fomo3d pred resolve --id <marketId> --outcome <yes|no|draw> [--proposer-wins] --json
Resolve a disputed market. Only the contract owner or designated arbiters can call this. The winner gets their bond back + 50% of loser's bond. The other 50% goes to devAddress.
Parameters:
--outcome: The correct outcome--proposer-wins: Include this flag if the proposer was correct (default: disputer wins)
Output fields: txHash, blockNumber, status, marketId, outcome, winnerIsProposer
Recommended Workflows
First-Time Setup
fomo3d setup— configure wallet and networkfomo3d wallet --json— verify BNB and token balancesfomo3d status --json— check game state
Testing on Testnet
Before using real funds on mainnet, test all features on BSC Testnet. You need:
- tBNB: Get from BNB Chain Faucet (for gas + token trading)
- Test FOMO tokens: Use the built-in faucet command (for game actions)
# 1. Setup with testnet
fomo3d setup # select "testnet", enter your private key
# 2. Claim test game tokens (10000 FOMO per call, 1h cooldown)
fomo3d faucet --json
# 3. Check balances
fomo3d wallet --json
# 4. Test game: purchase → player → exit → settle
fomo3d purchase --shares 1 --json
fomo3d player --json
fomo3d exit --json
# 5. Test slot machine
fomo3d slot status --json
fomo3d slot spin --bet 1000000000000000000 --json # 1 FOMO
Note: Testnet has two separate FOMO tokens:
- Game token (
0x57e3...5d46): Used bypurchase,slot spin,slot deposit. Get viafaucet. - FLAP token (
0x32bf...8888): Used bybuy/sellon FLAP Portal. Buy with tBNB.
Testing Token Trading — 内盘 (Portal)
The default FOMO token on testnet (0x32bf...8888) is in 内盘 (Portal bonding curve) phase. Test buy/sell with tBNB:
# Check token status — should show "phase": "内盘 (Portal)"
fomo3d token-info --json
# Buy with 0.001 tBNB
fomo3d buy --amount 1000000000000000 --json
# Sell 50% of holdings
fomo3d sell --percent 5000 --json
Testing Token Trading — 外盘 (PancakeSwap)
To test the PancakeSwap DEX path, use FOMO3D_FLAP_TOKEN env var to override the token address with a PancakeSwap-listed testnet token:
# Use a testnet token with PancakeSwap V2 liquidity
export FOMO3D_FLAP_TOKEN=0xFa60D973F7642B748046464e165A65B7323b0DEE
# Check token info (should fallback to PancakeSwap)
fomo3d token-info --json
# Buy with 0.001 tBNB via PancakeSwap
fomo3d buy --amount 1000000000000000 --json
# Sell 100% via PancakeSwap
fomo3d sell --percent 10000 --json
# Unset to return to default FOMO token
unset FOMO3D_FLAP_TOKEN
How it works: The CLI auto-detects the market phase via FLAP Portal getTokenV6. If the token is not on FLAP (query fails) or has status DEX (4), it routes to PancakeSwap V2 Router. If status is Tradable (1), it routes to Portal.
Buying FOMO Tokens
fomo3d token-info --json— check token status and your BNB balancefomo3d buy --amount 10000000000000000 --json— buy with 0.01 BNBfomo3d token-info --json— verify FOMO balance
Selling FOMO Tokens
fomo3d token-info --json— check FOMO balancefomo3d sell --percent 5000 --json— sell 50% of holdings- Or:
fomo3d sell --amount 1000000000000000000 --json— sell exactly 1 FOMO
Playing Fomo3D
fomo3d status --json— check round status and countdownfomo3d purchase --shares 1 --json— buy shares (start small)fomo3d player --json— check your earnings- When ready to claim:
fomo3d exit --jsonthenfomo3d settle --json - If countdown reaches 0 and you're the last buyer:
fomo3d end-round --jsonthenfomo3d settle --json
Playing Slot Machine
fomo3d slot status --json— check min/max bet and prize poolfomo3d slot spin --bet <amount> --json— spin- Wait 5-10 seconds for VRF callback
fomo3d player --json— check if you won
Earning Passive Income (Slot Dividends)
fomo3d slot deposit --amount <amount> --json— deposit tokens (permanent)- Periodically check:
fomo3d slot claim --json— claim dividends
Playing Prediction Market
fomo3d pred config --json— check prediction market config and minBetfomo3d pred market --id 1 --json— view a specific marketfomo3d pred bet --id 1 --side yes --amount 1000000000000000000000 --json— bet 1000 FOMO on Yesfomo3d pred position --id 1 --json— check your position and dividends- After market resolves:
fomo3d pred claim --id 1 --json— claim winnings - Or exit early:
fomo3d pred exit --id 1 --side yes --json— exit and claim dividends
Creating a Prediction Market
# Calculate end time: now + 24 hours
END_TIME=$(($(date +%s) + 86400))
# Create market with 10 FOMO bond, 1 hour challenge period
fomo3d pred create \
--title "Will BTC reach $100k by end of March?" \
--end-time $END_TIME \
--bond 10000000000000000000 \
--challenge-period 3600 \
--json
Settling an Optimistic Market
# 1. Check market status — should be "Closed" (endTime passed)
fomo3d pred market --id 1 --json
# 2. Propose the outcome
fomo3d pred propose --id 1 --outcome yes --json
# 3. Check optimistic status — see challenge deadline
fomo3d pred optimistic --id 1 --json
# 4a. If no dispute — finalize after challenge period
fomo3d pred finalize --id 1 --json
# 4b. If disputed — arbiter resolves
fomo3d pred resolve --id 1 --outcome yes --proposer-wins --json
# 5. Winners claim
fomo3d pred claim --id 1 --json
Global Flags
| Flag | Description |
|---|---|
--json |
JSON output (always use for programmatic access) |
--network testnet\|mainnet |
Override network |
--help |
Show help |
--version |
Show version |
Network Info
| Network | Chain ID | Fomo3D Diamond | Slot Diamond | Prediction Diamond | Game Token | FLAP Token (buy/sell) |
|---|---|---|---|---|---|---|
| BSC Testnet | 97 | 0x22E309...23a6 |
0x007813...F678 |
0x7617A5...ca01 |
0x57e3a4...5d46 |
0x32bfe5...8888 |
| BSC Mainnet | 56 | 0x062AfaB...948b |
0x6eB59f...156E |
0xc64083...8d45 |
0x13f266...7777 |
0x13f266...7777 |
Note: Prediction Market uses the same game token as Fomo3D and Slot Machine.
Trading Contracts
| Contract | Testnet | Mainnet | Purpose |
|---|---|---|---|
| FLAP Portal | 0x5bEacaF7ABCbB3aB280e80D007FD31fcE26510e9 |
0xe2cE6ab80874Fa9Fa2aAE65D277Dd6B8e65C9De0 |
内盘交易 + 状态查询 |
| PancakeSwap V2 Router | 0xD99D1c33F9fC3444f8101754aBC46c52416550D1 |
0x10ED43C718714eb63d5aA57B78B54704E256024E |
外盘交易 |
| Quote Token | BNB (native) | BNB (native) | 支付媒介 |