Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Commit 15d305f

Browse files
authored
Merge pull request #202 from ourzora/update_reserve_auction
feat: add reserve auction to ZN
2 parents 7368105 + 47ffeff commit 15d305f

File tree

5 files changed

+689
-0
lines changed

5 files changed

+689
-0
lines changed

addresses/7777777.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"WETH": "0x4200000000000000000000000000000000000006",
3+
"REGISTRAR": "0x12125c8a52B8E4ed1A28e1f964023b4477f11300",
4+
"RoyaltyEngineV1": "0x0000000000000000000000000000000000000000",
5+
"ZoraProtocolFeeSettings": "0x13D48CF16917Bbc91810153d4D4e3284609C3CDc",
6+
"ZoraModuleManager": "0x69E2a5D39ed608Dfb75e29d7a4aa361C889FD25f",
7+
"ERC20TransferHelper": "0x0f92db11b60E7D9d80843588eefDDA17644a9aaa",
8+
"ERC721TransferHelper": "0x89a53404d3e29c6e5431d73e04F44045d37D01FE",
9+
"ReserveAuctionV3": "0xA06262157905913f855573f53AD48DE2D4ba1F4A"
10+
}

addresses/999999999.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"WETH": "0x4200000000000000000000000000000000000006",
3+
"REGISTRAR": "0x12125c8a52B8E4ed1A28e1f964023b4477f11300",
4+
"RoyaltyEngineV1": "0x0000000000000000000000000000000000000000",
5+
"ZoraProtocolFeeSettings": "0x824dD1cCd0824A15913B454A7E5D3Bf0C6b2BeEd",
6+
"ZoraModuleManager": "0x2E0c148C1AeD0360Df9a86112fD7C4EAb8045779",
7+
"ERC20TransferHelper": "0x421B6ad0CdD20bE3636F3511B6ae244d8F668dB1",
8+
"ERC721TransferHelper": "0x0ABdD5AA61E9107519DB7cD626442B905284B7eb",
9+
"ReserveAuctionV3": "0x0fbAB7302F9351dD1DB6674cc3bB855f0C55840B"
10+
}

contracts/common/FeePayoutSupport/FeePayoutSupportV1.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ contract FeePayoutSupportV1 is OutgoingTransferSupportV1 {
9090
address _payoutCurrency,
9191
uint256 _gasLimit
9292
) internal returns (uint256, bool) {
93+
// Early return if no royalty engine.
94+
if (address(royaltyEngine) == address(0)) return (_amount, false);
95+
9396
// If no gas limit was provided or provided gas limit greater than gas left, just pass the remaining gas.
9497
uint256 gas = (_gasLimit == 0 || _gasLimit > gasleft()) ? gasleft() : _gasLimit;
9598

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity 0.8.10;
3+
4+
interface IReserveAuctionV3 {
5+
/// @notice Creates an auction for a given NFT
6+
/// @param _tokenContract The address of the ERC-721 token
7+
/// @param _tokenId The id of the ERC-721 token
8+
/// @param _duration The length of time the auction should run after the first bid
9+
/// @param _reservePrice The minimum bid amount to start the auction
10+
/// @param _sellerFundsRecipient The address to send funds to once the auction is complete
11+
/// @param _startTime The time that users can begin placing bids
12+
/// @param _bidCurrency The address of the ERC-20 token, or address(0) for ETH, that users must bid with
13+
/// @param _findersFeeBps The fee to send to the referrer of the winning bid
14+
function createAuction(
15+
address _tokenContract,
16+
uint256 _tokenId,
17+
uint256 _duration,
18+
uint256 _reservePrice,
19+
address _sellerFundsRecipient,
20+
uint256 _startTime,
21+
address _bidCurrency,
22+
uint256 _findersFeeBps
23+
) external;
24+
25+
/// @notice Updates the reserve price for a given auction
26+
/// @param _tokenContract The address of the ERC-721 token
27+
/// @param _tokenId The id of the ERC-721 token
28+
/// @param _reservePrice The new reserve price
29+
function setAuctionReservePrice(address _tokenContract, uint256 _tokenId, uint256 _reservePrice) external;
30+
31+
/// @notice Cancels the auction for a given NFT
32+
/// @param _tokenContract The address of the ERC-721 token
33+
/// @param _tokenId The id of the ERC-721 token
34+
function cancelAuction(address _tokenContract, uint256 _tokenId) external;
35+
36+
/// @notice Places a bid on the auction for a given NFT
37+
/// @param _tokenContract The address of the ERC-721 token
38+
/// @param _tokenId The id of the ERC-721 token
39+
/// @param _amount The amount to bid
40+
/// @param _finder The referrer of the bid
41+
function createBid(address _tokenContract, uint256 _tokenId, uint256 _amount, address _finder) external payable;
42+
43+
/// @notice Ends the auction for a given NFT
44+
/// @param _tokenContract The address of the ERC-721 token
45+
/// @param _tokenId The id of the ERC-721 token
46+
function settleAuction(address _tokenContract, uint256 _tokenId) external;
47+
}

0 commit comments

Comments
 (0)