ETH Price: $3,931.79 (+5.59%)

Token

FewoWorld Paint (Paint)
 

Overview

Max Total Supply

0 Paint

Holders

2,792

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
1 Paint
0x26dbcf7bb0e7826e087c691228b5f337143fbe16
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Welcome to FewoWorld, a universe created by FEWOCiOUS and the Web3 community. FewoWorld is the first generative art project from the mind of FEWOCiOUS. Unlike anything he has created before.

# Exchange Pair Price  24H Volume % Volume
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
FewoWorldPaint

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 1500 runs

Other Settings:
default evmVersion
File 1 of 31 : FewoWorldPaint.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;


//                           @@##(//*/@                                          
//                                @@##(/*****@                                     
//                                 @@%%#//*******(                                 
//                                  @@%%(/******,**@                               
//                                  @@@%(//******,***.                             
//                                 @@@%#(//********,**@                            
//                              @@@@%%#(///*********,**@                           
//                           @@@@%##((///***********,,**@                          
//                         @@@%##(((///**************,,**@                         
//                        @@&%#(((///****************,,**@                         
//                       @@@%#(((//************/////*,,,**&                        
//                       @@%#(((///****/////////////,,,,/@&                        
//                       @@%#(((////////////////////,,,,/@                         
//                        @%##(((///////////////////////%@                         
//                        @@%##((((////////////////,,((@@                          
//                         @@@###(((((((////////(((((#@                            
//                           @@@%###(((((((((((((###@*                             
//                              %@@#############@@/                                
//                                    #@@@@@          
// 
// 
//                                 ´´´´¶¶¶¶¶¶´´´´´´¶¶¶¶¶¶
//                                 ´´¶¶¶¶¶¶¶¶¶¶´´¶¶¶¶¶¶¶¶¶¶
//                                 ´¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶´´´´¶¶¶¶
//                                 ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶´´´´¶¶¶¶
//                                 ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶´´¶¶¶¶¶
//                                 ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶ ´¶¶¶¶¶´
//                                 ´´¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
//                                 ´´´´´¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
//                                 ´´´´´´´¶¶¶¶¶¶¶¶¶¶¶¶¶
//                                 ´´´´´´´´¶¶¶¶¶¶¶¶
//                                 ´´´´´´´´´´´¶¶¶¶
// 
//                                                                   %#########%   
//                        %#####%(        #%%##%%#(              *%##############% 
//           .%%%####%%%########%####  (###############%%#.  .%######.        %###%
//       %%########%#%%###%(. .(   %####,  /,  *%######%%########%.    /####/ .%###
//    ##########%   ,((*,*(#(((#   *%##,  #((((/ (###*     #####%.   ,(((((#  ####(
//  *######.      #((((#,        .%#####   #((((# *%.  .#((( *###    #((((,  %###  
//  %###%    #(((((((((   */(#%%%%%%%, /%    (((#, %    #(((# ###    ((((, *#%,    
// *####%    #(((((((((#/  /%%  (####(#   %.  .(# /##   .#((# (%     ,((#, *##     
//  %####%*       *(((((((   #(/(##(((#   #/   #* %(    ,#((#        #((*  ###*    
//   %########%   .#(((((((#             %,   /(#      #(((((#   .##((#  .%###     
//     %#####%    (((#.       .%%%#(/(%#%      (##     #(##(((((((((#.  %#%.       
//       %###/        #*   .#%##########%,        #((((#    #((((((#  /##%         
//        *####%%%,    #((( .%####    *%####%     /((((       (((((,  %#%.         
//         /######(    #(((#  %##       ####/     *#(#   %%.   .#(((  (##,         
//          %####%     /((((  .#%       %##%      .#(,  .%##.  .#((#  /###         
//           %####            ###(     %###%            (###/    ##   %###         
//           #####(         /%###*    %#####%         (######*      /####%         
//            %######%%%########      %#########%%#####%     %##%%%######/         
//             %##############/        %#############%         %#######%/          
//              ,%########%/             #%######%%.                         
// 
//       
// 
// 
//  ____    ____  ____  ____   ______          _____   ___  __    __   ___   __    __   ___   ____   _      ___   
// |    \  /    ||    ||    \ |      |        |     | /  _]|  |__|  | /   \ |  |__|  | /   \ |    \ | |    |   \  
// |  o  )|  o  | |  | |  _  ||      |        |   __|/  [_ |  |  |  ||     ||  |  |  ||     ||  D  )| |    |    \ 
// |   _/ |     | |  | |  |  ||_|  |_|        |  |_ |    _]|  |  |  ||  O  ||  |  |  ||  O  ||    / | |___ |  D  |
// |  |   |  _  | |  | |  |  |  |  |          |   _]|   [_ |  `  '  ||     ||  `  '  ||     ||    \ |     ||     |
// |  |   |  |  | |  | |  |  |  |  |          |  |  |     | \      / |     | \      / |     ||  .  \|     ||     |
// |__|   |__|__||____||__|__|  |__|     <3   |__|  |_____|  \_/\_/   \___/   \_/\_/   \___/ |__|\_||_____||_____|
                                                                                                               

                                                                                                                              
import "@niftygateway/nifty-contracts/contracts/interfaces/IERC2309.sol";
import "@niftygateway/nifty-contracts/contracts/tokens/ERC721Omnibus.sol";
import "@niftygateway/nifty-contracts/contracts/utils/Royalties.sol";
import "@niftygateway/nifty-contracts/contracts/utils/Signable.sol";
import "@niftygateway/nifty-contracts/contracts/utils/Withdrawable.sol";

contract FewoWorldPaint is ERC721Omnibus, Royalties, Signable, Withdrawable, IERC2309 {    
    
    uint256 constant private BITS_PER_VALUE = 16;
    uint256 constant private MAX_UINT_16 = 0xffff;

    uint256 _nextIndex = 0;
    uint256[] public packedPaintValues;

    constructor(address niftyRegistryContract, address defaultOwner) {
        initializeERC721("FewoWorld Paint", "Paint", "https://api.niftygateway.com/paint/");
        initializeNiftyEntity(niftyRegistryContract);
        initializeDefaultOwner(defaultOwner);        
    }       

    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Omnibus, Royalties, NiftyPermissions) returns (bool) {
        return          
        interfaceId == type(IERC2309).interfaceId ||
        super.supportsInterface(interfaceId);
    }

    function exists(uint256 tokenId) public view returns (bool) {
        return _exists(tokenId);
    }    

    function getPaintValue(uint256 tokenId) public view returns (uint16) {        
        if(!exists(tokenId)) {
            return 0;
        } else {
            uint256 bin = 0;
            uint256 index = 0;
            uint256 packedWord = 0;

            unchecked {
                bin = (tokenId - 1) / BITS_PER_VALUE;
                index = (tokenId - 1) % BITS_PER_VALUE;
                packedWord = packedPaintValues[bin];
            }
        
            return uint16(MAX_UINT_16 & (packedWord >> (BITS_PER_VALUE * index)));
        }        
    }

    function finalizeContract() external {
        _requireOnlyValidSender();
        collectionStatus.isContractFinalized = true;
    }

    function setBaseURI(string calldata uri) external {
        _requireOnlyValidSender();
        _setBaseURI(uri);        
    }    

    function burn(uint256 tokenId) public {
        _burn(tokenId);
    }              

    function mint(uint256[] calldata paintValues) external {
        _requireOnlyValidSender();

        uint256 numValues = paintValues.length;
        require(numValues > 0, ERROR_INPUT_ARRAY_EMPTY);        

        address to = collectionStatus.defaultOwner;                
        require(to != address(0), ERROR_TRANSFER_TO_ZERO_ADDRESS);                
        require(!collectionStatus.isContractFinalized, ERROR_CONTRACT_IS_FINALIZED);                        

        uint256 index = _nextIndex;
        uint256 valueIx = 0;
        uint256 firstNewTokenId = index + 1;

        uint256 packedWord = 0;
        if(index % BITS_PER_VALUE != 0) {
           packedWord = packedPaintValues[packedPaintValues.length - 1];
           packedPaintValues.pop();
        }

        while(valueIx < numValues) {
           uint256 value = paintValues[valueIx];
           require(value > 0 && value <= MAX_UINT_16, "Requires paint of 1 to 65535");

           uint256 mod16 = index % BITS_PER_VALUE;
           if(mod16 == 0 && packedWord > 0) {
               packedPaintValues.push(packedWord);
               packedWord = 0;
           }

           packedWord |= value << (mod16 * BITS_PER_VALUE);

           valueIx++;
           index++;
        }

        _nextIndex = index;      

        if(packedWord > 0) {
           packedPaintValues.push(packedWord);
        }

        balances[to] += numValues;
        collectionStatus.amountCreated += uint88(numValues);

        emit ConsecutiveTransfer(firstNewTokenId, firstNewTokenId + numValues - 1, address(0), to);
    }    

    function _isValidTokenId(uint256 tokenId) internal virtual view override returns (bool) {        
        return tokenId > 0 && tokenId <= collectionStatus.amountCreated;
    }   

    function _getNiftyType(uint256 /*tokenId*/) internal virtual view override returns (uint256) {        
        return 1;
    } 
    
}

File 2 of 31 : IERC2309.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

/**
 * @dev Interface of the ERC2309 standard as defined in the EIP.
 */
interface IERC2309 {
    
    /**
     * @dev Emitted when consecutive token ids in range ('fromTokenId') to ('toTokenId') are transferred from one account (`fromAddress`) to
     * another (`toAddress`).
     *
     * Note that `value` may be zero.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed fromAddress, address indexed toAddress);
}

File 3 of 31 : ERC721Omnibus.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "./ERC721.sol";
import "../interfaces/IERC721DefaultOwnerCloneable.sol";

abstract contract ERC721Omnibus is ERC721, IERC721DefaultOwnerCloneable {
    
    struct TokenOwner {
        bool transferred;
        address ownerAddress;
    }

    struct CollectionStatus {
        bool isContractFinalized; // 1 byte
        uint88 amountCreated; // 11 bytes
        address defaultOwner; // 20 bytes
    }    

    // Only allow Nifty Entity to be initialized once
    bool internal initializedDefaultOwner;
    CollectionStatus internal collectionStatus;

    // Mapping from token ID to owner address    
    mapping(uint256 => TokenOwner) internal ownersOptimized;    

    function initializeDefaultOwner(address defaultOwner_) public {
        require(!initializedDefaultOwner, ERROR_REINITIALIZATION_NOT_PERMITTED);
        collectionStatus.defaultOwner = defaultOwner_;
        initializedDefaultOwner = true;
    }       

    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, IERC165) returns (bool) {
        return         
        interfaceId == type(IERC721DefaultOwnerCloneable).interfaceId ||
        super.supportsInterface(interfaceId);
    }    

    function getCollectionStatus() public view virtual returns (CollectionStatus memory) {
        return collectionStatus;
    }
 
    function ownerOf(uint256 tokenId) public view virtual override returns (address owner) {
        require(_isValidTokenId(tokenId), ERROR_QUERY_FOR_NONEXISTENT_TOKEN);
        owner = ownersOptimized[tokenId].transferred ? ownersOptimized[tokenId].ownerAddress : collectionStatus.defaultOwner;
        require(owner != address(0), ERROR_QUERY_FOR_NONEXISTENT_TOKEN);
    }        
    
    function _exists(uint256 tokenId) internal view virtual override returns (bool) {
        if(_isValidTokenId(tokenId)) {            
            return ownersOptimized[tokenId].ownerAddress != address(0) || !ownersOptimized[tokenId].transferred;
        }
        return false;   
    }
    
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual override returns (address owner, bool isApprovedOrOwner) {
        owner = ownerOf(tokenId);
        isApprovedOrOwner = (spender == owner || tokenApprovals[tokenId] == spender || isApprovedForAll(owner, spender));
    }       

    function _clearOwnership(uint256 tokenId) internal virtual override {
        ownersOptimized[tokenId].transferred = true;
        ownersOptimized[tokenId].ownerAddress = address(0);
    }

    function _setOwnership(address to, uint256 tokenId) internal virtual override {
        ownersOptimized[tokenId].transferred = true;
        ownersOptimized[tokenId].ownerAddress = to;
    }               

    function _isValidTokenId(uint256 /*tokenId*/) internal virtual view returns (bool);    
}

