Skip to main content

IFixedPriceBatch

Git Source

Inherits: IBatchAuction

Interface for fixed price batch auctions

Functions

getBid

Returns the Bid and EncryptedBid data for a given lot and bid ID

function getBid(uint96 lotId_, uint64 bidId_) external view returns (Bid memory bid);

Parameters

NameTypeDescription
lotId_uint96The lot ID
bidId_uint64The bid ID

Returns

NameTypeDescription
bidBidThe Bid data

getAuctionData

Returns the AuctionData data for an auction lot

function getAuctionData(uint96 lotId_) external view returns (AuctionData memory auctionData_);

Parameters

NameTypeDescription
lotId_uint96The lot ID

Returns

NameTypeDescription
auctionData_AuctionDataThe AuctionData

getPartialFill

Returns the PartialFill data for an auction lot

function getPartialFill(
uint96 lotId_
) external view returns (bool hasPartialFill, PartialFill memory partialFill);

Parameters

NameTypeDescription
lotId_uint96The lot ID

Returns

NameTypeDescription
hasPartialFillboolTrue if a partial fill exists
partialFillPartialFillThe PartialFill data

Errors

Auction_WrongState

error Auction_WrongState(uint96 lotId);

Bid_WrongState

error Bid_WrongState(uint96 lotId, uint64 bidId);

NotPermitted

error NotPermitted(address caller);

Structs

AuctionDataParams

Parameters for a fixed price auction

struct AuctionDataParams {
uint256 price;
uint24 minFillPercent;
}

Properties

NameTypeDescription
priceuint256The fixed price of the lot
minFillPercentuint24The minimum percentage of the lot that must be filled in order to settle (100% = 100e2 = 1e4)

AuctionData

Core data for an auction lot

struct AuctionData {
uint256 price;
LotStatus status;
uint64 nextBidId;
bool settlementCleared;
uint256 totalBidAmount;
uint256 minFilled;
}

Properties

NameTypeDescription
priceuint256The price of the lot
statusLotStatusThe status of the lot
nextBidIduint64The ID of the next bid
settlementClearedboolTrue if the settlement has been cleared
totalBidAmountuint256The total amount of all bids
minFilleduint256The minimum amount of the lot that must be filled in order to settle

Bid

Core data for a bid

struct Bid {
address bidder;
uint96 amount;
address referrer;
BidStatus status;
}

Properties

NameTypeDescription
bidderaddressThe address of the bidder
amountuint96The amount of the bid
referreraddressThe address of the referrer
statusBidStatusThe status of the bid

PartialFill

Struct containing partial fill data for a lot

struct PartialFill {
uint64 bidId;
uint96 refund;
uint256 payout;
}

Properties

NameTypeDescription
bidIduint64The ID of the bid
refunduint96The amount to refund to the bidder
payoutuint256The amount to payout to the bidder

Enums

LotStatus

The status of an auction lot

enum LotStatus {
Created,
Settled
}

BidStatus

The status of a bid

Bid status will also be set to claimed if the bid is cancelled/refunded

enum BidStatus {
Submitted,
Claimed
}