-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #876 from nounsDAO/verbs-auction-sanction-check
Auction bidder sanction check
- Loading branch information
Showing
23 changed files
with
548 additions
and
615 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
packages/nouns-contracts/broadcast/DeployAuctionHouseV3Mainnet.s.sol/1/run-latest.json
Large diffs are not rendered by default.
Oops, something went wrong.
55 changes: 55 additions & 0 deletions
55
...ages/nouns-contracts/broadcast/DeployAuctionHouseV3Sepolia.s.sol/11155111/run-latest.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/nouns-contracts/contracts/external/chainalysis/IChainalysisSanctionsList.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
|
||
pragma solidity ^0.8.19; | ||
|
||
interface IChainalysisSanctionsList { | ||
function isSanctioned(address addr) external view returns (bool); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
158 changes: 158 additions & 0 deletions
158
packages/nouns-contracts/contracts/interfaces/INounsAuctionHouseV3.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
|
||
/// @title Interface for Noun Auction Houses V2 | ||
|
||
/********************************* | ||
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * | ||
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * | ||
* ░░░░░░█████████░░█████████░░░ * | ||
* ░░░░░░██░░░████░░██░░░████░░░ * | ||
* ░░██████░░░████████░░░████░░░ * | ||
* ░░██░░██░░░████░░██░░░████░░░ * | ||
* ░░██░░██░░░████░░██░░░████░░░ * | ||
* ░░░░░░█████████░░█████████░░░ * | ||
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * | ||
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * | ||
*********************************/ | ||
|
||
pragma solidity ^0.8.19; | ||
|
||
interface INounsAuctionHouseV3 { | ||
struct AuctionV2 { | ||
// ID for the Noun (ERC721 token ID) | ||
uint96 nounId; | ||
// ID of the client that facilitated the latest bid, used for client rewards | ||
uint32 clientId; | ||
// The current highest bid amount | ||
uint128 amount; | ||
// The time that the auction started | ||
uint40 startTime; | ||
// The time that the auction is scheduled to end | ||
uint40 endTime; | ||
// The address of the current highest bid | ||
address payable bidder; | ||
// Whether or not the auction has been settled | ||
bool settled; | ||
} | ||
|
||
/// @dev We use this struct as the return value of the `auction` function, to maintain backwards compatibility. | ||
struct AuctionV2View { | ||
// ID for the Noun (ERC721 token ID) | ||
uint96 nounId; | ||
// The current highest bid amount | ||
uint128 amount; | ||
// The time that the auction started | ||
uint40 startTime; | ||
// The time that the auction is scheduled to end | ||
uint40 endTime; | ||
// The address of the current highest bid | ||
address payable bidder; | ||
// Whether or not the auction has been settled | ||
bool settled; | ||
} | ||
|
||
struct SettlementState { | ||
// The block.timestamp when the auction was settled. | ||
uint32 blockTimestamp; | ||
// The winning bid amount, with 10 decimal places (reducing accuracy to save bits). | ||
uint64 amount; | ||
// The address of the auction winner. | ||
address winner; | ||
// ID of the client that facilitated the winning bid, used for client rewards. | ||
uint32 clientId; | ||
// Used only to warm up the storage slot for clientId without setting the clientId value. | ||
bool slotWarmedUp; | ||
} | ||
|
||
struct Settlement { | ||
// The block.timestamp when the auction was settled. | ||
uint32 blockTimestamp; | ||
// The winning bid amount, converted from 10 decimal places to 18, for better client UX. | ||
uint256 amount; | ||
// The address of the auction winner. | ||
address winner; | ||
// ID for the Noun (ERC721 token ID). | ||
uint256 nounId; | ||
// ID of the client that facilitated the winning bid, used for client rewards | ||
uint32 clientId; | ||
} | ||
|
||
/// @dev Using this struct when setting historic prices, and excluding clientId to save gas. | ||
struct SettlementNoClientId { | ||
// The block.timestamp when the auction was settled. | ||
uint32 blockTimestamp; | ||
// The winning bid amount, converted from 10 decimal places to 18, for better client UX. | ||
uint256 amount; | ||
// The address of the auction winner. | ||
address winner; | ||
// ID for the Noun (ERC721 token ID). | ||
uint256 nounId; | ||
} | ||
|
||
event AuctionCreated(uint256 indexed nounId, uint256 startTime, uint256 endTime); | ||
|
||
event AuctionBid(uint256 indexed nounId, address sender, uint256 value, bool extended); | ||
|
||
event AuctionBidWithClientId(uint256 indexed nounId, uint256 value, uint32 indexed clientId); | ||
|
||
event AuctionExtended(uint256 indexed nounId, uint256 endTime); | ||
|
||
event AuctionSettled(uint256 indexed nounId, address winner, uint256 amount); | ||
|
||
event AuctionSettledWithClientId(uint256 indexed nounId, uint32 indexed clientId); | ||
|
||
event AuctionTimeBufferUpdated(uint256 timeBuffer); | ||
|
||
event AuctionReservePriceUpdated(uint256 reservePrice); | ||
|
||
event AuctionMinBidIncrementPercentageUpdated(uint256 minBidIncrementPercentage); | ||
|
||
event SanctionsOracleSet(address newSanctionsOracle); | ||
|
||
function settleAuction() external; | ||
|
||
function settleCurrentAndCreateNewAuction() external; | ||
|
||
function createBid(uint256 nounId) external payable; | ||
|
||
function createBid(uint256 nounId, uint32 clientId) external payable; | ||
|
||
function pause() external; | ||
|
||
function unpause() external; | ||
|
||
function setTimeBuffer(uint56 timeBuffer) external; | ||
|
||
function setReservePrice(uint192 reservePrice) external; | ||
|
||
function setMinBidIncrementPercentage(uint8 minBidIncrementPercentage) external; | ||
|
||
function setSanctionsOracle(address newSanctionsOracle) external; | ||
|
||
function auction() external view returns (AuctionV2View memory); | ||
|
||
function getSettlements( | ||
uint256 auctionCount, | ||
bool skipEmptyValues | ||
) external view returns (Settlement[] memory settlements); | ||
|
||
function getPrices(uint256 auctionCount) external view returns (uint256[] memory prices); | ||
|
||
function getSettlements( | ||
uint256 startId, | ||
uint256 endId, | ||
bool skipEmptyValues | ||
) external view returns (Settlement[] memory settlements); | ||
|
||
function getSettlementsFromIdtoTimestamp( | ||
uint256 startId, | ||
uint256 endTimestamp, | ||
bool skipEmptyValues | ||
) external view returns (Settlement[] memory settlements); | ||
|
||
function warmUpSettlementState(uint256 startId, uint256 endId) external; | ||
|
||
function duration() external view returns (uint256); | ||
|
||
function biddingClient(uint256 nounId) external view returns (uint32 clientId); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
packages/nouns-contracts/script/AuctionHouseV2/DeployAuctionHouseV2Base.s.sol
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
packages/nouns-contracts/script/AuctionHouseV2/DeployAuctionHouseV2Mainnet.s.sol
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
packages/nouns-contracts/script/AuctionHouseV2/DeployAuctionHouseV2Sepolia.s.sol
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.