Monagotchi monagotchi-trader
Manage $MONA tokens on nad.fun (Monad blockchain) for Monagotchi pet interactions. Use when you need to burn tokens for pet actions, check token balance, or get token info. Every pet action (feed, play, clean, heal) requires burning $MONA tokens through this skill. Works with monagotchi-controller.
git clone https://github.com/This-Is-Captain-Code/monagotchi
T=$(mktemp -d) && git clone --depth=1 https://github.com/This-Is-Captain-Code/monagotchi "$T" && mkdir -p ~/.claude/skills && cp -r "$T/monagotchi-trader" ~/.claude/skills/this-is-captain-code-monagotchi-monagotchi-trader && rm -rf "$T"
monagotchi-trader/SKILL.mdNad.fun Monagotchi Trader
Manage $MONA tokens on the Monad blockchain for Monagotchi pet interactions. This skill handles burning tokens when the owner wants to feed, play with, clean, or heal their pet.
Overview
$MONA is the fuel for your Monagotchi. Every pet action burns tokens — they're sent to the dead address and permanently removed from supply. The more you care for your pet, the scarcer $MONA becomes.
Setup
Install dependencies first:
cd {baseDir}/scripts && npm install
Configuration
Required environment variables (set in
~/.openclaw/openclaw.json under skills.entries.monagotchi-trader.env):
MONAGOTCHI_TOKEN_ADDRESS=0x... # $MONA token contract on Monad MONAD_PRIVATE_KEY=0x... # Owner wallet private key (for signing burn txs) MONAD_RPC_URL=https://... # Monad RPC endpoint
Action Costs
| Action | $MONA Burned |
|---|---|
| Feed | 1,000 |
| Play | 2,500 |
| Clean | 1,500 |
| Heal | 5,000 |
| Sleep/Wake | 0 (free) |
| Status | 0 (free) |
These costs are defined in the
{baseDir}/scripts/monagotchi-trader.mjs config and can be adjusted.
How Burning Works
Burning = transferring tokens to the dead address:
0x000000000000000000000000000000000000dEaD
This is a standard ERC-20
transfer() call. Tokens sent to the dead address are permanently out of circulation.
Operations
Check Balance
node {baseDir}/scripts/monagotchi-trader.mjs balance
Returns JSON with the owner's $MONA balance and what they can afford.
Burn Tokens (for a pet action)
node {baseDir}/scripts/monagotchi-trader.mjs burn feed node {baseDir}/scripts/monagotchi-trader.mjs burn play node {baseDir}/scripts/monagotchi-trader.mjs burn clean node {baseDir}/scripts/monagotchi-trader.mjs burn heal
Each command:
- Checks the owner's $MONA balance
- Verifies sufficient tokens for the action
- Sends the required amount to 0x...dEaD
- Waits for tx confirmation
- Outputs JSON with the tx hash on success or an error message on failure
Get Token Info
node {baseDir}/scripts/monagotchi-trader.mjs info
Returns token name, symbol, total supply, owner balance, and bonding curve progress.
Output Format
All commands output JSON to stdout. Status/debug messages go to stderr. Parse stdout for structured results:
{"success": true, "action": "feed", "burned": 1000, "txHash": "0x...", "remainingBalance": "45000.0"}
On failure:
{"success": false, "error": "Insufficient $MONA. Need 1000, have 500.0"}
Contract Details
Monad Mainnet Addresses
See
{baseDir}/references/nadfun-contracts.md for full list. Key addresses:
BONDING_CURVE: 0xA7283d07812a02AFB7C09B60f8896bCEA3F90aCE LENS: 0x7e78A8DE94f21804F7a17F4E8BF9EC2c872187ea BURN_ADDRESS: 0x000000000000000000000000000000000000dEaD
Security
⚠️ The private key is stored as an environment variable. This is the owner's wallet key used to sign burn transactions. Keep it safe:
- Never commit it to git
- Set it in
under~/.openclaw/openclaw.jsonskills.entries.monagotchi-trader.env - Consider using a dedicated wallet with only $MONA and a small amount of MON for gas
Integration with monagotchi-controller
The typical flow when the owner requests a pet action:
- monagotchi-controller checks pet status via
curl -s http://${MONAGOTCHI_ESP32_IP}/pet - monagotchi-controller determines which action to take and its cost
- monagotchi-trader checks $MONA balance —
node {baseDir}/scripts/monagotchi-trader.mjs balance - monagotchi-trader burns the required $MONA —
node {baseDir}/scripts/monagotchi-trader.mjs burn <action> - If burn tx confirms → monagotchi-controller calls the ESP32 endpoint
- If burn fails → report the error, don't execute the action
- monagotchi-environment updates room lights/temp based on pet state
Examples
- "Feed my pet" →
→ on success, controller calls POST /feednode {baseDir}/scripts/monagotchi-trader.mjs burn feed - "What's my $MONA balance?" →
, report backnode {baseDir}/scripts/monagotchi-trader.mjs balance - "Heal and clean my pet" → burn 5,000 for heal → call /heal → burn 1,500 for clean → call /clean
- "Can I afford to play?" → check balance → compare against 2,500 → respond yes/no