Sepolia Testnet

Contract

0x06dcF18f0E31DA9DED2b299e9e76Dd7FC34994fD

Overview

ETH Balance

0.0661 ETH

Token Holdings

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Place Bid63323092024-07-18 8:50:002 days ago1721292600IN
0x06dcF18f...FC34994fD
0.0014 ETH0.0079864713.53402729
Place Bid63322992024-07-18 8:47:242 days ago1721292444IN
0x06dcF18f...FC34994fD
0.0013 ETH0.0082409313.96524357
Place Bid63322902024-07-18 8:44:242 days ago1721292264IN
0x06dcF18f...FC34994fD
0.0012 ETH0.0064452210.92220478
Place Bid63322782024-07-18 8:41:482 days ago1721292108IN
0x06dcF18f...FC34994fD
0.0011 ETH0.0068513611.61044884
Place Bid63322702024-07-18 8:40:122 days ago1721292012IN
0x06dcF18f...FC34994fD
0.001 ETH0.0079051913.39630531
Place Bid63322582024-07-18 8:37:362 days ago1721291856IN
0x06dcF18f...FC34994fD
0.0009 ETH0.0066562111.27974712
Place Bid63322512024-07-18 8:35:242 days ago1721291724IN
0x06dcF18f...FC34994fD
0.0008 ETH0.0061656610.44846119
Place Bid63322392024-07-18 8:32:482 days ago1721291568IN
0x06dcF18f...FC34994fD
0.0007 ETH0.0062872110.65443396
Place Bid63322322024-07-18 8:31:242 days ago1721291484IN
0x06dcF18f...FC34994fD
0.0006 ETH0.0076445312.9545747
Place Bid63322212024-07-18 8:28:482 days ago1721291328IN
0x06dcF18f...FC34994fD
0.0005 ETH0.0079285813.43593048
Place Bid63322122024-07-18 8:26:482 days ago1721291208IN
0x06dcF18f...FC34994fD
0.0004 ETH0.0086367314.22380825
Place Bid63321992024-07-18 8:23:482 days ago1721291028IN
0x06dcF18f...FC34994fD
0.0003 ETH0.0086157714.18927855
Place Bid63321902024-07-18 8:21:362 days ago1721290896IN
0x06dcF18f...FC34994fD
0.0002 ETH0.0057541615.94208494
Create Auction63321742024-07-18 8:18:122 days ago1721290692IN
0x06dcF18f...FC34994fD
0 ETH0.0069266916.96850153
Settle Auction63321542024-07-18 8:13:482 days ago1721290428IN
0x06dcF18f...FC34994fD
0 ETH0.0027250218.23418065
Update Expiry Da...63321492024-07-18 8:12:242 days ago1721290344IN
0x06dcF18f...FC34994fD
0 ETH0.0004649514.91970552
Place Bid63307832024-07-18 2:29:363 days ago1721269776IN
0x06dcF18f...FC34994fD
0.0009 ETH0.000901641.52795172
Place Bid63307762024-07-18 2:27:483 days ago1721269668IN
0x06dcF18f...FC34994fD
0.0008 ETH0.000894751.51626727
Place Bid63307442024-07-18 2:19:123 days ago1721269152IN
0x06dcF18f...FC34994fD
0.0007 ETH0.00092491.52322362
Place Bid63307322024-07-18 2:16:003 days ago1721268960IN
0x06dcF18f...FC34994fD
0.0006 ETH0.000950671.5227842
Place Bid63306792024-07-18 2:03:363 days ago1721268216IN
0x06dcF18f...FC34994fD
0.0004 ETH0.000948381.51911689
Place Bid63306602024-07-18 1:59:243 days ago1721267964IN
0x06dcF18f...FC34994fD
0.0002 ETH0.000573951.51822764
Create Auction63306552024-07-18 1:58:123 days ago1721267892IN
0x06dcF18f...FC34994fD
0 ETH0.000619571.51779071
Place Bid63273182024-07-17 12:26:003 days ago1721219160IN
0x06dcF18f...FC34994fD
0.0006 ETH0.0051294614.47297566
Place Bid63273132024-07-17 12:25:003 days ago1721219100IN
0x06dcF18f...FC34994fD
0.0004 ETH0.0047927214.27320293
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
63323092024-07-18 8:50:002 days ago1721292600
0x06dcF18f...FC34994fD
0.0013 ETH
63322992024-07-18 8:47:242 days ago1721292444
0x06dcF18f...FC34994fD
0.0012 ETH
63322902024-07-18 8:44:242 days ago1721292264
0x06dcF18f...FC34994fD
0.0011 ETH
63322782024-07-18 8:41:482 days ago1721292108
0x06dcF18f...FC34994fD
0.001 ETH
63322702024-07-18 8:40:122 days ago1721292012
0x06dcF18f...FC34994fD
0.0009 ETH
63322582024-07-18 8:37:362 days ago1721291856
0x06dcF18f...FC34994fD
0.0008 ETH
63322512024-07-18 8:35:242 days ago1721291724
0x06dcF18f...FC34994fD
0.0007 ETH
63322392024-07-18 8:32:482 days ago1721291568
0x06dcF18f...FC34994fD
0.0006 ETH
63322322024-07-18 8:31:242 days ago1721291484
0x06dcF18f...FC34994fD
0.0005 ETH
63322212024-07-18 8:28:482 days ago1721291328
0x06dcF18f...FC34994fD
0.0004 ETH
63322122024-07-18 8:26:482 days ago1721291208
0x06dcF18f...FC34994fD
0.0003 ETH
63321992024-07-18 8:23:482 days ago1721291028
0x06dcF18f...FC34994fD
0.0002 ETH
63321542024-07-18 8:13:482 days ago1721290428
0x06dcF18f...FC34994fD
0.0009 ETH
63307832024-07-18 2:29:363 days ago1721269776
0x06dcF18f...FC34994fD
0.0008 ETH
63307762024-07-18 2:27:483 days ago1721269668
0x06dcF18f...FC34994fD
0.0007 ETH
63307442024-07-18 2:19:123 days ago1721269152
0x06dcF18f...FC34994fD
0.0006 ETH
63307322024-07-18 2:16:003 days ago1721268960
0x06dcF18f...FC34994fD
0.0004 ETH
63306792024-07-18 2:03:363 days ago1721268216
0x06dcF18f...FC34994fD
0.0002 ETH
63186062024-07-16 2:32:125 days ago1721097132
0x06dcF18f...FC34994fD
0.0002 ETH
63186002024-07-16 2:31:005 days ago1721097060
0x06dcF18f...FC34994fD
0.0001 ETH
62956052024-07-12 10:00:008 days ago1720778400
0x06dcF18f...FC34994fD
0.0009 ETH
62951362024-07-12 8:18:368 days ago1720772316
0x06dcF18f...FC34994fD
0.0009 ETH
62951362024-07-12 8:18:368 days ago1720772316
0x06dcF18f...FC34994fD
0.0003 ETH
62950782024-07-12 8:06:248 days ago1720771584
0x06dcF18f...FC34994fD
0.0004 ETH
62947602024-07-12 6:58:248 days ago1720767504
0x06dcF18f...FC34994fD
0.0004 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DollAuction

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
london EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 9 : Contract.sol
// SPDX-License-Identifier: MIT
pragma solidity >= 0.8.0 < 0.9.0;
pragma abicoder v2;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";


/**
 * @title NFT Auction Market
 * Sellers can choose a minimum, starting bid, an expiry time when the auction ends
 * Before creating an auction the seller has to approve this contract for the respective token,
 * which will be held in contract until the auction ends.
 * bid price = price + fee
 * which he will be refunded in case he gets outbid.
 * After the specified expiry date of an auction anyone can trigger the settlement
 * Not only will we transfer tokens to new owners, but we will also transfer sales money to sellers.
 * All comissions will be credited to the owner / deployer of the marketplace contract.
 */