File 4 of 31 : Royalties.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "./NiftyPermissions.sol";
import "../libraries/Clones.sol";
import "../interfaces/IERC20.sol";
import "../interfaces/IERC721.sol";
import "../interfaces/IERC2981.sol";
import "../interfaces/ICloneablePaymentSplitter.sol";
import "../structs/RoyaltyRecipient.sol";

abstract contract Royalties is NiftyPermissions, IERC2981 {

    event RoyaltyReceiverUpdated(uint256 indexed niftyType, address previousReceiver, address newReceiver);

    uint256 constant public BIPS_PERCENTAGE_TOTAL = 10000;

    // Royalty information mapped by nifty type
    mapping (uint256 => RoyaltyRecipient) internal royaltyRecipients;

    function supportsInterface(bytes4 interfaceId) public view virtual override(NiftyPermissions, IERC165) returns (bool) {
        return
            interfaceId == type(IERC2981).interfaceId ||            
            super.supportsInterface(interfaceId);
    }

    function getRoyaltySettings(uint256 niftyType) public view returns (RoyaltyRecipient memory) {
        return royaltyRecipients[niftyType];
    }
    
    function setRoyaltyBips(uint256 niftyType, uint256 bips) external {
        _requireOnlyValidSender();
        require(bips <= BIPS_PERCENTAGE_TOTAL, ERROR_BIPS_OVER_100_PERCENT);
        royaltyRecipients[niftyType].bips = uint16(bips);
    }
    
    function royaltyInfo(uint256 tokenId, uint256 salePrice) public virtual override view returns (address, uint256) {                        
        uint256 niftyType = _getNiftyType(tokenId); 
        return royaltyRecipients[niftyType].recipient == address(0) ? 
            (address(0), 0) :
            (royaltyRecipients[niftyType].recipient, (salePrice * royaltyRecipients[niftyType].bips) / BIPS_PERCENTAGE_TOTAL);
    }    

    function initializeRoyalties(uint256 niftyType, address splitterImplementation, address[] calldata payees, uint256[] calldata shares) external returns (address)  {
        _requireOnlyValidSender();        
        address previousReceiver = royaltyRecipients[niftyType].recipient;        
        royaltyRecipients[niftyType].isPaymentSplitter = payees.length > 1;
        royaltyRecipients[niftyType].recipient = payees.length == 1 ? payees[0] : _clonePaymentSplitter(splitterImplementation, payees, shares);        
        emit RoyaltyReceiverUpdated(niftyType, previousReceiver, royaltyRecipients[niftyType].recipient);                        
        return royaltyRecipients[niftyType].recipient;
    }      

    function getNiftyType(uint256 tokenId) public view returns (uint256) {
        return _getNiftyType(tokenId);
    }    

    function getPaymentSplitterByNiftyType(uint256 niftyType) public virtual view returns (address) {
        return _getPaymentSplitter(niftyType);
    }

    function getPaymentSplitterByTokenId(uint256 tokenId) public virtual view returns (address) {
        return _getPaymentSplitter(_getNiftyType(tokenId));
    }    

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

    function _clonePaymentSplitter(address splitterImplementation, address[] calldata payees, uint256[] calldata shares_) internal returns (address) {
        require(IERC165(splitterImplementation).supportsInterface(type(ICloneablePaymentSplitter).interfaceId), ERROR_UNCLONEABLE_REFERENCE_CONTRACT);
        address clone = payable (Clones.clone(splitterImplementation));
        ICloneablePaymentSplitter(clone).initialize(payees, shares_);            
        return clone;
    }

    function _getPaymentSplitter(uint256 niftyType) internal virtual view returns (address) {        
        return royaltyRecipients[niftyType].isPaymentSplitter ? royaltyRecipients[niftyType].recipient : address(0);        
    }
}

File 5 of 31 : Signable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "./NiftyPermissions.sol";
import "../libraries/ECDSA.sol";
import "../structs/SignatureStatus.sol";

abstract contract Signable is NiftyPermissions {        

    event ContractSigned(address signer, bytes32 data, bytes signature);

    SignatureStatus public signatureStatus;
    bytes public signature;

    string internal constant ERROR_CONTRACT_ALREADY_SIGNED = "Contract already signed";
    string internal constant ERROR_CONTRACT_NOT_SALTED = "Contract not salted";
    string internal constant ERROR_INCORRECT_SECRET_SALT = "Incorrect secret salt";
    string internal constant ERROR_SALTED_HASH_SET_TO_ZERO = "Salted hash set to zero";
    string internal constant ERROR_SIGNER_SET_TO_ZERO = "Signer set to zero address";

    function setSigner(address signer_, bytes32 saltedHash_) external {
        _requireOnlyValidSender();

        require(signer_ != address(0), ERROR_SIGNER_SET_TO_ZERO);
        require(saltedHash_ != bytes32(0), ERROR_SALTED_HASH_SET_TO_ZERO);
        require(!signatureStatus.isVerified, ERROR_CONTRACT_ALREADY_SIGNED);
        
        signatureStatus.signer = signer_;
        signatureStatus.saltedHash = saltedHash_;
        signatureStatus.isSalted = true;
    }

    function sign(uint256 salt, bytes calldata signature_) external {
        require(!signatureStatus.isVerified, ERROR_CONTRACT_ALREADY_SIGNED);        
        require(signatureStatus.isSalted, ERROR_CONTRACT_NOT_SALTED);
        
        address expectedSigner = signatureStatus.signer;
        bytes32 expectedSaltedHash = signatureStatus.saltedHash;

        require(_msgSender() == expectedSigner, ERROR_INVALID_MSG_SENDER);
        require(keccak256(abi.encodePacked(salt)) == expectedSaltedHash, ERROR_INCORRECT_SECRET_SALT);
        require(ECDSA.recover(ECDSA.toEthSignedMessageHash(expectedSaltedHash), signature_) == expectedSigner, ERROR_UNEXPECTED_DATA_SIGNER);
        
        signature = signature_;        
        signatureStatus.isVerified = true;

        emit ContractSigned(expectedSigner, expectedSaltedHash, signature_);
    }
}

File 6 of 31 : Withdrawable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "./RejectEther.sol";
import "./NiftyPermissions.sol";
import "../interfaces/IERC20.sol";
import "../interfaces/IERC721.sol";

abstract contract Withdrawable is RejectEther, NiftyPermissions {

    /**
     * @dev Slither identifies an issue with sending ETH to an arbitrary destianation.
     * https://github.com/crytic/slither/wiki/Detector-Documentation#functions-that-send-ether-to-arbitrary-destinations
     * Recommended mitigation is to "Ensure that an arbitrary user cannot withdraw unauthorized funds."
     * This mitigation has been performed, as only the contract admin can call 'withdrawETH' and they should
     * verify the recipient should receive the ETH first.
     */
    function withdrawETH(address payable recipient, uint256 amount) external {
        _requireOnlyValidSender();
        require(amount > 0, ERROR_ZERO_ETH_TRANSFER);
        require(recipient != address(0), "Transfer to zero address");

        uint256 currentBalance = address(this).balance;
        require(amount <= currentBalance, ERROR_INSUFFICIENT_BALANCE);

        //slither-disable-next-line arbitrary-send        
        (bool success,) = recipient.call{value: amount}("");
        require(success, ERROR_WITHDRAW_UNSUCCESSFUL);
    }
        
    function withdrawERC20(address tokenContract, address recipient, uint256 amount) external {
        _requireOnlyValidSender();
        bool success = IERC20(tokenContract).transfer(recipient, amount);
        require(success, ERROR_WITHDRAW_UNSUCCESSFUL);
    }
    
    function withdrawERC721(address tokenContract, address recipient, uint256 tokenId) external {
        _requireOnlyValidSender();
        IERC721(tokenContract).safeTransferFrom(address(this), recipient, tokenId, "");
    }    
}

File 7 of 31 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "./ERC721Errors.sol";
import "../interfaces/IERC721.sol";
import "../interfaces/IERC721Receiver.sol";
import "../interfaces/IERC721Metadata.sol";
import "../interfaces/IERC721Cloneable.sol";
import "../libraries/Address.sol";
import "../libraries/Context.sol";
import "../libraries/Strings.sol";
import "../utils/ERC165.sol";
import "../utils/GenericErrors.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}.
 */
abstract contract ERC721 is Context, ERC165, ERC721Errors, GenericErrors, IERC721Metadata, IERC721Cloneable {
    using Address for address;
    using Strings for uint256;

    // Only allow ERC721 to be initialized once
    bool internal initializedERC721;

    // Token name
    string internal tokenName;

    // Token symbol
    string internal tokenSymbol;

    // Base URI For Offchain Metadata
    string internal baseMetadataURI; 

    // Mapping from token ID to owner address
    mapping(uint256 => address) internal owners;

    // Mapping owner address to token count
    mapping(address => uint256) internal balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) internal tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) internal operatorApprovals;    

    function initializeERC721(string memory name_, string memory symbol_, string memory baseURI_) public override {
        require(!initializedERC721, ERROR_REINITIALIZATION_NOT_PERMITTED);
        tokenName = name_;
        tokenSymbol = symbol_;
        _setBaseURI(baseURI_);
        initializedERC721 = true;
    }

    /**
     * @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 ||
            interfaceId == type(IERC721Cloneable).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */    
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), ERROR_QUERY_FOR_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), ERROR_QUERY_FOR_NONEXISTENT_TOKEN);
        return owner;
    }

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */     
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), ERROR_QUERY_FOR_NONEXISTENT_TOKEN);

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

    function baseURI() public view virtual returns (string memory) {
        return baseMetadataURI;
    }

    /**
     * @dev Internal function to set the base URI
     */
    function _setBaseURI(string memory uri) internal {
        baseMetadataURI = uri;        
    }

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

        require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()), ERROR_NOT_OWNER_NOR_APPROVED);

        _approve(owner, to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */    
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), ERROR_QUERY_FOR_NONEXISTENT_TOKEN);
        return tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */    
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), ERROR_APPROVE_TO_CALLER);
        operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_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 {        
        (address owner, bool isApprovedOrOwner) = _isApprovedOrOwner(_msgSender(), tokenId);
        require(isApprovedOrOwner, ERROR_NOT_OWNER_NOR_APPROVED);
        _transfer(owner, 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 {
        transferFrom(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, data), ERROR_NOT_AN_ERC721_RECEIVER);
    }    

    /**
     * @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 (address owner, bool isApprovedOrOwner) {
        owner = owners[tokenId];
        require(owner != address(0), ERROR_QUERY_FOR_NONEXISTENT_TOKEN);
        isApprovedOrOwner = (spender == owner || tokenApprovals[tokenId] == spender || isApprovedForAll(owner, spender));
    }   
    
    /**
     * @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 = ownerOf(tokenId);
        bool isApprovedOrOwner = (_msgSender() == owner || tokenApprovals[tokenId] == _msgSender() || isApprovedForAll(owner, _msgSender()));
        require(isApprovedOrOwner, ERROR_NOT_OWNER_NOR_APPROVED);

        // Clear approvals        
        _clearApproval(owner, tokenId);

        balances[owner] -= 1;
        _clearOwnership(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 owner, address from, address to, uint256 tokenId) internal virtual {
        require(owner == from, ERROR_TRANSFER_FROM_INCORRECT_OWNER);
        require(to != address(0), ERROR_TRANSFER_TO_ZERO_ADDRESS);        

        // Clear approvals from the previous owner        
        _clearApproval(owner, tokenId);

        balances[from] -= 1;
        balances[to] += 1;
        _setOwnership(to, tokenId);
        
        emit Transfer(from, to, tokenId);        
    }

    /**
     * @dev Equivalent to approving address(0), but more gas efficient
     *
     * Emits a {Approval} event.
     */
    function _clearApproval(address owner, uint256 tokenId) internal virtual {
        delete tokenApprovals[tokenId];
        emit Approval(owner, address(0), tokenId);
    }

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

    function _clearOwnership(uint256 tokenId) internal virtual {
        delete owners[tokenId];
    }

    function _setOwnership(address to, uint256 tokenId) internal virtual {
        owners[tokenId] = to;
    }

    /**
     * @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
     *
     * @dev Slither identifies an issue with unused return value.
     * Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#unused-return
     * This should be a non-issue.  It is the standard OpenZeppelin implementation which has been heavily used and audited.
     */     
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal 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(ERROR_NOT_AN_ERC721_RECEIVER);
                } else {                    
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }    
}

