ETH Price: $2,464.78 (+0.82%)

Token

SIM Dogs (RAIR)
 

Overview

Max Total Supply

0 RAIR

Holders

5

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 RAIR
0x2cb0edeef1c44c78f11f04ec6eabf266d2946302
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
RAIR721_Contract

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 15 : RAIR721_Contract.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.17;

import "openzeppelin-v4.7.1/token/ERC721/ERC721.sol";
import "openzeppelin-v4.7.1/access/AccessControl.sol";
import "openzeppelin-v4.7.1/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "openzeppelin-v4.7.1/utils/Strings.sol";
import "./IERC2981.sol";
import "./IRAIR721_Contract.sol";

/// @title  Extended ERC721 contract for the RAIR system
/// @notice Uses ERC2981 and ERC165 for standard royalty info
/// @notice Uses AccessControl for the minting mechanisms
/// @author Juan M. Sanchez M.
/// @dev    Ideally generated by a RAIR Token Factory
contract RAIR721_Contract is
    IERC2981,
    ERC165,
    IRAIR721_Contract,
    ERC721,
    AccessControl,
    ReentrancyGuard
{
    // Allows the conversion of numbers to strings (used in the token URI functions)
    using Strings for uint;

    // Auxiliary struct used to avoid Stack too deep errors
    struct rangeData {
        uint rangeLength;
        uint price;
        uint tokensAllowed;
        uint lockedTokens;
        string name;
    }

    mapping(uint => uint) public tokenToRange;
    mapping(uint => uint) public rangeToCollection;

    //URIs
    mapping(uint => string) internal uniqueTokenURI;
    mapping(uint => string) internal collectionURI;
    mapping(uint => string) internal rangeURI;
    mapping(uint => bool) internal appendTokenIndexToCollectionURI;
    mapping(uint => bool) internal appendTokenIndexToRangeURI;

    string internal baseURI;
    string internal contractMetadataURI;

    bool appendTokenIndexToContractURI;
    bool _requireTrader;

    range[] private _ranges;
    collection[] private _collections;

    // Roles
    bytes32 public constant MINTER = keccak256("MINTER");
    bytes32 public constant TRADER = keccak256("TRADER");

    address public owner;
    address public factory;
    string private _symbol;
    uint16 private _royaltyFee;
    string private _metadataExtension;

    /// @notice	Makes sure the collection exists before doing changes to it
    /// @param	collectionID	Collection to verify
    modifier collectionExists(uint collectionID) {
        require(
            _collections.length > collectionID,
            "RAIR ERC721: Collection does not exist"
        );
        _;
    }

    /// @notice	Makes sure the range exists
    /// @param	rangeIndex	Range to verify
    modifier rangeExists(uint rangeIndex) {
        require(
            _ranges.length > rangeIndex,
            "RAIR ERC721: Range does not exist"
        );
        _;
    }

    /// @notice	Sets up the role system from AccessControl
    /// @dev	RAIR is the default symbol for the token, this can be updated with setTokenSymbol
    /// @param	_contractName	Name of the contract
    /// @param	_creatorAddress	Address of the creator of the contract
    constructor(string memory _contractName, address _creatorAddress)
        ERC721(_contractName, "RAIR")
    {
        factory = msg.sender;
        _symbol = "RAIR";
        _royaltyFee = 30000;
        _setupRole(DEFAULT_ADMIN_ROLE, _creatorAddress);
        _setupRole(MINTER, _creatorAddress);
        _setupRole(TRADER, _creatorAddress);
        _requireTrader = false;
        owner = _creatorAddress;
    }

    /// @notice  Updates the metadata extension added at the end of all tokens
    /// @dev     Must include the . before the extension
    /// @param extension     Extension to be added at the end of all contract wide tokens
    function setMetadataExtension(string calldata extension) external onlyRole(DEFAULT_ADMIN_ROLE) {
        require(bytes(extension)[0] == '.', "RAIR ERC721: Extension must start with a '.'");
        _metadataExtension = extension;
        emit UpdatedURIExtension(_metadataExtension);
    }

    /// @notice 	Transfers the ownership of a contract to a new address
    /// @param 	newOwner 	Address of the new owner of the contract
    function transferOwnership(address newOwner)
        public
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        _grantRole(DEFAULT_ADMIN_ROLE, newOwner);
        owner = newOwner;
        renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);
    }

    /// @notice 	Updates the royalty fee used by the 2981 standard
    /// @param 	newRoyalty 	Percentage that should be sent to the owner of the contract (3 decimals, 30% = 30000)
    function setRoyaltyFee(uint16 newRoyalty)
        public
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        _royaltyFee = newRoyalty;
    }

    /// @notice 	Updates the token symbol
    /// @param 	newSymbol 	New symbol to be returned from the symbol() function
    function setTokenSymbol(string calldata newSymbol)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        _symbol = newSymbol;
    }

    /// @notice 	Returns the symbol for this contract
    /// @dev 	By default, the symbol is RAIR
    function symbol() public view override returns (string memory) {
        return _symbol;
    }

    /// @notice 	Enables or disables the requirement of the TRADER role to do NFT transfers
    function requireTraderRole(bool required) public onlyRole(DEFAULT_ADMIN_ROLE) {
        _requireTrader = required;
    }

    /// @notice 	Emits an event that OpenSea recognizes as a signal to never update the metadata for this token
    /// @dev 	The metadata can still be updated, but OpenSea won't update it on their platform
    /// @param 	tokenId 	Identifier of the token to be frozen
    function freezeMetadataOpensea(uint tokenId) public onlyRole(DEFAULT_ADMIN_ROLE) {
        emit PermanentURI(tokenURI(tokenId), tokenId);
    }

    /// @notice 	Updates the URL that OpenSea uses to fetch the contract's metadata
    /// @param 	newURI 	URL of the metadata for the token
    function setContractURI(string calldata newURI)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        contractMetadataURI = newURI;
        emit UpdatedContractURI(newURI);
    }

    /// @notice 	Returns the metadata for the entire contract
    /// @dev 	Not the NFTs, this is information about the contract itself
    function contractURI() public view returns (string memory) {
        return contractMetadataURI;
    }

    /// @notice	Sets the Base URI for ALL tokens
    /// @dev	Can be overriden by the collection-wide URI or the specific token URI
    /// @param	newURI	URI to be used
    function setBaseURI(string calldata newURI, bool appendTokenIndex)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        baseURI = newURI;
        appendTokenIndexToContractURI = appendTokenIndex;
        emit UpdatedBaseURI(newURI, appendTokenIndex, _metadataExtension);
    }

    /// @notice	Overridden function from the ERC721 contract that returns our
    ///			variable base URI instead of the hardcoded URI
    function _baseURI() internal view override(ERC721) returns (string memory) {
        return baseURI;
    }

    /// @notice	Updates the unique URI of a token, but in a single transaction
    /// @dev	Uses the single function so it also emits an event
    /// @param	tokenIds	Token Indexes that will be given an URI
    /// @param	newURIs		New URIs to be set
    function setUniqueURIBatch(
        uint[] calldata tokenIds,
        string[] calldata newURIs
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        require(
            tokenIds.length == newURIs.length,
            "RAIR ERC721: Token IDs and URIs should have the same length"
        );
        for (uint i = 0; i < tokenIds.length; i++) {
            setUniqueURI(tokenIds[i], newURIs[i]);
        }
    }

    /// @notice	Gives an individual token an unique URI
    /// @dev	Emits an event so there's provenance
    /// @param	tokenId	Token Index that will be given an URI
    /// @param	newURI	New URI to be given
    function setUniqueURI(uint tokenId, string calldata newURI)
        public
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        uniqueTokenURI[tokenId] = newURI;
        emit UpdatedTokenURI(tokenId, newURI);
    }

    /// @notice	Gives all tokens within a range a specific URI
    /// @dev	Emits an event so there's provenance
    /// @param	rangeId	Token Index that will be given an URI
    /// @param	newURI		    New URI to be given
    function setRangeURI(
        uint rangeId,
        string calldata newURI,
        bool appendTokenIndex
    ) public onlyRole(DEFAULT_ADMIN_ROLE) {
        rangeURI[rangeId] = newURI;
        appendTokenIndexToRangeURI[rangeId] = appendTokenIndex;
        emit UpdatedRangeURI(rangeId, newURI, appendTokenIndex, _metadataExtension);
    }

    /// @notice	Gives all tokens within a collection a specific URI
    /// @dev	Emits an event so there's provenance
    /// @param	collectionId	Token Index that will be given an URI
    /// @param	newURI		New URI to be given
    function setCollectionURI(
        uint collectionId,
        string calldata newURI,
        bool appendTokenIndex
    ) public onlyRole(DEFAULT_ADMIN_ROLE) {
        collectionURI[collectionId] = newURI;
        appendTokenIndexToCollectionURI[collectionId] = appendTokenIndex;
        emit UpdatedProductURI(collectionId, newURI, appendTokenIndex, _metadataExtension);
    }

	function tokenToCollection(uint tokenId) internal view returns (uint) {
		return rangeToCollection[tokenToRange[tokenId]];
	}

    /// @notice	Returns a token's URI
    /// @dev	Will return unique token URI or product URI or contract URI
    /// @param	tokenId		Token Index to look for
    function tokenURI(uint tokenId)
        public
        view
        override(ERC721)
        returns (string memory)
    {
        // Unique token URI
        string memory URI = uniqueTokenURI[tokenId];
        if (bytes(URI).length > 0) {
            return URI;
        }

        // Range wide URI
        URI = rangeURI[tokenToRange[tokenId]];
        if (bytes(URI).length > 0) {
            if (appendTokenIndexToRangeURI[tokenToRange[tokenId]]) {
                return
                    string(
                        abi.encodePacked(
                            URI,
                            tokenToCollectionIndex(tokenId).toString(),
                            _metadataExtension
                        )
                    );
            }
            return URI;
        }

        // Collection wide URI
        URI = collectionURI[tokenToCollection(tokenId)];
        if (bytes(URI).length > 0) {
            if (appendTokenIndexToCollectionURI[tokenToCollection(tokenId)]) {
                return
                    string(
                        abi.encodePacked(
                            URI,
                            tokenToCollectionIndex(tokenId).toString(),
                            _metadataExtension
                        )
                    );
            }
            return URI;
        }

        URI = baseURI;
        if (appendTokenIndexToContractURI) {
            return
                string(
                    abi.encodePacked(
                        URI,
                        tokenId.toString(),
                        _metadataExtension
                    )
                );
        }
        return URI;
    }

    /// @notice	Creates a subdivision of tokens inside the contract (collection is the same as product)
    /// @dev	The collections are generated sequentially, there can be no gaps between collections
    /// @param	_collectionName 	Name of the collection
    /// @param	_copies				Amount of tokens inside the collection
    function createProduct(string memory _collectionName, uint _copies)
        public
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        uint lastTokenFromPreviousCollection;
        if (_collections.length != 0) {
            lastTokenFromPreviousCollection =
                _collections[_collections.length - 1].endingToken +
                1;
        }

        collection storage newCollection = _collections.push();

        newCollection.startingToken = lastTokenFromPreviousCollection;
        // -1 because we include the initial token
        newCollection.endingToken = newCollection.startingToken + _copies - 1;
        newCollection.name = string(_collectionName);

        emit CreatedCollection(
            _collections.length - 1,
            _collectionName,
            lastTokenFromPreviousCollection,
            _copies
        );
    }

    /// @notice This function will create ranges in batches
    /// @dev 	There isn't any gas savings here
    /// @param	collectionId	Contains the identification for the product
    /// @param	data 			An array with the data for all the ranges that we want to implement
    function createRangeBatch(uint collectionId, rangeData[] calldata data)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
        collectionExists(collectionId)
    {
        require(data.length > 0, "RAIR ERC721: Empty array");
        collection storage selectedCollection = _collections[collectionId];
        for (uint i = 0; i < data.length; i++) {
            _createRange(
                collectionId,
                data[i].rangeLength,
                data[i].tokensAllowed,
                data[i].lockedTokens,
                data[i].price,
                data[i].name,
                selectedCollection
            );
        }
    }

    /// @notice Creates a range inside a collection
    /// @dev 	This function is only available to an account with the `DEFAULT_ADMIN_ROLE` role
    /// @dev 	This function require thar the collection ID match a valid collection
    /// @param	collectionId	Contains the identification for the product
    /// @param	rangeLength		Number of tokens to be contained in this new range
    /// @param 	price 			Contains the selling price for the range of NFT
    /// @param 	tokensAllowed 	Contains all the allowed NFT tokens in the range that are available for sell
    /// @param 	lockedTokens 	Contains all the NFT tokens in the range that are unavailable for sell
    /// @param 	name 			Contains the name for the created NFT collection range
    function createRange(
        uint collectionId,
        uint rangeLength,
        uint price,
        uint tokensAllowed,
        uint lockedTokens,
        string calldata name
    ) external onlyRole(DEFAULT_ADMIN_ROLE) collectionExists(collectionId) {
        collection storage selectedCollection = _collections[collectionId];
        _createRange(
            collectionId,
            rangeLength,
            price,
            tokensAllowed,
            lockedTokens,
            name,
            selectedCollection
        );
    }

    /// @notice This is a internal function that will create the NFT range if the requirements are met
    /// @param	collectionIndex		Collection identifier
    /// @param	_rangeLength		Number of NFTs in the range
    /// @param 	_allowedTokens 		Contains all the allowed NFT tokens in the range that are available for sell
    /// @param 	_lockedTokens 		Contains all the NFT tokens in the range that are unavailable for sell
    /// @param 	_price 				Contains the selling price for the range of NFT
    /// @param 	_name 				Contains the name for the created NFT collection range
    function _createRange(
        uint collectionIndex,
        uint _rangeLength,
        uint _allowedTokens,
        uint _lockedTokens,
        uint _price,
        string calldata _name,
        collection storage selectedCollection
    ) internal {
        uint nextSequentialToken = selectedCollection.startingToken;
        if (selectedCollection.rangeList.length > 0) {
            nextSequentialToken = (
                _ranges[
                    selectedCollection.rangeList[
                        selectedCollection.rangeList.length - 1
                    ]
                ]
            ).rangeEnd;
            nextSequentialToken++;
        }

        // -1 because it includes the first token inside the range
        require(
            nextSequentialToken + _rangeLength - 1 <=
                selectedCollection.endingToken,
            "RAIR ERC721: Invalid range length"
        );
        require(
            _allowedTokens <= _rangeLength,
            "RAIR ERC721: Number of allowed tokens must be less or equal than the range's length"
        );
        require(
            _lockedTokens <= _rangeLength,
            "RAIR ERC721: Number of locked tokens must be less or equal than the range's length"
        );
        require(_price == 0 || _price >= 100, "RAIR ERC721: Minimum price for a range is 100");

        range storage newRange = _ranges.push();

        newRange.rangeStart = nextSequentialToken;
        newRange.rangeEnd = nextSequentialToken + _rangeLength - 1;
        newRange.mintableTokens = _rangeLength;
        newRange.tokensAllowed = _allowedTokens;
        newRange.lockedTokens = _lockedTokens;
        newRange.rangePrice = _price;
        newRange.rangeName = _name;

        rangeToCollection[_ranges.length - 1] = collectionIndex;

        // No need to initialize minted tokens, the default value is 0

        selectedCollection.rangeList.push(_ranges.length - 1);

        emit CreatedRange(
            collectionIndex,
            newRange.rangeStart,
            newRange.rangeEnd,
            newRange.rangePrice,
            newRange.tokensAllowed,
            newRange.lockedTokens,
            newRange.rangeName,
            _ranges.length - 1
        );
    }

    /// @notice	Updates a range
    /// @dev 	Because they are sequential, the length of the range can't be modified
    /// @param	rangeId 			Index of the collection on the contract
    /// @param	name 				Name of the range
    /// @param	price_ 				Price for the tokens in the range
    /// @param	tokensAllowed_ 		Number of tokens allowed to be sold
    /// @param	lockedTokens_ 		Number of tokens that have to be minted in order to unlock transfers
    function updateRange(
        uint rangeId,
        string memory name,
        uint price_,
        uint tokensAllowed_,
        uint lockedTokens_
    ) external onlyRole(DEFAULT_ADMIN_ROLE) rangeExists(rangeId) nonReentrant {
        range storage selectedRange = _ranges[rangeId];
        require(price_ == 0 || price_ >= 100, "RAIR ERC721: Range price must be greater or equal than 100");
        require(
            tokensAllowed_ <= selectedRange.mintableTokens,
            "RAIR ERC721: Tokens allowed should be less than the number of mintable tokens"
        );
        require(
            lockedTokens_ <= selectedRange.mintableTokens,
            "RAIR ERC721: Locked tokens should be less than the number of mintable tokens"
        );

        selectedRange.tokensAllowed = tokensAllowed_;
        if (lockedTokens_ > 0 && selectedRange.lockedTokens == 0) {
            emit TradingLocked(
                rangeId,
                selectedRange.rangeStart,
                selectedRange.rangeEnd,
                lockedTokens_
            );
        } else if (lockedTokens_ == 0 && selectedRange.lockedTokens > 0) {
            emit TradingUnlocked(
                rangeId,
                selectedRange.rangeStart,
                selectedRange.rangeEnd
            );
        }
        selectedRange.lockedTokens = lockedTokens_;
        selectedRange.rangePrice = price_;
        selectedRange.rangeName = name;

        emit UpdatedRange(rangeId, name, price_, tokensAllowed_, lockedTokens_);
    }

    /// @notice	Returns the number of collections on the contract
    /// @dev	Use with get collection to list all of the collections
    function getCollectionCount()
        external
        view
        override(IRAIR721_Contract)
        returns (uint)
    {
        return _collections.length;
    }

    /// @notice	Returns information about a collection
    /// @param	collectionIndex	Index of the collection
    function getCollection(uint collectionIndex)
        external
        view
        override(IRAIR721_Contract)
        returns (collection memory)
    {
        return _collections[collectionIndex];
    }

    /// @notice	Translates the unique index of an NFT to it's collection index
    /// @param	token	Token ID to find
    function tokenToCollectionIndex(uint token)
        public
        view
        returns (uint tokenIndex)
    {
        return token - _collections[tokenToCollection(token)].startingToken;
    }

    /// @notice	Finds the first token inside a collection that doesn't have an owner
    /// @param	collectionID	Index of the collection to search
    /// @param	startingIndex	Starting token for the search
    /// @param	endingIndex		Ending token for the search
    function getNextSequentialIndex(
        uint collectionID,
        uint startingIndex,
        uint endingIndex
    ) public view collectionExists(collectionID) returns (uint nextIndex) {
        collection memory currentCollection = _collections[collectionID];
        return
            _getNextSequentialIndexInRange(
                currentCollection.startingToken + startingIndex,
                currentCollection.startingToken + endingIndex
            );
    }

    /// @notice		Loops through a range of tokens and returns the first token without an owner
    /// @dev 		Loops are expensive in solidity, do not use this in a gas-consuming function
    /// @param 		startingToken 	Starting token for the search
    /// @param 		endingToken 	Ending token for the search
    function _getNextSequentialIndexInRange(
        uint startingToken,
        uint endingToken
    ) internal view returns (uint nextIndex) {
        for (nextIndex = startingToken; nextIndex <= endingToken; nextIndex++) {
            if (!_exists(nextIndex)) {
                break;
            }
        }
        require(
            startingToken <= nextIndex && nextIndex <= endingToken,
            "RAIR ERC721: There are no available tokens in this range."
        );
    }

    /// @notice This functions allow us to check the information of the range
    /// @dev 	This function requires that the rangeIndex_ points to an existing range
    /// @param	rangeIndex		Identification of the range to verify
    /// @return data 			Information about the range
    /// @return productIndex 	Contains the index of the product in the range
    function rangeInfo(uint rangeIndex)
        external
        view
        override(IRAIR721_Contract)
        rangeExists(rangeIndex)
        returns (range memory data, uint productIndex)
    {
        data = _ranges[rangeIndex];
        productIndex = rangeToCollection[rangeIndex];
    }

    /// @notice	Verifies if the range where a token is located is locked or not
    /// @param	_tokenId	Index of the token to search
    function isTokenLocked(uint256 _tokenId) public view returns (bool) {
        return _ranges[tokenToRange[_tokenId]].lockedTokens > 0;
    }

	function mintFromRange(
		address buyerAddress,
        uint rangeIndex,
        uint indexInCollection
	) 
        external
		override(IRAIR721_Contract)
        onlyRole(MINTER)
        rangeExists(rangeIndex)
	{
		_mintFromRange(
			buyerAddress,
			rangeIndex,
			indexInCollection,
			1
		);
	}

    /// @notice	Loops over the user's tokens looking for one that belongs to a product and a specific range
	/// @dev	Loops are expensive in solidity, so don't use this in a function that requires gas
	/// @param	userAddress			User to search
	/// @param	collectionIndex		Product to search
	/// @param	startingToken		Product to search
	/// @param	endingToken			Product to search
	function hasTokenInProduct(
        address userAddress,
        uint collectionIndex,
        uint startingToken,
        uint endingToken
    )
        collectionExists(collectionIndex)
        public
        view
        returns (bool)
    {
		collection memory aux = _collections[collectionIndex];
        require(
            aux.endingToken - aux.startingToken + 1 > startingToken &&
            aux.endingToken - aux.startingToken + 1 > endingToken, 
            "RAIR ERC721: Invalid parameters"
        );
		if (aux.endingToken != 0) {
            uint end = aux.startingToken + endingToken;
			for (uint i = aux.startingToken + startingToken; i < end; i++) {
				if (_exists(i) && ownerOf(i) == userAddress) {
                    return true;
                }
			}
		}
		return false;
	}

    /// @notice	Mints a specific token within a range
    /// @dev	Has to be used alongside getNextSequentialIndex to simulate a sequential minting
    /// @dev	Anyone that wants a specific token just has to call this function with the index they want
    /// @param	buyerAddress		Address of the new token's owner
    /// @param	rangeIndex			Index of the range
    /// @param	indexInCollection	Index of the token inside the collection
    function _mintFromRange(
        address buyerAddress,
        uint rangeIndex,
        uint indexInCollection,
		uint tokenQuantity
    )
        internal
    {
        range storage selectedRange = _ranges[rangeIndex];
        collection storage selectedCollection = _collections[
            rangeToCollection[rangeIndex]
        ];

        require(
            selectedRange.tokensAllowed >= tokenQuantity,
            "RAIR ERC721: Not allowed to mint that many tokens"
        );
        require(
            selectedRange.rangeStart <=
                selectedCollection.startingToken + indexInCollection &&
                selectedCollection.startingToken + indexInCollection + tokenQuantity - 1 <=
                selectedRange.rangeEnd,
            "RAIR ERC721: Tried to mint token outside of range"
        );

        selectedRange.tokensAllowed -= tokenQuantity;

        if (selectedRange.lockedTokens > 0) {
			if (selectedRange.lockedTokens <= tokenQuantity) {
	            selectedRange.lockedTokens = 0;
			} else {
	            selectedRange.lockedTokens -= tokenQuantity;
			}
            if (selectedRange.lockedTokens == 0) {
                emit TradingUnlocked(
                    rangeIndex,
                    selectedRange.rangeStart,
                    selectedRange.rangeEnd
                );
            }
        }

		for (; tokenQuantity > 0; tokenQuantity--) {
			_safeMint(
				buyerAddress,
				selectedCollection.startingToken + indexInCollection + tokenQuantity - 1
			);
			tokenToRange[
				selectedCollection.startingToken + indexInCollection + tokenQuantity - 1
			] = rangeIndex;
		}
    }

    /// @notice Returns the fee for the NFT sale
    /// @param _tokenId - the NFT asset queried for royalty information
    /// @param _salePrice - the sale price of the NFT asset specified by _tokenId
    /// @return receiver - address of who should be sent the royalty payment
    /// @return royaltyAmount - the royalty payment amount for _salePrice sale price
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
        external
        view
        override(IRAIR721_Contract, IERC2981)
        returns (address receiver, uint256 royaltyAmount)
    {
        require(
            _exists(_tokenId),
            "RAIR ERC721: Royalty query for a non-existing token"
        );
        return (owner, (_salePrice * _royaltyFee) / 100000);
    }

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

    /// @notice Hook being called before every transfer
    /// @dev	Locks and the requirement of the TRADER role happe here
    /// @param	_from		Token's original owner
    /// @param	_to			Token's new owner
    /// @param	_tokenId	Token's ID
    function _beforeTokenTransfer(
        address _from,
        address _to,
        uint256 _tokenId
    ) internal virtual override(ERC721) nonReentrant{
        // If the transfer isn't to mint (from = address(0)) and it's not a burn (to = address(0))
        if (_from != address(0) && _to != address(0)) {
            //
            if (
                _ranges.length > 0 &&
                rangeToCollection[tokenToRange[_tokenId]] ==
                tokenToCollection(_tokenId)
            ) {
                require(
                    _ranges[tokenToRange[_tokenId]].lockedTokens == 0,
                    "RAIR ERC721: Transfers for this range are currently locked"
                );
            }
            if (_requireTrader) {
                _checkRole(TRADER, msg.sender);
            }
        }
        super._beforeTokenTransfer(_from, _to, _tokenId);
    }
}

