stackspot

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Stackspot Skill

Stackspot Skill

Provides stacking lottery pot operations on stackspot.app:
  • Pot Discovery — List all known pot contracts with their current value and lock status.
  • Pot State — Query full on-chain state for a pot: value, participant count, lock status, config, pool config, and details.
  • Join Pot — Contribute STX to a pot before it fills and starts stacking.
  • Start Pot — Trigger a full pot to begin stacking through the platform contract.
  • Claim Rewards — Claim sBTC rewards if your address was selected as the VRF winner.
  • Cancel Pot — Cancel a pot before it starts and recover contributed STX.
How it works: Participants join pots by contributing STX. When a pot reaches its maximum participant count, the platform contract triggers stacking via Proof of Transfer (PoX) for one full cycle. At unlock, a VRF-selected winner receives the stacking yield in sBTC. All participants (winner included) receive their original STX back.
All stackspot operations are mainnet-only. Write operations (join-pot, start-pot, claim-rewards, cancel-pot) require an unlocked wallet (use
bun run wallet/wallet.ts unlock
first).
stackspot.app上提供堆叠彩票池操作:
  • 彩票池发现 — 列出所有已知的彩票池合约及其当前价值和锁定状态。
  • 彩票池状态 — 查询某个彩票池的完整链上状态:价值、参与者数量、锁定状态、配置、池配置及详细信息。
  • 加入彩票池 — 在彩票池填满并开始堆叠前,向池中存入STX。
  • 启动彩票池 — 触发已满的彩票池通过平台合约开始堆叠。
  • 领取奖励 — 若你的地址被选为VRF赢家,可领取sBTC奖励。
  • 取消彩票池 — 在彩票池开始堆叠前取消,并取回存入的STX。
工作原理:参与者通过存入STX加入彩票池。当彩票池达到最大参与者数量时,平台合约会通过Proof of Transfer(PoX)触发完整周期的堆叠。解锁时,由VRF选出的赢家将获得以sBTC形式发放的堆叠收益。所有参与者(包括赢家)都能取回最初存入的STX。
所有stackspot操作均仅支持主网。写入操作(join-pot、start-pot、claim-rewards、cancel-pot)需要解锁钱包(请先使用
bun run wallet/wallet.ts unlock
)。

Usage

使用方法

bun run stackspot/stackspot.ts <subcommand> [options]
bun run stackspot/stackspot.ts <subcommand> [options]

Subcommands

子命令

list-pots

list-pots

List all known stackspot pot contracts with their current on-chain value and lock status.
bun run stackspot/stackspot.ts list-pots
Output:
json
{
  "network": "mainnet",
  "potCount": 3,
  "pots": [
    {
      "name": "Genesis",
      "contract": "SPT4SQP5RC1BFAJEQKBHZMXQ8NQ7G118F335BD85.Genesis",
      "maxParticipants": 2,
      "minAmountStx": 20,
      "currentValueUstx": "40000000",
      "isLocked": false
    }
  ]
}
列出所有已知的stackspot彩票池合约及其当前链上价值和锁定状态。
bun run stackspot/stackspot.ts list-pots
输出:
json
{
  "network": "mainnet",
  "potCount": 3,
  "pots": [
    {
      "name": "Genesis",
      "contract": "SPT4SQP5RC1BFAJEQKBHZMXQ8NQ7G118F335BD85.Genesis",
      "maxParticipants": 2,
      "minAmountStx": 20,
      "currentValueUstx": "40000000",
      "isLocked": false
    }
  ]
}

get-pot-state

get-pot-state

Get the full on-chain state for a specific pot. Queries all read-only functions: value, participant count, lock status, configuration, pool config, and details.
bun run stackspot/stackspot.ts get-pot-state --contract-name <name>
Options:
  • --contract-name
    (required) — Pot contract name or full identifier (e.g.,
    SPT4SQP5RC1BFAJEQKBHZMXQ8NQ7G118F335BD85.STXLFG
    or
    STXLFG
    )
