ETH Price: $3,128.84 (-5.63%)
 

Overview

Max Total Supply

319 RECT

Holders

95

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Filtered by Token Holder
openmetaverse.eth
Balance
8 RECT
0x726022a9fe1322fA9590FB244b8164936bB00489
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
MondrianNFT

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
File 1 of 15 : mondrian.sol
// SPDX-License-Identifier: BUSL-1.1
// Copyleft: The NFTs minted by RECT.ART are free works, you can copy, distribute, and modify them under the terms of the Free Art License https://artlibre.org/licence/lal/en/

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";


/// [MIT License]
/// @title Base64
/// @notice Provides a function for encoding some bytes in base64
/// @author Brecht Devos <[email protected]>
library Base64 {
    bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

    /// @notice Encodes some bytes to the base64 representation
    function encode(bytes memory data) internal pure returns (string memory) {
        uint256 len = data.length;
        if (len == 0) return "";

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((len + 2) / 3);

        // Add some extra buffer at the end
        bytes memory result = new bytes(encodedLen + 32);

        bytes memory table = TABLE;

        assembly {
            let tablePtr := add(table, 1)
            let resultPtr := add(result, 32)

            for {
                let i := 0
            } lt(i, len) {

            } {
                i := add(i, 3)
                let input := and(mload(add(data, i)), 0xffffff)

                let out := mload(add(tablePtr, and(shr(18, input), 0x3F)))
                out := shl(8, out)
                out := add(out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF))
                out := shl(8, out)
                out := add(out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF))
                out := shl(8, out)
                out := add(out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF))
                out := shl(224, out)

                mstore(resultPtr, out)

                resultPtr := add(resultPtr, 4)
            }

            switch mod(len, 3)
            case 1 {
                mstore(sub(resultPtr, 2), shl(240, 0x3d3d))
            }
            case 2 {
                mstore(sub(resultPtr, 1), shl(248, 0x3d))
            }

            mstore(result, encodedLen)
        }

        return string(result);
    }
}


contract MondrianNFT is ERC721Enumerable, ReentrancyGuard, Ownable {
    
    using Strings for uint256;

    address  public bidToken;

    address  public cooAddress;
    address  public bonusPoolAddress;
    address  public devPoolAddress; 
      
    event MLOG_AUCTION(
        uint256  artid,
        uint256  lastPrice, 
        uint256  curPrice,
        uint256  bid,
        address  lastOwner,
        address  buyer,
        address  inviterAddress
    );
    event MLOG_NEWNFT(
        uint256  artid,
        address  artist,
        uint256  id
    );
    
    //Mondrian NFT
    //following items could be changed by coo
    uint256 private bidAward;
    uint256 private invitationAwardShare;
    uint256 private bonusAwardShare;
    uint256 private send_gas_limit;
    
    mapping(uint256 => uint256) private  maxMap;
    mapping(uint256 => uint256) private mRects1;
    mapping(uint256 => uint256) private mRects2;
    
    mapping(uint256 => uint256) private rounds;
    mapping(uint256 => address) private artists;
    
    function creatMondrianNFT(uint256 parent, uint256 rect1, uint256 rect2,uint256 id)external {
        require((rect1!=0)&&(rect2!=0), "rect can not be zero");
        require(_exists(parent), "parent not existed");

        uint256 newid=0;
        for(uint256 i=0;;i++){
            require(i<32, "parent must < 32byte");
            
            uint256 p=getNByte(parent,i);
            
            if(p==0){
                uint256 max=maxMap[parent];
                require(max<255, "can not set parent for already max 255");
                
                newid=setNByte(parent,i,max+1);
                maxMap[parent]=max+1;
                
                break;
            }
            
        }
        
        mRects1[newid]=rect1;
        mRects2[newid]=rect2;
        
        _safeMint(msg.sender, newid);
        artists[newid]=msg.sender;
        emit MLOG_NEWNFT(newid,msg.sender,id);
        
    }

    //0 is first byte
    function getNByte(uint256 u, uint256 n)internal pure returns (uint256) {
        uint256 firstN = (u>>((n)*8))&0xff;
        return firstN;
    } 
    //0 is first byte
    function setNByte(uint256 u, uint256 n,uint256 b)internal pure returns (uint256) {
        //clear the byte to zero
        uint256 mask = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00;
    
        if(n>0){
            mask=mask<<(n*8)|(mask>>((32-n)*8));
        }
        u=u&mask;
        //set the byte
        u=u|(b<<(n*8));
        return u;
    } 
    
    function getNByteUint24(uint256 u, uint256 n)internal pure returns (uint256) {
        uint256 firstN = (u>>((n)*8))&0xffffff;
        return firstN;
    } 
    
    function getParent(uint256 u, uint256 n)internal pure returns (uint256) {
        if(n==0){
            return 0;
        }
        uint256 mask=0xff;
        for(uint256 i=0;i<n;i++){
            mask=mask|(0xff<<(i*8));
        }
       
        return u&mask;
    } 
    function getLastParent(uint256 u)internal pure returns (uint256) {
        uint256 mask=0xff;
        for(uint256 i=0;i<32;i++){
            if(u&(0xff<<(i*8))==0){
                break;
            }
            mask=mask|(0xff<<(i*8));
        }
        return u&(mask>>8);
    } 
    
    string constant p0='<svg width="240" height="240" xmlns="http://www.w3.org/2000/svg" version="1.1">';
    string constant p1='<rect x="';
    string constant p2='" y="';
    string constant p3='" width="';
    string constant p4='" height="';
    string constant p5='" style="fill:#';
    string constant p6='" />';
    string constant p9 = '</svg>';
    
    struct Ri{       
        uint256 px;
        uint256 py;
        uint256 w;
        uint256 h;       
        uint256 c;
    }   
     
    function tokenURI(uint256 tokenId) override public view returns (string memory) {
   

        string memory output = string(abi.encodePacked(p0));
 

        uint256 rect1;
        uint256 p;
        uint256 x;
        Ri memory ri;
        
        for(uint256  i=1;;i++){
            p=getParent(tokenId,i);
           
            for(uint j=0;j<2;j++){
                rect1=j==0?mRects1[p]:mRects2[p];
                
                for(x=0;x<4;x++){                  
                    ri.px=rect1&0xff;
                    rect1>>=8;
                    
                    ri.py=rect1&0xff;
                    rect1>>=8;
                   
                    ri.w=rect1&0xff;
                    rect1>>=8;
                    
                    ri.h=rect1&0xff;
                    rect1>>=8;
                    //skip zero rect
                    if((ri.w==0)&&(ri.h==0)){
                        continue;
                    }
                    
                    ri.c=rect1&0xffffff;
                    rect1>>=24;
                    
                    //output = string(abi.encodePacked(output, p1,ri.px.toString(), p2,ri.py.toString(),p3,ri.w.toString(),p4,ri.h.toString(),p5,uint24tohexstr(ri.c),p6));

                    output = string(abi.encodePacked(output, p1,ri.px.toString(), p2,ri.py.toString(),p3));
                    output = string(abi.encodePacked(output,ri.w.toString(),p4,ri.h.toString(),p5,uint24tohexstr(ri.c),p6));
                }
            }
            
            
            if(p==tokenId){
                break;
            }
            
        }
        
        bytes memory bytesStringTrimmed = new bytes(8);
        for (uint j = 0; j < 4; j++) {
            bytesStringTrimmed[j] = bytes1(uint8(getNByte(mRects1[tokenId],28+j)));
        }
        for (uint j = 0; j < 4; j++) {
            bytesStringTrimmed[4+j] = bytes1(uint8(getNByte(mRects2[tokenId],28+j)));
        }


        string memory json = Base64.encode(bytes(string(abi.encodePacked('{"name": "',string(bytesStringTrimmed), '", "description": "Collaborative, Evolvable & Self-Financing NFT, Powered by TopBidder", "image": "data:image/svg+xml;base64,', Base64.encode(abi.encodePacked(output, p9)), '"}'))));
        output = string(abi.encodePacked('data:application/json;base64,', json));

        return output;
    }
    
    uint256[] private priceList;
     function price(uint256 _round) internal
     returns (uint256)
     {
         if(_round>priceList.length){
             uint256 lastValue=priceList[priceList.length-1];
             for(uint256 i=priceList.length;i<_round;i++){
                 lastValue=lastValue*11/10;
                 priceList.push(lastValue);
             }
             return lastValue;
         }
         return priceList[_round-1];
     }     
     
     function initRoundPrice() internal
     {
         uint256 lastValue=0;
         for(uint256 i=1;i<12;i++){
            if(i<11){
                lastValue=i*0.05 ether;
            }else{
                lastValue=lastValue*11/10;
            }
            priceList.push(lastValue);
         }
     } 
    function bid(address inviterAddress, uint256 artid) nonReentrant public payable
    {
         require(_exists(artid),"artid not exist");
         require(artid>0,"art 0 can not bid");
         address lastOwner=ownerOf(artid);
         require(lastOwner!=msg.sender, "ERR_CAN_NOT_PURCHASE_OWN_ART");       
         uint256 r=rounds[artid];
         uint256 curprice=0;
         if(r>0){
             curprice=price(r); 
         }
        uint256 payprice=price(r+1);
        require(msg.value>=payprice, "ERR_NOT_ENOUGH_MONEY");
        
         //refund extra money
         payable(msg.sender).call{value:msg.value-payprice,gas:send_gas_limit}("");
         
         uint256 smoney=payprice-curprice;
         
         payable(artists[artid]).call{value:smoney/2,gas:send_gas_limit}("");

         uint256 parent=getLastParent(artid);
         if(parent==0){
             payable(devPoolAddress).call{value:smoney/10,gas:send_gas_limit}("");
         }else{
             payable(ownerOf(parent)).call{value:smoney/10,gas:send_gas_limit}("");
         }
         
         payable(bonusPoolAddress).call{value:smoney*bonusAwardShare/100,gas:send_gas_limit}("");
        
         payable(inviterAddress).call{value:smoney*invitationAwardShare/100,gas:send_gas_limit}("");
        
         payable(lastOwner).call{value:smoney*3/10+curprice,gas:send_gas_limit}("");

         if(IERC20(bidToken).balanceOf(address(this))>=bidAward){
                  IERC20(bidToken).transfer(msg.sender,bidAward);                  
          }
         
         rounds[artid]++;
         _transfer(lastOwner, msg.sender, artid);

         emit MLOG_AUCTION(artid, curprice,payprice,bidAward,lastOwner,msg.sender,inviterAddress );

    }
    
    function uint8tohexchar(uint8 i) internal pure returns (uint8) {
        return (i > 9) ?
            (i + 87) : // ascii a-f
            (i + 48); // ascii 0-9
    }
    
    function uint24tohexstr(uint256 i) internal pure returns (string memory) {
        bytes memory o = new bytes(6);
        uint24 mask = 0x00000f;
        o[5] = bytes1(uint8tohexchar(uint8(i & mask)));
        i = i >> 4;
        o[4] = bytes1(uint8tohexchar(uint8(i & mask)));
        i = i >> 4;
        o[3] = bytes1(uint8tohexchar(uint8(i & mask)));
        i = i >> 4;
        o[2] = bytes1(uint8tohexchar(uint8(i & mask)));
        i = i >> 4;
        o[1] = bytes1(uint8tohexchar(uint8(i & mask)));
        i = i >> 4;
        o[0] = bytes1(uint8tohexchar(uint8(i & mask)));
        return string(o);
    }
    
    function changeBidAward(uint256 newBidAward)external{
        require(cooAddress==msg.sender, "ERR_MUST_COO"); 
        bidAward=newBidAward;
    }
    function changeShare(uint256 newInvitationShare,uint256 newBonusShare)external{
        require(cooAddress==msg.sender, "ERR_MUST_COO"); 
        invitationAwardShare=newInvitationShare;
        bonusAwardShare=newBonusShare;
    }
    function changePoolAddress(address _bonuspool,address _devpool)external{
        require(cooAddress==msg.sender, "ERR_MUST_COO"); 
        bonusPoolAddress=_bonuspool;
        devPoolAddress=_devpool;
    }
    function changeGasLimit(uint256 _gas_limit)external{
        require(cooAddress==msg.sender, "ERR_MUST_COO"); 
        send_gas_limit=_gas_limit;
    }
    
    function rescueBid(address _moneyback) external {
        require(cooAddress==msg.sender, "ERR_MUST_COO"); 
        IERC20(bidToken).transfer(_moneyback, IERC20(bidToken).balanceOf(address(this)));
    }

    function rescueETH(address _moneyback) external {
        require(cooAddress==msg.sender, "ERR_MUST_COO"); 
        payable(_moneyback).transfer(address(this).balance);
    }

    function setCOO(address _coo) external
    {
        require(cooAddress==msg.sender, "ERR_MUST_COO"); 
        cooAddress = _coo;
    }

    constructor(address _bid,address _coo) ERC721("Rect.Art", "RECT") Ownable() {
        bidToken=_bid;

        initRoundPrice();
        devPoolAddress=msg.sender;
        bonusPoolAddress=msg.sender;
        cooAddress=_coo;
        send_gas_limit=21000;
        artists[0]=devPoolAddress;
        //this address should not be contract as receive ERC721
        _safeMint(devPoolAddress, 0);
        bidAward=50 ether;
        invitationAwardShare=2;
        bonusAwardShare=8;
    }
}