File 2 of 15 : IERC2981.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.10; 

interface IERC2981 {
    /// ERC165 bytes to add to interface array - set in parent contract
    /// implementing this standard
    ///
    /// bytes4(keccak256("royaltyInfo(uint256,uint256,bytes)")) == 0xc155531d
    /// bytes4 private constant _INTERFACE_ID_ERC2981 = 0xc155531d;
    /// _registerInterface(_INTERFACE_ID_ERC2981);

    /// @notice Called with the sale price to determine how much royalty
    //          is owed and to whom.
    /// @param _tokenId - the NFT asset queried for royalty information
    /// @param _salePrice - the sale price of the NFT asset specified by _tokenId
    /// @return receiver - address of who should be sent the royalty payment
    /// @return royaltyAmount - the royalty payment amount for _value sale price
    function royaltyInfo(
    	uint256 _tokenId,
    	uint256 _salePrice)
    external returns (
    	address receiver,
    	uint256 royaltyAmount);

    /// @notice Informs callers that this contract supports ERC2981
    /// @dev If `_registerInterface(_INTERFACE_ID_ERC2981)` is called
    ///      in the initializer, this should be automatic
    /// @param interfaceID The interface identifier, as specified in ERC-165
    /// @return `true` if the contract implements
    ///         `_INTERFACE_ID_ERC2981` and `false` otherwise
    function supportsInterface(bytes4 interfaceID) external view returns (bool);
}

