Skip to main content

IAtomicAuctionHouse

Git Source

Inherits: IAuctionHouse

An interface to define the AtomicAuctionHouse's buyer-facing functions

Functions

purchase

Purchase a lot from an atomic auction

Permit2 is utilised to simplify token transfers

function purchase(
PurchaseParams memory params_,
bytes calldata callbackData_
) external returns (uint256 payout);

Parameters

NameTypeDescription
params_PurchaseParamsPurchase parameters
callbackData_bytesCustom data provided to the onPurchase callback

Returns

NameTypeDescription
payoutuint256Amount of baseToken received by recipient_ (in native decimals)

multiPurchase

Purchase from multiple lots in a single transaction

Permit2 is utilised to simplify token transfers

function multiPurchase(
PurchaseParams[] memory params_,
bytes[] calldata callbackData_
) external returns (uint256[] memory payouts);

Parameters

NameTypeDescription
params_PurchaseParams[]Array of purchase parameters
callbackData_bytes[]Array of custom data provided to the onPurchase callbacks

Returns

NameTypeDescription
payoutsuint256[]Array of amounts of baseTokens received by recipient_ (in native decimals)

Structs

PurchaseParams

Parameters used by the purchase function

This reduces the number of variables in scope for the purchase function

struct PurchaseParams {
address recipient;
address referrer;
uint96 lotId;
uint256 amount;
uint256 minAmountOut;
bytes auctionData;
bytes permit2Data;
}

Properties

NameTypeDescription
recipientaddressAddress to receive payout (if not zero address)
referreraddressAddress of referrer
lotIduint96Lot ID
amountuint256Amount of quoteToken to purchase with (in native decimals)
minAmountOutuint256Minimum amount of baseToken to receive
auctionDatabytesCustom data used by the auction module
permit2Databytes