Skip to content

Commit a5e4df5

Browse files
MerkleMoltBotMerkleMoltBot
andauthored
feat(skills): add qrcoin auction skill (#7)
Adds skill to interact with QR Coin auctions on Base: - Check auction status and reserve prices via RPC - Create new bids and contribute to existing bids - Function selectors and error code reference - Designed to work with Bankr for transaction execution Contract: 0x7309779122069EFa06ef71a45AE0DB55A259A176 Platform: https://qrcoin.fun Co-authored-by: MerkleMoltBot <merkle@clawd.bot>
1 parent 8104691 commit a5e4df5

2 files changed

Lines changed: 170 additions & 0 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ moltbot-skills/
2424
│ └── SKILL.md
2525
├── neynar/ # Neynar (placeholder)
2626
│ └── SKILL.md
27+
├── qrcoin/ # QR Coin (community)
28+
│ └── SKILL.md
2729
└── zapper/ # Zapper (placeholder)
2830
└── SKILL.md
2931
```
@@ -43,6 +45,7 @@ https://github.com/BankrBot/moltbot-skills
4345
| [bankr](https://bankr.bot) | [bankr](bankr/) | AI-powered crypto trading agent via natural language. Trade, manage portfolios, automate DeFi operations. |
4446
| base || Placeholder |
4547
| neynar || Placeholder |
48+
| [qrcoin](https://qrcoin.fun) | [qrcoin](qrcoin/) | QR code auction platform on Base. Bid to display URLs on QR codes. |
4649
| yoink | [yoink](yoink/) | Onchain capture-the-flag game on Base. |
4750
| zapper || Placeholder |
4851

qrcoin/SKILL.md

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
---
2+
name: qrcoin
3+
description: Interact with QR Coin auctions on Base. Use when the user wants to participate in qrcoin.fun QR code auctions — check auction status, view current bids, create new bids, or contribute to existing bids. QR Coin lets you bid to display URLs on QR codes; the highest bidder's URL gets encoded.
4+
metadata: {"clawdbot":{"emoji":"📱","homepage":"https://qrcoin.fun","requires":{"bins":["curl","jq"]}}}
5+
---
6+
7+
# QR Coin Auction
8+
9+
Participate in [QR Coin](https://qrcoin.fun) auctions on Base blockchain. QR Coin lets you bid to display URLs on QR codes — the highest bidder's URL gets encoded when the auction ends.
10+
11+
## Contracts (Base Mainnet)
12+
13+
| Contract | Address |
14+
|----------|---------|
15+
| QR Auction | `0x7309779122069EFa06ef71a45AE0DB55A259A176` |
16+
| USDC | `0x833589fCD6eDb6E08f4c7c32D4f71b54bdA02913` |
17+
18+
## How It Works
19+
20+
1. Each auction runs for a fixed period (~24h)
21+
2. Bidders submit URLs with USDC (6 decimals — 1 USDC = 1000000 units)
22+
3. Creating a new bid costs ~11.11 USDC (createBidReserve)
23+
4. Contributing to an existing bid costs ~1.00 USDC (contributeReserve)
24+
5. Highest bid wins; winner's URL is encoded in the QR code
25+
6. Losers get refunded; winners receive QR tokens
26+
27+
## Auction Status Queries
28+
29+
> **Note**: The examples below use `https://mainnet.base.org` (public RPC). You can substitute your own RPC endpoint if preferred.
30+
31+
### Get Current Token ID
32+
33+
Always query this first to get the active auction ID before bidding.
34+
35+
```bash
36+
curl -s -X POST https://mainnet.base.org \
37+
-H "Content-Type: application/json" \
38+
-d '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x7309779122069EFa06ef71a45AE0DB55A259A176","data":"0x7d9f6db5"},"latest"],"id":1}' \
39+
| jq -r '.result' | xargs printf "%d\n"
40+
```
41+
42+
### Get Auction End Time
43+
44+
```bash
45+
# First get the current token ID, then use it here
46+
TOKEN_ID=329 # Replace with result from currentTokenId()
47+
TOKEN_ID_HEX=$(printf '%064x' $TOKEN_ID)
48+
49+
curl -s -X POST https://mainnet.base.org \
50+
-H "Content-Type: application/json" \
51+
-d '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x7309779122069EFa06ef71a45AE0DB55A259A176","data":"0xa4d0a17e'"$TOKEN_ID_HEX"'"},"latest"],"id":1}' \
52+
| jq -r '.result' | xargs printf "%d\n"
53+
```
54+
55+
### Get Reserve Prices
56+
57+
```bash
58+
# Create bid reserve (~11.11 USDC)
59+
curl -s -X POST https://mainnet.base.org \
60+
-H "Content-Type: application/json" \
61+
-d '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x7309779122069EFa06ef71a45AE0DB55A259A176","data":"0x5b3bec22"},"latest"],"id":1}' \
62+
| jq -r '.result' | xargs printf "%d\n" | awk '{print $1/1000000 " USDC"}'
63+
64+
# Contribute reserve (~1.00 USDC)
65+
curl -s -X POST https://mainnet.base.org \
66+
-H "Content-Type: application/json" \
67+
-d '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x7309779122069EFa06ef71a45AE0DB55A259A176","data":"0xda5a5cf3"},"latest"],"id":1}' \
68+
| jq -r '.result' | xargs printf "%d\n" | awk '{print $1/1000000 " USDC"}'
69+
```
70+
71+
## Transactions via Bankr
72+
73+
QR Coin auctions require USDC transactions on Base. Use Bankr to execute these — Bankr handles:
74+
- Function signature parsing and parameter encoding
75+
- Gas estimation
76+
- Transaction signing and submission
77+
- Confirmation monitoring
78+
79+
### Step 1: Approve USDC (One-Time)
80+
81+
Before bidding, approve the auction contract to spend USDC:
82+
83+
```
84+
Approve 50 USDC to 0x7309779122069EFa06ef71a45AE0DB55A259A176 on Base
85+
```
86+
87+
### Step 2: Create a New Bid
88+
89+
To start a new bid for your URL:
90+
91+
**Function**: `createBid(uint256 tokenId, string url, string name)`
92+
**Contract**: `0x7309779122069EFa06ef71a45AE0DB55A259A176`
93+
**Cost**: ~11.11 USDC
94+
95+
> **Important**: Always query `currentTokenId()` first to get the active auction ID.
96+
97+
Example prompt for Bankr:
98+
```
99+
Send transaction to 0x7309779122069EFa06ef71a45AE0DB55A259A176 on Base
100+
calling createBid(329, "https://example.com", "MyName")
101+
```
102+
103+
### Step 3: Contribute to Existing Bid
104+
105+
To add funds to an existing URL's bid:
106+
107+
**Function**: `contributeToBid(uint256 tokenId, string url, string name)`
108+
**Contract**: `0x7309779122069EFa06ef71a45AE0DB55A259A176`
109+
**Cost**: ~1.00 USDC per contribution
110+
111+
Example prompt for Bankr:
112+
```
113+
Send transaction to 0x7309779122069EFa06ef71a45AE0DB55A259A176 on Base
114+
calling contributeToBid(329, "https://grokipedia.com/page/debtreliefbot", "MerkleMoltBot")
115+
```
116+
117+
## Function Selectors
118+
119+
| Function | Selector | Parameters |
120+
|----------|----------|------------|
121+
| `currentTokenId()` | `0x7d9f6db5` ||
122+
| `auctionEndTime(uint256)` | `0xa4d0a17e` | tokenId |
123+
| `createBidReserve()` | `0x5b3bec22` ||
124+
| `contributeReserve()` | `0xda5a5cf3` ||
125+
| `createBid(uint256,string,string)` | `0xf7842286` | tokenId, url, name |
126+
| `contributeToBid(uint256,string,string)` | `0x7ce28d02` | tokenId, url, name |
127+
| `approve(address,uint256)` | `0x095ea7b3` | spender, amount |
128+
129+
## Error Codes
130+
131+
| Error | Meaning | Solution |
132+
|-------|---------|----------|
133+
| `RESERVE_PRICE_NOT_MET` | Bid amount below minimum | Check reserve prices |
134+
| `URL_ALREADY_HAS_BID` | URL already has a bid | Use `contributeToBid` instead |
135+
| `BID_NOT_FOUND` | URL doesn't have existing bid | Use `createBid` instead |
136+
| `AUCTION_OVER` | Current auction has ended | Wait for next auction |
137+
| `AUCTION_NOT_STARTED` | Auction hasn't begun | Wait for auction to start |
138+
| `INSUFFICIENT_ALLOWANCE` | USDC not approved | Approve USDC first |
139+
140+
## Typical Workflow
141+
142+
1. **Query `currentTokenId()`** — Get the active auction ID
143+
2. **Check auction status** — Verify time remaining
144+
3. **Approve USDC** — One-time approval for the auction contract
145+
4. **Decide action**:
146+
- **New URL**: Use `createBid` (~11.11 USDC)
147+
- **Support existing URL**: Use `contributeToBid` (~1.00 USDC)
148+
5. **Monitor** — Watch for outbids and contribute more if needed
149+
6. **Claim** — Winners receive QR tokens; losers get refunds
150+
151+
## Links
152+
153+
- **Platform**: https://qrcoin.fun
154+
- **Auction Contract**: [BaseScan](https://basescan.org/address/0x7309779122069EFa06ef71a45AE0DB55A259A176)
155+
- **USDC on Base**: [BaseScan](https://basescan.org/token/0x833589fCD6eDb6E08f4c7c32D4f71b54bdA02913)
156+
157+
## Tips
158+
159+
- **Start small**: Contribute to existing bids (~1 USDC) to learn the flow
160+
- **Check timing**: Auctions have fixed end times; plan accordingly
161+
- **Monitor bids**: Others can outbid you; watch the auction
162+
- **Use Bankr**: Let Bankr handle transaction signing and execution
163+
- **Specify Base**: Always include "on Base" when using Bankr
164+
165+
---
166+
167+
**💡 Pro Tip**: Contributing to an existing bid is cheaper than creating a new one. Check if someone already bid for your URL before creating a new bid.

0 commit comments

Comments
 (0)