File 3 of 15 : IRAIR721_Contract.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.17;

import "openzeppelin-v4.7.1/token/ERC721/IERC721.sol";

interface IRAIR721_Contract is IERC721 {
    struct range {
        uint rangeStart;
        uint rangeEnd;
        uint tokensAllowed;
        uint mintableTokens;
        uint lockedTokens;
        uint rangePrice;
        string rangeName;
    }

    struct collection {
        uint startingToken;
        uint endingToken;
        string name;
        uint[] rangeList;
    }

    event CreatedCollection(
        uint indexed collectionIndex,
        string collectionName,
        uint startingToken,
        uint collectionLength
    );

    event CreatedRange(
        uint collectionIndex,
        uint start,
        uint end,
        uint price,
        uint tokensAllowed,
        uint lockedTokens,
        string name,
        uint rangeIndex
    );
    event UpdatedRange(
        uint rangeIndex,
        string name,
        uint price,
        uint tokensAllowed,
        uint lockedTokens
    );
    event TradingLocked(
        uint indexed rangeIndex,
        uint from,
        uint to,
        uint lockedTokens
    );
    event TradingUnlocked(uint indexed rangeIndex, uint from, uint to);

    event UpdatedBaseURI(string newURI, bool appendTokenIndex, string _metadataExtension);
    event UpdatedTokenURI(uint tokenId, string newURI);
    event UpdatedProductURI(
        uint productId,
        string newURI,
        bool appendTokenIndex,
        string _metadataExtension
    );
    event UpdatedRangeURI(
        uint rangeId,
        string newURI,
        bool appendTokenIndex,
        string _metadataExtension
    );
    event UpdatedURIExtension(string newExtension);
    event UpdatedContractURI(string newURI);

    // For OpenSea's Freezing
    event PermanentURI(string _value, uint256 indexed _id);

    // Get the total number of collections in the contract
    function getCollectionCount() external view returns (uint);

    // Get a specific collection in the contract
    function getCollection(uint collectionIndex)
        external
        view
        returns (collection memory);

    function rangeInfo(uint rangeIndex)
        external
        view
        returns (range memory data, uint collectionIndex);

    // Mint a token inside a collection
    function mintFromRange(
        address to,
        uint collectionID,
        uint index
    ) external;

    // Ask for the royalty info of the creator
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 4 of 15 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 5 of 15 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
    }

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

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

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

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

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

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

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

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

        _afterTokenTransfer(address(0), to, tokenId);
    }

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

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

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

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

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

        _afterTokenTransfer(owner, address(0), tokenId);
    }

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

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

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

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 6 of 15 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 7 of 15 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 8 of 15 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: 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 Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

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

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

File 10 of 15 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

pragma solidity ^0.8.0;

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

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

