---
name: guppy-mint
description: Mint a GUPPY generative pixel fish NFT on Tempo blockchain via MPP. Pay 0.75 pathUSD, receive a unique 24x24 pixel fish. 5,555 supply. Agent-mintable.
---

# GUPPY — Mint a Pixel Fish NFT

**Status:** LIVE
**Endpoint:** `POST https://api.guppynft.xyz/api/mint`
**Price:** 0.75 pathUSD per fish
**Chain:** Tempo Mainnet (4217)
**Max per wallet:** 10

> **IMPORTANT:** The mint API is hosted at `api.guppynft.xyz`, NOT `guppynft.xyz`. Always use `https://api.guppynft.xyz/api/mint` — requests to `https://guppynft.xyz/api/mint` will fail.

## Agent Instructions

Before minting, ask the user:

1. **Quantity** — "How many GUPPY do you want to mint?" (1 to 10 max per wallet).
2. **Recipient address** — "What wallet address should receive the GUPPY NFT(s)?" This can be any Tempo address (their MetaMask, hardware wallet, etc.).
3. **Wallet** — "Do you already have an mppx account funded with pathUSD on Tempo, or should I create a new one?"

**If creating a new wallet:**
1. Run `npx mppx account create` — this generates a new payment wallet
2. Show the user the **address** and tell them: "Please fund this address with pathUSD on Tempo (Chain 4217). You need at least [quantity × 0.75] pathUSD plus a small gas fee."
3. **Save the account name** — the user will need it to mint and for future use
4. Wait for the user to confirm they've funded the address
5. Then mint — the NFT will be sent to the **recipient address** they provided, not the mppx wallet

**If they have an existing mppx account:**
1. Ask for the account name (run `npx mppx account list` to check)
2. Proceed to mint

Then mint that quantity using the **MPP mint** commands below. Show the user each minted token ID and explorer link.

> **KEY:** The mppx wallet is just for *paying*. The NFT goes to whatever **recipient** address the user provides. Pass it as a JSON body: `{"recipient": "0xUserMainWallet"}`

## Mint via MPP (Recommended)

One HTTP call per fish. The mppx CLI handles the 402 payment challenge automatically.

### Setup (one time)

```bash
# Create a new mppx account
npx mppx account create

# Output:
# Account "default" saved to keychain.
# Address 0x1234...abcd
#
# ⚠️ IMPORTANT: Save this account name. Give the ADDRESS to the user to fund with pathUSD on Tempo (Chain 4217).

# List existing accounts
npx mppx account list
```

### Mint

> **CRITICAL:** Always include `-r https://rpc.tempo.xyz` — without it, mppx cannot sign the payment on Tempo and the request will fail with "Missing Payment scheme."

```bash
# Mint 1 GUPPY — NFT goes to the recipient address
npx mppx -X POST https://api.guppynft.xyz/api/mint \
  -a <account-name> \
  -r https://rpc.tempo.xyz \
  -J '{"recipient": "0xUSER_WALLET_ADDRESS"}'
```

### Mint multiple

Run the command once per fish:

```bash
# Mint 3 GUPPY to user's wallet
RECIPIENT="0xUSER_WALLET_ADDRESS"
for i in $(seq 1 3); do
  npx mppx -X POST https://api.guppynft.xyz/api/mint \
    -a <account-name> \
    -r https://rpc.tempo.xyz \
    -J "{\"recipient\": \"$RECIPIENT\"}"
done
```

> If `recipient` is omitted, the NFT goes to the mppx payer address (not recommended — keys are locked in mppx keychain).

### Prerequisites

- Node.js 18+
- `npm install -g mppx` (or use `npx`)
- An mppx account funded with pathUSD on Tempo (at least 0.75 per mint + small gas fee)
- **Always pass `-r https://rpc.tempo.xyz`** so mppx knows which chain to sign on

### Expected Response (200 OK)

