Skip to main content

Catalogue

Git Source

Inherits: ICatalogue

Contract that provides view functions for auctions

State Variables

auctionHouse

Address of the IAuctionHouse contract

address public auctionHouse;

_FEE_DECIMALS

Fees are in basis points (hundredths of a percent). 1% equals 100.

uint48 internal constant _FEE_DECIMALS = 100e2;

Functions

constructor

constructor(address auctionHouse_);

getRouting

Gets the routing information for a given lot ID

The function reverts if:

  • The lot ID is invalid
function getRouting(uint96 lotId_) public view returns (IAuctionHouse.Routing memory);

Parameters

NameTypeDescription
lotId_uint96ID of the auction lot

getFeeData

Gets the fee data for a given lot ID

The function reverts if:

  • The lot ID is invalid
function getFeeData(uint96 lotId_) public view returns (IAuctionHouse.FeeData memory);

Parameters

NameTypeDescription
lotId_uint96ID of the auction lot

isLive

Is the auction currently accepting bids or purchases?

Auctions that have been created, but not yet started will return false

function isLive(uint96 lotId_) public view returns (bool);

isUpcoming

Is the auction upcoming? (i.e. has not started yet)

function isUpcoming(uint96 lotId_) public view returns (bool);

hasEnded

Has the auction ended? (i.e. reached its conclusion and no more bids/purchases can be made)

function hasEnded(uint96 lotId_) external view returns (bool);

remainingCapacity

Capacity remaining for the auction. May be in quote or base tokens, depending on what is allowed for the auction type

function remainingCapacity(uint96 lotId_) external view returns (uint256);

getMaxLotId

ID of the last lot that was created

function getMaxLotId() public view returns (uint96);

_validateRange

function _validateRange(uint96 startId_, uint96 count_) internal view returns (uint256 count);

getAuctionsBySeller

Returns array of lot IDs for auctions created by a specific seller within the provided range.

function getAuctionsBySeller(
address seller_,
uint96 startId_,
uint96 count_
) external view returns (uint96[] memory);

Parameters

NameTypeDescription
seller_addressAddress of the seller
startId_uint96Lot ID to start from
count_uint96Number of lots to process in this batch

Returns

NameTypeDescription
<none>uint96[]lotIds Array of lot IDs

getAuctionsByRequestedCurator

Returns array of lot IDs for auctions that have requested a specific curator within the provided range. Lots are returned even if the curator has not approved the curation request.

function getAuctionsByRequestedCurator(
address curator_,
uint96 startId_,
uint96 count_
) external view returns (uint96[] memory);

Parameters

NameTypeDescription
curator_addressAddress of the curator
startId_uint96Lot ID to start from
count_uint96Number of lots to process in this batch

Returns

NameTypeDescription
<none>uint96[]lotIds Array of lot IDs

getAuctionsByCurator

Returns array of lot IDs for auctions that are curated by a specific curator within the provided range. Lots are returned only if the curator has approved the curation request.

function getAuctionsByCurator(
address curator_,
uint96 startId_,
uint96 count_
) external view returns (uint96[] memory);

Parameters

NameTypeDescription
curator_addressAddress of the curator
startId_uint96Lot ID to start from
count_uint96Number of lots to process in this batch

Returns

NameTypeDescription
<none>uint96[]lotIds Array of lot IDs

getAuctionsByQuoteToken

Returns array of lot IDs for auctions that have a specific quote token within the provided range.

function getAuctionsByQuoteToken(
address quoteToken_,
uint96 startId_,
uint96 count_
) external view returns (uint96[] memory);

Parameters

NameTypeDescription
quoteToken_addressAddress of the quote token
startId_uint96Lot ID to start from
count_uint96Number of lots to process in this batch

Returns

NameTypeDescription
<none>uint96[]lotIds Array of lot IDs

getAuctionsByBaseToken

Returns array of lot IDs for auctions that have a specific base token within the provided range.

function getAuctionsByBaseToken(
address baseToken_,
uint96 startId_,
uint96 count_
) external view returns (uint96[] memory);

Parameters

NameTypeDescription
baseToken_addressAddress of the base token
startId_uint96Lot ID to start from
count_uint96Number of lots to process in this batch

Returns

NameTypeDescription
<none>uint96[]lotIds Array of lot IDs

getAuctionsByModule

Returns array of lot IDs for auctions on a specific auction module within the provided range.

function getAuctionsByModule(
Veecode auctionReference_,
uint96 startId_,
uint96 count_
) external view returns (uint96[] memory);

Parameters

NameTypeDescription
auctionReference_VeecodeVersioned keycode for the auction module
startId_uint96Lot ID to start from
count_uint96Number of lots to process in this batch

Returns

NameTypeDescription
<none>uint96[]lotIds Array of lot IDs

getAuctionsByFormat

Returns array of lot IDs for auctions that have a specific type within the provided range.

function getAuctionsByFormat(
Keycode auctionFormat_,
uint96 startId_,
uint96 count_
) external view returns (uint96[] memory);

Parameters

NameTypeDescription
auctionFormat_KeycodeUn-versioned keycode for the auction format
startId_uint96Lot ID to start from
count_uint96Number of lots to process in this batch

Returns

NameTypeDescription
<none>uint96[]lotIds Array of lot IDs

getAuctionsByDerivative

Returns array of lot IDs for auctions that have a specific derivative within the provided range.

function getAuctionsByDerivative(
Veecode derivativeReference_,
uint96 startId_,
uint96 count_
) external view returns (uint96[] memory);

Parameters

NameTypeDescription
derivativeReference_VeecodeVersioned keycode for the derivative module
startId_uint96Lot ID to start from
count_uint96Number of lots to process in this batch

Returns

NameTypeDescription
<none>uint96[]lotIds Array of lot IDs

getLiveAuctions

Returns array of lot IDs for auctions that are currently live for bidding/purchasing within the provided range.

function getLiveAuctions(uint96 startId_, uint96 count_) external view returns (uint96[] memory);

Parameters

NameTypeDescription
startId_uint96Lot ID to start from
count_uint96Number of lots to process in this batch

Returns

NameTypeDescription
<none>uint96[]lotIds Array of lot IDs

getUpcomingAuctions

Returns array of lot IDs for auctions that have not started yet within the provided range.

function getUpcomingAuctions(
uint96 startId_,
uint96 count_
) external view returns (uint96[] memory);

Parameters

NameTypeDescription
startId_uint96Lot ID to start from
count_uint96Number of lots to process in this batch

Returns

NameTypeDescription
<none>uint96[]lotIds Array of lot IDs