-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathIZoraAuctionHouse.sol
53 lines (50 loc) · 2.04 KB
/
IZoraAuctionHouse.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// SPDX-License-Identifier: Beta Software
pragma solidity ^0.8;
import "../../tokens/IERC721.sol";
import "../../tokens/IERC20.sol";
// Based on https://etherscan.io/address/0xe468ce99444174bd3bbbed09209577d25d1ad673#code
interface IZoraAuctionHouse {
struct Auction {
// ID for the ERC721 token
uint256 tokenId;
// Address for the ERC721 contract
IERC721 tokenContract;
// Whether or not the auction curator has approved the auction to start
bool approved;
// The current highest bid amount
uint256 amount;
// The length of time to run the auction for, after the first bid was made
uint256 duration;
// The time of the first bid
uint256 firstBidTime;
// The minimum price of the first bid
uint256 reservePrice;
// The sale percentage to send to the curator
uint8 curatorFeePercentage;
// The address that should receive the funds once the NFT is sold.
address tokenOwner;
// The address of the current highest bid
address payable bidder;
// The address of the auction's curator.
// The curator can reject or approve an auction
address payable curator;
// The address of the ERC-20 currency to run the auction with.
// If set to 0x0, the auction will be run in ETH
IERC20 auctionCurrency;
}
function createAuction(
uint256 tokenId,
IERC721 tokenContract,
uint256 duration,
uint256 reservePrice,
address payable curator,
uint8 curatorFeePercentages,
IERC20 auctionCurrency
) external returns (uint256);
function createBid(uint256 auctionId, uint256 amount) external payable;
function endAuction(uint256 auctionId) external;
function cancelAuction(uint256 auctionId) external;
function auctions(uint256 auctionId) external view returns(Auction memory auction);
function timeBuffer() external view returns (uint256);
function minBidIncrementPercentage() external view returns (uint8);
}