File 2 of 15 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 3 of 15 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 4 of 15 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 5 of 15 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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;
    }
}

File 6 of 15 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 7 of 15 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 8 of 15 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 9 of 15 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
        return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 10 of 15 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 11 of 15 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, 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 12 of 15 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @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.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 13 of 15 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        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 14 of 15 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 15 of 15 : ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_bid","type":"address"},{"internalType":"address","name":"_coo","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"artid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"curPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bid","type":"uint256"},{"indexed":false,"internalType":"address","name":"lastOwner","type":"address"},{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"address","name":"inviterAddress","type":"address"}],"name":"MLOG_AUCTION","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"artid","type":"uint256"},{"indexed":false,"internalType":"address","name":"artist","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"MLOG_NEWNFT","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"inviterAddress","type":"address"},{"internalType":"uint256","name":"artid","type":"uint256"}],"name":"bid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"bidToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bonusPoolAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newBidAward","type":"uint256"}],"name":"changeBidAward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gas_limit","type":"uint256"}],"name":"changeGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bonuspool","type":"address"},{"internalType":"address","name":"_devpool","type":"address"}],"name":"changePoolAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newInvitationShare","type":"uint256"},{"internalType":"uint256","name":"newBonusShare","type":"uint256"}],"name":"changeShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cooAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"parent","type":"uint256"},{"internalType":"uint256","name":"rect1","type":"uint256"},{"internalType":"uint256","name":"rect2","type":"uint256"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"creatMondrianNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devPoolAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_moneyback","type":"address"}],"name":"rescueBid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_moneyback","type":"address"}],"name":"rescueETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_coo","type":"address"}],"name":"setCOO","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620043dc380380620043dc83398101604081905262000034916200098c565b6040805180820182526008815267149958dd0b905c9d60c21b602080830191825283518085019094526004845263149150d560e21b9084015281519192916200008091600091620008c9565b50805162000096906001906020840190620008c9565b50506001600a5550620000a93362000167565b600c80546001600160a01b0319166001600160a01b038416179055620000ce620001b9565b600f8054336001600160a01b03199182168117909255600e8054821683179055600d805482166001600160a01b038516179055615208601355600080805260186020527f999d26de3473317ead3eeaf34ca78057f1439db67b6953469c3c96ce9caf6bd78054909216831790915562000148919062000259565b50506802b5e3af16b18800006010556002601155600860125562000b89565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060015b600c8110156200025557600b811015620001ed57620001e58166b1a2bc2ec50000620009da565b91506200020b565b600a620001fc83600b620009da565b620002089190620009fc565b91505b601980546001810182556000919091527f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c969501829055806200024c8162000a1f565b915050620001be565b5050565b620002558282604051806020016040528060008152506200027b60201b60201c565b620002878383620002f7565b6200029660008484846200044d565b620002f25760405162461bcd60e51b81526020600482015260326024820152600080516020620043bc83398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084015b60405180910390fd5b505050565b6001600160a01b0382166200034f5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401620002e9565b6000818152600260205260409020546001600160a01b031615620003b65760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401620002e9565b620003c460008383620005a6565b6001600160a01b0382166000908152600360205260408120805460019290620003ef90849062000a3d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006200046e846001600160a01b03166200068260201b62001f0c1760201c565b156200059a57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290620004a890339089908890889060040162000a58565b6020604051808303816000875af1925050508015620004e6575060408051601f3d908101601f19168201909252620004e39181019062000ad3565b60015b6200057f573d80801562000517576040519150601f19603f3d011682016040523d82523d6000602084013e6200051c565b606091505b508051620005775760405162461bcd60e51b81526020600482015260326024820152600080516020620043bc83398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401620002e9565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506200059e565b5060015b949350505050565b620005be838383620002f260201b620009061760201c565b6001600160a01b0383166200061c576200061681600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b62000642565b816001600160a01b0316836001600160a01b031614620006425762000642838262000688565b6001600160a01b0382166200065c57620002f28162000735565b826001600160a01b0316826001600160a01b031614620002f257620002f28282620007ef565b3b151590565b60006001620006a2846200084060201b620012e11760201c565b620006ae919062000b06565b60008381526007602052604090205490915080821462000702576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090620007499060019062000b06565b6000838152600960205260408120546008805493945090928490811062000774576200077462000b20565b90600052602060002001549050806008838154811062000798576200079862000b20565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480620007d357620007d362000b36565b6001900381819060005260206000200160009055905550505050565b600062000807836200084060201b620012e11760201c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160a01b038216620008ad5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401620002e9565b506001600160a01b031660009081526003602052604090205490565b828054620008d79062000b4c565b90600052602060002090601f016020900481019282620008fb576000855562000946565b82601f106200091657805160ff191683800117855562000946565b8280016001018555821562000946579182015b828111156200094657825182559160200191906001019062000929565b506200095492915062000958565b5090565b5b8082111562000954576000815560010162000959565b80516001600160a01b03811681146200098757600080fd5b919050565b60008060408385031215620009a057600080fd5b620009ab836200096f565b9150620009bb602084016200096f565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615620009f757620009f7620009c4565b500290565b60008262000a1a57634e487b7160e01b600052601260045260246000fd5b500490565b600060001982141562000a365762000a36620009c4565b5060010190565b6000821982111562000a535762000a53620009c4565b500190565b600060018060a01b038087168352602081871681850152856040850152608060608501528451915081608085015260005b8281101562000aa75785810182015185820160a00152810162000a89565b8281111562000aba57600060a084870101525b5050601f01601f19169190910160a00195945050505050565b60006020828403121562000ae657600080fd5b81516001600160e01b03198116811462000aff57600080fd5b9392505050565b60008282101562000b1b5762000b1b620009c4565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b600181811c9082168062000b6157607f821691505b6020821081141562000b8357634e487b7160e01b600052602260045260246000fd5b50919050565b6138238062000b996000396000f3fe6080604052600436106101e35760003560e01c8063715018a611610102578063a526c7f811610095578063c87b56dd11610064578063c87b56dd14610573578063dfafd4fd14610593578063e985e9c5146105b3578063f2fde38b146105fc57600080fd5b8063a526c7f8146104f3578063b047fb5014610513578063b88d4fde14610533578063baf539ee1461055357600080fd5b806395d89b41116100d157806395d89b411461047e57806399f2c13914610493578063a0e86fd0146104b3578063a22cb465146104d357600080fd5b8063715018a61461040b5780637b711a281461042057806384efd675146104405780638da5cb5b1461046057600080fd5b80632f745c591161017a5780635e1945ce116101495780635e1945ce1461038b5780636352211e146103ab5780636604a6a3146103cb57806370a08231146103eb57600080fd5b80632f745c591461031857806342842e0e146103385780634f6ccce71461035857806359d667a51461037857600080fd5b8063095ea7b3116101b6578063095ea7b31461029957806318160ddd146102b957806323b872dd146102d85780632ba73c15146102f857600080fd5b806301ffc9a7146101e857806304824e701461021d57806306fdde031461023f578063081812fc14610261575b600080fd5b3480156101f457600080fd5b50610208610203366004612fe0565b61061c565b60405190151581526020015b60405180910390f35b34801561022957600080fd5b5061023d610238366004613020565b610647565b005b34801561024b57600080fd5b506102546106ce565b6040516102149190613093565b34801561026d57600080fd5b5061028161027c3660046130a6565b610760565b6040516001600160a01b039091168152602001610214565b3480156102a557600080fd5b5061023d6102b43660046130bf565b6107f5565b3480156102c557600080fd5b506008545b604051908152602001610214565b3480156102e457600080fd5b5061023d6102f33660046130e9565b61090b565b34801561030457600080fd5b5061023d610313366004613020565b610992565b34801561032457600080fd5b506102ca6103333660046130bf565b6109fd565b34801561034457600080fd5b5061023d6103533660046130e9565b610aa5565b34801561036457600080fd5b506102ca6103733660046130a6565b610ac0565b61023d6103863660046130bf565b610b64565b34801561039757600080fd5b5061023d6103a63660046130a6565b611208565b3480156103b757600080fd5b506102816103c63660046130a6565b611256565b3480156103d757600080fd5b50600e54610281906001600160a01b031681565b3480156103f757600080fd5b506102ca610406366004613020565b6112e1565b34801561041757600080fd5b5061023d61137b565b34801561042c57600080fd5b5061023d61043b366004613125565b6113e1565b34801561044c57600080fd5b50600f54610281906001600160a01b031681565b34801561046c57600080fd5b50600b546001600160a01b0316610281565b34801561048a57600080fd5b50610254611668565b34801561049f57600080fd5b5061023d6104ae366004613157565b611677565b3480156104bf57600080fd5b5061023d6104ce366004613179565b6116cb565b3480156104df57600080fd5b5061023d6104ee3660046131ba565b611742565b3480156104ff57600080fd5b5061023d61050e366004613020565b61174d565b34801561051f57600080fd5b50600d54610281906001600160a01b031681565b34801561053f57600080fd5b5061023d61054e366004613207565b61187b565b34801561055f57600080fd5b5061023d61056e3660046130a6565b611909565b34801561057f57600080fd5b5061025461058e3660046130a6565b611957565b34801561059f57600080fd5b50600c54610281906001600160a01b031681565b3480156105bf57600080fd5b506102086105ce366004613179565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561060857600080fd5b5061023d610617366004613020565b611e2a565b60006001600160e01b0319821663780e9d6360e01b1480610641575061064182611f12565b92915050565b600d546001600160a01b031633146106955760405162461bcd60e51b815260206004820152600c60248201526b4552525f4d5553545f434f4f60a01b60448201526064015b60405180910390fd5b6040516001600160a01b038216904780156108fc02916000818181858888f193505050501580156106ca573d6000803e3d6000fd5b5050565b6060600080546106dd906132e3565b80601f0160208091040260200160405190810160405280929190818152602001828054610709906132e3565b80156107565780601f1061072b57610100808354040283529160200191610756565b820191906000526020600020905b81548152906001019060200180831161073957829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166107d95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161068c565b506000908152600460205260409020546001600160a01b031690565b600061080082611256565b9050806001600160a01b0316836001600160a01b0316141561086e5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161068c565b336001600160a01b038216148061088a575061088a81336105ce565b6108fc5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161068c565b6109068383611f62565b505050565b6109153382611fd0565b6109875760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606482015260840161068c565b6109068383836120c7565b600d546001600160a01b031633146109db5760405162461bcd60e51b815260206004820152600c60248201526b4552525f4d5553545f434f4f60a01b604482015260640161068c565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6000610a08836112e1565b8210610a7c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e6473000000000000000000000000000000000000000000606482015260840161068c565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6109068383836040518060200160405280600081525061187b565b6000610acb60085490565b8210610b3f5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e64730000000000000000000000000000000000000000606482015260840161068c565b60088281548110610b5257610b5261331e565b90600052602060002001549050919050565b6002600a541415610bb75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161068c565b6002600a55610bdd816000908152600260205260409020546001600160a01b0316151590565b610c295760405162461bcd60e51b815260206004820152600f60248201527f6172746964206e6f742065786973740000000000000000000000000000000000604482015260640161068c565b60008111610c795760405162461bcd60e51b815260206004820152601160248201527f61727420302063616e206e6f7420626964000000000000000000000000000000604482015260640161068c565b6000610c8482611256565b90506001600160a01b038116331415610cdf5760405162461bcd60e51b815260206004820152601c60248201527f4552525f43414e5f4e4f545f50555243484153455f4f574e5f41525400000000604482015260640161068c565b600082815260176020526040812054908115610d0157610cfe82612286565b90505b6000610d16610d1184600161334a565b612286565b905080341015610d685760405162461bcd60e51b815260206004820152601460248201527f4552525f4e4f545f454e4f5547485f4d4f4e4559000000000000000000000000604482015260640161068c565b33610d738234613362565b6013546040519091906000818181858888f193505050503d8060008114610db6576040519150601f19603f3d011682016040523d82523d6000602084013e610dbb565b606091505b50505060008282610dcc9190613362565b6000878152601860205260409020549091506001600160a01b0316610df260028361338f565b6013546040519091906000818181858888f193505050503d8060008114610e35576040519150601f19603f3d011682016040523d82523d6000602084013e610e3a565b606091505b5050506000610e4887612356565b905080610eb657600f546001600160a01b0316610e66600a8461338f565b6013546040519091906000818181858888f193505050503d8060008114610ea9576040519150601f19603f3d011682016040523d82523d6000602084013e610eae565b606091505b505050610f1f565b610ebf81611256565b6001600160a01b0316610ed3600a8461338f565b6013546040519091906000818181858888f193505050503d8060008114610f16576040519150601f19603f3d011682016040523d82523d6000602084013e610f1b565b606091505b5050505b600e546012546001600160a01b0390911690606490610f3e90856133a3565b610f48919061338f565b6013546040519091906000818181858888f193505050503d8060008114610f8b576040519150601f19603f3d011682016040523d82523d6000602084013e610f90565b606091505b505050876001600160a01b0316606460115484610fad91906133a3565b610fb7919061338f565b6013546040519091906000818181858888f193505050503d8060008114610ffa576040519150601f19603f3d011682016040523d82523d6000602084013e610fff565b606091505b5050506001600160a01b03861684600a61101a8560036133a3565b611024919061338f565b61102e919061334a565b6013546040519091906000818181858888f193505050503d8060008114611071576040519150601f19603f3d011682016040523d82523d6000602084013e611076565b606091505b5050601054600c546040516370a0823160e01b81523060048201529192506001600160a01b0316906370a0823190602401602060405180830381865afa1580156110c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e891906133c2565b1061116857600c5460105460405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015611142573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116691906133db565b505b6000878152601760205260408120805491611182836133f8565b91905055506111928633896120c7565b601054604080518981526020810187905280820186905260608101929092526001600160a01b0388811660808401523360a08401528a1660c0830152517f803794f7586395d3d424b3aefaf42f307222945689f6fa0dad48e43f4d756e4a9181900360e00190a150506001600a55505050505050565b600d546001600160a01b031633146112515760405162461bcd60e51b815260206004820152600c60248201526b4552525f4d5553545f434f4f60a01b604482015260640161068c565b601055565b6000818152600260205260408120546001600160a01b0316806106415760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606482015260840161068c565b60006001600160a01b03821661135f5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f206164647265737300000000000000000000000000000000000000000000606482015260840161068c565b506001600160a01b031660009081526003602052604090205490565b600b546001600160a01b031633146113d55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161068c565b6113df60006123b2565b565b82158015906113ef57508115155b61143b5760405162461bcd60e51b815260206004820152601460248201527f726563742063616e206e6f74206265207a65726f000000000000000000000000604482015260640161068c565b6000848152600260205260409020546001600160a01b031661149f5760405162461bcd60e51b815260206004820152601260248201527f706172656e74206e6f7420657869737465640000000000000000000000000000604482015260640161068c565b6000805b602081106114f35760405162461bcd60e51b815260206004820152601460248201527f706172656e74206d757374203c20333262797465000000000000000000000000604482015260640161068c565b60006114ff8783612404565b9050806115c45760008781526014602052604090205460ff811061158b5760405162461bcd60e51b815260206004820152602660248201527f63616e206e6f742073657420706172656e7420666f7220616c7265616479206d60448201527f6178203235350000000000000000000000000000000000000000000000000000606482015260840161068c565b6115a0888461159b84600161334a565b612420565b93506115ad81600161334a565b600089815260146020526040902055506115d79050565b50806115cf816133f8565b9150506114a3565b506000818152601560209081526040808320879055601690915290208390556116003382612473565b60008181526018602090815260409182902080546001600160a01b031916339081179091558251848152918201529081018390527ff86fb62a4d8f2f034122ffb9ea040ef4c00f9474edb7bcfc2bac70ce976a188b9060600160405180910390a15050505050565b6060600180546106dd906132e3565b600d546001600160a01b031633146116c05760405162461bcd60e51b815260206004820152600c60248201526b4552525f4d5553545f434f4f60a01b604482015260640161068c565b601191909155601255565b600d546001600160a01b031633146117145760405162461bcd60e51b815260206004820152600c60248201526b4552525f4d5553545f434f4f60a01b604482015260640161068c565b600e80546001600160a01b039384166001600160a01b031991821617909155600f8054929093169116179055565b6106ca33838361248d565b600d546001600160a01b031633146117965760405162461bcd60e51b815260206004820152600c60248201526b4552525f4d5553545f434f4f60a01b604482015260640161068c565b600c546040516370a0823160e01b81523060048201526001600160a01b039091169063a9059cbb90839083906370a0823190602401602060405180830381865afa1580156117e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061180c91906133c2565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611857573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ca91906133db565b6118853383611fd0565b6118f75760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606482015260840161068c565b6119038484848461255c565b50505050565b600d546001600160a01b031633146119525760405162461bcd60e51b815260206004820152600c60248201526b4552525f4d5553545f434f4f60a01b604482015260640161068c565b601355565b606060006040518060800160405280604f815260200161379f604f91396040516020016119849190613413565b604051602081830303815290604052905060008060006119cc6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b60015b6119d988826125da565b935060005b6002811015611c61578015611a0157600085815260166020526040902054611a11565b6000858152601560205260409020545b9550600093505b6004841015611c4f5760ff8087168452600887901c8116602080860191909152601088901c821660408601819052601889901c90921660608601529690961c95158015611a6757506060830151155b15611a7157611c3d565b62ffffff8616608084015260408051808201909152600981527f3c7265637420783d2200000000000000000000000000000000000000000000006020820152835160189790971c96889190611ac590612626565b6040518060400160405280600581526020017f2220793d22000000000000000000000000000000000000000000000000000000815250611b088760200151612626565b6040518060400160405280600981526020017f222077696474683d220000000000000000000000000000000000000000000000815250604051602001611b539695949392919061342f565b604051602081830303815290604052965086611b728460400151612626565b6040518060400160405280600a81526020017f22206865696768743d2200000000000000000000000000000000000000000000815250611bb58660600151612626565b6040518060400160405280600f81526020017f22207374796c653d2266696c6c3a230000000000000000000000000000000000815250611bf88860800151612724565b604051806040016040528060048152602001631110179f60e11b815250604051602001611c2b97969594939291906134ae565b60405160208183030381529060405296505b83611c47816133f8565b945050611a18565b80611c59816133f8565b9150506119de565b5087841415611c6f57611c81565b80611c79816133f8565b9150506119cf565b5060408051600880825281830190925260009160208201818036833701905050905060005b6004811015611d1057600089815260156020526040902054611cd290611ccd83601c61334a565b612404565b60f81b828281518110611ce757611ce761331e565b60200101906001600160f81b031916908160001a90535080611d08816133f8565b915050611ca6565b5060005b6004811015611d8357600089815260166020526040902054611d3b90611ccd83601c61334a565b60f81b82611d4a83600461334a565b81518110611d5a57611d5a61331e565b60200101906001600160f81b031916908160001a90535080611d7b816133f8565b915050611d14565b506000611dfa82611de9896040518060400160405280600681526020017f3c2f7376673e0000000000000000000000000000000000000000000000000000815250604051602001611dd5929190613540565b6040516020818303038152906040526128df565b604051602001611dd592919061356f565b905080604051602001611e0d9190613671565b60408051601f198184030181529190529998505050505050505050565b600b546001600160a01b03163314611e845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161068c565b6001600160a01b038116611f005760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161068c565b611f09816123b2565b50565b3b151590565b60006001600160e01b031982166380ac58cd60e01b1480611f4357506001600160e01b03198216635b5e139f60e01b145b8061064157506301ffc9a760e01b6001600160e01b0319831614610641565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611f9782611256565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166120495760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161068c565b600061205483611256565b9050806001600160a01b0316846001600160a01b0316148061208f5750836001600160a01b031661208484610760565b6001600160a01b0316145b806120bf57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166120da82611256565b6001600160a01b0316146121565760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e0000000000000000000000000000000000000000000000606482015260840161068c565b6001600160a01b0382166121b85760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161068c565b6121c3838383612a45565b6121ce600082611f62565b6001600160a01b03831660009081526003602052604081208054600192906121f7908490613362565b90915550506001600160a01b038216600090815260036020526040812080546001929061222590849061334a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6019546000908211156123395760198054600091906122a790600190613362565b815481106122b7576122b761331e565b6000918252602090912001546019549091505b8381101561233257600a6122df83600b6133a3565b6122e9919061338f565b601980546001810182556000919091527f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c96950181905591508061232a816133f8565b9150506122ca565b5092915050565b6019612346600184613362565b81548110610b5257610b5261331e565b600060ff815b60208110156123a5576123708160086133a3565b60ff901b841661237f576123a5565b61238a8160086133a3565b60ff901b82179150808061239d906133f8565b91505061235c565b5060081c91909116919050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000806124128360086133a3565b9390931c60ff169392505050565b600060ff19831561245557612436846020613362565b6124419060086133a3565b81901c61244f8560086133a3565b9190911b175b938416936124648460086133a3565b9290921b939093179392505050565b6106ca828260405180602001604052806000815250612afd565b816001600160a01b0316836001600160a01b031614156124ef5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161068c565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6125678484846120c7565b61257384848484612b7b565b6119035760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840161068c565b6000816125e957506000610641565b60ff60005b8381101561261c576126018160086133a3565b60ff901b821791508080612614906133f8565b9150506125ee565b5090921692915050565b60608161264a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612674578061265e816133f8565b915061266d9050600a8361338f565b915061264e565b60008167ffffffffffffffff81111561268f5761268f6131f1565b6040519080825280601f01601f1916602001820160405280156126b9576020820181803683370190505b5090505b84156120bf576126ce600183613362565b91506126db600a866136b6565b6126e690603061334a565b60f81b8183815181106126fb576126fb61331e565b60200101906001600160f81b031916908160001a90535061271d600a8661338f565b94506126bd565b60408051600680825281830190925260609160009190602082018180368337019050509050600f612756848216612cc4565b60f81b8260058151811061276c5761276c61331e565b60200101906001600160f81b031916908160001a905350600484901c935061279a8162ffffff168516612cc4565b60f81b826004815181106127b0576127b061331e565b60200101906001600160f81b031916908160001a905350600484901c93506127de8162ffffff168516612cc4565b60f81b826003815181106127f4576127f461331e565b60200101906001600160f81b031916908160001a905350600484901c93506128228162ffffff168516612cc4565b60f81b826002815181106128385761283861331e565b60200101906001600160f81b031916908160001a905350600484901c93506128668162ffffff168516612cc4565b60f81b8260018151811061287c5761287c61331e565b60200101906001600160f81b031916908160001a905350600484901c93506128aa8162ffffff168516612cc4565b60f81b826000815181106128c0576128c061331e565b60200101906001600160f81b031916908160001a905350909392505050565b8051606090806128ff575050604080516020810190915260008152919050565b6000600361290e83600261334a565b612918919061338f565b6129239060046133a3565b9050600061293282602061334a565b67ffffffffffffffff81111561294a5761294a6131f1565b6040519080825280601f01601f191660200182016040528015612974576020820181803683370190505b509050600060405180606001604052806040815260200161375f604091399050600181016020830160005b86811015612a00576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b83526004909201910161299f565b506003860660018114612a1a5760028114612a2b57612a37565b613d3d60f01b600119830152612a37565b603d60f81b6000198301525b505050918152949350505050565b6001600160a01b038316612aa057612a9b81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612ac3565b816001600160a01b0316836001600160a01b031614612ac357612ac38382612cec565b6001600160a01b038216612ada5761090681612d89565b826001600160a01b0316826001600160a01b031614610906576109068282612e38565b612b078383612e7c565b612b146000848484612b7b565b6109065760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840161068c565b60006001600160a01b0384163b15612cb957604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612bbf9033908990889088906004016136ca565b6020604051808303816000875af1925050508015612bfa575060408051601f3d908101601f19168201909252612bf791810190613706565b60015b612c9f573d808015612c28576040519150601f19603f3d011682016040523d82523d6000602084013e612c2d565b606091505b508051612c975760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840161068c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506120bf565b506001949350505050565b600060098260ff1611612ce157612cdc826030613723565b610641565b610641826057613723565b60006001612cf9846112e1565b612d039190613362565b600083815260076020526040902054909150808214612d56576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612d9b90600190613362565b60008381526009602052604081205460088054939450909284908110612dc357612dc361331e565b906000526020600020015490508060088381548110612de457612de461331e565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612e1c57612e1c613748565b6001900381819060005260206000200160009055905550505050565b6000612e43836112e1565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216612ed25760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161068c565b6000818152600260205260409020546001600160a01b031615612f375760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161068c565b612f4360008383612a45565b6001600160a01b0382166000908152600360205260408120805460019290612f6c90849061334a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b031981168114611f0957600080fd5b600060208284031215612ff257600080fd5b8135612ffd81612fca565b9392505050565b80356001600160a01b038116811461301b57600080fd5b919050565b60006020828403121561303257600080fd5b612ffd82613004565b60005b8381101561305657818101518382015260200161303e565b838111156119035750506000910152565b6000815180845261307f81602086016020860161303b565b601f01601f19169290920160200192915050565b602081526000612ffd6020830184613067565b6000602082840312156130b857600080fd5b5035919050565b600080604083850312156130d257600080fd5b6130db83613004565b946020939093013593505050565b6000806000606084860312156130fe57600080fd5b61310784613004565b925061311560208501613004565b9150604084013590509250925092565b6000806000806080858703121561313b57600080fd5b5050823594602084013594506040840135936060013592509050565b6000806040838503121561316a57600080fd5b50508035926020909101359150565b6000806040838503121561318c57600080fd5b61319583613004565b91506131a360208401613004565b90509250929050565b8015158114611f0957600080fd5b600080604083850312156131cd57600080fd5b6131d683613004565b915060208301356131e6816131ac565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561321d57600080fd5b61322685613004565b935061323460208601613004565b925060408501359150606085013567ffffffffffffffff8082111561325857600080fd5b818701915087601f83011261326c57600080fd5b81358181111561327e5761327e6131f1565b604051601f8201601f19908116603f011681019083821181831017156132a6576132a66131f1565b816040528281528a60208487010111156132bf57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600181811c908216806132f757607f821691505b6020821081141561331857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561335d5761335d613334565b500190565b60008282101561337457613374613334565b500390565b634e487b7160e01b600052601260045260246000fd5b60008261339e5761339e613379565b500490565b60008160001904831182151516156133bd576133bd613334565b500290565b6000602082840312156133d457600080fd5b5051919050565b6000602082840312156133ed57600080fd5b8151612ffd816131ac565b600060001982141561340c5761340c613334565b5060010190565b6000825161342581846020870161303b565b9190910192915050565b6000875160206134428285838d0161303b565b8851918401916134558184848d0161303b565b88519201916134678184848c0161303b565b87519201916134798184848b0161303b565b865192019161348b8184848a0161303b565b855192019161349d818484890161303b565b919091019998505050505050505050565b6000885160206134c18285838e0161303b565b8951918401916134d48184848e0161303b565b89519201916134e68184848d0161303b565b88519201916134f88184848c0161303b565b875192019161350a8184848b0161303b565b865192019161351c8184848a0161303b565b855192019161352e818484890161303b565b919091019a9950505050505050505050565b6000835161355281846020880161303b565b83519083019061356681836020880161303b565b01949350505050565b7f7b226e616d65223a2022000000000000000000000000000000000000000000008152600083516135a781600a85016020880161303b565b7f222c20226465736372697074696f6e223a2022436f6c6c61626f726174697665600a918401918201527f2c2045766f6c7661626c6520262053656c662d46696e616e63696e67204e4654602a8201527f2c20506f776572656420627920546f70426964646572222c2022696d61676522604a8201527f3a2022646174613a696d6167652f7376672b786d6c3b6261736536342c000000606a820152835161365681608784016020880161303b565b61227d60f01b60879290910191820152608901949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516136a981601d85016020870161303b565b91909101601d0192915050565b6000826136c5576136c5613379565b500690565b60006001600160a01b038087168352808616602084015250836040830152608060608301526136fc6080830184613067565b9695505050505050565b60006020828403121561371857600080fd5b8151612ffd81612fca565b600060ff821660ff84168060ff0382111561374057613740613334565b019392505050565b634e487b7160e01b600052603160045260246000fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c7376672077696474683d2232343022206865696768743d223234302220786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667222076657273696f6e3d22312e31223ea2646970667358221220f89ff00597420a9a4d226938c5a83d3b830ce1445945d3349a675cc28a8ecccc64736f6c634300080a00334552433732313a207472616e7366657220746f206e6f6e20455243373231526500000000000000000000000000000000000045166c45af0fc6e4cf31d9e14b9a00000000000000000000000090bcd0e174b0df8dd56631b64211aff72f453275

