IAtomicAuctionHouse
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
| Name | Type | Description | 
|---|---|---|
| params_ | PurchaseParams | Purchase parameters | 
| callbackData_ | bytes | Custom data provided to the onPurchase callback | 
Returns
| Name | Type | Description | 
|---|---|---|
| payout | uint256 | Amount 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
| Name | Type | Description | 
|---|---|---|
| params_ | PurchaseParams[] | Array of purchase parameters | 
| callbackData_ | bytes[] | Array of custom data provided to the onPurchase callbacks | 
Returns
| Name | Type | Description | 
|---|---|---|
| payouts | uint256[] | 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
| Name | Type | Description | 
|---|---|---|
| recipient | address | Address to receive payout (if not zero address) | 
| referrer | address | Address of referrer | 
| lotId | uint96 | Lot ID | 
| amount | uint256 | Amount of quoteToken to purchase with (in native decimals) | 
| minAmountOut | uint256 | Minimum amount of baseToken to receive | 
| auctionData | bytes | Custom data used by the auction module | 
| permit2Data | bytes |