Summary Interfaces¶
Auctioneer Interface¶
Inherits: ERC6909, Ownable2Step
Implements an auction mechanism for selling block space.
Structs¶
Auction¶
struct Auction {
uint120 itemsForSale;
bool isOpen;
bool isSettled;
bool isPaidOut;
bool isRefunded;
mapping(address => BidderInfo) biddersInfo;
}
BidderInfo¶
State Variables¶
maxBidder¶
WETH9¶
accountant¶
maxBids¶
minGasAmount¶
operator¶
IdMap¶
bidderMap¶
auctions¶
slotsCount¶
slotsAuctioned¶
bidCount¶
Functions¶
bid¶
Bid function for bidders to submit manual bids.
Parameters
Name | Type | Description |
---|---|---|
slot |
uint256 |
The auction slot. |
packedBids |
uint256[] |
Array of packed bids |
getBidderInfo¶
Retrieve information about a bidder after auction settlement.
function getBidderInfo(uint256 slot, address bidder) external view returns (uint120 itemsBought, uint128 amountOwed);
Parameters
Name | Type | Description |
---|---|---|
slot |
uint256 |
The slot identifier of the auction. |
bidder |
address |
The address of the bidder for whom information is requested. |
Returns
Name | Type | Description |
---|---|---|
itemsBought |
uint120 |
The number of items bought by the bidder in the specified auction. |
amountOwed |
uint128 |
The amount owed by the bidder for the items bought in the specified auction. Requirements: - The auction must have been settled. - The provided bidder address must be valid and have participated in the auction. |
packBid¶
Packed Bid details into a uint256 for submission.
function packBid(uint128 bidPrice, uint120 itemsToBuy, uint8 bidderId) external pure returns (uint256 packedBid);
Parameters
Name | Type | Description |
---|---|---|
bidPrice |
uint128 |
Price per item. |
itemsToBuy |
uint120 |
Items to buy in the auction. |
bidderId |
uint8 |
Id for bidder |
Returns
Name | Type | Description |
---|---|---|
packedBid |
uint256 |
for auction submission |
calcAverageBid¶
Calculate average bid price for the last n auctions
Parameters
Name | Type | Description |
---|---|---|
numAuctions |
uint256 |
Number of auctions to average for |
Returns
Name | Type | Description |
---|---|---|
avBidPrice |
uint128 |
for last n auctions |
Events¶
AuctionSettled¶
BidderAdded¶
BidderRemoved¶
AuctionOpened¶
AuctionPaidOut¶
AuctionRefund¶
Errors¶
InvalidId¶
Unauthorized¶
InvalidBidItems¶
InsufficientFunds¶
AuctionNotOpen¶
AuctionNotClosed¶
AuctionAlreadyOpen¶
AuctionAlreadySettled¶
BidderNotRegistered¶
BidderAlreadyExists¶
SettlementHouse Interface¶
A contract for managing bundles of transactions for a futures token.
Structs¶
Bundle¶
State Variables¶
futuresToken¶
Functions¶
submitBundle¶
Bidder Interface¶
Functions¶
getBid¶
Get the bid from a bidder for a specific slot and round.
Parameters
Name | Type | Description |
---|---|---|
slot |
uint256 |
The auction slot. |
Returns
Name | Type | Description |
---|---|---|
packedBids |
uint256[] |
Array of bids (in a packed format). uint256(uint128(bidPrice),uint120(itemsToBuy),uint8(bidderId)) |