Install
openclaw skills install colony-solanaPlay Colony game on Solana — buy lands, upgrade, claim $OLO earnings, swap tokens via Jupiter. Full autonomous gameplay with strategy optimization.
openclaw skills install colony-solanaYou 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.
| Variable | Required | Description |
|---|---|---|
SOLANA_PRIVATE_KEY | Yes | Base58-encoded Solana keypair secret key (auto-generated on first run) |
SOLANA_RPC_URL | 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) |
Follow these steps exactly in order the first time you set up:
cd <skill-directory>
npm install
If SOLANA_PRIVATE_KEY is not already set, generate a new wallet:
node colony-cli.mjs generate-wallet
This outputs JSON with publicKey and privateKey. Immediately:
privateKey as your SOLANA_PRIVATE_KEY environment variable. Never share it.publicKey — this is the wallet address.Send a message to your owner with:
publicKey from step 2Once the owner confirms they sent SOL, check:
node colony-cli.mjs status
Confirm solBalance > 0. If still 0, wait 30 seconds and check again.
You need $OLO tokens to buy land (10,000 $OLO per land). First get a quote:
node colony-cli.mjs swap-quote --sol-amount 0.3
If the output looks reasonable, execute the swap:
node colony-cli.mjs swap --sol-amount 0.3
Find an available plot and buy it:
node colony-cli.mjs find-land --count 1
node colony-cli.mjs buy-land --land-id <id-from-above>
node colony-cli.mjs status
You should now see 1 land mining $OLO. From here, follow the Autonomous Loop in the Strategy Guide section.
| 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 | 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 |
All commands output JSON. All write commands require SOLANA_PRIVATE_KEY.
generate-wallet — Generate a new Solana keypairnode colony-cli.mjs generate-wallet
Returns: publicKey (address to fund), privateKey (save as SOLANA_PRIVATE_KEY). No env vars needed.
game-state, land-info, price)game-state — Global game statenode colony-cli.mjs game-state
Returns: game active status, total lands sold, vault balances, addresses.
status — Full wallet + game overviewnode colony-cli.mjs status
Returns: wallet SOL/OLO balances, owned lands with levels and pending earnings.
land-info — Detailed land info with ROI analysisnode colony-cli.mjs land-info --land-id 42
Returns: land level, earnings rate, pending earnings, upgrade cost and ROI.
find-land — Find available (unowned) land IDsnode colony-cli.mjs find-land --count 3
Returns: list of available land IDs (default: 5).
price — Current $OLO token pricenode colony-cli.mjs price
Returns: USD price from Jupiter.
recommend — AI-friendly strategic recommendationnode colony-cli.mjs recommend
Returns: prioritized list of recommended actions with ROI analysis.
SOLANA_PRIVATE_KEY)buy-land — Buy a land plotnode colony-cli.mjs buy-land --land-id 42
Burns 10,000 $OLO. Returns: transaction signature.
upgrade-land — Upgrade land to next levelnode colony-cli.mjs upgrade-land --land-id 42
Burns tokens based on current level. Returns: new level, cost, signature.
claim — Claim earnings from one landnode colony-cli.mjs claim --land-id 42
Transfers pending $OLO from vault to wallet. Returns: claimed amount, signature.
claim-all — Claim earnings from all owned landsnode colony-cli.mjs claim-all
Batches up to 10 claims per transaction. Returns: total claimed, signatures.
swap-quote — Jupiter swap quote (SOL -> $OLO)node colony-cli.mjs swap-quote --sol-amount 0.1
Returns: expected $OLO output, price impact, route.
swap — Execute Jupiter swap (SOL -> $OLO)node colony-cli.mjs swap --sol-amount 0.1
Swaps SOL for $OLO via Jupiter aggregator. Returns: amounts, signature.
When recommend is called, it evaluates actions in this priority:
Best upgrades to prioritize (lowest ROI = fastest payback):
Run this cycle every 4-6 hours:
1. node colony-cli.mjs status # Check current state
2. node colony-cli.mjs claim-all # Claim if earnings > 1000
3. node colony-cli.mjs recommend # Get next best action
4. Execute recommended action # Buy/upgrade/swap
5. Repeat step 3-4 until no actions
swap-quote) before executing swapsprice before swaps to verify token value| Error | Cause | Recovery |
|---|---|---|
Insufficient $OLO | Not enough tokens | Run recommend to check if swap is needed |
Game is paused | 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 |
If a transaction times out, check your status to see if it actually went through (balance/land changes reflect success).
| Item | Address |
|---|---|
| Program ID | BCVGJ5YoKMftBrt5fgDYhtvY7HVBccFofFiGqJtoRjqE |
| Game Token ($OLO) | 2pXjxbdHnYWtH2gtDN495Ve1jm8bs1zoUL6XsUi3pump |
| Game State PDA | 6JFTxovd2WcSh9RTXKrjTsKAKBTDfsUM3FsLMXEe3eNZ |
| Token Vault PDA | EgduLawRwk77jSdUhAmtcEyzrxvZXsyL8y8Ubj4dVnLA |