contract DollAuction is Ownable, ReentrancyGuard {
    // Protect against overflow
    using SafeMath
    for uint256;
    // Add math utilities missing in solidity
    using Math
    for uint256;
    using Counters
    for Counters.Counter;
    // Number of auctions ever listed
    Counters.Counter public totalAuctionCount;
    // Number of auctions already sold
    Counters.Counter private closedAuctionCount;

    enum TokenType {
        NONE,
        ERC721,
        ERC1155
    }
    enum AuctionStatus {
        NONE,
        OPEN,
        CLOSE,
        SETTLED,
        CANCELED
    }
    enum Sort {
        ASC,
        DESC,
        NEW,
        END,
        HOT
    }
    enum BidType {
        BID,
        CANCELED,
        UNRANKED
    }
    /* Constructor parameters */
    struct Auction {
        address contractAddress;
        uint256[] tokenIds;
        uint256 startingPrice;
        address seller;
        Winner[] winners;
        string auctionTitle;
        uint256 expiryDate;
        uint256 auctionId;
        AuctionType auctionTypes;
        uint256 batchSize;
        string baseUri;
    }

    struct Winner {
        address wallet;
        uint256 bidPrice;
    }

    struct AuctionType {
        uint256 category;
        AuctionStatus status;
        TokenType tokenType;
        uint256 quantity;
    }

    //bid
    struct Bid {
        uint256 auctionId;
        uint256 bidId;
        address bidder;
        uint256 price;
        BidType Type;
        uint256 timestamp;
    }

    // minBidSize,minAuctionLiveness, feePercentage
    mapping(address => bool) public adminAddress;
    // Minimum amount by which a new bid has to exceed previousBid 0.0001 = 1
    uint256 public minBidSize = 1;
    // Winners count for an auction
    uint256 public winnersBatchSize = 30;
    /* Minimum duration in seconds for which the auction has to be live
     * timestamp 1h = 3600s
     * default 10m
     */
    uint256 public minAuctionLiveness = 10 * 60;
    uint256 public totalMarketVolume;
    uint256 public totalSales;
    //create auction on/off default = true
    bool public marketStatus = true;
    // Save Users credit balances (to be used when they are outbid)
    mapping(address => uint256) private userPriceList;
    mapping(uint256 => Auction) public auctions;
    mapping(uint256 => Bid[]) private bidList;
    mapping(address => Bid[]) private userBids;

    // EVENTS
    event AuctionCreated(uint256 auctionId, address contractAddress, uint256[] tokenIds, uint256 startingPrice, address seller, uint256 expiryDate);
    event NFTApproved(address nftContract);
    event AuctionCanceled(uint256 auctionId);
    event AuctionSettled(uint256 auctionId, uint winners);
    event BidPlaced(uint256 auctionId, uint256 bidPrice);
    event BidFailed(uint256 auctionId, uint256 bidPrice);
    event UserCredited(address creditAddress, uint256 amount);
    event PlaceBid(uint256 indexed auctionId, address indexed bidder, uint256 bidPrice, BidType bidType, uint256 timestamp);
    event CancelBid(uint256 indexed auctionId, address indexed bidder, uint256 bidPrice, BidType bidType, uint256 timestamp);
    event AdminAuctionCancel(uint256 auctionId, bool feeApproved);

    // MODIFIERS
    modifier onlyAdmin() {
        require(adminAddress[msg.sender], "Staff only");
        _;
    }

    modifier openAuction(uint256 auctionId) {
        require(auctions[auctionId].auctionTypes.status == AuctionStatus.OPEN, "Not open Auctions");
        _;
    }

    modifier settleStatusCheck(uint256 auctionId) {
        AuctionStatus auctionStatus = auctions[auctionId].auctionTypes.status;
        require(auctionStatus != AuctionStatus.SETTLED || auctionStatus != AuctionStatus.CANCELED, "only for either open or close auctions");
        if (auctionStatus == AuctionStatus.OPEN) {
            require(auctions[auctionId].expiryDate < block.timestamp, "only valid for expired auctions");
        }
        _;
    }

    modifier nonExpiredAuction(uint256 auctionId) {
        require(auctions[auctionId].expiryDate >= block.timestamp, "auction is expired");
        _;
    }

    modifier onlyExpiredAuction(uint256 auctionId) {
        require(auctions[auctionId].expiryDate < block.timestamp, "Not expired Auctions");
        _;
    }

    modifier noBids(uint256 auctionId) {
        require(auctions[auctionId].winners.length == 0, "bids already");
        _;
    }

    modifier sellerOnly(uint256 auctionId) {
        require(msg.sender == auctions[auctionId].seller, "Caller is not Seller");
        _;
    }

    modifier marketStatusCheck() {
        require(marketStatus, "Market closed");
        _;
    }

    /** functions */
    // Update market status
    function setMarketStatus(bool _marketStatus) public onlyAdmin {
        marketStatus = _marketStatus;
    }

    // Update admin address
    function setAdmin(address _adminAddress) public onlyOwner {
        adminAddress[_adminAddress] = true;
    }

    // Update winners batch size
    function setWinnersBatchSize(uint256 _size) public onlyOwner {
        winnersBatchSize = _size;
    }

    function getTokens(uint auctionId) public view returns (uint[] memory tokenIds) {
        Auction storage auction = auctions[auctionId];
        return auction.tokenIds;
    }

    // Update minBidSize
    function setMinBidSize(uint256 _minBidSize) public onlyAdmin {
        minBidSize = _minBidSize;
    }

    // Update minAuctionLiveness
    function setMinAuctionLiveness(uint256 _minAuctionLiveness) public onlyAdmin {
        minAuctionLiveness = _minAuctionLiveness;
    }

    function updateExpiryDate(uint256 auctionId, uint256 timestamp) external onlyAdmin {
        Auction storage auction = auctions[auctionId];
        require(auction.auctionTypes.status == AuctionStatus.OPEN, "Only valid for open Auctions");

        auction.expiryDate = timestamp;
    }

    function getUserPriceList(address _address) public view onlyAdmin returns(uint256) {
        return userPriceList[_address];
    }

    /*
     * AUCTION MANAGEMENT
     * Creates a new auction and transfers the token to the contract to be held in escrow until the end of the auction.
     * Requires this contract to be approved for the token to be auctioned.
     */
    function createAuction(
        address _contractAddress,
        uint256[] calldata _tokenIds,
        uint256 _startingPrice,
        string memory auctionTitle,
        uint256 expiryDate,
        uint256 _category,
        TokenType _tokenType,
        uint256 _winnersBatchSize,
        string memory baseUri
    ) public payable marketStatusCheck() nonReentrant onlyAdmin returns(uint256 auctionId) {
        require(expiryDate.sub(minAuctionLiveness) > block.timestamp, "Expiry date is not far enough in the future");
        require(_tokenIds.length == _winnersBatchSize, "Tokens length must be set to winners batch size");

        // Generate Auction Id
        totalAuctionCount.increment();
        auctionId = totalAuctionCount.current();
        // Register new Auction
        Auction storage newAuction = auctions[auctionId];
        newAuction.contractAddress = _contractAddress;
        newAuction.tokenIds = _tokenIds;
        newAuction.startingPrice = _startingPrice;
        newAuction.seller = msg.sender;
        newAuction.auctionTitle = auctionTitle;
        newAuction.expiryDate = expiryDate;
        newAuction.auctionId = auctionId;
        newAuction.auctionTypes = AuctionType(_category, AuctionStatus.OPEN, _tokenType, winnersBatchSize);
        newAuction.batchSize = _winnersBatchSize;
        newAuction.baseUri = baseUri;

        address from = msg.sender;
        address to = address(this);

        for(uint256 i = 0; i < _tokenIds.length; i++) {
            uint256 tokenId = _tokenIds[i];
            IERC721(newAuction.contractAddress).transferFrom(from, to, tokenId);
        }
        emit AuctionCreated(auctionId, newAuction.contractAddress, newAuction.tokenIds, _startingPrice, from, newAuction.expiryDate);
    }

    /**
     * Cancels an auction and returns the token to the original owner.
     * Requires the caller to be the seller who created the auction, the auction to be open and no bids having been placed on it.
     */
    function cancelAuction(uint256 auctionId) public openAuction(auctionId) sellerOnly(auctionId) nonReentrant {
        Auction storage auction = auctions[auctionId];

        uint tokensLength = auction.tokenIds.length;
        uint winnerLength = auction.winners.length;

        address from = address(this);

        Winner[] memory winners = auction.winners;
        for(uint i = 0; i < winnerLength; i++) {
            address to = winners[i].wallet;
            (bool success, ) = to.call {
                    value: winners[i].bidPrice
                }("");
            require(success, "Failed to payback and cancel");
        }

        address nftTo = auction.seller;
        address contractAddress = auction.contractAddress;
        for(uint i = 0; i < tokensLength; i++) {
            uint256 tokenId = auction.tokenIds[i];
            IERC721(contractAddress).transferFrom(from, nftTo, tokenId);
        }

        auctions[auctionId].auctionTypes.status = AuctionStatus.CANCELED;
        closedAuctionCount.increment();

        emit AuctionCanceled(auctionId);
    }

    /**
     * Settles an auction.
     * If at least one bid has been placed the token will be transfered to its new owner, the seller will be credited the sale price
     * and the contract owner will be credited the fee.
     * If no bid has been placed on the token it will just be transfered back to its original owner.
     */
    function settleAuction(uint256 auctionId) public settleStatusCheck(auctionId) nonReentrant {
        Auction storage auction = auctions[auctionId];
        auction.auctionTypes.status = AuctionStatus.SETTLED;
        closedAuctionCount.increment();
        // If token was sold transfer it to its new owner and credit seller / contractOwner with price / fee

        address contractAddress = auction.contractAddress;
        address from = address(this);

        uint tokensLength = auction.tokenIds.length;
        uint winnerLength = auction.winners.length;
        uint i = 0;
        uint credit = 0;
        for(i; i < winnerLength; i++) {
            address to = auction.winners[i].wallet;
            uint256 tokenId = auction.tokenIds[i];
            credit += auction.winners[i].bidPrice;
            IERC721(contractAddress).transferFrom(from, to, tokenId);
        }
        if (credit != 0) {
            creditUser(owner(), credit);
        }
        totalSales = totalSales.add(credit);

        // return remaining tokens to seller when it's not soldout
        uint tokensToReturn = tokensLength - winnerLength;
        if (tokensToReturn > 0) {
            address to = auction.seller;
            for(i; i < tokensLength; i++) {
                uint256 tokenId = auction.tokenIds[i];
                IERC721(contractAddress).transferFrom(from, to, tokenId);
            }
        }

        emit AuctionSettled(auctionId, auction.winners.length);
    }


    /**
     * Credit user with given amount in ETH
     * Credits a user with a given amount that he can later withdraw from the contract.
     * Used to refund outbidden buyers and credit sellers / contract owner upon sucessfull sale.
     */
    function creditUser(address creditAddress, uint256 amount) private {
        (bool success, ) = creditAddress.call {
                value: amount
            }("");
        require(success, "Failed to pay back");
        userPriceList[creditAddress] = userPriceList[creditAddress].add(amount);
        emit UserCredited(creditAddress, amount);
    }

    function forceCredit(uint256 amount) external onlyOwner {
        (bool success, ) = _msgSender().call {
                value: amount
            }("");
        require(success, "Failed to pay back");
    }

    function forceToken(address tokenAddress, uint256 tokenId) external onlyOwner {
        IERC721(tokenAddress).transferFrom(address(this), msg.sender, tokenId);
    }

    function addPriceToAddressInRank(uint256 auctionId, address wallet, uint256 _bidPrice) private returns (uint) {
        Auction storage auction = auctions[auctionId];
        Winner[] storage winners = auction.winners;

        uint256 bidPrice = _bidPrice;
        for (uint i = 0; i < winners.length; i++) {
            if (winners[i].wallet == wallet) {
                bidPrice += winners[i].bidPrice;
                removeSorted(auctionId, wallet);
                break;
            }
        }
        return bidPrice;
    }

    /**
     * Places a bid on the selected auction at the selected price
     * Requires the provided bid price to exceed the current lowest bid (among winnersBatchSize rank) by at least the minBidSize.
     * Also requires the caller to transfer the exact amount of the chosen bidPrice plus fee, to be held in escrow by the contract
     * until the auction is settled or replaced by other bids out of the winnersBatchSize rank.
     */
    function placeBid(uint256 auctionId) public payable marketStatusCheck() openAuction(auctionId) nonExpiredAuction(auctionId) nonReentrant {
        require(msg.value > 0, "Bid price must be greater than 0");
        uint256 bidPrice = addPriceToAddressInRank(auctionId, _msgSender(), msg.value);

        // @todo : check the minimum decimal
        require(getCanInsert(auctionId, bidPrice), "Price must be within winnersBatchSize rank (default 30th)");

        Winner memory newWinner = Winner(_msgSender(), bidPrice);
        insertSorted(auctionId, newWinner);

        uint256 bidCount = bidList[auctionId].length;

        uint256 newBidId = bidCount + 1;
        Bid memory newBid = Bid(auctionId, newBidId, msg.sender, bidPrice, BidType.BID, block.timestamp);
        bidList[auctionId].push(newBid);
        userBids[msg.sender].push(newBid);

        emit PlaceBid(auctionId, msg.sender, bidPrice, BidType.BID, block.timestamp);
    }

    function getRank(uint auctionId) public view returns(uint) {
        return getRank(auctionId, msg.sender);
    }

    function getWinners(uint auctionId) public view returns(Winner[] memory) {
        Auction memory auction = auctions[auctionId];
        Winner[] memory winners = auction.winners;

        return winners;
    }

    /**
    * Returns the rank based on bidPrice
    * Returns 0 if not in the rank
    */
    function getRank(uint auctionId, address wallet) public view returns(uint) {
        Auction memory auction = auctions[auctionId];
        Winner[] memory winners = auction.winners;

        for(uint i = 0; i < winners.length; i++) {
            if (wallet == winners[i].wallet) {
                return i + 1;
            }
        }
        return 0; // not ranker
    }

    function isRanker(uint auctionId, address wallet) public view returns(bool) {
        return getRank(auctionId, wallet) != 0 ? true : false;
    }

    function insertSorted(uint auctionId, Winner memory bidder) private {
        Auction storage auction = auctions[auctionId];
        Winner[] storage array = auction.winners;

        if (array.length == 0) {
            array.push(bidder);
            return;
        }

        uint i = 0;
        for (; i < array.length && i < auction.batchSize; i++) {
            require(array[i].bidPrice != bidder.bidPrice, "You can't place a bid with the same price of other rankers");
            if (array[i].bidPrice < bidder.bidPrice) {
                break;
            }
        }

        require(
            i == array.length || bidder.bidPrice >= array[i].bidPrice.add((minBidSize.mul(10 ** 18) / 10000)),
            "Bid has to exceed current price by the minBidSize or more"
        );

        if (i < auction.batchSize) {
            array.push(bidder); // increase the length of array for the last element insertion

            for (uint j = array.length - 1; j > i; j--) {
                array[j] = array[j - 1];
            }

            array[i] = bidder;

            if (array.length > auction.batchSize) {
                creditUser(array[array.length - 1].wallet, array[array.length - 1].bidPrice); // 31th will receive the bid money
                array.pop();
                uint256 bidCount = bidList[auctionId].length;
                uint256 newBidId = bidCount + 1;
                Bid memory newBid = Bid(auctionId, newBidId, array[array.length - 1].wallet, array[array.length - 1].bidPrice, BidType.UNRANKED, block.timestamp);
                emit CancelBid(auctionId, array[array.length - 1].wallet, array[array.length - 1].bidPrice, BidType.UNRANKED, block.timestamp);
                bidList[auctionId].push(newBid);
                userBids[array[array.length - 1].wallet].push(newBid);
            }
        }
        // auction.winners = array;
    }

    function removeSorted(uint auctionId, address loser) private {
        Auction storage auction = auctions[auctionId];
        Winner[] storage array = auction.winners;

        uint i = 0;
        for (; i < array.length; i++) {
            if (array[i].wallet == loser) {
                break;
            }
        }

        uint256 bidPrice = array[i].bidPrice;

        if (i < array.length) {
            for (; i < array.length - 1; i++) {
                array[i] = array[i + 1];
            }
            array.pop();
        }

        uint256 bidCount = bidList[auctionId].length;
        uint256 newBidId = bidCount + 1;
        Bid memory newBid = Bid(auctionId, newBidId, loser, bidPrice, BidType.CANCELED, block.timestamp);
        emit CancelBid(auctionId, msg.sender, bidPrice, BidType.CANCELED, block.timestamp);
        bidList[auctionId].push(newBid);
        userBids[loser].push(newBid);
    }

    function getCanInsert(uint auctionId, uint amount) public view returns (bool) {
        Auction storage auction = auctions[auctionId];
        Winner[] storage array = auction.winners;

        if (amount == auction.startingPrice) {
            return true;
        }

        if (amount < auction.startingPrice.add((minBidSize.mul(10 ** 18) / 10000))) {
            return false;
        }

        if (array.length < winnersBatchSize) {
            return true;
        }

        for (uint i = 0; i < winnersBatchSize; i++) {
            if (amount > array[i].bidPrice.add((minBidSize.mul(10 ** 18) / 10000))) {
                return true;
            }
        }

        return false;
    }

    //cancel auction
    function adminCancelAuction(uint256 auctionId, bool feeApproved) public openAuction(auctionId) onlyAdmin nonReentrant {
        Auction storage auction = auctions[auctionId];

        auction.auctionTypes.status = AuctionStatus.CANCELED;
        emit AdminAuctionCancel(auctionId, feeApproved);
    }

    function getAuction(uint _auctionId) external view returns (Auction memory) {
        Auction memory v = auctions[_auctionId];

        return v;
    }

    function getAllAuctions() public view returns (Auction[] memory) {
        uint256 totalLen = totalAuctionCount.current();
        Auction[] memory values = new Auction[](totalLen);
        for (uint256 i = 0; i < totalLen; i++) {
            values[i] = auctions[i + 1]; // be careful auction id starts from 1
        }
        return values;
    }

    //data func auction list
    function getOpenAuctions(uint256 category, Sort sort, string memory keyword, uint256 offset, uint256 limit) public view returns(Auction[] memory, uint256, uint256) {
        uint256 totalLen = totalAuctionCount.current();
        Auction[] memory values = new Auction[](totalLen);
        uint256 resultLen = 0;
        bytes memory checkString = bytes(keyword);
        //auctionId is no zero.
        //auction open, type count
        for (uint256 i = 1; i <= totalLen; i++) {
            if (auctions[i].auctionTypes.status == AuctionStatus.OPEN) {
                values[resultLen] = auctions[i];
                resultLen++;
            }
        }
        resultLen = 0;
        if (checkString.length > 0) {
            values = sfilter(values, category, keyword);
        } else if (category != 0) {
            values = cfilter(values, category);
        }
        for (uint256 i = 0; i < values.length; i++) {
            if (values[i].seller != address(0)) {
                resultLen++;
            }
        }
        Auction[] memory result = new Auction[](resultLen);
        uint256 rId = 0;
        for (uint256 i = 0; i < values.length; i++) {
            if (values[i].seller != address(0)) {
                result[rId] = values[i];
                rId++;
            }
        }
        //sort
        result = sortMap(result, resultLen, sort);
        if (limit == 0) {
            limit = 1;
        }
        if (limit > resultLen - offset) {
            limit = 0 > resultLen - offset ? 0 : resultLen - offset;
        }
        Auction[] memory newAuctions = new Auction[](result.length > limit ? limit : result.length);
        if (result.length > limit) {
            for (uint256 i = 0; i < limit; i++) {
                newAuctions[i] = result[offset + i];
            }
            return (newAuctions, offset + limit, resultLen);
        } else {
            return (result, offset + limit, resultLen);
        }
    }

    //bids
    function getBids(uint256 auctionId) public view returns(Bid[] memory) {
        return bidList[auctionId];
    }

    function getUserBids(address userAddress) public view returns(Bid[] memory) {
        return userBids[userAddress];
    }

    function getUserAuctions(address seller) public view returns(Auction[] memory) {
        uint256 resultCount = 0;
        for (uint256 i = 1; i <= totalAuctionCount.current(); i++) {
            if (auctions[i].seller == seller) {
                resultCount++;
            }
        }
        Auction[] memory values = new Auction[](resultCount);
        uint256 rInt = 0;
        for (uint256 i = 1; i <= totalAuctionCount.current(); i++) {
            if (auctions[i].seller == seller) {
                values[rInt] = auctions[i];
                rInt++;
            }
        }
        return values;
    }

    //string substring
    function substring(string memory str, uint256 startIndex, uint256 endIndex) private pure returns(string memory) {
        bytes memory strBytes = bytes(str);
        bytes memory result = new bytes(endIndex - startIndex);
        for (uint256 i = startIndex; i < endIndex; i++) {
            result[i - startIndex] = strBytes[i];
        }
        return string(result);
    }

    /* filter */
    function sfilter(Auction[] memory values, uint256 category, string memory keyword)
    private pure returns(Auction[] memory) {
        Auction[] memory sValues = new Auction[](values.length);
        bytes memory kBytes = bytes(keyword);
        for (uint256 i = 0; i < values.length; i++) {
            bytes memory tBytes = bytes(values[i].auctionTitle);
            for (uint256 j = 0; j < tBytes.length; j++) {
                if (keccak256(abi.encodePacked(substring(values[i].auctionTitle, j, tBytes.length < j + kBytes.length ? tBytes.length : j + kBytes.length))) == keccak256(abi.encodePacked(keyword))) {
                    sValues[i] = values[i];
                    break;
                }
            }
        }
        sValues = cfilter(sValues, category);
        return sValues;
    }

    function cfilter(Auction[] memory values, uint256 category) private pure returns(Auction[] memory) {
        Auction[] memory cValues = new Auction[](values.length);
        if (category != 0) {
            for (uint256 i = 0; i < values.length; i++) {
                if (values[i].auctionTypes.category == category) {
                    cValues[i] = values[i];
                }
            }
            return cValues;
        } else {
            return values;
        }
    }

    /* sort */
    function sortMap(Auction[] memory arr, uint256 limit, Sort sort) private view returns(Auction[] memory) {
        //sort
        Auction memory temp;
        for (uint256 i = 0; i < limit; i++) {
            for (uint256 j = i + 1; j < limit; j++) {
                if (sort == Sort.NEW) {
                    if (arr[i].expiryDate > arr[j].expiryDate) {
                        temp = arr[i];
                        arr[i] = arr[j];
                        arr[j] = temp;
                    }
                } else if (sort == Sort.END) {
                    if (arr[i].expiryDate < arr[j].expiryDate) {
                        temp = arr[i];
                        arr[i] = arr[j];
                        arr[j] = temp;
                    }
                } else if (sort == Sort.ASC) {
                    if (arr[i].winners[0].bidPrice > arr[j].winners[0].bidPrice) {
                        temp = arr[i];
                        arr[i] = arr[j];
                        arr[j] = temp;
                    }
                } else if (sort == Sort.HOT) {
                    if (bidList[arr[i].auctionId].length < bidList[arr[j].auctionId].length) {
                        temp = arr[i];
                        arr[i] = arr[j];
                        arr[j] = temp;
                    }
                } else {
                    if (arr[i].winners[0].bidPrice < arr[j].winners[0].bidPrice) {
                        temp = arr[i];
                        arr[i] = arr[j];
                        arr[j] = temp;
                    }
                }
            }
        }
        return arr;
    }
}

