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

# BUBBL — Mint a Pixel Fish NFT

Mint a unique generative pixel fish NFT on Tempo (Chain 4217). Pay 0.75 pathUSD via MPP. No wallet UI needed.

## Quick Start

```bash
# Check collection status
curl https://api.bubblnft.xyz/api/info

# Mint via MPP (uses mppx CLI)
npx mppx POST https://api.bubblnft.xyz/api/mint
```

## Endpoint

| Field | Value |
|---|---|
| URL | `POST https://api.bubblnft.xyz/api/mint` |
| Protocol | MPP (Machine Payments Protocol) |
| Price | 0.75 pathUSD |
| Chain | Tempo Mainnet (4217) |
| Payment Token | pathUSD `0x20C0000000000000000000000000000000000000` (6 decimals) |

## How to Mint (MPP Flow)

1. **Send** `POST https://api.bubblnft.xyz/api/mint`
2. **Receive** `402 Payment Required` with payment challenge:
   ```json
   {
     "amount": "0.75",
     "currency": "0x20C0000000000000000000000000000000000000",
     "chain": 4217,
     "recipient": "<treasury>"
   }
   ```
3. **Sign** the pathUSD payment transaction on Tempo
4. **Retry** the POST with `Authorization: Payment <credential>` header
5. **Receive** `200 OK` with your minted BUBBL:
   ```json
   {
     "success": true,
     "tokenId": 42,
     "owner": "0xYourAddress",
     "txHash": "0x...",
     "blockNumber": 12345,
     "collection": "BUBBL",
     "chain": "tempo:4217",
     "explorer": "https://explore.tempo.xyz/tx/0x...",
     "metadata": "ipfs://Qm.../42.json"
   }
   ```

## Using mppx SDK (Programmatic)

```typescript
import { MppxClient } from 'mppx/client'

const client = new MppxClient({
  privateKey: process.env.AGENT_PRIVATE_KEY,
  chain: 4217,
  rpcUrl: 'https://rpc.tempo.xyz',
})

const result = await client.post('https://api.bubblnft.xyz/api/mint')
console.log(`Minted BUBBL #${result.tokenId}`)
```

## Check Collection Status

```
GET https://api.bubblnft.xyz/api/info
```

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

## Service Discovery

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

Returns:
```json
{
  "service": "BUBBL 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 BUBBL 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 |

To add Tempo to your wallet or RPC client:
```json
{
  "chainId": "0x1079",
  "chainName": "Tempo Mainnet",
  "rpcUrls": ["https://rpc.tempo.xyz"],
  "blockExplorerUrls": ["https://explore.tempo.xyz"]
}
```

## 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.

**Selector:** `balanceOf(address)` = `0x70a08231`

### Check how many BUBBL 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":"0xC4B1e4d12DF2279B4F0Da063E6E9F767a73fE3e1",
    "data":"0x70a08231000000000000000000000000YOUR_ADDRESS_WITHOUT_0x"}, "latest"]
}'
```

### Check how many you've minted (toward the 10-per-wallet cap)

**Selector:** `mintCount(address)` = `0xed9ec888`

```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":"0xC4B1e4d12DF2279B4F0Da063E6E9F767a73fE3e1",
    "data":"0xed9ec888000000000000000000000000YOUR_ADDRESS_WITHOUT_0x"}, "latest"]
}'
```

### Check total minted (collection progress)

**Selector:** `totalMinted()` = `0xa2309ff8`

```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":"0xC4B1e4d12DF2279B4F0Da063E6E9F767a73fE3e1",
    "data":"0xa2309ff8"}, "latest"]
}'
```

### Verify a transaction

```
https://explore.tempo.xyz/tx/YOUR_TX_HASH
```

Or via RPC:
```bash
curl -s https://rpc.tempo.xyz -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc":"2.0","id":1,"method":"eth_getTransactionReceipt",
  "params":["YOUR_TX_HASH"]
}'
```

`status: "0x1"` = success, `"0x0"` = reverted.

## All Function Selectors

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

## Requirements

- pathUSD on Tempo mainnet (at least 0.75 for one mint plus gas)
- Maximum 10 mints per agent wallet
- Gas is paid in pathUSD (Tempo has no native gas token)
- Fund your agent wallet by bridging or acquiring pathUSD on Tempo

## Contract

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

## Secondary Market

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