File 12 of 15 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 14 of 15 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 15 of 15 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_contractName","type":"string"},{"internalType":"address","name":"_creatorAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"collectionIndex","type":"uint256"},{"indexed":false,"internalType":"string","name":"collectionName","type":"string"},{"indexed":false,"internalType":"uint256","name":"startingToken","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"collectionLength","type":"uint256"}],"name":"CreatedCollection","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"collectionIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"start","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"end","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokensAllowed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockedTokens","type":"uint256"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"uint256","name":"rangeIndex","type":"uint256"}],"name":"CreatedRange","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_value","type":"string"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"PermanentURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"rangeIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"from","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"to","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockedTokens","type":"uint256"}],"name":"TradingLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"rangeIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"from","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"to","type":"uint256"}],"name":"TradingUnlocked","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newURI","type":"string"},{"indexed":false,"internalType":"bool","name":"appendTokenIndex","type":"bool"},{"indexed":false,"internalType":"string","name":"_metadataExtension","type":"string"}],"name":"UpdatedBaseURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newURI","type":"string"}],"name":"UpdatedContractURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"productId","type":"uint256"},{"indexed":false,"internalType":"string","name":"newURI","type":"string"},{"indexed":false,"internalType":"bool","name":"appendTokenIndex","type":"bool"},{"indexed":false,"internalType":"string","name":"_metadataExtension","type":"string"}],"name":"UpdatedProductURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rangeIndex","type":"uint256"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokensAllowed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockedTokens","type":"uint256"}],"name":"UpdatedRange","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rangeId","type":"uint256"},{"indexed":false,"internalType":"string","name":"newURI","type":"string"},{"indexed":false,"internalType":"bool","name":"appendTokenIndex","type":"bool"},{"indexed":false,"internalType":"string","name":"_metadataExtension","type":"string"}],"name":"UpdatedRangeURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"newURI","type":"string"}],"name":"UpdatedTokenURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newExtension","type":"string"}],"name":"UpdatedURIExtension","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRADER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_collectionName","type":"string"},{"internalType":"uint256","name":"_copies","type":"uint256"}],"name":"createProduct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"uint256","name":"rangeLength","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokensAllowed","type":"uint256"},{"internalType":"uint256","name":"lockedTokens","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"name":"createRange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"},{"components":[{"internalType":"uint256","name":"rangeLength","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"tokensAllowed","type":"uint256"},{"internalType":"uint256","name":"lockedTokens","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"internalType":"struct RAIR721_Contract.rangeData[]","name":"data","type":"tuple[]"}],"name":"createRangeBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"freezeMetadataOpensea","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":[{"internalType":"uint256","name":"collectionIndex","type":"uint256"}],"name":"getCollection","outputs":[{"components":[{"internalType":"uint256","name":"startingToken","type":"uint256"},{"internalType":"uint256","name":"endingToken","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256[]","name":"rangeList","type":"uint256[]"}],"internalType":"struct IRAIR721_Contract.collection","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCollectionCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionID","type":"uint256"},{"internalType":"uint256","name":"startingIndex","type":"uint256"},{"internalType":"uint256","name":"endingIndex","type":"uint256"}],"name":"getNextSequentialIndex","outputs":[{"internalType":"uint256","name":"nextIndex","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"uint256","name":"collectionIndex","type":"uint256"},{"internalType":"uint256","name":"startingToken","type":"uint256"},{"internalType":"uint256","name":"endingToken","type":"uint256"}],"name":"hasTokenInProduct","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isTokenLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"buyerAddress","type":"address"},{"internalType":"uint256","name":"rangeIndex","type":"uint256"},{"internalType":"uint256","name":"indexInCollection","type":"uint256"}],"name":"mintFromRange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rangeIndex","type":"uint256"}],"name":"rangeInfo","outputs":[{"components":[{"internalType":"uint256","name":"rangeStart","type":"uint256"},{"internalType":"uint256","name":"rangeEnd","type":"uint256"},{"internalType":"uint256","name":"tokensAllowed","type":"uint256"},{"internalType":"uint256","name":"mintableTokens","type":"uint256"},{"internalType":"uint256","name":"lockedTokens","type":"uint256"},{"internalType":"uint256","name":"rangePrice","type":"uint256"},{"internalType":"string","name":"rangeName","type":"string"}],"internalType":"struct IRAIR721_Contract.range","name":"data","type":"tuple"},{"internalType":"uint256","name":"productIndex","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rangeToCollection","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"required","type":"bool"}],"name":"requireTraderRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","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":"newURI","type":"string"},{"internalType":"bool","name":"appendTokenIndex","type":"bool"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"collectionId","type":"uint256"},{"internalType":"string","name":"newURI","type":"string"},{"internalType":"bool","name":"appendTokenIndex","type":"bool"}],"name":"setCollectionURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"extension","type":"string"}],"name":"setMetadataExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rangeId","type":"uint256"},{"internalType":"string","name":"newURI","type":"string"},{"internalType":"bool","name":"appendTokenIndex","type":"bool"}],"name":"setRangeURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"newRoyalty","type":"uint16"}],"name":"setRoyaltyFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newSymbol","type":"string"}],"name":"setTokenSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"newURI","type":"string"}],"name":"setUniqueURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"newURIs","type":"string[]"}],"name":"setUniqueURIBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"token","type":"uint256"}],"name":"tokenToCollectionIndex","outputs":[{"internalType":"uint256","name":"tokenIndex","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenToRange","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rangeId","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"price_","type":"uint256"},{"internalType":"uint256","name":"tokensAllowed_","type":"uint256"},{"internalType":"uint256","name":"lockedTokens_","type":"uint256"}],"name":"updateRange","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162004c2d38038062004c2d833981016040819052620000349162000240565b6040805180820190915260048152632920a4a960e11b6020820152829060006200005f8382620003b7565b5060016200006e8282620003b7565b5050600160075550601580546001600160a01b031916331790556040805180820190915260048152632920a4a960e11b6020820152601690620000b29082620003b7565b506017805461ffff1916617530179055620000cf60008262000159565b620000fb7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc98262000159565b620001277f872340a532bdd7bb02bea115c1b0f1ba87eac982f5b79b51ac189ffaac1b6fce8262000159565b6011805461ff0019169055601480546001600160a01b0319166001600160a01b03929092169190911790555062000483565b62000165828262000169565b5050565b60008281526006602090815260408083206001600160a01b038516845290915290205460ff16620001655760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001c93390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200023b57600080fd5b919050565b600080604083850312156200025457600080fd5b82516001600160401b03808211156200026c57600080fd5b818501915085601f8301126200028157600080fd5b8151818111156200029657620002966200020d565b604051601f8201601f19908116603f01168101908382118183101715620002c157620002c16200020d565b81604052828152602093508884848701011115620002de57600080fd5b600091505b82821015620003025784820184015181830185015290830190620002e3565b60008484830101528096505050506200031d81860162000223565b925050509250929050565b600181811c908216806200033d57607f821691505b6020821081036200035e57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620003b257600081815260208120601f850160051c810160208610156200038d5750805b601f850160051c820191505b81811015620003ae5782815560010162000399565b5050505b505050565b81516001600160401b03811115620003d357620003d36200020d565b620003eb81620003e4845462000328565b8462000364565b602080601f8311600181146200042357600084156200040a5750858301515b600019600386901b1c1916600185901b178555620003ae565b600085815260208120601f198616915b82811015620004545788860151825594840194600190910190840162000433565b5085821015620004735787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61479a80620004936000396000f3fe608060405234801561001057600080fd5b50600436106102f15760003560e01c806391d148541161019d578063c1d78b4a116100e9578063d6215ace116100a2578063e9300c6c1161007c578063e9300c6c146106fe578063e985e9c514610711578063f2fde38b1461074d578063fe6d81241461076057600080fd5b8063d6215ace146106d0578063e7662243146106e3578063e8a3d485146106f657600080fd5b8063c1d78b4a14610643578063c45a015514610656578063c87b56dd14610669578063c99931be1461067c578063d31aa70f1461069d578063d547741f146106bd57600080fd5b8063a22cb46511610156578063b64b21ca11610130578063b64b21ca146105f7578063b88d4fde1461060a578063ba51b1b41461061d578063bda5ec331461063057600080fd5b8063a22cb465146105be578063ab9aae35146105d1578063ac323a1f146105e457600080fd5b806391d1485414610562578063938e3d7b14610575578063956711ac1461058857806395d89b411461059b5780639f6350e6146105a3578063a217fddf146105b657600080fd5b80632a55205a1161025c5780635a1f3c28116102155780636c99dcbf116101ef5780636c99dcbf1461051657806370a082311461052957806381f460ef1461053c5780638da5cb5b1461054f57600080fd5b80635a1f3c28146104d05780636352211e146104f0578063673636b71461050357600080fd5b80632a55205a1461043f5780632e900374146104715780632f2ff15d1461048457806335755a731461049757806336568abe146104aa57806342842e0e146104bd57600080fd5b8063192e322c116102ae578063192e322c146103c85780631c10106f146103db5780631c899d1a146103e357806323b872dd146103f6578063248a9ca314610409578063276a28a31461042c57600080fd5b806301ffc9a7146102f657806306fdde031461031e578063081812fc14610333578063095ea7b31461035e5780630de2689e14610373578063175c4ef8146103a1575b600080fd5b61030961030436600461373e565b610787565b60405190151581526020015b60405180910390f35b6103266107b2565b60405161031591906137ab565b6103466103413660046137be565b610844565b6040516001600160a01b039091168152602001610315565b61037161036c3660046137f3565b61086b565b005b6103936103813660046137be565b60086020526000908152604090205481565b604051908152602001610315565b6103937f872340a532bdd7bb02bea115c1b0f1ba87eac982f5b79b51ac189ffaac1b6fce81565b6103716103d636600461385e565b610985565b601354610393565b6103716103f13660046138d1565b6109f4565b61037161040436600461391c565b610a5a565b6103936104173660046137be565b60009081526006602052604090206001015490565b61030961043a3660046137be565b610a8b565b61045261044d366004613958565b610ac9565b604080516001600160a01b039093168352602083019190915201610315565b61037161047f3660046137be565b610b86565b61037161049236600461397a565b610bd5565b6103716104a53660046139ea565b610bfa565b6103716104b836600461397a565b610d99565b6103716104cb36600461391c565b610e17565b6104e36104de3660046137be565b610e32565b6040516103159190613a28565b6103466104fe3660046137be565b610f8e565b610371610511366004613b4f565b610fee565b610309610524366004613bb0565b611373565b610393610537366004613be9565b611608565b61037161054a366004613c14565b61168e565b601454610346906001600160a01b031681565b61030961057036600461397a565b611715565b610371610583366004613c71565b611740565b610371610596366004613cb2565b611797565b6103266117bd565b6103716105b1366004613c71565b6117cc565b610393600081565b6103716105cc366004613ccd565b6118a3565b6103936105df3660046137be565b6118ae565b6103716105f2366004613cf7565b6118fa565b610371610605366004613d1b565b61191e565b610371610618366004613d6e565b61197c565b61037161062b366004613c71565b6119b4565b61039361063e366004613de9565b6119cc565b610371610651366004613e15565b611b50565b601554610346906001600160a01b031681565b6103266106773660046137be565b611c35565b61068f61068a3660046137be565b611f8f565b604051610315929190613e80565b6103936106ab3660046137be565b60096020526000908152604090205481565b6103716106cb36600461397a565b612109565b6103716106de366004613c14565b61212e565b6103716106f1366004613eea565b6121a6565b610326612207565b61037161070c366004613f1d565b612216565b61030961071f366004613f61565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61037161075b366004613be9565b612320565b6103937ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b60006001600160e01b03198216632baae9fd60e01b14806107ac57506107ac8261235c565b92915050565b6060600080546107c190613f8b565b80601f01602080910402602001604051908101604052809291908181526020018280546107ed90613f8b565b801561083a5780601f1061080f5761010080835404028352916020019161083a565b820191906000526020600020905b81548152906001019060200180831161081d57829003601f168201915b5050505050905090565b600061084f82612381565b506000908152600460205260409020546001600160a01b031690565b600061087682610f8e565b9050806001600160a01b0316836001600160a01b0316036108e85760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806109045750610904813361071f565b6109765760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016108df565b61098083836123e3565b505050565b600061099081612451565b601354889081106109b35760405162461bcd60e51b81526004016108df90613fc5565b600060138a815481106109c8576109c861400b565b906000526020600020906004020190506109e88a8a8a8a8a8a8a8861245b565b50505050505050505050565b60006109ff81612451565b6000848152600a60205260409020610a18838583614067565b507faab063d4691f636507767c2040fbab0b0e00a684d66a2f9640653ed5e7b859f9848484604051610a4c9392919061414f565b60405180910390a150505050565b610a64338261282b565b610a805760405162461bcd60e51b81526004016108df90614172565b6109808383836128aa565b600081815260086020526040812054601280548392908110610aaf57610aaf61400b565b906000526020600020906007020160040154119050919050565b60008281526002602052604081205481906001600160a01b0316610b4b5760405162461bcd60e51b815260206004820152603360248201527f52414952204552433732313a20526f79616c747920717565727920666f722061604482015272103737b716b2bc34b9ba34b733903a37b5b2b760691b60648201526084016108df565b6014546017546001600160a01b0390911690620186a090610b709061ffff16866141d6565b610b7a9190614203565b915091505b9250929050565b6000610b9181612451565b817fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b55657207610bbc84611c35565b604051610bc991906137ab565b60405180910390a25050565b600082815260066020526040902060010154610bf081612451565b6109808383612a51565b6000610c0581612451565b60135484908110610c285760405162461bcd60e51b81526004016108df90613fc5565b82610c755760405162461bcd60e51b815260206004820152601860248201527f52414952204552433732313a20456d707479206172726179000000000000000060448201526064016108df565b600060138681548110610c8a57610c8a61400b565b9060005260206000209060040201905060005b84811015610d9057610d7e87878784818110610cbb57610cbb61400b565b9050602002810190610ccd9190614217565b35888885818110610ce057610ce061400b565b9050602002810190610cf29190614217565b60400135898986818110610d0857610d0861400b565b9050602002810190610d1a9190614217565b606001358a8a87818110610d3057610d3061400b565b9050602002810190610d429190614217565b602001358b8b88818110610d5857610d5861400b565b9050602002810190610d6a9190614217565b610d78906080810190614237565b8961245b565b80610d888161427d565b915050610c9d565b50505050505050565b6001600160a01b0381163314610e095760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108df565b610e138282612ad7565b5050565b6109808383836040518060200160405280600081525061197c565b610e5d6040518060800160405280600081526020016000815260200160608152602001606081525090565b60138281548110610e7057610e7061400b565b90600052602060002090600402016040518060800160405290816000820154815260200160018201548152602001600282018054610ead90613f8b565b80601f0160208091040260200160405190810160405280929190818152602001828054610ed990613f8b565b8015610f265780601f10610efb57610100808354040283529160200191610f26565b820191906000526020600020905b815481529060010190602001808311610f0957829003601f168201915b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610f7e57602002820191906000526020600020905b815481526020019060010190808311610f6a575b5050505050815250509050919050565b6000818152600260205260408120546001600160a01b0316806107ac5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016108df565b6000610ff981612451565b6012548690811061101c5760405162461bcd60e51b81526004016108df90614296565b60026007540361106e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108df565b600260078190555060006012888154811061108b5761108b61400b565b9060005260206000209060070201905085600014806110ab575060648610155b61111d5760405162461bcd60e51b815260206004820152603a60248201527f52414952204552433732313a2052616e6765207072696365206d75737420626560448201527f2067726561746572206f7220657175616c207468616e2031303000000000000060648201526084016108df565b80600301548511156111ad5760405162461bcd60e51b815260206004820152604d60248201527f52414952204552433732313a20546f6b656e7320616c6c6f7765642073686f7560448201527f6c64206265206c657373207468616e20746865206e756d626572206f66206d6960648201526c6e7461626c6520746f6b656e7360981b608482015260a4016108df565b806003015484111561123c5760405162461bcd60e51b815260206004820152604c60248201527f52414952204552433732313a204c6f636b656420746f6b656e732073686f756c60448201527f64206265206c657373207468616e20746865206e756d626572206f66206d696e60648201526b7461626c6520746f6b656e7360a01b608482015260a4016108df565b60028101859055831580159061125457506004810154155b156112a85780546001820154604080519283526020830191909152810185905288907fd2deaeacc8e325d59c09833f4f8df9c144784d547a7725c7085fae3b644c93e49060600160405180910390a2611308565b831580156112ba575060008160040154115b1561130857805460018201546040518a927f83d23f069f5730ce94e107a9258bae3b7a0f97184978fd7daa41c8df8ac6c29e926112ff92918252602082015260400190565b60405180910390a25b60048101849055600581018690556006810161132488826142d7565b507f675fe88181b85cb3612f534abc69fa999ba2e4744dc830488c9de8b25ec6cfd1888888888860405161135c959493929190614396565b60405180910390a150506001600755505050505050565b600083806013805490501161139a5760405162461bcd60e51b81526004016108df90613fc5565b6000601386815481106113af576113af61400b565b906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820180546113ec90613f8b565b80601f016020809104026020016040519081016040528092919081815260200182805461141890613f8b565b80156114655780601f1061143a57610100808354040283529160200191611465565b820191906000526020600020905b81548152906001019060200180831161144857829003601f168201915b50505050508152602001600382018054806020026020016040519081016040528092919081815260200182805480156114bd57602002820191906000526020600020905b8154815260200190600101908083116114a9575b505050505081525050905084816000015182602001516114dd91906143cc565b6114e89060016143df565b11801561150f5750805160208201518591611502916143cc565b61150d9060016143df565b115b61155b5760405162461bcd60e51b815260206004820152601f60248201527f52414952204552433732313a20496e76616c696420706172616d65746572730060448201526064016108df565b6020810151156115f95780516000906115759086906143df565b9050600086836000015161158991906143df565b90505b818110156115f6576000818152600260205260409020546001600160a01b0316151580156115d35750886001600160a01b03166115c882610f8e565b6001600160a01b0316145b156115e457600194505050506115ff565b806115ee8161427d565b91505061158c565b50505b60009250505b50949350505050565b60006001600160a01b0382166116725760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016108df565b506001600160a01b031660009081526003602052604090205490565b600061169981612451565b6000858152600c602052604090206116b2848683614067565b506000858152600e602052604090819020805460ff1916841515179055517f2bb1ada610787986fd4521b4954a78d4f238f7bca767c926c6f07d999a9cda439061170690879087908790879060189061446f565b60405180910390a15050505050565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600061174b81612451565b6010611758838583614067565b507f64729fba330f29cb50d748098a4dff25d203b0c55833653113fb5e80bcbd16c1838360405161178a9291906144af565b60405180910390a1505050565b60006117a281612451565b50601180549115156101000261ff0019909216919091179055565b6060601680546107c190613f8b565b60006117d781612451565b828260008181106117ea576117ea61400b565b9050013560f81c60f81b6001600160f81b031916601760f91b146118655760405162461bcd60e51b815260206004820152602c60248201527f52414952204552433732313a20457874656e73696f6e206d757374207374617260448201526b742077697468206120272e2760a01b60648201526084016108df565b6018611872838583614067565b507faa320816703c301a5fd8413568c3c1973befd093aa334d16a2414f0019b0f3da601860405161178a91906144c3565b610e13338383612b3e565b60008181526008602090815260408083205483526009909152812054601390815481106118dd576118dd61400b565b906000526020600020906004020160000154826107ac91906143cc565b600061190581612451565b506017805461ffff191661ffff92909216919091179055565b600061192981612451565b600f611936848683614067565b506011805460ff19168315151790556040517f5a46dbcba74fa6a037f659c582371f45be00bed8b34d9edc9ee5ef9eb2571d9d90610a4c908690869086906018906144d6565b611986338361282b565b6119a25760405162461bcd60e51b81526004016108df90614172565b6119ae84848484612c0c565b50505050565b60006119bf81612451565b60166119ae838583614067565b60008380601380549050116119f35760405162461bcd60e51b81526004016108df90613fc5565b600060138681548110611a0857611a0861400b565b90600052602060002090600402016040518060800160405290816000820154815260200160018201548152602001600282018054611a4590613f8b565b80601f0160208091040260200160405190810160405280929190818152602001828054611a7190613f8b565b8015611abe5780601f10611a9357610100808354040283529160200191611abe565b820191906000526020600020905b815481529060010190602001808311611aa157829003601f168201915b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015611b1657602002820191906000526020600020905b815481526020019060010190808311611b02575b5050505050815250509050611b46858260000151611b3491906143df565b8251611b419087906143df565b612c3f565b9695505050505050565b6000611b5b81612451565b838214611bd05760405162461bcd60e51b815260206004820152603b60248201527f52414952204552433732313a20546f6b656e2049447320616e6420555249732060448201527f73686f756c642068617665207468652073616d65206c656e677468000000000060648201526084016108df565b60005b84811015611c2d57611c1b868683818110611bf057611bf061400b565b90506020020135858584818110611c0957611c0961400b565b90506020028101906103f19190614237565b80611c258161427d565b915050611bd3565b505050505050565b6000818152600a6020526040812080546060929190611c5390613f8b565b80601f0160208091040260200160405190810160405280929190818152602001828054611c7f90613f8b565b8015611ccc5780601f10611ca157610100808354040283529160200191611ccc565b820191906000526020600020905b815481529060010190602001808311611caf57829003601f168201915b50505050509050600081511115611ce35792915050565b6000838152600860209081526040808320548352600c90915290208054611d0990613f8b565b80601f0160208091040260200160405190810160405280929190818152602001828054611d3590613f8b565b8015611d825780601f10611d5757610100808354040283529160200191611d82565b820191906000526020600020905b815481529060010190602001808311611d6557829003601f168201915b50505050509050600081511115611df4576000838152600860209081526040808320548352600e90915290205460ff16156107ac5780611dc9611dc4856118ae565b612cf9565b6018604051602001611ddd9392919061450f565b604051602081830303815290604052915050919050565b600083815260086020908152604080832054835260098252808320548352600b90915290208054611e2490613f8b565b80601f0160208091040260200160405190810160405280929190818152602001828054611e5090613f8b565b8015611e9d5780601f10611e7257610100808354040283529160200191611e9d565b820191906000526020600020905b815481529060010190602001808311611e8057829003601f168201915b50505050509050600081511115611ee957600083815260086020908152604080832054835260098252808320548352600d90915290205460ff16156107ac5780611dc9611dc4856118ae565b600f8054611ef690613f8b565b80601f0160208091040260200160405190810160405280929190818152602001828054611f2290613f8b565b8015611f6f5780601f10611f4457610100808354040283529160200191611f6f565b820191906000526020600020905b815481529060010190602001808311611f5257829003601f168201915b5050601154939450505060ff9091161590506107ac5780611dc984612cf9565b611fcf6040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081525090565b6000828060128054905011611ff65760405162461bcd60e51b81526004016108df90614296565b601284815481106120095761200961400b565b90600052602060002090600702016040518060e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201805461206e90613f8b565b80601f016020809104026020016040519081016040528092919081815260200182805461209a90613f8b565b80156120e75780601f106120bc576101008083540402835291602001916120e7565b820191906000526020600020905b8154815290600101906020018083116120ca57829003601f168201915b5050509190925250505060009485526009602052604090942054939492505050565b60008281526006602052604090206001015461212481612451565b6109808383612ad7565b600061213981612451565b6000858152600b60205260409020612152848683614067565b506000858152600d602052604090819020805460ff1916841515179055517ff143691bfd54372ac96096580c7ac8fa560f8c1b3c770db4f16eb1197c8d2f439061170690879087908790879060189061446f565b7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc96121d081612451565b601254839081106121f35760405162461bcd60e51b81526004016108df90614296565b6122008585856001612df9565b5050505050565b6060601080546107c190613f8b565b600061222181612451565b6013546000901561226d576013805461223c906001906143cc565b8154811061224c5761224c61400b565b906000526020600020906004020160010154600161226a91906143df565b90505b60138054600181810183556000929092526004027f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a09001828155906122b185846143df565b6122bb91906143cc565b6001820155600281016122ce86826142d7565b506013546122de906001906143cc565b7fe318895d3fd44cb3524ca783576b7737ae76b172e344357462ab4258b50c1c22868487604051612311939291906145af565b60405180910390a25050505050565b600061232b81612451565b612336600083612a51565b601480546001600160a01b0319166001600160a01b038416179055610e13600033610d99565b60006001600160e01b03198216637965db0b60e01b14806107ac57506107ac8261309f565b6000818152600260205260409020546001600160a01b03166123e05760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016108df565b50565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061241882610f8e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6123e081336130ef565b80546003820154156124cb576003820180546012919061247d906001906143cc565b8154811061248d5761248d61400b565b9060005260206000200154815481106124a8576124a861400b565b906000526020600020906007020160010154905080806124c79061427d565b9150505b600180830154906124dc8a846143df565b6124e691906143cc565b111561253e5760405162461bcd60e51b815260206004820152602160248201527f52414952204552433732313a20496e76616c69642072616e6765206c656e67746044820152600d60fb1b60648201526084016108df565b878711156125d05760405162461bcd60e51b815260206004820152605360248201527f52414952204552433732313a204e756d626572206f6620616c6c6f776564207460448201527f6f6b656e73206d757374206265206c657373206f7220657175616c207468616e606482015272040e8d0ca40e4c2dcceca4ee640d8cadccee8d606b1b608482015260a4016108df565b878611156126615760405162461bcd60e51b815260206004820152605260248201527f52414952204552433732313a204e756d626572206f66206c6f636b656420746f60448201527f6b656e73206d757374206265206c657373206f7220657175616c207468616e206064820152710e8d0ca40e4c2dcceca4ee640d8cadccee8d60731b608482015260a4016108df565b84158061266f575060648510155b6126d15760405162461bcd60e51b815260206004820152602d60248201527f52414952204552433732313a204d696e696d756d20707269636520666f72206160448201526c02072616e67652069732031303609c1b60648201526084016108df565b60128054600181810183556000929092526007027fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec344401828155906127158a846143df565b61271f91906143cc565b6001820155600381018990556002810188905560048101879055600581018690556006810161274f858783614067565b508960096000600160128054905061276791906143cc565b8152602081019190915260400160002055601254600384019061278c906001906143cc565b90806001815401808255809150506001900390600052602060002001600090919091909150557fc4e232d19c750404428930450f0a050bf4c166f32910679d1b9e52f17bad83478a8260000154836001015484600501548560020154866004015487600601600160128054905061280391906143cc565b6040516128179897969594939291906145d4565b60405180910390a150505050505050505050565b60008061283783610f8e565b9050806001600160a01b0316846001600160a01b0316148061287e57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806128a25750836001600160a01b031661289784610844565b6001600160a01b0316145b949350505050565b826001600160a01b03166128bd82610f8e565b6001600160a01b0316146129215760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016108df565b6001600160a01b0382166129835760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108df565b61298e838383613153565b6129996000826123e3565b6001600160a01b03831660009081526003602052604081208054600192906129c29084906143cc565b90915550506001600160a01b03821660009081526003602052604081208054600192906129f09084906143df565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612a5b8282611715565b610e135760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055612a933390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612ae18282611715565b15610e135760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b816001600160a01b0316836001600160a01b031603612b9f5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108df565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612c178484846128aa565b612c23848484846132ea565b6119ae5760405162461bcd60e51b81526004016108df90614622565b815b818111612c77576000818152600260205260409020546001600160a01b031615612c775780612c6f8161427d565b915050612c41565b808311158015612c875750818111155b6107ac5760405162461bcd60e51b815260206004820152603960248201527f52414952204552433732313a20546865726520617265206e6f20617661696c6160448201527f626c6520746f6b656e7320696e20746869732072616e67652e0000000000000060648201526084016108df565b606081600003612d205750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612d4a5780612d348161427d565b9150612d439050600a83614203565b9150612d24565b6000816001600160401b03811115612d6457612d64613aa4565b6040519080825280601f01601f191660200182016040528015612d8e576020820181803683370190505b5090505b84156128a257612da36001836143cc565b9150612db0600a86614674565b612dbb9060306143df565b60f81b818381518110612dd057612dd061400b565b60200101906001600160f81b031916908160001a905350612df2600a86614203565b9450612d92565b600060128481548110612e0e57612e0e61400b565b9060005260206000209060070201905060006013600960008781526020019081526020016000205481548110612e4657612e4661400b565b906000526020600020906004020190508282600201541015612ec45760405162461bcd60e51b815260206004820152603160248201527f52414952204552433732313a204e6f7420616c6c6f77656420746f206d696e746044820152702074686174206d616e7920746f6b656e7360781b60648201526084016108df565b8054612ed19085906143df565b825411801590612f0b57508160010154600184868460000154612ef491906143df565b612efe91906143df565b612f0891906143cc565b11155b612f715760405162461bcd60e51b815260206004820152603160248201527f52414952204552433732313a20547269656420746f206d696e7420746f6b656e604482015270206f757473696465206f662072616e676560781b60648201526084016108df565b82826002016000828254612f8591906143cc565b909155505060048201541561301a5782826004015411612fab5760006004830155612fc5565b82826004016000828254612fbf91906143cc565b90915550505b816004015460000361301a578154600183015460405187927f83d23f069f5730ce94e107a9258bae3b7a0f97184978fd7daa41c8df8ac6c29e9261301192918252602082015260400190565b60405180910390a25b8215611c2d576130508660018587856000015461303791906143df565b61304191906143df565b61304b91906143cc565b6133eb565b846008600060018688866000015461306891906143df565b61307291906143df565b61307c91906143cc565b81526020810191909152604001600020558261309781614688565b93505061301a565b60006001600160e01b031982166380ac58cd60e01b14806130d057506001600160e01b03198216635b5e139f60e01b145b806107ac57506301ffc9a760e01b6001600160e01b03198316146107ac565b6130f98282611715565b610e1357613111816001600160a01b03166014613405565b61311c836020613405565b60405160200161312d92919061469f565b60408051601f198184030181529082905262461bcd60e51b82526108df916004016137ab565b6002600754036131a55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108df565b60026007556001600160a01b038316158015906131ca57506001600160a01b03821615155b156132e057601254158015906131f6575060008181526008602090815260408220549091526009905260015b156132a65760008181526008602052604090205460128054909190811061321f5761321f61400b565b9060005260206000209060070201600401546000146132a65760405162461bcd60e51b815260206004820152603a60248201527f52414952204552433732313a205472616e736665727320666f7220746869732060448201527f72616e6765206172652063757272656e746c79206c6f636b656400000000000060648201526084016108df565b601154610100900460ff16156132e0576132e07f872340a532bdd7bb02bea115c1b0f1ba87eac982f5b79b51ac189ffaac1b6fce336130ef565b5050600160075550565b60006001600160a01b0384163b156133e057604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061332e903390899088908890600401614714565b6020604051808303816000875af1925050508015613369575060408051601f3d908101601f1916820190925261336691810190614747565b60015b6133c6573d808015613397576040519150601f19603f3d011682016040523d82523d6000602084013e61339c565b606091505b5080516000036133be5760405162461bcd60e51b81526004016108df90614622565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506128a2565b506001949350505050565b610e138282604051806020016040528060008152506135a7565b606060006134148360026141d6565b61341f9060026143df565b6001600160401b0381111561343657613436613aa4565b6040519080825280601f01601f191660200182016040528015613460576020820181803683370190505b509050600360fc1b8160008151811061347b5761347b61400b565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106134aa576134aa61400b565b60200101906001600160f81b031916908160001a90535060006134ce8460026141d6565b6134d99060016143df565b90505b6001811115613551576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061350d5761350d61400b565b1a60f81b8282815181106135235761352361400b565b60200101906001600160f81b031916908160001a90535060049490941c9361354a81614688565b90506134dc565b5083156135a05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108df565b9392505050565b6135b183836135da565b6135be60008484846132ea565b6109805760405162461bcd60e51b81526004016108df90614622565b6001600160a01b0382166136305760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108df565b6000818152600260205260409020546001600160a01b0316156136955760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108df565b6136a160008383613153565b6001600160a01b03821660009081526003602052604081208054600192906136ca9084906143df565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b0319811681146123e057600080fd5b60006020828403121561375057600080fd5b81356135a081613728565b60005b8381101561377657818101518382015260200161375e565b50506000910152565b6000815180845261379781602086016020860161375b565b601f01601f19169290920160200192915050565b6020815260006135a0602083018461377f565b6000602082840312156137d057600080fd5b5035919050565b80356001600160a01b03811681146137ee57600080fd5b919050565b6000806040838503121561380657600080fd5b61380f836137d7565b946020939093013593505050565b60008083601f84011261382f57600080fd5b5081356001600160401b0381111561384657600080fd5b602083019150836020828501011115610b7f57600080fd5b600080600080600080600060c0888a03121561387957600080fd5b873596506020880135955060408801359450606088013593506080880135925060a08801356001600160401b038111156138b257600080fd5b6138be8a828b0161381d565b989b979a50959850939692959293505050565b6000806000604084860312156138e657600080fd5b8335925060208401356001600160401b0381111561390357600080fd5b61390f8682870161381d565b9497909650939450505050565b60008060006060848603121561393157600080fd5b61393a846137d7565b9250613948602085016137d7565b9150604084013590509250925092565b6000806040838503121561396b57600080fd5b50508035926020909101359150565b6000806040838503121561398d57600080fd5b8235915061399d602084016137d7565b90509250929050565b60008083601f8401126139b857600080fd5b5081356001600160401b038111156139cf57600080fd5b6020830191508360208260051b8501011115610b7f57600080fd5b6000806000604084860312156139ff57600080fd5b8335925060208401356001600160401b03811115613a1c57600080fd5b61390f868287016139a6565b60006020808352835181840152808401516040840152604084015160806060850152613a5760a085018261377f565b6060860151858203601f19016080870152805180835290840192506000918401905b80831015613a995783518252928401926001929092019190840190613a79565b509695505050505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115613ad457613ad4613aa4565b604051601f8501601f19908116603f01168101908282118183101715613afc57613afc613aa4565b81604052809350858152868686011115613b1557600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112613b4057600080fd5b6135a083833560208501613aba565b600080600080600060a08688031215613b6757600080fd5b8535945060208601356001600160401b03811115613b8457600080fd5b613b9088828901613b2f565b959895975050505060408401359360608101359360809091013592509050565b60008060008060808587031215613bc657600080fd5b613bcf856137d7565b966020860135965060408601359560600135945092505050565b600060208284031215613bfb57600080fd5b6135a0826137d7565b803580151581146137ee57600080fd5b60008060008060608587031215613c2a57600080fd5b8435935060208501356001600160401b03811115613c4757600080fd5b613c538782880161381d565b9094509250613c66905060408601613c04565b905092959194509250565b60008060208385031215613c8457600080fd5b82356001600160401b03811115613c9a57600080fd5b613ca68582860161381d565b90969095509350505050565b600060208284031215613cc457600080fd5b6135a082613c04565b60008060408385031215613ce057600080fd5b613ce9836137d7565b915061399d60208401613c04565b600060208284031215613d0957600080fd5b813561ffff811681146135a057600080fd5b600080600060408486031215613d3057600080fd5b83356001600160401b03811115613d4657600080fd5b613d528682870161381d565b9094509250613d65905060208501613c04565b90509250925092565b60008060008060808587031215613d8457600080fd5b613d8d856137d7565b9350613d9b602086016137d7565b92506040850135915060608501356001600160401b03811115613dbd57600080fd5b8501601f81018713613dce57600080fd5b613ddd87823560208401613aba565b91505092959194509250565b600080600060608486031215613dfe57600080fd5b505081359360208301359350604090920135919050565b60008060008060408587031215613e2b57600080fd5b84356001600160401b0380821115613e4257600080fd5b613e4e888389016139a6565b90965094506020870135915080821115613e6757600080fd5b50613e74878288016139a6565b95989497509550505050565b60408152825160408201526020830151606082015260408301516080820152606083015160a0820152608083015160c082015260a083015160e0820152600060c084015160e0610100840152613eda61012084018261377f565b9150508260208301529392505050565b600080600060608486031215613eff57600080fd5b613f08846137d7565b95602085013595506040909401359392505050565b60008060408385031215613f3057600080fd5b82356001600160401b03811115613f4657600080fd5b613f5285828601613b2f565b95602094909401359450505050565b60008060408385031215613f7457600080fd5b613f7d836137d7565b915061399d602084016137d7565b600181811c90821680613f9f57607f821691505b602082108103613fbf57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526026908201527f52414952204552433732313a20436f6c6c656374696f6e20646f6573206e6f7460408201526508195e1a5cdd60d21b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b601f82111561098057600081815260208120601f850160051c810160208610156140485750805b601f850160051c820191505b81811015611c2d57828155600101614054565b6001600160401b0383111561407e5761407e613aa4565b6140928361408c8354613f8b565b83614021565b6000601f8411600181146140c657600085156140ae5750838201355b600019600387901b1c1916600186901b178355612200565b600083815260209020601f19861690835b828110156140f757868501358255602094850194600190920191016140d7565b50868210156141145760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b838152604060208201526000614169604083018486614126565b95945050505050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176107ac576107ac6141c0565b634e487b7160e01b600052601260045260246000fd5b600082614212576142126141ed565b500490565b60008235609e1983360301811261422d57600080fd5b9190910192915050565b6000808335601e1984360301811261424e57600080fd5b8301803591506001600160401b0382111561426857600080fd5b602001915036819003821315610b7f57600080fd5b60006001820161428f5761428f6141c0565b5060010190565b60208082526021908201527f52414952204552433732313a2052616e676520646f6573206e6f7420657869736040820152601d60fa1b606082015260800190565b81516001600160401b038111156142f0576142f0613aa4565b614304816142fe8454613f8b565b84614021565b602080601f83116001811461433957600084156143215750858301515b600019600386901b1c1916600185901b178555611c2d565b600085815260208120601f198616915b8281101561436857888601518255948401946001909101908401614349565b50858210156143865787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b85815260a0602082015260006143af60a083018761377f565b604083019590955250606081019290925260809091015292915050565b818103818111156107ac576107ac6141c0565b808201808211156107ac576107ac6141c0565b600081546143ff81613f8b565b80855260206001838116801561441c576001811461443657614464565b60ff1985168884015283151560051b880183019550614464565b866000528260002060005b8581101561445c5781548a8201860152908301908401614441565b890184019650505b505050505092915050565b858152608060208201526000614489608083018688614126565b841515604084015282810360608401526144a381856143f2565b98975050505050505050565b6020815260006128a2602083018486614126565b6020815260006135a060208301846143f2565b6060815260006144ea606083018688614126565b8415156020840152828103604084015261450481856143f2565b979650505050505050565b6000845160206145228285838a0161375b565b8551918401916145358184848a0161375b565b855492019160009061454681613f8b565b6001828116801561455e57600181146145735761459f565b60ff198416875282151583028701945061459f565b896000528560002060005b848110156145975781548982015290830190870161457e565b505082870194505b50929a9950505050505050505050565b6060815260006145c2606083018661377f565b60208301949094525060400152919050565b60006101008a83528960208401528860408401528760608401528660808401528560a08401528060c084015261460c818401866143f2565b9150508260e08301529998505050505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082614683576146836141ed565b500690565b600081614697576146976141c0565b506000190190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516146d781601785016020880161375b565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161470881602884016020880161375b565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611b469083018461377f565b60006020828403121561475957600080fd5b81516135a08161372856fea2646970667358221220233a5906567ce64c1d91905e31bc5c1b2127e3da28e111ca9cac366662c31b1c64736f6c6343000811003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000007849194dd593d6c3aed24035d70b5394a1c90f8f000000000000000000000000000000000000000000000000000000000000000853494d20446f6773000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102f15760003560e01c806391d148541161019d578063c1d78b4a116100e9578063d6215ace116100a2578063e9300c6c1161007c578063e9300c6c146106fe578063e985e9c514610711578063f2fde38b1461074d578063fe6d81241461076057600080fd5b8063d6215ace146106d0578063e7662243146106e3578063e8a3d485146106f657600080fd5b8063c1d78b4a14610643578063c45a015514610656578063c87b56dd14610669578063c99931be1461067c578063d31aa70f1461069d578063d547741f146106bd57600080fd5b8063a22cb46511610156578063b64b21ca11610130578063b64b21ca146105f7578063b88d4fde1461060a578063ba51b1b41461061d578063bda5ec331461063057600080fd5b8063a22cb465146105be578063ab9aae35146105d1578063ac323a1f146105e457600080fd5b806391d1485414610562578063938e3d7b14610575578063956711ac1461058857806395d89b411461059b5780639f6350e6146105a3578063a217fddf146105b657600080fd5b80632a55205a1161025c5780635a1f3c28116102155780636c99dcbf116101ef5780636c99dcbf1461051657806370a082311461052957806381f460ef1461053c5780638da5cb5b1461054f57600080fd5b80635a1f3c28146104d05780636352211e146104f0578063673636b71461050357600080fd5b80632a55205a1461043f5780632e900374146104715780632f2ff15d1461048457806335755a731461049757806336568abe146104aa57806342842e0e146104bd57600080fd5b8063192e322c116102ae578063192e322c146103c85780631c10106f146103db5780631c899d1a146103e357806323b872dd146103f6578063248a9ca314610409578063276a28a31461042c57600080fd5b806301ffc9a7146102f657806306fdde031461031e578063081812fc14610333578063095ea7b31461035e5780630de2689e14610373578063175c4ef8146103a1575b600080fd5b61030961030436600461373e565b610787565b60405190151581526020015b60405180910390f35b6103266107b2565b60405161031591906137ab565b6103466103413660046137be565b610844565b6040516001600160a01b039091168152602001610315565b61037161036c3660046137f3565b61086b565b005b6103936103813660046137be565b60086020526000908152604090205481565b604051908152602001610315565b6103937f872340a532bdd7bb02bea115c1b0f1ba87eac982f5b79b51ac189ffaac1b6fce81565b6103716103d636600461385e565b610985565b601354610393565b6103716103f13660046138d1565b6109f4565b61037161040436600461391c565b610a5a565b6103936104173660046137be565b60009081526006602052604090206001015490565b61030961043a3660046137be565b610a8b565b61045261044d366004613958565b610ac9565b604080516001600160a01b039093168352602083019190915201610315565b61037161047f3660046137be565b610b86565b61037161049236600461397a565b610bd5565b6103716104a53660046139ea565b610bfa565b6103716104b836600461397a565b610d99565b6103716104cb36600461391c565b610e17565b6104e36104de3660046137be565b610e32565b6040516103159190613a28565b6103466104fe3660046137be565b610f8e565b610371610511366004613b4f565b610fee565b610309610524366004613bb0565b611373565b610393610537366004613be9565b611608565b61037161054a366004613c14565b61168e565b601454610346906001600160a01b031681565b61030961057036600461397a565b611715565b610371610583366004613c71565b611740565b610371610596366004613cb2565b611797565b6103266117bd565b6103716105b1366004613c71565b6117cc565b610393600081565b6103716105cc366004613ccd565b6118a3565b6103936105df3660046137be565b6118ae565b6103716105f2366004613cf7565b6118fa565b610371610605366004613d1b565b61191e565b610371610618366004613d6e565b61197c565b61037161062b366004613c71565b6119b4565b61039361063e366004613de9565b6119cc565b610371610651366004613e15565b611b50565b601554610346906001600160a01b031681565b6103266106773660046137be565b611c35565b61068f61068a3660046137be565b611f8f565b604051610315929190613e80565b6103936106ab3660046137be565b60096020526000908152604090205481565b6103716106cb36600461397a565b612109565b6103716106de366004613c14565b61212e565b6103716106f1366004613eea565b6121a6565b610326612207565b61037161070c366004613f1d565b612216565b61030961071f366004613f61565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61037161075b366004613be9565b612320565b6103937ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b60006001600160e01b03198216632baae9fd60e01b14806107ac57506107ac8261235c565b92915050565b6060600080546107c190613f8b565b80601f01602080910402602001604051908101604052809291908181526020018280546107ed90613f8b565b801561083a5780601f1061080f5761010080835404028352916020019161083a565b820191906000526020600020905b81548152906001019060200180831161081d57829003601f168201915b5050505050905090565b600061084f82612381565b506000908152600460205260409020546001600160a01b031690565b600061087682610f8e565b9050806001600160a01b0316836001600160a01b0316036108e85760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806109045750610904813361071f565b6109765760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016108df565b61098083836123e3565b505050565b600061099081612451565b601354889081106109b35760405162461bcd60e51b81526004016108df90613fc5565b600060138a815481106109c8576109c861400b565b906000526020600020906004020190506109e88a8a8a8a8a8a8a8861245b565b50505050505050505050565b60006109ff81612451565b6000848152600a60205260409020610a18838583614067565b507faab063d4691f636507767c2040fbab0b0e00a684d66a2f9640653ed5e7b859f9848484604051610a4c9392919061414f565b60405180910390a150505050565b610a64338261282b565b610a805760405162461bcd60e51b81526004016108df90614172565b6109808383836128aa565b600081815260086020526040812054601280548392908110610aaf57610aaf61400b565b906000526020600020906007020160040154119050919050565b60008281526002602052604081205481906001600160a01b0316610b4b5760405162461bcd60e51b815260206004820152603360248201527f52414952204552433732313a20526f79616c747920717565727920666f722061604482015272103737b716b2bc34b9ba34b733903a37b5b2b760691b60648201526084016108df565b6014546017546001600160a01b0390911690620186a090610b709061ffff16866141d6565b610b7a9190614203565b915091505b9250929050565b6000610b9181612451565b817fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b55657207610bbc84611c35565b604051610bc991906137ab565b60405180910390a25050565b600082815260066020526040902060010154610bf081612451565b6109808383612a51565b6000610c0581612451565b60135484908110610c285760405162461bcd60e51b81526004016108df90613fc5565b82610c755760405162461bcd60e51b815260206004820152601860248201527f52414952204552433732313a20456d707479206172726179000000000000000060448201526064016108df565b600060138681548110610c8a57610c8a61400b565b9060005260206000209060040201905060005b84811015610d9057610d7e87878784818110610cbb57610cbb61400b565b9050602002810190610ccd9190614217565b35888885818110610ce057610ce061400b565b9050602002810190610cf29190614217565b60400135898986818110610d0857610d0861400b565b9050602002810190610d1a9190614217565b606001358a8a87818110610d3057610d3061400b565b9050602002810190610d429190614217565b602001358b8b88818110610d5857610d5861400b565b9050602002810190610d6a9190614217565b610d78906080810190614237565b8961245b565b80610d888161427d565b915050610c9d565b50505050505050565b6001600160a01b0381163314610e095760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108df565b610e138282612ad7565b5050565b6109808383836040518060200160405280600081525061197c565b610e5d6040518060800160405280600081526020016000815260200160608152602001606081525090565b60138281548110610e7057610e7061400b565b90600052602060002090600402016040518060800160405290816000820154815260200160018201548152602001600282018054610ead90613f8b565b80601f0160208091040260200160405190810160405280929190818152602001828054610ed990613f8b565b8015610f265780601f10610efb57610100808354040283529160200191610f26565b820191906000526020600020905b815481529060010190602001808311610f0957829003601f168201915b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015610f7e57602002820191906000526020600020905b815481526020019060010190808311610f6a575b5050505050815250509050919050565b6000818152600260205260408120546001600160a01b0316806107ac5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016108df565b6000610ff981612451565b6012548690811061101c5760405162461bcd60e51b81526004016108df90614296565b60026007540361106e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108df565b600260078190555060006012888154811061108b5761108b61400b565b9060005260206000209060070201905085600014806110ab575060648610155b61111d5760405162461bcd60e51b815260206004820152603a60248201527f52414952204552433732313a2052616e6765207072696365206d75737420626560448201527f2067726561746572206f7220657175616c207468616e2031303000000000000060648201526084016108df565b80600301548511156111ad5760405162461bcd60e51b815260206004820152604d60248201527f52414952204552433732313a20546f6b656e7320616c6c6f7765642073686f7560448201527f6c64206265206c657373207468616e20746865206e756d626572206f66206d6960648201526c6e7461626c6520746f6b656e7360981b608482015260a4016108df565b806003015484111561123c5760405162461bcd60e51b815260206004820152604c60248201527f52414952204552433732313a204c6f636b656420746f6b656e732073686f756c60448201527f64206265206c657373207468616e20746865206e756d626572206f66206d696e60648201526b7461626c6520746f6b656e7360a01b608482015260a4016108df565b60028101859055831580159061125457506004810154155b156112a85780546001820154604080519283526020830191909152810185905288907fd2deaeacc8e325d59c09833f4f8df9c144784d547a7725c7085fae3b644c93e49060600160405180910390a2611308565b831580156112ba575060008160040154115b1561130857805460018201546040518a927f83d23f069f5730ce94e107a9258bae3b7a0f97184978fd7daa41c8df8ac6c29e926112ff92918252602082015260400190565b60405180910390a25b60048101849055600581018690556006810161132488826142d7565b507f675fe88181b85cb3612f534abc69fa999ba2e4744dc830488c9de8b25ec6cfd1888888888860405161135c959493929190614396565b60405180910390a150506001600755505050505050565b600083806013805490501161139a5760405162461bcd60e51b81526004016108df90613fc5565b6000601386815481106113af576113af61400b565b906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820180546113ec90613f8b565b80601f016020809104026020016040519081016040528092919081815260200182805461141890613f8b565b80156114655780601f1061143a57610100808354040283529160200191611465565b820191906000526020600020905b81548152906001019060200180831161144857829003601f168201915b50505050508152602001600382018054806020026020016040519081016040528092919081815260200182805480156114bd57602002820191906000526020600020905b8154815260200190600101908083116114a9575b505050505081525050905084816000015182602001516114dd91906143cc565b6114e89060016143df565b11801561150f5750805160208201518591611502916143cc565b61150d9060016143df565b115b61155b5760405162461bcd60e51b815260206004820152601f60248201527f52414952204552433732313a20496e76616c696420706172616d65746572730060448201526064016108df565b6020810151156115f95780516000906115759086906143df565b9050600086836000015161158991906143df565b90505b818110156115f6576000818152600260205260409020546001600160a01b0316151580156115d35750886001600160a01b03166115c882610f8e565b6001600160a01b0316145b156115e457600194505050506115ff565b806115ee8161427d565b91505061158c565b50505b60009250505b50949350505050565b60006001600160a01b0382166116725760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016108df565b506001600160a01b031660009081526003602052604090205490565b600061169981612451565b6000858152600c602052604090206116b2848683614067565b506000858152600e602052604090819020805460ff1916841515179055517f2bb1ada610787986fd4521b4954a78d4f238f7bca767c926c6f07d999a9cda439061170690879087908790879060189061446f565b60405180910390a15050505050565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600061174b81612451565b6010611758838583614067565b507f64729fba330f29cb50d748098a4dff25d203b0c55833653113fb5e80bcbd16c1838360405161178a9291906144af565b60405180910390a1505050565b60006117a281612451565b50601180549115156101000261ff0019909216919091179055565b6060601680546107c190613f8b565b60006117d781612451565b828260008181106117ea576117ea61400b565b9050013560f81c60f81b6001600160f81b031916601760f91b146118655760405162461bcd60e51b815260206004820152602c60248201527f52414952204552433732313a20457874656e73696f6e206d757374207374617260448201526b742077697468206120272e2760a01b60648201526084016108df565b6018611872838583614067565b507faa320816703c301a5fd8413568c3c1973befd093aa334d16a2414f0019b0f3da601860405161178a91906144c3565b610e13338383612b3e565b60008181526008602090815260408083205483526009909152812054601390815481106118dd576118dd61400b565b906000526020600020906004020160000154826107ac91906143cc565b600061190581612451565b506017805461ffff191661ffff92909216919091179055565b600061192981612451565b600f611936848683614067565b506011805460ff19168315151790556040517f5a46dbcba74fa6a037f659c582371f45be00bed8b34d9edc9ee5ef9eb2571d9d90610a4c908690869086906018906144d6565b611986338361282b565b6119a25760405162461bcd60e51b81526004016108df90614172565b6119ae84848484612c0c565b50505050565b60006119bf81612451565b60166119ae838583614067565b60008380601380549050116119f35760405162461bcd60e51b81526004016108df90613fc5565b600060138681548110611a0857611a0861400b565b90600052602060002090600402016040518060800160405290816000820154815260200160018201548152602001600282018054611a4590613f8b565b80601f0160208091040260200160405190810160405280929190818152602001828054611a7190613f8b565b8015611abe5780601f10611a9357610100808354040283529160200191611abe565b820191906000526020600020905b815481529060010190602001808311611aa157829003601f168201915b5050505050815260200160038201805480602002602001604051908101604052809291908181526020018280548015611b1657602002820191906000526020600020905b815481526020019060010190808311611b02575b5050505050815250509050611b46858260000151611b3491906143df565b8251611b419087906143df565b612c3f565b9695505050505050565b6000611b5b81612451565b838214611bd05760405162461bcd60e51b815260206004820152603b60248201527f52414952204552433732313a20546f6b656e2049447320616e6420555249732060448201527f73686f756c642068617665207468652073616d65206c656e677468000000000060648201526084016108df565b60005b84811015611c2d57611c1b868683818110611bf057611bf061400b565b90506020020135858584818110611c0957611c0961400b565b90506020028101906103f19190614237565b80611c258161427d565b915050611bd3565b505050505050565b6000818152600a6020526040812080546060929190611c5390613f8b565b80601f0160208091040260200160405190810160405280929190818152602001828054611c7f90613f8b565b8015611ccc5780601f10611ca157610100808354040283529160200191611ccc565b820191906000526020600020905b815481529060010190602001808311611caf57829003601f168201915b50505050509050600081511115611ce35792915050565b6000838152600860209081526040808320548352600c90915290208054611d0990613f8b565b80601f0160208091040260200160405190810160405280929190818152602001828054611d3590613f8b565b8015611d825780601f10611d5757610100808354040283529160200191611d82565b820191906000526020600020905b815481529060010190602001808311611d6557829003601f168201915b50505050509050600081511115611df4576000838152600860209081526040808320548352600e90915290205460ff16156107ac5780611dc9611dc4856118ae565b612cf9565b6018604051602001611ddd9392919061450f565b604051602081830303815290604052915050919050565b600083815260086020908152604080832054835260098252808320548352600b90915290208054611e2490613f8b565b80601f0160208091040260200160405190810160405280929190818152602001828054611e5090613f8b565b8015611e9d5780601f10611e7257610100808354040283529160200191611e9d565b820191906000526020600020905b815481529060010190602001808311611e8057829003601f168201915b50505050509050600081511115611ee957600083815260086020908152604080832054835260098252808320548352600d90915290205460ff16156107ac5780611dc9611dc4856118ae565b600f8054611ef690613f8b565b80601f0160208091040260200160405190810160405280929190818152602001828054611f2290613f8b565b8015611f6f5780601f10611f4457610100808354040283529160200191611f6f565b820191906000526020600020905b815481529060010190602001808311611f5257829003601f168201915b5050601154939450505060ff9091161590506107ac5780611dc984612cf9565b611fcf6040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001606081525090565b6000828060128054905011611ff65760405162461bcd60e51b81526004016108df90614296565b601284815481106120095761200961400b565b90600052602060002090600702016040518060e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201805461206e90613f8b565b80601f016020809104026020016040519081016040528092919081815260200182805461209a90613f8b565b80156120e75780601f106120bc576101008083540402835291602001916120e7565b820191906000526020600020905b8154815290600101906020018083116120ca57829003601f168201915b5050509190925250505060009485526009602052604090942054939492505050565b60008281526006602052604090206001015461212481612451565b6109808383612ad7565b600061213981612451565b6000858152600b60205260409020612152848683614067565b506000858152600d602052604090819020805460ff1916841515179055517ff143691bfd54372ac96096580c7ac8fa560f8c1b3c770db4f16eb1197c8d2f439061170690879087908790879060189061446f565b7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc96121d081612451565b601254839081106121f35760405162461bcd60e51b81526004016108df90614296565b6122008585856001612df9565b5050505050565b6060601080546107c190613f8b565b600061222181612451565b6013546000901561226d576013805461223c906001906143cc565b8154811061224c5761224c61400b565b906000526020600020906004020160010154600161226a91906143df565b90505b60138054600181810183556000929092526004027f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a09001828155906122b185846143df565b6122bb91906143cc565b6001820155600281016122ce86826142d7565b506013546122de906001906143cc565b7fe318895d3fd44cb3524ca783576b7737ae76b172e344357462ab4258b50c1c22868487604051612311939291906145af565b60405180910390a25050505050565b600061232b81612451565b612336600083612a51565b601480546001600160a01b0319166001600160a01b038416179055610e13600033610d99565b60006001600160e01b03198216637965db0b60e01b14806107ac57506107ac8261309f565b6000818152600260205260409020546001600160a01b03166123e05760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016108df565b50565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061241882610f8e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6123e081336130ef565b80546003820154156124cb576003820180546012919061247d906001906143cc565b8154811061248d5761248d61400b565b9060005260206000200154815481106124a8576124a861400b565b906000526020600020906007020160010154905080806124c79061427d565b9150505b600180830154906124dc8a846143df565b6124e691906143cc565b111561253e5760405162461bcd60e51b815260206004820152602160248201527f52414952204552433732313a20496e76616c69642072616e6765206c656e67746044820152600d60fb1b60648201526084016108df565b878711156125d05760405162461bcd60e51b815260206004820152605360248201527f52414952204552433732313a204e756d626572206f6620616c6c6f776564207460448201527f6f6b656e73206d757374206265206c657373206f7220657175616c207468616e606482015272040e8d0ca40e4c2dcceca4ee640d8cadccee8d606b1b608482015260a4016108df565b878611156126615760405162461bcd60e51b815260206004820152605260248201527f52414952204552433732313a204e756d626572206f66206c6f636b656420746f60448201527f6b656e73206d757374206265206c657373206f7220657175616c207468616e206064820152710e8d0ca40e4c2dcceca4ee640d8cadccee8d60731b608482015260a4016108df565b84158061266f575060648510155b6126d15760405162461bcd60e51b815260206004820152602d60248201527f52414952204552433732313a204d696e696d756d20707269636520666f72206160448201526c02072616e67652069732031303609c1b60648201526084016108df565b60128054600181810183556000929092526007027fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec344401828155906127158a846143df565b61271f91906143cc565b6001820155600381018990556002810188905560048101879055600581018690556006810161274f858783614067565b508960096000600160128054905061276791906143cc565b8152602081019190915260400160002055601254600384019061278c906001906143cc565b90806001815401808255809150506001900390600052602060002001600090919091909150557fc4e232d19c750404428930450f0a050bf4c166f32910679d1b9e52f17bad83478a8260000154836001015484600501548560020154866004015487600601600160128054905061280391906143cc565b6040516128179897969594939291906145d4565b60405180910390a150505050505050505050565b60008061283783610f8e565b9050806001600160a01b0316846001600160a01b0316148061287e57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806128a25750836001600160a01b031661289784610844565b6001600160a01b0316145b949350505050565b826001600160a01b03166128bd82610f8e565b6001600160a01b0316146129215760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016108df565b6001600160a01b0382166129835760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108df565b61298e838383613153565b6129996000826123e3565b6001600160a01b03831660009081526003602052604081208054600192906129c29084906143cc565b90915550506001600160a01b03821660009081526003602052604081208054600192906129f09084906143df565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612a5b8282611715565b610e135760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055612a933390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612ae18282611715565b15610e135760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b816001600160a01b0316836001600160a01b031603612b9f5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108df565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612c178484846128aa565b612c23848484846132ea565b6119ae5760405162461bcd60e51b81526004016108df90614622565b815b818111612c77576000818152600260205260409020546001600160a01b031615612c775780612c6f8161427d565b915050612c41565b808311158015612c875750818111155b6107ac5760405162461bcd60e51b815260206004820152603960248201527f52414952204552433732313a20546865726520617265206e6f20617661696c6160448201527f626c6520746f6b656e7320696e20746869732072616e67652e0000000000000060648201526084016108df565b606081600003612d205750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612d4a5780612d348161427d565b9150612d439050600a83614203565b9150612d24565b6000816001600160401b03811115612d6457612d64613aa4565b6040519080825280601f01601f191660200182016040528015612d8e576020820181803683370190505b5090505b84156128a257612da36001836143cc565b9150612db0600a86614674565b612dbb9060306143df565b60f81b818381518110612dd057612dd061400b565b60200101906001600160f81b031916908160001a905350612df2600a86614203565b9450612d92565b600060128481548110612e0e57612e0e61400b565b9060005260206000209060070201905060006013600960008781526020019081526020016000205481548110612e4657612e4661400b565b906000526020600020906004020190508282600201541015612ec45760405162461bcd60e51b815260206004820152603160248201527f52414952204552433732313a204e6f7420616c6c6f77656420746f206d696e746044820152702074686174206d616e7920746f6b656e7360781b60648201526084016108df565b8054612ed19085906143df565b825411801590612f0b57508160010154600184868460000154612ef491906143df565b612efe91906143df565b612f0891906143cc565b11155b612f715760405162461bcd60e51b815260206004820152603160248201527f52414952204552433732313a20547269656420746f206d696e7420746f6b656e604482015270206f757473696465206f662072616e676560781b60648201526084016108df565b82826002016000828254612f8591906143cc565b909155505060048201541561301a5782826004015411612fab5760006004830155612fc5565b82826004016000828254612fbf91906143cc565b90915550505b816004015460000361301a578154600183015460405187927f83d23f069f5730ce94e107a9258bae3b7a0f97184978fd7daa41c8df8ac6c29e9261301192918252602082015260400190565b60405180910390a25b8215611c2d576130508660018587856000015461303791906143df565b61304191906143df565b61304b91906143cc565b6133eb565b846008600060018688866000015461306891906143df565b61307291906143df565b61307c91906143cc565b81526020810191909152604001600020558261309781614688565b93505061301a565b60006001600160e01b031982166380ac58cd60e01b14806130d057506001600160e01b03198216635b5e139f60e01b145b806107ac57506301ffc9a760e01b6001600160e01b03198316146107ac565b6130f98282611715565b610e1357613111816001600160a01b03166014613405565b61311c836020613405565b60405160200161312d92919061469f565b60408051601f198184030181529082905262461bcd60e51b82526108df916004016137ab565b6002600754036131a55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108df565b60026007556001600160a01b038316158015906131ca57506001600160a01b03821615155b156132e057601254158015906131f6575060008181526008602090815260408220549091526009905260015b156132a65760008181526008602052604090205460128054909190811061321f5761321f61400b565b9060005260206000209060070201600401546000146132a65760405162461bcd60e51b815260206004820152603a60248201527f52414952204552433732313a205472616e736665727320666f7220746869732060448201527f72616e6765206172652063757272656e746c79206c6f636b656400000000000060648201526084016108df565b601154610100900460ff16156132e0576132e07f872340a532bdd7bb02bea115c1b0f1ba87eac982f5b79b51ac189ffaac1b6fce336130ef565b5050600160075550565b60006001600160a01b0384163b156133e057604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061332e903390899088908890600401614714565b6020604051808303816000875af1925050508015613369575060408051601f3d908101601f1916820190925261336691810190614747565b60015b6133c6573d808015613397576040519150601f19603f3d011682016040523d82523d6000602084013e61339c565b606091505b5080516000036133be5760405162461bcd60e51b81526004016108df90614622565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506128a2565b506001949350505050565b610e138282604051806020016040528060008152506135a7565b606060006134148360026141d6565b61341f9060026143df565b6001600160401b0381111561343657613436613aa4565b6040519080825280601f01601f191660200182016040528015613460576020820181803683370190505b509050600360fc1b8160008151811061347b5761347b61400b565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106134aa576134aa61400b565b60200101906001600160f81b031916908160001a90535060006134ce8460026141d6565b6134d99060016143df565b90505b6001811115613551576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061350d5761350d61400b565b1a60f81b8282815181106135235761352361400b565b60200101906001600160f81b031916908160001a90535060049490941c9361354a81614688565b90506134dc565b5083156135a05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108df565b9392505050565b6135b183836135da565b6135be60008484846132ea565b6109805760405162461bcd60e51b81526004016108df90614622565b6001600160a01b0382166136305760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108df565b6000818152600260205260409020546001600160a01b0316156136955760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108df565b6136a160008383613153565b6001600160a01b03821660009081526003602052604081208054600192906136ca9084906143df565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b0319811681146123e057600080fd5b60006020828403121561375057600080fd5b81356135a081613728565b60005b8381101561377657818101518382015260200161375e565b50506000910152565b6000815180845261379781602086016020860161375b565b601f01601f19169290920160200192915050565b6020815260006135a0602083018461377f565b6000602082840312156137d057600080fd5b5035919050565b80356001600160a01b03811681146137ee57600080fd5b919050565b6000806040838503121561380657600080fd5b61380f836137d7565b946020939093013593505050565b60008083601f84011261382f57600080fd5b5081356001600160401b0381111561384657600080fd5b602083019150836020828501011115610b7f57600080fd5b600080600080600080600060c0888a03121561387957600080fd5b873596506020880135955060408801359450606088013593506080880135925060a08801356001600160401b038111156138b257600080fd5b6138be8a828b0161381d565b989b979a50959850939692959293505050565b6000806000604084860312156138e657600080fd5b8335925060208401356001600160401b0381111561390357600080fd5b61390f8682870161381d565b9497909650939450505050565b60008060006060848603121561393157600080fd5b61393a846137d7565b9250613948602085016137d7565b9150604084013590509250925092565b6000806040838503121561396b57600080fd5b50508035926020909101359150565b6000806040838503121561398d57600080fd5b8235915061399d602084016137d7565b90509250929050565b60008083601f8401126139b857600080fd5b5081356001600160401b038111156139cf57600080fd5b6020830191508360208260051b8501011115610b7f57600080fd5b6000806000604084860312156139ff57600080fd5b8335925060208401356001600160401b03811115613a1c57600080fd5b61390f868287016139a6565b60006020808352835181840152808401516040840152604084015160806060850152613a5760a085018261377f565b6060860151858203601f19016080870152805180835290840192506000918401905b80831015613a995783518252928401926001929092019190840190613a79565b509695505050505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115613ad457613ad4613aa4565b604051601f8501601f19908116603f01168101908282118183101715613afc57613afc613aa4565b81604052809350858152868686011115613b1557600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112613b4057600080fd5b6135a083833560208501613aba565b600080600080600060a08688031215613b6757600080fd5b8535945060208601356001600160401b03811115613b8457600080fd5b613b9088828901613b2f565b959895975050505060408401359360608101359360809091013592509050565b60008060008060808587031215613bc657600080fd5b613bcf856137d7565b966020860135965060408601359560600135945092505050565b600060208284031215613bfb57600080fd5b6135a0826137d7565b803580151581146137ee57600080fd5b60008060008060608587031215613c2a57600080fd5b8435935060208501356001600160401b03811115613c4757600080fd5b613c538782880161381d565b9094509250613c66905060408601613c04565b905092959194509250565b60008060208385031215613c8457600080fd5b82356001600160401b03811115613c9a57600080fd5b613ca68582860161381d565b90969095509350505050565b600060208284031215613cc457600080fd5b6135a082613c04565b60008060408385031215613ce057600080fd5b613ce9836137d7565b915061399d60208401613c04565b600060208284031215613d0957600080fd5b813561ffff811681146135a057600080fd5b600080600060408486031215613d3057600080fd5b83356001600160401b03811115613d4657600080fd5b613d528682870161381d565b9094509250613d65905060208501613c04565b90509250925092565b60008060008060808587031215613d8457600080fd5b613d8d856137d7565b9350613d9b602086016137d7565b92506040850135915060608501356001600160401b03811115613dbd57600080fd5b8501601f81018713613dce57600080fd5b613ddd87823560208401613aba565b91505092959194509250565b600080600060608486031215613dfe57600080fd5b505081359360208301359350604090920135919050565b60008060008060408587031215613e2b57600080fd5b84356001600160401b0380821115613e4257600080fd5b613e4e888389016139a6565b90965094506020870135915080821115613e6757600080fd5b50613e74878288016139a6565b95989497509550505050565b60408152825160408201526020830151606082015260408301516080820152606083015160a0820152608083015160c082015260a083015160e0820152600060c084015160e0610100840152613eda61012084018261377f565b9150508260208301529392505050565b600080600060608486031215613eff57600080fd5b613f08846137d7565b95602085013595506040909401359392505050565b60008060408385031215613f3057600080fd5b82356001600160401b03811115613f4657600080fd5b613f5285828601613b2f565b95602094909401359450505050565b60008060408385031215613f7457600080fd5b613f7d836137d7565b915061399d602084016137d7565b600181811c90821680613f9f57607f821691505b602082108103613fbf57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526026908201527f52414952204552433732313a20436f6c6c656374696f6e20646f6573206e6f7460408201526508195e1a5cdd60d21b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b601f82111561098057600081815260208120601f850160051c810160208610156140485750805b601f850160051c820191505b81811015611c2d57828155600101614054565b6001600160401b0383111561407e5761407e613aa4565b6140928361408c8354613f8b565b83614021565b6000601f8411600181146140c657600085156140ae5750838201355b600019600387901b1c1916600186901b178355612200565b600083815260209020601f19861690835b828110156140f757868501358255602094850194600190920191016140d7565b50868210156141145760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b838152604060208201526000614169604083018486614126565b95945050505050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176107ac576107ac6141c0565b634e487b7160e01b600052601260045260246000fd5b600082614212576142126141ed565b500490565b60008235609e1983360301811261422d57600080fd5b9190910192915050565b6000808335601e1984360301811261424e57600080fd5b8301803591506001600160401b0382111561426857600080fd5b602001915036819003821315610b7f57600080fd5b60006001820161428f5761428f6141c0565b5060010190565b60208082526021908201527f52414952204552433732313a2052616e676520646f6573206e6f7420657869736040820152601d60fa1b606082015260800190565b81516001600160401b038111156142f0576142f0613aa4565b614304816142fe8454613f8b565b84614021565b602080601f83116001811461433957600084156143215750858301515b600019600386901b1c1916600185901b178555611c2d565b600085815260208120601f198616915b8281101561436857888601518255948401946001909101908401614349565b50858210156143865787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b85815260a0602082015260006143af60a083018761377f565b604083019590955250606081019290925260809091015292915050565b818103818111156107ac576107ac6141c0565b808201808211156107ac576107ac6141c0565b600081546143ff81613f8b565b80855260206001838116801561441c576001811461443657614464565b60ff1985168884015283151560051b880183019550614464565b866000528260002060005b8581101561445c5781548a8201860152908301908401614441565b890184019650505b505050505092915050565b858152608060208201526000614489608083018688614126565b841515604084015282810360608401526144a381856143f2565b98975050505050505050565b6020815260006128a2602083018486614126565b6020815260006135a060208301846143f2565b6060815260006144ea606083018688614126565b8415156020840152828103604084015261450481856143f2565b979650505050505050565b6000845160206145228285838a0161375b565b8551918401916145358184848a0161375b565b855492019160009061454681613f8b565b6001828116801561455e57600181146145735761459f565b60ff198416875282151583028701945061459f565b896000528560002060005b848110156145975781548982015290830190870161457e565b505082870194505b50929a9950505050505050505050565b6060815260006145c2606083018661377f565b60208301949094525060400152919050565b60006101008a83528960208401528860408401528760608401528660808401528560a08401528060c084015261460c818401866143f2565b9150508260e08301529998505050505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082614683576146836141ed565b500690565b600081614697576146976141c0565b506000190190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516146d781601785016020880161375b565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161470881602884016020880161375b565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611b469083018461377f565b60006020828403121561475957600080fd5b81516135a08161372856fea2646970667358221220233a5906567ce64c1d91905e31bc5c1b2127e3da28e111ca9cac366662c31b1c64736f6c63430008110033

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

00000000000000000000000000000000000000000000000000000000000000400000000000000000000000007849194dd593d6c3aed24035d70b5394a1c90f8f000000000000000000000000000000000000000000000000000000000000000853494d20446f6773000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _contractName (string): SIM Dogs
Arg [1] : _creatorAddress (address): 0x7849194dD593d6c3aeD24035D70B5394a1C90F8F

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000007849194dd593d6c3aed24035d70b5394a1c90f8f
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [3] : 53494d20446f6773000000000000000000000000000000000000000000000000


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.