File 2 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/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 Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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);
    }
}

File 3 of 9 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}

File 4 of 9 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/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`.
     *
     * 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;

    /**
     * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @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);
}

File 5 of 9 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 6 of 9 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 7 of 9 : IERC165.sol
// 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);
}

File 8 of 9 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 9 of 9 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "london",
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"feeApproved","type":"bool"}],"name":"AdminAuctionCancel","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"AuctionCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"startingPrice","type":"uint256"},{"indexed":false,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"uint256","name":"expiryDate","type":"uint256"}],"name":"AuctionCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"winners","type":"uint256"}],"name":"AuctionSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bidPrice","type":"uint256"}],"name":"BidFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bidPrice","type":"uint256"}],"name":"BidPlaced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"address","name":"bidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"bidPrice","type":"uint256"},{"indexed":false,"internalType":"enum DollAuction.BidType","name":"bidType","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"CancelBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"nftContract","type":"address"}],"name":"NFTApproved","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":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"address","name":"bidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"bidPrice","type":"uint256"},{"indexed":false,"internalType":"enum DollAuction.BidType","name":"bidType","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"PlaceBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"creditAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UserCredited","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"adminAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"bool","name":"feeApproved","type":"bool"}],"name":"adminCancelAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"auctions","outputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"startingPrice","type":"uint256"},{"internalType":"address","name":"seller","type":"address"},{"internalType":"string","name":"auctionTitle","type":"string"},{"internalType":"uint256","name":"expiryDate","type":"uint256"},{"internalType":"uint256","name":"auctionId","type":"uint256"},{"components":[{"internalType":"uint256","name":"category","type":"uint256"},{"internalType":"enum DollAuction.AuctionStatus","name":"status","type":"uint8"},{"internalType":"enum DollAuction.TokenType","name":"tokenType","type":"uint8"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"internalType":"struct DollAuction.AuctionType","name":"auctionTypes","type":"tuple"},{"internalType":"uint256","name":"batchSize","type":"uint256"},{"internalType":"string","name":"baseUri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"cancelAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"_startingPrice","type":"uint256"},{"internalType":"string","name":"auctionTitle","type":"string"},{"internalType":"uint256","name":"expiryDate","type":"uint256"},{"internalType":"uint256","name":"_category","type":"uint256"},{"internalType":"enum DollAuction.TokenType","name":"_tokenType","type":"uint8"},{"internalType":"uint256","name":"_winnersBatchSize","type":"uint256"},{"internalType":"string","name":"baseUri","type":"string"}],"name":"createAuction","outputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"forceCredit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"forceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllAuctions","outputs":[{"components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"startingPrice","type":"uint256"},{"internalType":"address","name":"seller","type":"address"},{"components":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"bidPrice","type":"uint256"}],"internalType":"struct DollAuction.Winner[]","name":"winners","type":"tuple[]"},{"internalType":"string","name":"auctionTitle","type":"string"},{"internalType":"uint256","name":"expiryDate","type":"uint256"},{"internalType":"uint256","name":"auctionId","type":"uint256"},{"components":[{"internalType":"uint256","name":"category","type":"uint256"},{"internalType":"enum DollAuction.AuctionStatus","name":"status","type":"uint8"},{"internalType":"enum DollAuction.TokenType","name":"tokenType","type":"uint8"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"internalType":"struct DollAuction.AuctionType","name":"auctionTypes","type":"tuple"},{"internalType":"uint256","name":"batchSize","type":"uint256"},{"internalType":"string","name":"baseUri","type":"string"}],"internalType":"struct DollAuction.Auction[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_auctionId","type":"uint256"}],"name":"getAuction","outputs":[{"components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"startingPrice","type":"uint256"},{"internalType":"address","name":"seller","type":"address"},{"components":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"bidPrice","type":"uint256"}],"internalType":"struct DollAuction.Winner[]","name":"winners","type":"tuple[]"},{"internalType":"string","name":"auctionTitle","type":"string"},{"internalType":"uint256","name":"expiryDate","type":"uint256"},{"internalType":"uint256","name":"auctionId","type":"uint256"},{"components":[{"internalType":"uint256","name":"category","type":"uint256"},{"internalType":"enum DollAuction.AuctionStatus","name":"status","type":"uint8"},{"internalType":"enum DollAuction.TokenType","name":"tokenType","type":"uint8"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"internalType":"struct DollAuction.AuctionType","name":"auctionTypes","type":"tuple"},{"internalType":"uint256","name":"batchSize","type":"uint256"},{"internalType":"string","name":"baseUri","type":"string"}],"internalType":"struct DollAuction.Auction","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"getBids","outputs":[{"components":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"uint256","name":"bidId","type":"uint256"},{"internalType":"address","name":"bidder","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"enum DollAuction.BidType","name":"Type","type":"uint8"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"internalType":"struct DollAuction.Bid[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getCanInsert","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"category","type":"uint256"},{"internalType":"enum DollAuction.Sort","name":"sort","type":"uint8"},{"internalType":"string","name":"keyword","type":"string"},{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"getOpenAuctions","outputs":[{"components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"startingPrice","type":"uint256"},{"internalType":"address","name":"seller","type":"address"},{"components":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"bidPrice","type":"uint256"}],"internalType":"struct DollAuction.Winner[]","name":"winners","type":"tuple[]"},{"internalType":"string","name":"auctionTitle","type":"string"},{"internalType":"uint256","name":"expiryDate","type":"uint256"},{"internalType":"uint256","name":"auctionId","type":"uint256"},{"components":[{"internalType":"uint256","name":"category","type":"uint256"},{"internalType":"enum DollAuction.AuctionStatus","name":"status","type":"uint8"},{"internalType":"enum DollAuction.TokenType","name":"tokenType","type":"uint8"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"internalType":"struct DollAuction.AuctionType","name":"auctionTypes","type":"tuple"},{"internalType":"uint256","name":"batchSize","type":"uint256"},{"internalType":"string","name":"baseUri","type":"string"}],"internalType":"struct DollAuction.Auction[]","name":"","type":"tuple[]"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"address","name":"wallet","type":"address"}],"name":"getRank","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"getRank","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"getTokens","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"seller","type":"address"}],"name":"getUserAuctions","outputs":[{"components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"startingPrice","type":"uint256"},{"internalType":"address","name":"seller","type":"address"},{"components":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"bidPrice","type":"uint256"}],"internalType":"struct DollAuction.Winner[]","name":"winners","type":"tuple[]"},{"internalType":"string","name":"auctionTitle","type":"string"},{"internalType":"uint256","name":"expiryDate","type":"uint256"},{"internalType":"uint256","name":"auctionId","type":"uint256"},{"components":[{"internalType":"uint256","name":"category","type":"uint256"},{"internalType":"enum DollAuction.AuctionStatus","name":"status","type":"uint8"},{"internalType":"enum DollAuction.TokenType","name":"tokenType","type":"uint8"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"internalType":"struct DollAuction.AuctionType","name":"auctionTypes","type":"tuple"},{"internalType":"uint256","name":"batchSize","type":"uint256"},{"internalType":"string","name":"baseUri","type":"string"}],"internalType":"struct DollAuction.Auction[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"}],"name":"getUserBids","outputs":[{"components":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"uint256","name":"bidId","type":"uint256"},{"internalType":"address","name":"bidder","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"enum DollAuction.BidType","name":"Type","type":"uint8"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"internalType":"struct DollAuction.Bid[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getUserPriceList","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"getWinners","outputs":[{"components":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"bidPrice","type":"uint256"}],"internalType":"struct DollAuction.Winner[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"address","name":"wallet","type":"address"}],"name":"isRanker","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minAuctionLiveness","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBidSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"placeBid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_adminAddress","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_marketStatus","type":"bool"}],"name":"setMarketStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minAuctionLiveness","type":"uint256"}],"name":"setMinAuctionLiveness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minBidSize","type":"uint256"}],"name":"setMinBidSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_size","type":"uint256"}],"name":"setWinnersBatchSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"settleAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalAuctionCount","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMarketVolume","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSales","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"updateExpiryDate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"winnersBatchSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405260016005819055601e600655610258600755600a805460ff191690911790553480156200003057600080fd5b506200003c3362000046565b6001805562000096565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61581d80620000a66000396000f3fe6080604052600436106102255760003560e01c806378bd793511610123578063ca63468d116100ab578063d4f18e191161006f578063d4f18e191461068f578063e0e081d7146106a5578063ea120bc9146106bf578063f2fde38b146106df578063ff3ad0b4146106ff57600080fd5b8063ca63468d146105ea578063cbd2bdfd1461060a578063cc5c75cb1461062c578063d0b1109714610642578063d3c9cc261461066257600080fd5b80638da5cb5b116100f25780638da5cb5b1461055c57806396b5a755146105845780639979ef45146105a4578063a5099bae146105b7578063a9fffbd1146105d757600080fd5b806378bd7935146104cf5780637e710015146104fc578063802234a01461051c57806387463b831461053c57600080fd5b80634b99a397116101b15780636b1426a4116101755780636b1426a414610437578063704b6c0214610464578063715018a614610484578063753615cd1461049957806377ba6dc7146104b957600080fd5b80634b99a3971461037d578063571a26a0146103ac578063573ba4cf146103e15780636605ff66146104015780636759789f1461041757600080fd5b80632e21cf31116101f85780632e21cf31146102c75780632e993611146102e757806333f9a1ed1461030757806341d31d5914610327578063459d5bc71461036757600080fd5b806306893ed61461022a578063131d9a271461024c5780631825df21146102825780631ef5f4c5146102a7575b600080fd5b34801561023657600080fd5b5061024a610245366004614d97565b61071f565b005b34801561025857600080fd5b5061026c610267366004614d97565b61075c565b6040516102799190614dd6565b60405180910390f35b34801561028e57600080fd5b506002546102999081565b604051908152602001610279565b3480156102b357600080fd5b5061024a6102c2366004614d97565b610840565b3480156102d357600080fd5b5061024a6102e2366004614e70565b6108d9565b3480156102f357600080fd5b5061024a610302366004614d97565b61091b565b34801561031357600080fd5b5061024a610322366004614d97565b610ce0565b34801561033357600080fd5b50610357610342366004614ea2565b60046020526000908152604090205460ff1681565b6040519015158152602001610279565b34801561037357600080fd5b5061029960085481565b34801561038957600080fd5b5061039d610398366004614f5f565b610d14565b604051610279939291906151fc565b3480156103b857600080fd5b506103cc6103c7366004614d97565b6113ca565b60405161027999989796959493929190615221565b3480156103ed57600080fd5b506103576103fc36600461529a565b6115bf565b34801561040d57600080fd5b5061029960095481565b34801561042357600080fd5b5061026c610432366004614ea2565b6115e5565b34801561044357600080fd5b50610457610452366004614d97565b6116c1565b60405161027991906152c6565b34801561047057600080fd5b5061024a61047f366004614ea2565b6119d9565b34801561049057600080fd5b5061024a611a05565b3480156104a557600080fd5b5061024a6104b43660046152d9565b611a19565b3480156104c557600080fd5b5061029960075481565b3480156104db57600080fd5b506104ef6104ea366004614d97565b611ac5565b60405161027991906152fb565b34801561050857600080fd5b506103576105173660046152d9565b611ddf565b34801561052857600080fd5b5061024a61053736600461530e565b611f05565b34801561054857600080fd5b5061029961055736600461529a565b611f73565b34801561056857600080fd5b506000546040516001600160a01b039091168152602001610279565b34801561059057600080fd5b5061024a61059f366004614d97565b6122ef565b61024a6105b2366004614d97565b61264f565b3480156105c357600080fd5b506102996105d2366004614d97565b612a41565b6102996105e5366004615392565b612a4d565b3480156105f657600080fd5b5061024a610605366004614d97565b612dfb565b34801561061657600080fd5b5061061f612e08565b6040516102799190615468565b34801561063857600080fd5b5061029960065481565b34801561064e57600080fd5b5061024a61065d36600461547b565b6131c9565b34801561066e57600080fd5b5061068261067d366004614d97565b6132ae565b604051610279919061549e565b34801561069b57600080fd5b5061029960055481565b3480156106b157600080fd5b50600a546103579060ff1681565b3480156106cb57600080fd5b506102996106da366004614ea2565b613316565b3480156106eb57600080fd5b5061024a6106fa366004614ea2565b613365565b34801561070b57600080fd5b5061061f61071a366004614ea2565b6133de565b3360009081526004602052604090205460ff166107575760405162461bcd60e51b815260040161074e906154b1565b60405180910390fd5b600755565b6060600d6000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156108355760008481526020908190206040805160c08101825260068602909201805483526001810154938301939093526002808401546001600160a01b031691830191909152600383015460608301526004830154919291608084019160ff9091169081111561080757610807614db0565b600281111561081857610818614db0565b815260200160058201548152505081526020019060010190610791565b505050509050919050565b61084861380c565b604051600090339083908381818185875af1925050503d806000811461088a576040519150601f19603f3d011682016040523d82523d6000602084013e61088f565b606091505b50509050806108d55760405162461bcd60e51b81526020600482015260126024820152714661696c656420746f20706179206261636b60701b604482015260640161074e565b5050565b3360009081526004602052604090205460ff166109085760405162461bcd60e51b815260040161074e906154b1565b600a805460ff1916911515919091179055565b6000818152600c6020526040902060090154819060ff16600381600481111561094657610946614db0565b1415806109655750600481600481111561096257610962614db0565b14155b6109c05760405162461bcd60e51b815260206004820152602660248201527f6f6e6c7920666f7220656974686572206f70656e206f7220636c6f73652061756044820152656374696f6e7360d01b606482015260840161074e565b60018160048111156109d4576109d4614db0565b03610a39576000828152600c60205260409020600601544211610a395760405162461bcd60e51b815260206004820152601f60248201527f6f6e6c792076616c696420666f7220657870697265642061756374696f6e7300604482015260640161074e565b610a41613866565b6000838152600c6020526040902060098101805460ff19166003908117909155805460010190558054600182015460048301546001600160a01b03909216913091906000805b82821015610b93576000876004018381548110610aa657610aa66154d5565b6000918252602082206002909102015460018a0180546001600160a01b0390921693509085908110610ada57610ada6154d5565b90600052602060002001549050886004018481548110610afc57610afc6154d5565b90600052602060002090600202016001015483610b199190615501565b6040516323b872dd60e01b81529093506001600160a01b038916906323b872dd90610b4c908a9086908690600401615514565b600060405180830381600087803b158015610b6657600080fd5b505af1158015610b7a573d6000803e3d6000fd5b5050505050508180610b8b90615538565b925050610a87565b8015610bb457610bb4610bae6000546001600160a01b031690565b826138bf565b600954610bc190826139d5565b6009556000610bd08486615551565b90508015610c8b5760038801546001600160a01b03165b85841015610c89576000896001018581548110610c0657610c066154d5565b90600052602060002001549050886001600160a01b03166323b872dd8984846040518463ffffffff1660e01b8152600401610c4393929190615514565b600060405180830381600087803b158015610c5d57600080fd5b505af1158015610c71573d6000803e3d6000fd5b50505050508380610c8190615538565b945050610be7565b505b6004880154604080518d815260208101929092527f55efb9848a7b2ced6c81d35dffde0fd3c282f34aadd59d7150e313736dbf0ab6910160405180910390a15050505050505050610cdb60018055565b505050565b3360009081526004602052604090205460ff16610d0f5760405162461bcd60e51b815260040161074e906154b1565b600555565b60606000806000610d2460025490565b90506000816001600160401b03811115610d4057610d40614ebd565b604051908082528060200260200182016040528015610d7957816020015b610d66614ca1565b815260200190600190039081610d5e5790505b50905060008860015b8481116110fd5760016000828152600c602052604090206009015460ff166004811115610db157610db1614db0565b036110eb576000818152600c602090815260409182902082516101608101845281546001600160a01b0316815260018201805485518186028101860190965280865291949293858101939290830182828015610e2c57602002820191906000526020600020905b815481526020019060010190808311610e18575b50505050508152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015610edb576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610e93565b505050508152602001600582018054610ef390615564565b80601f0160208091040260200160405190810160405280929190818152602001828054610f1f90615564565b8015610f6c5780601f10610f4157610100808354040283529160200191610f6c565b820191906000526020600020905b815481529060010190602001808311610f4f57829003601f168201915b50505050508152602001600682015481526020016007820154815260200160088201604051806080016040529081600082015481526020016001820160009054906101000a900460ff166004811115610fc757610fc7614db0565b6004811115610fd857610fd8614db0565b81526020016001820160019054906101000a900460ff16600281111561100057611000614db0565b600281111561101157611011614db0565b81526020016002820154815250508152602001600b8201548152602001600c8201805461103d90615564565b80601f016020809104026020016040519081016040528092919081815260200182805461106990615564565b80156110b65780601f1061108b576101008083540402835291602001916110b6565b820191906000526020600020905b81548152906001019060200180831161109957829003601f168201915b5050505050815250508484815181106110d1576110d16154d5565b602002602001018190525082806110e790615538565b9350505b806110f581615538565b915050610d82565b508051600092501561111b57611114838d8c6139e1565b925061112e565b8b1561112e5761112b838d613b8d565b92505b60005b83518110156111915760006001600160a01b0316848281518110611157576111576154d5565b6020026020010151606001516001600160a01b03161461117f578261117b81615538565b9350505b8061118981615538565b915050611131565b506000826001600160401b038111156111ac576111ac614ebd565b6040519080825280602002602001820160405280156111e557816020015b6111d2614ca1565b8152602001906001900390816111ca5790505b5090506000805b85518110156112845760006001600160a01b0316868281518110611212576112126154d5565b6020026020010151606001516001600160a01b0316146112725785818151811061123e5761123e6154d5565b6020026020010151838381518110611258576112586154d5565b6020026020010181905250818061126e90615538565b9250505b8061127c81615538565b9150506111ec565b5061129082858f613c7c565b91508960000361129f57600199505b6112a98b85615551565b8a11156112c8576112ba8b85615551565b506112c58b85615551565b99505b60008a8351116112d95782516112db565b8a5b6001600160401b038111156112f2576112f2614ebd565b60405190808252806020026020018201604052801561132b57816020015b611318614ca1565b8152602001906001900390816113105790505b5090508a835111156113b45760005b8b811015611395578361134d828f615501565b8151811061135d5761135d6154d5565b6020026020010151828281518110611377576113776154d5565b6020026020010181905250808061138d90615538565b91505061133a565b50806113a18c8e615501565b86995099509950505050505050506113bf565b826113a18c8e615501565b955095509592505050565b600c6020526000908152604090208054600282015460038301546005840180546001600160a01b03948516959394909216929161140690615564565b80601f016020809104026020016040519081016040528092919081815260200182805461143290615564565b801561147f5780601f106114545761010080835404028352916020019161147f565b820191906000526020600020905b81548152906001019060200180831161146257829003601f168201915b50505050509080600601549080600701549080600801604051806080016040529081600082015481526020016001820160009054906101000a900460ff1660048111156114ce576114ce614db0565b60048111156114df576114df614db0565b81526020016001820160019054906101000a900460ff16600281111561150757611507614db0565b600281111561151857611518614db0565b81526020016002820154815250509080600b01549080600c01805461153c90615564565b80601f016020809104026020016040519081016040528092919081815260200182805461156890615564565b80156115b55780601f1061158a576101008083540402835291602001916115b5565b820191906000526020600020905b81548152906001019060200180831161159857829003601f168201915b5050505050905089565b60006115cb8383611f73565b6000036115d95760006115dc565b60015b90505b92915050565b6001600160a01b0381166000908152600e60209081526040808320805482518185028101850190935280835260609492939192909184015b828210156108355760008481526020908190206040805160c08101825260068602909201805483526001810154938301939093526002808401546001600160a01b031691830191909152600383015460608301526004830154919291608084019160ff9091169081111561169357611693614db0565b60028111156116a4576116a4614db0565b81526020016005820154815250508152602001906001019061161d565b6000818152600c6020908152604080832081516101608101835281546001600160a01b03168152600182018054845181870281018701909552808552606096959294858401939092919083018282801561173a57602002820191906000526020600020905b815481526020019060010190808311611726575b50505050508152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156117e9576000848152602090819020604080518082019091526002850290910180546001600160a01b031682526001908101548284015290835290920191016117a1565b50505050815260200160058201805461180190615564565b80601f016020809104026020016040519081016040528092919081815260200182805461182d90615564565b801561187a5780601f1061184f5761010080835404028352916020019161187a565b820191906000526020600020905b81548152906001019060200180831161185d57829003601f168201915b50505050508152602001600682015481526020016007820154815260200160088201604051806080016040529081600082015481526020016001820160009054906101000a900460ff1660048111156118d5576118d5614db0565b60048111156118e6576118e6614db0565b81526020016001820160019054906101000a900460ff16600281111561190e5761190e614db0565b600281111561191f5761191f614db0565b81526020016002820154815250508152602001600b8201548152602001600c8201805461194b90615564565b80601f016020809104026020016040519081016040528092919081815260200182805461197790615564565b80156119c45780601f10611999576101008083540402835291602001916119c4565b820191906000526020600020905b8154815290600101906020018083116119a757829003601f168201915b50505091909252505050608001519392505050565b6119e161380c565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b611a0d61380c565b611a176000614049565b565b3360009081526004602052604090205460ff16611a485760405162461bcd60e51b815260040161074e906154b1565b6000828152600c602052604090206001600982015460ff166004811115611a7157611a71614db0565b14611abe5760405162461bcd60e51b815260206004820152601c60248201527f4f6e6c792076616c696420666f72206f70656e2041756374696f6e7300000000604482015260640161074e565b6006015550565b611acd614ca1565b6000828152600c6020908152604080832081516101608101835281546001600160a01b031681526001820180548451818702810187019095528085529194929385840193909290830182828015611b4357602002820191906000526020600020905b815481526020019060010190808311611b2f575b50505050508152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015611bf2576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101611baa565b505050508152602001600582018054611c0a90615564565b80601f0160208091040260200160405190810160405280929190818152602001828054611c3690615564565b8015611c835780601f10611c5857610100808354040283529160200191611c83565b820191906000526020600020905b815481529060010190602001808311611c6657829003601f168201915b50505050508152602001600682015481526020016007820154815260200160088201604051806080016040529081600082015481526020016001820160009054906101000a900460ff166004811115611cde57611cde614db0565b6004811115611cef57611cef614db0565b81526020016001820160019054906101000a900460ff166002811115611d1757611d17614db0565b6002811115611d2857611d28614db0565b81526020016002820154815250508152602001600b8201548152602001600c82018054611d5490615564565b80601f0160208091040260200160405190810160405280929190818152602001828054611d8090615564565b8015611dcd5780601f10611da257610100808354040283529160200191611dcd565b820191906000526020600020905b815481529060010190602001808311611db057829003601f168201915b50505091909252509195945050505050565b6000828152600c60205260408120600281015460048201908403611e08576001925050506115df565b611e40612710611e2b670de0b6b3a764000060055461409990919063ffffffff16565b611e35919061559e565b6002840154906139d5565b841015611e52576000925050506115df565b60065481541015611e68576001925050506115df565b60005b600654811015611ef957611ed4612710611e98670de0b6b3a764000060055461409990919063ffffffff16565b611ea2919061559e565b838381548110611eb457611eb46154d5565b9060005260206000209060020201600101546139d590919063ffffffff16565b851115611ee757600193505050506115df565b80611ef181615538565b915050611e6b565b50600095945050505050565b611f0d61380c565b6040516323b872dd60e01b81526001600160a01b038316906323b872dd90611f3d90309033908690600401615514565b600060405180830381600087803b158015611f5757600080fd5b505af1158015611f6b573d6000803e3d6000fd5b505050505050565b6000828152600c6020908152604080832081516101608101835281546001600160a01b03168152600182018054845181870281018701909552808552869592948584019390929190830182828015611fea57602002820191906000526020600020905b815481526020019060010190808311611fd6575b50505050508152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015612099576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101612051565b5050505081526020016005820180546120b190615564565b80601f01602080910402602001604051908101604052809291908181526020018280546120dd90615564565b801561212a5780601f106120ff5761010080835404028352916020019161212a565b820191906000526020600020905b81548152906001019060200180831161210d57829003601f168201915b50505050508152602001600682015481526020016007820154815260200160088201604051806080016040529081600082015481526020016001820160009054906101000a900460ff16600481111561218557612185614db0565b600481111561219657612196614db0565b81526020016001820160019054906101000a900460ff1660028111156121be576121be614db0565b60028111156121cf576121cf614db0565b81526020016002820154815250508152602001600b8201548152602001600c820180546121fb90615564565b80601f016020809104026020016040519081016040528092919081815260200182805461222790615564565b80156122745780601f1061224957610100808354040283529160200191612274565b820191906000526020600020905b81548152906001019060200180831161225757829003601f168201915b50505091909252505050608081015190915060005b8151811015611ef9578181815181106122a4576122a46154d5565b6020026020010151600001516001600160a01b0316856001600160a01b0316036122dd576122d3816001615501565b93505050506115df565b806122e781615538565b915050612289565b8060016000828152600c602052604090206009015460ff16600481111561231857612318614db0565b146123355760405162461bcd60e51b815260040161074e906155c0565b6000828152600c602052604090206003015482906001600160a01b031633146123975760405162461bcd60e51b815260206004820152601460248201527321b0b63632b91034b9903737ba1029b2b63632b960611b604482015260640161074e565b61239f613866565b6000838152600c60209081526040808320600181015460048201805484518187028101870190955280855292959194929330939091908590849084015b82821015612424576000848152602090819020604080518082019091526002850290910180546001600160a01b031682526001908101548284015290835290920191016123dc565b50505050905060005b8381101561252c576000828281518110612449576124496154d5565b60200260200101516000015190506000816001600160a01b0316848481518110612475576124756154d5565b60200260200101516020015160405160006040518083038185875af1925050503d80600081146124c1576040519150601f19603f3d011682016040523d82523d6000602084013e6124c6565b606091505b50509050806125175760405162461bcd60e51b815260206004820152601c60248201527f4661696c656420746f207061796261636b20616e642063616e63656c00000000604482015260640161074e565b5050808061252490615538565b91505061242d565b50600385015485546001600160a01b03918216911660005b868110156125e6576000886001018281548110612563576125636154d5565b90600052602060002001549050826001600160a01b03166323b872dd8786846040518463ffffffff1660e01b81526004016125a093929190615514565b600060405180830381600087803b1580156125ba57600080fd5b505af11580156125ce573d6000803e3d6000fd5b505050505080806125de90615538565b915050612544565b5060008a8152600c60205260409020600901805460ff191660041790556003805460010190556040518a81527f28601d865dccc9f113e15a7185c1b38c085d598c71250d3337916a428536d7719060200160405180910390a150505050505050610cdb60018055565b600a5460ff166126915760405162461bcd60e51b815260206004820152600d60248201526c13585c9ad95d0818db1bdcd959609a1b604482015260640161074e565b8060016000828152600c602052604090206009015460ff1660048111156126ba576126ba614db0565b146126d75760405162461bcd60e51b815260040161074e906155c0565b6000828152600c6020526040902060060154829042111561272f5760405162461bcd60e51b8152602060048201526012602482015271185d58dd1a5bdb881a5cc8195e1c1a5c995960721b604482015260640161074e565b612737613866565b600034116127875760405162461bcd60e51b815260206004820181905260248201527f426964207072696365206d7573742062652067726561746572207468616e2030604482015260640161074e565b60006127948433346140a5565b90506127a08482611ddf565b6128125760405162461bcd60e51b815260206004820152603960248201527f5072696365206d7573742062652077697468696e2077696e6e6572734261746360448201527f6853697a652072616e6b202864656661756c7420333074682900000000000000606482015260840161074e565b600060405180604001604052806128263390565b6001600160a01b031681526020018390529050612843858261415b565b6000858152600d60205260408120549061285e826001615501565b905060006040518060c00160405280898152602001838152602001336001600160a01b03168152602001868152602001600060028111156128a1576128a1614db0565b81524260209182015260008a8152600d825260408082208054600180820183559184529284902085516006909402019283559284015182840155830151600280830180546001600160a01b0319166001600160a01b0390931692909217909155606084015160038301556080840151600483018054959650869593949193909260ff199091169190849081111561293a5761293a614db0565b021790555060a09190910151600590910155336000908152600e602090815260408083208054600180820183559185529383902085516006909502019384559184015183830155830151600280840180546001600160a01b0319166001600160a01b03909316929092179091556060840151600384015560808401516004840180548695949293919260ff199091169184908111156129db576129db614db0565b021790555060a082015181600501555050336001600160a01b0316887fabd8792ef473ed6c6dbd22ccbf1400c5e4a153f0837bcfa91e79243b0a175c8a87600042604051612a2b939291906155eb565b60405180910390a35050505050610cdb60018055565b60006115df8233611f73565b600a5460009060ff16612a925760405162461bcd60e51b815260206004820152600d60248201526c13585c9ad95d0818db1bdcd959609a1b604482015260640161074e565b612a9a613866565b3360009081526004602052604090205460ff16612ac95760405162461bcd60e51b815260040161074e906154b1565b42612adf6007548861485690919063ffffffff16565b11612b405760405162461bcd60e51b815260206004820152602b60248201527f4578706972792064617465206973206e6f742066617220656e6f75676820696e60448201526a207468652066757475726560a81b606482015260840161074e565b888314612ba75760405162461bcd60e51b815260206004820152602f60248201527f546f6b656e73206c656e677468206d7573742062652073657420746f2077696e60448201526e6e6572732062617463682073697a6560881b606482015260840161074e565b612bb5600280546001019055565b6002546000818152600c6020526040902080546001600160a01b0319166001600160a01b038e16178155909150612bf0600182018c8c614d37565b50600281018990556003810180546001600160a01b0319163317905560058101612c1a8982615652565b5060068101879055600781018290556040805160808101825287815260016020820152908101866002811115612c5257612c52614db0565b81526006546020918201528151600884019081559082015160098401805460ff19166001836004811115612c8857612c88614db0565b0217905550604082015160018201805461ff001916610100836002811115612cb257612cb2614db0565b021790555060609190910151600290910155600b8101849055600c8101612cd98482615652565b50333060005b8c811015612d815760008e8e83818110612cfb57612cfb6154d5565b87546040516323b872dd60e01b81526020909202939093013593506001600160a01b03909216916323b872dd9150612d3b90879087908690600401615514565b600060405180830381600087803b158015612d5557600080fd5b505af1158015612d69573d6000803e3d6000fd5b50505050508080612d7990615538565b915050612cdf565b507fbd38245a13e16c0b74cf18a220f7d34e7319f829ada15871d9d5c78d539a4269848460000160009054906101000a90046001600160a01b0316856001018e868860060154604051612dd996959493929190615711565b60405180910390a1505050612ded60018055565b9a9950505050505050505050565b612e0361380c565b600655565b60606000612e1560025490565b90506000816001600160401b03811115612e3157612e31614ebd565b604051908082528060200260200182016040528015612e6a57816020015b612e57614ca1565b815260200190600190039081612e4f5790505b50905060005b828110156131c257600c6000612e87836001615501565b8152602080820192909252604090810160002081516101608101835281546001600160a01b031681526001820180548451818702810187019095528085529194929385840193909290830182828015612eff57602002820191906000526020600020905b815481526020019060010190808311612eeb575b50505050508152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015612fae576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101612f66565b505050508152602001600582018054612fc690615564565b80601f0160208091040260200160405190810160405280929190818152602001828054612ff290615564565b801561303f5780601f106130145761010080835404028352916020019161303f565b820191906000526020600020905b81548152906001019060200180831161302257829003601f168201915b50505050508152602001600682015481526020016007820154815260200160088201604051806080016040529081600082015481526020016001820160009054906101000a900460ff16600481111561309a5761309a614db0565b60048111156130ab576130ab614db0565b81526020016001820160019054906101000a900460ff1660028111156130d3576130d3614db0565b60028111156130e4576130e4614db0565b81526020016002820154815250508152602001600b8201548152602001600c8201805461311090615564565b80601f016020809104026020016040519081016040528092919081815260200182805461313c90615564565b80156131895780601f1061315e57610100808354040283529160200191613189565b820191906000526020600020905b81548152906001019060200180831161316c57829003601f168201915b5050505050815250508282815181106131a4576131a46154d5565b602002602001018190525080806131ba90615538565b915050612e70565b5092915050565b8160016000828152600c602052604090206009015460ff1660048111156131f2576131f2614db0565b1461320f5760405162461bcd60e51b815260040161074e906155c0565b3360009081526004602052604090205460ff1661323e5760405162461bcd60e51b815260040161074e906154b1565b613246613866565b6000838152600c602052604090206009810180546004919060ff191660018302179055506040805185815284151560208201527f7bd2bd1d5b732d033be84c5cec5276465a74064c22786763b791305c85c0b485910160405180910390a150610cdb60018055565b6000818152600c6020908152604091829020600181018054845181850281018501909552808552606094929383018282801561330957602002820191906000526020600020905b8154815260200190600101908083116132f5575b5050505050915050919050565b3360009081526004602052604081205460ff166133455760405162461bcd60e51b815260040161074e906154b1565b506001600160a01b0381166000908152600b60205260409020545b919050565b61336d61380c565b6001600160a01b0381166133d25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161074e565b6133db81614049565b50565b6060600060015b6002548111613432576000818152600c60205260409020600301546001600160a01b03808616911603613420578161341c81615538565b9250505b8061342a81615538565b9150506133e5565b506000816001600160401b0381111561344d5761344d614ebd565b60405190808252806020026020018201604052801561348657816020015b613473614ca1565b81526020019060019003908161346b5790505b509050600060015b6002548111613802576000818152600c60205260409020600301546001600160a01b038088169116036137f0576000818152600c602090815260409182902082516101608101845281546001600160a01b031681526001820180548551818602810186019096528086529194929385810193929083018282801561353157602002820191906000526020600020905b81548152602001906001019080831161351d575b50505050508152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156135e0576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101613598565b5050505081526020016005820180546135f890615564565b80601f016020809104026020016040519081016040528092919081815260200182805461362490615564565b80156136715780601f1061364657610100808354040283529160200191613671565b820191906000526020600020905b81548152906001019060200180831161365457829003601f168201915b50505050508152602001600682015481526020016007820154815260200160088201604051806080016040529081600082015481526020016001820160009054906101000a900460ff1660048111156136cc576136cc614db0565b60048111156136dd576136dd614db0565b81526020016001820160019054906101000a900460ff16600281111561370557613705614db0565b600281111561371657613716614db0565b81526020016002820154815250508152602001600b8201548152602001600c8201805461374290615564565b80601f016020809104026020016040519081016040528092919081815260200182805461376e90615564565b80156137bb5780601f10613790576101008083540402835291602001916137bb565b820191906000526020600020905b81548152906001019060200180831161379e57829003601f168201915b5050505050815250508383815181106137d6576137d66154d5565b602002602001018190525081806137ec90615538565b9250505b806137fa81615538565b91505061348e565b5090949350505050565b6000546001600160a01b03163314611a175760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161074e565b6002600154036138b85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161074e565b6002600155565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461390c576040519150601f19603f3d011682016040523d82523d6000602084013e613911565b606091505b50509050806139575760405162461bcd60e51b81526020600482015260126024820152714661696c656420746f20706179206261636b60701b604482015260640161074e565b6001600160a01b0383166000908152600b602052604090205461397a90836139d5565b6001600160a01b0384166000818152600b60209081526040918290209390935580519182529181018490527f943473d7f156d47b965634c405f8d98efee55257875df66522da90d91dd51591910160405180910390a1505050565b60006115dc8284615501565b6060600084516001600160401b038111156139fe576139fe614ebd565b604051908082528060200260200182016040528015613a3757816020015b613a24614ca1565b815260200190600190039081613a1c5790505b5090508260005b8651811015613b78576000878281518110613a5b57613a5b6154d5565b602002602001015160a00151905060005b8151811015613b635786604051602001613a869190615787565b60405160208183030381529060405280519060200120613aea8a8581518110613ab157613ab16154d5565b602002602001015160a0015183875185613acb9190615501565b865110613ae3578751613ade9086615501565b614862565b8551614862565b604051602001613afa9190615787565b6040516020818303038152906040528051906020012003613b5157888381518110613b2757613b276154d5565b6020026020010151858481518110613b4157613b416154d5565b6020026020010181905250613b63565b80613b5b81615538565b915050613a6c565b50508080613b7090615538565b915050613a3e565b50613b838286613b8d565b9695505050505050565b6060600083516001600160401b03811115613baa57613baa614ebd565b604051908082528060200260200182016040528015613be357816020015b613bd0614ca1565b815260200190600190039081613bc85790505b5090508215613c735760005b8451811015613c6b5783858281518110613c0b57613c0b6154d5565b602002602001015161010001516000015103613c5957848181518110613c3357613c336154d5565b6020026020010151828281518110613c4d57613c4d6154d5565b60200260200101819052505b80613c6381615538565b915050613bef565b5090506115df565b839150506115df565b6060613c86614ca1565b60005b8481101561403f576000613c9e826001615501565b90505b8581101561402c576002856004811115613cbd57613cbd614db0565b03613d7b57868181518110613cd457613cd46154d5565b602002602001015160c00151878381518110613cf257613cf26154d5565b602002602001015160c001511115613d7657868281518110613d1657613d166154d5565b60200260200101519250868181518110613d3257613d326154d5565b6020026020010151878381518110613d4c57613d4c6154d5565b602002602001018190525082878281518110613d6a57613d6a6154d5565b60200260200101819052505b61401a565b6003856004811115613d8f57613d8f614db0565b03613de857868181518110613da657613da66154d5565b602002602001015160c00151878381518110613dc457613dc46154d5565b602002602001015160c001511015613d7657868281518110613d1657613d166154d5565b6000856004811115613dfc57613dfc614db0565b03613e9157868181518110613e1357613e136154d5565b602002602001015160800151600081518110613e3157613e316154d5565b602002602001015160200151878381518110613e4f57613e4f6154d5565b602002602001015160800151600081518110613e6d57613e6d6154d5565b6020026020010151602001511115613d7657868281518110613d1657613d166154d5565b6004856004811115613ea557613ea5614db0565b03613f2a57600d6000888381518110613ec057613ec06154d5565b602002602001015160e00151815260200190815260200160002080549050600d6000898581518110613ef457613ef46154d5565b602002602001015160e001518152602001908152602001600020805490501015613d7657868281518110613d1657613d166154d5565b868181518110613f3c57613f3c6154d5565b602002602001015160800151600081518110613f5a57613f5a6154d5565b602002602001015160200151878381518110613f7857613f786154d5565b602002602001015160800151600081518110613f9657613f966154d5565b602002602001015160200151101561401a57868281518110613fba57613fba6154d5565b60200260200101519250868181518110613fd657613fd66154d5565b6020026020010151878381518110613ff057613ff06154d5565b60200260200101819052508287828151811061400e5761400e6154d5565b60200260200101819052505b8061402481615538565b915050613ca1565b508061403781615538565b915050613c89565b5093949350505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006115dc82846157a3565b6000838152600c602052604081206004810183835b825481101561415057866001600160a01b03168382815481106140df576140df6154d5565b60009182526020909120600290910201546001600160a01b03160361413e57828181548110614110576141106154d5565b9060005260206000209060020201600101548261412d9190615501565b9150614139888861492e565b614150565b8061414881615538565b9150506140ba565b509695505050505050565b6000828152600c602052604081206004810180549192909190036141c1578054600180820183556000928352602092839020855160029093020180546001600160a01b0319166001600160a01b0390931692909217825593909101519201919091555050565b60005b8154811080156141d7575082600b015481105b156142b85783602001518282815481106141f3576141f36154d5565b906000526020600020906002020160010154036142785760405162461bcd60e51b815260206004820152603a60248201527f596f752063616e277420706c616365206120626964207769746820746865207360448201527f616d65207072696365206f66206f746865722072616e6b657273000000000000606482015260840161074e565b836020015182828154811061428f5761428f6154d5565b906000526020600020906002020160010154106142b857806142b081615538565b9150506141c4565b81548114806142ed57506142e5612710611e98670de0b6b3a764000060055461409990919063ffffffff16565b846020015110155b61435f5760405162461bcd60e51b815260206004820152603960248201527f4269642068617320746f206578636565642063757272656e742070726963652060448201527f627920746865206d696e42696453697a65206f72206d6f726500000000000000606482015260840161074e565b82600b015481101561484f5781546001808201845560008481526020808220885160029095020180546001600160a01b0319166001600160a01b039095169490941784558701519282019290925583546143b99190615551565b90505b8181111561444a57826143d0600183615551565b815481106143e0576143e06154d5565b9060005260206000209060020201838281548110614400576144006154d5565b60009182526020909120825460029092020180546001600160a01b0319166001600160a01b0390921691909117815560019182015491015580614442816157ba565b9150506143bc565b508382828154811061445e5761445e6154d5565b600091825260209182902083516002929092020180546001600160a01b0319166001600160a01b03909216919091178155910151600190910155600b8301548254111561484f57815461451d9083906144b990600190615551565b815481106144c9576144c96154d5565b600091825260209091206002909102015483546001600160a01b039091169084906144f690600190615551565b81548110614506576145066154d5565b9060005260206000209060020201600101546138bf565b8180548061452d5761452d6157d1565b6000828152602080822060026000199094019384020180546001600160a01b0319168155600190810183905592909355878152600d90925260408220549190614577908390615501565b905060006040518060c0016040528089815260200183815260200186600188805490506145a49190615551565b815481106145b4576145b46154d5565b6000918252602091829020600290910201546001600160a01b03168252875491019087906145e490600190615551565b815481106145f4576145f46154d5565b906000526020600020906002020160010154815260200160028081111561461d5761461d614db0565b8152426020909101528554909150859061463990600190615551565b81548110614649576146496154d5565b600091825260209091206002909102015485546001600160a01b039091169089907f6c07ebb19031993fa040030f138d6ef63968ad268cd4689ba7e17002f80c8c4490889061469a90600190615551565b815481106146aa576146aa6154d5565b9060005260206000209060020201600101546002426040516146ce939291906155eb565b60405180910390a36000888152600d602090815260408083208054600180820183559185529383902085516006909502019384559184015183830155830151600280840180546001600160a01b0319166001600160a01b03909316929092179091556060840151600384015560808401516004840180548695949293919260ff1990911691849081111561476457614764614db0565b021790555060a082015181600501555050600e6000866001888054905061478b9190615551565b8154811061479b5761479b6154d5565b60009182526020808320600292830201546001600160a01b039081168552848201959095526040938401832080546001808201835591855293829020875160069095020193845590860151838201559285015182820180546001600160a01b0319169190951617909355606084015160038201556080840151600482018054869593949293919260ff1990911691849081111561483a5761483a614db0565b021790555060a0820151816005015550505050505b5050505050565b60006115dc8284615551565b60608360006148718585615551565b6001600160401b0381111561488857614888614ebd565b6040519080825280601f01601f1916602001820160405280156148b2576020820181803683370190505b509050845b84811015614924578281815181106148d1576148d16154d5565b01602001516001600160f81b031916826148eb8884615551565b815181106148fb576148fb6154d5565b60200101906001600160f81b031916908160001a9053508061491c81615538565b9150506148b7565b5095945050505050565b6000828152600c602052604081209060048201905b815481101561499957836001600160a01b0316828281548110614968576149686154d5565b60009182526020909120600290910201546001600160a01b031614614999578061499181615538565b915050614943565b60008282815481106149ad576149ad6154d5565b90600052602060002090600202016001015490508280549050821015614aa3575b82546149dc90600190615551565b821015614a6957826149ef836001615501565b815481106149ff576149ff6154d5565b9060005260206000209060020201838381548110614a1f57614a1f6154d5565b60009182526020909120825460029092020180546001600160a01b0319166001600160a01b0390921691909117815560019182015491015581614a6181615538565b9250506149ce565b82805480614a7957614a796157d1565b60008281526020812060026000199093019283020180546001600160a01b03191681556001015590555b6000868152600d602052604081205490614abe826001615501565b905060006040518060c001604052808a8152602001838152602001896001600160a01b0316815260200185815260200160016002811115614b0157614b01614db0565b8152602001428152509050336001600160a01b0316897f6c07ebb19031993fa040030f138d6ef63968ad268cd4689ba7e17002f80c8c4486600142604051614b4b939291906155eb565b60405180910390a36000898152600d602090815260408083208054600180820183559185529383902085516006909502019384559184015183830155830151600280840180546001600160a01b0319166001600160a01b03909316929092179091556060840151600384015560808401516004840180548695949293919260ff19909116918490811115614be157614be1614db0565b021790555060a091909101516005909101556001600160a01b038881166000908152600e602090815260408083208054600180820183559185529383902086516006909502019384559185015183830155840151600280840180546001600160a01b031916929095169190911790935560608401516003830155608084015160048301805486959293919260ff1990911691908490811115614c8557614c85614db0565b021790555060a082015181600501555050505050505050505050565b60405180610160016040528060006001600160a01b03168152602001606081526020016000815260200160006001600160a01b0316815260200160608152602001606081526020016000815260200160008152602001614d23604080516080810190915260008082526020820190815260200160008152602001600081525090565b815260200160008152602001606081525090565b828054828255906000526020600020908101928215614d72579160200282015b82811115614d72578235825591602001919060010190614d57565b50614d7e929150614d82565b5090565b5b80821115614d7e5760008155600101614d83565b600060208284031215614da957600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b600381106133db576133db614db0565b602080825282518282018190526000919060409081850190868401855b82811015614e53578151805185528681015187860152858101516001600160a01b03168686015260608082015190860152608080820151614e3381614dc6565b9086015260a0908101519085015260c09093019290850190600101614df3565b5091979650505050505050565b8035801515811461336057600080fd5b600060208284031215614e8257600080fd5b6115dc82614e60565b80356001600160a01b038116811461336057600080fd5b600060208284031215614eb457600080fd5b6115dc82614e8b565b634e487b7160e01b600052604160045260246000fd5b600082601f830112614ee457600080fd5b81356001600160401b0380821115614efe57614efe614ebd565b604051601f8301601f19908116603f01168101908282118183101715614f2657614f26614ebd565b81604052838152866020858801011115614f3f57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a08688031215614f7757600080fd5b85359450602086013560058110614f8d57600080fd5b935060408601356001600160401b03811115614fa857600080fd5b614fb488828901614ed3565b9598949750949560608101359550608001359392505050565b600081518084526020808501945080840160005b83811015614ffd57815187529582019590820190600101614fe1565b509495945050505050565b600081518084526020808501945080840160005b83811015614ffd57815180516001600160a01b03168852830151838801526040909601959082019060010161501c565b60005b8381101561506757818101518382015260200161504f565b50506000910152565b6000815180845261508881602086016020860161504c565b601f01601f19169290920160200192915050565b805182526020810151600581106150b5576150b5614db0565b602083015260408101516150c881614dc6565b6040830152606090810151910152565b80516001600160a01b0316825260006101c0602083015181602086015261510182860182614fcd565b91505060408301516040850152606083015161512860608601826001600160a01b03169052565b50608083015184820360808601526151408282615008565b91505060a083015184820360a086015261515a8282615070565b91505060c083015160c085015260e083015160e0850152610100808401516151848287018261509c565b50506101208301516101808501526101408301518482036101a08601526151ab8282615070565b95945050505050565b600081518084526020808501808196508360051b8101915082860160005b85811015614e535782840389526151ea8483516150d8565b988501989350908401906001016151d2565b60608152600061520f60608301866151b4565b60208301949094525060400152919050565b6001600160a01b038a81168252602082018a905288166040820152610180606082018190526000906152558382018a615070565b90508760808401528660a084015261527060c084018761509c565b8461014084015282810361016084015261528a8185615070565b9c9b505050505050505050505050565b600080604083850312156152ad57600080fd5b823591506152bd60208401614e8b565b90509250929050565b6020815260006115dc6020830184615008565b600080604083850312156152ec57600080fd5b50508035926020909101359150565b6020815260006115dc60208301846150d8565b6000806040838503121561532157600080fd5b61532a83614e8b565b946020939093013593505050565b60008083601f84011261534a57600080fd5b5081356001600160401b0381111561536157600080fd5b6020830191508360208260051b850101111561537c57600080fd5b9250929050565b80356003811061336057600080fd5b6000806000806000806000806000806101208b8d0312156153b257600080fd5b6153bb8b614e8b565b995060208b01356001600160401b03808211156153d757600080fd5b6153e38e838f01615338565b909b50995060408d0135985060608d013591508082111561540357600080fd5b61540f8e838f01614ed3565b975060808d0135965060a08d0135955061542b60c08e01615383565b945060e08d013593506101008d013591508082111561544957600080fd5b506154568d828e01614ed3565b9150509295989b9194979a5092959850565b6020815260006115dc60208301846151b4565b6000806040838503121561548e57600080fd5b823591506152bd60208401614e60565b6020815260006115dc6020830184614fcd565b6020808252600a90820152695374616666206f6e6c7960b01b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156115df576115df6154eb565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006001820161554a5761554a6154eb565b5060010190565b818103818111156115df576115df6154eb565b600181811c9082168061557857607f821691505b60208210810361559857634e487b7160e01b600052602260045260246000fd5b50919050565b6000826155bb57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601190820152704e6f74206f70656e2041756374696f6e7360781b604082015260600190565b838152606081016155fb84614dc6565b602082019390935260400152919050565b601f821115610cdb57600081815260208120601f850160051c810160208610156156335750805b601f850160051c820191505b81811015611f6b5782815560010161563f565b81516001600160401b0381111561566b5761566b614ebd565b61567f816156798454615564565b8461560c565b602080601f8311600181146156b4576000841561569c5750858301515b600019600386901b1c1916600185901b178555611f6b565b600085815260208120601f198616915b828110156156e3578886015182559484019460019091019084016156c4565b50858210156157015787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060c08201888352602060018060a01b03808a168286015260c0604086015282895480855260e0870191508a60005283600020945060005b818110156157665785548352600195860195928501920161574a565b50506060860198909852959095166080840152505060a00152509392505050565b6000825161579981846020870161504c565b9190910192915050565b80820281158282048414176115df576115df6154eb565b6000816157c9576157c96154eb565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220d50903a6fa01d040214c716ad1adbe4b19ef63933e2699041d42be551f89fb9c64736f6c63430008110033

Deployed Bytecode

0x6080604052600436106102255760003560e01c806378bd793511610123578063ca63468d116100ab578063d4f18e191161006f578063d4f18e191461068f578063e0e081d7146106a5578063ea120bc9146106bf578063f2fde38b146106df578063ff3ad0b4146106ff57600080fd5b8063ca63468d146105ea578063cbd2bdfd1461060a578063cc5c75cb1461062c578063d0b1109714610642578063d3c9cc261461066257600080fd5b80638da5cb5b116100f25780638da5cb5b1461055c57806396b5a755146105845780639979ef45146105a4578063a5099bae146105b7578063a9fffbd1146105d757600080fd5b806378bd7935146104cf5780637e710015146104fc578063802234a01461051c57806387463b831461053c57600080fd5b80634b99a397116101b15780636b1426a4116101755780636b1426a414610437578063704b6c0214610464578063715018a614610484578063753615cd1461049957806377ba6dc7146104b957600080fd5b80634b99a3971461037d578063571a26a0146103ac578063573ba4cf146103e15780636605ff66146104015780636759789f1461041757600080fd5b80632e21cf31116101f85780632e21cf31146102c75780632e993611146102e757806333f9a1ed1461030757806341d31d5914610327578063459d5bc71461036757600080fd5b806306893ed61461022a578063131d9a271461024c5780631825df21146102825780631ef5f4c5146102a7575b600080fd5b34801561023657600080fd5b5061024a610245366004614d97565b61071f565b005b34801561025857600080fd5b5061026c610267366004614d97565b61075c565b6040516102799190614dd6565b60405180910390f35b34801561028e57600080fd5b506002546102999081565b604051908152602001610279565b3480156102b357600080fd5b5061024a6102c2366004614d97565b610840565b3480156102d357600080fd5b5061024a6102e2366004614e70565b6108d9565b3480156102f357600080fd5b5061024a610302366004614d97565b61091b565b34801561031357600080fd5b5061024a610322366004614d97565b610ce0565b34801561033357600080fd5b50610357610342366004614ea2565b60046020526000908152604090205460ff1681565b6040519015158152602001610279565b34801561037357600080fd5b5061029960085481565b34801561038957600080fd5b5061039d610398366004614f5f565b610d14565b604051610279939291906151fc565b3480156103b857600080fd5b506103cc6103c7366004614d97565b6113ca565b60405161027999989796959493929190615221565b3480156103ed57600080fd5b506103576103fc36600461529a565b6115bf565b34801561040d57600080fd5b5061029960095481565b34801561042357600080fd5b5061026c610432366004614ea2565b6115e5565b34801561044357600080fd5b50610457610452366004614d97565b6116c1565b60405161027991906152c6565b34801561047057600080fd5b5061024a61047f366004614ea2565b6119d9565b34801561049057600080fd5b5061024a611a05565b3480156104a557600080fd5b5061024a6104b43660046152d9565b611a19565b3480156104c557600080fd5b5061029960075481565b3480156104db57600080fd5b506104ef6104ea366004614d97565b611ac5565b60405161027991906152fb565b34801561050857600080fd5b506103576105173660046152d9565b611ddf565b34801561052857600080fd5b5061024a61053736600461530e565b611f05565b34801561054857600080fd5b5061029961055736600461529a565b611f73565b34801561056857600080fd5b506000546040516001600160a01b039091168152602001610279565b34801561059057600080fd5b5061024a61059f366004614d97565b6122ef565b61024a6105b2366004614d97565b61264f565b3480156105c357600080fd5b506102996105d2366004614d97565b612a41565b6102996105e5366004615392565b612a4d565b3480156105f657600080fd5b5061024a610605366004614d97565b612dfb565b34801561061657600080fd5b5061061f612e08565b6040516102799190615468565b34801561063857600080fd5b5061029960065481565b34801561064e57600080fd5b5061024a61065d36600461547b565b6131c9565b34801561066e57600080fd5b5061068261067d366004614d97565b6132ae565b604051610279919061549e565b34801561069b57600080fd5b5061029960055481565b3480156106b157600080fd5b50600a546103579060ff1681565b3480156106cb57600080fd5b506102996106da366004614ea2565b613316565b3480156106eb57600080fd5b5061024a6106fa366004614ea2565b613365565b34801561070b57600080fd5b5061061f61071a366004614ea2565b6133de565b3360009081526004602052604090205460ff166107575760405162461bcd60e51b815260040161074e906154b1565b60405180910390fd5b600755565b6060600d6000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156108355760008481526020908190206040805160c08101825260068602909201805483526001810154938301939093526002808401546001600160a01b031691830191909152600383015460608301526004830154919291608084019160ff9091169081111561080757610807614db0565b600281111561081857610818614db0565b815260200160058201548152505081526020019060010190610791565b505050509050919050565b61084861380c565b604051600090339083908381818185875af1925050503d806000811461088a576040519150601f19603f3d011682016040523d82523d6000602084013e61088f565b606091505b50509050806108d55760405162461bcd60e51b81526020600482015260126024820152714661696c656420746f20706179206261636b60701b604482015260640161074e565b5050565b3360009081526004602052604090205460ff166109085760405162461bcd60e51b815260040161074e906154b1565b600a805460ff1916911515919091179055565b6000818152600c6020526040902060090154819060ff16600381600481111561094657610946614db0565b1415806109655750600481600481111561096257610962614db0565b14155b6109c05760405162461bcd60e51b815260206004820152602660248201527f6f6e6c7920666f7220656974686572206f70656e206f7220636c6f73652061756044820152656374696f6e7360d01b606482015260840161074e565b60018160048111156109d4576109d4614db0565b03610a39576000828152600c60205260409020600601544211610a395760405162461bcd60e51b815260206004820152601f60248201527f6f6e6c792076616c696420666f7220657870697265642061756374696f6e7300604482015260640161074e565b610a41613866565b6000838152600c6020526040902060098101805460ff19166003908117909155805460010190558054600182015460048301546001600160a01b03909216913091906000805b82821015610b93576000876004018381548110610aa657610aa66154d5565b6000918252602082206002909102015460018a0180546001600160a01b0390921693509085908110610ada57610ada6154d5565b90600052602060002001549050886004018481548110610afc57610afc6154d5565b90600052602060002090600202016001015483610b199190615501565b6040516323b872dd60e01b81529093506001600160a01b038916906323b872dd90610b4c908a9086908690600401615514565b600060405180830381600087803b158015610b6657600080fd5b505af1158015610b7a573d6000803e3d6000fd5b5050505050508180610b8b90615538565b925050610a87565b8015610bb457610bb4610bae6000546001600160a01b031690565b826138bf565b600954610bc190826139d5565b6009556000610bd08486615551565b90508015610c8b5760038801546001600160a01b03165b85841015610c89576000896001018581548110610c0657610c066154d5565b90600052602060002001549050886001600160a01b03166323b872dd8984846040518463ffffffff1660e01b8152600401610c4393929190615514565b600060405180830381600087803b158015610c5d57600080fd5b505af1158015610c71573d6000803e3d6000fd5b50505050508380610c8190615538565b945050610be7565b505b6004880154604080518d815260208101929092527f55efb9848a7b2ced6c81d35dffde0fd3c282f34aadd59d7150e313736dbf0ab6910160405180910390a15050505050505050610cdb60018055565b505050565b3360009081526004602052604090205460ff16610d0f5760405162461bcd60e51b815260040161074e906154b1565b600555565b60606000806000610d2460025490565b90506000816001600160401b03811115610d4057610d40614ebd565b604051908082528060200260200182016040528015610d7957816020015b610d66614ca1565b815260200190600190039081610d5e5790505b50905060008860015b8481116110fd5760016000828152600c602052604090206009015460ff166004811115610db157610db1614db0565b036110eb576000818152600c602090815260409182902082516101608101845281546001600160a01b0316815260018201805485518186028101860190965280865291949293858101939290830182828015610e2c57602002820191906000526020600020905b815481526020019060010190808311610e18575b50505050508152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015610edb576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610e93565b505050508152602001600582018054610ef390615564565b80601f0160208091040260200160405190810160405280929190818152602001828054610f1f90615564565b8015610f6c5780601f10610f4157610100808354040283529160200191610f6c565b820191906000526020600020905b815481529060010190602001808311610f4f57829003601f168201915b50505050508152602001600682015481526020016007820154815260200160088201604051806080016040529081600082015481526020016001820160009054906101000a900460ff166004811115610fc757610fc7614db0565b6004811115610fd857610fd8614db0565b81526020016001820160019054906101000a900460ff16600281111561100057611000614db0565b600281111561101157611011614db0565b81526020016002820154815250508152602001600b8201548152602001600c8201805461103d90615564565b80601f016020809104026020016040519081016040528092919081815260200182805461106990615564565b80156110b65780601f1061108b576101008083540402835291602001916110b6565b820191906000526020600020905b81548152906001019060200180831161109957829003601f168201915b5050505050815250508484815181106110d1576110d16154d5565b602002602001018190525082806110e790615538565b9350505b806110f581615538565b915050610d82565b508051600092501561111b57611114838d8c6139e1565b925061112e565b8b1561112e5761112b838d613b8d565b92505b60005b83518110156111915760006001600160a01b0316848281518110611157576111576154d5565b6020026020010151606001516001600160a01b03161461117f578261117b81615538565b9350505b8061118981615538565b915050611131565b506000826001600160401b038111156111ac576111ac614ebd565b6040519080825280602002602001820160405280156111e557816020015b6111d2614ca1565b8152602001906001900390816111ca5790505b5090506000805b85518110156112845760006001600160a01b0316868281518110611212576112126154d5565b6020026020010151606001516001600160a01b0316146112725785818151811061123e5761123e6154d5565b6020026020010151838381518110611258576112586154d5565b6020026020010181905250818061126e90615538565b9250505b8061127c81615538565b9150506111ec565b5061129082858f613c7c565b91508960000361129f57600199505b6112a98b85615551565b8a11156112c8576112ba8b85615551565b506112c58b85615551565b99505b60008a8351116112d95782516112db565b8a5b6001600160401b038111156112f2576112f2614ebd565b60405190808252806020026020018201604052801561132b57816020015b611318614ca1565b8152602001906001900390816113105790505b5090508a835111156113b45760005b8b811015611395578361134d828f615501565b8151811061135d5761135d6154d5565b6020026020010151828281518110611377576113776154d5565b6020026020010181905250808061138d90615538565b91505061133a565b50806113a18c8e615501565b86995099509950505050505050506113bf565b826113a18c8e615501565b955095509592505050565b600c6020526000908152604090208054600282015460038301546005840180546001600160a01b03948516959394909216929161140690615564565b80601f016020809104026020016040519081016040528092919081815260200182805461143290615564565b801561147f5780601f106114545761010080835404028352916020019161147f565b820191906000526020600020905b81548152906001019060200180831161146257829003601f168201915b50505050509080600601549080600701549080600801604051806080016040529081600082015481526020016001820160009054906101000a900460ff1660048111156114ce576114ce614db0565b60048111156114df576114df614db0565b81526020016001820160019054906101000a900460ff16600281111561150757611507614db0565b600281111561151857611518614db0565b81526020016002820154815250509080600b01549080600c01805461153c90615564565b80601f016020809104026020016040519081016040528092919081815260200182805461156890615564565b80156115b55780601f1061158a576101008083540402835291602001916115b5565b820191906000526020600020905b81548152906001019060200180831161159857829003601f168201915b5050505050905089565b60006115cb8383611f73565b6000036115d95760006115dc565b60015b90505b92915050565b6001600160a01b0381166000908152600e60209081526040808320805482518185028101850190935280835260609492939192909184015b828210156108355760008481526020908190206040805160c08101825260068602909201805483526001810154938301939093526002808401546001600160a01b031691830191909152600383015460608301526004830154919291608084019160ff9091169081111561169357611693614db0565b60028111156116a4576116a4614db0565b81526020016005820154815250508152602001906001019061161d565b6000818152600c6020908152604080832081516101608101835281546001600160a01b03168152600182018054845181870281018701909552808552606096959294858401939092919083018282801561173a57602002820191906000526020600020905b815481526020019060010190808311611726575b50505050508152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156117e9576000848152602090819020604080518082019091526002850290910180546001600160a01b031682526001908101548284015290835290920191016117a1565b50505050815260200160058201805461180190615564565b80601f016020809104026020016040519081016040528092919081815260200182805461182d90615564565b801561187a5780601f1061184f5761010080835404028352916020019161187a565b820191906000526020600020905b81548152906001019060200180831161185d57829003601f168201915b50505050508152602001600682015481526020016007820154815260200160088201604051806080016040529081600082015481526020016001820160009054906101000a900460ff1660048111156118d5576118d5614db0565b60048111156118e6576118e6614db0565b81526020016001820160019054906101000a900460ff16600281111561190e5761190e614db0565b600281111561191f5761191f614db0565b81526020016002820154815250508152602001600b8201548152602001600c8201805461194b90615564565b80601f016020809104026020016040519081016040528092919081815260200182805461197790615564565b80156119c45780601f10611999576101008083540402835291602001916119c4565b820191906000526020600020905b8154815290600101906020018083116119a757829003601f168201915b50505091909252505050608001519392505050565b6119e161380c565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b611a0d61380c565b611a176000614049565b565b3360009081526004602052604090205460ff16611a485760405162461bcd60e51b815260040161074e906154b1565b6000828152600c602052604090206001600982015460ff166004811115611a7157611a71614db0565b14611abe5760405162461bcd60e51b815260206004820152601c60248201527f4f6e6c792076616c696420666f72206f70656e2041756374696f6e7300000000604482015260640161074e565b6006015550565b611acd614ca1565b6000828152600c6020908152604080832081516101608101835281546001600160a01b031681526001820180548451818702810187019095528085529194929385840193909290830182828015611b4357602002820191906000526020600020905b815481526020019060010190808311611b2f575b50505050508152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015611bf2576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101611baa565b505050508152602001600582018054611c0a90615564565b80601f0160208091040260200160405190810160405280929190818152602001828054611c3690615564565b8015611c835780601f10611c5857610100808354040283529160200191611c83565b820191906000526020600020905b815481529060010190602001808311611c6657829003601f168201915b50505050508152602001600682015481526020016007820154815260200160088201604051806080016040529081600082015481526020016001820160009054906101000a900460ff166004811115611cde57611cde614db0565b6004811115611cef57611cef614db0565b81526020016001820160019054906101000a900460ff166002811115611d1757611d17614db0565b6002811115611d2857611d28614db0565b81526020016002820154815250508152602001600b8201548152602001600c82018054611d5490615564565b80601f0160208091040260200160405190810160405280929190818152602001828054611d8090615564565b8015611dcd5780601f10611da257610100808354040283529160200191611dcd565b820191906000526020600020905b815481529060010190602001808311611db057829003601f168201915b50505091909252509195945050505050565b6000828152600c60205260408120600281015460048201908403611e08576001925050506115df565b611e40612710611e2b670de0b6b3a764000060055461409990919063ffffffff16565b611e35919061559e565b6002840154906139d5565b841015611e52576000925050506115df565b60065481541015611e68576001925050506115df565b60005b600654811015611ef957611ed4612710611e98670de0b6b3a764000060055461409990919063ffffffff16565b611ea2919061559e565b838381548110611eb457611eb46154d5565b9060005260206000209060020201600101546139d590919063ffffffff16565b851115611ee757600193505050506115df565b80611ef181615538565b915050611e6b565b50600095945050505050565b611f0d61380c565b6040516323b872dd60e01b81526001600160a01b038316906323b872dd90611f3d90309033908690600401615514565b600060405180830381600087803b158015611f5757600080fd5b505af1158015611f6b573d6000803e3d6000fd5b505050505050565b6000828152600c6020908152604080832081516101608101835281546001600160a01b03168152600182018054845181870281018701909552808552869592948584019390929190830182828015611fea57602002820191906000526020600020905b815481526020019060010190808311611fd6575b50505050508152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015612099576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101612051565b5050505081526020016005820180546120b190615564565b80601f01602080910402602001604051908101604052809291908181526020018280546120dd90615564565b801561212a5780601f106120ff5761010080835404028352916020019161212a565b820191906000526020600020905b81548152906001019060200180831161210d57829003601f168201915b50505050508152602001600682015481526020016007820154815260200160088201604051806080016040529081600082015481526020016001820160009054906101000a900460ff16600481111561218557612185614db0565b600481111561219657612196614db0565b81526020016001820160019054906101000a900460ff1660028111156121be576121be614db0565b60028111156121cf576121cf614db0565b81526020016002820154815250508152602001600b8201548152602001600c820180546121fb90615564565b80601f016020809104026020016040519081016040528092919081815260200182805461222790615564565b80156122745780601f1061224957610100808354040283529160200191612274565b820191906000526020600020905b81548152906001019060200180831161225757829003601f168201915b50505091909252505050608081015190915060005b8151811015611ef9578181815181106122a4576122a46154d5565b6020026020010151600001516001600160a01b0316856001600160a01b0316036122dd576122d3816001615501565b93505050506115df565b806122e781615538565b915050612289565b8060016000828152600c602052604090206009015460ff16600481111561231857612318614db0565b146123355760405162461bcd60e51b815260040161074e906155c0565b6000828152600c602052604090206003015482906001600160a01b031633146123975760405162461bcd60e51b815260206004820152601460248201527321b0b63632b91034b9903737ba1029b2b63632b960611b604482015260640161074e565b61239f613866565b6000838152600c60209081526040808320600181015460048201805484518187028101870190955280855292959194929330939091908590849084015b82821015612424576000848152602090819020604080518082019091526002850290910180546001600160a01b031682526001908101548284015290835290920191016123dc565b50505050905060005b8381101561252c576000828281518110612449576124496154d5565b60200260200101516000015190506000816001600160a01b0316848481518110612475576124756154d5565b60200260200101516020015160405160006040518083038185875af1925050503d80600081146124c1576040519150601f19603f3d011682016040523d82523d6000602084013e6124c6565b606091505b50509050806125175760405162461bcd60e51b815260206004820152601c60248201527f4661696c656420746f207061796261636b20616e642063616e63656c00000000604482015260640161074e565b5050808061252490615538565b91505061242d565b50600385015485546001600160a01b03918216911660005b868110156125e6576000886001018281548110612563576125636154d5565b90600052602060002001549050826001600160a01b03166323b872dd8786846040518463ffffffff1660e01b81526004016125a093929190615514565b600060405180830381600087803b1580156125ba57600080fd5b505af11580156125ce573d6000803e3d6000fd5b505050505080806125de90615538565b915050612544565b5060008a8152600c60205260409020600901805460ff191660041790556003805460010190556040518a81527f28601d865dccc9f113e15a7185c1b38c085d598c71250d3337916a428536d7719060200160405180910390a150505050505050610cdb60018055565b600a5460ff166126915760405162461bcd60e51b815260206004820152600d60248201526c13585c9ad95d0818db1bdcd959609a1b604482015260640161074e565b8060016000828152600c602052604090206009015460ff1660048111156126ba576126ba614db0565b146126d75760405162461bcd60e51b815260040161074e906155c0565b6000828152600c6020526040902060060154829042111561272f5760405162461bcd60e51b8152602060048201526012602482015271185d58dd1a5bdb881a5cc8195e1c1a5c995960721b604482015260640161074e565b612737613866565b600034116127875760405162461bcd60e51b815260206004820181905260248201527f426964207072696365206d7573742062652067726561746572207468616e2030604482015260640161074e565b60006127948433346140a5565b90506127a08482611ddf565b6128125760405162461bcd60e51b815260206004820152603960248201527f5072696365206d7573742062652077697468696e2077696e6e6572734261746360448201527f6853697a652072616e6b202864656661756c7420333074682900000000000000606482015260840161074e565b600060405180604001604052806128263390565b6001600160a01b031681526020018390529050612843858261415b565b6000858152600d60205260408120549061285e826001615501565b905060006040518060c00160405280898152602001838152602001336001600160a01b03168152602001868152602001600060028111156128a1576128a1614db0565b81524260209182015260008a8152600d825260408082208054600180820183559184529284902085516006909402019283559284015182840155830151600280830180546001600160a01b0319166001600160a01b0390931692909217909155606084015160038301556080840151600483018054959650869593949193909260ff199091169190849081111561293a5761293a614db0565b021790555060a09190910151600590910155336000908152600e602090815260408083208054600180820183559185529383902085516006909502019384559184015183830155830151600280840180546001600160a01b0319166001600160a01b03909316929092179091556060840151600384015560808401516004840180548695949293919260ff199091169184908111156129db576129db614db0565b021790555060a082015181600501555050336001600160a01b0316887fabd8792ef473ed6c6dbd22ccbf1400c5e4a153f0837bcfa91e79243b0a175c8a87600042604051612a2b939291906155eb565b60405180910390a35050505050610cdb60018055565b60006115df8233611f73565b600a5460009060ff16612a925760405162461bcd60e51b815260206004820152600d60248201526c13585c9ad95d0818db1bdcd959609a1b604482015260640161074e565b612a9a613866565b3360009081526004602052604090205460ff16612ac95760405162461bcd60e51b815260040161074e906154b1565b42612adf6007548861485690919063ffffffff16565b11612b405760405162461bcd60e51b815260206004820152602b60248201527f4578706972792064617465206973206e6f742066617220656e6f75676820696e60448201526a207468652066757475726560a81b606482015260840161074e565b888314612ba75760405162461bcd60e51b815260206004820152602f60248201527f546f6b656e73206c656e677468206d7573742062652073657420746f2077696e60448201526e6e6572732062617463682073697a6560881b606482015260840161074e565b612bb5600280546001019055565b6002546000818152600c6020526040902080546001600160a01b0319166001600160a01b038e16178155909150612bf0600182018c8c614d37565b50600281018990556003810180546001600160a01b0319163317905560058101612c1a8982615652565b5060068101879055600781018290556040805160808101825287815260016020820152908101866002811115612c5257612c52614db0565b81526006546020918201528151600884019081559082015160098401805460ff19166001836004811115612c8857612c88614db0565b0217905550604082015160018201805461ff001916610100836002811115612cb257612cb2614db0565b021790555060609190910151600290910155600b8101849055600c8101612cd98482615652565b50333060005b8c811015612d815760008e8e83818110612cfb57612cfb6154d5565b87546040516323b872dd60e01b81526020909202939093013593506001600160a01b03909216916323b872dd9150612d3b90879087908690600401615514565b600060405180830381600087803b158015612d5557600080fd5b505af1158015612d69573d6000803e3d6000fd5b50505050508080612d7990615538565b915050612cdf565b507fbd38245a13e16c0b74cf18a220f7d34e7319f829ada15871d9d5c78d539a4269848460000160009054906101000a90046001600160a01b0316856001018e868860060154604051612dd996959493929190615711565b60405180910390a1505050612ded60018055565b9a9950505050505050505050565b612e0361380c565b600655565b60606000612e1560025490565b90506000816001600160401b03811115612e3157612e31614ebd565b604051908082528060200260200182016040528015612e6a57816020015b612e57614ca1565b815260200190600190039081612e4f5790505b50905060005b828110156131c257600c6000612e87836001615501565b8152602080820192909252604090810160002081516101608101835281546001600160a01b031681526001820180548451818702810187019095528085529194929385840193909290830182828015612eff57602002820191906000526020600020905b815481526020019060010190808311612eeb575b50505050508152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160048201805480602002602001604051908101604052809291908181526020016000905b82821015612fae576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101612f66565b505050508152602001600582018054612fc690615564565b80601f0160208091040260200160405190810160405280929190818152602001828054612ff290615564565b801561303f5780601f106130145761010080835404028352916020019161303f565b820191906000526020600020905b81548152906001019060200180831161302257829003601f168201915b50505050508152602001600682015481526020016007820154815260200160088201604051806080016040529081600082015481526020016001820160009054906101000a900460ff16600481111561309a5761309a614db0565b60048111156130ab576130ab614db0565b81526020016001820160019054906101000a900460ff1660028111156130d3576130d3614db0565b60028111156130e4576130e4614db0565b81526020016002820154815250508152602001600b8201548152602001600c8201805461311090615564565b80601f016020809104026020016040519081016040528092919081815260200182805461313c90615564565b80156131895780601f1061315e57610100808354040283529160200191613189565b820191906000526020600020905b81548152906001019060200180831161316c57829003601f168201915b5050505050815250508282815181106131a4576131a46154d5565b602002602001018190525080806131ba90615538565b915050612e70565b5092915050565b8160016000828152600c602052604090206009015460ff1660048111156131f2576131f2614db0565b1461320f5760405162461bcd60e51b815260040161074e906155c0565b3360009081526004602052604090205460ff1661323e5760405162461bcd60e51b815260040161074e906154b1565b613246613866565b6000838152600c602052604090206009810180546004919060ff191660018302179055506040805185815284151560208201527f7bd2bd1d5b732d033be84c5cec5276465a74064c22786763b791305c85c0b485910160405180910390a150610cdb60018055565b6000818152600c6020908152604091829020600181018054845181850281018501909552808552606094929383018282801561330957602002820191906000526020600020905b8154815260200190600101908083116132f5575b5050505050915050919050565b3360009081526004602052604081205460ff166133455760405162461bcd60e51b815260040161074e906154b1565b506001600160a01b0381166000908152600b60205260409020545b919050565b61336d61380c565b6001600160a01b0381166133d25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161074e565b6133db81614049565b50565b6060600060015b6002548111613432576000818152600c60205260409020600301546001600160a01b03808616911603613420578161341c81615538565b9250505b8061342a81615538565b9150506133e5565b506000816001600160401b0381111561344d5761344d614ebd565b60405190808252806020026020018201604052801561348657816020015b613473614ca1565b81526020019060019003908161346b5790505b509050600060015b6002548111613802576000818152600c60205260409020600301546001600160a01b038088169116036137f0576000818152600c602090815260409182902082516101608101845281546001600160a01b031681526001820180548551818602810186019096528086529194929385810193929083018282801561353157602002820191906000526020600020905b81548152602001906001019080831161351d575b50505050508152602001600282015481526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160048201805480602002602001604051908101604052809291908181526020016000905b828210156135e0576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101613598565b5050505081526020016005820180546135f890615564565b80601f016020809104026020016040519081016040528092919081815260200182805461362490615564565b80156136715780601f1061364657610100808354040283529160200191613671565b820191906000526020600020905b81548152906001019060200180831161365457829003601f168201915b50505050508152602001600682015481526020016007820154815260200160088201604051806080016040529081600082015481526020016001820160009054906101000a900460ff1660048111156136cc576136cc614db0565b60048111156136dd576136dd614db0565b81526020016001820160019054906101000a900460ff16600281111561370557613705614db0565b600281111561371657613716614db0565b81526020016002820154815250508152602001600b8201548152602001600c8201805461374290615564565b80601f016020809104026020016040519081016040528092919081815260200182805461376e90615564565b80156137bb5780601f10613790576101008083540402835291602001916137bb565b820191906000526020600020905b81548152906001019060200180831161379e57829003601f168201915b5050505050815250508383815181106137d6576137d66154d5565b602002602001018190525081806137ec90615538565b9250505b806137fa81615538565b91505061348e565b5090949350505050565b6000546001600160a01b03163314611a175760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161074e565b6002600154036138b85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161074e565b6002600155565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461390c576040519150601f19603f3d011682016040523d82523d6000602084013e613911565b606091505b50509050806139575760405162461bcd60e51b81526020600482015260126024820152714661696c656420746f20706179206261636b60701b604482015260640161074e565b6001600160a01b0383166000908152600b602052604090205461397a90836139d5565b6001600160a01b0384166000818152600b60209081526040918290209390935580519182529181018490527f943473d7f156d47b965634c405f8d98efee55257875df66522da90d91dd51591910160405180910390a1505050565b60006115dc8284615501565b6060600084516001600160401b038111156139fe576139fe614ebd565b604051908082528060200260200182016040528015613a3757816020015b613a24614ca1565b815260200190600190039081613a1c5790505b5090508260005b8651811015613b78576000878281518110613a5b57613a5b6154d5565b602002602001015160a00151905060005b8151811015613b635786604051602001613a869190615787565b60405160208183030381529060405280519060200120613aea8a8581518110613ab157613ab16154d5565b602002602001015160a0015183875185613acb9190615501565b865110613ae3578751613ade9086615501565b614862565b8551614862565b604051602001613afa9190615787565b6040516020818303038152906040528051906020012003613b5157888381518110613b2757613b276154d5565b6020026020010151858481518110613b4157613b416154d5565b6020026020010181905250613b63565b80613b5b81615538565b915050613a6c565b50508080613b7090615538565b915050613a3e565b50613b838286613b8d565b9695505050505050565b6060600083516001600160401b03811115613baa57613baa614ebd565b604051908082528060200260200182016040528015613be357816020015b613bd0614ca1565b815260200190600190039081613bc85790505b5090508215613c735760005b8451811015613c6b5783858281518110613c0b57613c0b6154d5565b602002602001015161010001516000015103613c5957848181518110613c3357613c336154d5565b6020026020010151828281518110613c4d57613c4d6154d5565b60200260200101819052505b80613c6381615538565b915050613bef565b5090506115df565b839150506115df565b6060613c86614ca1565b60005b8481101561403f576000613c9e826001615501565b90505b8581101561402c576002856004811115613cbd57613cbd614db0565b03613d7b57868181518110613cd457613cd46154d5565b602002602001015160c00151878381518110613cf257613cf26154d5565b602002602001015160c001511115613d7657868281518110613d1657613d166154d5565b60200260200101519250868181518110613d3257613d326154d5565b6020026020010151878381518110613d4c57613d4c6154d5565b602002602001018190525082878281518110613d6a57613d6a6154d5565b60200260200101819052505b61401a565b6003856004811115613d8f57613d8f614db0565b03613de857868181518110613da657613da66154d5565b602002602001015160c00151878381518110613dc457613dc46154d5565b602002602001015160c001511015613d7657868281518110613d1657613d166154d5565b6000856004811115613dfc57613dfc614db0565b03613e9157868181518110613e1357613e136154d5565b602002602001015160800151600081518110613e3157613e316154d5565b602002602001015160200151878381518110613e4f57613e4f6154d5565b602002602001015160800151600081518110613e6d57613e6d6154d5565b6020026020010151602001511115613d7657868281518110613d1657613d166154d5565b6004856004811115613ea557613ea5614db0565b03613f2a57600d6000888381518110613ec057613ec06154d5565b602002602001015160e00151815260200190815260200160002080549050600d6000898581518110613ef457613ef46154d5565b602002602001015160e001518152602001908152602001600020805490501015613d7657868281518110613d1657613d166154d5565b868181518110613f3c57613f3c6154d5565b602002602001015160800151600081518110613f5a57613f5a6154d5565b602002602001015160200151878381518110613f7857613f786154d5565b602002602001015160800151600081518110613f9657613f966154d5565b602002602001015160200151101561401a57868281518110613fba57613fba6154d5565b60200260200101519250868181518110613fd657613fd66154d5565b6020026020010151878381518110613ff057613ff06154d5565b60200260200101819052508287828151811061400e5761400e6154d5565b60200260200101819052505b8061402481615538565b915050613ca1565b508061403781615538565b915050613c89565b5093949350505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006115dc82846157a3565b6000838152600c602052604081206004810183835b825481101561415057866001600160a01b03168382815481106140df576140df6154d5565b60009182526020909120600290910201546001600160a01b03160361413e57828181548110614110576141106154d5565b9060005260206000209060020201600101548261412d9190615501565b9150614139888861492e565b614150565b8061414881615538565b9150506140ba565b509695505050505050565b6000828152600c602052604081206004810180549192909190036141c1578054600180820183556000928352602092839020855160029093020180546001600160a01b0319166001600160a01b0390931692909217825593909101519201919091555050565b60005b8154811080156141d7575082600b015481105b156142b85783602001518282815481106141f3576141f36154d5565b906000526020600020906002020160010154036142785760405162461bcd60e51b815260206004820152603a60248201527f596f752063616e277420706c616365206120626964207769746820746865207360448201527f616d65207072696365206f66206f746865722072616e6b657273000000000000606482015260840161074e565b836020015182828154811061428f5761428f6154d5565b906000526020600020906002020160010154106142b857806142b081615538565b9150506141c4565b81548114806142ed57506142e5612710611e98670de0b6b3a764000060055461409990919063ffffffff16565b846020015110155b61435f5760405162461bcd60e51b815260206004820152603960248201527f4269642068617320746f206578636565642063757272656e742070726963652060448201527f627920746865206d696e42696453697a65206f72206d6f726500000000000000606482015260840161074e565b82600b015481101561484f5781546001808201845560008481526020808220885160029095020180546001600160a01b0319166001600160a01b039095169490941784558701519282019290925583546143b99190615551565b90505b8181111561444a57826143d0600183615551565b815481106143e0576143e06154d5565b9060005260206000209060020201838281548110614400576144006154d5565b60009182526020909120825460029092020180546001600160a01b0319166001600160a01b0390921691909117815560019182015491015580614442816157ba565b9150506143bc565b508382828154811061445e5761445e6154d5565b600091825260209182902083516002929092020180546001600160a01b0319166001600160a01b03909216919091178155910151600190910155600b8301548254111561484f57815461451d9083906144b990600190615551565b815481106144c9576144c96154d5565b600091825260209091206002909102015483546001600160a01b039091169084906144f690600190615551565b81548110614506576145066154d5565b9060005260206000209060020201600101546138bf565b8180548061452d5761452d6157d1565b6000828152602080822060026000199094019384020180546001600160a01b0319168155600190810183905592909355878152600d90925260408220549190614577908390615501565b905060006040518060c0016040528089815260200183815260200186600188805490506145a49190615551565b815481106145b4576145b46154d5565b6000918252602091829020600290910201546001600160a01b03168252875491019087906145e490600190615551565b815481106145f4576145f46154d5565b906000526020600020906002020160010154815260200160028081111561461d5761461d614db0565b8152426020909101528554909150859061463990600190615551565b81548110614649576146496154d5565b600091825260209091206002909102015485546001600160a01b039091169089907f6c07ebb19031993fa040030f138d6ef63968ad268cd4689ba7e17002f80c8c4490889061469a90600190615551565b815481106146aa576146aa6154d5565b9060005260206000209060020201600101546002426040516146ce939291906155eb565b60405180910390a36000888152600d602090815260408083208054600180820183559185529383902085516006909502019384559184015183830155830151600280840180546001600160a01b0319166001600160a01b03909316929092179091556060840151600384015560808401516004840180548695949293919260ff1990911691849081111561476457614764614db0565b021790555060a082015181600501555050600e6000866001888054905061478b9190615551565b8154811061479b5761479b6154d5565b60009182526020808320600292830201546001600160a01b039081168552848201959095526040938401832080546001808201835591855293829020875160069095020193845590860151838201559285015182820180546001600160a01b0319169190951617909355606084015160038201556080840151600482018054869593949293919260ff1990911691849081111561483a5761483a614db0565b021790555060a0820151816005015550505050505b5050505050565b60006115dc8284615551565b60608360006148718585615551565b6001600160401b0381111561488857614888614ebd565b6040519080825280601f01601f1916602001820160405280156148b2576020820181803683370190505b509050845b84811015614924578281815181106148d1576148d16154d5565b01602001516001600160f81b031916826148eb8884615551565b815181106148fb576148fb6154d5565b60200101906001600160f81b031916908160001a9053508061491c81615538565b9150506148b7565b5095945050505050565b6000828152600c602052604081209060048201905b815481101561499957836001600160a01b0316828281548110614968576149686154d5565b60009182526020909120600290910201546001600160a01b031614614999578061499181615538565b915050614943565b60008282815481106149ad576149ad6154d5565b90600052602060002090600202016001015490508280549050821015614aa3575b82546149dc90600190615551565b821015614a6957826149ef836001615501565b815481106149ff576149ff6154d5565b9060005260206000209060020201838381548110614a1f57614a1f6154d5565b60009182526020909120825460029092020180546001600160a01b0319166001600160a01b0390921691909117815560019182015491015581614a6181615538565b9250506149ce565b82805480614a7957614a796157d1565b60008281526020812060026000199093019283020180546001600160a01b03191681556001015590555b6000868152600d602052604081205490614abe826001615501565b905060006040518060c001604052808a8152602001838152602001896001600160a01b0316815260200185815260200160016002811115614b0157614b01614db0565b8152602001428152509050336001600160a01b0316897f6c07ebb19031993fa040030f138d6ef63968ad268cd4689ba7e17002f80c8c4486600142604051614b4b939291906155eb565b60405180910390a36000898152600d602090815260408083208054600180820183559185529383902085516006909502019384559184015183830155830151600280840180546001600160a01b0319166001600160a01b03909316929092179091556060840151600384015560808401516004840180548695949293919260ff19909116918490811115614be157614be1614db0565b021790555060a091909101516005909101556001600160a01b038881166000908152600e602090815260408083208054600180820183559185529383902086516006909502019384559185015183830155840151600280840180546001600160a01b031916929095169190911790935560608401516003830155608084015160048301805486959293919260ff1990911691908490811115614c8557614c85614db0565b021790555060a082015181600501555050505050505050505050565b60405180610160016040528060006001600160a01b03168152602001606081526020016000815260200160006001600160a01b0316815260200160608152602001606081526020016000815260200160008152602001614d23604080516080810190915260008082526020820190815260200160008152602001600081525090565b815260200160008152602001606081525090565b828054828255906000526020600020908101928215614d72579160200282015b82811115614d72578235825591602001919060010190614d57565b50614d7e929150614d82565b5090565b5b80821115614d7e5760008155600101614d83565b600060208284031215614da957600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b600381106133db576133db614db0565b602080825282518282018190526000919060409081850190868401855b82811015614e53578151805185528681015187860152858101516001600160a01b03168686015260608082015190860152608080820151614e3381614dc6565b9086015260a0908101519085015260c09093019290850190600101614df3565b5091979650505050505050565b8035801515811461336057600080fd5b600060208284031215614e8257600080fd5b6115dc82614e60565b80356001600160a01b038116811461336057600080fd5b600060208284031215614eb457600080fd5b6115dc82614e8b565b634e487b7160e01b600052604160045260246000fd5b600082601f830112614ee457600080fd5b81356001600160401b0380821115614efe57614efe614ebd565b604051601f8301601f19908116603f01168101908282118183101715614f2657614f26614ebd565b81604052838152866020858801011115614f3f57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a08688031215614f7757600080fd5b85359450602086013560058110614f8d57600080fd5b935060408601356001600160401b03811115614fa857600080fd5b614fb488828901614ed3565b9598949750949560608101359550608001359392505050565b600081518084526020808501945080840160005b83811015614ffd57815187529582019590820190600101614fe1565b509495945050505050565b600081518084526020808501945080840160005b83811015614ffd57815180516001600160a01b03168852830151838801526040909601959082019060010161501c565b60005b8381101561506757818101518382015260200161504f565b50506000910152565b6000815180845261508881602086016020860161504c565b601f01601f19169290920160200192915050565b805182526020810151600581106150b5576150b5614db0565b602083015260408101516150c881614dc6565b6040830152606090810151910152565b80516001600160a01b0316825260006101c0602083015181602086015261510182860182614fcd565b91505060408301516040850152606083015161512860608601826001600160a01b03169052565b50608083015184820360808601526151408282615008565b91505060a083015184820360a086015261515a8282615070565b91505060c083015160c085015260e083015160e0850152610100808401516151848287018261509c565b50506101208301516101808501526101408301518482036101a08601526151ab8282615070565b95945050505050565b600081518084526020808501808196508360051b8101915082860160005b85811015614e535782840389526151ea8483516150d8565b988501989350908401906001016151d2565b60608152600061520f60608301866151b4565b60208301949094525060400152919050565b6001600160a01b038a81168252602082018a905288166040820152610180606082018190526000906152558382018a615070565b90508760808401528660a084015261527060c084018761509c565b8461014084015282810361016084015261528a8185615070565b9c9b505050505050505050505050565b600080604083850312156152ad57600080fd5b823591506152bd60208401614e8b565b90509250929050565b6020815260006115dc6020830184615008565b600080604083850312156152ec57600080fd5b50508035926020909101359150565b6020815260006115dc60208301846150d8565b6000806040838503121561532157600080fd5b61532a83614e8b565b946020939093013593505050565b60008083601f84011261534a57600080fd5b5081356001600160401b0381111561536157600080fd5b6020830191508360208260051b850101111561537c57600080fd5b9250929050565b80356003811061336057600080fd5b6000806000806000806000806000806101208b8d0312156153b257600080fd5b6153bb8b614e8b565b995060208b01356001600160401b03808211156153d757600080fd5b6153e38e838f01615338565b909b50995060408d0135985060608d013591508082111561540357600080fd5b61540f8e838f01614ed3565b975060808d0135965060a08d0135955061542b60c08e01615383565b945060e08d013593506101008d013591508082111561544957600080fd5b506154568d828e01614ed3565b9150509295989b9194979a5092959850565b6020815260006115dc60208301846151b4565b6000806040838503121561548e57600080fd5b823591506152bd60208401614e60565b6020815260006115dc6020830184614fcd565b6020808252600a90820152695374616666206f6e6c7960b01b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156115df576115df6154eb565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006001820161554a5761554a6154eb565b5060010190565b818103818111156115df576115df6154eb565b600181811c9082168061557857607f821691505b60208210810361559857634e487b7160e01b600052602260045260246000fd5b50919050565b6000826155bb57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601190820152704e6f74206f70656e2041756374696f6e7360781b604082015260600190565b838152606081016155fb84614dc6565b602082019390935260400152919050565b601f821115610cdb57600081815260208120601f850160051c810160208610156156335750805b601f850160051c820191505b81811015611f6b5782815560010161563f565b81516001600160401b0381111561566b5761566b614ebd565b61567f816156798454615564565b8461560c565b602080601f8311600181146156b4576000841561569c5750858301515b600019600386901b1c1916600185901b178555611f6b565b600085815260208120601f198616915b828110156156e3578886015182559484019460019091019084016156c4565b50858210156157015787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060c08201888352602060018060a01b03808a168286015260c0604086015282895480855260e0870191508a60005283600020945060005b818110156157665785548352600195860195928501920161574a565b50506060860198909852959095166080840152505060a00152509392505050565b6000825161579981846020870161504c565b9190910192915050565b80820281158282048414176115df576115df6154eb565b6000816157c9576157c96154eb565b506000190190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220d50903a6fa01d040214c716ad1adbe4b19ef63933e2699041d42be551f89fb9c64736f6c63430008110033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ 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.