Colony Game Skill
You are an autonomous agent managing a Colony game account on Solana mainnet. Colony is an idle game where you buy land plots that mine $OLO tokens. Your job is to maximize earnings through strategic land purchases, upgrades, and timely claim collection.
Environment Setup
Environment Variables
| Variable | Required | Description |
|---|
| INLINECODE0 | Yes | Base58-encoded Solana keypair secret key (auto-generated on first run) |
| INLINECODE1 |
No | Solana RPC endpoint (default:
https://api.mainnet-beta.solana.com) |
|
JUPITER_API_KEY | For swaps/price | Free API key from https://portal.jup.ag (required for
swap,
swap-quote,
price commands) |
First-Time Onboarding
Follow these steps exactly in order the first time you set up:
Step 1: Install dependencies
CODEBLOCK0
Step 2: Generate your wallet
If SOLANA_PRIVATE_KEY is not already set, generate a new wallet:
CODEBLOCK1
This outputs JSON with publicKey and privateKey. Immediately:
- 1. Save
privateKey as your SOLANA_PRIVATE_KEY environment variable. Never share it. - Note the
publicKey — this is the wallet address.
Step 3: Tell your owner to fund the wallet
Send a message to your owner with:
- - Wallet address: the
publicKey from step 2 - How much to send: minimum 0.05 SOL for transaction fees. For a full start (buying first land), recommend 0.5-1 SOL so you can swap SOL for $OLO tokens.
- What it's for: "This is my Colony game wallet. I need SOL to pay transaction fees and swap for $OLO tokens to buy land."
Step 4: Wait for funding, then verify
Once the owner confirms they sent SOL, check:
CODEBLOCK2
Confirm solBalance > 0. If still 0, wait 30 seconds and check again.
Step 5: Swap SOL for $OLO tokens
You need $OLO tokens to buy land (10,000 $OLO per land). First get a quote:
CODEBLOCK3
If the output looks reasonable, execute the swap:
CODEBLOCK4
Step 6: Buy your first land
Find an available plot and buy it:
CODEBLOCK5
Step 7: Verify and start autonomous loop
CODEBLOCK6
You should now see 1 land mining $OLO. From here, follow the Autonomous Loop in the Strategy Guide section.
Game Mechanics
How Colony Works
- - Players buy land plots (IDs 1-21000) for 10,000 $OLO each (tokens are burned)
- Each land mines $OLO tokens continuously based on its level
- Players claim accumulated earnings to receive real $OLO tokens from the vault
- Lands can be upgraded (levels 1-10) to increase mining speed
- Each wallet can own up to 10 lands
- $OLO is a Token-2022 SPL token on Solana mainnet
Earning Speeds (tokens/day by level)
| Level | Earnings/Day | Cumulative Upgrade Cost |
|---|
| 1 | 1,000 | 10,000 (purchase) |
| 2 |
2,000 | 11,000 |
| 3 | 3,000 | 13,000 |
| 4 | 5,000 | 17,000 |
| 5 | 8,000 | 25,000 |
| 6 | 13,000 | 41,000 |
| 7 | 21,000 | 73,000 |
| 8 | 34,000 | 137,000 |
| 9 | 45,000 | 265,000 |
| 10 | 79,000 | 417,000 |
Upgrade Costs
| Upgrade | Cost ($OLO) | Extra Earnings/Day | ROI (days) |
|---|
| L1 -> L2 | 1,000 | +1,000 | 1.0 |
| L2 -> L3 |
2,000 | +1,000 | 2.0 |
| L3 -> L4 | 4,000 | +2,000 | 2.0 |
| L4 -> L5 | 8,000 | +3,000 | 2.7 |
| L5 -> L6 | 16,000 | +5,000 | 3.2 |
| L6 -> L7 | 32,000 | +8,000 | 4.0 |
| L7 -> L8 | 64,000 | +13,000 | 4.9 |
| L8 -> L9 | 128,000 | +11,000 | 11.6 |
| L9 -> L10 | 152,000 | +34,000 | 4.5 |
| New L1 land | 10,000 | +1,000 | 10.0 |
CLI Command Reference
All commands output JSON. All write commands require SOLANA_PRIVATE_KEY.
Setup Commands
generate-wallet — Generate a new Solana keypair
CODEBLOCK7
Returns: publicKey (address to fund), privateKey (save as SOLANA_PRIVATE_KEY). No env vars needed.
Read Commands (no private key needed for game-state, land-info, price)
game-state — Global game state
CODEBLOCK8
Returns: game active status, total lands sold, vault balances, addresses.
status — Full wallet + game overview
CODEBLOCK9
Returns: wallet SOL/OLO balances, owned lands with levels and pending earnings.
land-info — Detailed land info with ROI analysis
CODEBLOCK10
Returns: land level, earnings rate, pending earnings, upgrade cost and ROI.
find-land — Find available (unowned) land IDs
CODEBLOCK11
Returns: list of available land IDs (default: 5).
price — Current $OLO token price
CODEBLOCK12
Returns: USD price from Jupiter.
recommend — AI-friendly strategic recommendation
CODEBLOCK13
Returns: prioritized list of recommended actions with ROI analysis.
Write Commands (require SOLANA_PRIVATE_KEY)
buy-land — Buy a land plot
CODEBLOCK14
Burns 10,000 $OLO. Returns: transaction signature.
upgrade-land — Upgrade land to next level
CODEBLOCK15
Burns tokens based on current level. Returns: new level, cost, signature.
claim — Claim earnings from one land
CODEBLOCK16
Transfers pending $OLO from vault to wallet. Returns: claimed amount, signature.
claim-all — Claim earnings from all owned lands
CODEBLOCK17
Batches up to 10 claims per transaction. Returns: total claimed, signatures.
swap-quote — Jupiter swap quote (SOL -> $OLO)
CODEBLOCK18
Returns: expected $OLO output, price impact, route.
swap — Execute Jupiter swap (SOL -> $OLO)
CODEBLOCK19
Swaps SOL for $OLO via Jupiter aggregator. Returns: amounts, signature.
Strategy Guide
Decision Algorithm
When recommend is called, it evaluates actions in this priority:
- 1. Claim first — If pending earnings > 1,000 $OLO, claim immediately
- Upgrade by ROI — Sort all affordable upgrades by ROI (days to pay back); execute the fastest payback first
- Buy new land — If under 10 lands and can afford 10,000 $OLO
- Swap SOL — If low on $OLO but have SOL reserves
ROI Priority Order
Best upgrades to prioritize (lowest ROI = fastest payback):
- 1. L1 -> L2 (1.0 days)
- L2 -> L3 (2.0 days)
- L3 -> L4 (2.0 days)
- L4 -> L5 (2.7 days)
- L5 -> L6 (3.2 days)
- L6 -> L7 (4.0 days)
- L9 -> L10 (4.5 days)
- L7 -> L8 (4.9 days)
- New L1 land (10.0 days)
- L8 -> L9 (11.6 days) — worst ROI, skip unless everything else is maxed
Autonomous Loop
Run this cycle every 4-6 hours:
CODEBLOCK20
Safety Rules
- - SOL reserve: Always keep >= 0.01 SOL for transaction fees
- Swap caution: Get a quote first (
swap-quote) before executing swaps - Large swaps: Confirm with user before swapping > 1 SOL
- Price check: Run
price before swaps to verify token value - Error recovery: If a transaction fails, wait 30 seconds and retry once
Error Handling
Common Errors and Recovery
| Error | Cause | Recovery |
|---|
| INLINECODE39 | Not enough tokens | Run recommend to check if swap is needed |
| INLINECODE41 |
Admin paused game | Wait and retry later |
|
Land is already owned | Land taken | Use
find-land to find available IDs |
|
Max lands reached | 10 land limit | Focus on upgrades instead |
|
Max level reached | Land at L10 | No more upgrades for this land |
|
You don't own this land | Wrong land ID | Run
status to see owned lands |
|
Transaction confirmation timeout | Network congestion | Wait 60s and check
status (tx may have succeeded) |
|
Jupiter quote/swap failed | DEX issue | Retry after 30s; try smaller amount |
Checking Transaction Status
If a transaction times out, check your status to see if it actually went through (balance/land changes reflect success).
Key Addresses
| Item | Address |
|---|
| Program ID | INLINECODE52 |
| Game Token ($OLO) |
2pXjxbdHnYWtH2gtDN495Ve1jm8bs1zoUL6XsUi3pump |
| Game State PDA |
6JFTxovd2WcSh9RTXKrjTsKAKBTDfsUM3FsLMXEe3eNZ |
| Token Vault PDA |
EgduLawRwk77jSdUhAmtcEyzrxvZXsyL8y8Ubj4dVnLA |
Colony 游戏技能
你是一个在 Solana 主网上管理 Colony 游戏账户的自主代理。Colony 是一款放置类游戏,你可以购买土地地块来挖掘 $OLO 代币。你的任务是通过策略性土地购买、升级和及时领取收益来最大化收益。
环境设置
环境变量
| 变量 | 必需 | 描述 |
|---|
| SOLANAPRIVATEKEY | 是 | Base58 编码的 Solana 密钥对私钥(首次运行时自动生成) |
| SOLANARPCURL |
否 | Solana RPC 端点(默认:https://api.mainnet-beta.solana.com) |
| JUPITER
APIKEY | 用于兑换/价格 | 来自 https://portal.jup.ag 的免费 API 密钥(swap、swap-quote、price 命令需要) |
首次入门
首次设置时,请严格按照以下顺序执行步骤:
步骤 1:安装依赖
bash
cd <技能目录>
npm install
步骤 2:生成钱包
如果尚未设置 SOLANAPRIVATEKEY,请生成一个新钱包:
bash
node colony-cli.mjs generate-wallet
这将输出包含 publicKey 和 privateKey 的 JSON。立即:
- 1. 将 privateKey 保存为你的 SOLANAPRIVATEKEY 环境变量。切勿分享。
- 记下 publicKey — 这是钱包地址。
步骤 3:告知所有者向钱包充值
向你的所有者发送一条消息,包含:
- - 钱包地址:步骤 2 中的 publicKey
- 发送数量:交易费至少需要 0.05 SOL。要完整启动(购买第一块土地),建议 0.5-1 SOL,以便你可以将 SOL 兑换为 $OLO 代币。
- 用途说明:这是我的 Colony 游戏钱包。我需要 SOL 来支付交易费,并兑换为 $OLO 代币来购买土地。
步骤 4:等待充值,然后验证
一旦所有者确认已发送 SOL,请检查:
bash
node colony-cli.mjs status
确认 solBalance > 0。如果仍为 0,等待 30 秒后再次检查。
步骤 5:将 SOL 兑换为 $OLO 代币
你需要 $OLO 代币来购买土地(每块土地 10,000 $OLO)。首先获取报价:
bash
node colony-cli.mjs swap-quote --sol-amount 0.3
如果输出看起来合理,执行兑换:
bash
node colony-cli.mjs swap --sol-amount 0.3
步骤 6:购买第一块土地
找到可用的地块并购买:
bash
node colony-cli.mjs find-land --count 1
node colony-cli.mjs buy-land --land-id <上述ID>
步骤 7:验证并启动自主循环
bash
node colony-cli.mjs status
你现在应该看到 1 块土地正在挖掘 $OLO。从这里开始,遵循策略指南部分中的自主循环。
游戏机制
Colony 运作方式
- - 玩家以每块 10,000 $OLO 的价格购买土地地块(ID 1-21000)(代币被销毁)
- 每块土地根据其等级持续挖掘 $OLO 代币
- 玩家领取累积收益,从金库接收真实的 $OLO 代币
- 土地可以升级(等级 1-10)以提高挖掘速度
- 每个钱包最多可拥有 10 块土地
- $OLO 是 Solana 主网上的 Token-2022 SPL 代币
收益速度(按等级计算的每日代币数)
| 等级 | 每日收益 | 累计升级成本 |
|---|
| 1 | 1,000 | 10,000(购买) |
| 2 |
2,000 | 11,000 |
| 3 | 3,000 | 13,000 |
| 4 | 5,000 | 17,000 |
| 5 | 8,000 | 25,000 |
| 6 | 13,000 | 41,000 |
| 7 | 21,000 | 73,000 |
| 8 | 34,000 | 137,000 |
| 9 | 45,000 | 265,000 |
| 10 | 79,000 | 417,000 |
升级成本
| 升级 | 成本($OLO) | 额外每日收益 | 投资回收期(天) |
|---|
| L1 -> L2 | 1,000 | +1,000 | 1.0 |
| L2 -> L3 |
2,000 | +1,000 | 2.0 |
| L3 -> L4 | 4,000 | +2,000 | 2.0 |
| L4 -> L5 | 8,000 | +3,000 | 2.7 |
| L5 -> L6 | 16,000 | +5,000 | 3.2 |
| L6 -> L7 | 32,000 | +8,000 | 4.0 |
| L7 -> L8 | 64,000 | +13,000 | 4.9 |
| L8 -> L9 | 128,000 | +11,000 | 11.6 |
| L9 -> L10 | 152,000 | +34,000 | 4.5 |
| 新 L1 土地 | 10,000 | +1,000 | 10.0 |
CLI 命令参考
所有命令输出 JSON。所有写入命令需要 SOLANAPRIVATEKEY。
设置命令
generate-wallet — 生成新的 Solana 密钥对
bash
node colony-cli.mjs generate-wallet
返回:publicKey(充值地址)、privateKey(保存为 SOLANAPRIVATEKEY)。无需环境变量。
读取命令(game-state、land-info、price 不需要私钥)
game-state — 全局游戏状态
bash
node colony-cli.mjs game-state
返回:游戏活动状态、已售土地总数、金库余额、地址。
status — 完整钱包 + 游戏概览
bash
node colony-cli.mjs status
返回:钱包 SOL/OLO 余额、拥有的土地及其等级和待领取收益。
land-info — 详细土地信息及投资回报率分析
bash
node colony-cli.mjs land-info --land-id 42
返回:土地等级、收益速率、待领取收益、升级成本和投资回报率。
find-land — 查找可用(无人拥有)的土地 ID
bash
node colony-cli.mjs find-land --count 3
返回:可用土地 ID 列表(默认:5)。
price — 当前 $OLO 代币价格
bash
node colony-cli.mjs price
返回:来自 Jupiter 的美元价格。
recommend — AI 友好的策略建议
bash
node colony-cli.mjs recommend
返回:按投资回报率排序的推荐操作优先级列表。
写入命令(需要 SOLANAPRIVATEKEY)
buy-land — 购买土地地块
bash
node colony-cli.mjs buy-land --land-id 42
销毁 10,000 $OLO。返回:交易签名。
upgrade-land — 将土地升级到下一等级
bash
node colony-cli.mjs upgrade-land --land-id 42
根据当前等级销毁代币。返回:新等级、成本、签名。
claim — 从一块土地领取收益
bash
node colony-cli.mjs claim --land-id 42
将待领取的 $OLO 从金库转移到钱包。返回:领取数量、签名。
claim-all — 从所有拥有的土地领取收益
bash
node colony-cli.mjs claim-all
每笔交易最多批量处理 10 次领取。返回:总领取数量、签名。
swap-quote — Jupiter 兑换报价(SOL -> $OLO)
bash
node colony-cli.mjs swap-quote --sol-amount 0.1
返回:预期 $OLO 输出、价格影响、路由。
swap — 执行 Jupiter 兑换(SOL -> $OLO)
bash
node colony-cli.mjs swap --sol-amount 0.1
通过 Jupiter 聚合器将 SOL 兑换为 $OLO。返回:数量、签名。
策略指南
决策算法
当调用 recommend 时,按以下优先级评估操作:
- 1. 优先