Skip to main content

IFixedPriceSale

Git Source

Interface for fixed price sale (atomic) auctions

This contract does not inherit from IAtomicAuction or AtomicAuctionModule in order to avoid conflicts. Implementing contracts should inherit from both AtomicAuctionModule and this interface.

Functions

auctionData

Returns the AuctionData for a lot

function auctionData(uint96 lotId) external view returns (uint256 price, uint256 maxPayout);

Parameters

NameTypeDescription
lotIduint96The lot ID

Returns

NameTypeDescription
priceuint256The fixed price of the lot
maxPayoutuint256The maximum payout per purchase, in terms of the base token

Errors

Auction_InsufficientPayout

error Auction_InsufficientPayout();

Auction_PayoutGreaterThanMax

error Auction_PayoutGreaterThanMax();

Structs

AuctionDataParams

Parameters for a fixed price auction

struct AuctionDataParams {
uint256 price;
uint24 maxPayoutPercent;
}

Properties

NameTypeDescription
priceuint256The fixed price of the lot
maxPayoutPercentuint24The maximum payout per purchase, as a percentage of the capacity (100% = 100e2 = 1e4)

PurchaseParams

Parameters to the purchase function

struct PurchaseParams {
uint256 minAmountOut;
}

Properties

NameTypeDescription
minAmountOutuint256The minimum amount of the base token that must be received

AuctionData

Auction-specific data for a lot

struct AuctionData {
uint256 price;
uint256 maxPayout;
}

Properties

NameTypeDescription
priceuint256The fixed price of the lot
maxPayoutuint256The maximum payout per purchase, in terms of the base token