ETH Price: $4,002.28 (+2.92%)

Contract

0x4381D8191bE655C7FDaC93a741A06b8a972B47Dd
 

Overview

ETH Balance

0.0495 ETH

Eth Value

$198.11 (@ $4,002.28/ETH)

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Buy150982192022-07-07 23:00:58892 days ago1657234858IN
0x4381D819...a972B47Dd
0 ETH0.0061150146.98980508
Buy150981872022-07-07 22:54:09892 days ago1657234449IN
0x4381D819...a972B47Dd
0 ETH0.0049405134.35324437
Buy150959762022-07-07 14:28:13892 days ago1657204093IN
0x4381D819...a972B47Dd
0 ETH0.0111050577.21763227
Buy150958432022-07-07 13:56:29892 days ago1657202189IN
0x4381D819...a972B47Dd
0.33 ETH0.0056281139.95196259
Buy150954892022-07-07 12:37:05892 days ago1657197425IN
0x4381D819...a972B47Dd
0 ETH0.0033717618.2400699
Transfer Ownersh...150740162022-07-04 5:00:22895 days ago1656910822IN
0x4381D819...a972B47Dd
0 ETH0.0004929617.20949229

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
161813052022-12-14 6:59:47732 days ago1671001187
0x4381D819...a972B47Dd
0.2805 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VinciNFTMarketplace

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 6 : VinciNFTMarketplace.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0 <0.9.0;

import "IERC721.sol";
import "IERC20.sol";
import "Ownable.sol";


//                          &&&&&%%%%%%%%%%#########*
//                      &&&&&&&&%%%%%%%%%%##########(((((
//                   @&&&&&&&&&%%%%%%%%%##########((((((((((
//                @@&&&&&&&&&&%%%%%%%%%#########(((((((((((((((
//              @@@&&&&&&&&%%%%%%%%%%##########((((((((((((((///(
//            %@@&&&&&&               ######(                /////.
//           @@&&&&&&&&&           #######(((((((       ,///////////
//          @@&&&&&&&&%%%           ####((((((((((*   .//////////////
//         @@&&&&&&&%%%%%%          ##((((((((((((/  ////////////////*
//         &&&&&&&%%%%%%%%%          *(((((((((//// //////////////////
//         &&&&%%%%%%%%%####          .((((((/////,////////////////***
//        %%%%%%%%%%%########.          ((/////////////////***********
//         %%%%%##########((((/          /////////////****************
//         ##########((((((((((/          ///////*********************
//         #####((((((((((((/////          /*************************,
//          #(((((((((////////////          *************************
//           (((((//////////////***          ***********************
//            ,//////////***********        *************,*,,*,,**
//              ///******************      *,,,,,,,,,,,,,,,,,,,,,
//                ******************,,    ,,,,,,,,,,,,,,,,,,,,,
//                   ****,,*,,,,,,,,,,,  ,,,,,,,,,,,,,,,,,,,
//                      ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
//                          .,,,,,,,,,,,,,,,,,,,,,,,


/**
 * @title NFT Marketplace
 * @author VINCI
 * @notice This contract support multiple NFT contract addresses
 * Vinci ERC20 token.
 */
