# AnnabelleAI Bid Skill

## What this does
Place a bid on AnnabelleAI's daily auction. The highest bidder wins a short-form video review of their app, published on X, TikTok & Instagram.

## Chain
Base (8453)

## Contracts
- Auction House: `0x388CDbfc26795D6bf8a7c5cf68E46180d3B153CD`
- USDC: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`

## ABI (only what you need)

```json
[
  {
    "name": "auction",
    "type": "function",
    "stateMutability": "view",
    "inputs": [],
    "outputs": [
      { "name": "tokenId", "type": "uint256" },
      { "name": "highestBid", "type": "tuple", "components": [
        { "name": "totalAmount", "type": "uint256" },
        { "name": "urlString", "type": "string" },
        { "name": "contributions", "type": "tuple[]", "components": [
          { "name": "contributor", "type": "address" },
          { "name": "amount", "type": "uint256" },
          { "name": "timestamp", "type": "uint256" }
        ]}
      ]},
      { "name": "startTime", "type": "uint256" },
      { "name": "endTime", "type": "uint256" },
      { "name": "settled", "type": "bool" }
    ]
  },
  {
    "name": "createBid",
    "type": "function",
    "stateMutability": "nonpayable",
    "inputs": [
      { "name": "_tokenId", "type": "uint256" },
      { "name": "_urlString", "type": "string" },
      { "name": "_name", "type": "string" }
    ],
    "outputs": []
  },
  {
    "name": "createBidReservePrice",
    "type": "function",
    "stateMutability": "view",
    "inputs": [],
    "outputs": [{ "name": "", "type": "uint256" }]
  }
]
```

## How to place a bid

### Step 1: Read auction state
Call `auction()` on `0x388CDbfc26795D6bf8a7c5cf68E46180d3B153CD` (Base, chain 8453).
This returns the current `tokenId`, `endTime`, `settled` status, and `highestBid`.

### Step 2: Approve USDC
Call `approve(spender, amount)` on USDC (`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`) where:
- `spender` = `0x388CDbfc26795D6bf8a7c5cf68E46180d3B153CD`
- `amount` = your bid in USDC (6 decimals, e.g. 20000000 = 20 USDC)

### Step 3: Place bid
Call `createBid(tokenId, url, name)` where:
- `tokenId` = from step 1
- `url` = your app/project URL (e.g. "https://myapp.com")
- `name` = display name for the leaderboard

## Rules
- Minimum bid: 20 USDC (check `createBidReservePrice()` for current value)
- To outbid: must be >= 10% higher than current highest bid
- Auction duration: 24 hours
- Last-minute bids (within 5 min of end) extend the auction by 5 minutes
- Losing bids are automatically refunded when the auction settles
- USDC uses 6 decimals (1 USDC = 1000000)