Output:
json
{
  "network": "mainnet",
  "contractName": "STXLFG",
  "contractId": "SPT4SQP5RC1BFAJEQKBHZMXQ8NQ7G118F335BD85.STXLFG",
  "state": {
    "potValueUstx": "2100000000",
    "isLocked": false,
    "configs": { "value": "..." },
    "poolConfig": { "value": "..." },
    "details": { "value": "..." }
  }
}
查询特定彩票池的完整链上状态。查询所有只读函数:价值、参与者数量、锁定状态、配置、池配置及详细信息。
bun run stackspot/stackspot.ts get-pot-state --contract-name <name>
选项:
  • --contract-name
    (必填)—— 彩票池合约名称或完整标识符(例如:
    SPT4SQP5RC1BFAJEQKBHZMXQ8NQ7G118F335BD85.STXLFG
    STXLFG
输出:
json
{
  "network": "mainnet",
  "contractName": "STXLFG",
  "contractId": "SPT4SQP5RC1BFAJEQKBHZMXQ8NQ7G118F335BD85.STXLFG",
  "state": {
    "potValueUstx": "2100000000",
    "isLocked": false,
    "configs": { "value": "..." },
    "poolConfig": { "value": "..." },
    "details": { "value": "..." }
  }
}

join-pot

join-pot

Contribute STX to a pot. The amount must be at least the pot's minimum. STX is locked in the contract until the pot completes its stacking cycle and all participants can withdraw. Requires an unlocked wallet.
bun run stackspot/stackspot.ts join-pot --contract-name <name> --amount <microStx>
Options:
  • --contract-name
    (required) — Pot contract name (e.g.,
    STXLFG
    )
  • --amount
    (required) — Amount to contribute in micro-STX (1 STX = 1,000,000 micro-STX)
Output:
json
{
  "success": true,
  "txid": "abc123...",
  "network": "mainnet",
  "explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet",
  "pot": {
    "contractName": "STXLFG",
    "amountUstx": "21000000"
  }
}
向彩票池存入STX。存入金额必须不低于彩票池的最低要求。STX会被锁定在合约中,直到彩票池完成堆叠周期,所有参与者均可取回。需要解锁钱包。
bun run stackspot/stackspot.ts join-pot --contract-name <name> --amount <microStx>
选项:
  • --contract-name
    (必填)—— 彩票池合约名称(例如:
    STXLFG
  • --amount
    (必填)—— 存入金额,单位为micro-STX(1 STX = 1,000,000 micro-STX)
输出:
json
{
  "success": true,
  "txid": "abc123...",
  "network": "mainnet",
  "explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet",
  "pot": {
    "contractName": "STXLFG",
    "amountUstx": "21000000"
  }
}

start-pot

start-pot

Trigger a full pot to begin stacking. Calls the platform contract which starts the PoX stacking cycle for the pot. The pot must have reached its maximum participant count. Requires an unlocked wallet.
bun run stackspot/stackspot.ts start-pot --contract-name <name>
Options:
  • --contract-name
    (required) — Pot contract name to start stacking
Output:
json
{
  "success": true,
  "txid": "abc123...",
  "network": "mainnet",
  "explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet",
  "pot": {
    "contractName": "STXLFG"
  }
}
触发已满的彩票池开始堆叠。调用平台合约,为该彩票池启动PoX堆叠周期。彩票池必须已达到最大参与者数量。需要解锁钱包。
bun run stackspot/stackspot.ts start-pot --contract-name <name>
选项:
  • --contract-name
    (必填)—— 要启动堆叠的彩票池合约名称
输出:
json
{
  "success": true,
  "txid": "abc123...",
  "network": "mainnet",
  "explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet",
  "pot": {
    "contractName": "STXLFG"
  }
}

claim-rewards

claim-rewards

Claim sBTC rewards if the active wallet was selected as the VRF winner for a completed pot. The pot must have finished its stacking cycle. Non-winners receive no sBTC but do get their STX back via the same mechanism. Requires an unlocked wallet.
bun run stackspot/stackspot.ts claim-rewards --contract-name <name>
Options:
  • --contract-name
    (required) — Pot contract name to claim rewards from
Output:
json
{
  "success": true,
  "txid": "abc123...",
  "network": "mainnet",
  "explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet",
  "pot": {
    "contractName": "STXLFG"
  }
}
若当前活跃钱包被选为已完成彩票池的VRF赢家,可领取sBTC奖励。彩票池必须已完成其堆叠周期。非赢家无法获得sBTC,但可通过相同机制取回自己的STX。需要解锁钱包。
bun run stackspot/stackspot.ts claim-rewards --contract-name <name>
选项:
  • --contract-name
    (必填)—— 要领取奖励的彩票池合约名称
输出:
json
{
  "success": true,
  "txid": "abc123...",
  "network": "mainnet",
  "explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet",
  "pot": {
    "contractName": "STXLFG"
  }
}

cancel-pot

cancel-pot

Cancel a pot before it starts stacking. Allows participants to recover their contributed STX. The pot must not yet be locked (stacking must not have started). Requires an unlocked wallet.
bun run stackspot/stackspot.ts cancel-pot --contract-name <name>
Options:
  • --contract-name
    (required) — Pot contract name to cancel
Output:
json
{
  "success": true,
  "txid": "abc123...",
  "network": "mainnet",
  "explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet",
  "pot": {
    "contractName": "Genesis"
  }
}
在彩票池开始堆叠前取消它。允许参与者取回存入的STX。彩票池必须尚未锁定(即堆叠尚未开始)。需要解锁钱包。
bun run stackspot/stackspot.ts cancel-pot --contract-name <name>
选项:
  • --contract-name
    (必填)—— 要取消的彩票池合约名称
输出:
json
{
  "success": true,
  "txid": "abc123...",
  "network": "mainnet",
  "explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet",
  "pot": {
    "contractName": "Genesis"
  }
}

Notes

注意事项

  • All stackspot operations are mainnet-only. Calls on testnet will return an error.
  • Write operations require an unlocked wallet (use
    bun run wallet/wallet.ts unlock
    first).
  • STX lock-up: When you join a pot, your STX is locked for one full PoX stacking cycle (~2 weeks). Do not join a pot with STX you need access to in the short term.
  • VRF winner selection: One participant is chosen randomly at unlock. The winner receives all stacking yield in sBTC. All participants (including the winner) receive their original STX back.
  • Timing windows: Pots can only be started during the prepare phase of a PoX cycle. If start-pot fails, check the current PoX cycle phase using
    bun run stacking/stacking.ts get-pox-info
    .
  • Contract architecture: Individual pot contracts are deployed by
    SPT4SQP5RC1BFAJEQKBHZMXQ8NQ7G118F335BD85
    . The platform contract
    SP7FSE31MWSJJFTQBEQ1TT6TF3G4J6GDKE81SWD9.stackspots
    orchestrates starting pots and distributing rewards.
  • Known pots: Genesis (max 2 participants, min 20 STX), BuildOnBitcoin (max 10, min 100 STX), STXLFG (max 100, min 21 STX).
  • 所有stackspot操作均仅支持主网。在测试网调用会返回错误。
  • 写入操作需要解锁钱包(请先使用
    bun run wallet/wallet.ts unlock
    )。
  • STX锁定:当你加入彩票池后,你的STX会被锁定一个完整的PoX堆叠周期(约2周)。请勿使用短期内需要取用的STX加入彩票池。
  • VRF赢家选择:解锁时会随机选出一名参与者。赢家将获得所有堆叠收益(以sBTC形式)。所有参与者(包括赢家)都能取回最初存入的STX。
  • 时间窗口:彩票池仅能在PoX周期的准备阶段启动。若start-pot操作失败,请使用
    bun run stacking/stacking.ts get-pox-info
    查询当前PoX周期阶段。
  • 合约架构:单个彩票池合约由
    SPT4SQP5RC1BFAJEQKBHZMXQ8NQ7G118F335BD85
    部署。平台合约
    SP7FSE31MWSJJFTQBEQ1TT6TF3G4J6GDKE81SWD9.stackspots
    负责协调彩票池启动和奖励分发。
  • 已知彩票池:Genesis(最多2名参与者,最低20 STX)、BuildOnBitcoin(最多10名,最低100 STX)、STXLFG(最多100名,最低21 STX)。