File 8 of 31 : IERC721DefaultOwnerCloneable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "./IERC165.sol";

interface IERC721DefaultOwnerCloneable is IERC165 {
    function initializeDefaultOwner(address defaultOwner_) external;    
}

File 9 of 31 : ERC721Errors.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

abstract contract ERC721Errors {
    string internal constant ERROR_QUERY_FOR_ZERO_ADDRESS = "Query for zero address";
    string internal constant ERROR_QUERY_FOR_NONEXISTENT_TOKEN = "Token does not exist";
    string internal constant ERROR_APPROVAL_TO_CURRENT_OWNER = "Current owner approval";
    string internal constant ERROR_APPROVE_TO_CALLER = "Approve to caller";
    string internal constant ERROR_NOT_OWNER_NOR_APPROVED = "Not owner nor approved";
    string internal constant ERROR_NOT_AN_ERC721_RECEIVER = "Not an ERC721Receiver";
    string internal constant ERROR_TRANSFER_FROM_INCORRECT_OWNER = "Transfer from incorrect owner";
    string internal constant ERROR_TRANSFER_TO_ZERO_ADDRESS = "Transfer to zero address";    
    string internal constant ERROR_ALREADY_MINTED = "Token already minted";    
    string internal constant ERROR_NO_TOKENS_MINTED = "No tokens minted";    
}

File 10 of 31 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "./IERC165.sol";

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

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

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

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

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

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

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

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

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

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

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

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

File 11 of 31 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

/**
 * @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 12 of 31 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

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 13 of 31 : IERC721Cloneable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "./IERC721.sol";

interface IERC721Cloneable is IERC721 {
    function initializeERC721(string calldata name_, string calldata symbol_, string calldata baseURI_) external;    
}

File 14 of 31 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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 15 of 31 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

/**
 * @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 16 of 31 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

/**
 * @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 17 of 31 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "../interfaces/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 18 of 31 : GenericErrors.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

abstract contract GenericErrors {
    string internal constant ERROR_INPUT_ARRAY_EMPTY = "Input array empty";
    string internal constant ERROR_INPUT_ARRAY_SIZE_MISMATCH = "Input array size mismatch";
    string internal constant ERROR_INVALID_MSG_SENDER = "Invalid msg.sender";
    string internal constant ERROR_UNEXPECTED_DATA_SIGNER = "Unexpected data signer";
    string internal constant ERROR_INSUFFICIENT_BALANCE = "Insufficient balance";
    string internal constant ERROR_WITHDRAW_UNSUCCESSFUL = "Withdraw unsuccessful";
    string internal constant ERROR_CONTRACT_IS_FINALIZED = "Contract is finalized";
    string internal constant ERROR_CANNOT_CHANGE_DEFAULT_OWNER = "Cannot change default owner";
    string internal constant ERROR_UNCLONEABLE_REFERENCE_CONTRACT = "Uncloneable reference contract";
    string internal constant ERROR_BIPS_OVER_100_PERCENT = "Bips over 100%";
    string internal constant ERROR_NO_ROYALTY_RECEIVER = "No royalty receiver";
    string internal constant ERROR_REINITIALIZATION_NOT_PERMITTED = "Re-initialization not permitted";
    string internal constant ERROR_ZERO_ETH_TRANSFER = "Zero ETH Transfer";
}

File 19 of 31 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

/**
 * @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 20 of 31 : NiftyPermissions.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "./ERC165.sol";
import "./GenericErrors.sol";
import "../interfaces/INiftyEntityCloneable.sol";
import "../interfaces/INiftyRegistry.sol";
import "../libraries/Context.sol";

abstract contract NiftyPermissions is Context, ERC165, GenericErrors, INiftyEntityCloneable {    

    event AdminTransferred(address indexed previousAdmin, address indexed newAdmin);

    // Only allow Nifty Entity to be initialized once
    bool internal initializedNiftyEntity;

    // If address(0), use enable Nifty Gateway permissions - otherwise, specifies the address with permissions
    address public admin;

    // To prevent a mistake, transferring admin rights will be a two step process
    // First, the current admin nominates a new admin
    // Second, the nominee accepts admin
    address public nominatedAdmin;

    // Nifty Registry Contract
    INiftyRegistry internal permissionsRegistry;    

    function initializeNiftyEntity(address niftyRegistryContract_) public {
        require(!initializedNiftyEntity, ERROR_REINITIALIZATION_NOT_PERMITTED);
        permissionsRegistry = INiftyRegistry(niftyRegistryContract_);
        initializedNiftyEntity = true;
    }       
    
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return         
        interfaceId == type(INiftyEntityCloneable).interfaceId ||
        super.supportsInterface(interfaceId);
    }        

    function renounceAdmin() external {
        _requireOnlyValidSender();
        _transferAdmin(address(0));
    }    

    function nominateAdmin(address nominee) external {
        _requireOnlyValidSender();
        nominatedAdmin = nominee;
    }

    function acceptAdmin() external {
        address nominee = nominatedAdmin;
        require(_msgSender() == nominee, ERROR_INVALID_MSG_SENDER);
        _transferAdmin(nominee);
    }
    
    function _requireOnlyValidSender() internal view {       
        address currentAdmin = admin;     
        if(currentAdmin == address(0)) {
            require(permissionsRegistry.isValidNiftySender(_msgSender()), ERROR_INVALID_MSG_SENDER);
        } else {
            require(_msgSender() == currentAdmin, ERROR_INVALID_MSG_SENDER);
        }
    }        

    function _transferAdmin(address newAdmin) internal {
        address oldAdmin = admin;
        admin = newAdmin;
        delete nominatedAdmin;        
        emit AdminTransferred(oldAdmin, newAdmin);
    }
}

File 21 of 31 : Clones.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

/**
 * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for
 * deploying minimal proxy contracts, also known as "clones".
 *
 * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies
 * > a minimal bytecode implementation that delegates all calls to a known, fixed address.
 *
 * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`
 * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the
 * deterministic method.
 *
 */
library Clones {
    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create opcode, which should never revert.
     */
    function clone(address implementation) internal returns (address instance) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            instance := create(0, ptr, 0x37)
        }
        require(instance != address(0), "ERC1167: create failed");
    }

    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create2 opcode and a `salt` to deterministically deploy
     * the clone. Using the same `implementation` and `salt` multiple time will revert, since
     * the clones cannot be deployed twice at the same address.
     */
    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            instance := create2(0, ptr, 0x37, salt)
        }
        require(instance != address(0), "ERC1167: create2 failed");
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt,
        address deployer
    ) internal pure returns (address predicted) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)
            mstore(add(ptr, 0x38), shl(0x60, deployer))
            mstore(add(ptr, 0x4c), salt)
            mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))
            predicted := keccak256(add(ptr, 0x37), 0x55)
        }
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(address implementation, bytes32 salt)
        internal
        view
        returns (address predicted)
    {
        return predictDeterministicAddress(implementation, salt, address(this));
    }
}

File 22 of 31 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

/**
 * @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 23 of 31 : IERC2981.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "./IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be payed in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 24 of 31 : ICloneablePaymentSplitter.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "./IERC165.sol";
import "../libraries/SafeERC20.sol";

interface ICloneablePaymentSplitter is IERC165 {
    
    event PayeeAdded(address account, uint256 shares);
    event PaymentReleased(address to, uint256 amount);
    event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
    event PaymentReceived(address from, uint256 amount);
    
    function initialize(address[] calldata payees, uint256[] calldata shares_) external;        
    function totalShares() external view returns (uint256);    
    function totalReleased() external view returns (uint256);
    function totalReleased(IERC20 token) external view returns (uint256);
    function shares(address account) external view returns (uint256);    
    function released(address account) external view returns (uint256);
    function released(IERC20 token, address account) external view returns (uint256);
    function payee(uint256 index) external view returns (address);    
    function release(address payable account) external;
    function release(IERC20 token, address account) external;
    function pendingPayment(address account) external view returns (uint256);
    function pendingPayment(IERC20 token, address account) external view returns (uint256);
}

File 25 of 31 : RoyaltyRecipient.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

struct RoyaltyRecipient {
    bool isPaymentSplitter; // 1 byte
    uint16 bips; // 2 bytes
    address recipient; // 20 bytes
}

File 26 of 31 : INiftyEntityCloneable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "./IERC165.sol";

interface INiftyEntityCloneable is IERC165 {
    function initializeNiftyEntity(address niftyRegistryContract_) external;
}

File 27 of 31 : INiftyRegistry.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

interface INiftyRegistry {
   function isValidNiftySender(address sendingKey) external view returns (bool);
}

File 28 of 31 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

import "../interfaces/IERC20.sol";
import "./Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 29 of 31 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)

pragma solidity 0.8.9;

import "./Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */    
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 30 of 31 : SignatureStatus.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

struct SignatureStatus {
    bool isSalted;
    bool isVerified;
    address signer;
    bytes32 saltedHash;
}

File 31 of 31 : RejectEther.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.9;

/**
 * @title A base contract that may be inherited in order to protect a contract from having its fallback function 
 * invoked and to block the receipt of ETH by a contract.
 * @author Nathan Gang
 * @notice This contract bestows on inheritors the ability to block ETH transfers into the contract
 * @dev ETH may still be forced into the contract - it is impossible to block certain attacks, but this protects from accidental ETH deposits
 */
 // For more info, see: "https://medium.com/@alexsherbuck/two-ways-to-force-ether-into-a-contract-1543c1311c56"