contract VinciNFTMarketplace is Ownable {
    /// The backing NFT contract

    /// Tokens withdrawable by address of the ERC20 token.
    mapping(address => mapping(address => uint256)) public withdrawable;

    /// Current sales (NFTcontract => (tokenId => Sale))
    mapping(IERC721 => mapping(uint256 => Sale)) public sales;

    /// Current english auctions (NFTcontract => (tokenId => EnglishAuction))
    mapping(IERC721 => mapping(uint256 => EnglishAuction)) public englishAuctions;

    /// Current dutch auctions (NFTcontract => (tokenId => DucthAuction))
    mapping(IERC721 => mapping(uint256 => DutchAuction)) public dutchAuctions;

    /// Reentrancy lock
    bool private _locked;

    /// Fee in basis points
    uint256 public fee;

    // Margin in seconds for Dutch auction
    uint8 public marginSecondsDutchAuction = 180;

    /**
     * @notice An object describing a price
     * @param erc20Contract The address of the erc20 contract
     * @param price         The amount specified in erc20
     */
    struct Price {
        address erc20Contract;
        uint256 price;
    }

    /**
     * @dev An object describing a sale.
     * @param owner The owner of the NFT
     * @param erc20Contracts ERC20 contracts
     * @param prices         The prices of the NFT (denoted in erc20Contracts)
     * @dev Note that storage[] struct is not supported in Solidity, so we have
     *      to work around this by storing the values separately.
     */
    struct Sale {
        address owner;
        address[] erc20Contracts;
        uint256[] prices;
    }

    /**
     * @dev An object describing an english auction. English auctions are
     *      restricted by time. Any bid extends by a given amount of seconds.
     *
     * @param owner        The owner of the NFT
     * @param minPrice     The minimum amount that needs to be bid
     * @param bidder       The currently highest bidder. If no bid has been
     *                     made so far, bidder is address(0)
     * @param amount       The amount of the highest bid. If no bid has
     *                     been made so far, amount is 0
     * @param erc20token   Token used for bidding. Use address(0) for native payments
     * @param closeTime    The time when the auction closes
     * @param timeIncrease Amount of time added to the close time on every
     *                     bid
     */
    struct EnglishAuction {
        address owner;
        uint256 minPrice;
        address bidder;
        uint256 amount;
        address erc20token;
        uint256 closeTime;
        uint256 timeIncrease;
    }

    /**
     * @dev An object describing a dutch auction.
     * @param owner         The owner of the NFT
     * @param startPrice    The starting price of the dutch auction
     * @param endPrice      The ending price of the dutch auction
     * @param start         Timestamp of the auction start. It establishes when the price starts decreasing,
     although it can be bought before the start date.
     * @param end           Timestamp of the auction end. It establishes when the price stops decreasing,
     although it can be bought after this date.
     * @param erc20token    token used for the auction. Address(0) if native payment
     */
    struct DutchAuction {
        address owner;
        uint256 startPrice;
        uint256 endPrice;
        uint256 start;
        uint256 end;
        address erc20token;
    }

    modifier reentrancyLock() {
        require(!_locked, "locked");
        _locked = true;
        _;
        _locked = false;
    }

    modifier notSoldOrInAuction(IERC721 _nftContract, uint256 _tokenId) {
        require(
            sales[_nftContract][_tokenId].owner == address(0),
            "Token is already being sold"
        );
        require(
            englishAuctions[_nftContract][_tokenId].owner == address(0),
            "Token is already in english auction"
        );
        require(
            dutchAuctions[_nftContract][_tokenId].owner == address(0),
            "Token is already in dutch auction"
        );
        _;
    }

    modifier beingSold(IERC721 _nftContract, uint256 _tokenId) {
        require(sales[_nftContract][_tokenId].owner != address(0), "Token is not being sold");
        _;
    }

    modifier beingEnglishAuctioned(IERC721 _nftContract, uint256 _tokenId) {
        require(
            englishAuctions[_nftContract][_tokenId].owner != address(0),
            "Token is not being auctioned"
        );
        require(
            englishAuctions[_nftContract][_tokenId].closeTime > block.timestamp,
            "Auction is closed"
        );
        _;
    }

    // Start and end dates of Dutch auction do not modify the beingDutchAuctioned status.
    // It can be sold at any time regardless of start and end date.
    modifier beingDutchAuctioned(IERC721 _nftContract, uint256 _tokenId) {
        require(
            dutchAuctions[_nftContract][_tokenId].owner != address(0),
            "Token is not being auctioned"
        );
        _;
    }

    /**
     * @dev Event for the start of a sale
     * @param _nftContract Contract address of the NFT
     * @param tokenId The id of the NFT
     * @param owner   The owner of the NFT
     * @param prices  List of prices of the sale (list of Price struct)
     */
    event SaleStarted(
        IERC721 _nftContract,
        uint256 tokenId,
        address owner,
        Price[] prices
    );

    /**
     * @dev Event for the start of a sale
     * @param _nftContract Contract address of the NFT
     * @param tokenId The id of the NFT
     * @param owner   The owner of the NFT
     * @param prices   List of prices of the sale (list of Price struct)
     */
    event SaleStartedInBatch(
        IERC721 _nftContract,
        uint256 tokenId,
        address owner,
        Price[] prices
    );

    /**
     * @dev Event for the cancel of a sale
     * @param _nftContract Contract address of the NFT
     * @param tokenId The id of the NFT
     * @param owner   The owner of the NFT
     */
    event SaleCanceled(
        IERC721 _nftContract,
        uint256 tokenId,
        address owner
    );

    /**
     * @dev Event for a successful sale
     * @param _nftContract Contract address of the NFTf
     * @param tokenId       The id of the NFT
     * @param price         The price of the NFT (denoted in erc20contract)
     * @param buyer         The buyer of the NFT
     * @param erc20contract The buyer of the NFT
     */
    event NFTSold(
        IERC721 _nftContract,
        uint256 tokenId,
        uint256 price,
        address buyer,
        address erc20contract
    );

    /**
     * @dev Event for the start of an english auction
     * @param _nftContract Contract address of the NFT
     * @param tokenId      The id of the NFT
     * @param minPrice     The minimum bid
     * @param owner        The owner of the NFT
     * @param erc20token   Token address in which NFT is being auctioned
     * @param closeTime    Timestamp when this auction closes
     * @param timeIncrease Amount of seconds added to close time on every bid
     */
    event EnglishAuctionStarted(
        IERC721 _nftContract,
        uint256 tokenId,
        uint256 minPrice,
        address owner,
        address erc20token,
        uint256 closeTime,
        uint256 timeIncrease
    );

    /**
     * @dev Event for a new bid on an english auction
     * @param _nftContract Contract address of the NFT
     * @param tokenId The id of the NFT
     * @param amount  The bid
     * @param bidder  The bidder
     */
    event EnglishNewBid(
        IERC721 _nftContract,
        uint256 tokenId,
        uint256 amount,
        address bidder
    );

    /**
     * @dev Event for a successful auction
     * @param _nftContract Contract address of the NFT
     * @param tokenId The id of the NFT
     * @param amount  The price of the NFT (denoted in erc20contract of the auction)
     * @param buyer   The buyer of the NFT
     */
    event EnglishAuctionFinalized(
        IERC721 _nftContract,
        uint256 tokenId,
        uint256 amount,
        address buyer
    );

    /**
     * @dev Event for a canceled english auction
     * @param _nftContract Contract address of the NFT
     * @param tokenId The id of the NFT
     * @param owner   The owner of the NFT
     */
    event EnglishAuctionCanceled(
        IERC721 _nftContract,
        uint256 tokenId,
        address owner
    );

    /**
     * @dev Event for the start of a dutch auction
     * @param _nftContract Contract address of the NFT
     * @param tokenId    The id of the NFT
     * @param startPrice Starting price
     * @param endPrice   Ending price
     * @param start      Starting timestamp
     * @param end        Ending timestamp
     * @param erc20token    token used for the auction. Address(0) if native payment
     */
    event DutchAuctionStarted(
        IERC721 _nftContract,
        uint256 tokenId,
        uint256 startPrice,
        uint256 endPrice,
        uint256 start,
        uint256 end,
        address erc20token
    );

    /**
     * @dev Event for a successful dutch auction
     * @param _nftContract Contract address of the NFT
     * @param tokenId       The id of the NFT
     * @param amount        The price of the NFT (denoted in erc20contract of the auction)
     * @param buyer         The buyer of the NFT
     * @param erc20token    token used for the auction. Address(0) if native payment
     */
    event DutchAuctionFinalized(
        IERC721 _nftContract,
        uint256 tokenId,
        uint256 amount,
        address buyer,
        address erc20token
    );

    /**
     * @dev Event for a canceled dutch auction
     * @param _nftContract Contract address of the NFT
     * @param tokenId The id of the NFT
     * @param owner   The owner of the NFT
     */
    event DutchAuctionCanceled(
        IERC721 _nftContract,
        uint256 tokenId,
        address owner
    );

    /**
     * @dev Event for a withdrawal action
     * @param erc20token   address of the token withdrawn (address(0) for native token)
     * @param amount        amount withdrawn
     * @param sender        caller
     */
    event Withdrawal(
        address erc20token,
        uint amount,
        address sender
    );

    /**
     * @dev Create a new NFT auction contract
     */
    constructor() {
        _locked = false;
        fee = 1500;
        // 15% fees kept by VINCI to give to the artists on the first sale
    }

    /**
     * @notice Witdraw ERC20 token that belong to me. Use this function to
     *         withdraw after a successful auction or sale, or when a bid was
     *         outbid.
     * @param _erc20token The address of the erc20 token
     */
    function withdraw(address _erc20token) public reentrancyLock {
        address sender = _msgSender();
        uint256 amount = withdrawable[sender][_erc20token];
        require(amount > 0, "Nothing to withdraw");

        withdrawable[sender][_erc20token] = 0;

        // address(0) is used as a proxy for native currency payments
        if (_erc20token == address(0)) {
            (bool success,) = sender.call{value : amount}("");
            require(success, "Native payment to address failed");
        } else {
            IERC20 _erc20contract = IERC20(_erc20token);
            require(_erc20contract.balanceOf(address(this)) >= amount, "Not enough funds in contract");
            _erc20contract.transfer(sender, amount);
        }
        emit Withdrawal(_erc20token, amount, sender);
    }

    /**
     * @notice Set the fee. Only owner.
     * @param _fee The fee specified in BPS
     */
    function setFee(uint256 _fee) public onlyOwner {
        require(_fee <= 10000, "Can't set a fee larger than 100%");
        fee = _fee;
    }

    /**
     * @notice Sets the margin in seconds for which not to take into account the price
     variations in a dutch bid
     * @param _marginSecondsDutchAuction margin in seconds
     */
    function setMarginSecondsForDutchAuction(uint8 _marginSecondsDutchAuction) public onlyOwner {
        require(_marginSecondsDutchAuction > 0, "Can't set a negative number");
        marginSecondsDutchAuction = _marginSecondsDutchAuction;
    }


    /**
     * @notice Start a new sale
     * @dev Emits a `SaleStarted` event
     * @dev While the sale proceeds, the NFT is stored inside of the sales
     *      contract.
     * @param _nftContract Contract address of the NFT
     * @param _tokenId        The id of the NFT
     * @param prices         Prices of the sale
     */
    function startSale(IERC721 _nftContract, uint256 _tokenId, Price[] calldata prices)
    public
    reentrancyLock
    notSoldOrInAuction(_nftContract, _tokenId)
    {
        require(prices.length <= 10, "Only up to 10 prices are supported");
        require(prices.length > 0, "At least one price needs to be specified");

        uint256[] memory _prices = new uint256[](prices.length);
        address[] memory _addresses = new address[](prices.length);

        for (uint256 i = 0; i < prices.length; i++) {
            _prices[i] = prices[i].price;
            _addresses[i] = prices[i].erc20Contract;
        }

        sales[_nftContract][_tokenId] = Sale(_msgSender(), _addresses, _prices);

        _nftContract.transferFrom(_msgSender(), address(this), _tokenId);
        emit SaleStarted(_nftContract, _tokenId, _msgSender(), prices);
    }

    /**
     * @notice Start a new sale for multiple _tokenIds in the same transaction (to save gas)
               All tokens are put for sale for the same price (and the same erc20 token)
               Accepts the zero address for native payments

     * @dev Emits a `SaleStartedInBatch` event
     * @dev While the sale proceeds, the NFT is stored inside of the sales
     *      contract.
     * @param _nftContract Contract address of the NFT
     * @param _tokenIds       The id of the NFT
     * @param prices         Array of Prices for the sale. Price is [address erc20contract, uint256 price]
     */
    function startBatchSale(
        IERC721 _nftContract,
        uint256[] calldata _tokenIds,
        Price[] calldata prices
    ) public {
        require(_tokenIds.length < 301, "Only up to 300 tokenIds at once");
        require(prices.length <= 10, "Only up to 10 prices are supported");
        require(prices.length > 0, "At least one price needs to be specified");

        uint256[] memory _prices = new uint256[](prices.length);
        address[] memory _addresses = new address[](prices.length);

        for (uint256 i = 0; i < prices.length; i++) {
            _prices[i] = prices[i].price;
            _addresses[i] = prices[i].erc20Contract;
        }

        for (uint i = 0; i < _tokenIds.length; i++) {
            sales[_nftContract][_tokenIds[i]] = Sale(_msgSender(), _addresses, _prices);
            _nftContract.transferFrom(_msgSender(), address(this), _tokenIds[i]);
            emit SaleStartedInBatch(_nftContract, _tokenIds[i], _msgSender(), prices);
        }
    }

    /**
     * @notice Cancel of an ongoing sale
     * @dev Emits a `SaleCanceled` event
     * @notice Returns the NFT to its owner
     * @param _nftContract Contract address of the NFT
     * @param _tokenId The id of the token
     * @dev Requires to be executed as the same account that initially crated
     *      the sale.
     */
    function cancelSale(IERC721 _nftContract, uint256 _tokenId)
    public
    reentrancyLock
    beingSold(_nftContract, _tokenId)
    {
        require(_msgSender() == sales[_nftContract][_tokenId].owner, "Must be token owner");
        delete sales[_nftContract][_tokenId].owner;
        delete sales[_nftContract][_tokenId].prices;
        delete sales[_nftContract][_tokenId].erc20Contracts;
        _nftContract.transferFrom(address(this), _msgSender(), _tokenId);
        emit SaleCanceled(_nftContract, _tokenId, _msgSender());
    }

    /**
     * @notice Buy an NFT for sale. Requires ERC20 to be approved. Use address(0) to buy with native token
     * @dev Transfers NFT, makes ERC20 claimable
     * @param _nftContract Contract address of the NFT
     * @param _tokenId       The id of the token to buy
     * @param _erc20Contract The address of the ERC20 the buyer wants to use. Use address(0) to buy
     with native token
     */
    function buy(IERC721 _nftContract, uint256 _tokenId, address _erc20Contract)
    public
    payable
    reentrancyLock
    beingSold(_nftContract, _tokenId)
    {
        uint256 price = 0;
        bool found = false;
        for (uint256 i = 0; i < sales[_nftContract][_tokenId].erc20Contracts.length; i++) {
            if (sales[_nftContract][_tokenId].erc20Contracts[i] == _erc20Contract) {
                found = true;
                price = sales[_nftContract][_tokenId].prices[i];
            }
        }
        require(
            found,
            "The token is not being sold in exchange for the given erc20 address"
        );

        _addWithdrawable(sales[_nftContract][_tokenId].owner, _erc20Contract, price);
        delete sales[_nftContract][_tokenId].owner;
        delete sales[_nftContract][_tokenId].prices;
        delete sales[_nftContract][_tokenId].erc20Contracts;

        // Execute payments
        if (_erc20Contract == address(0)) {
            // for native payments, the payment needs to come in the msg.value
            require(msg.value == price, "Not enough value to purchase");
        } else {
            IERC20 erc20 = IERC20(_erc20Contract);
            require(msg.value == 0, "Payment cannot be in ERC20 and native currency simultaneously");
            require(erc20.balanceOf(_msgSender()) >= price, "Not enough token balance");
            erc20.transferFrom(_msgSender(), address(this), price);
        }
        _nftContract.transferFrom(address(this), _msgSender(), _tokenId);

        emit NFTSold(_nftContract, _tokenId, price, _msgSender(), _erc20Contract);
    }


    /**
     * @notice Start a new english auction. The NFT is kept in this contract
     *         during the auction
     * @param _nftContract Contract address of the NFT
     * @param _tokenId      The id of the token to start auctioning
     * @param minPrice     The minimum amount a bid should be
     * @param erc20token   Token address in which the item is being auctioned
     * @param closeTime    Timestamp when the auction should close
     * @param timeIncrease How many seconds are added for every bid?
     */
    function englishStartAuction(
        IERC721 _nftContract,
        uint256 _tokenId,
        uint256 minPrice,
        uint256 closeTime,
        uint256 timeIncrease,
        address erc20token
    ) public reentrancyLock notSoldOrInAuction(_nftContract, _tokenId) {
        // It must be -1, because bids can only enter if greater than current amount
        uint amount = minPrice == 0 ? 0 : minPrice - 1;

        englishAuctions[_nftContract][_tokenId] = EnglishAuction(
            _msgSender(),
            minPrice,
            address(0),
            amount,
            erc20token,
            closeTime,
            timeIncrease
        );
        _nftContract.transferFrom(_msgSender(), address(this), _tokenId);
        emit EnglishAuctionStarted(
            _nftContract,
            _tokenId,
            minPrice,
            _msgSender(),
            erc20token,
            closeTime,
            timeIncrease
        );
    }

    /**
     * @notice Bid on an english auction
     * @param _tokenId Id of token
     * @param amount  Amount being bid
     */
    function englishBid(IERC721 _nftContract, uint256 _tokenId, uint256 amount)
    public
    payable
    reentrancyLock
    beingEnglishAuctioned(_nftContract, _tokenId) {

        address sender = _msgSender();
        address erc20BidToken = englishAuctions[_nftContract][_tokenId].erc20token;

        require(amount >= englishAuctions[_nftContract][_tokenId].amount, "Bid is not high enough");

        // store tokens from the previous bidder in a withdrawable
        if (englishAuctions[_nftContract][_tokenId].bidder != address(0)) {
            withdrawable[englishAuctions[_nftContract][_tokenId].bidder][
            address(englishAuctions[_nftContract][_tokenId].erc20token)
            ] += englishAuctions[_nftContract][_tokenId].amount;
        }

        englishAuctions[_nftContract][_tokenId].bidder = sender;
        englishAuctions[_nftContract][_tokenId].amount = amount;
        englishAuctions[_nftContract][_tokenId].closeTime += englishAuctions[_nftContract][_tokenId].timeIncrease;

        if (erc20BidToken == address(0)) {
            // for native payments, the payment needs to come in the msg.value
            require(msg.value == amount, "Value not matching amount");
        } else {
            require(msg.value == 0, "No need to add value if paid with ERC20");
            IERC20 erc20BidContract = IERC20(erc20BidToken);
            // if sender does not have enough tokens, the transaction will simply revert
            erc20BidContract.transferFrom(sender, address(this), amount);
        }

        emit EnglishNewBid(_nftContract, _tokenId, amount, _msgSender());
    }

    /**
     * @notice Cancel English auction. This is only possible as long as there
     *         has not been any bids so far.
     * @param _nftContract Contract address of the NFT
     * @param _tokenId The token to cancel the auction for
     */
    function englishCancelAuction(IERC721 _nftContract, uint256 _tokenId) public reentrancyLock {
        require(
            englishAuctions[_nftContract][_tokenId].owner == _msgSender(),
            "Must be token owner"
        );
        require(
            englishAuctions[_nftContract][_tokenId].bidder == address(0),
            "There is already a bid, can't cancel anymore"
        );

        _deleteEnglishAuction(_nftContract, _tokenId);

        _nftContract.transferFrom(address(this), _msgSender(), _tokenId);
        emit EnglishAuctionCanceled(_nftContract, _tokenId, _msgSender());
    }

    /**
     * @notice Finalize an english auction. Call this once the auction is over
     *         to accept the final bid.
     * @param _nftContract Contract address of the NFT
     * @param _tokenId The token id
     */
    function englishFinalizeAuction(IERC721 _nftContract, uint256 _tokenId) public reentrancyLock {
        require(
            englishAuctions[_nftContract][_tokenId].owner != address(0),
            "Token is not being auctioned"
        );
        require(
            englishAuctions[_nftContract][_tokenId].closeTime <= block.timestamp ||
            _msgSender() == englishAuctions[_nftContract][_tokenId].owner,
            "Only the owner can finalize the auction before its end"
        );
        require(
            englishAuctions[_nftContract][_tokenId].bidder != address(0),
            "No bid has been made"
        );

        uint256 amount = englishAuctions[_nftContract][_tokenId].amount;
        _addWithdrawable(
            englishAuctions[_nftContract][_tokenId].owner,
            englishAuctions[_nftContract][_tokenId].erc20token,
            amount
        );

        _nftContract.transferFrom(
            address(this),
            englishAuctions[_nftContract][_tokenId].bidder,
            _tokenId
        );

        emit EnglishAuctionFinalized(
            _nftContract,
            _tokenId,
            amount,
            englishAuctions[_nftContract][_tokenId].bidder
        );

        _deleteEnglishAuction(_nftContract, _tokenId);
    }

    /**
     * @notice Starts a new dutch auction. The NFT is kept in this contract
     *         during the auction
     * @param _nftContract Contract address of the NFT
     * @param _tokenId       The id of the token
     * @param startPrice    Starting price
     * @param endPrice      Ending price
     * @param start         Starting timestamp
     * @param end           Ending timestamp
     * @param erc20token    token used for the auction. Address(0) if native payment
     */
    function dutchStartAuction(
        IERC721 _nftContract,
        uint256 _tokenId,
        uint256 startPrice,
        uint256 endPrice,
        uint256 start,
        uint256 end,
        address erc20token
    ) public reentrancyLock notSoldOrInAuction(_nftContract, _tokenId) {
        require(startPrice > endPrice, "Price has to be decreasing with time");
        require(start < end, "End has to be after start");

        dutchAuctions[_nftContract][_tokenId] = DutchAuction(
            _msgSender(),
            startPrice,
            endPrice,
            start,
            end,
            erc20token
        );
        _nftContract.transferFrom(_msgSender(), address(this), _tokenId);
        emit DutchAuctionStarted(_nftContract, _tokenId, startPrice, endPrice, start, end, erc20token);
    }

    /**
     * @notice Function to determine price of dutch auction at given timestamp
     * @param _nftContract Contract address of the NFT
     * @param _tokenId   The token id
     * @param timestamp The timestamp.
     * @return The price of the token
     */
    function dutchAuctionPriceAtTimestamp(IERC721 _nftContract, uint256 _tokenId, uint256 timestamp)
    public
    view
    beingDutchAuctioned(_nftContract, _tokenId)
    returns (uint256)
    {
        if (timestamp <= dutchAuctions[_nftContract][_tokenId].start) {
            return dutchAuctions[_nftContract][_tokenId].startPrice;
        }
        if (dutchAuctions[_nftContract][_tokenId].end <= timestamp) {
            return dutchAuctions[_nftContract][_tokenId].endPrice;
        }
        return
        dutchAuctions[_nftContract][_tokenId].startPrice -
        ((timestamp - dutchAuctions[_nftContract][_tokenId].start) *
        (dutchAuctions[_nftContract][_tokenId].startPrice -
        dutchAuctions[_nftContract][_tokenId].endPrice)) /
        (dutchAuctions[_nftContract][_tokenId].end - dutchAuctions[_nftContract][_tokenId].start);
    }

    /**
     * @notice Function to determine current price of dutch auction
     * @param _nftContract Contract address of the NFT
     * @param _tokenId   The token id
     * @return The price of the token
     */
    function dutchAuctionCurrentPrice(IERC721 _nftContract, uint256 _tokenId)
    public
    view
    returns (uint256)
    {
        return dutchAuctionPriceAtTimestamp(_nftContract, _tokenId, block.timestamp);
    }

    /**
     * @notice Buy a token from a dutch auction
     * @param _nftContract Contract address of the NFT
     * @param _tokenId The id of the token
     */
    function dutchBuyToken(IERC721 _nftContract, uint256 _tokenId)
    public
    payable
    reentrancyLock
    beingDutchAuctioned(_nftContract, _tokenId)
    {
        uint256 price = dutchAuctionCurrentPrice(_nftContract, _tokenId);
        address erc20BidToken = dutchAuctions[_nftContract][_tokenId].erc20token;

        _addWithdrawable(
            dutchAuctions[_nftContract][_tokenId].owner,
            address(erc20BidToken), // address(0) for native payment
            price
        );

        if (erc20BidToken == address(0)) {
            // for native payments, the payment needs to come in the msg.value

            require(msg.value >= price, "Not enough value to purchase");
            require(msg.value < price + marginSecondsDutchAuction * _priceDropPerSecondForDutchAuction(_nftContract, _tokenId), "Value too high");
        } else {
            IERC20 erc20BidContract = IERC20(erc20BidToken);
            erc20BidContract.transferFrom(_msgSender(), address(this), price);
        }
        _nftContract.transferFrom(address(this), _msgSender(), _tokenId);

        emit DutchAuctionFinalized(_nftContract, _tokenId, price, _msgSender(), erc20BidToken);
        _deleteDutchAuction(_nftContract, _tokenId);
    }

    /**
     * @notice Owner of NFT Cancels a dutch auction only when it has finished. Used to retrieve
     the NFT (by the owner) when nobody has set a bid on it before the end-time.
     * @param _nftContract Contract address of the NFT
     * @param _tokenId The id of the token
     */
    function dutchCancelAuction(IERC721 _nftContract, uint256 _tokenId)
    public
    reentrancyLock
    beingDutchAuctioned(_nftContract, _tokenId)
    {
        require(
            dutchAuctions[_nftContract][_tokenId].end <= block.timestamp,
            "Auction has not ended yet"
        );

        require(_msgSender() == dutchAuctions[_nftContract][_tokenId].owner, "Must be token owner");

        emit DutchAuctionCanceled(_nftContract, _tokenId, dutchAuctions[_nftContract][_tokenId].owner);

        _nftContract.transferFrom(
            address(this),
            dutchAuctions[_nftContract][_tokenId].owner,
            _tokenId
        );

        _deleteDutchAuction(_nftContract, _tokenId);
    }

    /**
     * @notice Get owner of sale
     * @param _nftContract Contract address of the NFT
     * @param _tokenId The id of the token
     */
    function getSaleOwner(IERC721 _nftContract, uint256 _tokenId) public view returns (address) {
        return sales[_nftContract][_tokenId].owner;
    }

    /**
     * @notice Get number of prices of a sale
     * @param _nftContract Contract address of the NFT
     * @param tokenId The id of the token
     */
    function getSalePricesLength(IERC721 _nftContract, uint256 tokenId)
    public
    view
    returns (uint256)
    {
        return sales[_nftContract][tokenId].prices.length;
    }

    /**
     * @notice Get a price of a sale
     * @param _nftContract Contract address of the NFT
     * @param tokenId The id of the token
     * @param index   The index into the sale array
     */
    function getSalePrice(IERC721 _nftContract, uint256 tokenId, uint256 index)
    public
    view
    returns (Price memory)
    {
        return
        Price(
            sales[_nftContract][tokenId].erc20Contracts[index],
            sales[_nftContract][tokenId].prices[index]
        );
    }

    /**
     * @notice Displays the last price bid on a tokenId that is being auctioned
     * @param _nftContract Contract address of the NFT
     * @param tokenId The id of the token
     */
    function readEnglishAuctionCurrentPrice(IERC721 _nftContract, uint256 tokenId) public view returns (uint){
        require(isInEnglishAuction(_nftContract, tokenId), "Not in English auction");
        return englishAuctions[_nftContract][tokenId].amount;
    }

    /**
     * @notice Reads the ERC20 in which the tokenId is being auctioned. Returns 0x address if auctioned with nativee
     * @param _nftContract Contract address of the NFT
     * @param tokenId The id of the token
     */
    function readEnglishAuctionERC20token(IERC721 _nftContract, uint256 tokenId) public view returns (address){
        require(isInEnglishAuction(_nftContract, tokenId), "Not in English auction");
        return englishAuctions[_nftContract][tokenId].erc20token;
    }

    /**
     * @notice Reads the ERC20 in which the tokenId is being auctioned. Returns 0x address if auctioned with nativee
     * @param _nftContract Contract address of the NFT
     * @param tokenId The id of the token
     */
    function readDucthAuctionERC20token(IERC721 _nftContract, uint256 tokenId) public view returns (address){
        require(isInDutchAuction(_nftContract, tokenId), "Not in Dutch auction");
        return dutchAuctions[_nftContract][tokenId].erc20token;
    }

    /**
     * @notice Displays the price of a token in a specific ERC20 token, if it is being sold on that token
     * @param _nftContract Contract address of the NFT
     * @param tokenId The id of the token
     */
    function readSalePrice(IERC721 _nftContract, uint256 tokenId, address _erc20token) public view returns (uint){
        require(isBeingSold(_nftContract, tokenId), "Not for sale");
        bool found;
        for (uint i = 0; i < getSalePricesLength(_nftContract, tokenId); i++) {
            Price memory price = getSalePrice(_nftContract, tokenId, i);
            if (_erc20token == price.erc20Contract) {
                return price.price;
            }
        }
        revert("Item is not for sale for this ERC20 token");
    }

    /**
     * @notice Checks if a specific tokenid is for sale at the moment
     * @param _nftContract Contract address of the NFT
     * @param _tokenId The id of the token
     */
    function isBeingSold(IERC721 _nftContract, uint _tokenId) public view returns (bool) {
        return sales[_nftContract][_tokenId].owner != address(0);
    }
    /**
     * @notice Checks if a specific _tokenId is being auctioned on an English auction at the moment
     * @param _nftContract Contract address of the NFT
     * @param _tokenId The id of the token
     */
    function isInEnglishAuction(IERC721 _nftContract, uint _tokenId) public view returns (bool) {
        return englishAuctions[_nftContract][_tokenId].owner != address(0);
    }
    /**
     * @notice Checks if a specific _tokenId is being auctioned on a Dutch auction at the moment
     Start and end dates do not interfere with the status.
     * @param _nftContract Contract address of the NFT
     * @param _tokenId The id of the token
     */
    function isInDutchAuction(IERC721 _nftContract, uint _tokenId) public view returns (bool) {
        return dutchAuctions[_nftContract][_tokenId].owner != address(0);
    }

    /**
     * @notice Checks if a specific _tokenId is being sold or actioned at the moment
     * @param _nftContract Contract address of the NFT
     * @param _tokenId The id of the token
     */
    function isBeingSoldOrAuctioned(IERC721 _nftContract, uint _tokenId) public view returns (bool) {
        return (
            isBeingSold(_nftContract, _tokenId) ||
            isInEnglishAuction(_nftContract, _tokenId) ||
            isInDutchAuction(_nftContract, _tokenId)
        );
    }

    function _addWithdrawable(
        address beneficiary,
        address _erc20Contract,
        uint256 amount
    ) private {
        uint256 feeAmount = (amount * fee) / 10000;
        uint256 newAmount = amount - feeAmount;
        withdrawable[beneficiary][_erc20Contract] += newAmount;
        withdrawable[owner()][_erc20Contract] += feeAmount;
    }

    function _deleteEnglishAuction(IERC721 _nftContract, uint256 _tokenId) private {
        delete englishAuctions[_nftContract][_tokenId].owner;
        delete englishAuctions[_nftContract][_tokenId].minPrice;
        delete englishAuctions[_nftContract][_tokenId].bidder;
        delete englishAuctions[_nftContract][_tokenId].amount;
        delete englishAuctions[_nftContract][_tokenId].closeTime;
        delete englishAuctions[_nftContract][_tokenId].timeIncrease;
    }

    function _deleteDutchAuction(IERC721 _nftContract, uint256 _tokenId) private {
        delete dutchAuctions[_nftContract][_tokenId].owner;
        delete dutchAuctions[_nftContract][_tokenId].startPrice;
        delete dutchAuctions[_nftContract][_tokenId].endPrice;
        delete dutchAuctions[_nftContract][_tokenId].start;
        delete dutchAuctions[_nftContract][_tokenId].end;
    }

    /**
     * @notice Calculates the drop in price per second of an NFT being dutch auctioned.
     * Important: returns a positive value
     * @param _nftContract Contract address of the NFT
     * @param _tokenId    TokenId that is in dutch auction for which to calculate the drop in price
     */
    function _priceDropPerSecondForDutchAuction(IERC721 _nftContract, uint256 _tokenId)
    internal
    returns (uint256){

        return (dutchAuctions[_nftContract][_tokenId].startPrice - dutchAuctions[_nftContract][_tokenId].endPrice) /
        (dutchAuctions[_nftContract][_tokenId].end - dutchAuctions[_nftContract][_tokenId].start);
    }
}

