-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathZoraHelpers.sol
42 lines (38 loc) · 1.2 KB
/
ZoraHelpers.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
// SPDX-License-Identifier: Beta Software
pragma solidity ^0.8;
import "../tokens/IERC721.sol";
// Abstract Zora interaction functions.
// Used by both `ListOnZoraProposal` and `ListOnOpenseaProposal`.
abstract contract ZoraHelpers {
// ABI-encoded `progressData` passed into execute in the `ListedOnZora` step.
struct ZoraProgressData {
// Auction ID.
uint256 auctionId;
// The minimum timestamp when we can cancel the auction if no one bids.
uint40 minExpiry;
}
// Transfer and create a Zora auction for the token + tokenId.
function _createZoraAuction(
// The minimum bid.
uint256 listPrice,
// How long the auction must wait for the first bid.
uint40 timeout,
// How long the auction will run for once a bid has been placed.
uint40 duration,
IERC721 token,
uint256 tokenId
)
internal
virtual
returns (uint256 auctionId);
// Either cancel or finalize a Zora auction.
function _settleZoraAuction(
uint256 auctionId,
uint40 minExpiry,
IERC721 token,
uint256 tokenId
)
internal
virtual
returns (bool sold);
}