Overview
ETH Balance
0 ETH
Eth Value
$0.00Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 148 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Buy | 15017636 | 905 days ago | IN | 0 ETH | 0.0026041 | ||||
Buy | 15017633 | 905 days ago | IN | 0 ETH | 0.00255702 | ||||
Buy | 15017628 | 905 days ago | IN | 0 ETH | 0.0031264 | ||||
Buy | 15017626 | 905 days ago | IN | 0 ETH | 0.00285774 | ||||
Buy | 15017624 | 905 days ago | IN | 0 ETH | 0.00229745 | ||||
Buy | 15017624 | 905 days ago | IN | 0 ETH | 0.00229745 | ||||
Buy | 15017619 | 905 days ago | IN | 0 ETH | 0.00219296 | ||||
Buy | 15017618 | 905 days ago | IN | 0 ETH | 0.00197172 | ||||
Buy | 15017618 | 905 days ago | IN | 0 ETH | 0.00197172 | ||||
Buy | 15017613 | 905 days ago | IN | 0 ETH | 0.00211607 | ||||
Buy | 15017612 | 905 days ago | IN | 0 ETH | 0.00201063 | ||||
Buy | 15017609 | 905 days ago | IN | 0 ETH | 0.00232125 | ||||
Buy | 15017605 | 905 days ago | IN | 0 ETH | 0.00189782 | ||||
Buy | 15017599 | 905 days ago | IN | 0 ETH | 0.00222772 | ||||
Buy | 15017593 | 905 days ago | IN | 0 ETH | 0.00228987 | ||||
Buy | 15017555 | 905 days ago | IN | 0 ETH | 0.00283138 | ||||
Buy | 15017533 | 905 days ago | IN | 0 ETH | 0.00498085 | ||||
Buy | 15017532 | 905 days ago | IN | 0 ETH | 0.00529341 | ||||
Buy | 15017185 | 905 days ago | IN | 0 ETH | 0.00365413 | ||||
Buy | 15017182 | 905 days ago | IN | 0 ETH | 0.00359016 | ||||
Buy | 15017181 | 905 days ago | IN | 0 ETH | 0.00355829 | ||||
Buy | 15017177 | 905 days ago | IN | 0 ETH | 0.00285424 | ||||
Buy | 15017172 | 905 days ago | IN | 0 ETH | 0.00253786 | ||||
Buy | 15017172 | 905 days ago | IN | 0 ETH | 0.00253786 | ||||
Buy | 15017170 | 905 days ago | IN | 0 ETH | 0.00246532 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
AuctionContract
Compiler Version
v0.8.14+commit.80d49f37
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import "IERC721.sol"; import "IERC20.sol"; import "Ownable.sol"; // &&&&&%%%%%%%%%%#########* // &&&&&&&&%%%%%%%%%%##########((((( // @&&&&&&&&&%%%%%%%%%##########(((((((((( // @@&&&&&&&&&&%%%%%%%%%#########((((((((((((((( // @@@&&&&&&&&%%%%%%%%%%##########((((((((((((((///( // %@@&&&&&& ######( /////. // @@&&&&&&&&& #######((((((( ,/////////// // @@&&&&&&&&%%% ####((((((((((* .////////////// // @@&&&&&&&%%%%%% ##((((((((((((/ ////////////////* // &&&&&&&%%%%%%%%% *(((((((((//// ////////////////// // &&&&%%%%%%%%%#### .((((((/////,////////////////*** // %%%%%%%%%%%########. ((/////////////////*********** // %%%%%##########((((/ /////////////**************** // ##########((((((((((/ ///////********************* // #####((((((((((((///// /*************************, // #(((((((((//////////// ************************* // (((((//////////////*** *********************** // ,//////////*********** *************,*,,*,,** // ///****************** *,,,,,,,,,,,,,,,,,,,,, // ******************,, ,,,,,,,,,,,,,,,,,,,,, // ****,,*,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,, // ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, // .,,,,,,,,,,,,,,,,,,,,,,, /** * @title Auction Contract for NFTs * @author VINCI * @notice This contract is meant to be used with the Vinci NFT contract and * Vinci ERC20 token. */ contract AuctionContract is Ownable { /// The backing NFT contract IERC721 private nftContract; /// Tokens withdrawable by address of the ERC20 token. mapping(address => mapping(address => uint256)) public withdrawable; /// Current sales mapping(uint256 => Sale) private _sales; /// Current english auctions mapping(uint256 => EnglishAuction) public englishAuctions; /// Current dutch auctions mapping(uint256 => DutchAuction) public dutchAuctions; /// Reentrancy lock bool private _locked; /// Fee in basis points uint256 public fee; // Margin in seconds for Dutch auction uint8 public marginSecondsDutchAuction = 180; /** * @notice An object describing a price * @param erc20Contract The address of the erc20 contract * @param price The amount specified in erc20 */ struct Price { address erc20Contract; uint256 price; } /** * @dev An object describing a sale. * @param owner The owner of the NFT * @param erc20Contracts ERC20 contracts * @param prices The prices of the NFT (denoted in erc20Contracts) * @dev Note that storage[] struct is not supported in Solidity, so we have * to work around this by storing the values separately. */ struct Sale { address owner; address[] erc20Contracts; uint256[] prices; } /** * @dev An object describing an english auction. English auctions are * restricted by time. Any bid extends by a given amount of seconds. * * @param owner The owner of the NFT * @param minPrice The minimum amount that needs to be bid * @param bidder The currently highest bidder. If no bid has been * made so far, bidder is address(0) * @param amount The amount of the highest bid. If no bid has * been made so far, amount is 0 * @param erc20token Token used for bidding. Use address(0) for native payments * @param closeTime The time when the auction closes * @param timeIncrease Amount of time added to the close time on every * bid */ struct EnglishAuction { address owner; uint256 minPrice; address bidder; uint256 amount; address erc20token; uint256 closeTime; uint256 timeIncrease; } /** * @dev An object describing a dutch auction. * @param owner The owner of the NFT * @param startPrice The starting price of the dutch auction * @param endPrice The ending price of the dutch auction * @param start Timestamp of the auction start. It establishes when the price starts decreasing, although it can be bought before the start date. * @param end Timestamp of the auction end. It establishes when the price stops decreasing, although it can be bought after this date. * @param erc20token token used for the auction. Address(0) if native payment */ struct DutchAuction { address owner; uint256 startPrice; uint256 endPrice; uint256 start; uint256 end; address erc20token; } modifier reentrancyLock() { require(!_locked, "locked"); _locked = true; _; _locked = false; } modifier notSoldOrInAuction(uint256 tokenId) { require( _sales[tokenId].owner == address(0), "Token is already being sold" ); require( englishAuctions[tokenId].owner == address(0), "Token is already in english auction" ); require( dutchAuctions[tokenId].owner == address(0), "Token is already in dutch auction" ); _; } modifier beingSold(uint256 tokenId) { require(_sales[tokenId].owner != address(0), "Token is not being sold"); _; } modifier beingEnglishAuctioned(uint256 tokenId) { require( englishAuctions[tokenId].owner != address(0), "Token is not being auctioned" ); require( englishAuctions[tokenId].closeTime > block.timestamp, "Auction is closed" ); _; } // Start and end dates of Dutch auction do not modify the beingDutchAuctioned status. // It can be sold at any time regardless of start and end date. modifier beingDutchAuctioned(uint256 tokenId) { require( dutchAuctions[tokenId].owner != address(0), "Token is not being auctioned" ); _; } /** * @dev Event for the start of a sale * @param tokenId The id of the NFT * @param owner The owner of the NFT * @param prices List of prices of the sale (list of Price struct) */ event SaleStarted(uint256 tokenId, address owner, Price[] prices); /** * @dev Event for the start of a sale * @param tokenId The id of the NFT * @param owner The owner of the NFT * @param erc20TokenSale erc20 contract address (zero for native payments) * @param price Price of the sale */ event SaleStartedInBatch(uint256 tokenId, address owner, address erc20TokenSale, uint price); /** * @dev Event for the cancel of a sale * @param tokenId The id of the NFT * @param owner The owner of the NFT */ event SaleCanceled(uint256 tokenId, address owner); /** * @dev Event for a successful sale * @param tokenId The id of the NFT * @param price The price of the NFT (denoted in erc20contract) * @param buyer The buyer of the NFT * @param erc20contract The buyer of the NFT */ event NFTSold( uint256 tokenId, uint256 price, address buyer, address erc20contract ); /** * @dev Event for the start of an english auction * @param tokenId The id of the NFT * @param minPrice The minimum bid * @param owner The owner of the NFT * @param erc20token Token address in which NFT is being auctioned * @param closeTime Timestamp when this auction closes * @param timeIncrease Amount of seconds added to close time on every bid */ event EnglishAuctionStarted( uint256 tokenId, uint256 minPrice, address owner, address erc20token, uint256 closeTime, uint256 timeIncrease ); /** * @dev Event for a new bid on an english auction * @param tokenId The id of the NFT * @param amount The bid * @param bidder The bidder */ event EnglishNewBid(uint256 tokenId, uint256 amount, address bidder); /** * @dev Event for a successful auction * @param tokenId The id of the NFT * @param amount The price of the NFT (denoted in erc20contract of the auction) * @param buyer The buyer of the NFT */ event EnglishAuctionFinalized( uint256 tokenId, uint256 amount, address buyer ); /** * @dev Event for a canceled english auction * @param tokenId The id of the NFT * @param owner The owner of the NFT */ event EnglishAuctionCanceled(uint256 tokenId, address owner); /** * @dev Event for the start of a dutch auction * @param tokenId The id of the NFT * @param startPrice Starting price * @param endPrice Ending price * @param start Starting timestamp * @param end Ending timestamp * @param erc20token token used for the auction. Address(0) if native payment */ event DutchAuctionStarted( uint256 tokenId, uint256 startPrice, uint256 endPrice, uint256 start, uint256 end, address erc20token ); /** * @dev Event for a successful dutch auction * @param tokenId The id of the NFT * @param amount The price of the NFT (denoted in erc20contract of the auction) * @param buyer The buyer of the NFT * @param erc20token token used for the auction. Address(0) if native payment */ event DutchAuctionFinalized(uint256 tokenId, uint256 amount, address buyer, address erc20token); /** * @dev Event for a canceled dutch auction * @param tokenId The id of the NFT * @param owner The owner of the NFT */ event DutchAuctionCanceled(uint256 tokenId, address owner); /** * @dev Event for a withdrawal action * @param erc20token address of the token withdrawn (address(0) for native token) * @param amount amount withdrawn * @param sender caller */ event Withdrawal(address erc20token, uint amount, address sender); /** * @dev Create a new NFT auction contract * @param _nftContract The address of a ERC721 compatible NFT contract */ constructor(IERC721 _nftContract) { nftContract = _nftContract; _locked = false; fee = 1500; // 15% fees kept by vinvi to give to the artists } /** * @notice Witdraw ERC20 token that belong to me. Use this function to * withdraw after a successful auction or sale, or when a bid was * outbid. * @param _erc20token The address of the erc20 token */ function withdraw(address _erc20token) public reentrancyLock { address sender = _msgSender(); uint256 amount = withdrawable[sender][_erc20token]; require(amount > 0, "Nothing to withdraw"); withdrawable[sender][_erc20token] = 0; // address(0) is used as a proxy for native currency payments if (_erc20token == address(0)) { (bool success,) = sender.call{value : amount}(""); require(success, "Native payment to address failed"); } else { IERC20 _erc20contract = IERC20(_erc20token); require(_erc20contract.balanceOf(address(this)) >= amount, "Not enough funds in contract"); _erc20contract.transfer(sender, amount); } emit Withdrawal(_erc20token, amount, sender); } /** * @notice Set the fee. Only owner. * @param _fee The fee specified in BPS */ function setFee(uint256 _fee) public onlyOwner { require(_fee <= 10000, "Can't set a fee larger than 100%"); fee = _fee; } /** * @notice Sets the margin in seconds for which not to take into account the price variations in a dutch bid * @param _marginSecondsDutchAuction margin in seconds */ function setMarginSecondsForDutchAuction(uint8 _marginSecondsDutchAuction) public onlyOwner { require(_marginSecondsDutchAuction > 0, "Can't set a negative number"); marginSecondsDutchAuction = _marginSecondsDutchAuction; } /** * @notice Start a new sale * @dev Emits a `SaleStarted` event * @dev While the sale proceeds, the NFT is stored inside of the sales * contract. * @param tokenId The id of the NFT * @param prices Prices of the sale */ function startSale(uint256 tokenId, Price[] calldata prices) public reentrancyLock notSoldOrInAuction(tokenId) { require(prices.length <= 10, "Only up to 10 prices are supported"); require(prices.length > 0, "At least one price needs to be specified"); uint256[] memory _prices = new uint256[](prices.length); address[] memory _addresses = new address[](prices.length); for (uint256 i = 0; i < prices.length; i++) { _prices[i] = prices[i].price; _addresses[i] = prices[i].erc20Contract; } _sales[tokenId] = Sale(_msgSender(), _addresses, _prices); nftContract.transferFrom(_msgSender(), address(this), tokenId); emit SaleStarted(tokenId, _msgSender(), prices); } /** * @notice Start a new sale for multiple tokenIds in the same transaction (to save gas) All tokens are put for sale for the same price (and the same erc20 token) Accepts the zero address for native payments * @dev Emits a `SaleStartedInBatch` event * @dev While the sale proceeds, the NFT is stored inside of the sales * contract. * @param tokenIds The id of the NFT * @param _erc20Contract Contract address of the erc20 to put for sale (or zero address for native) * @param _price Price for the sale */ function startBatchSale(uint256[] calldata tokenIds, address _erc20Contract, uint256 _price) public { require(tokenIds.length < 301, "Only up to 300 tokenIds at once"); address[] memory _addresses = new address[](1); uint256[] memory _prices = new uint256[](1); _addresses[0] = _erc20Contract; _prices[0] = _price; for (uint i = 0; i < tokenIds.length; i++) { _sales[tokenIds[i]] = Sale(_msgSender(), _addresses, _prices); nftContract.transferFrom(_msgSender(), address(this), tokenIds[i]); emit SaleStartedInBatch(tokenIds[i], _msgSender(), _erc20Contract, _price); } } /** * @notice Cancel of an ongoing sale * @dev Emits a `SaleCanceled` event * @notice Returns the NFT to its owner * @param tokenId The id of the token * @dev Requires to be executed as the same account that initially crated * the sale. */ function cancelSale(uint256 tokenId) public reentrancyLock beingSold(tokenId) { require(_msgSender() == _sales[tokenId].owner, "Must be token owner"); delete _sales[tokenId].owner; delete _sales[tokenId].prices; delete _sales[tokenId].erc20Contracts; nftContract.transferFrom(address(this), _msgSender(), tokenId); emit SaleCanceled(tokenId, _msgSender()); } /** * @notice Buy an NFT for sale. Requires ERC20 to be approved. Use address(0) to buy with native token * @dev Transfers NFT, makes ERC20 claimable * @param tokenId The id of the token to buy * @param _erc20Contract The address of the ERC20 the buyer wants to use. Use address(0) to buy with native token */ function buy(uint256 tokenId, address _erc20Contract) public payable reentrancyLock beingSold(tokenId) { uint256 price = 0; bool found = false; for (uint256 i = 0; i < _sales[tokenId].erc20Contracts.length; i++) { if (_sales[tokenId].erc20Contracts[i] == _erc20Contract) { found = true; price = _sales[tokenId].prices[i]; } } require( found, "The token is not being sold in exchange for the given erc20 address" ); _addWithdrawable(_sales[tokenId].owner, _erc20Contract, price); delete _sales[tokenId].owner; delete _sales[tokenId].prices; delete _sales[tokenId].erc20Contracts; // Execute payments if (_erc20Contract == address(0)) { // for native payments, the payment needs to come in the msg.value require(msg.value == price, "Not enough value to purchase"); } else { IERC20 erc20 = IERC20(_erc20Contract); require(msg.value == 0, "Payment cannot be in ERC20 and native currency simultaneously"); require(erc20.balanceOf(_msgSender()) >= price, "Not enough token balance"); erc20.transferFrom(_msgSender(), address(this), price); } nftContract.transferFrom(address(this), _msgSender(), tokenId); emit NFTSold(tokenId, price, _msgSender(), _erc20Contract); } /** * @notice Start a new english auction. The NFT is kept in this contract * during the auction * @param tokenId The id of the token to start auctioning * @param minPrice The minimum amount a bid should be * @param erc20token Token address in which the item is being auctioned * @param closeTime Timestamp when the auction should close * @param timeIncrease How many seconds are added for every bid? */ function englishStartAuction( uint256 tokenId, uint256 minPrice, uint256 closeTime, uint256 timeIncrease, address erc20token ) public reentrancyLock notSoldOrInAuction(tokenId) { // It must be -1, because bids can only enter if greater than current amount uint amount = minPrice == 0 ? 0 : minPrice - 1; englishAuctions[tokenId] = EnglishAuction( _msgSender(), minPrice, address(0), amount, erc20token, closeTime, timeIncrease ); nftContract.transferFrom(_msgSender(), address(this), tokenId); emit EnglishAuctionStarted( tokenId, minPrice, _msgSender(), erc20token, closeTime, timeIncrease ); } /** * @notice Bid on an english auction * @param tokenId Id of token * @param amount Amount being bid */ function englishBid(uint256 tokenId, uint256 amount) public payable reentrancyLock beingEnglishAuctioned(tokenId) { address sender = _msgSender(); address erc20BidToken = englishAuctions[tokenId].erc20token; require(amount >= englishAuctions[tokenId].amount, "Bid is not high enough"); // store tokens from the previous bidder in a withdrawable if (englishAuctions[tokenId].bidder != address(0)) { withdrawable[englishAuctions[tokenId].bidder][ address(englishAuctions[tokenId].erc20token) ] += englishAuctions[tokenId].amount; } englishAuctions[tokenId].bidder = sender; englishAuctions[tokenId].amount = amount; englishAuctions[tokenId].closeTime += englishAuctions[tokenId] .timeIncrease; if (erc20BidToken == address(0)) { // for native payments, the payment needs to come in the msg.value require(msg.value == amount, "Value not matching amount"); } else { require(msg.value == 0, "No need to add value if paid with ERC20"); IERC20 erc20BidContract = IERC20(erc20BidToken); // if sender does not have enough tokens, the transaction will simply revert erc20BidContract.transferFrom(sender, address(this), amount); } emit EnglishNewBid(tokenId, amount, _msgSender()); } /** * @notice Cancel English auction. This is only possible as long as there * has not been any bids so far. * @param tokenId The token to cancel the auction for */ function englishCancelAuction(uint256 tokenId) public reentrancyLock { require( englishAuctions[tokenId].owner == _msgSender(), "Must be token owner" ); require( englishAuctions[tokenId].bidder == address(0), "There is already a bid, can't cancel anymore" ); _deleteEnglishAuction(tokenId); nftContract.transferFrom(address(this), _msgSender(), tokenId); emit EnglishAuctionCanceled(tokenId, _msgSender()); } /** * @notice Finalize an english auction. Call this once the auction is over * to accept the final bid. * @param tokenId The token id */ function englishFinalizeAuction(uint256 tokenId) public reentrancyLock { require( englishAuctions[tokenId].owner != address(0), "Token is not being auctioned" ); require( englishAuctions[tokenId].closeTime <= block.timestamp || _msgSender() == englishAuctions[tokenId].owner, "Only the owner can finalize the auction before its end" ); require( englishAuctions[tokenId].bidder != address(0), "No bid has been made" ); uint256 amount = englishAuctions[tokenId].amount; _addWithdrawable( englishAuctions[tokenId].owner, englishAuctions[tokenId].erc20token, amount ); nftContract.transferFrom( address(this), englishAuctions[tokenId].bidder, tokenId ); emit EnglishAuctionFinalized( tokenId, amount, englishAuctions[tokenId].bidder ); _deleteEnglishAuction(tokenId); } /** * @notice Starts a new dutch auction. The NFT is kept in this contract * during the auction * @param tokenId The id of the token * @param startPrice Starting price * @param endPrice Ending price * @param start Starting timestamp * @param end Ending timestamp * @param erc20token token used for the auction. Address(0) if native payment */ function dutchStartAuction( uint256 tokenId, uint256 startPrice, uint256 endPrice, uint256 start, uint256 end, address erc20token ) public reentrancyLock notSoldOrInAuction(tokenId) { require(startPrice > endPrice, "Price has to be decreasing with time"); require(start < end, "End has to be after start"); dutchAuctions[tokenId] = DutchAuction( _msgSender(), startPrice, endPrice, start, end, erc20token ); nftContract.transferFrom(_msgSender(), address(this), tokenId); emit DutchAuctionStarted(tokenId, startPrice, endPrice, start, end, erc20token); } /** * @notice Function to determine price of dutch auction at given timestamp * @param tokenId The token id * @param timestamp The timestamp. * @return The price of the token */ function dutchAuctionPriceAtTimestamp(uint256 tokenId, uint256 timestamp) public view beingDutchAuctioned(tokenId) returns (uint256) { if (timestamp <= dutchAuctions[tokenId].start) { return dutchAuctions[tokenId].startPrice; } if (dutchAuctions[tokenId].end <= timestamp) { return dutchAuctions[tokenId].endPrice; } return dutchAuctions[tokenId].startPrice - ((timestamp - dutchAuctions[tokenId].start) * (dutchAuctions[tokenId].startPrice - dutchAuctions[tokenId].endPrice)) / (dutchAuctions[tokenId].end - dutchAuctions[tokenId].start); } /** * @notice Function to determine current price of dutch auction * @param tokenId The token id * @return The price of the token */ function dutchAuctionCurrentPrice(uint256 tokenId) public view returns (uint256) { return dutchAuctionPriceAtTimestamp(tokenId, block.timestamp); } /** * @notice Buy a token from a dutch auction * @param tokenId The id of the token */ function dutchBuyToken(uint256 tokenId) public payable reentrancyLock beingDutchAuctioned(tokenId) { uint256 price = dutchAuctionCurrentPrice(tokenId); address erc20BidToken = dutchAuctions[tokenId].erc20token; _addWithdrawable( dutchAuctions[tokenId].owner, address(erc20BidToken), // address(0) for native payment price ); if (erc20BidToken == address(0)) { // for native payments, the payment needs to come in the msg.value require(msg.value >= price, "Not enough value to purchase"); require(msg.value < price + marginSecondsDutchAuction * _priceDropPerSecondForDutchAuction(tokenId), "Value too high"); } else { IERC20 erc20BidContract = IERC20(erc20BidToken); erc20BidContract.transferFrom(_msgSender(), address(this), price); } nftContract.transferFrom(address(this), _msgSender(), tokenId); emit DutchAuctionFinalized(tokenId, price, _msgSender(), erc20BidToken); _deleteDutchAuction(tokenId); } /** * @notice Owner of NFT Cancels a dutch auction only when it has finished. Used to retrieve the NFT (by the owner) when nobody has set a bid on it before the end-time. * @param tokenId The id of the token */ function dutchCancelAuction(uint256 tokenId) public reentrancyLock beingDutchAuctioned(tokenId) { require( dutchAuctions[tokenId].end <= block.timestamp, "Auction has not ended yet" ); require(_msgSender() == dutchAuctions[tokenId].owner, "Must be token owner"); emit DutchAuctionCanceled(tokenId, dutchAuctions[tokenId].owner); nftContract.transferFrom( address(this), dutchAuctions[tokenId].owner, tokenId ); _deleteDutchAuction(tokenId); } /** * @notice Get owner of sale * @param tokenId The id of the token */ function getSaleOwner(uint256 tokenId) public view returns (address) { return _sales[tokenId].owner; } /** * @notice Get number of prices of a sale * @param tokenId The id of the token */ function getSalePricesLength(uint256 tokenId) public view returns (uint256) { return _sales[tokenId].prices.length; } /** * @notice Get a price of a sale * @param tokenId The id of the token * @param index The index into the sale array */ function getSalePrice(uint256 tokenId, uint256 index) public view returns (Price memory) { return Price( _sales[tokenId].erc20Contracts[index], _sales[tokenId].prices[index] ); } /** * @notice Displays the last price bid on a tokenId that is being auctioned * @param tokenId The id of the token */ function readEnglishAuctionCurrentPrice(uint256 tokenId) public view returns (uint){ require(isInEnglishAuction(tokenId), "Not in English auction"); return englishAuctions[tokenId].amount; } /** * @notice Reads the ERC20 in which the tokenId is being auctioned. Returns 0x address if auctioned with nativee * @param tokenId The id of the token */ function readEnglishAuctionERC20token(uint256 tokenId) public view returns (address){ require(isInEnglishAuction(tokenId), "Not in English auction"); return englishAuctions[tokenId].erc20token; } /** * @notice Reads the ERC20 in which the tokenId is being auctioned. Returns 0x address if auctioned with nativee * @param tokenId The id of the token */ function readDucthAuctionERC20token(uint256 tokenId) public view returns (address){ require(isInDutchAuction(tokenId), "Not in Dutch auction"); return dutchAuctions[tokenId].erc20token; } /** * @notice Displays the price of a token in a specific ERC20 token, if it is being sold on that token * @param tokenId The id of the token */ function readSalePrice(uint256 tokenId, address _erc20token) public view returns (uint){ require(isBeingSold(tokenId), "Not for sale"); bool found; for (uint i = 0; i < getSalePricesLength(tokenId); i++) { Price memory price = getSalePrice(tokenId, i); if (_erc20token == price.erc20Contract) { return price.price; } } revert("Item is not for sale for this ERC20 token"); } /** * @notice Checks if a specific tokenid is for sale at the moment * @param tokenId The id of the token */ function isBeingSold(uint tokenId) public view returns (bool) { return _sales[tokenId].owner != address(0); } /** * @notice Checks if a specific tokenid is being auctioned on an English auction at the moment * @param tokenId The id of the token */ function isInEnglishAuction(uint tokenId) public view returns (bool) { return englishAuctions[tokenId].owner != address(0); } /** * @notice Checks if a specific tokenid is being auctioned on a Dutch auction at the moment Start and end dates do not interfere with the status. * @param tokenId The id of the token */ function isInDutchAuction(uint tokenId) public view returns (bool) { return dutchAuctions[tokenId].owner != address(0); } /** * @notice Checks if a specific tokenid is being sold or actioned at the moment * @param tokenId The id of the token */ function isBeingSoldOrAuctioned(uint tokenId) public view returns (bool) { return (isBeingSold(tokenId) || isInEnglishAuction(tokenId) || isInDutchAuction(tokenId)); } function _addWithdrawable( address beneficiary, address _erc20Contract, uint256 amount ) private { uint256 feeAmount = (amount * fee) / 10000; uint256 newAmount = amount - feeAmount; withdrawable[beneficiary][_erc20Contract] += newAmount; withdrawable[owner()][_erc20Contract] += feeAmount; } function _deleteEnglishAuction(uint256 tokenId) private { delete englishAuctions[tokenId].owner; delete englishAuctions[tokenId].minPrice; delete englishAuctions[tokenId].bidder; delete englishAuctions[tokenId].amount; delete englishAuctions[tokenId].closeTime; delete englishAuctions[tokenId].timeIncrease; } function _deleteDutchAuction(uint256 tokenId) private { delete dutchAuctions[tokenId].owner; delete dutchAuctions[tokenId].startPrice; delete dutchAuctions[tokenId].endPrice; delete dutchAuctions[tokenId].start; delete dutchAuctions[tokenId].end; } /** * @notice Calculates the drop in price per second of an NFT being dutch auctioned. * Important: returns a positive value * @param tokenId TokenId that is in dutch auction for which to calculate the drop in price */ function _priceDropPerSecondForDutchAuction(uint256 tokenId) internal returns (uint256){ return (dutchAuctions[tokenId].startPrice - dutchAuctions[tokenId].endPrice) / (dutchAuctions[tokenId].end - dutchAuctions[tokenId].start); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "evmVersion": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "libraries": { "AuctionContract.sol": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"DutchAuctionCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"address","name":"erc20token","type":"address"}],"name":"DutchAuctionFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"start","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"end","type":"uint256"},{"indexed":false,"internalType":"address","name":"erc20token","type":"address"}],"name":"DutchAuctionStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"EnglishAuctionCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"buyer","type":"address"}],"name":"EnglishAuctionFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minPrice","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"erc20token","type":"address"},{"indexed":false,"internalType":"uint256","name":"closeTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timeIncrease","type":"uint256"}],"name":"EnglishAuctionStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"bidder","type":"address"}],"name":"EnglishNewBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"address","name":"erc20contract","type":"address"}],"name":"NFTSold","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"SaleCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"components":[{"internalType":"address","name":"erc20Contract","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"indexed":false,"internalType":"struct AuctionContract.Price[]","name":"prices","type":"tuple[]"}],"name":"SaleStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"erc20TokenSale","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"SaleStartedInBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"erc20token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"Withdrawal","type":"event"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"_erc20Contract","type":"address"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"cancelSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"dutchAuctionCurrentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"dutchAuctionPriceAtTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"dutchAuctions","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"startPrice","type":"uint256"},{"internalType":"uint256","name":"endPrice","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"},{"internalType":"address","name":"erc20token","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"dutchBuyToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"dutchCancelAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"startPrice","type":"uint256"},{"internalType":"uint256","name":"endPrice","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"},{"internalType":"address","name":"erc20token","type":"address"}],"name":"dutchStartAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"englishAuctions","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"minPrice","type":"uint256"},{"internalType":"address","name":"bidder","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"erc20token","type":"address"},{"internalType":"uint256","name":"closeTime","type":"uint256"},{"internalType":"uint256","name":"timeIncrease","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"englishBid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"englishCancelAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"englishFinalizeAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"minPrice","type":"uint256"},{"internalType":"uint256","name":"closeTime","type":"uint256"},{"internalType":"uint256","name":"timeIncrease","type":"uint256"},{"internalType":"address","name":"erc20token","type":"address"}],"name":"englishStartAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSaleOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getSalePrice","outputs":[{"components":[{"internalType":"address","name":"erc20Contract","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct AuctionContract.Price","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSalePricesLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isBeingSold","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isBeingSoldOrAuctioned","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isInDutchAuction","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isInEnglishAuction","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marginSecondsDutchAuction","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"readDucthAuctionERC20token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"readEnglishAuctionCurrentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"readEnglishAuctionERC20token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"_erc20token","type":"address"}],"name":"readSalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_marginSecondsDutchAuction","type":"uint8"}],"name":"setMarginSecondsForDutchAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"address","name":"_erc20Contract","type":"address"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"startBatchSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"address","name":"erc20Contract","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct AuctionContract.Price[]","name":"prices","type":"tuple[]"}],"name":"startSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_erc20token","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"withdrawable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526008805460ff191660b41790553480156200001e57600080fd5b5060405162003ae938038062003ae98339810160408190526200004191620000d2565b6200004c3362000082565b600180546001600160a01b0319166001600160a01b03929092169190911790556006805460ff191690556105dc60075562000104565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000e557600080fd5b81516001600160a01b0381168114620000fd57600080fd5b9392505050565b6139d580620001146000396000f3fe6080604052600436106102045760003560e01c80638da5cb5b11610118578063bcbe11ae116100a0578063ddca3f431161006f578063ddca3f4314610726578063ded721701461073c578063e9736ce71461075c578063f2ab2fc01461076f578063f2fde38b1461080657600080fd5b8063bcbe11ae1461068e578063bd94b005146106ae578063c0314d27146106ce578063d0a9813d1461070657600080fd5b8063a04ade9a116100e7578063a04ade9a146105d9578063a16fb98614610605578063a355985514610618578063aad1e67c14610638578063bb3c34891461065857600080fd5b80638da5cb5b146104b25780638e8f869f146104d0578063909814a2146104f0578063974f372a1461052857600080fd5b806369fe0e2d1161019b5780637845c3a51161016a5780637845c3a5146103fb5780637deb60251461041b57806385d4efc41461042e57806385ee76aa1461044e5780638aab42741461046e57600080fd5b806369fe0e2d146103865780636ac901f1146103a6578063715018a6146103c657806376469bd7146103db57600080fd5b806351cff8d9116101d757806351cff8d9146102d057806359546bbb146102f05780635b09303f146103105780635d5cd80c1461034e57600080fd5b80630a8ccf41146102095780634a0b1d10146102465780634a4e1d12146102685780634a59745014610288575b600080fd5b34801561021557600080fd5b506102296102243660046133fb565b610826565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561025257600080fd5b506102666102613660046133fb565b6108a6565b005b34801561027457600080fd5b50610266610283366004613430565b610a90565b34801561029457600080fd5b506102c06102a33660046133fb565b6000908152600460205260409020546001600160a01b0316151590565b604051901515815260200161023d565b3480156102dc57600080fd5b506102666102eb366004613481565b610d8c565b3480156102fc57600080fd5b5061026661030b3660046134a3565b61108f565b34801561031c57600080fd5b5061034061032b3660046133fb565b60009081526003602052604090206002015490565b60405190815260200161023d565b34801561035a57600080fd5b506102c06103693660046133fb565b6000908152600360205260409020546001600160a01b0316151590565b34801561039257600080fd5b506102666103a13660046133fb565b611317565b3480156103b257600080fd5b506102666103c13660046133fb565b611398565b3480156103d257600080fd5b50610266611618565b3480156103e757600080fd5b506103406103f63660046134ec565b61164e565b34801561040757600080fd5b50610340610416366004613518565b61176b565b6102666104293660046134ec565b61189f565b34801561043a57600080fd5b506103406104493660046133fb565b611db0565b34801561045a57600080fd5b506102296104693660046133fb565b611dbc565b34801561047a57600080fd5b5061048e610489366004613518565b611e39565b6040805182516001600160a01b03168152602092830151928101929092520161023d565b3480156104be57600080fd5b506000546001600160a01b0316610229565b3480156104dc57600080fd5b506102666104eb36600461353a565b611ed4565b3480156104fc57600080fd5b506102c061050b3660046133fb565b6000908152600560205260409020546001600160a01b0316151590565b34801561053457600080fd5b5061058e6105433660046133fb565b600460208190526000918252604090912080546001820154600283015460038401549484015460058501546006909501546001600160a01b0394851696939592851694909116919087565b604080516001600160a01b0398891681526020810197909752948716948601949094526060850192909252909316608083015260a082019290925260c081019190915260e00161023d565b3480156105e557600080fd5b506008546105f39060ff1681565b60405160ff909116815260200161023d565b6102666106133660046133fb565b6122dd565b34801561062457600080fd5b506102c06106333660046133fb565b612593565b34801561064457600080fd5b506102666106533660046135b9565b6125f3565b34801561066457600080fd5b506102296106733660046133fb565b6000908152600360205260409020546001600160a01b031690565b34801561069a57600080fd5b506103406106a93660046133fb565b612686565b3480156106ba57600080fd5b506102666106c93660046133fb565b6126f9565b3480156106da57600080fd5b506103406106e93660046135dc565b600260209081526000928352604080842090915290825290205481565b34801561071257600080fd5b50610266610721366004613606565b6128cb565b34801561073257600080fd5b5061034060075481565b34801561074857600080fd5b506102666107573660046133fb565b612b78565b61026661076a366004613518565b612d28565b34801561077b57600080fd5b506107ca61078a3660046133fb565b60056020819052600091825260409091208054600182015460028301546003840154600485015494909501546001600160a01b0393841695929491931686565b604080516001600160a01b03978816815260208101969096528501939093526060840191909152608083015290911660a082015260c00161023d565b34801561081257600080fd5b50610266610821366004613481565b613090565b6000818152600560205260408120546001600160a01b03166108865760405162461bcd60e51b81526020600482015260146024820152732737ba1034b710223aba31b41030bab1ba34b7b760611b60448201526064015b60405180910390fd5b50600090815260056020819052604090912001546001600160a01b031690565b60065460ff16156108c95760405162461bcd60e51b815260040161087d90613692565b6006805460ff1916600117905560008181526005602052604090205481906001600160a01b031661090c5760405162461bcd60e51b815260040161087d906136b2565b60008281526005602052604090206004015442101561096d5760405162461bcd60e51b815260206004820152601960248201527f41756374696f6e20686173206e6f7420656e6465642079657400000000000000604482015260640161087d565b6000828152600560205260409020546001600160a01b0316336001600160a01b0316146109ac5760405162461bcd60e51b815260040161087d906136e9565b6000828152600560209081526040918290205482518581526001600160a01b03909116918101919091527f888d61faf770957191082b77408622223da5ded1a327d2ca5e1f7050a6cbb83d910160405180910390a1600154600083815260056020526040908190205490516323b872dd60e01b81526001600160a01b03928316926323b872dd92610a47923092909116908790600401613716565b600060405180830381600087803b158015610a6157600080fd5b505af1158015610a75573d6000803e3d6000fd5b50505050610a828261312b565b50506006805460ff19169055565b60065460ff1615610ab35760405162461bcd60e51b815260040161087d90613692565b6006805460ff1916600117905560008681526003602052604090205486906001600160a01b031615610af75760405162461bcd60e51b815260040161087d9061373a565b6000818152600460205260409020546001600160a01b031615610b2c5760405162461bcd60e51b815260040161087d90613771565b6000818152600560205260409020546001600160a01b031615610b615760405162461bcd60e51b815260040161087d906137b4565b848611610bbc5760405162461bcd60e51b8152602060048201526024808201527f50726963652068617320746f2062652064656372656173696e6720776974682060448201526374696d6560e01b606482015260840161087d565b828410610c0b5760405162461bcd60e51b815260206004820152601960248201527f456e642068617320746f20626520616674657220737461727400000000000000604482015260640161087d565b6040518060c00160405280610c1d3390565b6001600160a01b03908116825260208083018a905260408084018a905260608085018a905260808086018a905288851660a09687015260008e8152600580865290849020885181549088166001600160a01b031991821617825595890151600180830191909155948901516002820155928801516003840155908701516004830155959094015193909401805493831693909116929092179091559054166323b872dd610cc73390565b308a6040518463ffffffff1660e01b8152600401610ce793929190613716565b600060405180830381600087803b158015610d0157600080fd5b505af1158015610d15573d6000803e3d6000fd5b5050604080518a8152602081018a905290810188905260608101879052608081018690526001600160a01b03851660a08201527ffa560a0cfdeef5db234b06bc19928a5140c05e9b47ee6acc856075742cbdb54c925060c00190505b60405180910390a150506006805460ff191690555050505050565b60065460ff1615610daf5760405162461bcd60e51b815260040161087d90613692565b6006805460ff191660011790556000610dc53390565b6001600160a01b0380821660009081526002602090815260408083209387168352929052205490915080610e315760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b604482015260640161087d565b6001600160a01b03808316600090815260026020908152604080832093871680845293909152812055610f07576000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610eab576040519150601f19603f3d011682016040523d82523d6000602084013e610eb0565b606091505b5050905080610f015760405162461bcd60e51b815260206004820181905260248201527f4e6174697665207061796d656e7420746f2061646472657373206661696c6564604482015260640161087d565b50611037565b6040516370a0823160e01b8152306004820152839082906001600160a01b038316906370a0823190602401602060405180830381865afa158015610f4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7391906137f5565b1015610fc15760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682066756e647320696e20636f6e747261637400000000604482015260640161087d565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526024820184905282169063a9059cbb906044016020604051808303816000875af1158015611010573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611034919061380e565b50505b604080516001600160a01b0385811682526020820184905284168183015290517e1a143d5b175701cb3246058ffac3d63945192075a926ff73a19930f09d587a9181900360600190a150506006805460ff1916905550565b60065460ff16156110b25760405162461bcd60e51b815260040161087d90613692565b6006805460ff1916600117905560008581526003602052604090205485906001600160a01b0316156110f65760405162461bcd60e51b815260040161087d9061373a565b6000818152600460205260409020546001600160a01b03161561112b5760405162461bcd60e51b815260040161087d90613771565b6000818152600560205260409020546001600160a01b0316156111605760405162461bcd60e51b815260040161087d906137b4565b6000851561117857611173600187613846565b61117b565b60005b90506040518060e0016040528061118f3390565b6001600160a01b03908116825260208083018a905260006040808501829052606080860188905289851660808088019190915260a08088018e905260c09788018d90528f8552600480875294849020895181549089166001600160a01b0319918216178255968a0151600180830191909155948a0151600282018054918a16918916919091179055928901516003840155908801519382018054948716949095169390931790935590850151600583015593909201516006909201919091559054166323b872dd61125d3390565b308a6040518463ffffffff1660e01b815260040161127d93929190613716565b600060405180830381600087803b15801561129757600080fd5b505af11580156112ab573d6000803e3d6000fd5b505050507fb89622be8a147d27b840fbf91804afdd101c8f9457f6812d94a6fb2dded63c3f87876112d93390565b6040805193845260208401929092526001600160a01b0390811691830191909152851660608201526080810187905260a0810186905260c001610d71565b6000546001600160a01b031633146113415760405162461bcd60e51b815260040161087d9061385d565b6127108111156113935760405162461bcd60e51b815260206004820181905260248201527f43616e277420736574206120666565206c6172676572207468616e2031303025604482015260640161087d565b600755565b60065460ff16156113bb5760405162461bcd60e51b815260040161087d90613692565b6006805460ff191660011790556000818152600460205260409020546001600160a01b03166113fc5760405162461bcd60e51b815260040161087d906136b2565b6000818152600460205260409020600501544210158061143b57506000818152600460205260409020546001600160a01b0316336001600160a01b0316145b6114a65760405162461bcd60e51b815260206004820152603660248201527f4f6e6c7920746865206f776e65722063616e2066696e616c697a652074686520604482015275185d58dd1a5bdb881899599bdc99481a5d1cc8195b9960521b606482015260840161087d565b6000818152600460205260409020600201546001600160a01b03166115045760405162461bcd60e51b81526020600482015260146024820152734e6f2062696420686173206265656e206d61646560601b604482015260640161087d565b6000818152600460208190526040909120600381015481549190920154611538916001600160a01b03908116911683613162565b6001546000838152600460208190526040918290206002015491516323b872dd60e01b81526001600160a01b03938416936323b872dd936115829330939190921691889101613716565b600060405180830381600087803b15801561159c57600080fd5b505af11580156115b0573d6000803e3d6000fd5b5050506000838152600460209081526040918290206002015482518681529182018590526001600160a01b03168183015290517f5313e23c79232349366af8a1b8e877da2b9f12c9643272114c0af1210d46ad3d92509081900360600190a1610a8282613244565b6000546001600160a01b031633146116425760405162461bcd60e51b815260040161087d9061385d565b61164c6000613288565b565b6000828152600360205260408120546001600160a01b03166116a15760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420666f722073616c6560a01b604482015260640161087d565b6000805b60008581526003602052604090206002015481101561170a5760006116ca8683611e39565b905080600001516001600160a01b0316856001600160a01b0316036116f757602001519250611765915050565b508061170281613892565b9150506116a5565b5060405162461bcd60e51b815260206004820152602960248201527f4974656d206973206e6f7420666f722073616c6520666f722074686973204552604482015268219918103a37b5b2b760b91b606482015260840161087d565b92915050565b60008281526005602052604081205483906001600160a01b03166117a15760405162461bcd60e51b815260040161087d906136b2565b60008481526005602052604090206003015483116117d2576000848152600560205260409020600101549150611898565b6000848152600560205260409020600401548310611803576000848152600560205260409020600201549150611898565b600084815260056020526040902060038101546004909101546118269190613846565b600085815260056020526040902060028101546001909101546118499190613846565b6000868152600560205260409020600301546118659086613846565b61186f91906138ab565b61187991906138ca565b6000858152600560205260409020600101546118959190613846565b91505b5092915050565b60065460ff16156118c25760405162461bcd60e51b815260040161087d90613692565b6006805460ff1916600117905560008281526003602052604090205482906001600160a01b031661192f5760405162461bcd60e51b8152602060048201526017602482015276151bdad95b881a5cc81b9bdd0818995a5b99c81cdbdb19604a1b604482015260640161087d565b60008060005b6000868152600360205260409020600101548110156119de57600086815260036020526040902060010180546001600160a01b03871691908390811061197d5761197d6138ec565b6000918252602090912001546001600160a01b0316036119cc576000868152600360205260409020600201805460019350829081106119be576119be6138ec565b906000526020600020015492505b806119d681613892565b915050611935565b5080611a5e5760405162461bcd60e51b815260206004820152604360248201527f54686520746f6b656e206973206e6f74206265696e6720736f6c6420696e206560448201527f786368616e676520666f722074686520676976656e206572633230206164647260648201526265737360e81b608482015260a40161087d565b600085815260036020526040902054611a81906001600160a01b03168584613162565b600085815260036020526040812080546001600160a01b0319168155611aac91600290910190613328565b6000858152600360205260408120611ac991600190910190613328565b6001600160a01b038416611b2b57813414611b265760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682076616c756520746f20707572636861736500000000604482015260640161087d565b611cdd565b833415611ba05760405162461bcd60e51b815260206004820152603d60248201527f5061796d656e742063616e6e6f7420626520696e20455243323020616e64206e60448201527f61746976652063757272656e63792073696d756c74616e656f75736c79000000606482015260840161087d565b826001600160a01b0382166370a08231336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611bf5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c1991906137f5565b1015611c675760405162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f75676820746f6b656e2062616c616e63650000000000000000604482015260640161087d565b6040516323b872dd60e01b81526001600160a01b038216906323b872dd90611c9790339030908890600401613716565b6020604051808303816000875af1158015611cb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cda919061380e565b50505b6001546001600160a01b03166323b872dd3033886040518463ffffffff1660e01b8152600401611d0f93929190613716565b600060405180830381600087803b158015611d2957600080fd5b505af1158015611d3d573d6000803e3d6000fd5b505050507f2820044bbebd591ee7d08b7d81dd01945a1a32706da693a946e532d6d98842588583611d6b3390565b6040805193845260208401929092526001600160a01b0390811691830191909152861660608201526080015b60405180910390a150506006805460ff19169055505050565b6000611765824261176b565b6000818152600460205260408120546001600160a01b0316611e195760405162461bcd60e51b81526020600482015260166024820152752737ba1034b71022b733b634b9b41030bab1ba34b7b760511b604482015260640161087d565b50600090815260046020819052604090912001546001600160a01b031690565b60408051808201909152600080825260208201526040518060400160405280600360008681526020019081526020016000206001018481548110611e7f57611e7f6138ec565b60009182526020808320909101546001600160a01b031683528682526003815260409091206002018054929091019185908110611ebe57611ebe6138ec565b9060005260206000200154815250905092915050565b60065460ff1615611ef75760405162461bcd60e51b815260040161087d90613692565b6006805460ff1916600117905560008381526003602052604090205483906001600160a01b031615611f3b5760405162461bcd60e51b815260040161087d9061373a565b6000818152600460205260409020546001600160a01b031615611f705760405162461bcd60e51b815260040161087d90613771565b6000818152600560205260409020546001600160a01b031615611fa55760405162461bcd60e51b815260040161087d906137b4565b600a8211156120015760405162461bcd60e51b815260206004820152602260248201527f4f6e6c7920757020746f203130207072696365732061726520737570706f7274604482015261195960f21b606482015260840161087d565b8161205f5760405162461bcd60e51b815260206004820152602860248201527f4174206c65617374206f6e65207072696365206e6565647320746f20626520736044820152671c1958da599a595960c21b606482015260840161087d565b60008267ffffffffffffffff81111561207a5761207a613902565b6040519080825280602002602001820160405280156120a3578160200160208202803683370190505b50905060008367ffffffffffffffff8111156120c1576120c1613902565b6040519080825280602002602001820160405280156120ea578160200160208202803683370190505b50905060005b848110156121965785858281811061210a5761210a6138ec565b90506040020160200135838281518110612126576121266138ec565b602002602001018181525050858582818110612144576121446138ec565b61215a9260206040909202019081019150613481565b82828151811061216c5761216c6138ec565b6001600160a01b03909216602092830291909101909101528061218e81613892565b9150506120f0565b5060405180606001604052806121a93390565b6001600160a01b0390811682526020808301859052604092830186905260008a81526003825292909220835181546001600160a01b0319169216919091178155828201518051919261220392600185019290910190613346565b506040820151805161221f9160028401916020909101906133ab565b50506001546040516323b872dd60e01b81526001600160a01b0390911691506323b872dd9061225690339030908b90600401613716565b600060405180830381600087803b15801561227057600080fd5b505af1158015612284573d6000803e3d6000fd5b505050507fafd957a27dabb02c005cf2c48e458bacfd15516fa8a24a6949cffe77246c96b6866122b13390565b87876040516122c39493929190613918565b60405180910390a150506006805460ff1916905550505050565b60065460ff16156123005760405162461bcd60e51b815260040161087d90613692565b6006805460ff1916600117905560008181526005602052604090205481906001600160a01b03166123435760405162461bcd60e51b815260040161087d906136b2565b600061234e83611db0565b60008481526005602081905260409091209081015490549192506001600160a01b039081169161238091168284613162565b6001600160a01b03811661244557813410156123de5760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682076616c756520746f20707572636861736500000000604482015260640161087d565b6123e7846132d8565b6008546123f7919060ff166138ab565b6124019083613987565b34106124405760405162461bcd60e51b815260206004820152600e60248201526d0acc2d8eaca40e8dede40d0d2ced60931b604482015260640161087d565b6124bd565b6040516323b872dd60e01b815281906001600160a01b038216906323b872dd9061247790339030908890600401613716565b6020604051808303816000875af1158015612496573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ba919061380e565b50505b6001546001600160a01b03166323b872dd3033876040518463ffffffff1660e01b81526004016124ef93929190613716565b600060405180830381600087803b15801561250957600080fd5b505af115801561251d573d6000803e3d6000fd5b505050507fd5e0a00e684b5ac0d610aa122c88dc15f105eb97b17672a2243f27a72c35ada2848361254b3390565b6040805193845260208401929092526001600160a01b039081168383015284166060830152519081900360800190a16125838461312b565b50506006805460ff191690555050565b6000818152600360205260408120546001600160a01b03161515806125ce57506000828152600460205260409020546001600160a01b031615155b8061176557506000828152600560205260409020546001600160a01b03161515611765565b6000546001600160a01b0316331461261d5760405162461bcd60e51b815260040161087d9061385d565b60008160ff16116126705760405162461bcd60e51b815260206004820152601b60248201527f43616e2774207365742061206e65676174697665206e756d6265720000000000604482015260640161087d565b6008805460ff191660ff92909216919091179055565b6000818152600460205260408120546001600160a01b03166126e35760405162461bcd60e51b81526020600482015260166024820152752737ba1034b71022b733b634b9b41030bab1ba34b7b760511b604482015260640161087d565b5060009081526004602052604090206003015490565b60065460ff161561271c5760405162461bcd60e51b815260040161087d90613692565b6006805460ff1916600117905560008181526003602052604090205481906001600160a01b03166127895760405162461bcd60e51b8152602060048201526017602482015276151bdad95b881a5cc81b9bdd0818995a5b99c81cdbdb19604a1b604482015260640161087d565b6000828152600360205260409020546001600160a01b0316336001600160a01b0316146127c85760405162461bcd60e51b815260040161087d906136e9565b600082815260036020526040812080546001600160a01b03191681556127f391600290910190613328565b600082815260036020526040812061281091600190910190613328565b6001546001600160a01b03166323b872dd3033856040518463ffffffff1660e01b815260040161284293929190613716565b600060405180830381600087803b15801561285c57600080fd5b505af1158015612870573d6000803e3d6000fd5b505050507fc17a2000b952093a1b49de547dc3416f2a96f6d78da5b597d5ee0272b6be70e98261289d3390565b604080519283526001600160a01b0390911660208301520160405180910390a150506006805460ff19169055565b61012d831061291c5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920757020746f2033303020746f6b656e496473206174206f6e636500604482015260640161087d565b6040805160018082528183019092526000916020808301908036833750506040805160018082528183019092529293506000929150602080830190803683370190505090508382600081518110612975576129756138ec565b60200260200101906001600160a01b031690816001600160a01b03168152505082816000815181106129a9576129a96138ec565b60200260200101818152505060005b85811015612b6f5760405180606001604052806129d23390565b6001600160a01b031681526020018481526020018381525060036000898985818110612a0057612a006138ec565b6020908102929092013583525081810192909252604001600020825181546001600160a01b0319166001600160a01b039091161781558282015180519192612a5092600185019290910190613346565b5060408201518051612a6c9160028401916020909101906133ab565b50506001546001600160a01b031690506323b872dd33308a8a86818110612a9557612a956138ec565b905060200201356040518463ffffffff1660e01b8152600401612aba93929190613716565b600060405180830381600087803b158015612ad457600080fd5b505af1158015612ae8573d6000803e3d6000fd5b505050507fba587a003a03382ee7ee75dd449a3870489cd3c03f6d46892334a394f9a59417878783818110612b1f57612b1f6138ec565b90506020020135612b2d3390565b604080519283526001600160a01b039182166020840152908816908201526060810186905260800160405180910390a180612b6781613892565b9150506129b8565b50505050505050565b60065460ff1615612b9b5760405162461bcd60e51b815260040161087d90613692565b6006805460ff19166001179055612baf3390565b6000828152600460205260409020546001600160a01b03908116911614612be85760405162461bcd60e51b815260040161087d906136e9565b6000818152600460205260409020600201546001600160a01b031615612c655760405162461bcd60e51b815260206004820152602c60248201527f546865726520697320616c72656164792061206269642c2063616e277420636160448201526b6e63656c20616e796d6f726560a01b606482015260840161087d565b612c6e81613244565b6001546001600160a01b03166323b872dd3033846040518463ffffffff1660e01b8152600401612ca093929190613716565b600060405180830381600087803b158015612cba57600080fd5b505af1158015612cce573d6000803e3d6000fd5b505050507f147d5d7ecfdbd29514b2522e3081e72969244fa29e5146cef983d68925afb20281612cfb3390565b604080519283526001600160a01b0390911660208301520160405180910390a1506006805460ff19169055565b60065460ff1615612d4b5760405162461bcd60e51b815260040161087d90613692565b6006805460ff1916600117905560008281526004602052604090205482906001600160a01b0316612d8e5760405162461bcd60e51b815260040161087d906136b2565b6000818152600460205260409020600501544210612de25760405162461bcd60e51b8152602060048201526011602482015270105d58dd1a5bdb881a5cc818db1bdcd959607a1b604482015260640161087d565b60008381526004602081905260409091209081015460039091015433916001600160a01b031690841015612e515760405162461bcd60e51b8152602060048201526016602482015275084d2c840d2e640dcdee840d0d2ced040cadcdeeaced60531b604482015260640161087d565b6000858152600460205260409020600201546001600160a01b031615612ec657600085815260046020818152604080842060038101546002808301546001600160a01b039081168852908552838720929095015490941685529091528220805491929091612ec0908490613987565b90915550505b60008581526004602052604081206002810180546001600160a01b0319166001600160a01b0386161790556003810186905560068101546005909101805491929091612f13908490613987565b90915550506001600160a01b038116612f7a57833414612f755760405162461bcd60e51b815260206004820152601960248201527f56616c7565206e6f74206d61746368696e6720616d6f756e7400000000000000604482015260640161087d565b613050565b3415612fd85760405162461bcd60e51b815260206004820152602760248201527f4e6f206e65656420746f206164642076616c75652069662070616964207769746044820152660682045524332360cc1b606482015260840161087d565b6040516323b872dd60e01b815281906001600160a01b038216906323b872dd9061300a90869030908a90600401613716565b6020604051808303816000875af1158015613029573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061304d919061380e565b50505b604080518681526020810186905233918101919091527f0cd81e5ee1721d75e3eb18fa4051bc02cf82dc15bdc82295b611ed9f8fbbd78d90606001611d97565b6000546001600160a01b031633146130ba5760405162461bcd60e51b815260040161087d9061385d565b6001600160a01b03811661311f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161087d565b61312881613288565b50565b600090815260056020526040812080546001600160a01b031916815560018101829055600281018290556003810182905560040155565b60006127106007548361317591906138ab565b61317f91906138ca565b9050600061318d8284613846565b6001600160a01b0380871660009081526002602090815260408083209389168352929052908120805492935083929091906131c9908490613987565b90915550829050600260006131e66000546001600160a01b031690565b6001600160a01b03166001600160a01b031681526020019081526020016000206000866001600160a01b03166001600160a01b0316815260200190815260200160002060008282546132389190613987565b90915550505050505050565b600090815260046020526040812080546001600160a01b03199081168255600182018390556002820180549091169055600381018290556005810182905560060155565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815260056020526040812060038101546004909101546132fb9190613846565b6000838152600560205260409020600281015460019091015461331e9190613846565b61176591906138ca565b508054600082559060005260206000209081019061312891906133e6565b82805482825590600052602060002090810192821561339b579160200282015b8281111561339b57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613366565b506133a79291506133e6565b5090565b82805482825590600052602060002090810192821561339b579160200282015b8281111561339b5782518255916020019190600101906133cb565b5b808211156133a757600081556001016133e7565b60006020828403121561340d57600080fd5b5035919050565b80356001600160a01b038116811461342b57600080fd5b919050565b60008060008060008060c0878903121561344957600080fd5b863595506020870135945060408701359350606087013592506080870135915061347560a08801613414565b90509295509295509295565b60006020828403121561349357600080fd5b61349c82613414565b9392505050565b600080600080600060a086880312156134bb57600080fd5b853594506020860135935060408601359250606086013591506134e060808701613414565b90509295509295909350565b600080604083850312156134ff57600080fd5b8235915061350f60208401613414565b90509250929050565b6000806040838503121561352b57600080fd5b50508035926020909101359150565b60008060006040848603121561354f57600080fd5b83359250602084013567ffffffffffffffff8082111561356e57600080fd5b818601915086601f83011261358257600080fd5b81358181111561359157600080fd5b8760208260061b85010111156135a657600080fd5b6020830194508093505050509250925092565b6000602082840312156135cb57600080fd5b813560ff8116811461349c57600080fd5b600080604083850312156135ef57600080fd5b6135f883613414565b915061350f60208401613414565b6000806000806060858703121561361c57600080fd5b843567ffffffffffffffff8082111561363457600080fd5b818701915087601f83011261364857600080fd5b81358181111561365757600080fd5b8860208260051b850101111561366c57600080fd5b6020928301965094506136829187019050613414565b9396929550929360400135925050565b6020808252600690820152651b1bd8dad95960d21b604082015260600190565b6020808252601c908201527f546f6b656e206973206e6f74206265696e672061756374696f6e656400000000604082015260600190565b60208082526013908201527226bab9ba103132903a37b5b2b71037bbb732b960691b604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6020808252601b908201527f546f6b656e20697320616c7265616479206265696e6720736f6c640000000000604082015260600190565b60208082526023908201527f546f6b656e20697320616c726561647920696e20656e676c697368206175637460408201526234b7b760e91b606082015260800190565b60208082526021908201527f546f6b656e20697320616c726561647920696e2064757463682061756374696f6040820152603760f91b606082015260800190565b60006020828403121561380757600080fd5b5051919050565b60006020828403121561382057600080fd5b8151801515811461349c57600080fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561385857613858613830565b500390565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000600182016138a4576138a4613830565b5060010190565b60008160001904831182151516156138c5576138c5613830565b500290565b6000826138e757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8481526001600160a01b038481166020808401919091526060604080850182905290840185905260009286929160808601855b88811015613978578361395d87613414565b1682528585013585830152948201949082019060010161394b565b509a9950505050505050505050565b6000821982111561399a5761399a613830565b50019056fea2646970667358221220c6d621f22660b97706ae57a78e3726f2ab385c99b610d7602f82171538dd1d8d64736f6c634300080e0033000000000000000000000000aca298f5090dcd61f16484c0cb9652f1a9c4d2e1
Deployed Bytecode
0x6080604052600436106102045760003560e01c80638da5cb5b11610118578063bcbe11ae116100a0578063ddca3f431161006f578063ddca3f4314610726578063ded721701461073c578063e9736ce71461075c578063f2ab2fc01461076f578063f2fde38b1461080657600080fd5b8063bcbe11ae1461068e578063bd94b005146106ae578063c0314d27146106ce578063d0a9813d1461070657600080fd5b8063a04ade9a116100e7578063a04ade9a146105d9578063a16fb98614610605578063a355985514610618578063aad1e67c14610638578063bb3c34891461065857600080fd5b80638da5cb5b146104b25780638e8f869f146104d0578063909814a2146104f0578063974f372a1461052857600080fd5b806369fe0e2d1161019b5780637845c3a51161016a5780637845c3a5146103fb5780637deb60251461041b57806385d4efc41461042e57806385ee76aa1461044e5780638aab42741461046e57600080fd5b806369fe0e2d146103865780636ac901f1146103a6578063715018a6146103c657806376469bd7146103db57600080fd5b806351cff8d9116101d757806351cff8d9146102d057806359546bbb146102f05780635b09303f146103105780635d5cd80c1461034e57600080fd5b80630a8ccf41146102095780634a0b1d10146102465780634a4e1d12146102685780634a59745014610288575b600080fd5b34801561021557600080fd5b506102296102243660046133fb565b610826565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561025257600080fd5b506102666102613660046133fb565b6108a6565b005b34801561027457600080fd5b50610266610283366004613430565b610a90565b34801561029457600080fd5b506102c06102a33660046133fb565b6000908152600460205260409020546001600160a01b0316151590565b604051901515815260200161023d565b3480156102dc57600080fd5b506102666102eb366004613481565b610d8c565b3480156102fc57600080fd5b5061026661030b3660046134a3565b61108f565b34801561031c57600080fd5b5061034061032b3660046133fb565b60009081526003602052604090206002015490565b60405190815260200161023d565b34801561035a57600080fd5b506102c06103693660046133fb565b6000908152600360205260409020546001600160a01b0316151590565b34801561039257600080fd5b506102666103a13660046133fb565b611317565b3480156103b257600080fd5b506102666103c13660046133fb565b611398565b3480156103d257600080fd5b50610266611618565b3480156103e757600080fd5b506103406103f63660046134ec565b61164e565b34801561040757600080fd5b50610340610416366004613518565b61176b565b6102666104293660046134ec565b61189f565b34801561043a57600080fd5b506103406104493660046133fb565b611db0565b34801561045a57600080fd5b506102296104693660046133fb565b611dbc565b34801561047a57600080fd5b5061048e610489366004613518565b611e39565b6040805182516001600160a01b03168152602092830151928101929092520161023d565b3480156104be57600080fd5b506000546001600160a01b0316610229565b3480156104dc57600080fd5b506102666104eb36600461353a565b611ed4565b3480156104fc57600080fd5b506102c061050b3660046133fb565b6000908152600560205260409020546001600160a01b0316151590565b34801561053457600080fd5b5061058e6105433660046133fb565b600460208190526000918252604090912080546001820154600283015460038401549484015460058501546006909501546001600160a01b0394851696939592851694909116919087565b604080516001600160a01b0398891681526020810197909752948716948601949094526060850192909252909316608083015260a082019290925260c081019190915260e00161023d565b3480156105e557600080fd5b506008546105f39060ff1681565b60405160ff909116815260200161023d565b6102666106133660046133fb565b6122dd565b34801561062457600080fd5b506102c06106333660046133fb565b612593565b34801561064457600080fd5b506102666106533660046135b9565b6125f3565b34801561066457600080fd5b506102296106733660046133fb565b6000908152600360205260409020546001600160a01b031690565b34801561069a57600080fd5b506103406106a93660046133fb565b612686565b3480156106ba57600080fd5b506102666106c93660046133fb565b6126f9565b3480156106da57600080fd5b506103406106e93660046135dc565b600260209081526000928352604080842090915290825290205481565b34801561071257600080fd5b50610266610721366004613606565b6128cb565b34801561073257600080fd5b5061034060075481565b34801561074857600080fd5b506102666107573660046133fb565b612b78565b61026661076a366004613518565b612d28565b34801561077b57600080fd5b506107ca61078a3660046133fb565b60056020819052600091825260409091208054600182015460028301546003840154600485015494909501546001600160a01b0393841695929491931686565b604080516001600160a01b03978816815260208101969096528501939093526060840191909152608083015290911660a082015260c00161023d565b34801561081257600080fd5b50610266610821366004613481565b613090565b6000818152600560205260408120546001600160a01b03166108865760405162461bcd60e51b81526020600482015260146024820152732737ba1034b710223aba31b41030bab1ba34b7b760611b60448201526064015b60405180910390fd5b50600090815260056020819052604090912001546001600160a01b031690565b60065460ff16156108c95760405162461bcd60e51b815260040161087d90613692565b6006805460ff1916600117905560008181526005602052604090205481906001600160a01b031661090c5760405162461bcd60e51b815260040161087d906136b2565b60008281526005602052604090206004015442101561096d5760405162461bcd60e51b815260206004820152601960248201527f41756374696f6e20686173206e6f7420656e6465642079657400000000000000604482015260640161087d565b6000828152600560205260409020546001600160a01b0316336001600160a01b0316146109ac5760405162461bcd60e51b815260040161087d906136e9565b6000828152600560209081526040918290205482518581526001600160a01b03909116918101919091527f888d61faf770957191082b77408622223da5ded1a327d2ca5e1f7050a6cbb83d910160405180910390a1600154600083815260056020526040908190205490516323b872dd60e01b81526001600160a01b03928316926323b872dd92610a47923092909116908790600401613716565b600060405180830381600087803b158015610a6157600080fd5b505af1158015610a75573d6000803e3d6000fd5b50505050610a828261312b565b50506006805460ff19169055565b60065460ff1615610ab35760405162461bcd60e51b815260040161087d90613692565b6006805460ff1916600117905560008681526003602052604090205486906001600160a01b031615610af75760405162461bcd60e51b815260040161087d9061373a565b6000818152600460205260409020546001600160a01b031615610b2c5760405162461bcd60e51b815260040161087d90613771565b6000818152600560205260409020546001600160a01b031615610b615760405162461bcd60e51b815260040161087d906137b4565b848611610bbc5760405162461bcd60e51b8152602060048201526024808201527f50726963652068617320746f2062652064656372656173696e6720776974682060448201526374696d6560e01b606482015260840161087d565b828410610c0b5760405162461bcd60e51b815260206004820152601960248201527f456e642068617320746f20626520616674657220737461727400000000000000604482015260640161087d565b6040518060c00160405280610c1d3390565b6001600160a01b03908116825260208083018a905260408084018a905260608085018a905260808086018a905288851660a09687015260008e8152600580865290849020885181549088166001600160a01b031991821617825595890151600180830191909155948901516002820155928801516003840155908701516004830155959094015193909401805493831693909116929092179091559054166323b872dd610cc73390565b308a6040518463ffffffff1660e01b8152600401610ce793929190613716565b600060405180830381600087803b158015610d0157600080fd5b505af1158015610d15573d6000803e3d6000fd5b5050604080518a8152602081018a905290810188905260608101879052608081018690526001600160a01b03851660a08201527ffa560a0cfdeef5db234b06bc19928a5140c05e9b47ee6acc856075742cbdb54c925060c00190505b60405180910390a150506006805460ff191690555050505050565b60065460ff1615610daf5760405162461bcd60e51b815260040161087d90613692565b6006805460ff191660011790556000610dc53390565b6001600160a01b0380821660009081526002602090815260408083209387168352929052205490915080610e315760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b604482015260640161087d565b6001600160a01b03808316600090815260026020908152604080832093871680845293909152812055610f07576000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610eab576040519150601f19603f3d011682016040523d82523d6000602084013e610eb0565b606091505b5050905080610f015760405162461bcd60e51b815260206004820181905260248201527f4e6174697665207061796d656e7420746f2061646472657373206661696c6564604482015260640161087d565b50611037565b6040516370a0823160e01b8152306004820152839082906001600160a01b038316906370a0823190602401602060405180830381865afa158015610f4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7391906137f5565b1015610fc15760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682066756e647320696e20636f6e747261637400000000604482015260640161087d565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526024820184905282169063a9059cbb906044016020604051808303816000875af1158015611010573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611034919061380e565b50505b604080516001600160a01b0385811682526020820184905284168183015290517e1a143d5b175701cb3246058ffac3d63945192075a926ff73a19930f09d587a9181900360600190a150506006805460ff1916905550565b60065460ff16156110b25760405162461bcd60e51b815260040161087d90613692565b6006805460ff1916600117905560008581526003602052604090205485906001600160a01b0316156110f65760405162461bcd60e51b815260040161087d9061373a565b6000818152600460205260409020546001600160a01b03161561112b5760405162461bcd60e51b815260040161087d90613771565b6000818152600560205260409020546001600160a01b0316156111605760405162461bcd60e51b815260040161087d906137b4565b6000851561117857611173600187613846565b61117b565b60005b90506040518060e0016040528061118f3390565b6001600160a01b03908116825260208083018a905260006040808501829052606080860188905289851660808088019190915260a08088018e905260c09788018d90528f8552600480875294849020895181549089166001600160a01b0319918216178255968a0151600180830191909155948a0151600282018054918a16918916919091179055928901516003840155908801519382018054948716949095169390931790935590850151600583015593909201516006909201919091559054166323b872dd61125d3390565b308a6040518463ffffffff1660e01b815260040161127d93929190613716565b600060405180830381600087803b15801561129757600080fd5b505af11580156112ab573d6000803e3d6000fd5b505050507fb89622be8a147d27b840fbf91804afdd101c8f9457f6812d94a6fb2dded63c3f87876112d93390565b6040805193845260208401929092526001600160a01b0390811691830191909152851660608201526080810187905260a0810186905260c001610d71565b6000546001600160a01b031633146113415760405162461bcd60e51b815260040161087d9061385d565b6127108111156113935760405162461bcd60e51b815260206004820181905260248201527f43616e277420736574206120666565206c6172676572207468616e2031303025604482015260640161087d565b600755565b60065460ff16156113bb5760405162461bcd60e51b815260040161087d90613692565b6006805460ff191660011790556000818152600460205260409020546001600160a01b03166113fc5760405162461bcd60e51b815260040161087d906136b2565b6000818152600460205260409020600501544210158061143b57506000818152600460205260409020546001600160a01b0316336001600160a01b0316145b6114a65760405162461bcd60e51b815260206004820152603660248201527f4f6e6c7920746865206f776e65722063616e2066696e616c697a652074686520604482015275185d58dd1a5bdb881899599bdc99481a5d1cc8195b9960521b606482015260840161087d565b6000818152600460205260409020600201546001600160a01b03166115045760405162461bcd60e51b81526020600482015260146024820152734e6f2062696420686173206265656e206d61646560601b604482015260640161087d565b6000818152600460208190526040909120600381015481549190920154611538916001600160a01b03908116911683613162565b6001546000838152600460208190526040918290206002015491516323b872dd60e01b81526001600160a01b03938416936323b872dd936115829330939190921691889101613716565b600060405180830381600087803b15801561159c57600080fd5b505af11580156115b0573d6000803e3d6000fd5b5050506000838152600460209081526040918290206002015482518681529182018590526001600160a01b03168183015290517f5313e23c79232349366af8a1b8e877da2b9f12c9643272114c0af1210d46ad3d92509081900360600190a1610a8282613244565b6000546001600160a01b031633146116425760405162461bcd60e51b815260040161087d9061385d565b61164c6000613288565b565b6000828152600360205260408120546001600160a01b03166116a15760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420666f722073616c6560a01b604482015260640161087d565b6000805b60008581526003602052604090206002015481101561170a5760006116ca8683611e39565b905080600001516001600160a01b0316856001600160a01b0316036116f757602001519250611765915050565b508061170281613892565b9150506116a5565b5060405162461bcd60e51b815260206004820152602960248201527f4974656d206973206e6f7420666f722073616c6520666f722074686973204552604482015268219918103a37b5b2b760b91b606482015260840161087d565b92915050565b60008281526005602052604081205483906001600160a01b03166117a15760405162461bcd60e51b815260040161087d906136b2565b60008481526005602052604090206003015483116117d2576000848152600560205260409020600101549150611898565b6000848152600560205260409020600401548310611803576000848152600560205260409020600201549150611898565b600084815260056020526040902060038101546004909101546118269190613846565b600085815260056020526040902060028101546001909101546118499190613846565b6000868152600560205260409020600301546118659086613846565b61186f91906138ab565b61187991906138ca565b6000858152600560205260409020600101546118959190613846565b91505b5092915050565b60065460ff16156118c25760405162461bcd60e51b815260040161087d90613692565b6006805460ff1916600117905560008281526003602052604090205482906001600160a01b031661192f5760405162461bcd60e51b8152602060048201526017602482015276151bdad95b881a5cc81b9bdd0818995a5b99c81cdbdb19604a1b604482015260640161087d565b60008060005b6000868152600360205260409020600101548110156119de57600086815260036020526040902060010180546001600160a01b03871691908390811061197d5761197d6138ec565b6000918252602090912001546001600160a01b0316036119cc576000868152600360205260409020600201805460019350829081106119be576119be6138ec565b906000526020600020015492505b806119d681613892565b915050611935565b5080611a5e5760405162461bcd60e51b815260206004820152604360248201527f54686520746f6b656e206973206e6f74206265696e6720736f6c6420696e206560448201527f786368616e676520666f722074686520676976656e206572633230206164647260648201526265737360e81b608482015260a40161087d565b600085815260036020526040902054611a81906001600160a01b03168584613162565b600085815260036020526040812080546001600160a01b0319168155611aac91600290910190613328565b6000858152600360205260408120611ac991600190910190613328565b6001600160a01b038416611b2b57813414611b265760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682076616c756520746f20707572636861736500000000604482015260640161087d565b611cdd565b833415611ba05760405162461bcd60e51b815260206004820152603d60248201527f5061796d656e742063616e6e6f7420626520696e20455243323020616e64206e60448201527f61746976652063757272656e63792073696d756c74616e656f75736c79000000606482015260840161087d565b826001600160a01b0382166370a08231336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611bf5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c1991906137f5565b1015611c675760405162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f75676820746f6b656e2062616c616e63650000000000000000604482015260640161087d565b6040516323b872dd60e01b81526001600160a01b038216906323b872dd90611c9790339030908890600401613716565b6020604051808303816000875af1158015611cb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cda919061380e565b50505b6001546001600160a01b03166323b872dd3033886040518463ffffffff1660e01b8152600401611d0f93929190613716565b600060405180830381600087803b158015611d2957600080fd5b505af1158015611d3d573d6000803e3d6000fd5b505050507f2820044bbebd591ee7d08b7d81dd01945a1a32706da693a946e532d6d98842588583611d6b3390565b6040805193845260208401929092526001600160a01b0390811691830191909152861660608201526080015b60405180910390a150506006805460ff19169055505050565b6000611765824261176b565b6000818152600460205260408120546001600160a01b0316611e195760405162461bcd60e51b81526020600482015260166024820152752737ba1034b71022b733b634b9b41030bab1ba34b7b760511b604482015260640161087d565b50600090815260046020819052604090912001546001600160a01b031690565b60408051808201909152600080825260208201526040518060400160405280600360008681526020019081526020016000206001018481548110611e7f57611e7f6138ec565b60009182526020808320909101546001600160a01b031683528682526003815260409091206002018054929091019185908110611ebe57611ebe6138ec565b9060005260206000200154815250905092915050565b60065460ff1615611ef75760405162461bcd60e51b815260040161087d90613692565b6006805460ff1916600117905560008381526003602052604090205483906001600160a01b031615611f3b5760405162461bcd60e51b815260040161087d9061373a565b6000818152600460205260409020546001600160a01b031615611f705760405162461bcd60e51b815260040161087d90613771565b6000818152600560205260409020546001600160a01b031615611fa55760405162461bcd60e51b815260040161087d906137b4565b600a8211156120015760405162461bcd60e51b815260206004820152602260248201527f4f6e6c7920757020746f203130207072696365732061726520737570706f7274604482015261195960f21b606482015260840161087d565b8161205f5760405162461bcd60e51b815260206004820152602860248201527f4174206c65617374206f6e65207072696365206e6565647320746f20626520736044820152671c1958da599a595960c21b606482015260840161087d565b60008267ffffffffffffffff81111561207a5761207a613902565b6040519080825280602002602001820160405280156120a3578160200160208202803683370190505b50905060008367ffffffffffffffff8111156120c1576120c1613902565b6040519080825280602002602001820160405280156120ea578160200160208202803683370190505b50905060005b848110156121965785858281811061210a5761210a6138ec565b90506040020160200135838281518110612126576121266138ec565b602002602001018181525050858582818110612144576121446138ec565b61215a9260206040909202019081019150613481565b82828151811061216c5761216c6138ec565b6001600160a01b03909216602092830291909101909101528061218e81613892565b9150506120f0565b5060405180606001604052806121a93390565b6001600160a01b0390811682526020808301859052604092830186905260008a81526003825292909220835181546001600160a01b0319169216919091178155828201518051919261220392600185019290910190613346565b506040820151805161221f9160028401916020909101906133ab565b50506001546040516323b872dd60e01b81526001600160a01b0390911691506323b872dd9061225690339030908b90600401613716565b600060405180830381600087803b15801561227057600080fd5b505af1158015612284573d6000803e3d6000fd5b505050507fafd957a27dabb02c005cf2c48e458bacfd15516fa8a24a6949cffe77246c96b6866122b13390565b87876040516122c39493929190613918565b60405180910390a150506006805460ff1916905550505050565b60065460ff16156123005760405162461bcd60e51b815260040161087d90613692565b6006805460ff1916600117905560008181526005602052604090205481906001600160a01b03166123435760405162461bcd60e51b815260040161087d906136b2565b600061234e83611db0565b60008481526005602081905260409091209081015490549192506001600160a01b039081169161238091168284613162565b6001600160a01b03811661244557813410156123de5760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682076616c756520746f20707572636861736500000000604482015260640161087d565b6123e7846132d8565b6008546123f7919060ff166138ab565b6124019083613987565b34106124405760405162461bcd60e51b815260206004820152600e60248201526d0acc2d8eaca40e8dede40d0d2ced60931b604482015260640161087d565b6124bd565b6040516323b872dd60e01b815281906001600160a01b038216906323b872dd9061247790339030908890600401613716565b6020604051808303816000875af1158015612496573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ba919061380e565b50505b6001546001600160a01b03166323b872dd3033876040518463ffffffff1660e01b81526004016124ef93929190613716565b600060405180830381600087803b15801561250957600080fd5b505af115801561251d573d6000803e3d6000fd5b505050507fd5e0a00e684b5ac0d610aa122c88dc15f105eb97b17672a2243f27a72c35ada2848361254b3390565b6040805193845260208401929092526001600160a01b039081168383015284166060830152519081900360800190a16125838461312b565b50506006805460ff191690555050565b6000818152600360205260408120546001600160a01b03161515806125ce57506000828152600460205260409020546001600160a01b031615155b8061176557506000828152600560205260409020546001600160a01b03161515611765565b6000546001600160a01b0316331461261d5760405162461bcd60e51b815260040161087d9061385d565b60008160ff16116126705760405162461bcd60e51b815260206004820152601b60248201527f43616e2774207365742061206e65676174697665206e756d6265720000000000604482015260640161087d565b6008805460ff191660ff92909216919091179055565b6000818152600460205260408120546001600160a01b03166126e35760405162461bcd60e51b81526020600482015260166024820152752737ba1034b71022b733b634b9b41030bab1ba34b7b760511b604482015260640161087d565b5060009081526004602052604090206003015490565b60065460ff161561271c5760405162461bcd60e51b815260040161087d90613692565b6006805460ff1916600117905560008181526003602052604090205481906001600160a01b03166127895760405162461bcd60e51b8152602060048201526017602482015276151bdad95b881a5cc81b9bdd0818995a5b99c81cdbdb19604a1b604482015260640161087d565b6000828152600360205260409020546001600160a01b0316336001600160a01b0316146127c85760405162461bcd60e51b815260040161087d906136e9565b600082815260036020526040812080546001600160a01b03191681556127f391600290910190613328565b600082815260036020526040812061281091600190910190613328565b6001546001600160a01b03166323b872dd3033856040518463ffffffff1660e01b815260040161284293929190613716565b600060405180830381600087803b15801561285c57600080fd5b505af1158015612870573d6000803e3d6000fd5b505050507fc17a2000b952093a1b49de547dc3416f2a96f6d78da5b597d5ee0272b6be70e98261289d3390565b604080519283526001600160a01b0390911660208301520160405180910390a150506006805460ff19169055565b61012d831061291c5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920757020746f2033303020746f6b656e496473206174206f6e636500604482015260640161087d565b6040805160018082528183019092526000916020808301908036833750506040805160018082528183019092529293506000929150602080830190803683370190505090508382600081518110612975576129756138ec565b60200260200101906001600160a01b031690816001600160a01b03168152505082816000815181106129a9576129a96138ec565b60200260200101818152505060005b85811015612b6f5760405180606001604052806129d23390565b6001600160a01b031681526020018481526020018381525060036000898985818110612a0057612a006138ec565b6020908102929092013583525081810192909252604001600020825181546001600160a01b0319166001600160a01b039091161781558282015180519192612a5092600185019290910190613346565b5060408201518051612a6c9160028401916020909101906133ab565b50506001546001600160a01b031690506323b872dd33308a8a86818110612a9557612a956138ec565b905060200201356040518463ffffffff1660e01b8152600401612aba93929190613716565b600060405180830381600087803b158015612ad457600080fd5b505af1158015612ae8573d6000803e3d6000fd5b505050507fba587a003a03382ee7ee75dd449a3870489cd3c03f6d46892334a394f9a59417878783818110612b1f57612b1f6138ec565b90506020020135612b2d3390565b604080519283526001600160a01b039182166020840152908816908201526060810186905260800160405180910390a180612b6781613892565b9150506129b8565b50505050505050565b60065460ff1615612b9b5760405162461bcd60e51b815260040161087d90613692565b6006805460ff19166001179055612baf3390565b6000828152600460205260409020546001600160a01b03908116911614612be85760405162461bcd60e51b815260040161087d906136e9565b6000818152600460205260409020600201546001600160a01b031615612c655760405162461bcd60e51b815260206004820152602c60248201527f546865726520697320616c72656164792061206269642c2063616e277420636160448201526b6e63656c20616e796d6f726560a01b606482015260840161087d565b612c6e81613244565b6001546001600160a01b03166323b872dd3033846040518463ffffffff1660e01b8152600401612ca093929190613716565b600060405180830381600087803b158015612cba57600080fd5b505af1158015612cce573d6000803e3d6000fd5b505050507f147d5d7ecfdbd29514b2522e3081e72969244fa29e5146cef983d68925afb20281612cfb3390565b604080519283526001600160a01b0390911660208301520160405180910390a1506006805460ff19169055565b60065460ff1615612d4b5760405162461bcd60e51b815260040161087d90613692565b6006805460ff1916600117905560008281526004602052604090205482906001600160a01b0316612d8e5760405162461bcd60e51b815260040161087d906136b2565b6000818152600460205260409020600501544210612de25760405162461bcd60e51b8152602060048201526011602482015270105d58dd1a5bdb881a5cc818db1bdcd959607a1b604482015260640161087d565b60008381526004602081905260409091209081015460039091015433916001600160a01b031690841015612e515760405162461bcd60e51b8152602060048201526016602482015275084d2c840d2e640dcdee840d0d2ced040cadcdeeaced60531b604482015260640161087d565b6000858152600460205260409020600201546001600160a01b031615612ec657600085815260046020818152604080842060038101546002808301546001600160a01b039081168852908552838720929095015490941685529091528220805491929091612ec0908490613987565b90915550505b60008581526004602052604081206002810180546001600160a01b0319166001600160a01b0386161790556003810186905560068101546005909101805491929091612f13908490613987565b90915550506001600160a01b038116612f7a57833414612f755760405162461bcd60e51b815260206004820152601960248201527f56616c7565206e6f74206d61746368696e6720616d6f756e7400000000000000604482015260640161087d565b613050565b3415612fd85760405162461bcd60e51b815260206004820152602760248201527f4e6f206e65656420746f206164642076616c75652069662070616964207769746044820152660682045524332360cc1b606482015260840161087d565b6040516323b872dd60e01b815281906001600160a01b038216906323b872dd9061300a90869030908a90600401613716565b6020604051808303816000875af1158015613029573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061304d919061380e565b50505b604080518681526020810186905233918101919091527f0cd81e5ee1721d75e3eb18fa4051bc02cf82dc15bdc82295b611ed9f8fbbd78d90606001611d97565b6000546001600160a01b031633146130ba5760405162461bcd60e51b815260040161087d9061385d565b6001600160a01b03811661311f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161087d565b61312881613288565b50565b600090815260056020526040812080546001600160a01b031916815560018101829055600281018290556003810182905560040155565b60006127106007548361317591906138ab565b61317f91906138ca565b9050600061318d8284613846565b6001600160a01b0380871660009081526002602090815260408083209389168352929052908120805492935083929091906131c9908490613987565b90915550829050600260006131e66000546001600160a01b031690565b6001600160a01b03166001600160a01b031681526020019081526020016000206000866001600160a01b03166001600160a01b0316815260200190815260200160002060008282546132389190613987565b90915550505050505050565b600090815260046020526040812080546001600160a01b03199081168255600182018390556002820180549091169055600381018290556005810182905560060155565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815260056020526040812060038101546004909101546132fb9190613846565b6000838152600560205260409020600281015460019091015461331e9190613846565b61176591906138ca565b508054600082559060005260206000209081019061312891906133e6565b82805482825590600052602060002090810192821561339b579160200282015b8281111561339b57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613366565b506133a79291506133e6565b5090565b82805482825590600052602060002090810192821561339b579160200282015b8281111561339b5782518255916020019190600101906133cb565b5b808211156133a757600081556001016133e7565b60006020828403121561340d57600080fd5b5035919050565b80356001600160a01b038116811461342b57600080fd5b919050565b60008060008060008060c0878903121561344957600080fd5b863595506020870135945060408701359350606087013592506080870135915061347560a08801613414565b90509295509295509295565b60006020828403121561349357600080fd5b61349c82613414565b9392505050565b600080600080600060a086880312156134bb57600080fd5b853594506020860135935060408601359250606086013591506134e060808701613414565b90509295509295909350565b600080604083850312156134ff57600080fd5b8235915061350f60208401613414565b90509250929050565b6000806040838503121561352b57600080fd5b50508035926020909101359150565b60008060006040848603121561354f57600080fd5b83359250602084013567ffffffffffffffff8082111561356e57600080fd5b818601915086601f83011261358257600080fd5b81358181111561359157600080fd5b8760208260061b85010111156135a657600080fd5b6020830194508093505050509250925092565b6000602082840312156135cb57600080fd5b813560ff8116811461349c57600080fd5b600080604083850312156135ef57600080fd5b6135f883613414565b915061350f60208401613414565b6000806000806060858703121561361c57600080fd5b843567ffffffffffffffff8082111561363457600080fd5b818701915087601f83011261364857600080fd5b81358181111561365757600080fd5b8860208260051b850101111561366c57600080fd5b6020928301965094506136829187019050613414565b9396929550929360400135925050565b6020808252600690820152651b1bd8dad95960d21b604082015260600190565b6020808252601c908201527f546f6b656e206973206e6f74206265696e672061756374696f6e656400000000604082015260600190565b60208082526013908201527226bab9ba103132903a37b5b2b71037bbb732b960691b604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6020808252601b908201527f546f6b656e20697320616c7265616479206265696e6720736f6c640000000000604082015260600190565b60208082526023908201527f546f6b656e20697320616c726561647920696e20656e676c697368206175637460408201526234b7b760e91b606082015260800190565b60208082526021908201527f546f6b656e20697320616c726561647920696e2064757463682061756374696f6040820152603760f91b606082015260800190565b60006020828403121561380757600080fd5b5051919050565b60006020828403121561382057600080fd5b8151801515811461349c57600080fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561385857613858613830565b500390565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000600182016138a4576138a4613830565b5060010190565b60008160001904831182151516156138c5576138c5613830565b500290565b6000826138e757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8481526001600160a01b038481166020808401919091526060604080850182905290840185905260009286929160808601855b88811015613978578361395d87613414565b1682528585013585830152948201949082019060010161394b565b509a9950505050505050505050565b6000821982111561399a5761399a613830565b50019056fea2646970667358221220c6d621f22660b97706ae57a78e3726f2ab385c99b610d7602f82171538dd1d8d64736f6c634300080e0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000aca298f5090dcd61f16484c0cb9652f1a9c4d2e1
-----Decoded View---------------
Arg [0] : _nftContract (address): 0xaCA298F5090Dcd61F16484C0Cb9652f1a9C4D2E1
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000aca298f5090dcd61f16484c0cb9652f1a9c4d2e1
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.