File 2 of 6 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 3 of 6 : 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 4 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 5 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"DutchAuctionCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"address","name":"erc20token","type":"address"}],"name":"DutchAuctionFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"start","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"end","type":"uint256"},{"indexed":false,"internalType":"address","name":"erc20token","type":"address"}],"name":"DutchAuctionStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"EnglishAuctionCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"buyer","type":"address"}],"name":"EnglishAuctionFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minPrice","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"erc20token","type":"address"},{"indexed":false,"internalType":"uint256","name":"closeTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timeIncrease","type":"uint256"}],"name":"EnglishAuctionStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"bidder","type":"address"}],"name":"EnglishNewBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"address","name":"erc20contract","type":"address"}],"name":"NFTSold","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"SaleCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"components":[{"internalType":"address","name":"erc20Contract","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"indexed":false,"internalType":"struct VinciNFTMarketplace.Price[]","name":"prices","type":"tuple[]"}],"name":"SaleStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"components":[{"internalType":"address","name":"erc20Contract","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"indexed":false,"internalType":"struct VinciNFTMarketplace.Price[]","name":"prices","type":"tuple[]"}],"name":"SaleStartedInBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"erc20token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"Withdrawal","type":"event"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_erc20Contract","type":"address"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"cancelSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"dutchAuctionCurrentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"dutchAuctionPriceAtTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"dutchAuctions","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"startPrice","type":"uint256"},{"internalType":"uint256","name":"endPrice","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"},{"internalType":"address","name":"erc20token","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"dutchBuyToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"dutchCancelAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"startPrice","type":"uint256"},{"internalType":"uint256","name":"endPrice","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"},{"internalType":"address","name":"erc20token","type":"address"}],"name":"dutchStartAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"englishAuctions","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"minPrice","type":"uint256"},{"internalType":"address","name":"bidder","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"erc20token","type":"address"},{"internalType":"uint256","name":"closeTime","type":"uint256"},{"internalType":"uint256","name":"timeIncrease","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"englishBid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"englishCancelAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"englishFinalizeAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"minPrice","type":"uint256"},{"internalType":"uint256","name":"closeTime","type":"uint256"},{"internalType":"uint256","name":"timeIncrease","type":"uint256"},{"internalType":"address","name":"erc20token","type":"address"}],"name":"englishStartAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getSaleOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getSalePrice","outputs":[{"components":[{"internalType":"address","name":"erc20Contract","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct VinciNFTMarketplace.Price","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSalePricesLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isBeingSold","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isBeingSoldOrAuctioned","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isInDutchAuction","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isInEnglishAuction","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marginSecondsDutchAuction","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"readDucthAuctionERC20token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"readEnglishAuctionCurrentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"readEnglishAuctionERC20token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"_erc20token","type":"address"}],"name":"readSalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"sales","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_marginSecondsDutchAuction","type":"uint8"}],"name":"setMarginSecondsForDutchAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"components":[{"internalType":"address","name":"erc20Contract","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct VinciNFTMarketplace.Price[]","name":"prices","type":"tuple[]"}],"name":"startBatchSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"_nftContract","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"components":[{"internalType":"address","name":"erc20Contract","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct VinciNFTMarketplace.Price[]","name":"prices","type":"tuple[]"}],"name":"startSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_erc20token","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"withdrawable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60806040526007805460ff191660b41790553480156200001e57600080fd5b506200002a3362000040565b6005805460ff191690556105dc60065562000090565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61410280620000a06000396000f3fe60806040526004361061020f5760003560e01c806378e6457611610118578063c02622da116100a0578063e8d5e2331161006f578063e8d5e233146107a6578063eea093d6146107b9578063f03b122c146107ff578063f2fde38b1461081f578063fe9870b51461083f57600080fd5b8063c02622da14610725578063c0314d2714610745578063db61c76e1461077d578063ddca3f431461079057600080fd5b80639f8f8a52116100e75780639f8f8a5214610679578063a04ade9a14610699578063a3085550146106c5578063aad1e67c146106e5578063b02aa0171461070557600080fd5b806378e64576146106085780637e5e13b81461061b5780638da5cb5b1461063b578063978023771461065957600080fd5b806348b97eb21161019b578063669fa5a51161016a578063669fa5a5146104d857806368cbe2b4146104f857806369fe0e2d14610518578063715018a61461053857806373918a1c1461054d57600080fd5b806348b97eb21461044a57806351cff8d9146104785780635e6ee596146104985780635eb18a66146104b857600080fd5b8063219f49e9116101e2578063219f49e91461032a5780633468d381146103625780633a1c83ac146103a65780633d19fa7d146103e75780633ffc67421461040757600080fd5b80631082eea21461021457806316f3a95b146102b85780631c0150d2146102da5780631ffa8e7b146102fa575b600080fd5b34801561022057600080fd5b5061027761022f3660046139b1565b600460208181526000938452604080852090915291835291208054600182015460028301546003840154948401546005909401546001600160a01b0393841695929491931686565b604080516001600160a01b03978816815260208101969096528501939093526060840191909152608083015290911660a082015260c0015b60405180910390f35b3480156102c457600080fd5b506102d86102d33660046139b1565b61085f565b005b3480156102e657600080fd5b506102d86102f53660046139b1565b610a6e565b34801561030657600080fd5b5061031a6103153660046139b1565b610c31565b60405190151581526020016102af565b34801561033657600080fd5b5061034a6103453660046139b1565b610c64565b6040516001600160a01b0390911681526020016102af565b34801561036e57600080fd5b5061038261037d3660046139dd565b610cdf565b6040805182516001600160a01b0316815260209283015192810192909252016102af565b3480156103b257600080fd5b5061034a6103c13660046139b1565b60026020908152600092835260408084209091529082529020546001600160a01b031681565b3480156103f357600080fd5b506102d86104023660046139b1565b610d98565b34801561041357600080fd5b5061034a6104223660046139b1565b6001600160a01b03918216600090815260026020908152604080832093835292905220541690565b34801561045657600080fd5b5061046a6104653660046139b1565b610fc4565b6040519081526020016102af565b34801561048457600080fd5b506102d8610493366004613a12565b611041565b3480156104a457600080fd5b5061046a6104b3366004613a2f565b611335565b3480156104c457600080fd5b506102d86104d3366004613a71565b611455565b3480156104e457600080fd5b506102d86104f3366004613b1b565b61179b565b34801561050457600080fd5b506102d86105133660046139b1565b611b5f565b34801561052457600080fd5b506102d8610533366004613b77565b611e4c565b34801561054457600080fd5b506102d8611ecd565b34801561055957600080fd5b506105bd6105683660046139b1565b6003602081815260009384526040808520909152918352912080546001820154600283015493830154600484015460058501546006909501546001600160a01b03948516969395938516949293919092169187565b604080516001600160a01b0398891681526020810197909752948716948601949094526060850192909252909316608083015260a082019290925260c081019190915260e0016102af565b6102d86106163660046139b1565b611f03565b34801561062757600080fd5b5061046a6106363660046139dd565b6121e2565b34801561064757600080fd5b506000546001600160a01b031661034a565b34801561066557600080fd5b5061046a6106743660046139b1565b6123cf565b34801561068557600080fd5b506102d8610694366004613b90565b6123dc565b3480156106a557600080fd5b506007546106b39060ff1681565b60405160ff90911681526020016102af565b3480156106d157600080fd5b5061034a6106e03660046139b1565b612751565b3480156106f157600080fd5b506102d8610700366004613bf9565b6127ce565b34801561071157600080fd5b5061031a6107203660046139b1565b612861565b34801561073157600080fd5b5061031a6107403660046139b1565b61288b565b34801561075157600080fd5b5061046a610760366004613c1c565b600160209081526000928352604080842090915290825290205481565b6102d861078b366004613a2f565b6128b5565b34801561079c57600080fd5b5061046a60065481565b6102d86107b43660046139dd565b612e49565b3480156107c557600080fd5b5061046a6107d43660046139b1565b6001600160a01b03919091166000908152600260208181526040808420948452939052919020015490565b34801561080b57600080fd5b5061031a61081a3660046139b1565b613218565b34801561082b57600080fd5b506102d861083a366004613a12565b613242565b34801561084b57600080fd5b506102d861085a366004613c55565b6132dd565b60055460ff161561088b5760405162461bcd60e51b815260040161088290613d09565b60405180910390fd5b6005805460ff191660011790556001600160a01b03808316600090815260026020908152604080832085845290915290205483918391166109085760405162461bcd60e51b8152602060048201526017602482015276151bdad95b881a5cc81b9bdd0818995a5b99c81cdbdb19604a1b6044820152606401610882565b6001600160a01b03848116600090815260026020908152604080832087845290915290205416331461094c5760405162461bcd60e51b815260040161088290613d29565b6001600160a01b0384166000908152600260208181526040808420878552909152822080546001600160a01b0319168155610989929101906138c9565b6001600160a01b038416600090815260026020908152604080832086845290915281206109bb916001909101906138c9565b6040516323b872dd60e01b81526001600160a01b038516906323b872dd906109eb90309033908890600401613d56565b600060405180830381600087803b158015610a0557600080fd5b505af1158015610a19573d6000803e3d6000fd5b505050507fb6b76561a5cd44d408b3b141c386de7b24fc54479a54bfea565da91da93acbc38484610a473390565b604051610a5693929190613d7a565b60405180910390a150506005805460ff191690555050565b60055460ff1615610a915760405162461bcd60e51b815260040161088290613d09565b6005805460ff19166001179055610aa53390565b6001600160a01b0383811660009081526003602090815260408083208684529091529020548116911614610aeb5760405162461bcd60e51b815260040161088290613d29565b6001600160a01b0382811660009081526003602090815260408083208584529091529020600201541615610b765760405162461bcd60e51b815260206004820152602c60248201527f546865726520697320616c72656164792061206269642c2063616e277420636160448201526b6e63656c20616e796d6f726560a01b6064820152608401610882565b610b808282613674565b6040516323b872dd60e01b81526001600160a01b038316906323b872dd90610bb090309033908690600401613d56565b600060405180830381600087803b158015610bca57600080fd5b505af1158015610bde573d6000803e3d6000fd5b505050507fd550f6070505628e3c458c15ff3830eaececa4e3bafc2345b4b1005c8a6280868282610c0c3390565b604051610c1b93929190613d7a565b60405180910390a150506005805460ff19169055565b6000610c3d838361288b565b80610c4d5750610c4d8383613218565b80610c5d5750610c5d8383612861565b9392505050565b6000610c708383612861565b610cb35760405162461bcd60e51b81526020600482015260146024820152732737ba1034b710223aba31b41030bab1ba34b7b760611b6044820152606401610882565b506001600160a01b03918216600090815260046020908152604080832093835292905220600501541690565b60408051808201909152600080825260208201526040805180820182526001600160a01b038616600090815260026020908152838220878352905291909120600101805482919085908110610d3657610d36613d9d565b60009182526020808320909101546001600160a01b039081168452881682526002808252604080842089855283529092209091018054929091019185908110610d8157610d81613d9d565b906000526020600020015481525090509392505050565b60055460ff1615610dbb5760405162461bcd60e51b815260040161088290613d09565b6005805460ff191660011790556001600160a01b0380831660009081526004602090815260408083208584529091529020548391839116610e0e5760405162461bcd60e51b815260040161088290613db3565b6001600160a01b03841660009081526004602081815260408084208785529091529091200154421015610e835760405162461bcd60e51b815260206004820152601960248201527f41756374696f6e20686173206e6f7420656e64656420796574000000000000006044820152606401610882565b6001600160a01b038481166000908152600460209081526040808320878452909152902054163314610ec75760405162461bcd60e51b815260040161088290613d29565b6001600160a01b038085166000908152600460209081526040808320878452909152908190205490517ff8fb2f4268c09021601d8d053f6e9d9f44a46524b7e65dd321884ca24df71e5e92610f2492889288929190911690613d7a565b60405180910390a16001600160a01b038085166000818152600460208181526040808420898552909152918290205491516323b872dd60e01b815292936323b872dd93610f78933093921691899101613d56565b600060405180830381600087803b158015610f9257600080fd5b505af1158015610fa6573d6000803e3d6000fd5b50505050610fb484846136d1565b50506005805460ff191690555050565b6000610fd08383613218565b6110155760405162461bcd60e51b81526020600482015260166024820152752737ba1034b71022b733b634b9b41030bab1ba34b7b760511b6044820152606401610882565b506001600160a01b03919091166000908152600360208181526040808420948452939052919020015490565b60055460ff16156110645760405162461bcd60e51b815260040161088290613d09565b6005805460ff19166001179055600061107a3390565b6001600160a01b03808216600090815260016020908152604080832093871683529290522054909150806110e65760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b6044820152606401610882565b6001600160a01b038083166000908152600160209081526040808320938716808452939091528120556111bc576000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611160576040519150601f19603f3d011682016040523d82523d6000602084013e611165565b606091505b50509050806111b65760405162461bcd60e51b815260206004820181905260248201527f4e6174697665207061796d656e7420746f2061646472657373206661696c65646044820152606401610882565b506112ec565b6040516370a0823160e01b8152306004820152839082906001600160a01b038316906370a0823190602401602060405180830381865afa158015611204573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112289190613dea565b10156112765760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682066756e647320696e20636f6e7472616374000000006044820152606401610882565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526024820184905282169063a9059cbb906044016020604051808303816000875af11580156112c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e99190613e03565b50505b7e1a143d5b175701cb3246058ffac3d63945192075a926ff73a19930f09d587a83828460405161131e93929190613d7a565b60405180910390a150506005805460ff1916905550565b6000611341848461288b565b61137c5760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420666f722073616c6560a01b6044820152606401610882565b6000805b6001600160a01b038616600090815260026020818152604080842089855290915290912001548110156113fa5760006113ba878784610cdf565b905080600001516001600160a01b0316856001600160a01b0316036113e757602001519250610c5d915050565b50806113f281613e3b565b915050611380565b5060405162461bcd60e51b815260206004820152602960248201527f4974656d206973206e6f7420666f722073616c6520666f722074686973204552604482015268219918103a37b5b2b760b91b6064820152608401610882565b60055460ff16156114785760405162461bcd60e51b815260040161088290613d09565b6005805460ff191660011790556001600160a01b0380871660009081526002602090815260408083208984529091529020548791879116156114cc5760405162461bcd60e51b815260040161088290613e54565b6001600160a01b038281166000908152600360209081526040808320858452909152902054161561150f5760405162461bcd60e51b815260040161088290613e8b565b6001600160a01b03828116600090815260046020908152604080832085845290915290205416156115525760405162461bcd60e51b815260040161088290613ece565b6000861561156a57611565600188613f0f565b61156d565b60005b90506040518060e001604052806115813390565b6001600160a01b0316815260200188815260200160006001600160a01b03168152602001828152602001856001600160a01b0316815260200187815260200186815250600360008b6001600160a01b03166001600160a01b0316815260200190815260200160002060008a815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506060820151816003015560808201518160040160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060a0820151816005015560c08201518160060155905050886001600160a01b03166323b872dd6116c23390565b308b6040518463ffffffff1660e01b81526004016116e293929190613d56565b600060405180830381600087803b1580156116fc57600080fd5b505af1158015611710573d6000803e3d6000fd5b505050507edd25b6f3552711ba8624656edcc8f9772d823528bd4599865c63d9dd42bcb489898961173e3390565b604080516001600160a01b039586168152602081019490945283019190915282166060820152908616608082015260a0810188905260c0810187905260e0015b60405180910390a150506005805460ff1916905550505050505050565b60055460ff16156117be5760405162461bcd60e51b815260040161088290613d09565b6005805460ff191660011790556001600160a01b0380851660009081526002602090815260408083208784529091529020548591859116156118125760405162461bcd60e51b815260040161088290613e54565b6001600160a01b03828116600090815260036020908152604080832085845290915290205416156118555760405162461bcd60e51b815260040161088290613e8b565b6001600160a01b03828116600090815260046020908152604080832085845290915290205416156118985760405162461bcd60e51b815260040161088290613ece565b600a8311156118b95760405162461bcd60e51b815260040161088290613f26565b826118d65760405162461bcd60e51b815260040161088290613f68565b60008367ffffffffffffffff8111156118f1576118f1613fb0565b60405190808252806020026020018201604052801561191a578160200160208202803683370190505b50905060008467ffffffffffffffff81111561193857611938613fb0565b604051908082528060200260200182016040528015611961578160200160208202803683370190505b50905060005b85811015611a0d5786868281811061198157611981613d9d565b9050604002016020013583828151811061199d5761199d613d9d565b6020026020010181815250508686828181106119bb576119bb613d9d565b6119d19260206040909202019081019150613a12565b8282815181106119e3576119e3613d9d565b6001600160a01b039092166020928302919091019091015280611a0581613e3b565b915050611967565b506040518060600160405280611a203390565b6001600160a01b039081168252602080830185905260409283018690528b82166000908152600282528381208c8252825292909220835181546001600160a01b03191692169190911781558282015180519192611a85926001850192909101906138e7565b5060408201518051611aa191600284019160209091019061394c565b50506040516323b872dd60e01b81526001600160a01b038a1691506323b872dd90611ad490339030908c90600401613d56565b600060405180830381600087803b158015611aee57600080fd5b505af1158015611b02573d6000803e3d6000fd5b505050507f9b8f682bd88a708f24fe72abf72be85fe7f48f8efe2d810471c5341bb386e9da8888611b303390565b8989604051611b43959493929190613fc6565b60405180910390a150506005805460ff19169055505050505050565b60055460ff1615611b825760405162461bcd60e51b815260040161088290613d09565b6005805460ff191660011790556001600160a01b03828116600090815260036020908152604080832085845290915290205416611bd15760405162461bcd60e51b815260040161088290613db3565b6001600160a01b038216600090815260036020908152604080832084845290915290206005015442101580611c2a57506001600160a01b0382811660009081526003602090815260408083208584529091529020541633145b611c955760405162461bcd60e51b815260206004820152603660248201527f4f6e6c7920746865206f776e65722063616e2066696e616c697a652074686520604482015275185d58dd1a5bdb881899599bdc99481a5d1cc8195b9960521b6064820152608401610882565b6001600160a01b03828116600090815260036020908152604080832085845290915290206002015416611d015760405162461bcd60e51b81526020600482015260146024820152734e6f2062696420686173206265656e206d61646560601b6044820152606401610882565b6001600160a01b0382811660009081526003602081815260408084208685529091529091209081015481546004909201549092611d42928116911683613720565b6001600160a01b038084166000818152600360209081526040808320878452909152908190206002015490516323b872dd60e01b815291926323b872dd92611d9292309216908790600401613d56565b600060405180830381600087803b158015611dac57600080fd5b505af1158015611dc0573d6000803e3d6000fd5b505050506001600160a01b03838116600081815260036020908152604080832087845282529182902060020154825193845290830186905290820184905290911660608201527fee202398f07c781d1a3e79f5d878bc3110b0a397e840e0b553a621b900b503df9060800160405180910390a1611e3d8383613674565b50506005805460ff1916905550565b6000546001600160a01b03163314611e765760405162461bcd60e51b81526004016108829061403e565b612710811115611ec85760405162461bcd60e51b815260206004820181905260248201527f43616e277420736574206120666565206c6172676572207468616e20313030256044820152606401610882565b600655565b6000546001600160a01b03163314611ef75760405162461bcd60e51b81526004016108829061403e565b611f016000613802565b565b60055460ff1615611f265760405162461bcd60e51b815260040161088290613d09565b6005805460ff191660011790556001600160a01b0380831660009081526004602090815260408083208584529091529020548391839116611f795760405162461bcd60e51b815260040161088290613db3565b6000611f8585856123cf565b6001600160a01b038681166000908152600460209081526040808320898452909152902060058101549054929350811691611fc291168284613720565b6001600160a01b03811661208857813410156120205760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682076616c756520746f207075726368617365000000006044820152606401610882565b61202a8686613852565b60075461203a919060ff16614073565b6120449083614092565b34106120835760405162461bcd60e51b815260206004820152600e60248201526d0acc2d8eaca40e8dede40d0d2ced60931b6044820152606401610882565b612100565b6040516323b872dd60e01b815281906001600160a01b038216906323b872dd906120ba90339030908890600401613d56565b6020604051808303816000875af11580156120d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fd9190613e03565b50505b6040516323b872dd60e01b81526001600160a01b038716906323b872dd9061213090309033908a90600401613d56565b600060405180830381600087803b15801561214a57600080fd5b505af115801561215e573d6000803e3d6000fd5b505050507f2801cf64d43fc787c2c9fb26a20429f4453c7cb7961e030e017a055c495fc1a186868461218d3390565b604080516001600160a01b039586168152602081019490945283019190915282166060820152908316608082015260a00160405180910390a16121d086866136d1565b50506005805460ff1916905550505050565b6001600160a01b0380841660009081526004602090815260408083208684529091528120549091859185911661222a5760405162461bcd60e51b815260040161088290613db3565b6001600160a01b03861660009081526004602090815260408083208884529091529020600301548411612285576001600160a01b038616600090815260046020908152604080832088845290915290206001015492506123c6565b6001600160a01b0386166000908152600460208181526040808420898552909152909120015484106122df576001600160a01b038616600090815260046020908152604080832088845290915290206002015492506123c6565b6001600160a01b038616600090815260046020818152604080842089855290915290912060038101549101546123159190613f0f565b6001600160a01b03871660009081526004602090815260408083208984529091529020600281015460019091015461234d9190613f0f565b6001600160a01b03881660009081526004602090815260408083208a845290915290206003015461237e9087613f0f565b6123889190614073565b61239291906140aa565b6001600160a01b03871660009081526004602090815260408083208984529091529020600101546123c39190613f0f565b92505b50509392505050565b6000610c5d8383426121e2565b60055460ff16156123ff5760405162461bcd60e51b815260040161088290613d09565b6005805460ff191660011790556001600160a01b0380881660009081526002602090815260408083208a84529091529020548891889116156124535760405162461bcd60e51b815260040161088290613e54565b6001600160a01b03828116600090815260036020908152604080832085845290915290205416156124965760405162461bcd60e51b815260040161088290613e8b565b6001600160a01b03828116600090815260046020908152604080832085845290915290205416156124d95760405162461bcd60e51b815260040161088290613ece565b8587116125345760405162461bcd60e51b8152602060048201526024808201527f50726963652068617320746f2062652064656372656173696e6720776974682060448201526374696d6560e01b6064820152608401610882565b8385106125835760405162461bcd60e51b815260206004820152601960248201527f456e642068617320746f206265206166746572207374617274000000000000006044820152606401610882565b6040518060c001604052806125953390565b6001600160a01b03168152602001888152602001878152602001868152602001858152602001846001600160a01b0316815250600460008b6001600160a01b03166001600160a01b0316815260200190815260200160002060008a815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550905050886001600160a01b03166323b872dd6126993390565b308b6040518463ffffffff1660e01b81526004016126b993929190613d56565b600060405180830381600087803b1580156126d357600080fd5b505af11580156126e7573d6000803e3d6000fd5b5050604080516001600160a01b03808e168252602082018d90529181018b9052606081018a90526080810189905260a0810188905290861660c08201527fb98fb26fc1ec92bc198a31e9be861178ca91ca743837bb6e412cd7672dfa4709925060e001905061177e565b600061275d8383613218565b6127a25760405162461bcd60e51b81526020600482015260166024820152752737ba1034b71022b733b634b9b41030bab1ba34b7b760511b6044820152606401610882565b506001600160a01b03918216600090815260036020908152604080832093835292905220600401541690565b6000546001600160a01b031633146127f85760405162461bcd60e51b81526004016108829061403e565b60008160ff161161284b5760405162461bcd60e51b815260206004820152601b60248201527f43616e2774207365742061206e65676174697665206e756d62657200000000006044820152606401610882565b6007805460ff191660ff92909216919091179055565b6001600160a01b039182166000908152600460209081526040808320938352929052205416151590565b6001600160a01b039182166000908152600260209081526040808320938352929052205416151590565b60055460ff16156128d85760405162461bcd60e51b815260040161088290613d09565b6005805460ff191660011790556001600160a01b03808416600090815260026020908152604080832086845290915290205484918491166129555760405162461bcd60e51b8152602060048201526017602482015276151bdad95b881a5cc81b9bdd0818995a5b99c81cdbdb19604a1b6044820152606401610882565b60008060005b6001600160a01b03881660009081526002602090815260408083208a8452909152902060010154811015612a3b576001600160a01b0388811660009081526002602090815260408083208b84529091529020600101805491881691839081106129c6576129c6613d9d565b6000918252602090912001546001600160a01b031603612a29576001600160a01b03881660009081526002602081815260408084208b85529091529091200180546001935082908110612a1b57612a1b613d9d565b906000526020600020015492505b80612a3381613e3b565b91505061295b565b5080612abb5760405162461bcd60e51b815260206004820152604360248201527f54686520746f6b656e206973206e6f74206265696e6720736f6c6420696e206560448201527f786368616e676520666f722074686520676976656e206572633230206164647260648201526265737360e81b608482015260a401610882565b6001600160a01b0380881660009081526002602090815260408083208a8452909152902054612aec91168684613720565b6001600160a01b03871660009081526002602081815260408084208a8552909152822080546001600160a01b0319168155612b29929101906138c9565b6001600160a01b03871660009081526002602090815260408083208984529091528120612b5b916001909101906138c9565b6001600160a01b038516612bbd57813414612bb85760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682076616c756520746f207075726368617365000000006044820152606401610882565b612d6f565b843415612c325760405162461bcd60e51b815260206004820152603d60248201527f5061796d656e742063616e6e6f7420626520696e20455243323020616e64206e60448201527f61746976652063757272656e63792073696d756c74616e656f75736c790000006064820152608401610882565b826001600160a01b0382166370a08231336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015612c87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cab9190613dea565b1015612cf95760405162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f75676820746f6b656e2062616c616e636500000000000000006044820152606401610882565b6040516323b872dd60e01b81526001600160a01b038216906323b872dd90612d2990339030908890600401613d56565b6020604051808303816000875af1158015612d48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d6c9190613e03565b50505b6040516323b872dd60e01b81526001600160a01b038816906323b872dd90612d9f90309033908b90600401613d56565b600060405180830381600087803b158015612db957600080fd5b505af1158015612dcd573d6000803e3d6000fd5b505050507f312c851f1f34152daec0c65b170f3f14132c2f963e16e3e84bdc9986d3be5857878784612dfc3390565b604080516001600160a01b039586168152602081019490945283019190915282166060820152908716608082015260a0015b60405180910390a150506005805460ff191690555050505050565b60055460ff1615612e6c5760405162461bcd60e51b815260040161088290613d09565b6005805460ff191660011790556001600160a01b0380841660009081526003602090815260408083208684529091529020548491849116612ebf5760405162461bcd60e51b815260040161088290613db3565b6001600160a01b03821660009081526003602090815260408083208484529091529020600501544210612f285760405162461bcd60e51b8152602060048201526011602482015270105d58dd1a5bdb881a5cc818db1bdcd959607a1b6044820152606401610882565b6000336001600160a01b0387811660009081526003602081815260408084208b855290915290912060048101549101549293501690851015612fa55760405162461bcd60e51b8152602060048201526016602482015275084d2c840d2e640dcdee840d0d2ced040cadcdeeaced60531b6044820152606401610882565b6001600160a01b0387811660009081526003602090815260408083208a84529091529020600201541615613031576001600160a01b0380881660009081526003602081815260408084208b85528252808420928301546002840154861685526001835281852060049094015490951684529190528120805490919061302b908490614092565b90915550505b6001600160a01b0387811660009081526003602081815260408084208b855290915282206002810180546001600160a01b03191694871694909417909355820187905560068201546005909201805490919061308e908490614092565b90915550506001600160a01b0381166130f5578434146130f05760405162461bcd60e51b815260206004820152601960248201527f56616c7565206e6f74206d61746368696e6720616d6f756e74000000000000006044820152606401610882565b6131cb565b34156131535760405162461bcd60e51b815260206004820152602760248201527f4e6f206e65656420746f206164642076616c75652069662070616964207769746044820152660682045524332360cc1b6064820152608401610882565b6040516323b872dd60e01b815281906001600160a01b038216906323b872dd9061318590869030908b90600401613d56565b6020604051808303816000875af11580156131a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131c89190613e03565b50505b604080516001600160a01b0389168152602081018890529081018690523360608201527fbbdb1d80d0638be229629ac8c5e4fcafafbe888f83b23b103888adcd1c08de6f90608001612e2e565b6001600160a01b039182166000908152600360209081526040808320938352929052205416151590565b6000546001600160a01b0316331461326c5760405162461bcd60e51b81526004016108829061403e565b6001600160a01b0381166132d15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610882565b6132da81613802565b50565b61012d831061332e5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920757020746f2033303020746f6b656e496473206174206f6e6365006044820152606401610882565b600a81111561334f5760405162461bcd60e51b815260040161088290613f26565b8061336c5760405162461bcd60e51b815260040161088290613f68565b60008167ffffffffffffffff81111561338757613387613fb0565b6040519080825280602002602001820160405280156133b0578160200160208202803683370190505b50905060008267ffffffffffffffff8111156133ce576133ce613fb0565b6040519080825280602002602001820160405280156133f7578160200160208202803683370190505b50905060005b838110156134a35784848281811061341757613417613d9d565b9050604002016020013583828151811061343357613433613d9d565b60200260200101818152505084848281811061345157613451613d9d565b6134679260206040909202019081019150613a12565b82828151811061347957613479613d9d565b6001600160a01b03909216602092830291909101909101528061349b81613e3b565b9150506133fd565b5060005b8581101561366a5760405180606001604052806134c13390565b6001600160a01b0316815260200183815260200184815250600260008a6001600160a01b03166001600160a01b03168152602001908152602001600020600089898581811061351257613512613d9d565b6020908102929092013583525081810192909252604001600020825181546001600160a01b0319166001600160a01b039091161781558282015180519192613562926001850192909101906138e7565b506040820151805161357e91600284019160209091019061394c565b5050506001600160a01b0388166323b872dd33308a8a868181106135a4576135a4613d9d565b905060200201356040518463ffffffff1660e01b81526004016135c993929190613d56565b600060405180830381600087803b1580156135e357600080fd5b505af11580156135f7573d6000803e3d6000fd5b505050507fb1003e899d6f2f3ec0eb20adebee2184cc627bd53f2e7e41682c6955e91774548888888481811061362f5761362f613d9d565b9050602002013561363d3390565b8888604051613650959493929190613fc6565b60405180910390a18061366281613e3b565b9150506134a7565b5050505050505050565b6001600160a01b0391909116600090815260036020818152604080842094845293905291812080546001600160a01b0319908116825560018201839055600282018054909116905591820181905560058201819055600690910155565b6001600160a01b0391909116600090815260046020818152604080842094845293905291812080546001600160a01b031916815560018101829055600281018290556003810182905590910155565b6000612710600654836137339190614073565b61373d91906140aa565b9050600061374b8284613f0f565b6001600160a01b038087166000908152600160209081526040808320938916835292905290812080549293508392909190613787908490614092565b90915550829050600160006137a46000546001600160a01b031690565b6001600160a01b03166001600160a01b031681526020019081526020016000206000866001600160a01b03166001600160a01b0316815260200190815260200160002060008282546137f69190614092565b90915550505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0382166000908152600460208181526040808420858552909152822060038101549101546138879190613f0f565b6001600160a01b0384166000908152600460209081526040808320868452909152902060028101546001909101546138bf9190613f0f565b610c5d91906140aa565b50805460008255906000526020600020908101906132da9190613987565b82805482825590600052602060002090810192821561393c579160200282015b8281111561393c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613907565b50613948929150613987565b5090565b82805482825590600052602060002090810192821561393c579160200282015b8281111561393c57825182559160200191906001019061396c565b5b808211156139485760008155600101613988565b6001600160a01b03811681146132da57600080fd5b600080604083850312156139c457600080fd5b82356139cf8161399c565b946020939093013593505050565b6000806000606084860312156139f257600080fd5b83356139fd8161399c565b95602085013595506040909401359392505050565b600060208284031215613a2457600080fd5b8135610c5d8161399c565b600080600060608486031215613a4457600080fd5b8335613a4f8161399c565b9250602084013591506040840135613a668161399c565b809150509250925092565b60008060008060008060c08789031215613a8a57600080fd5b8635613a958161399c565b95506020870135945060408701359350606087013592506080870135915060a0870135613ac18161399c565b809150509295509295509295565b60008083601f840112613ae157600080fd5b50813567ffffffffffffffff811115613af957600080fd5b6020830191508360208260061b8501011115613b1457600080fd5b9250929050565b60008060008060608587031215613b3157600080fd5b8435613b3c8161399c565b935060208501359250604085013567ffffffffffffffff811115613b5f57600080fd5b613b6b87828801613acf565b95989497509550505050565b600060208284031215613b8957600080fd5b5035919050565b600080600080600080600060e0888a031215613bab57600080fd5b8735613bb68161399c565b96506020880135955060408801359450606088013593506080880135925060a0880135915060c0880135613be98161399c565b8091505092959891949750929550565b600060208284031215613c0b57600080fd5b813560ff81168114610c5d57600080fd5b60008060408385031215613c2f57600080fd5b8235613c3a8161399c565b91506020830135613c4a8161399c565b809150509250929050565b600080600080600060608688031215613c6d57600080fd5b8535613c788161399c565b9450602086013567ffffffffffffffff80821115613c9557600080fd5b818801915088601f830112613ca957600080fd5b813581811115613cb857600080fd5b8960208260051b8501011115613ccd57600080fd5b602083019650809550506040880135915080821115613ceb57600080fd5b50613cf888828901613acf565b969995985093965092949392505050565b6020808252600690820152651b1bd8dad95960d21b604082015260600190565b60208082526013908201527226bab9ba103132903a37b5b2b71037bbb732b960691b604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0393841681526020810192909252909116604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6020808252601c908201527f546f6b656e206973206e6f74206265696e672061756374696f6e656400000000604082015260600190565b600060208284031215613dfc57600080fd5b5051919050565b600060208284031215613e1557600080fd5b81518015158114610c5d57600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613e4d57613e4d613e25565b5060010190565b6020808252601b908201527f546f6b656e20697320616c7265616479206265696e6720736f6c640000000000604082015260600190565b60208082526023908201527f546f6b656e20697320616c726561647920696e20656e676c697368206175637460408201526234b7b760e91b606082015260800190565b60208082526021908201527f546f6b656e20697320616c726561647920696e2064757463682061756374696f6040820152603760f91b606082015260800190565b600082821015613f2157613f21613e25565b500390565b60208082526022908201527f4f6e6c7920757020746f203130207072696365732061726520737570706f7274604082015261195960f21b606082015260800190565b60208082526028908201527f4174206c65617374206f6e65207072696365206e6565647320746f20626520736040820152671c1958da599a595960c21b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b60006080820160018060a01b03808916845260208881860152604082891681870152608060608701528387855260a08701905088945060005b8881101561402e5785356140128161399c565b8516825285840135848301529482019490820190600101613fff565b509b9a5050505050505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600081600019048311821515161561408d5761408d613e25565b500290565b600082198211156140a5576140a5613e25565b500190565b6000826140c757634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220f9defa04dca95252a8e9f84eeecb4a87ad92ccebb577675f87a21113dc7e8d3e64736f6c634300080e0033

Deployed Bytecode

0x60806040526004361061020f5760003560e01c806378e6457611610118578063c02622da116100a0578063e8d5e2331161006f578063e8d5e233146107a6578063eea093d6146107b9578063f03b122c146107ff578063f2fde38b1461081f578063fe9870b51461083f57600080fd5b8063c02622da14610725578063c0314d2714610745578063db61c76e1461077d578063ddca3f431461079057600080fd5b80639f8f8a52116100e75780639f8f8a5214610679578063a04ade9a14610699578063a3085550146106c5578063aad1e67c146106e5578063b02aa0171461070557600080fd5b806378e64576146106085780637e5e13b81461061b5780638da5cb5b1461063b578063978023771461065957600080fd5b806348b97eb21161019b578063669fa5a51161016a578063669fa5a5146104d857806368cbe2b4146104f857806369fe0e2d14610518578063715018a61461053857806373918a1c1461054d57600080fd5b806348b97eb21461044a57806351cff8d9146104785780635e6ee596146104985780635eb18a66146104b857600080fd5b8063219f49e9116101e2578063219f49e91461032a5780633468d381146103625780633a1c83ac146103a65780633d19fa7d146103e75780633ffc67421461040757600080fd5b80631082eea21461021457806316f3a95b146102b85780631c0150d2146102da5780631ffa8e7b146102fa575b600080fd5b34801561022057600080fd5b5061027761022f3660046139b1565b600460208181526000938452604080852090915291835291208054600182015460028301546003840154948401546005909401546001600160a01b0393841695929491931686565b604080516001600160a01b03978816815260208101969096528501939093526060840191909152608083015290911660a082015260c0015b60405180910390f35b3480156102c457600080fd5b506102d86102d33660046139b1565b61085f565b005b3480156102e657600080fd5b506102d86102f53660046139b1565b610a6e565b34801561030657600080fd5b5061031a6103153660046139b1565b610c31565b60405190151581526020016102af565b34801561033657600080fd5b5061034a6103453660046139b1565b610c64565b6040516001600160a01b0390911681526020016102af565b34801561036e57600080fd5b5061038261037d3660046139dd565b610cdf565b6040805182516001600160a01b0316815260209283015192810192909252016102af565b3480156103b257600080fd5b5061034a6103c13660046139b1565b60026020908152600092835260408084209091529082529020546001600160a01b031681565b3480156103f357600080fd5b506102d86104023660046139b1565b610d98565b34801561041357600080fd5b5061034a6104223660046139b1565b6001600160a01b03918216600090815260026020908152604080832093835292905220541690565b34801561045657600080fd5b5061046a6104653660046139b1565b610fc4565b6040519081526020016102af565b34801561048457600080fd5b506102d8610493366004613a12565b611041565b3480156104a457600080fd5b5061046a6104b3366004613a2f565b611335565b3480156104c457600080fd5b506102d86104d3366004613a71565b611455565b3480156104e457600080fd5b506102d86104f3366004613b1b565b61179b565b34801561050457600080fd5b506102d86105133660046139b1565b611b5f565b34801561052457600080fd5b506102d8610533366004613b77565b611e4c565b34801561054457600080fd5b506102d8611ecd565b34801561055957600080fd5b506105bd6105683660046139b1565b6003602081815260009384526040808520909152918352912080546001820154600283015493830154600484015460058501546006909501546001600160a01b03948516969395938516949293919092169187565b604080516001600160a01b0398891681526020810197909752948716948601949094526060850192909252909316608083015260a082019290925260c081019190915260e0016102af565b6102d86106163660046139b1565b611f03565b34801561062757600080fd5b5061046a6106363660046139dd565b6121e2565b34801561064757600080fd5b506000546001600160a01b031661034a565b34801561066557600080fd5b5061046a6106743660046139b1565b6123cf565b34801561068557600080fd5b506102d8610694366004613b90565b6123dc565b3480156106a557600080fd5b506007546106b39060ff1681565b60405160ff90911681526020016102af565b3480156106d157600080fd5b5061034a6106e03660046139b1565b612751565b3480156106f157600080fd5b506102d8610700366004613bf9565b6127ce565b34801561071157600080fd5b5061031a6107203660046139b1565b612861565b34801561073157600080fd5b5061031a6107403660046139b1565b61288b565b34801561075157600080fd5b5061046a610760366004613c1c565b600160209081526000928352604080842090915290825290205481565b6102d861078b366004613a2f565b6128b5565b34801561079c57600080fd5b5061046a60065481565b6102d86107b43660046139dd565b612e49565b3480156107c557600080fd5b5061046a6107d43660046139b1565b6001600160a01b03919091166000908152600260208181526040808420948452939052919020015490565b34801561080b57600080fd5b5061031a61081a3660046139b1565b613218565b34801561082b57600080fd5b506102d861083a366004613a12565b613242565b34801561084b57600080fd5b506102d861085a366004613c55565b6132dd565b60055460ff161561088b5760405162461bcd60e51b815260040161088290613d09565b60405180910390fd5b6005805460ff191660011790556001600160a01b03808316600090815260026020908152604080832085845290915290205483918391166109085760405162461bcd60e51b8152602060048201526017602482015276151bdad95b881a5cc81b9bdd0818995a5b99c81cdbdb19604a1b6044820152606401610882565b6001600160a01b03848116600090815260026020908152604080832087845290915290205416331461094c5760405162461bcd60e51b815260040161088290613d29565b6001600160a01b0384166000908152600260208181526040808420878552909152822080546001600160a01b0319168155610989929101906138c9565b6001600160a01b038416600090815260026020908152604080832086845290915281206109bb916001909101906138c9565b6040516323b872dd60e01b81526001600160a01b038516906323b872dd906109eb90309033908890600401613d56565b600060405180830381600087803b158015610a0557600080fd5b505af1158015610a19573d6000803e3d6000fd5b505050507fb6b76561a5cd44d408b3b141c386de7b24fc54479a54bfea565da91da93acbc38484610a473390565b604051610a5693929190613d7a565b60405180910390a150506005805460ff191690555050565b60055460ff1615610a915760405162461bcd60e51b815260040161088290613d09565b6005805460ff19166001179055610aa53390565b6001600160a01b0383811660009081526003602090815260408083208684529091529020548116911614610aeb5760405162461bcd60e51b815260040161088290613d29565b6001600160a01b0382811660009081526003602090815260408083208584529091529020600201541615610b765760405162461bcd60e51b815260206004820152602c60248201527f546865726520697320616c72656164792061206269642c2063616e277420636160448201526b6e63656c20616e796d6f726560a01b6064820152608401610882565b610b808282613674565b6040516323b872dd60e01b81526001600160a01b038316906323b872dd90610bb090309033908690600401613d56565b600060405180830381600087803b158015610bca57600080fd5b505af1158015610bde573d6000803e3d6000fd5b505050507fd550f6070505628e3c458c15ff3830eaececa4e3bafc2345b4b1005c8a6280868282610c0c3390565b604051610c1b93929190613d7a565b60405180910390a150506005805460ff19169055565b6000610c3d838361288b565b80610c4d5750610c4d8383613218565b80610c5d5750610c5d8383612861565b9392505050565b6000610c708383612861565b610cb35760405162461bcd60e51b81526020600482015260146024820152732737ba1034b710223aba31b41030bab1ba34b7b760611b6044820152606401610882565b506001600160a01b03918216600090815260046020908152604080832093835292905220600501541690565b60408051808201909152600080825260208201526040805180820182526001600160a01b038616600090815260026020908152838220878352905291909120600101805482919085908110610d3657610d36613d9d565b60009182526020808320909101546001600160a01b039081168452881682526002808252604080842089855283529092209091018054929091019185908110610d8157610d81613d9d565b906000526020600020015481525090509392505050565b60055460ff1615610dbb5760405162461bcd60e51b815260040161088290613d09565b6005805460ff191660011790556001600160a01b0380831660009081526004602090815260408083208584529091529020548391839116610e0e5760405162461bcd60e51b815260040161088290613db3565b6001600160a01b03841660009081526004602081815260408084208785529091529091200154421015610e835760405162461bcd60e51b815260206004820152601960248201527f41756374696f6e20686173206e6f7420656e64656420796574000000000000006044820152606401610882565b6001600160a01b038481166000908152600460209081526040808320878452909152902054163314610ec75760405162461bcd60e51b815260040161088290613d29565b6001600160a01b038085166000908152600460209081526040808320878452909152908190205490517ff8fb2f4268c09021601d8d053f6e9d9f44a46524b7e65dd321884ca24df71e5e92610f2492889288929190911690613d7a565b60405180910390a16001600160a01b038085166000818152600460208181526040808420898552909152918290205491516323b872dd60e01b815292936323b872dd93610f78933093921691899101613d56565b600060405180830381600087803b158015610f9257600080fd5b505af1158015610fa6573d6000803e3d6000fd5b50505050610fb484846136d1565b50506005805460ff191690555050565b6000610fd08383613218565b6110155760405162461bcd60e51b81526020600482015260166024820152752737ba1034b71022b733b634b9b41030bab1ba34b7b760511b6044820152606401610882565b506001600160a01b03919091166000908152600360208181526040808420948452939052919020015490565b60055460ff16156110645760405162461bcd60e51b815260040161088290613d09565b6005805460ff19166001179055600061107a3390565b6001600160a01b03808216600090815260016020908152604080832093871683529290522054909150806110e65760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b6044820152606401610882565b6001600160a01b038083166000908152600160209081526040808320938716808452939091528120556111bc576000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611160576040519150601f19603f3d011682016040523d82523d6000602084013e611165565b606091505b50509050806111b65760405162461bcd60e51b815260206004820181905260248201527f4e6174697665207061796d656e7420746f2061646472657373206661696c65646044820152606401610882565b506112ec565b6040516370a0823160e01b8152306004820152839082906001600160a01b038316906370a0823190602401602060405180830381865afa158015611204573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112289190613dea565b10156112765760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682066756e647320696e20636f6e7472616374000000006044820152606401610882565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526024820184905282169063a9059cbb906044016020604051808303816000875af11580156112c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e99190613e03565b50505b7e1a143d5b175701cb3246058ffac3d63945192075a926ff73a19930f09d587a83828460405161131e93929190613d7a565b60405180910390a150506005805460ff1916905550565b6000611341848461288b565b61137c5760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420666f722073616c6560a01b6044820152606401610882565b6000805b6001600160a01b038616600090815260026020818152604080842089855290915290912001548110156113fa5760006113ba878784610cdf565b905080600001516001600160a01b0316856001600160a01b0316036113e757602001519250610c5d915050565b50806113f281613e3b565b915050611380565b5060405162461bcd60e51b815260206004820152602960248201527f4974656d206973206e6f7420666f722073616c6520666f722074686973204552604482015268219918103a37b5b2b760b91b6064820152608401610882565b60055460ff16156114785760405162461bcd60e51b815260040161088290613d09565b6005805460ff191660011790556001600160a01b0380871660009081526002602090815260408083208984529091529020548791879116156114cc5760405162461bcd60e51b815260040161088290613e54565b6001600160a01b038281166000908152600360209081526040808320858452909152902054161561150f5760405162461bcd60e51b815260040161088290613e8b565b6001600160a01b03828116600090815260046020908152604080832085845290915290205416156115525760405162461bcd60e51b815260040161088290613ece565b6000861561156a57611565600188613f0f565b61156d565b60005b90506040518060e001604052806115813390565b6001600160a01b0316815260200188815260200160006001600160a01b03168152602001828152602001856001600160a01b0316815260200187815260200186815250600360008b6001600160a01b03166001600160a01b0316815260200190815260200160002060008a815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506060820151816003015560808201518160040160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060a0820151816005015560c08201518160060155905050886001600160a01b03166323b872dd6116c23390565b308b6040518463ffffffff1660e01b81526004016116e293929190613d56565b600060405180830381600087803b1580156116fc57600080fd5b505af1158015611710573d6000803e3d6000fd5b505050507edd25b6f3552711ba8624656edcc8f9772d823528bd4599865c63d9dd42bcb489898961173e3390565b604080516001600160a01b039586168152602081019490945283019190915282166060820152908616608082015260a0810188905260c0810187905260e0015b60405180910390a150506005805460ff1916905550505050505050565b60055460ff16156117be5760405162461bcd60e51b815260040161088290613d09565b6005805460ff191660011790556001600160a01b0380851660009081526002602090815260408083208784529091529020548591859116156118125760405162461bcd60e51b815260040161088290613e54565b6001600160a01b03828116600090815260036020908152604080832085845290915290205416156118555760405162461bcd60e51b815260040161088290613e8b565b6001600160a01b03828116600090815260046020908152604080832085845290915290205416156118985760405162461bcd60e51b815260040161088290613ece565b600a8311156118b95760405162461bcd60e51b815260040161088290613f26565b826118d65760405162461bcd60e51b815260040161088290613f68565b60008367ffffffffffffffff8111156118f1576118f1613fb0565b60405190808252806020026020018201604052801561191a578160200160208202803683370190505b50905060008467ffffffffffffffff81111561193857611938613fb0565b604051908082528060200260200182016040528015611961578160200160208202803683370190505b50905060005b85811015611a0d5786868281811061198157611981613d9d565b9050604002016020013583828151811061199d5761199d613d9d565b6020026020010181815250508686828181106119bb576119bb613d9d565b6119d19260206040909202019081019150613a12565b8282815181106119e3576119e3613d9d565b6001600160a01b039092166020928302919091019091015280611a0581613e3b565b915050611967565b506040518060600160405280611a203390565b6001600160a01b039081168252602080830185905260409283018690528b82166000908152600282528381208c8252825292909220835181546001600160a01b03191692169190911781558282015180519192611a85926001850192909101906138e7565b5060408201518051611aa191600284019160209091019061394c565b50506040516323b872dd60e01b81526001600160a01b038a1691506323b872dd90611ad490339030908c90600401613d56565b600060405180830381600087803b158015611aee57600080fd5b505af1158015611b02573d6000803e3d6000fd5b505050507f9b8f682bd88a708f24fe72abf72be85fe7f48f8efe2d810471c5341bb386e9da8888611b303390565b8989604051611b43959493929190613fc6565b60405180910390a150506005805460ff19169055505050505050565b60055460ff1615611b825760405162461bcd60e51b815260040161088290613d09565b6005805460ff191660011790556001600160a01b03828116600090815260036020908152604080832085845290915290205416611bd15760405162461bcd60e51b815260040161088290613db3565b6001600160a01b038216600090815260036020908152604080832084845290915290206005015442101580611c2a57506001600160a01b0382811660009081526003602090815260408083208584529091529020541633145b611c955760405162461bcd60e51b815260206004820152603660248201527f4f6e6c7920746865206f776e65722063616e2066696e616c697a652074686520604482015275185d58dd1a5bdb881899599bdc99481a5d1cc8195b9960521b6064820152608401610882565b6001600160a01b03828116600090815260036020908152604080832085845290915290206002015416611d015760405162461bcd60e51b81526020600482015260146024820152734e6f2062696420686173206265656e206d61646560601b6044820152606401610882565b6001600160a01b0382811660009081526003602081815260408084208685529091529091209081015481546004909201549092611d42928116911683613720565b6001600160a01b038084166000818152600360209081526040808320878452909152908190206002015490516323b872dd60e01b815291926323b872dd92611d9292309216908790600401613d56565b600060405180830381600087803b158015611dac57600080fd5b505af1158015611dc0573d6000803e3d6000fd5b505050506001600160a01b03838116600081815260036020908152604080832087845282529182902060020154825193845290830186905290820184905290911660608201527fee202398f07c781d1a3e79f5d878bc3110b0a397e840e0b553a621b900b503df9060800160405180910390a1611e3d8383613674565b50506005805460ff1916905550565b6000546001600160a01b03163314611e765760405162461bcd60e51b81526004016108829061403e565b612710811115611ec85760405162461bcd60e51b815260206004820181905260248201527f43616e277420736574206120666565206c6172676572207468616e20313030256044820152606401610882565b600655565b6000546001600160a01b03163314611ef75760405162461bcd60e51b81526004016108829061403e565b611f016000613802565b565b60055460ff1615611f265760405162461bcd60e51b815260040161088290613d09565b6005805460ff191660011790556001600160a01b0380831660009081526004602090815260408083208584529091529020548391839116611f795760405162461bcd60e51b815260040161088290613db3565b6000611f8585856123cf565b6001600160a01b038681166000908152600460209081526040808320898452909152902060058101549054929350811691611fc291168284613720565b6001600160a01b03811661208857813410156120205760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682076616c756520746f207075726368617365000000006044820152606401610882565b61202a8686613852565b60075461203a919060ff16614073565b6120449083614092565b34106120835760405162461bcd60e51b815260206004820152600e60248201526d0acc2d8eaca40e8dede40d0d2ced60931b6044820152606401610882565b612100565b6040516323b872dd60e01b815281906001600160a01b038216906323b872dd906120ba90339030908890600401613d56565b6020604051808303816000875af11580156120d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fd9190613e03565b50505b6040516323b872dd60e01b81526001600160a01b038716906323b872dd9061213090309033908a90600401613d56565b600060405180830381600087803b15801561214a57600080fd5b505af115801561215e573d6000803e3d6000fd5b505050507f2801cf64d43fc787c2c9fb26a20429f4453c7cb7961e030e017a055c495fc1a186868461218d3390565b604080516001600160a01b039586168152602081019490945283019190915282166060820152908316608082015260a00160405180910390a16121d086866136d1565b50506005805460ff1916905550505050565b6001600160a01b0380841660009081526004602090815260408083208684529091528120549091859185911661222a5760405162461bcd60e51b815260040161088290613db3565b6001600160a01b03861660009081526004602090815260408083208884529091529020600301548411612285576001600160a01b038616600090815260046020908152604080832088845290915290206001015492506123c6565b6001600160a01b0386166000908152600460208181526040808420898552909152909120015484106122df576001600160a01b038616600090815260046020908152604080832088845290915290206002015492506123c6565b6001600160a01b038616600090815260046020818152604080842089855290915290912060038101549101546123159190613f0f565b6001600160a01b03871660009081526004602090815260408083208984529091529020600281015460019091015461234d9190613f0f565b6001600160a01b03881660009081526004602090815260408083208a845290915290206003015461237e9087613f0f565b6123889190614073565b61239291906140aa565b6001600160a01b03871660009081526004602090815260408083208984529091529020600101546123c39190613f0f565b92505b50509392505050565b6000610c5d8383426121e2565b60055460ff16156123ff5760405162461bcd60e51b815260040161088290613d09565b6005805460ff191660011790556001600160a01b0380881660009081526002602090815260408083208a84529091529020548891889116156124535760405162461bcd60e51b815260040161088290613e54565b6001600160a01b03828116600090815260036020908152604080832085845290915290205416156124965760405162461bcd60e51b815260040161088290613e8b565b6001600160a01b03828116600090815260046020908152604080832085845290915290205416156124d95760405162461bcd60e51b815260040161088290613ece565b8587116125345760405162461bcd60e51b8152602060048201526024808201527f50726963652068617320746f2062652064656372656173696e6720776974682060448201526374696d6560e01b6064820152608401610882565b8385106125835760405162461bcd60e51b815260206004820152601960248201527f456e642068617320746f206265206166746572207374617274000000000000006044820152606401610882565b6040518060c001604052806125953390565b6001600160a01b03168152602001888152602001878152602001868152602001858152602001846001600160a01b0316815250600460008b6001600160a01b03166001600160a01b0316815260200190815260200160002060008a815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550905050886001600160a01b03166323b872dd6126993390565b308b6040518463ffffffff1660e01b81526004016126b993929190613d56565b600060405180830381600087803b1580156126d357600080fd5b505af11580156126e7573d6000803e3d6000fd5b5050604080516001600160a01b03808e168252602082018d90529181018b9052606081018a90526080810189905260a0810188905290861660c08201527fb98fb26fc1ec92bc198a31e9be861178ca91ca743837bb6e412cd7672dfa4709925060e001905061177e565b600061275d8383613218565b6127a25760405162461bcd60e51b81526020600482015260166024820152752737ba1034b71022b733b634b9b41030bab1ba34b7b760511b6044820152606401610882565b506001600160a01b03918216600090815260036020908152604080832093835292905220600401541690565b6000546001600160a01b031633146127f85760405162461bcd60e51b81526004016108829061403e565b60008160ff161161284b5760405162461bcd60e51b815260206004820152601b60248201527f43616e2774207365742061206e65676174697665206e756d62657200000000006044820152606401610882565b6007805460ff191660ff92909216919091179055565b6001600160a01b039182166000908152600460209081526040808320938352929052205416151590565b6001600160a01b039182166000908152600260209081526040808320938352929052205416151590565b60055460ff16156128d85760405162461bcd60e51b815260040161088290613d09565b6005805460ff191660011790556001600160a01b03808416600090815260026020908152604080832086845290915290205484918491166129555760405162461bcd60e51b8152602060048201526017602482015276151bdad95b881a5cc81b9bdd0818995a5b99c81cdbdb19604a1b6044820152606401610882565b60008060005b6001600160a01b03881660009081526002602090815260408083208a8452909152902060010154811015612a3b576001600160a01b0388811660009081526002602090815260408083208b84529091529020600101805491881691839081106129c6576129c6613d9d565b6000918252602090912001546001600160a01b031603612a29576001600160a01b03881660009081526002602081815260408084208b85529091529091200180546001935082908110612a1b57612a1b613d9d565b906000526020600020015492505b80612a3381613e3b565b91505061295b565b5080612abb5760405162461bcd60e51b815260206004820152604360248201527f54686520746f6b656e206973206e6f74206265696e6720736f6c6420696e206560448201527f786368616e676520666f722074686520676976656e206572633230206164647260648201526265737360e81b608482015260a401610882565b6001600160a01b0380881660009081526002602090815260408083208a8452909152902054612aec91168684613720565b6001600160a01b03871660009081526002602081815260408084208a8552909152822080546001600160a01b0319168155612b29929101906138c9565b6001600160a01b03871660009081526002602090815260408083208984529091528120612b5b916001909101906138c9565b6001600160a01b038516612bbd57813414612bb85760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f7567682076616c756520746f207075726368617365000000006044820152606401610882565b612d6f565b843415612c325760405162461bcd60e51b815260206004820152603d60248201527f5061796d656e742063616e6e6f7420626520696e20455243323020616e64206e60448201527f61746976652063757272656e63792073696d756c74616e656f75736c790000006064820152608401610882565b826001600160a01b0382166370a08231336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015612c87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cab9190613dea565b1015612cf95760405162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f75676820746f6b656e2062616c616e636500000000000000006044820152606401610882565b6040516323b872dd60e01b81526001600160a01b038216906323b872dd90612d2990339030908890600401613d56565b6020604051808303816000875af1158015612d48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d6c9190613e03565b50505b6040516323b872dd60e01b81526001600160a01b038816906323b872dd90612d9f90309033908b90600401613d56565b600060405180830381600087803b158015612db957600080fd5b505af1158015612dcd573d6000803e3d6000fd5b505050507f312c851f1f34152daec0c65b170f3f14132c2f963e16e3e84bdc9986d3be5857878784612dfc3390565b604080516001600160a01b039586168152602081019490945283019190915282166060820152908716608082015260a0015b60405180910390a150506005805460ff191690555050505050565b60055460ff1615612e6c5760405162461bcd60e51b815260040161088290613d09565b6005805460ff191660011790556001600160a01b0380841660009081526003602090815260408083208684529091529020548491849116612ebf5760405162461bcd60e51b815260040161088290613db3565b6001600160a01b03821660009081526003602090815260408083208484529091529020600501544210612f285760405162461bcd60e51b8152602060048201526011602482015270105d58dd1a5bdb881a5cc818db1bdcd959607a1b6044820152606401610882565b6000336001600160a01b0387811660009081526003602081815260408084208b855290915290912060048101549101549293501690851015612fa55760405162461bcd60e51b8152602060048201526016602482015275084d2c840d2e640dcdee840d0d2ced040cadcdeeaced60531b6044820152606401610882565b6001600160a01b0387811660009081526003602090815260408083208a84529091529020600201541615613031576001600160a01b0380881660009081526003602081815260408084208b85528252808420928301546002840154861685526001835281852060049094015490951684529190528120805490919061302b908490614092565b90915550505b6001600160a01b0387811660009081526003602081815260408084208b855290915282206002810180546001600160a01b03191694871694909417909355820187905560068201546005909201805490919061308e908490614092565b90915550506001600160a01b0381166130f5578434146130f05760405162461bcd60e51b815260206004820152601960248201527f56616c7565206e6f74206d61746368696e6720616d6f756e74000000000000006044820152606401610882565b6131cb565b34156131535760405162461bcd60e51b815260206004820152602760248201527f4e6f206e65656420746f206164642076616c75652069662070616964207769746044820152660682045524332360cc1b6064820152608401610882565b6040516323b872dd60e01b815281906001600160a01b038216906323b872dd9061318590869030908b90600401613d56565b6020604051808303816000875af11580156131a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131c89190613e03565b50505b604080516001600160a01b0389168152602081018890529081018690523360608201527fbbdb1d80d0638be229629ac8c5e4fcafafbe888f83b23b103888adcd1c08de6f90608001612e2e565b6001600160a01b039182166000908152600360209081526040808320938352929052205416151590565b6000546001600160a01b0316331461326c5760405162461bcd60e51b81526004016108829061403e565b6001600160a01b0381166132d15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610882565b6132da81613802565b50565b61012d831061332e5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920757020746f2033303020746f6b656e496473206174206f6e6365006044820152606401610882565b600a81111561334f5760405162461bcd60e51b815260040161088290613f26565b8061336c5760405162461bcd60e51b815260040161088290613f68565b60008167ffffffffffffffff81111561338757613387613fb0565b6040519080825280602002602001820160405280156133b0578160200160208202803683370190505b50905060008267ffffffffffffffff8111156133ce576133ce613fb0565b6040519080825280602002602001820160405280156133f7578160200160208202803683370190505b50905060005b838110156134a35784848281811061341757613417613d9d565b9050604002016020013583828151811061343357613433613d9d565b60200260200101818152505084848281811061345157613451613d9d565b6134679260206040909202019081019150613a12565b82828151811061347957613479613d9d565b6001600160a01b03909216602092830291909101909101528061349b81613e3b565b9150506133fd565b5060005b8581101561366a5760405180606001604052806134c13390565b6001600160a01b0316815260200183815260200184815250600260008a6001600160a01b03166001600160a01b03168152602001908152602001600020600089898581811061351257613512613d9d565b6020908102929092013583525081810192909252604001600020825181546001600160a01b0319166001600160a01b039091161781558282015180519192613562926001850192909101906138e7565b506040820151805161357e91600284019160209091019061394c565b5050506001600160a01b0388166323b872dd33308a8a868181106135a4576135a4613d9d565b905060200201356040518463ffffffff1660e01b81526004016135c993929190613d56565b600060405180830381600087803b1580156135e357600080fd5b505af11580156135f7573d6000803e3d6000fd5b505050507fb1003e899d6f2f3ec0eb20adebee2184cc627bd53f2e7e41682c6955e91774548888888481811061362f5761362f613d9d565b9050602002013561363d3390565b8888604051613650959493929190613fc6565b60405180910390a18061366281613e3b565b9150506134a7565b5050505050505050565b6001600160a01b0391909116600090815260036020818152604080842094845293905291812080546001600160a01b0319908116825560018201839055600282018054909116905591820181905560058201819055600690910155565b6001600160a01b0391909116600090815260046020818152604080842094845293905291812080546001600160a01b031916815560018101829055600281018290556003810182905590910155565b6000612710600654836137339190614073565b61373d91906140aa565b9050600061374b8284613f0f565b6001600160a01b038087166000908152600160209081526040808320938916835292905290812080549293508392909190613787908490614092565b90915550829050600160006137a46000546001600160a01b031690565b6001600160a01b03166001600160a01b031681526020019081526020016000206000866001600160a01b03166001600160a01b0316815260200190815260200160002060008282546137f69190614092565b90915550505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0382166000908152600460208181526040808420858552909152822060038101549101546138879190613f0f565b6001600160a01b0384166000908152600460209081526040808320868452909152902060028101546001909101546138bf9190613f0f565b610c5d91906140aa565b50805460008255906000526020600020908101906132da9190613987565b82805482825590600052602060002090810192821561393c579160200282015b8281111561393c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613907565b50613948929150613987565b5090565b82805482825590600052602060002090810192821561393c579160200282015b8281111561393c57825182559160200191906001019061396c565b5b808211156139485760008155600101613988565b6001600160a01b03811681146132da57600080fd5b600080604083850312156139c457600080fd5b82356139cf8161399c565b946020939093013593505050565b6000806000606084860312156139f257600080fd5b83356139fd8161399c565b95602085013595506040909401359392505050565b600060208284031215613a2457600080fd5b8135610c5d8161399c565b600080600060608486031215613a4457600080fd5b8335613a4f8161399c565b9250602084013591506040840135613a668161399c565b809150509250925092565b60008060008060008060c08789031215613a8a57600080fd5b8635613a958161399c565b95506020870135945060408701359350606087013592506080870135915060a0870135613ac18161399c565b809150509295509295509295565b60008083601f840112613ae157600080fd5b50813567ffffffffffffffff811115613af957600080fd5b6020830191508360208260061b8501011115613b1457600080fd5b9250929050565b60008060008060608587031215613b3157600080fd5b8435613b3c8161399c565b935060208501359250604085013567ffffffffffffffff811115613b5f57600080fd5b613b6b87828801613acf565b95989497509550505050565b600060208284031215613b8957600080fd5b5035919050565b600080600080600080600060e0888a031215613bab57600080fd5b8735613bb68161399c565b96506020880135955060408801359450606088013593506080880135925060a0880135915060c0880135613be98161399c565b8091505092959891949750929550565b600060208284031215613c0b57600080fd5b813560ff81168114610c5d57600080fd5b60008060408385031215613c2f57600080fd5b8235613c3a8161399c565b91506020830135613c4a8161399c565b809150509250929050565b600080600080600060608688031215613c6d57600080fd5b8535613c788161399c565b9450602086013567ffffffffffffffff80821115613c9557600080fd5b818801915088601f830112613ca957600080fd5b813581811115613cb857600080fd5b8960208260051b8501011115613ccd57600080fd5b602083019650809550506040880135915080821115613ceb57600080fd5b50613cf888828901613acf565b969995985093965092949392505050565b6020808252600690820152651b1bd8dad95960d21b604082015260600190565b60208082526013908201527226bab9ba103132903a37b5b2b71037bbb732b960691b604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0393841681526020810192909252909116604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6020808252601c908201527f546f6b656e206973206e6f74206265696e672061756374696f6e656400000000604082015260600190565b600060208284031215613dfc57600080fd5b5051919050565b600060208284031215613e1557600080fd5b81518015158114610c5d57600080fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613e4d57613e4d613e25565b5060010190565b6020808252601b908201527f546f6b656e20697320616c7265616479206265696e6720736f6c640000000000604082015260600190565b60208082526023908201527f546f6b656e20697320616c726561647920696e20656e676c697368206175637460408201526234b7b760e91b606082015260800190565b60208082526021908201527f546f6b656e20697320616c726561647920696e2064757463682061756374696f6040820152603760f91b606082015260800190565b600082821015613f2157613f21613e25565b500390565b60208082526022908201527f4f6e6c7920757020746f203130207072696365732061726520737570706f7274604082015261195960f21b606082015260800190565b60208082526028908201527f4174206c65617374206f6e65207072696365206e6565647320746f20626520736040820152671c1958da599a595960c21b606082015260800190565b634e487b7160e01b600052604160045260246000fd5b60006080820160018060a01b03808916845260208881860152604082891681870152608060608701528387855260a08701905088945060005b8881101561402e5785356140128161399c565b8516825285840135848301529482019490820190600101613fff565b509b9a5050505050505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600081600019048311821515161561408d5761408d613e25565b500290565b600082198211156140a5576140a5613e25565b500190565b6000826140c757634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220f9defa04dca95252a8e9f84eeecb4a87ad92ccebb577675f87a21113dc7e8d3e64736f6c634300080e0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.