ETSAuctionHouse
Overview
License: GPL-3.0
contract ETSAuctionHouse is Initializable, PausableUpgradeable, ReentrancyGuardUpgradeable, IETSAuctionHouse, UUPSUpgradeableAuthor: Ethereum Tag Service team@ets.xyz
ETSAuctionHouse contract governs the sale of Ethereum Tag Service composable tags (CTAGs).
Constants info
NAME (0xa3f4df7e)
string constant NAME = "ETS Auction House"Public constants
MODULO (0xa8586f7b)
uint256 constant MODULO = 100State variables info
etsToken (0x46ca0f4d)
contract IETSToken etsTokenetsAccessControls (0x8299f9f9)
contract IETSAccessControls etsAccessControlsmaxAuctions (0x69a6e9c6)
uint256 maxAuctionsPublic variables
auctions (0x571a26a0)
mapping(uint256 => struct IETSAuctionHouse.Auction) auctionsMapping of auction ID to auction.
auctionsByTokenId (0x69f37887)
mapping(uint256 => uint256[]) auctionsByTokenIdMapping of tokenId to array of auction ids.
wmatic (0xfb41be16)
address wmaticThe address of the WMATIC contract
timeBuffer (0xec91f2a4)
uint256 timeBufferThe minimum amount of time left in an auction after a new bid is created
reservePrice (0xdb2e1eed)
uint256 reservePriceThe minimum price accepted in an auction
minBidIncrementPercentage (0xb296024d)
uint8 minBidIncrementPercentageThe minimum percentage difference between the last bid amount and the current bid
duration (0x0fb5a6b4)
uint256 durationThe duration of a single auction
creatorPercentage (0xf071bf4f)
uint256 creatorPercentagePercentage of auction proceeds allocated to CTAG Creator
relayerPercentage (0x2a1e1ee1)
uint256 relayerPercentagePercentage of auction proceeds allocated to CTAG Relayer.
platformPercentage (0x1f741897)
uint256 platformPercentagePercentage of auction proceeds allocated to ETS.
accrued (0xb148440f)
mapping(address => uint256) accruedMap for holding amount accrued to participant address wallets.
paid (0xa340cf79)
mapping(address => uint256) paidMap for holding lifetime amount drawn down from accrued by participants.
Modifiers info
tagExists
modifier tagExists(uint256 tokenId)Modifiers
platformOwned
modifier platformOwned(uint256 tokenId)onlyAuctionOracle
modifier onlyAuctionOracle()onlyAdmin
modifier onlyAdmin()onlyPlatform
modifier onlyPlatform()Functions info
constructor
constructor()oz-upgrades-unsafe-allow: constructor
initialize (0x0acc9e09)
function initialize(
IETSToken _etsToken,
IETSAccessControls _etsAccessControls,
address _wmatic,
uint256 _maxAuctions,
uint256 _timeBuffer,
uint256 _reservePrice,
uint8 _minBidIncrementPercentage,
uint256 _duration,
uint256 _relayerPercentage,
uint256 _platformPercentage
) external initializerpause (0x8456cb59)
function pause() public onlyAdminunpause (0x3f4ba83a)
function unpause() public onlyAdminsetMaxAuctions (0x3b6e0ef5)
function setMaxAuctions(uint256 _maxAuctions) public onlyAdminsetDuration (0xf6be71d1)
function setDuration(uint256 _duration) public onlyAdminsetMinBidIncrementPercentage (0x36ebdb38)
function setMinBidIncrementPercentage(
uint8 _minBidIncrementPercentage
) public onlyAdminsetReservePrice (0xce9c7c0d)
function setReservePrice(uint256 _reservePrice) public onlyAdminsetTimeBuffer (0x7120334b)
function setTimeBuffer(uint256 _timeBuffer) public onlyAdminsetProceedPercentages (0xb68bb0ba)
function setProceedPercentages(
uint256 _platformPercentage,
uint256 _relayerPercentage
) public onlyAdminsettleCurrentAndCreateNewAuction (0x666077c9)
function settleCurrentAndCreateNewAuction(
uint256 _auctionId
) public nonReentrant whenNotPausedSettle auction, and release next auction.
settleAuction (0x2e993611)
function settleAuction(uint256 _auctionId) public whenPaused nonReentrantSettle the auction.
This function can only be called when the contract is paused.
createNextAuction (0x01810a96)
function createNextAuction() public whenNotPausedfulfillRequestCreateAuction (0x279a0147)
function fulfillRequestCreateAuction(uint256 _tokenId) public onlyAuctionOraclecreateBid (0x659dd2b4)
function createBid(
uint256 _auctionId
) public payable nonReentrant whenNotPauseddrawDown (0xc2062005)
function drawDown(address payable _account) external nonReentrantFunction for withdrawing funds from an accrual account. Can be called by the account owner or on behalf of the account. Does nothing when there is nothing due to the account.
Parameters:
| Name | Type | Description |
|---|---|---|
| _account | address payable | Address of account being drawn down and which will receive the funds. |
auctionExists (0x3c0868f0)
function auctionExists(uint256 _auctionId) public view returns (bool)auctionExistsForTokenId (0x3799cd57)
function auctionExistsForTokenId(uint256 _tokenId) public view returns (bool)auctionEnded (0x9e712387)
function auctionEnded(uint256 _auctionId) public view returns (bool)auctionSettled (0x28b9e726)
function auctionSettled(uint256 _auctionId) public view returns (bool)getAuction (0x78bd7935)
function getAuction(
uint256 _auctionId
) public view returns (IETSAuctionHouse.Auction memory)getAuctionForTokenId (0xb53fb508)
function getAuctionForTokenId(
uint256 _tokenId
) public view returns (IETSAuctionHouse.Auction memory)getAuctionCountForTokenId (0xd178687a)
function getAuctionCountForTokenId(
uint256 _tokenId
) public view returns (uint256)getActiveCount (0x63338b17)
function getActiveCount() public view returns (uint256)getTotalCount (0x56d42bb3)
function getTotalCount() public view returns (uint256)getBalance (0x12065fe0)
function getBalance() public view returns (uint256)totalDue (0x0ad2f0c3)
function totalDue(address _account) public view returns (uint256 _due)receive
receive() external payablefallback
fallback() external payable