Deployed Bytecode

0x6080604052600436106101e35760003560e01c8063715018a611610102578063a526c7f811610095578063c87b56dd11610064578063c87b56dd14610573578063dfafd4fd14610593578063e985e9c5146105b3578063f2fde38b146105fc57600080fd5b8063a526c7f8146104f3578063b047fb5014610513578063b88d4fde14610533578063baf539ee1461055357600080fd5b806395d89b41116100d157806395d89b411461047e57806399f2c13914610493578063a0e86fd0146104b3578063a22cb465146104d357600080fd5b8063715018a61461040b5780637b711a281461042057806384efd675146104405780638da5cb5b1461046057600080fd5b80632f745c591161017a5780635e1945ce116101495780635e1945ce1461038b5780636352211e146103ab5780636604a6a3146103cb57806370a08231146103eb57600080fd5b80632f745c591461031857806342842e0e146103385780634f6ccce71461035857806359d667a51461037857600080fd5b8063095ea7b3116101b6578063095ea7b31461029957806318160ddd146102b957806323b872dd146102d85780632ba73c15146102f857600080fd5b806301ffc9a7146101e857806304824e701461021d57806306fdde031461023f578063081812fc14610261575b600080fd5b3480156101f457600080fd5b50610208610203366004612fe0565b61061c565b60405190151581526020015b60405180910390f35b34801561022957600080fd5b5061023d610238366004613020565b610647565b005b34801561024b57600080fd5b506102546106ce565b6040516102149190613093565b34801561026d57600080fd5b5061028161027c3660046130a6565b610760565b6040516001600160a01b039091168152602001610214565b3480156102a557600080fd5b5061023d6102b43660046130bf565b6107f5565b3480156102c557600080fd5b506008545b604051908152602001610214565b3480156102e457600080fd5b5061023d6102f33660046130e9565b61090b565b34801561030457600080fd5b5061023d610313366004613020565b610992565b34801561032457600080fd5b506102ca6103333660046130bf565b6109fd565b34801561034457600080fd5b5061023d6103533660046130e9565b610aa5565b34801561036457600080fd5b506102ca6103733660046130a6565b610ac0565b61023d6103863660046130bf565b610b64565b34801561039757600080fd5b5061023d6103a63660046130a6565b611208565b3480156103b757600080fd5b506102816103c63660046130a6565b611256565b3480156103d757600080fd5b50600e54610281906001600160a01b031681565b3480156103f757600080fd5b506102ca610406366004613020565b6112e1565b34801561041757600080fd5b5061023d61137b565b34801561042c57600080fd5b5061023d61043b366004613125565b6113e1565b34801561044c57600080fd5b50600f54610281906001600160a01b031681565b34801561046c57600080fd5b50600b546001600160a01b0316610281565b34801561048a57600080fd5b50610254611668565b34801561049f57600080fd5b5061023d6104ae366004613157565b611677565b3480156104bf57600080fd5b5061023d6104ce366004613179565b6116cb565b3480156104df57600080fd5b5061023d6104ee3660046131ba565b611742565b3480156104ff57600080fd5b5061023d61050e366004613020565b61174d565b34801561051f57600080fd5b50600d54610281906001600160a01b031681565b34801561053f57600080fd5b5061023d61054e366004613207565b61187b565b34801561055f57600080fd5b5061023d61056e3660046130a6565b611909565b34801561057f57600080fd5b5061025461058e3660046130a6565b611957565b34801561059f57600080fd5b50600c54610281906001600160a01b031681565b3480156105bf57600080fd5b506102086105ce366004613179565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561060857600080fd5b5061023d610617366004613020565b611e2a565b60006001600160e01b0319821663780e9d6360e01b1480610641575061064182611f12565b92915050565b600d546001600160a01b031633146106955760405162461bcd60e51b815260206004820152600c60248201526b4552525f4d5553545f434f4f60a01b60448201526064015b60405180910390fd5b6040516001600160a01b038216904780156108fc02916000818181858888f193505050501580156106ca573d6000803e3d6000fd5b5050565b6060600080546106dd906132e3565b80601f0160208091040260200160405190810160405280929190818152602001828054610709906132e3565b80156107565780601f1061072b57610100808354040283529160200191610756565b820191906000526020600020905b81548152906001019060200180831161073957829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166107d95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161068c565b506000908152600460205260409020546001600160a01b031690565b600061080082611256565b9050806001600160a01b0316836001600160a01b0316141561086e5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161068c565b336001600160a01b038216148061088a575061088a81336105ce565b6108fc5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161068c565b6109068383611f62565b505050565b6109153382611fd0565b6109875760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606482015260840161068c565b6109068383836120c7565b600d546001600160a01b031633146109db5760405162461bcd60e51b815260206004820152600c60248201526b4552525f4d5553545f434f4f60a01b604482015260640161068c565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6000610a08836112e1565b8210610a7c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e6473000000000000000000000000000000000000000000606482015260840161068c565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6109068383836040518060200160405280600081525061187b565b6000610acb60085490565b8210610b3f5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e64730000000000000000000000000000000000000000606482015260840161068c565b60088281548110610b5257610b5261331e565b90600052602060002001549050919050565b6002600a541415610bb75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161068c565b6002600a55610bdd816000908152600260205260409020546001600160a01b0316151590565b610c295760405162461bcd60e51b815260206004820152600f60248201527f6172746964206e6f742065786973740000000000000000000000000000000000604482015260640161068c565b60008111610c795760405162461bcd60e51b815260206004820152601160248201527f61727420302063616e206e6f7420626964000000000000000000000000000000604482015260640161068c565b6000610c8482611256565b90506001600160a01b038116331415610cdf5760405162461bcd60e51b815260206004820152601c60248201527f4552525f43414e5f4e4f545f50555243484153455f4f574e5f41525400000000604482015260640161068c565b600082815260176020526040812054908115610d0157610cfe82612286565b90505b6000610d16610d1184600161334a565b612286565b905080341015610d685760405162461bcd60e51b815260206004820152601460248201527f4552525f4e4f545f454e4f5547485f4d4f4e4559000000000000000000000000604482015260640161068c565b33610d738234613362565b6013546040519091906000818181858888f193505050503d8060008114610db6576040519150601f19603f3d011682016040523d82523d6000602084013e610dbb565b606091505b50505060008282610dcc9190613362565b6000878152601860205260409020549091506001600160a01b0316610df260028361338f565b6013546040519091906000818181858888f193505050503d8060008114610e35576040519150601f19603f3d011682016040523d82523d6000602084013e610e3a565b606091505b5050506000610e4887612356565b905080610eb657600f546001600160a01b0316610e66600a8461338f565b6013546040519091906000818181858888f193505050503d8060008114610ea9576040519150601f19603f3d011682016040523d82523d6000602084013e610eae565b606091505b505050610f1f565b610ebf81611256565b6001600160a01b0316610ed3600a8461338f565b6013546040519091906000818181858888f193505050503d8060008114610f16576040519150601f19603f3d011682016040523d82523d6000602084013e610f1b565b606091505b5050505b600e546012546001600160a01b0390911690606490610f3e90856133a3565b610f48919061338f565b6013546040519091906000818181858888f193505050503d8060008114610f8b576040519150601f19603f3d011682016040523d82523d6000602084013e610f90565b606091505b505050876001600160a01b0316606460115484610fad91906133a3565b610fb7919061338f565b6013546040519091906000818181858888f193505050503d8060008114610ffa576040519150601f19603f3d011682016040523d82523d6000602084013e610fff565b606091505b5050506001600160a01b03861684600a61101a8560036133a3565b611024919061338f565b61102e919061334a565b6013546040519091906000818181858888f193505050503d8060008114611071576040519150601f19603f3d011682016040523d82523d6000602084013e611076565b606091505b5050601054600c546040516370a0823160e01b81523060048201529192506001600160a01b0316906370a0823190602401602060405180830381865afa1580156110c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e891906133c2565b1061116857600c5460105460405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015611142573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116691906133db565b505b6000878152601760205260408120805491611182836133f8565b91905055506111928633896120c7565b601054604080518981526020810187905280820186905260608101929092526001600160a01b0388811660808401523360a08401528a1660c0830152517f803794f7586395d3d424b3aefaf42f307222945689f6fa0dad48e43f4d756e4a9181900360e00190a150506001600a55505050505050565b600d546001600160a01b031633146112515760405162461bcd60e51b815260206004820152600c60248201526b4552525f4d5553545f434f4f60a01b604482015260640161068c565b601055565b6000818152600260205260408120546001600160a01b0316806106415760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e0000000000000000000000000000000000000000000000606482015260840161068c565b60006001600160a01b03821661135f5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f206164647265737300000000000000000000000000000000000000000000606482015260840161068c565b506001600160a01b031660009081526003602052604090205490565b600b546001600160a01b031633146113d55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161068c565b6113df60006123b2565b565b82158015906113ef57508115155b61143b5760405162461bcd60e51b815260206004820152601460248201527f726563742063616e206e6f74206265207a65726f000000000000000000000000604482015260640161068c565b6000848152600260205260409020546001600160a01b031661149f5760405162461bcd60e51b815260206004820152601260248201527f706172656e74206e6f7420657869737465640000000000000000000000000000604482015260640161068c565b6000805b602081106114f35760405162461bcd60e51b815260206004820152601460248201527f706172656e74206d757374203c20333262797465000000000000000000000000604482015260640161068c565b60006114ff8783612404565b9050806115c45760008781526014602052604090205460ff811061158b5760405162461bcd60e51b815260206004820152602660248201527f63616e206e6f742073657420706172656e7420666f7220616c7265616479206d60448201527f6178203235350000000000000000000000000000000000000000000000000000606482015260840161068c565b6115a0888461159b84600161334a565b612420565b93506115ad81600161334a565b600089815260146020526040902055506115d79050565b50806115cf816133f8565b9150506114a3565b506000818152601560209081526040808320879055601690915290208390556116003382612473565b60008181526018602090815260409182902080546001600160a01b031916339081179091558251848152918201529081018390527ff86fb62a4d8f2f034122ffb9ea040ef4c00f9474edb7bcfc2bac70ce976a188b9060600160405180910390a15050505050565b6060600180546106dd906132e3565b600d546001600160a01b031633146116c05760405162461bcd60e51b815260206004820152600c60248201526b4552525f4d5553545f434f4f60a01b604482015260640161068c565b601191909155601255565b600d546001600160a01b031633146117145760405162461bcd60e51b815260206004820152600c60248201526b4552525f4d5553545f434f4f60a01b604482015260640161068c565b600e80546001600160a01b039384166001600160a01b031991821617909155600f8054929093169116179055565b6106ca33838361248d565b600d546001600160a01b031633146117965760405162461bcd60e51b815260206004820152600c60248201526b4552525f4d5553545f434f4f60a01b604482015260640161068c565b600c546040516370a0823160e01b81523060048201526001600160a01b039091169063a9059cbb90839083906370a0823190602401602060405180830381865afa1580156117e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061180c91906133c2565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611857573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ca91906133db565b6118853383611fd0565b6118f75760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606482015260840161068c565b6119038484848461255c565b50505050565b600d546001600160a01b031633146119525760405162461bcd60e51b815260206004820152600c60248201526b4552525f4d5553545f434f4f60a01b604482015260640161068c565b601355565b606060006040518060800160405280604f815260200161379f604f91396040516020016119849190613413565b604051602081830303815290604052905060008060006119cc6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b60015b6119d988826125da565b935060005b6002811015611c61578015611a0157600085815260166020526040902054611a11565b6000858152601560205260409020545b9550600093505b6004841015611c4f5760ff8087168452600887901c8116602080860191909152601088901c821660408601819052601889901c90921660608601529690961c95158015611a6757506060830151155b15611a7157611c3d565b62ffffff8616608084015260408051808201909152600981527f3c7265637420783d2200000000000000000000000000000000000000000000006020820152835160189790971c96889190611ac590612626565b6040518060400160405280600581526020017f2220793d22000000000000000000000000000000000000000000000000000000815250611b088760200151612626565b6040518060400160405280600981526020017f222077696474683d220000000000000000000000000000000000000000000000815250604051602001611b539695949392919061342f565b604051602081830303815290604052965086611b728460400151612626565b6040518060400160405280600a81526020017f22206865696768743d2200000000000000000000000000000000000000000000815250611bb58660600151612626565b6040518060400160405280600f81526020017f22207374796c653d2266696c6c3a230000000000000000000000000000000000815250611bf88860800151612724565b604051806040016040528060048152602001631110179f60e11b815250604051602001611c2b97969594939291906134ae565b60405160208183030381529060405296505b83611c47816133f8565b945050611a18565b80611c59816133f8565b9150506119de565b5087841415611c6f57611c81565b80611c79816133f8565b9150506119cf565b5060408051600880825281830190925260009160208201818036833701905050905060005b6004811015611d1057600089815260156020526040902054611cd290611ccd83601c61334a565b612404565b60f81b828281518110611ce757611ce761331e565b60200101906001600160f81b031916908160001a90535080611d08816133f8565b915050611ca6565b5060005b6004811015611d8357600089815260166020526040902054611d3b90611ccd83601c61334a565b60f81b82611d4a83600461334a565b81518110611d5a57611d5a61331e565b60200101906001600160f81b031916908160001a90535080611d7b816133f8565b915050611d14565b506000611dfa82611de9896040518060400160405280600681526020017f3c2f7376673e0000000000000000000000000000000000000000000000000000815250604051602001611dd5929190613540565b6040516020818303038152906040526128df565b604051602001611dd592919061356f565b905080604051602001611e0d9190613671565b60408051601f198184030181529190529998505050505050505050565b600b546001600160a01b03163314611e845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161068c565b6001600160a01b038116611f005760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161068c565b611f09816123b2565b50565b3b151590565b60006001600160e01b031982166380ac58cd60e01b1480611f4357506001600160e01b03198216635b5e139f60e01b145b8061064157506301ffc9a760e01b6001600160e01b0319831614610641565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611f9782611256565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166120495760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161068c565b600061205483611256565b9050806001600160a01b0316846001600160a01b0316148061208f5750836001600160a01b031661208484610760565b6001600160a01b0316145b806120bf57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166120da82611256565b6001600160a01b0316146121565760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e0000000000000000000000000000000000000000000000606482015260840161068c565b6001600160a01b0382166121b85760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161068c565b6121c3838383612a45565b6121ce600082611f62565b6001600160a01b03831660009081526003602052604081208054600192906121f7908490613362565b90915550506001600160a01b038216600090815260036020526040812080546001929061222590849061334a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6019546000908211156123395760198054600091906122a790600190613362565b815481106122b7576122b761331e565b6000918252602090912001546019549091505b8381101561233257600a6122df83600b6133a3565b6122e9919061338f565b601980546001810182556000919091527f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c96950181905591508061232a816133f8565b9150506122ca565b5092915050565b6019612346600184613362565b81548110610b5257610b5261331e565b600060ff815b60208110156123a5576123708160086133a3565b60ff901b841661237f576123a5565b61238a8160086133a3565b60ff901b82179150808061239d906133f8565b91505061235c565b5060081c91909116919050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000806124128360086133a3565b9390931c60ff169392505050565b600060ff19831561245557612436846020613362565b6124419060086133a3565b81901c61244f8560086133a3565b9190911b175b938416936124648460086133a3565b9290921b939093179392505050565b6106ca828260405180602001604052806000815250612afd565b816001600160a01b0316836001600160a01b031614156124ef5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161068c565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6125678484846120c7565b61257384848484612b7b565b6119035760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840161068c565b6000816125e957506000610641565b60ff60005b8381101561261c576126018160086133a3565b60ff901b821791508080612614906133f8565b9150506125ee565b5090921692915050565b60608161264a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612674578061265e816133f8565b915061266d9050600a8361338f565b915061264e565b60008167ffffffffffffffff81111561268f5761268f6131f1565b6040519080825280601f01601f1916602001820160405280156126b9576020820181803683370190505b5090505b84156120bf576126ce600183613362565b91506126db600a866136b6565b6126e690603061334a565b60f81b8183815181106126fb576126fb61331e565b60200101906001600160f81b031916908160001a90535061271d600a8661338f565b94506126bd565b60408051600680825281830190925260609160009190602082018180368337019050509050600f612756848216612cc4565b60f81b8260058151811061276c5761276c61331e565b60200101906001600160f81b031916908160001a905350600484901c935061279a8162ffffff168516612cc4565b60f81b826004815181106127b0576127b061331e565b60200101906001600160f81b031916908160001a905350600484901c93506127de8162ffffff168516612cc4565b60f81b826003815181106127f4576127f461331e565b60200101906001600160f81b031916908160001a905350600484901c93506128228162ffffff168516612cc4565b60f81b826002815181106128385761283861331e565b60200101906001600160f81b031916908160001a905350600484901c93506128668162ffffff168516612cc4565b60f81b8260018151811061287c5761287c61331e565b60200101906001600160f81b031916908160001a905350600484901c93506128aa8162ffffff168516612cc4565b60f81b826000815181106128c0576128c061331e565b60200101906001600160f81b031916908160001a905350909392505050565b8051606090806128ff575050604080516020810190915260008152919050565b6000600361290e83600261334a565b612918919061338f565b6129239060046133a3565b9050600061293282602061334a565b67ffffffffffffffff81111561294a5761294a6131f1565b6040519080825280601f01601f191660200182016040528015612974576020820181803683370190505b509050600060405180606001604052806040815260200161375f604091399050600181016020830160005b86811015612a00576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b83526004909201910161299f565b506003860660018114612a1a5760028114612a2b57612a37565b613d3d60f01b600119830152612a37565b603d60f81b6000198301525b505050918152949350505050565b6001600160a01b038316612aa057612a9b81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612ac3565b816001600160a01b0316836001600160a01b031614612ac357612ac38382612cec565b6001600160a01b038216612ada5761090681612d89565b826001600160a01b0316826001600160a01b031614610906576109068282612e38565b612b078383612e7c565b612b146000848484612b7b565b6109065760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840161068c565b60006001600160a01b0384163b15612cb957604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612bbf9033908990889088906004016136ca565b6020604051808303816000875af1925050508015612bfa575060408051601f3d908101601f19168201909252612bf791810190613706565b60015b612c9f573d808015612c28576040519150601f19603f3d011682016040523d82523d6000602084013e612c2d565b606091505b508051612c975760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840161068c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506120bf565b506001949350505050565b600060098260ff1611612ce157612cdc826030613723565b610641565b610641826057613723565b60006001612cf9846112e1565b612d039190613362565b600083815260076020526040902054909150808214612d56576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612d9b90600190613362565b60008381526009602052604081205460088054939450909284908110612dc357612dc361331e565b906000526020600020015490508060088381548110612de457612de461331e565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612e1c57612e1c613748565b6001900381819060005260206000200160009055905550505050565b6000612e43836112e1565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216612ed25760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161068c565b6000818152600260205260409020546001600160a01b031615612f375760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161068c565b612f4360008383612a45565b6001600160a01b0382166000908152600360205260408120805460019290612f6c90849061334a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b031981168114611f0957600080fd5b600060208284031215612ff257600080fd5b8135612ffd81612fca565b9392505050565b80356001600160a01b038116811461301b57600080fd5b919050565b60006020828403121561303257600080fd5b612ffd82613004565b60005b8381101561305657818101518382015260200161303e565b838111156119035750506000910152565b6000815180845261307f81602086016020860161303b565b601f01601f19169290920160200192915050565b602081526000612ffd6020830184613067565b6000602082840312156130b857600080fd5b5035919050565b600080604083850312156130d257600080fd5b6130db83613004565b946020939093013593505050565b6000806000606084860312156130fe57600080fd5b61310784613004565b925061311560208501613004565b9150604084013590509250925092565b6000806000806080858703121561313b57600080fd5b5050823594602084013594506040840135936060013592509050565b6000806040838503121561316a57600080fd5b50508035926020909101359150565b6000806040838503121561318c57600080fd5b61319583613004565b91506131a360208401613004565b90509250929050565b8015158114611f0957600080fd5b600080604083850312156131cd57600080fd5b6131d683613004565b915060208301356131e6816131ac565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561321d57600080fd5b61322685613004565b935061323460208601613004565b925060408501359150606085013567ffffffffffffffff8082111561325857600080fd5b818701915087601f83011261326c57600080fd5b81358181111561327e5761327e6131f1565b604051601f8201601f19908116603f011681019083821181831017156132a6576132a66131f1565b816040528281528a60208487010111156132bf57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600181811c908216806132f757607f821691505b6020821081141561331857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561335d5761335d613334565b500190565b60008282101561337457613374613334565b500390565b634e487b7160e01b600052601260045260246000fd5b60008261339e5761339e613379565b500490565b60008160001904831182151516156133bd576133bd613334565b500290565b6000602082840312156133d457600080fd5b5051919050565b6000602082840312156133ed57600080fd5b8151612ffd816131ac565b600060001982141561340c5761340c613334565b5060010190565b6000825161342581846020870161303b565b9190910192915050565b6000875160206134428285838d0161303b565b8851918401916134558184848d0161303b565b88519201916134678184848c0161303b565b87519201916134798184848b0161303b565b865192019161348b8184848a0161303b565b855192019161349d818484890161303b565b919091019998505050505050505050565b6000885160206134c18285838e0161303b565b8951918401916134d48184848e0161303b565b89519201916134e68184848d0161303b565b88519201916134f88184848c0161303b565b875192019161350a8184848b0161303b565b865192019161351c8184848a0161303b565b855192019161352e818484890161303b565b919091019a9950505050505050505050565b6000835161355281846020880161303b565b83519083019061356681836020880161303b565b01949350505050565b7f7b226e616d65223a2022000000000000000000000000000000000000000000008152600083516135a781600a85016020880161303b565b7f222c20226465736372697074696f6e223a2022436f6c6c61626f726174697665600a918401918201527f2c2045766f6c7661626c6520262053656c662d46696e616e63696e67204e4654602a8201527f2c20506f776572656420627920546f70426964646572222c2022696d61676522604a8201527f3a2022646174613a696d6167652f7376672b786d6c3b6261736536342c000000606a820152835161365681608784016020880161303b565b61227d60f01b60879290910191820152608901949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516136a981601d85016020870161303b565b91909101601d0192915050565b6000826136c5576136c5613379565b500690565b60006001600160a01b038087168352808616602084015250836040830152608060608301526136fc6080830184613067565b9695505050505050565b60006020828403121561371857600080fd5b8151612ffd81612fca565b600060ff821660ff84168060ff0382111561374057613740613334565b019392505050565b634e487b7160e01b600052603160045260246000fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c7376672077696474683d2232343022206865696768743d223234302220786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667222076657273696f6e3d22312e31223ea2646970667358221220f89ff00597420a9a4d226938c5a83d3b830ce1445945d3349a675cc28a8ecccc64736f6c634300080a0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000000000000000045166c45af0fc6e4cf31d9e14b9a00000000000000000000000090bcd0e174b0df8dd56631b64211aff72f453275

-----Decoded View---------------
Arg [0] : _bid (address): 0x00000000000045166C45aF0FC6E4Cf31D9E14B9A
Arg [1] : _coo (address): 0x90bcd0E174b0DF8dd56631B64211Aff72F453275

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000045166c45af0fc6e4cf31d9e14b9a
Arg [1] : 00000000000000000000000090bcd0e174b0df8dd56631b64211aff72f453275


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.