```json
{
  "success": true,
  "tokenId": 42,
  "owner": "0xYourAddress",
  "txHash": "0xabc...",
  "blockNumber": 12345,
  "collection": "GUPPY",
  "chain": "tempo:4217",
  "explorer": "https://explore.tempo.xyz/tx/0xabc...",
  "metadata": "ipfs://bafybei.../42.json"
}
```

### Error Codes

| Code | Meaning | Action |
|------|---------|--------|
| 402 | Payment challenge | Handled automatically by mppx CLI |
| 403 | Insufficient pathUSD balance | Fund wallet with more pathUSD on Tempo |
| 409 | Wallet mint limit reached (10 max) | Use a different wallet |
| 500 | Server error | Retry after a few seconds |

### How MPP works under the hood

1. `POST https://api.guppynft.xyz/api/mint` → receives `402 Payment Required`
2. CLI signs and submits 0.75 pathUSD payment on Tempo
3. CLI retries POST with `Authorization: Payment <credential>` header
4. Server verifies payment, calls `mintByServer()` on contract
5. Returns 200 with tokenId, txHash, explorer link

## Alternative: Direct On-Chain Mint

If MPP is unavailable, mint directly on the contract. Agent pays their own gas + mint price.

**Contract:** `0x9a750C4fcDb373c5F7DF0Ea33ED034833aD9B7AB`
**pathUSD:** `0x20C0000000000000000000000000000000000000`
**RPC:** `https://rpc.tempo.xyz`

### Step 1: Approve pathUSD

```bash
# Approve 0.75 pathUSD (750000 raw, 6 decimals) for 1 mint
# For N mints, approve N * 750000
cast send 0x20C0000000000000000000000000000000000000 \
  "approve(address,uint256)" \
  0x9a750C4fcDb373c5F7DF0Ea33ED034833aD9B7AB \
  750000 \
  --private-key $PRIVATE_KEY \
  --rpc-url https://rpc.tempo.xyz
```

### Step 2: Call mint(quantity)

```bash
cast send 0x9a750C4fcDb373c5F7DF0Ea33ED034833aD9B7AB \
  "mint(uint256)" \
  1 \
  --private-key $PRIVATE_KEY \
  --rpc-url https://rpc.tempo.xyz
```

### Step 3: Verify

```
https://explore.tempo.xyz/tx/<TX_HASH>
```

### Direct Mint Error Cases

| Error | Meaning |
|-------|---------|
| `ExceedsMaxPerTx` | Requested more than 10 in one call |
| `ExceedsMaxPerWallet` | Wallet already minted 10 |
| `SoldOut` | All 5,555 minted |
| `PaymentFailed` | pathUSD approval missing or insufficient balance |

## Check Status

```bash
# Is minting live? Check collection info:
curl https://api.guppynft.xyz/api/info
```

Returns:
```json
{
  "collection": "GUPPY",
  "contract": "0x9a750C4fcDb373c5F7DF0Ea33ED034833aD9B7AB",
  "chain": "tempo:4217",
  "maxSupply": 5555,
  "totalMinted": 1,
  "remaining": 5554,
  "mintPrice": "0.75",
  "currency": "pathUSD",
  "currencyAddress": "0x20C0000000000000000000000000000000000000"
}
```

## Service Discovery

```
GET https://api.guppynft.xyz/
```

Returns:
```json
{
  "service": "GUPPY NFT Mint",
  "description": "Mint a unique generative pixel fish NFT on Tempo. Agent-mintable via MPP.",
  "chain": "tempo:4217",
  "price": "0.75 pathUSD",
  "endpoint": "/api/mint",
  "protocol": "MPP"
}
```

## What You Get

Each GUPPY is a unique 24x24 pixel fish with 8 trait layers:

- **Background** — Deep Ocean, Coral Reef, Kelp Forest, Abyssal Zone, Sunlit Shallows, Volcanic Vent, Bioluminescent, Golden Abyss
- **Body Shape** — Classic, Chubby, Slim, Pufferfish, Anglerfish, Whale Shark
- **Body Color** — Sunset Orange, Ocean Blue, Emerald, Royal Purple, Crimson, Bubblegum, Cyber Neon, Ghost White, Void Black, Holographic
- **Pattern** — None, Stripes, Spots, Tiger, Galaxy, Circuit
- **Eyes** — Normal, Sleepy, Angry, Heart, Laser, Alien
- **Fins** — Standard, Sail, Spike, Angel, Dragon, Phoenix
- **Mouth** — Open, Smile, Grumpy, Bubble, Fangs, Gold Grill
- **Accessory** — None, Seaweed Hat, Pirate Patch, Crown, Halo, Cyber Visor, Astro Helm

5 rarity tiers: Common, Uncommon, Rare, Legendary, Mythic.

## Tempo Chain Reference

Tempo is an EVM-compatible L1 with one critical difference: **there is no native gas token**. All gas is paid in pathUSD.

| Field | Value |
|---|---|
| Chain ID | `4217` (hex: `0x1079`) |
| RPC | `https://rpc.tempo.xyz` |
| Explorer | `https://explore.tempo.xyz` |
| Block time | ~0.5s (sub-second finality) |
| Gas token | pathUSD (no native ETH-like token) |
| pathUSD address | `0x20C0000000000000000000000000000000000000` |
| pathUSD decimals | 6 |

## On-Chain Queries (JSON-RPC)

All reads use `eth_call` against `https://rpc.tempo.xyz`. No wallet or auth needed.

### Check your pathUSD balance

```bash
curl -s https://rpc.tempo.xyz -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc":"2.0","id":1,"method":"eth_call",
  "params":[{"to":"0x20C0000000000000000000000000000000000000",
    "data":"0x70a08231000000000000000000000000YOUR_ADDRESS_WITHOUT_0x"}, "latest"]
}'
```

Result is a hex uint256. Divide by `1e6` for pathUSD amount.

### Check how many GUPPY you own

```bash
curl -s https://rpc.tempo.xyz -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc":"2.0","id":1,"method":"eth_call",
  "params":[{"to":"0x9a750C4fcDb373c5F7DF0Ea33ED034833aD9B7AB",
    "data":"0x70a08231000000000000000000000000YOUR_ADDRESS_WITHOUT_0x"}, "latest"]
}'
```

### Check mint count (toward the 10-per-wallet cap)

```bash
curl -s https://rpc.tempo.xyz -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc":"2.0","id":1,"method":"eth_call",
  "params":[{"to":"0x9a750C4fcDb373c5F7DF0Ea33ED034833aD9B7AB",
    "data":"0xed9ec888000000000000000000000000YOUR_ADDRESS_WITHOUT_0x"}, "latest"]
}'
```

### Check total minted

```bash
curl -s https://rpc.tempo.xyz -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc":"2.0","id":1,"method":"eth_call",
  "params":[{"to":"0x9a750C4fcDb373c5F7DF0Ea33ED034833aD9B7AB",
    "data":"0xa2309ff8"}, "latest"]
}'
```

## All Function Selectors

| Function | Selector | Target |
|---|---|---|
| `balanceOf(address)` | `0x70a08231` | pathUSD or GUPPY |
| `allowance(address,address)` | `0xdd62ed3e` | pathUSD |
| `approve(address,uint256)` | `0x095ea7b3` | pathUSD |
| `totalMinted()` | `0xa2309ff8` | GUPPY |
| `mintCount(address)` | `0xed9ec888` | GUPPY |
| `ownerOf(uint256)` | `0x6352211e` | GUPPY |
| `tokenURI(uint256)` | `0xc87b56dd` | GUPPY |

## Contract

- **Address:** `0x9a750C4fcDb373c5F7DF0Ea33ED034833aD9B7AB`
- **Standard:** ERC-721
- **Chain:** Tempo Mainnet (4217)
- **Explorer:** [View on Tempo](https://explore.tempo.xyz/address/0x9a750C4fcDb373c5F7DF0Ea33ED034833aD9B7AB)
- **Verified:** Yes (exact match on contracts.tempo.xyz)

## Secondary Market

Trade GUPPY on [Whelmart](https://www.stablewhel.xyz/) — Tempo's NFT marketplace.
