{ "contract": "auction", "version": "1.0.0", "description": "English auction with on-chain token escrow. Bids are locked in the contract treasury. When an auction settles, the seller receives the top bid; outbid funds are automatically refunded.", "methods": [ { "name": "create", "description": "Create a new auction. Logs 'created: '. auction_id = block_height:seq (seq auto-incremented).", "args": [ {"name": "title", "type": "string", "description": "Human-readable item title (max 128 chars)"}, {"name": "min_bid", "type": "uint64", "description": "Minimum opening bid in µT"}, {"name": "duration", "type": "uint64", "description": "Duration in blocks"} ] }, { "name": "bid", "description": "Place a bid on an open auction. Caller transfers bid amount to the contract treasury; previous top bidder is refunded. Logs 'bid: '.", "args": [ {"name": "auction_id", "type": "string", "description": "Auction ID returned by create"}, {"name": "amount", "type": "uint64", "description": "Bid amount in µT (must exceed current top bid)"} ] }, { "name": "settle", "description": "Settle an ended auction. Transfers winning bid to seller. Anyone may call after the end block. Logs 'settled: '.", "args": [ {"name": "auction_id", "type": "string", "description": "Auction ID to settle"} ] }, { "name": "cancel", "description": "Cancel an auction before any bids. Only the seller may cancel. Logs 'cancelled: '.", "args": [ {"name": "auction_id", "type": "string", "description": "Auction ID to cancel"} ] }, { "name": "info", "description": "Query auction info. Logs 'seller: ...', 'title: ...', 'top_bid: ...', 'end_block: ...', 'status: open/settled/cancelled'.", "args": [ {"name": "auction_id", "type": "string", "description": "Auction ID"} ] } ] }