abstract contract RejectEther {    

    /**
     * @dev For most contracts, it is safest to explicitly restrict the use of the fallback function
     * This would generally be invoked if sending ETH to this contract with a 'data' value provided
     */
    fallback() external payable {        
        revert("Fallback function not permitted");
    }

    /**
     * @dev This is the standard path where ETH would land if sending ETH to this contract without a 'data' value
     * In our case, we don't want our contract to receive ETH, so we restrict it here
     */
    receive() external payable {
        revert("Receiving ETH not permitted");
    }    
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"niftyRegistryContract","type":"address"},{"internalType":"address","name":"defaultOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":true,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminTransferred","type":"event"},{"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":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"fromAddress","type":"address"},{"indexed":true,"internalType":"address","name":"toAddress","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"signer","type":"address"},{"indexed":false,"internalType":"bytes32","name":"data","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"signature","type":"bytes"}],"name":"ContractSigned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"niftyType","type":"uint256"},{"indexed":false,"internalType":"address","name":"previousReceiver","type":"address"},{"indexed":false,"internalType":"address","name":"newReceiver","type":"address"}],"name":"RoyaltyReceiverUpdated","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"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"BIPS_PERCENTAGE_TOTAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"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":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalizeContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCollectionStatus","outputs":[{"components":[{"internalType":"bool","name":"isContractFinalized","type":"bool"},{"internalType":"uint88","name":"amountCreated","type":"uint88"},{"internalType":"address","name":"defaultOwner","type":"address"}],"internalType":"struct ERC721Omnibus.CollectionStatus","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getNiftyType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getPaintValue","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"niftyType","type":"uint256"}],"name":"getPaymentSplitterByNiftyType","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getPaymentSplitterByTokenId","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"niftyType","type":"uint256"}],"name":"getRoyaltySettings","outputs":[{"components":[{"internalType":"bool","name":"isPaymentSplitter","type":"bool"},{"internalType":"uint16","name":"bips","type":"uint16"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct RoyaltyRecipient","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"defaultOwner_","type":"address"}],"name":"initializeDefaultOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"baseURI_","type":"string"}],"name":"initializeERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"niftyRegistryContract_","type":"address"}],"name":"initializeNiftyEntity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"niftyType","type":"uint256"},{"internalType":"address","name":"splitterImplementation","type":"address"},{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"name":"initializeRoyalties","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","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":[{"internalType":"uint256[]","name":"paintValues","type":"uint256[]"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nominee","type":"address"}],"name":"nominateAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"packedPaintValues","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"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":"string","name":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"niftyType","type":"uint256"},{"internalType":"uint256","name":"bips","type":"uint256"}],"name":"setRoyaltyBips","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer_","type":"address"},{"internalType":"bytes32","name":"saltedHash_","type":"bytes32"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes","name":"signature_","type":"bytes"}],"name":"sign","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signature","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"signatureStatus","outputs":[{"internalType":"bool","name":"isSalted","type":"bool"},{"internalType":"bool","name":"isVerified","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"bytes32","name":"saltedHash","type":"bytes32"}],"stateMutability":"view","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":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"tokenContract","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdrawERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405260006012553480156200001657600080fd5b506040516200423938038062004239833981016040819052620000399162000340565b620000a36040518060400160405280600f81526020016e11995ddbd5dbdc9b190814185a5b9d608a1b8152506040518060400160405280600581526020016414185a5b9d60da1b815250604051806060016040528060238152602001620041f660239139620000c1565b620000ae826200015f565b620000b981620001da565b50506200040d565b60005460408051808201909152601f81526000805160206200421983398151915260208201529060ff1615620001155760405162461bcd60e51b81526004016200010c919062000378565b60405180910390fd5b5082516200012b9060019060208601906200027d565b508151620001419060029060208501906200027d565b506200014d8162000264565b50506000805460ff1916600117905550565b600b5460408051808201909152601f81526000805160206200421983398151915260208201529060ff1615620001aa5760405162461bcd60e51b81526004016200010c919062000378565b50600d80546001600160a01b0319166001600160a01b0392909216919091179055600b805460ff19166001179055565b60085460408051808201909152601f81526000805160206200421983398151915260208201529060ff1615620002255760405162461bcd60e51b81526004016200010c919062000378565b50600980546001600160a01b039092166c01000000000000000000000000026001600160601b039092169190911790556008805460ff19166001179055565b8051620002799060039060208401906200027d565b5050565b8280546200028b90620003d0565b90600052602060002090601f016020900481019282620002af5760008555620002fa565b82601f10620002ca57805160ff1916838001178555620002fa565b82800160010185558215620002fa579182015b82811115620002fa578251825591602001919060010190620002dd565b50620003089291506200030c565b5090565b5b808211156200030857600081556001016200030d565b80516001600160a01b03811681146200033b57600080fd5b919050565b600080604083850312156200035457600080fd5b6200035f8362000323565b91506200036f6020840162000323565b90509250929050565b600060208083528351808285015260005b81811015620003a75785810183015185820160400152820162000389565b81811115620003ba576000604083870101525b50601f01601f1916929092016040019392505050565b600181811c90821680620003e557607f821691505b602082108114156200040757634e487b7160e01b600052602260045260246000fd5b50919050565b613dd9806200041d6000396000f3fe6080604052600436106102f65760003560e01c80636050f48e1161018f5780639dc20f78116100e1578063e8ac65331161008a578063f592644211610064578063f5926442146109f4578063f851a44014610aab578063f8e93ef914610ad057610348565b8063e8ac6533146108df578063e985e9c5146108ff578063f51c45751461094857610348565b8063b88d4fde116100bb578063b88d4fde1461087f578063c87b56dd1461089f578063cd5ad4c5146108bf57610348565b80639dc20f7814610829578063a22cb46514610849578063b0abd4571461086957610348565b8063792ccce01161014357806392e80eb41161011d57806392e80eb4146107d457806395d89b41146107f45780639b3d270a1461080957610348565b8063792ccce01461077f5780638bad0c0a1461079f578063923d66d5146107b457610348565b80636c0360eb116101745780636c0360eb1461071c57806370a08231146107315780637889cc161461075f57610348565b80636050f48e146106dc5780636352211e146106fc57610348565b80634025feb211610248578063447fd8c4116101fc57806351ff4847116101d657806351ff48471461063d57806355f804b3146106525780635615d8fd1461067257610348565b8063447fd8c4146105dd5780634782f779146105fd5780634f558e791461061d57610348565b806342966c681161022d57806342966c681461057d578063432643471461059d57806344004cc1146105bd57610348565b80634025feb21461053d57806342842e0e1461055d57610348565b80630e313f49116102aa5780632a55205a116102845780632a55205a146104be5780632c5c0f54146104fd578063319cd2d71461051d57610348565b80630e313f491461045657806323b872dd1461048957806328c5cf0a146104a957610348565b8063081812fc116102db578063081812fc146103e7578063095ea7b31461041f5780630e18b6811461044157610348565b806301ffc9a71461039057806306fdde03146103c557610348565b366103485760405162461bcd60e51b815260206004820152601b60248201527f526563656976696e6720455448206e6f74207065726d6974746564000000000060448201526064015b60405180910390fd5b60405162461bcd60e51b815260206004820152601f60248201527f46616c6c6261636b2066756e6374696f6e206e6f74207065726d697474656400604482015260640161033f565b34801561039c57600080fd5b506103b06103ab36600461355b565b610af0565b60405190151581526020015b60405180910390f35b3480156103d157600080fd5b506103da610b13565b6040516103bc91906135d4565b3480156103f357600080fd5b506104076104023660046135e7565b610ba5565b6040516001600160a01b0390911681526020016103bc565b34801561042b57600080fd5b5061043f61043a366004613615565b610c21565b005b34801561044d57600080fd5b5061043f610d1a565b34801561046257600080fd5b506104766104713660046135e7565b610d93565b60405161ffff90911681526020016103bc565b34801561049557600080fd5b5061043f6104a4366004613641565b610e01565b3480156104b557600080fd5b5061043f610e7b565b3480156104ca57600080fd5b506104de6104d9366004613682565b610e92565b604080516001600160a01b0390931683526020830191909152016103bc565b34801561050957600080fd5b506104076105183660046135e7565b610f30565b34801561052957600080fd5b506104076105383660046135e7565b610f3b565b34801561054957600080fd5b5061043f610558366004613641565b610f47565b34801561056957600080fd5b5061043f610578366004613641565b610fe3565b34801561058957600080fd5b5061043f6105983660046135e7565b610ffe565b3480156105a957600080fd5b5061043f6105b83660046136a4565b611007565b3480156105c957600080fd5b5061043f6105d8366004613641565b61109d565b3480156105e957600080fd5b506104076105f8366004613706565b61119b565b34801561060957600080fd5b5061043f610618366004613615565b6112ca565b34801561062957600080fd5b506103b06106383660046135e7565b61147e565b34801561064957600080fd5b506103da611489565b34801561065e57600080fd5b5061043f61066d3660046137d4565b611517565b34801561067e57600080fd5b50600f546010546106ab9160ff808216926101008304909116916201000090046001600160a01b03169084565b6040516103bc9493929190931515845291151560208401526001600160a01b03166040830152606082015260800190565b3480156106e857600080fd5b5061043f6106f73660046138c2565b611562565b34801561070857600080fd5b506104076107173660046135e7565b6115ff565b34801561072857600080fd5b506103da611718565b34801561073d57600080fd5b5061075161074c3660046136a4565b611727565b6040519081526020016103bc565b34801561076b57600080fd5b5061043f61077a366004613682565b6117a2565b34801561078b57600080fd5b5061043f61079a3660046136a4565b61182d565b3480156107ab57600080fd5b5061043f6118ca565b3480156107c057600080fd5b506107516107cf3660046135e7565b6118de565b3480156107e057600080fd5b5061043f6107ef366004613615565b6118ff565b34801561080057600080fd5b506103da611a62565b34801561081557600080fd5b5061043f61082436600461394a565b611a71565b34801561083557600080fd5b506107516108443660046135e7565b611d81565b34801561085557600080fd5b5061043f6108643660046139a4565b611d8a565b34801561087557600080fd5b5061075161271081565b34801561088b57600080fd5b5061043f61089a3660046139dd565b611e55565b3480156108ab57600080fd5b506103da6108ba3660046135e7565b611ec0565b3480156108cb57600080fd5b5061043f6108da3660046136a4565b611f7c565b3480156108eb57600080fd5b50600c54610407906001600160a01b031681565b34801561090b57600080fd5b506103b061091a366004613a5d565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561095457600080fd5b506109c36109633660046135e7565b604080516060808201835260008083526020808401829052928401819052938452600e825292829020825193840183525460ff811615158452610100810461ffff1691840191909152630100000090046001600160a01b03169082015290565b6040805182511515815260208084015161ffff1690820152918101516001600160a01b0316908201526060016103bc565b348015610a0057600080fd5b50610a716040805160608101825260008082526020820181905291810191909152506040805160608101825260095460ff81161515825261010081046affffffffffffffffffffff1660208301526c0100000000000000000000000090046001600160a01b03169181019190915290565b604080518251151581526020808401516affffffffffffffffffffff1690820152918101516001600160a01b0316908201526060016103bc565b348015610ab757600080fd5b50600b546104079061010090046001600160a01b031681565b348015610adc57600080fd5b5061043f610aeb366004613a8b565b611fb3565b60006001600160e01b031982161580610b0d5750610b0d82612390565b92915050565b606060018054610b2290613ac1565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4e90613ac1565b8015610b9b5780601f10610b7057610100808354040283529160200191610b9b565b820191906000526020600020905b815481529060010190602001808311610b7e57829003601f168201915b5050505050905090565b6000610bb0826123ce565b6040518060400160405280601481526020017f546f6b656e20646f6573206e6f7420657869737400000000000000000000000081525090610c045760405162461bcd60e51b815260040161033f91906135d4565b50506000908152600660205260409020546001600160a01b031690565b6000610c2c826115ff565b9050806001600160a01b0316836001600160a01b031614156040518060400160405280601681526020017f43757272656e74206f776e657220617070726f76616c0000000000000000000081525090610c985760405162461bcd60e51b815260040161033f91906135d4565b50336001600160a01b0382161480610cb55750610cb5813361091a565b6040518060400160405280601681526020017f4e6f74206f776e6572206e6f7220617070726f7665640000000000000000000081525090610d095760405162461bcd60e51b815260040161033f91906135d4565b50610d15818484612422565b505050565b600c546001600160a01b031680336001600160a01b0316146040518060400160405280601281526020017f496e76616c6964206d73672e73656e646572000000000000000000000000000081525090610d865760405162461bcd60e51b815260040161033f91906135d4565b50610d908161248b565b50565b6000610d9e8261147e565b610daa57506000919050565b60008080601060001986010492506010600019860106915060138381548110610dd557610dd5613b0c565b90600052602060002001549050816010610def9190613b38565b1c61ffff16949350505050565b919050565b600080610e0e3384612519565b91509150806040518060400160405280601681526020017f4e6f74206f776e6572206e6f7220617070726f7665640000000000000000000081525090610e675760405162461bcd60e51b815260040161033f91906135d4565b50610e7482868686612599565b5050505050565b610e83612754565b6009805460ff19166001179055565b60016000818152600e6020527fa7c5ba7114a813b50159add3a36832908dc83db71d0b9a24c2ad0f83be9582075490918291630100000090046001600160a01b031615610f1f576000818152600e6020526040902054630100000081046001600160a01b03169061271090610f1090610100900461ffff1687613b38565b610f1a9190613b57565b610f23565b6000805b92509250505b9250929050565b6000610b0d826128a4565b6000610b0d60016128a4565b610f4f612754565b6040517fb88d4fde0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015260448201839052608060648301526000608483015284169063b88d4fde9060a401600060405180830381600087803b158015610fc657600080fd5b505af1158015610fda573d6000803e3d6000fd5b50505050505050565b610d1583838360405180602001604052806000815250611e55565b610d90816128e4565b600b5460408051808201909152601f81527f52652d696e697469616c697a6174696f6e206e6f74207065726d69747465640060208201529060ff16156110605760405162461bcd60e51b815260040161033f91906135d4565b50600d805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055600b805460ff19166001179055565b6110a5612754565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152602482018390526000919085169063a9059cbb90604401602060405180830381600087803b15801561110c57600080fd5b505af1158015611120573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111449190613b6b565b9050806040518060400160405280601581526020017f576974686472617720756e7375636365737366756c000000000000000000000081525090610e745760405162461bcd60e51b815260040161033f91906135d4565b60006111a5612754565b6000878152600e602052604090208054600180871160ff19831617909255630100000090046001600160a01b03169085146111ec576111e78787878787612a3b565b611214565b858560008181106111ff576111ff613b0c565b905060200201602081019061121491906136a4565b6000898152600e602090815260409182902080547fffffffffffffffffff0000000000000000000000000000000000000000ffffff1663010000006001600160a01b03958616810291909117918290558351868616815291049093169083015289917f834a47bfbb51ad808d8649527d9bf540f58cc71dc1093ae2249c8b230575ce98910160405180910390a250505060009485525050600e60205250506040902054630100000090046001600160a01b031690565b6112d2612754565b60408051808201909152601181527f5a65726f20455448205472616e736665720000000000000000000000000000006020820152816113245760405162461bcd60e51b815260040161033f91906135d4565b506001600160a01b03821661137b5760405162461bcd60e51b815260206004820152601860248201527f5472616e7366657220746f207a65726f20616464726573730000000000000000604482015260640161033f565b60408051808201909152601481527f496e73756666696369656e742062616c616e636500000000000000000000000060208201524790818311156113d25760405162461bcd60e51b815260040161033f91906135d4565b506000836001600160a01b03168360405160006040518083038185875af1925050503d8060008114611420576040519150601f19603f3d011682016040523d82523d6000602084013e611425565b606091505b50509050806040518060400160405280601581526020017f576974686472617720756e7375636365737366756c000000000000000000000081525090610e745760405162461bcd60e51b815260040161033f91906135d4565b6000610b0d826123ce565b6011805461149690613ac1565b80601f01602080910402602001604051908101604052809291908181526020018280546114c290613ac1565b801561150f5780601f106114e45761010080835404028352916020019161150f565b820191906000526020600020905b8154815290600101906020018083116114f257829003601f168201915b505050505081565b61151f612754565b61155e82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612bc092505050565b5050565b60005460408051808201909152601f81527f52652d696e697469616c697a6174696f6e206e6f74207065726d69747465640060208201529060ff16156115bb5760405162461bcd60e51b815260040161033f91906135d4565b5082516115cf906001906020860190613438565b5081516115e3906002906020850190613438565b506115ed81612bc0565b50506000805460ff1916600117905550565b600061160a82612bd3565b6040518060400160405280601481526020017f546f6b656e20646f6573206e6f742065786973740000000000000000000000008152509061165e5760405162461bcd60e51b815260040161033f91906135d4565b506000828152600a602052604090205460ff16611696576009546c0100000000000000000000000090046001600160a01b03166116b4565b6000828152600a602052604090205461010090046001600160a01b03165b60408051808201909152601481527f546f6b656e20646f6573206e6f7420657869737400000000000000000000000060208201529091506001600160a01b0382166117125760405162461bcd60e51b815260040161033f91906135d4565b50919050565b606060038054610b2290613ac1565b60408051808201909152601681527f517565727920666f72207a65726f20616464726573730000000000000000000060208201526000906001600160a01b0383166117855760405162461bcd60e51b815260040161033f91906135d4565b50506001600160a01b031660009081526005602052604090205490565b6117aa612754565b60408051808201909152600e81527f42697073206f766572203130302500000000000000000000000000000000000060208201526127108211156118015760405162461bcd60e51b815260040161033f91906135d4565b506000918252600e6020526040909120805461ffff9092166101000262ffff0019909216919091179055565b60085460408051808201909152601f81527f52652d696e697469616c697a6174696f6e206e6f74207065726d69747465640060208201529060ff16156118865760405162461bcd60e51b815260040161033f91906135d4565b50600980546001600160a01b039092166c01000000000000000000000000026bffffffffffffffffffffffff9092169190911790556008805460ff19166001179055565b6118d2612754565b6118dc600061248b565b565b601381815481106118ee57600080fd5b600091825260209091200154905081565b611907612754565b60408051808201909152601a81527f5369676e65722073657420746f207a65726f206164647265737300000000000060208201526001600160a01b0383166119625760405162461bcd60e51b815260040161033f91906135d4565b5060408051808201909152601781527f53616c74656420686173682073657420746f207a65726f0000000000000000006020820152816119b55760405162461bcd60e51b815260040161033f91906135d4565b50600f5460408051808201909152601781527f436f6e747261637420616c7265616479207369676e6564000000000000000000602082015290610100900460ff1615611a145760405162461bcd60e51b815260040161033f91906135d4565b50600f805460109290925560ff196001600160a01b039093166201000002929092167fffffffffffffffffffff0000000000000000000000000000000000000000ff00909116176001179055565b606060028054610b2290613ac1565b600f5460408051808201909152601781527f436f6e747261637420616c7265616479207369676e6564000000000000000000602082015290610100900460ff1615611acf5760405162461bcd60e51b815260040161033f91906135d4565b50600f5460408051808201909152601381527f436f6e7472616374206e6f742073616c7465640000000000000000000000000060208201529060ff16611b285760405162461bcd60e51b815260040161033f91906135d4565b50600f54601054620100009091046001600160a01b03169081336001600160a01b0316146040518060400160405280601281526020017f496e76616c6964206d73672e73656e646572000000000000000000000000000081525090611ba05760405162461bcd60e51b815260040161033f91906135d4565b508085604051602001611bb591815260200190565b60405160208183030381529060405280519060200120146040518060400160405280601581526020017f496e636f7272656374207365637265742073616c74000000000000000000000081525090611c205760405162461bcd60e51b815260040161033f91906135d4565b50816001600160a01b0316611cc1611c85836040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612bfa92505050565b6001600160a01b0316146040518060400160405280601681526020017f556e65787065637465642064617461207369676e65720000000000000000000081525090611d1f5760405162461bcd60e51b815260040161033f91906135d4565b50611d2c601185856134bc565b50600f805461ff0019166101001790556040517f955fd8871b091d05a1f766f82ece6ba4d9c55e65e065d4459b26740f2e698e7090611d72908490849088908890613b88565b60405180910390a15050505050565b60006001610b0d565b60408051808201909152601181527f417070726f766520746f2063616c6c657200000000000000000000000000000060208201526001600160a01b038316331415611de85760405162461bcd60e51b815260040161033f91906135d4565b503360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611e60848484610e01565b611e6c84848484612c1e565b6040518060400160405280601581526020017f4e6f7420616e204552433732315265636569766572000000000000000000000081525090610e745760405162461bcd60e51b815260040161033f91906135d4565b6060611ecb826123ce565b6040518060400160405280601481526020017f546f6b656e20646f6573206e6f7420657869737400000000000000000000000081525090611f1f5760405162461bcd60e51b815260040161033f91906135d4565b506000611f2a611718565b90506000815111611f4a5760405180602001604052806000815250611f75565b80611f5484612d5f565b604051602001611f65929190613bce565b6040516020818303038152906040525b9392505050565b611f84612754565b600c805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b611fbb612754565b60408051808201909152601181527f496e70757420617272617920656d707479000000000000000000000000000000602082015281908161200f5760405162461bcd60e51b815260040161033f91906135d4565b5060095460408051808201909152601881527f5472616e7366657220746f207a65726f2061646472657373000000000000000060208201526c010000000000000000000000009091046001600160a01b031690816120805760405162461bcd60e51b815260040161033f91906135d4565b5060095460408051808201909152601581527f436f6e74726163742069732066696e616c697a6564000000000000000000000060208201529060ff16156120da5760405162461bcd60e51b815260040161033f91906135d4565b506012546000806120ec836001613bfd565b905060006120fb601085613c15565b15612155576013805461211090600190613c29565b8154811061212057612120613b0c565b90600052602060002001549050601380548061213e5761213e613c40565b600190038181906000526020600020016000905590555b8583101561226557600088888581811061217157612171613b0c565b90506020020135905060008111801561218c575061ffff8111155b6121d85760405162461bcd60e51b815260206004820152601c60248201527f5265717569726573207061696e74206f66203120746f20363535333500000000604482015260640161033f565b60006121e5601087613c15565b9050801580156121f55750600083115b15612230576013805460018101825560009182527f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a09001939093555b61223b601082613b38565b82901b83179250848061224d90613c56565b955050858061225b90613c56565b9650505050612155565b601284905580156122a657601380546001810182556000919091527f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a090018190555b6001600160a01b038516600090815260056020526040812080548892906122ce908490613bfd565b9091555050600980548791906001906122fa90849061010090046affffffffffffffffffffff16613c71565b92506101000a8154816affffffffffffffffffffff02191690836affffffffffffffffffffff160217905550846001600160a01b031660006001600160a01b0316837fdeaa91b6123d068f5821d0fb0678463d1a8a6079fe8af5de3ce5e896dcf9133d60018a8761236b9190613bfd565b6123759190613c29565b60405190815260200160405180910390a45050505050505050565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610b0d5750610b0d82612e91565b60006123d982612bd3565b1561241a576000828152600a602052604090205461010090046001600160a01b0316151580610b0d5750506000908152600a602052604090205460ff161590565b506000919050565b600081815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600b80546001600160a01b038381166101008181027fffffffffffffffffffffff0000000000000000000000000000000000000000ff851617909455600c805473ffffffffffffffffffffffffffffffffffffffff1916905560405193909204169182907ff8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec690600090a35050565b600080612525836115ff565b9150816001600160a01b0316846001600160a01b0316148061256057506000838152600660205260409020546001600160a01b038581169116145b8061259057506001600160a01b0380831660009081526007602090815260408083209388168352929052205460ff165b90509250929050565b826001600160a01b0316846001600160a01b0316146040518060400160405280601d81526020017f5472616e736665722066726f6d20696e636f7272656374206f776e6572000000815250906126025760405162461bcd60e51b815260040161033f91906135d4565b5060408051808201909152601881527f5472616e7366657220746f207a65726f2061646472657373000000000000000060208201526001600160a01b03831661265e5760405162461bcd60e51b815260040161033f91906135d4565b506126698482612ecf565b6001600160a01b0383166000908152600560205260408120805460019290612692908490613c29565b90915550506001600160a01b03821660009081526005602052604081208054600192906126c0908490613bfd565b90915550506000818152600a60205260409020805460017fffffffffffffffffffffff0000000000000000000000000000000000000000009091166101006001600160a01b038616021717905580826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b600b5461010090046001600160a01b03168061284757600d546001600160a01b031663e37ce6fa336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156127bb57600080fd5b505afa1580156127cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127f39190613b6b565b6040518060400160405280601281526020017f496e76616c6964206d73672e73656e64657200000000000000000000000000008152509061155e5760405162461bcd60e51b815260040161033f91906135d4565b60408051808201909152601281527f496e76616c6964206d73672e73656e64657200000000000000000000000000006020820152336001600160a01b0383161461155e5760405162461bcd60e51b815260040161033f91906135d4565b6000818152600e602052604081205460ff166128c1576000610b0d565b506000908152600e6020526040902054630100000090046001600160a01b031690565b60006128ef826115ff565b90506000336001600160a01b038316148061292057506000838152600660205260409020546001600160a01b031633145b806129305750612930823361091a565b9050806040518060400160405280601681526020017f4e6f74206f776e6572206e6f7220617070726f76656400000000000000000000815250906129875760405162461bcd60e51b815260040161033f91906135d4565b506129928284612ecf565b6001600160a01b03821660009081526005602052604081208054600192906129bb908490613c29565b909155506129fe9050836000908152600a6020526040902080547fffffffffffffffffffffff000000000000000000000000000000000000000000166001179055565b60405183906000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505050565b6040516301ffc9a760e01b81527f37de79fc0000000000000000000000000000000000000000000000000000000060048201526000906001600160a01b038716906301ffc9a79060240160206040518083038186803b158015612a9d57600080fd5b505afa158015612ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ad59190613b6b565b6040518060400160405280601e81526020017f556e636c6f6e6561626c65207265666572656e636520636f6e7472616374000081525090612b295760405162461bcd60e51b815260040161033f91906135d4565b506000612b3587612f31565b6040517f7fbbe46f0000000000000000000000000000000000000000000000000000000081529091506001600160a01b03821690637fbbe46f90612b83908990899089908990600401613c97565b600060405180830381600087803b158015612b9d57600080fd5b505af1158015612bb1573d6000803e3d6000fd5b50929998505050505050505050565b805161155e906003906020840190613438565b60008082118015610b0d57505060095461010090046affffffffffffffffffffff16101590565b6000806000612c098585612fe7565b91509150612c1681613054565b509392505050565b60006001600160a01b0384163b15612d5357604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612c62903390899088908890600401613d34565b602060405180830381600087803b158015612c7c57600080fd5b505af1925050508015612cac575060408051601f3d908101601f19168201909252612ca991810190613d70565b60015b612d39573d808015612cda576040519150601f19603f3d011682016040523d82523d6000602084013e612cdf565b606091505b508051612d3157604080518082018252601581527f4e6f7420616e20455243373231526563656976657200000000000000000000006020820152905162461bcd60e51b815261033f91906004016135d4565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612d57565b5060015b949350505050565b606081612d9f57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612dc95780612db381613c56565b9150612dc29050600a83613b57565b9150612da3565b60008167ffffffffffffffff811115612de457612de4613816565b6040519080825280601f01601f191660200182016040528015612e0e576020820181803683370190505b5090505b8415612d5757612e23600183613c29565b9150612e30600a86613c15565b612e3b906030613bfd565b60f81b818381518110612e5057612e50613b0c565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612e8a600a86613b57565b9450612e12565b60006001600160e01b031982167f43264347000000000000000000000000000000000000000000000000000000001480610b0d5750610b0d8261320f565b600081815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19169055518291906001600160a01b038516907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925908390a45050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528260601b60148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526037816000f09150506001600160a01b038116610dfc5760405162461bcd60e51b815260206004820152601660248201527f455243313136373a20637265617465206661696c656400000000000000000000604482015260640161033f565b60008082516041141561301e5760208301516040840151606085015160001a6130128782858561324d565b94509450505050610f29565b825160401415613048576020830151604084015161303d86838361333a565b935093505050610f29565b50600090506002610f29565b600081600481111561306857613068613d8d565b14156130715750565b600181600481111561308557613085613d8d565b14156130d35760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161033f565b60028160048111156130e7576130e7613d8d565b14156131355760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161033f565b600381600481111561314957613149613d8d565b14156131a25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161033f565b60048160048111156131b6576131b6613d8d565b1415610d905760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161033f565b60006001600160e01b031982167f792ccce0000000000000000000000000000000000000000000000000000000001480610b0d5750610b0d82613382565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156132845750600090506003613331565b8460ff16601b1415801561329c57508460ff16601c14155b156132ad5750600090506004613331565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613301573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661332a57600060019250925050613331565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b016133748782888561324d565b935093505050935093915050565b60006001600160e01b031982167f80ac58cd0000000000000000000000000000000000000000000000000000000014806133e557506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061341957506001600160e01b031982167f6050f48e00000000000000000000000000000000000000000000000000000000145b80610b0d57506301ffc9a760e01b6001600160e01b0319831614610b0d565b82805461344490613ac1565b90600052602060002090601f01602090048101928261346657600085556134ac565b82601f1061347f57805160ff19168380011785556134ac565b828001600101855582156134ac579182015b828111156134ac578251825591602001919060010190613491565b506134b8929150613530565b5090565b8280546134c890613ac1565b90600052602060002090601f0160209004810192826134ea57600085556134ac565b82601f106135035782800160ff198235161785556134ac565b828001600101855582156134ac579182015b828111156134ac578235825591602001919060010190613515565b5b808211156134b85760008155600101613531565b6001600160e01b031981168114610d9057600080fd5b60006020828403121561356d57600080fd5b8135611f7581613545565b60005b8381101561359357818101518382015260200161357b565b838111156135a2576000848401525b50505050565b600081518084526135c0816020860160208601613578565b601f01601f19169290920160200192915050565b602081526000611f7560208301846135a8565b6000602082840312156135f957600080fd5b5035919050565b6001600160a01b0381168114610d9057600080fd5b6000806040838503121561362857600080fd5b823561363381613600565b946020939093013593505050565b60008060006060848603121561365657600080fd5b833561366181613600565b9250602084013561367181613600565b929592945050506040919091013590565b6000806040838503121561369557600080fd5b50508035926020909101359150565b6000602082840312156136b657600080fd5b8135611f7581613600565b60008083601f8401126136d357600080fd5b50813567ffffffffffffffff8111156136eb57600080fd5b6020830191508360208260051b8501011115610f2957600080fd5b6000806000806000806080878903121561371f57600080fd5b86359550602087013561373181613600565b9450604087013567ffffffffffffffff8082111561374e57600080fd5b61375a8a838b016136c1565b9096509450606089013591508082111561377357600080fd5b5061378089828a016136c1565b979a9699509497509295939492505050565b60008083601f8401126137a457600080fd5b50813567ffffffffffffffff8111156137bc57600080fd5b602083019150836020828501011115610f2957600080fd5b600080602083850312156137e757600080fd5b823567ffffffffffffffff8111156137fe57600080fd5b61380a85828601613792565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561384757613847613816565b604051601f8501601f19908116603f0116810190828211818310171561386f5761386f613816565b8160405280935085815286868601111561388857600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126138b357600080fd5b611f758383356020850161382c565b6000806000606084860312156138d757600080fd5b833567ffffffffffffffff808211156138ef57600080fd5b6138fb878388016138a2565b9450602086013591508082111561391157600080fd5b61391d878388016138a2565b9350604086013591508082111561393357600080fd5b50613940868287016138a2565b9150509250925092565b60008060006040848603121561395f57600080fd5b83359250602084013567ffffffffffffffff81111561397d57600080fd5b61398986828701613792565b9497909650939450505050565b8015158114610d9057600080fd5b600080604083850312156139b757600080fd5b82356139c281613600565b915060208301356139d281613996565b809150509250929050565b600080600080608085870312156139f357600080fd5b84356139fe81613600565b93506020850135613a0e81613600565b925060408501359150606085013567ffffffffffffffff811115613a3157600080fd5b8501601f81018713613a4257600080fd5b613a518782356020840161382c565b91505092959194509250565b60008060408385031215613a7057600080fd5b8235613a7b81613600565b915060208301356139d281613600565b60008060208385031215613a9e57600080fd5b823567ffffffffffffffff811115613ab557600080fd5b61380a858286016136c1565b600181811c90821680613ad557607f821691505b6020821081141561171257634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613b5257613b52613b22565b500290565b600082613b6657613b66613af6565b500490565b600060208284031215613b7d57600080fd5b8151611f7581613996565b6001600160a01b038516815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f909201601f191601019392505050565b60008351613be0818460208801613578565b835190830190613bf4818360208801613578565b01949350505050565b60008219821115613c1057613c10613b22565b500190565b600082613c2457613c24613af6565b500690565b600082821015613c3b57613c3b613b22565b500390565b634e487b7160e01b600052603160045260246000fd5b6000600019821415613c6a57613c6a613b22565b5060010190565b60006affffffffffffffffffffff808316818516808303821115613bf457613bf4613b22565b6040808252810184905260008560608301825b87811015613cda578235613cbd81613600565b6001600160a01b0316825260209283019290910190600101613caa565b5083810360208501528481527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff851115613d1357600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613d6660808301846135a8565b9695505050505050565b600060208284031215613d8257600080fd5b8151611f7581613545565b634e487b7160e01b600052602160045260246000fdfea26469706673582212201e30706e04ca5524b1d8b0769b25e03bc4fac7180ac06b016fbdaf8fb919308f64736f6c6343000809003368747470733a2f2f6170692e6e69667479676174657761792e636f6d2f7061696e742f52652d696e697469616c697a6174696f6e206e6f74207065726d6974746564000000000000000000000000006e53130ddff21e3bc963ee902005223b9a202106000000000000000000000000e052113bd7d7700d623414a0a4585bcae754e9d5

Deployed Bytecode

0x6080604052600436106102f65760003560e01c80636050f48e1161018f5780639dc20f78116100e1578063e8ac65331161008a578063f592644211610064578063f5926442146109f4578063f851a44014610aab578063f8e93ef914610ad057610348565b8063e8ac6533146108df578063e985e9c5146108ff578063f51c45751461094857610348565b8063b88d4fde116100bb578063b88d4fde1461087f578063c87b56dd1461089f578063cd5ad4c5146108bf57610348565b80639dc20f7814610829578063a22cb46514610849578063b0abd4571461086957610348565b8063792ccce01161014357806392e80eb41161011d57806392e80eb4146107d457806395d89b41146107f45780639b3d270a1461080957610348565b8063792ccce01461077f5780638bad0c0a1461079f578063923d66d5146107b457610348565b80636c0360eb116101745780636c0360eb1461071c57806370a08231146107315780637889cc161461075f57610348565b80636050f48e146106dc5780636352211e146106fc57610348565b80634025feb211610248578063447fd8c4116101fc57806351ff4847116101d657806351ff48471461063d57806355f804b3146106525780635615d8fd1461067257610348565b8063447fd8c4146105dd5780634782f779146105fd5780634f558e791461061d57610348565b806342966c681161022d57806342966c681461057d578063432643471461059d57806344004cc1146105bd57610348565b80634025feb21461053d57806342842e0e1461055d57610348565b80630e313f49116102aa5780632a55205a116102845780632a55205a146104be5780632c5c0f54146104fd578063319cd2d71461051d57610348565b80630e313f491461045657806323b872dd1461048957806328c5cf0a146104a957610348565b8063081812fc116102db578063081812fc146103e7578063095ea7b31461041f5780630e18b6811461044157610348565b806301ffc9a71461039057806306fdde03146103c557610348565b366103485760405162461bcd60e51b815260206004820152601b60248201527f526563656976696e6720455448206e6f74207065726d6974746564000000000060448201526064015b60405180910390fd5b60405162461bcd60e51b815260206004820152601f60248201527f46616c6c6261636b2066756e6374696f6e206e6f74207065726d697474656400604482015260640161033f565b34801561039c57600080fd5b506103b06103ab36600461355b565b610af0565b60405190151581526020015b60405180910390f35b3480156103d157600080fd5b506103da610b13565b6040516103bc91906135d4565b3480156103f357600080fd5b506104076104023660046135e7565b610ba5565b6040516001600160a01b0390911681526020016103bc565b34801561042b57600080fd5b5061043f61043a366004613615565b610c21565b005b34801561044d57600080fd5b5061043f610d1a565b34801561046257600080fd5b506104766104713660046135e7565b610d93565b60405161ffff90911681526020016103bc565b34801561049557600080fd5b5061043f6104a4366004613641565b610e01565b3480156104b557600080fd5b5061043f610e7b565b3480156104ca57600080fd5b506104de6104d9366004613682565b610e92565b604080516001600160a01b0390931683526020830191909152016103bc565b34801561050957600080fd5b506104076105183660046135e7565b610f30565b34801561052957600080fd5b506104076105383660046135e7565b610f3b565b34801561054957600080fd5b5061043f610558366004613641565b610f47565b34801561056957600080fd5b5061043f610578366004613641565b610fe3565b34801561058957600080fd5b5061043f6105983660046135e7565b610ffe565b3480156105a957600080fd5b5061043f6105b83660046136a4565b611007565b3480156105c957600080fd5b5061043f6105d8366004613641565b61109d565b3480156105e957600080fd5b506104076105f8366004613706565b61119b565b34801561060957600080fd5b5061043f610618366004613615565b6112ca565b34801561062957600080fd5b506103b06106383660046135e7565b61147e565b34801561064957600080fd5b506103da611489565b34801561065e57600080fd5b5061043f61066d3660046137d4565b611517565b34801561067e57600080fd5b50600f546010546106ab9160ff808216926101008304909116916201000090046001600160a01b03169084565b6040516103bc9493929190931515845291151560208401526001600160a01b03166040830152606082015260800190565b3480156106e857600080fd5b5061043f6106f73660046138c2565b611562565b34801561070857600080fd5b506104076107173660046135e7565b6115ff565b34801561072857600080fd5b506103da611718565b34801561073d57600080fd5b5061075161074c3660046136a4565b611727565b6040519081526020016103bc565b34801561076b57600080fd5b5061043f61077a366004613682565b6117a2565b34801561078b57600080fd5b5061043f61079a3660046136a4565b61182d565b3480156107ab57600080fd5b5061043f6118ca565b3480156107c057600080fd5b506107516107cf3660046135e7565b6118de565b3480156107e057600080fd5b5061043f6107ef366004613615565b6118ff565b34801561080057600080fd5b506103da611a62565b34801561081557600080fd5b5061043f61082436600461394a565b611a71565b34801561083557600080fd5b506107516108443660046135e7565b611d81565b34801561085557600080fd5b5061043f6108643660046139a4565b611d8a565b34801561087557600080fd5b5061075161271081565b34801561088b57600080fd5b5061043f61089a3660046139dd565b611e55565b3480156108ab57600080fd5b506103da6108ba3660046135e7565b611ec0565b3480156108cb57600080fd5b5061043f6108da3660046136a4565b611f7c565b3480156108eb57600080fd5b50600c54610407906001600160a01b031681565b34801561090b57600080fd5b506103b061091a366004613a5d565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561095457600080fd5b506109c36109633660046135e7565b604080516060808201835260008083526020808401829052928401819052938452600e825292829020825193840183525460ff811615158452610100810461ffff1691840191909152630100000090046001600160a01b03169082015290565b6040805182511515815260208084015161ffff1690820152918101516001600160a01b0316908201526060016103bc565b348015610a0057600080fd5b50610a716040805160608101825260008082526020820181905291810191909152506040805160608101825260095460ff81161515825261010081046affffffffffffffffffffff1660208301526c0100000000000000000000000090046001600160a01b03169181019190915290565b604080518251151581526020808401516affffffffffffffffffffff1690820152918101516001600160a01b0316908201526060016103bc565b348015610ab757600080fd5b50600b546104079061010090046001600160a01b031681565b348015610adc57600080fd5b5061043f610aeb366004613a8b565b611fb3565b60006001600160e01b031982161580610b0d5750610b0d82612390565b92915050565b606060018054610b2290613ac1565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4e90613ac1565b8015610b9b5780601f10610b7057610100808354040283529160200191610b9b565b820191906000526020600020905b815481529060010190602001808311610b7e57829003601f168201915b5050505050905090565b6000610bb0826123ce565b6040518060400160405280601481526020017f546f6b656e20646f6573206e6f7420657869737400000000000000000000000081525090610c045760405162461bcd60e51b815260040161033f91906135d4565b50506000908152600660205260409020546001600160a01b031690565b6000610c2c826115ff565b9050806001600160a01b0316836001600160a01b031614156040518060400160405280601681526020017f43757272656e74206f776e657220617070726f76616c0000000000000000000081525090610c985760405162461bcd60e51b815260040161033f91906135d4565b50336001600160a01b0382161480610cb55750610cb5813361091a565b6040518060400160405280601681526020017f4e6f74206f776e6572206e6f7220617070726f7665640000000000000000000081525090610d095760405162461bcd60e51b815260040161033f91906135d4565b50610d15818484612422565b505050565b600c546001600160a01b031680336001600160a01b0316146040518060400160405280601281526020017f496e76616c6964206d73672e73656e646572000000000000000000000000000081525090610d865760405162461bcd60e51b815260040161033f91906135d4565b50610d908161248b565b50565b6000610d9e8261147e565b610daa57506000919050565b60008080601060001986010492506010600019860106915060138381548110610dd557610dd5613b0c565b90600052602060002001549050816010610def9190613b38565b1c61ffff16949350505050565b919050565b600080610e0e3384612519565b91509150806040518060400160405280601681526020017f4e6f74206f776e6572206e6f7220617070726f7665640000000000000000000081525090610e675760405162461bcd60e51b815260040161033f91906135d4565b50610e7482868686612599565b5050505050565b610e83612754565b6009805460ff19166001179055565b60016000818152600e6020527fa7c5ba7114a813b50159add3a36832908dc83db71d0b9a24c2ad0f83be9582075490918291630100000090046001600160a01b031615610f1f576000818152600e6020526040902054630100000081046001600160a01b03169061271090610f1090610100900461ffff1687613b38565b610f1a9190613b57565b610f23565b6000805b92509250505b9250929050565b6000610b0d826128a4565b6000610b0d60016128a4565b610f4f612754565b6040517fb88d4fde0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015260448201839052608060648301526000608483015284169063b88d4fde9060a401600060405180830381600087803b158015610fc657600080fd5b505af1158015610fda573d6000803e3d6000fd5b50505050505050565b610d1583838360405180602001604052806000815250611e55565b610d90816128e4565b600b5460408051808201909152601f81527f52652d696e697469616c697a6174696f6e206e6f74207065726d69747465640060208201529060ff16156110605760405162461bcd60e51b815260040161033f91906135d4565b50600d805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055600b805460ff19166001179055565b6110a5612754565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152602482018390526000919085169063a9059cbb90604401602060405180830381600087803b15801561110c57600080fd5b505af1158015611120573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111449190613b6b565b9050806040518060400160405280601581526020017f576974686472617720756e7375636365737366756c000000000000000000000081525090610e745760405162461bcd60e51b815260040161033f91906135d4565b60006111a5612754565b6000878152600e602052604090208054600180871160ff19831617909255630100000090046001600160a01b03169085146111ec576111e78787878787612a3b565b611214565b858560008181106111ff576111ff613b0c565b905060200201602081019061121491906136a4565b6000898152600e602090815260409182902080547fffffffffffffffffff0000000000000000000000000000000000000000ffffff1663010000006001600160a01b03958616810291909117918290558351868616815291049093169083015289917f834a47bfbb51ad808d8649527d9bf540f58cc71dc1093ae2249c8b230575ce98910160405180910390a250505060009485525050600e60205250506040902054630100000090046001600160a01b031690565b6112d2612754565b60408051808201909152601181527f5a65726f20455448205472616e736665720000000000000000000000000000006020820152816113245760405162461bcd60e51b815260040161033f91906135d4565b506001600160a01b03821661137b5760405162461bcd60e51b815260206004820152601860248201527f5472616e7366657220746f207a65726f20616464726573730000000000000000604482015260640161033f565b60408051808201909152601481527f496e73756666696369656e742062616c616e636500000000000000000000000060208201524790818311156113d25760405162461bcd60e51b815260040161033f91906135d4565b506000836001600160a01b03168360405160006040518083038185875af1925050503d8060008114611420576040519150601f19603f3d011682016040523d82523d6000602084013e611425565b606091505b50509050806040518060400160405280601581526020017f576974686472617720756e7375636365737366756c000000000000000000000081525090610e745760405162461bcd60e51b815260040161033f91906135d4565b6000610b0d826123ce565b6011805461149690613ac1565b80601f01602080910402602001604051908101604052809291908181526020018280546114c290613ac1565b801561150f5780601f106114e45761010080835404028352916020019161150f565b820191906000526020600020905b8154815290600101906020018083116114f257829003601f168201915b505050505081565b61151f612754565b61155e82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612bc092505050565b5050565b60005460408051808201909152601f81527f52652d696e697469616c697a6174696f6e206e6f74207065726d69747465640060208201529060ff16156115bb5760405162461bcd60e51b815260040161033f91906135d4565b5082516115cf906001906020860190613438565b5081516115e3906002906020850190613438565b506115ed81612bc0565b50506000805460ff1916600117905550565b600061160a82612bd3565b6040518060400160405280601481526020017f546f6b656e20646f6573206e6f742065786973740000000000000000000000008152509061165e5760405162461bcd60e51b815260040161033f91906135d4565b506000828152600a602052604090205460ff16611696576009546c0100000000000000000000000090046001600160a01b03166116b4565b6000828152600a602052604090205461010090046001600160a01b03165b60408051808201909152601481527f546f6b656e20646f6573206e6f7420657869737400000000000000000000000060208201529091506001600160a01b0382166117125760405162461bcd60e51b815260040161033f91906135d4565b50919050565b606060038054610b2290613ac1565b60408051808201909152601681527f517565727920666f72207a65726f20616464726573730000000000000000000060208201526000906001600160a01b0383166117855760405162461bcd60e51b815260040161033f91906135d4565b50506001600160a01b031660009081526005602052604090205490565b6117aa612754565b60408051808201909152600e81527f42697073206f766572203130302500000000000000000000000000000000000060208201526127108211156118015760405162461bcd60e51b815260040161033f91906135d4565b506000918252600e6020526040909120805461ffff9092166101000262ffff0019909216919091179055565b60085460408051808201909152601f81527f52652d696e697469616c697a6174696f6e206e6f74207065726d69747465640060208201529060ff16156118865760405162461bcd60e51b815260040161033f91906135d4565b50600980546001600160a01b039092166c01000000000000000000000000026bffffffffffffffffffffffff9092169190911790556008805460ff19166001179055565b6118d2612754565b6118dc600061248b565b565b601381815481106118ee57600080fd5b600091825260209091200154905081565b611907612754565b60408051808201909152601a81527f5369676e65722073657420746f207a65726f206164647265737300000000000060208201526001600160a01b0383166119625760405162461bcd60e51b815260040161033f91906135d4565b5060408051808201909152601781527f53616c74656420686173682073657420746f207a65726f0000000000000000006020820152816119b55760405162461bcd60e51b815260040161033f91906135d4565b50600f5460408051808201909152601781527f436f6e747261637420616c7265616479207369676e6564000000000000000000602082015290610100900460ff1615611a145760405162461bcd60e51b815260040161033f91906135d4565b50600f805460109290925560ff196001600160a01b039093166201000002929092167fffffffffffffffffffff0000000000000000000000000000000000000000ff00909116176001179055565b606060028054610b2290613ac1565b600f5460408051808201909152601781527f436f6e747261637420616c7265616479207369676e6564000000000000000000602082015290610100900460ff1615611acf5760405162461bcd60e51b815260040161033f91906135d4565b50600f5460408051808201909152601381527f436f6e7472616374206e6f742073616c7465640000000000000000000000000060208201529060ff16611b285760405162461bcd60e51b815260040161033f91906135d4565b50600f54601054620100009091046001600160a01b03169081336001600160a01b0316146040518060400160405280601281526020017f496e76616c6964206d73672e73656e646572000000000000000000000000000081525090611ba05760405162461bcd60e51b815260040161033f91906135d4565b508085604051602001611bb591815260200190565b60405160208183030381529060405280519060200120146040518060400160405280601581526020017f496e636f7272656374207365637265742073616c74000000000000000000000081525090611c205760405162461bcd60e51b815260040161033f91906135d4565b50816001600160a01b0316611cc1611c85836040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612bfa92505050565b6001600160a01b0316146040518060400160405280601681526020017f556e65787065637465642064617461207369676e65720000000000000000000081525090611d1f5760405162461bcd60e51b815260040161033f91906135d4565b50611d2c601185856134bc565b50600f805461ff0019166101001790556040517f955fd8871b091d05a1f766f82ece6ba4d9c55e65e065d4459b26740f2e698e7090611d72908490849088908890613b88565b60405180910390a15050505050565b60006001610b0d565b60408051808201909152601181527f417070726f766520746f2063616c6c657200000000000000000000000000000060208201526001600160a01b038316331415611de85760405162461bcd60e51b815260040161033f91906135d4565b503360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611e60848484610e01565b611e6c84848484612c1e565b6040518060400160405280601581526020017f4e6f7420616e204552433732315265636569766572000000000000000000000081525090610e745760405162461bcd60e51b815260040161033f91906135d4565b6060611ecb826123ce565b6040518060400160405280601481526020017f546f6b656e20646f6573206e6f7420657869737400000000000000000000000081525090611f1f5760405162461bcd60e51b815260040161033f91906135d4565b506000611f2a611718565b90506000815111611f4a5760405180602001604052806000815250611f75565b80611f5484612d5f565b604051602001611f65929190613bce565b6040516020818303038152906040525b9392505050565b611f84612754565b600c805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b611fbb612754565b60408051808201909152601181527f496e70757420617272617920656d707479000000000000000000000000000000602082015281908161200f5760405162461bcd60e51b815260040161033f91906135d4565b5060095460408051808201909152601881527f5472616e7366657220746f207a65726f2061646472657373000000000000000060208201526c010000000000000000000000009091046001600160a01b031690816120805760405162461bcd60e51b815260040161033f91906135d4565b5060095460408051808201909152601581527f436f6e74726163742069732066696e616c697a6564000000000000000000000060208201529060ff16156120da5760405162461bcd60e51b815260040161033f91906135d4565b506012546000806120ec836001613bfd565b905060006120fb601085613c15565b15612155576013805461211090600190613c29565b8154811061212057612120613b0c565b90600052602060002001549050601380548061213e5761213e613c40565b600190038181906000526020600020016000905590555b8583101561226557600088888581811061217157612171613b0c565b90506020020135905060008111801561218c575061ffff8111155b6121d85760405162461bcd60e51b815260206004820152601c60248201527f5265717569726573207061696e74206f66203120746f20363535333500000000604482015260640161033f565b60006121e5601087613c15565b9050801580156121f55750600083115b15612230576013805460018101825560009182527f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a09001939093555b61223b601082613b38565b82901b83179250848061224d90613c56565b955050858061225b90613c56565b9650505050612155565b601284905580156122a657601380546001810182556000919091527f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a090018190555b6001600160a01b038516600090815260056020526040812080548892906122ce908490613bfd565b9091555050600980548791906001906122fa90849061010090046affffffffffffffffffffff16613c71565b92506101000a8154816affffffffffffffffffffff02191690836affffffffffffffffffffff160217905550846001600160a01b031660006001600160a01b0316837fdeaa91b6123d068f5821d0fb0678463d1a8a6079fe8af5de3ce5e896dcf9133d60018a8761236b9190613bfd565b6123759190613c29565b60405190815260200160405180910390a45050505050505050565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610b0d5750610b0d82612e91565b60006123d982612bd3565b1561241a576000828152600a602052604090205461010090046001600160a01b0316151580610b0d5750506000908152600a602052604090205460ff161590565b506000919050565b600081815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600b80546001600160a01b038381166101008181027fffffffffffffffffffffff0000000000000000000000000000000000000000ff851617909455600c805473ffffffffffffffffffffffffffffffffffffffff1916905560405193909204169182907ff8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec690600090a35050565b600080612525836115ff565b9150816001600160a01b0316846001600160a01b0316148061256057506000838152600660205260409020546001600160a01b038581169116145b8061259057506001600160a01b0380831660009081526007602090815260408083209388168352929052205460ff165b90509250929050565b826001600160a01b0316846001600160a01b0316146040518060400160405280601d81526020017f5472616e736665722066726f6d20696e636f7272656374206f776e6572000000815250906126025760405162461bcd60e51b815260040161033f91906135d4565b5060408051808201909152601881527f5472616e7366657220746f207a65726f2061646472657373000000000000000060208201526001600160a01b03831661265e5760405162461bcd60e51b815260040161033f91906135d4565b506126698482612ecf565b6001600160a01b0383166000908152600560205260408120805460019290612692908490613c29565b90915550506001600160a01b03821660009081526005602052604081208054600192906126c0908490613bfd565b90915550506000818152600a60205260409020805460017fffffffffffffffffffffff0000000000000000000000000000000000000000009091166101006001600160a01b038616021717905580826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b600b5461010090046001600160a01b03168061284757600d546001600160a01b031663e37ce6fa336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b1580156127bb57600080fd5b505afa1580156127cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127f39190613b6b565b6040518060400160405280601281526020017f496e76616c6964206d73672e73656e64657200000000000000000000000000008152509061155e5760405162461bcd60e51b815260040161033f91906135d4565b60408051808201909152601281527f496e76616c6964206d73672e73656e64657200000000000000000000000000006020820152336001600160a01b0383161461155e5760405162461bcd60e51b815260040161033f91906135d4565b6000818152600e602052604081205460ff166128c1576000610b0d565b506000908152600e6020526040902054630100000090046001600160a01b031690565b60006128ef826115ff565b90506000336001600160a01b038316148061292057506000838152600660205260409020546001600160a01b031633145b806129305750612930823361091a565b9050806040518060400160405280601681526020017f4e6f74206f776e6572206e6f7220617070726f76656400000000000000000000815250906129875760405162461bcd60e51b815260040161033f91906135d4565b506129928284612ecf565b6001600160a01b03821660009081526005602052604081208054600192906129bb908490613c29565b909155506129fe9050836000908152600a6020526040902080547fffffffffffffffffffffff000000000000000000000000000000000000000000166001179055565b60405183906000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505050565b6040516301ffc9a760e01b81527f37de79fc0000000000000000000000000000000000000000000000000000000060048201526000906001600160a01b038716906301ffc9a79060240160206040518083038186803b158015612a9d57600080fd5b505afa158015612ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ad59190613b6b565b6040518060400160405280601e81526020017f556e636c6f6e6561626c65207265666572656e636520636f6e7472616374000081525090612b295760405162461bcd60e51b815260040161033f91906135d4565b506000612b3587612f31565b6040517f7fbbe46f0000000000000000000000000000000000000000000000000000000081529091506001600160a01b03821690637fbbe46f90612b83908990899089908990600401613c97565b600060405180830381600087803b158015612b9d57600080fd5b505af1158015612bb1573d6000803e3d6000fd5b50929998505050505050505050565b805161155e906003906020840190613438565b60008082118015610b0d57505060095461010090046affffffffffffffffffffff16101590565b6000806000612c098585612fe7565b91509150612c1681613054565b509392505050565b60006001600160a01b0384163b15612d5357604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612c62903390899088908890600401613d34565b602060405180830381600087803b158015612c7c57600080fd5b505af1925050508015612cac575060408051601f3d908101601f19168201909252612ca991810190613d70565b60015b612d39573d808015612cda576040519150601f19603f3d011682016040523d82523d6000602084013e612cdf565b606091505b508051612d3157604080518082018252601581527f4e6f7420616e20455243373231526563656976657200000000000000000000006020820152905162461bcd60e51b815261033f91906004016135d4565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612d57565b5060015b949350505050565b606081612d9f57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612dc95780612db381613c56565b9150612dc29050600a83613b57565b9150612da3565b60008167ffffffffffffffff811115612de457612de4613816565b6040519080825280601f01601f191660200182016040528015612e0e576020820181803683370190505b5090505b8415612d5757612e23600183613c29565b9150612e30600a86613c15565b612e3b906030613bfd565b60f81b818381518110612e5057612e50613b0c565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612e8a600a86613b57565b9450612e12565b60006001600160e01b031982167f43264347000000000000000000000000000000000000000000000000000000001480610b0d5750610b0d8261320f565b600081815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19169055518291906001600160a01b038516907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925908390a45050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528260601b60148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526037816000f09150506001600160a01b038116610dfc5760405162461bcd60e51b815260206004820152601660248201527f455243313136373a20637265617465206661696c656400000000000000000000604482015260640161033f565b60008082516041141561301e5760208301516040840151606085015160001a6130128782858561324d565b94509450505050610f29565b825160401415613048576020830151604084015161303d86838361333a565b935093505050610f29565b50600090506002610f29565b600081600481111561306857613068613d8d565b14156130715750565b600181600481111561308557613085613d8d565b14156130d35760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161033f565b60028160048111156130e7576130e7613d8d565b14156131355760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161033f565b600381600481111561314957613149613d8d565b14156131a25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161033f565b60048160048111156131b6576131b6613d8d565b1415610d905760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161033f565b60006001600160e01b031982167f792ccce0000000000000000000000000000000000000000000000000000000001480610b0d5750610b0d82613382565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156132845750600090506003613331565b8460ff16601b1415801561329c57508460ff16601c14155b156132ad5750600090506004613331565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613301573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661332a57600060019250925050613331565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b016133748782888561324d565b935093505050935093915050565b60006001600160e01b031982167f80ac58cd0000000000000000000000000000000000000000000000000000000014806133e557506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061341957506001600160e01b031982167f6050f48e00000000000000000000000000000000000000000000000000000000145b80610b0d57506301ffc9a760e01b6001600160e01b0319831614610b0d565b82805461344490613ac1565b90600052602060002090601f01602090048101928261346657600085556134ac565b82601f1061347f57805160ff19168380011785556134ac565b828001600101855582156134ac579182015b828111156134ac578251825591602001919060010190613491565b506134b8929150613530565b5090565b8280546134c890613ac1565b90600052602060002090601f0160209004810192826134ea57600085556134ac565b82601f106135035782800160ff198235161785556134ac565b828001600101855582156134ac579182015b828111156134ac578235825591602001919060010190613515565b5b808211156134b85760008155600101613531565b6001600160e01b031981168114610d9057600080fd5b60006020828403121561356d57600080fd5b8135611f7581613545565b60005b8381101561359357818101518382015260200161357b565b838111156135a2576000848401525b50505050565b600081518084526135c0816020860160208601613578565b601f01601f19169290920160200192915050565b602081526000611f7560208301846135a8565b6000602082840312156135f957600080fd5b5035919050565b6001600160a01b0381168114610d9057600080fd5b6000806040838503121561362857600080fd5b823561363381613600565b946020939093013593505050565b60008060006060848603121561365657600080fd5b833561366181613600565b9250602084013561367181613600565b929592945050506040919091013590565b6000806040838503121561369557600080fd5b50508035926020909101359150565b6000602082840312156136b657600080fd5b8135611f7581613600565b60008083601f8401126136d357600080fd5b50813567ffffffffffffffff8111156136eb57600080fd5b6020830191508360208260051b8501011115610f2957600080fd5b6000806000806000806080878903121561371f57600080fd5b86359550602087013561373181613600565b9450604087013567ffffffffffffffff8082111561374e57600080fd5b61375a8a838b016136c1565b9096509450606089013591508082111561377357600080fd5b5061378089828a016136c1565b979a9699509497509295939492505050565b60008083601f8401126137a457600080fd5b50813567ffffffffffffffff8111156137bc57600080fd5b602083019150836020828501011115610f2957600080fd5b600080602083850312156137e757600080fd5b823567ffffffffffffffff8111156137fe57600080fd5b61380a85828601613792565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561384757613847613816565b604051601f8501601f19908116603f0116810190828211818310171561386f5761386f613816565b8160405280935085815286868601111561388857600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126138b357600080fd5b611f758383356020850161382c565b6000806000606084860312156138d757600080fd5b833567ffffffffffffffff808211156138ef57600080fd5b6138fb878388016138a2565b9450602086013591508082111561391157600080fd5b61391d878388016138a2565b9350604086013591508082111561393357600080fd5b50613940868287016138a2565b9150509250925092565b60008060006040848603121561395f57600080fd5b83359250602084013567ffffffffffffffff81111561397d57600080fd5b61398986828701613792565b9497909650939450505050565b8015158114610d9057600080fd5b600080604083850312156139b757600080fd5b82356139c281613600565b915060208301356139d281613996565b809150509250929050565b600080600080608085870312156139f357600080fd5b84356139fe81613600565b93506020850135613a0e81613600565b925060408501359150606085013567ffffffffffffffff811115613a3157600080fd5b8501601f81018713613a4257600080fd5b613a518782356020840161382c565b91505092959194509250565b60008060408385031215613a7057600080fd5b8235613a7b81613600565b915060208301356139d281613600565b60008060208385031215613a9e57600080fd5b823567ffffffffffffffff811115613ab557600080fd5b61380a858286016136c1565b600181811c90821680613ad557607f821691505b6020821081141561171257634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613b5257613b52613b22565b500290565b600082613b6657613b66613af6565b500490565b600060208284031215613b7d57600080fd5b8151611f7581613996565b6001600160a01b038516815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f909201601f191601019392505050565b60008351613be0818460208801613578565b835190830190613bf4818360208801613578565b01949350505050565b60008219821115613c1057613c10613b22565b500190565b600082613c2457613c24613af6565b500690565b600082821015613c3b57613c3b613b22565b500390565b634e487b7160e01b600052603160045260246000fd5b6000600019821415613c6a57613c6a613b22565b5060010190565b60006affffffffffffffffffffff808316818516808303821115613bf457613bf4613b22565b6040808252810184905260008560608301825b87811015613cda578235613cbd81613600565b6001600160a01b0316825260209283019290910190600101613caa565b5083810360208501528481527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff851115613d1357600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613d6660808301846135a8565b9695505050505050565b600060208284031215613d8257600080fd5b8151611f7581613545565b634e487b7160e01b600052602160045260246000fdfea26469706673582212201e30706e04ca5524b1d8b0769b25e03bc4fac7180ac06b016fbdaf8fb919308f64736f6c63430008090033

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

0000000000000000000000006e53130ddff21e3bc963ee902005223b9a202106000000000000000000000000e052113bd7d7700d623414a0a4585bcae754e9d5

-----Decoded View---------------
Arg [0] : niftyRegistryContract (address): 0x6e53130dDfF21E3BC963Ee902005223b9A202106
Arg [1] : defaultOwner (address): 0xE052113bd7D7700d623414a0a4585BCaE754E9d5

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000006e53130ddff21e3bc963ee902005223b9a202106
Arg [1] : 000000000000000000000000e052113bd7d7700d623414a0a4585bcae754e9d5


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.