IAuctionHouse
Interface for the Axis AuctionHouse contracts
Functions
auction
Creates a new auction lot
function auction(
RoutingParams calldata routing_,
IAuction.AuctionParams calldata params_,
string calldata infoHash_
) external returns (uint96 lotId);
Parameters
Name | Type | Description |
---|---|---|
routing_ | RoutingParams | Routing information for the auction lot |
params_ | IAuction.AuctionParams | Auction parameters for the auction lot |
infoHash_ | string | IPFS hash of the auction information |
Returns
Name | Type | Description |
---|---|---|
lotId | uint96 | ID of the auction lot |
cancel
Cancels an auction lot
function cancel(uint96 lotId_, bytes calldata callbackData_) external;
Parameters
Name | Type | Description |
---|---|---|
lotId_ | uint96 | ID of the auction lot |
callbackData_ | bytes | (optional) abi-encoded data to be sent to the onCancel callback function |
curate
Accept curation request for a lot.
If the curator wishes to charge a fee, it must be set before this function is called.
Access controlled. Must be proposed curator for lot.
function curate(uint96 lotId_, bytes calldata callbackData_) external;
Parameters
Name | Type | Description |
---|---|---|
lotId_ | uint96 | Lot ID |
callbackData_ | bytes | (optional) abi-encoded data to be sent to the onCurate callback function |
lotCounter
The counter tracks the total number of auction lots
function lotCounter() external view returns (uint96 lotCount);
lotRouting
Mapping of lot IDs to their routing information
See the Routing
struct for more information
function lotRouting(
uint96 lotId
)
external
view
returns (
address seller,
address baseToken,
address quoteToken,
Veecode auctionReference,
uint256 funding,
ICallback callbacks,
Veecode derivativeReference,
bool wrapDerivative,
bytes memory derivativeParams
);
Parameters
Name | Type | Description |
---|---|---|
lotId | uint96 | ID of the auction lot |
lotFees
Mapping of lot IDs to their fee information
See the FeeData
struct for more information
function lotFees(
uint96 lotId
)
external
view
returns (
address curator,
bool curated,
uint48 curatorFee,
uint48 protocolFee,
uint48 referrerFee
);
Parameters
Name | Type | Description |
---|---|---|
lotId | uint96 | ID of the auction lot |
condensers
Mapping auction and derivative references to the condenser that is used to pass data between them
function condensers(
Veecode auctionRef,
Veecode derivativeRef
) external view returns (Veecode condenserRef);
Parameters
Name | Type | Description |
---|---|---|
auctionRef | Veecode | Versioned keycode for the auction module |
derivativeRef | Veecode | Versioned keycode for the derivative module |
Returns
Name | Type | Description |
---|---|---|
condenserRef | Veecode | Versioned keycode for the condenser module |
getAuctionModuleForId
Gets the auction module for a given lot ID
function getAuctionModuleForId(uint96 lotId_) external view returns (IAuction module);
Parameters
Name | Type | Description |
---|---|---|
lotId_ | uint96 | ID of the auction lot |
Returns
Name | Type | Description |
---|---|---|
module | IAuction | The auction module |
getDerivativeModuleForId
Gets the derivative module for a given lot ID
Will revert if the lot does not have a derivative module
function getDerivativeModuleForId(uint96 lotId_) external view returns (IDerivative module);
Parameters
Name | Type | Description |
---|---|---|
lotId_ | uint96 | ID of the auction lot |
Returns
Name | Type | Description |
---|---|---|
module | IDerivative | The derivative module |
Events
AuctionCreated
Emitted when a new auction lot is created
event AuctionCreated(uint96 indexed lotId, Veecode indexed auctionRef, string infoHash);
Parameters
Name | Type | Description |
---|---|---|
lotId | uint96 | ID of the auction lot |
auctionRef | Veecode | Auction module, represented by its Veecode |
infoHash | string | IPFS hash of the auction information |
AuctionCancelled
Emitted when an auction lot is cancelled
event AuctionCancelled(uint96 indexed lotId, Veecode indexed auctionRef);
Parameters
Name | Type | Description |
---|---|---|
lotId | uint96 | ID of the auction lot |
auctionRef | Veecode | Auction module, represented by its Veecode |
Curated
Emitted when a curator accepts curation of an auction lot
event Curated(uint96 indexed lotId, address indexed curator);
Parameters
Name | Type | Description |
---|---|---|
lotId | uint96 | ID of the auction lot |
curator | address | Address of the curator |
Errors
InvalidParams
error InvalidParams();
InvalidLotId
error InvalidLotId(uint96 id_);
InvalidState
error InvalidState();
InvalidCallback
error InvalidCallback();
NotPermitted
Used when the caller is not permitted to perform that action
error NotPermitted(address caller_);
Structs
RoutingParams
Auction routing information provided as input parameters
struct RoutingParams {
Keycode auctionType;
address baseToken;
address quoteToken;
address curator;
uint48 referrerFee;
ICallback callbacks;
bytes callbackData;
Keycode derivativeType;
bytes derivativeParams;
bool wrapDerivative;
}
Properties
Name | Type | Description |
---|---|---|
auctionType | Keycode | Auction type, represented by the Keycode for the auction submodule |
baseToken | address | Token provided by seller. Declared as an address to avoid dependency hell. |
quoteToken | address | Token to accept as payment. Declared as an address to avoid dependency hell. |
curator | address | (optional) Address of the proposed curator |
referrerFee | uint48 | (optional) Percent of bid/purchase amount received paid to a referrer in basis points, i.e. 1% = 100. |
callbacks | ICallback | (optional) Callbacks implementation for extended functionality |
callbackData | bytes | (optional) abi-encoded data to be sent to the onCreate callback function |
derivativeType | Keycode | (optional) Derivative type, represented by the Keycode for the derivative submodule |
derivativeParams | bytes | (optional) abi-encoded data to be used to create payout derivatives on a purchase. The format of this is dependent on the derivative module. |
wrapDerivative | bool | (optional) Whether to wrap the derivative in a ERC20 token instead of the native ERC6909 format |
Routing
Auction routing information for a lot
struct Routing {
address seller;
address baseToken;
address quoteToken;
Veecode auctionReference;
uint256 funding;
ICallback callbacks;
Veecode derivativeReference;
bool wrapDerivative;
bytes derivativeParams;
}
Properties
Name | Type | Description |
---|---|---|
seller | address | Lot seller |
baseToken | address | ERC20 token provided by seller |
quoteToken | address | ERC20 token to accept as payment |
auctionReference | Veecode | Auction module, represented by its Veecode |
funding | uint256 | The amount of base tokens in funding remaining |
callbacks | ICallback | (optional) Callbacks implementation for extended functionality |
derivativeReference | Veecode | (optional) Derivative module, represented by its Veecode |
wrapDerivative | bool | (optional) Whether to wrap the derivative in a ERC20 token instead of the native ERC6909 format |
derivativeParams | bytes | (optional) abi-encoded data to be used to create payout derivatives on a purchase |
FeeData
Fee information for a lot
This is split into a separate struct, otherwise the Routing struct would be too large and would throw a "stack too deep" error.
Fee information is set at the time of auction creation, in order to prevent subsequent inflation.
The fees are cached in order to prevent:
- Reducing the amount of base tokens available for payout to the winning bidders
- Reducing the amount of quote tokens available for payment to the seller
struct FeeData {
address curator;
bool curated;
uint48 curatorFee;
uint48 protocolFee;
uint48 referrerFee;
}
Properties
Name | Type | Description |
---|---|---|
curator | address | Address of the proposed curator |
curated | bool | Whether the curator has approved the auction |
curatorFee | uint48 | The fee charged by the curator |
protocolFee | uint48 | The fee charged by the protocol |
referrerFee | uint48 | The fee charged by the referrer |