ETH Price: $3,345.05 (-0.96%)

Token

LVCIDIA// STAR (STAR)
 

Overview

Max Total Supply

2,368 STAR

Holders

496

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Filtered by Token Holder
simnet.eth
Balance
8 STAR
0x8264e9e0f4cbcbbbb3f8ecaec0a625b590ae790e
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:
Star

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 1000 runs

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

pragma solidity ^0.8.0;

/// @author: manifold.xyz

////////////////////////////////////////////////////////////////////////////////////////
//                                                                                    //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ██████████████▌          ╟██           ████████████████          j██████████████  //
//  ██████████████▌          ╟███           ███████████████          j██████████████  //
//  ██████████████▌          ╟███▌           ██████████████          j██████████████  //
//  ██████████████▌          ╟████▌           █████████████          j██████████████  //
//  ██████████████▌          ╟█████▌          ╙████████████          j██████████████  //
//  ██████████████▌          ╟██████▄          ╙███████████          j██████████████  //
//  ██████████████▌          ╟███████           ╙██████████          j██████████████  //
//  ██████████████▌          ╟████████           ╟█████████          j██████████████  //
//  ██████████████▌          ╟█████████           █████████          j██████████████  //
//  ██████████████▌          ╟██████████           ████████          j██████████████  //
//  ██████████████▌          ╟██████████▌           ███████          j██████████████  //
//  ██████████████▌          ╟███████████▌           ██████          j██████████████  //
//  ██████████████▌          ╟████████████▄          ╙█████        ,████████████████  //
//  ██████████████▌          ╟█████████████           ╙████      ▄██████████████████  //
//  ██████████████▌          ╟██████████████           ╙███    ▄████████████████████  //
//  ██████████████▌          ╟███████████████           ╟██ ,███████████████████████  //
//  ██████████████▌                      ,████           ███████████████████████████  //
//  ██████████████▌                    ▄██████▌           ██████████████████████████  //
//  ██████████████▌                  ▄█████████▌           █████████████████████████  //
//  ██████████████▌               ,█████████████▄           ████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "../resources/IResources.sol";
import "./IStar.sol";
import "./IStarMetadata.sol";

contract Star is ERC721, IStar, Ownable {

    // Resources contract address
    address public immutable RESOURCES_ADDRESS;

    // Contract which renders star metadata
    address private _starMetadataContract;

    // Star type to star ingredients
    mapping(uint8 => StarIngredient[]) private _starIngredients;

    // Star type for a given star token id
    mapping(uint256 => StarInfo) private _starInfo;

    mapping(uint8 => uint256) private _starSupply;
    mapping(uint8 => uint256) private _starMaxSupply;

    // Total star supply
    uint256 public totalSupply;

    // Royalty configuration
    uint256 private _royaltyBps;
    address payable private _royaltyRecipient;
    bytes4 private constant _INTERFACE_ID_ROYALTIES_CREATORCORE = 0xbb3bafd6;
    bytes4 private constant _INTERFACE_ID_ROYALTIES_EIP2981 = 0x2a55205a;
    bytes4 private constant _INTERFACE_ID_ROYALTIES_RARIBLE = 0xb7799584;

    constructor(address resourcesAddress) ERC721("LVCIDIA// STAR", "STAR") {
        RESOURCES_ADDRESS = resourcesAddress;
    }

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

    /**
     * @dev See {IStar-updateStarIngredients}.
     */
    function updateStarIngredients(uint8[] calldata starTypes, StarIngredient[][] calldata starIngredients) external override onlyOwner {
        require(starTypes.length == starIngredients.length, "Invalid input");
        uint256 typesLength = starTypes.length;
        for (uint i = 0; i < typesLength;) {
            uint8 starType = starTypes[i];
            delete _starIngredients[starType];
            StarIngredient[] memory newIngredients = starIngredients[i];
            uint256 ingredientsLength = newIngredients.length;
            for (uint j = 0; j < ingredientsLength; ) {
                _starIngredients[starType].push(newIngredients[j]);
                unchecked { j++; }
            }
            unchecked { i++; }
        }
    }

    /**
     * @dev See {IStar-getStarIngredients}.
     */
    function getStarIngredients(uint8 starType) external view override returns(StarIngredient[] memory) {
      return _starIngredients[starType];
    }

    /**
     * @dev See {IStar-updateStarMetadata}.
     */
    function updateStarMetadata(address starMetadata) external override onlyOwner {
        _starMetadataContract = starMetadata;
    }

    /**
     * @dev See {IStar-getStarSupply}.
     */
    function getStarSupply(uint8 starType) external view override returns(uint256) {
      return _starSupply[starType];
    }

    /**
     * @dev See {IStar-getStarMaxSupply}.
     */
    function getStarMaxSupply(uint8 starType) external view override returns(uint256) {
      return _starMaxSupply[starType];
    }

    /**
     * @dev See {IStar-updateStarMaxSupplies}.
     */
    function updateStarMaxSupplies(uint8[] calldata starTypes, uint256[] calldata maxSupplies) external override onlyOwner {
        require(starTypes.length == maxSupplies.length, "Invalid input");
        uint256 typesLength = starTypes.length;
        for (uint i = 0; i < typesLength;) {
            _starMaxSupply[starTypes[i]] = maxSupplies[i];
            unchecked { i++; }
        }
    }

    /**
     * @dev See {IStar-formStar}.
     */
    function formStar(uint8 starType) external override returns(uint256) {
        StarIngredient[] memory ingredients = _starIngredients[starType];
        uint256 length = ingredients.length;
        require(length > 0, "Invalid star type");

        require(_starSupply[starType] < _starMaxSupply[starType], "Max supply reached for star type");

        uint256[] memory resourceIds = new uint256[](length);
        uint256[] memory amounts = new uint256[](length);
        for (uint i = 0; i < length;) {
            StarIngredient memory ingredient = ingredients[i];
            resourceIds[i] = ingredient.resourceId;
            amounts[i] = ingredient.amount;
            unchecked { i++; }
        }

        // Burn required resources
        IResources(RESOURCES_ADDRESS).burn(msg.sender, resourceIds, amounts);

        _starSupply[starType]++;
        totalSupply++;

        // Info used by IStartMetadata contact to determine metadata
        _starInfo[totalSupply] = StarInfo(starType, uint48(block.timestamp), tx.origin);

        _mint(msg.sender, totalSupply);
        return totalSupply;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
        require(_exists(_starInfo[tokenId].starType), "Query for malformed NFT");
        require(_starMetadataContract != address(0), "No metadata contract");

        return IStarMetadata(_starMetadataContract).metadata(tokenId, _starInfo[tokenId]);
    }

    /**
     * @dev Update royalties
     */
    function updateRoyalties(address payable recipient, uint256 bps) external onlyOwner {
        _royaltyRecipient = recipient;
        _royaltyBps = bps;
    }

    /**
     * ROYALTY FUNCTIONS
     */
    function getRoyalties(uint256) external view returns (address payable[] memory recipients, uint256[] memory bps) {
        if (_royaltyRecipient != address(0x0)) {
            recipients = new address payable[](1);
            recipients[0] = _royaltyRecipient;
            bps = new uint256[](1);
            bps[0] = _royaltyBps;
        }
        return (recipients, bps);
    }

    function getFeeRecipients(uint256) external view returns (address payable[] memory recipients) {
        if (_royaltyRecipient != address(0x0)) {
            recipients = new address payable[](1);
            recipients[0] = _royaltyRecipient;
        }
        return recipients;
    }

    function getFeeBps(uint256) external view returns (uint[] memory bps) {
        if (_royaltyRecipient != address(0x0)) {
            bps = new uint256[](1);
            bps[0] = _royaltyBps;
        }
        return bps;
    }

    function royaltyInfo(uint256, uint256 value) external view returns (address, uint256) {
        return (_royaltyRecipient, value*_royaltyBps/10000);
    }
}

File 2 of 15 : IResources.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

////////////////////////////////////////////////////////////////////////////////////////
//                                                                                    //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ██████████████▌          ╟██           ████████████████          j██████████████  //
//  ██████████████▌          ╟███           ███████████████          j██████████████  //
//  ██████████████▌          ╟███▌           ██████████████          j██████████████  //
//  ██████████████▌          ╟████▌           █████████████          j██████████████  //
//  ██████████████▌          ╟█████▌          ╙████████████          j██████████████  //
//  ██████████████▌          ╟██████▄          ╙███████████          j██████████████  //
//  ██████████████▌          ╟███████           ╙██████████          j██████████████  //
//  ██████████████▌          ╟████████           ╟█████████          j██████████████  //
//  ██████████████▌          ╟█████████           █████████          j██████████████  //
//  ██████████████▌          ╟██████████           ████████          j██████████████  //
//  ██████████████▌          ╟██████████▌           ███████          j██████████████  //
//  ██████████████▌          ╟███████████▌           ██████          j██████████████  //
//  ██████████████▌          ╟████████████▄          ╙█████        ,████████████████  //
//  ██████████████▌          ╟█████████████           ╙████      ▄██████████████████  //
//  ██████████████▌          ╟██████████████           ╙███    ▄████████████████████  //
//  ██████████████▌          ╟███████████████           ╟██ ,███████████████████████  //
//  ██████████████▌                      ,████           ███████████████████████████  //
//  ██████████████▌                    ▄██████▌           ██████████████████████████  //
//  ██████████████▌                  ▄█████████▌           █████████████████████████  //
//  ██████████████▌               ,█████████████▄           ████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";

interface IResources is IERC1155 {

    /**
     * @dev Mint tokens
     */
    function mint(address to, uint256[] memory tokenIds, uint256[] memory amounts) external;

    /**
     * @dev Set the tokenURI of a token.
     */
    function setTokenURI(uint256 tokenId, string calldata uri_) external;

    /**
     * @dev set the tokenURI of multiple tokens.
     */
    function setTokenURIs(uint256[] memory tokenIds, string[] calldata uris) external;

    /**
     * @dev burn tokens. Can only be called by token owner or approved address.
     * On burn, calls back to the registered extension's onBurn method
     */
    function burn(address account, uint256[] calldata tokenIds, uint256[] calldata amounts) external;

    /**
     * @dev Total amount of tokens of resource with a given id.
     */
    function totalSupply(uint256 tokenId) external view returns (uint256);

    /**
     * @dev Total amount of burned tokens of resource with a given id.
     */
    function burnedSupply(uint256 tokenId) external view returns (uint256);
}

File 3 of 15 : IStarMetadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

////////////////////////////////////////////////////////////////////////////////////////
//                                                                                    //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ██████████████▌          ╟██           ████████████████          j██████████████  //
//  ██████████████▌          ╟███           ███████████████          j██████████████  //
//  ██████████████▌          ╟███▌           ██████████████          j██████████████  //
//  ██████████████▌          ╟████▌           █████████████          j██████████████  //
//  ██████████████▌          ╟█████▌          ╙████████████          j██████████████  //
//  ██████████████▌          ╟██████▄          ╙███████████          j██████████████  //
//  ██████████████▌          ╟███████           ╙██████████          j██████████████  //
//  ██████████████▌          ╟████████           ╟█████████          j██████████████  //
//  ██████████████▌          ╟█████████           █████████          j██████████████  //
//  ██████████████▌          ╟██████████           ████████          j██████████████  //
//  ██████████████▌          ╟██████████▌           ███████          j██████████████  //
//  ██████████████▌          ╟███████████▌           ██████          j██████████████  //
//  ██████████████▌          ╟████████████▄          ╙█████        ,████████████████  //
//  ██████████████▌          ╟█████████████           ╙████      ▄██████████████████  //
//  ██████████████▌          ╟██████████████           ╙███    ▄████████████████████  //
//  ██████████████▌          ╟███████████████           ╟██ ,███████████████████████  //
//  ██████████████▌                      ,████           ███████████████████████████  //
//  ██████████████▌                    ▄██████▌           ██████████████████████████  //
//  ██████████████▌                  ▄█████████▌           █████████████████████████  //
//  ██████████████▌               ,█████████████▄           ████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "./IStar.sol";

interface IStarMetadata is IERC165 {
    struct StarLvminance {
        uint16 min;
        uint16 max;
    }

    /**
     * @dev Returns JSON Data URL containing JSON for a star given its id and StarInfo.
     */
    function metadata(uint256 tokenId, IStar.StarInfo memory starInfo) view external returns(string memory);

    /**
     * @dev Allows overriding the default name of a star for customization.
     *      Available to only the Admin, for adding new Stars or fixing a malformed Star.
     */
    function updateStar(uint8 starType, string memory arweaveHash, uint16 min, uint16 max) external;

    /**
     * @dev Allows for changing where the Star names are looked up on chain.
     */
    function updateStarNameLookup(address starNameLookup) external;

    /**
     * @dev Allows overriding the default name of a star for customization.
     *      Available to only the owner of the token.
     *      See {IStarName-setOverride}.
     */
    function setName(uint256 tokenId, string memory name) external;

}

File 4 of 15 : IStar.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

////////////////////////////////////////////////////////////////////////////////////////
//                                                                                    //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ██████████████▌          ╟██           ████████████████          j██████████████  //
//  ██████████████▌          ╟███           ███████████████          j██████████████  //
//  ██████████████▌          ╟███▌           ██████████████          j██████████████  //
//  ██████████████▌          ╟████▌           █████████████          j██████████████  //
//  ██████████████▌          ╟█████▌          ╙████████████          j██████████████  //
//  ██████████████▌          ╟██████▄          ╙███████████          j██████████████  //
//  ██████████████▌          ╟███████           ╙██████████          j██████████████  //
//  ██████████████▌          ╟████████           ╟█████████          j██████████████  //
//  ██████████████▌          ╟█████████           █████████          j██████████████  //
//  ██████████████▌          ╟██████████           ████████          j██████████████  //
//  ██████████████▌          ╟██████████▌           ███████          j██████████████  //
//  ██████████████▌          ╟███████████▌           ██████          j██████████████  //
//  ██████████████▌          ╟████████████▄          ╙█████        ,████████████████  //
//  ██████████████▌          ╟█████████████           ╙████      ▄██████████████████  //
//  ██████████████▌          ╟██████████████           ╙███    ▄████████████████████  //
//  ██████████████▌          ╟███████████████           ╟██ ,███████████████████████  //
//  ██████████████▌                      ,████           ███████████████████████████  //
//  ██████████████▌                    ▄██████▌           ██████████████████████████  //
//  ██████████████▌                  ▄█████████▌           █████████████████████████  //
//  ██████████████▌               ,█████████████▄           ████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//  ████████████████████████████████████████████████████████████████████████████████  //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

interface IStar is IERC165 {

    struct StarInfo {
        uint8 starType;
        uint48 starTime;
        address creator;
    }

    struct StarIngredient {
        uint256 resourceId;
        uint256 amount;
    }

    /**
     * Update/set star ingredients
     */
    function updateStarIngredients(uint8[] calldata starTypes, StarIngredient[][] calldata starIngredients) external;

    /**
     * Update/set star type max supplies
     */
    function updateStarMaxSupplies(uint8[] calldata starTypes, uint256[] calldata maxSupplies) external;

    /**
     * Update the star metadata contract
     */
    function updateStarMetadata(address starMetadata) external;

    /**
     * Getter for supply of star type
     */
    function getStarSupply(uint8 starType) external returns(uint256);

    /**
     * Getter for max supply of star type
     */
    function getStarMaxSupply(uint8 starType) external returns(uint256);

    /**
     * Getter for ingredients of star type
     */
    function getStarIngredients(uint8 starType) external returns(StarIngredient[] memory);

    /**
     * Form a star of a given star type by burning resources
     */
    function formStar(uint8 starType) external returns(uint256);
}

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

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

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

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

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

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

File 6 of 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 7 of 15 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 8 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 9 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 10 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);
            }
        }
    }
}

File 11 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 12 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 13 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 14 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 15 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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"resourcesAddress","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":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"RESOURCES_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"starType","type":"uint8"}],"name":"formStar","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"starType","type":"uint8"}],"name":"getStarIngredients","outputs":[{"components":[{"internalType":"uint256","name":"resourceId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IStar.StarIngredient[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"starType","type":"uint8"}],"name":"getStarMaxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"starType","type":"uint8"}],"name":"getStarSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"bps","type":"uint256"}],"name":"updateRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8[]","name":"starTypes","type":"uint8[]"},{"components":[{"internalType":"uint256","name":"resourceId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IStar.StarIngredient[][]","name":"starIngredients","type":"tuple[][]"}],"name":"updateStarIngredients","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8[]","name":"starTypes","type":"uint8[]"},{"internalType":"uint256[]","name":"maxSupplies","type":"uint256[]"}],"name":"updateStarMaxSupplies","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"starMetadata","type":"address"}],"name":"updateStarMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a034620003ae57601f906001600160401b0390601f1990620025653881900385810184168301858111848210176200039857839282916040528339602092839181010312620003ae57516001600160a01b03949093908585168503620003ae576200006a620003b3565b92600e84526d262b21a4a224a097979029aa20a960911b818501526200008f620003b3565b90600482526329aa20a960e11b8183015284519584871162000398576000968754966001978881811c911680156200038d575b85821014620003795790818784931162000326575b508490878311600114620002c5578a92620002b9575b5050600019600383901b1c191690871b1787555b8251948511620002a55785548681811c911680156200029a575b8382101462000286579081858796959493116200022d575b5081938511600114620001c85750508592620001bc575b5050600019600383901b1c191690821b1790555b600654903360018060a01b03198316176006557f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0604051943393169180a36080526121919081620003d4823960805181818161057e0152610c200152f35b0151905038806200014a565b869593929193168588528388209388905b828210620002135750508411620001f9575b505050811b0190556200015e565b015160001960f88460031b161c19169055388080620001eb565b8484015186558897909501949384019390810190620001d9565b9091929394508688528288208580880160051c8201928589106200027c575b9188978a9297969594930160051c01915b8281106200026d57505062000133565b8a81558897508991016200025d565b925081926200024c565b634e487b7160e01b88526022600452602488fd5b90607f16906200011b565b634e487b7160e01b87526041600452602487fd5b015190503880620000ed565b90848a9416918b8052868c20928c5b888282106200030f5750508411620002f5575b505050811b01875562000101565b015160001960f88460031b161c19169055388080620002e7565b8385015186558d97909501949384019301620002d4565b909150898052848a208780850160051c8201928786106200036f575b918b91869594930160051c01915b82811062000360575050620000d7565b8c81558594508b910162000350565b9250819262000342565b634e487b7160e01b8a52602260045260248afd5b90607f1690620000c2565b634e487b7160e01b600052604160045260246000fd5b600080fd5b60408051919082016001600160401b03811183821017620003985760405256fe6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a7146116d05750806305e49c99146115f157806306fdde0314611526578063081812fc146114fe578063095ea7b3146113775780630ebd4c7f1461130f57806318160ddd146112f057806323b872dd146112c65780632a55205a1461126957806340c588f41461122a578063416cdb48146111f857806342842e0e146111a95780634edb1060146111445780636352211e146111145780636c2f5acd146110cf57806370a0823114611025578063715018a614610fca5780638cc9c9ce14610b725780638da5cb5b14610b4a57806395d89b4114610a34578063a22cb46514610963578063b2e981ef14610735578063b88d4fde146106ac578063b9c4d9fb14610644578063bb3bafd6146105a2578063c7aef0201461055e578063c87b56dd146102d3578063e6d3cc9b146102a1578063e985e9c51461024c5763f2fde38b1461016d57600080fd5b346102485760203660031901126102485761018661187b565b9061018f611a3e565b6001600160a01b038092169283156101df575050600654826001600160a01b0319821617600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b8280fd5b50503461029d578060031936011261029d5760209161026961187b565b82610272611896565b926001600160a01b03809316815260058652209116600052825260ff81600020541690519015158152f35b5080fd5b5034610248576020366003190112610248573560ff81168091036102485782829160209452600a845220549051908152f35b509034610248576020918260031936011261055a57803561030a8160005260026020526001600160a01b0360406000205416151590565b156104f2578085526009845261033c60ff848720541660005260026020526001600160a01b0360406000205416151590565b156104b0576001600160a01b03918260075416801561046e578291608491889485526009885286852095875196879586947fd564f76b0000000000000000000000000000000000000000000000000000000086528501525460ff8116602485015265ffffffffffff8160081c16604485015260381c1660648301525afa9384156104635780946103e0575b50506103dc9051928284938452830190611856565b0390f35b909193503d8082843e6103f381846119c3565b820191838184031261029d5780519067ffffffffffffffff8211610248570182601f8201121561029d57805191610429836119e5565b93610436875195866119c3565b838552858484010111610460575082916104589185806103dc96019101611833565b9290386103c7565b80fd5b8251903d90823e3d90fd5b6064828787519162461bcd60e51b8352820152601460248201527f4e6f206d6574616461746120636f6e74726163740000000000000000000000006044820152fd5b5082606492519162461bcd60e51b8352820152601760248201527f517565727920666f72206d616c666f726d6564204e46540000000000000000006044820152fd5b5082608492519162461bcd60e51b8352820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152fd5b8380fd5b50503461029d578160031936011261029d57602090516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50503461029d57602091826003193601126104605750606091826001600160a01b03600e5416806105f4575b50906103dc916105e78451958587968752860190611a01565b91848303908501526118ac565b9350506103dc9082519361060785611991565b6001855281368187013761061a856120e3565b52825161062681611991565b60018152813681830137600d5461063c826120e3565b5290916105ce565b50503461029d57602036600319011261029d576103dc91506060906001600160a01b03600e541680610684575b5051918291602083526020830190611a01565b8151925061069183611991565b60018352602036818501376106a5836120e3565b5238610671565b509034610248576080366003190112610248576106c761187b565b6106cf611896565b846064359467ffffffffffffffff861161029d573660238701121561029d57850135946107076106fe876119e5565b955195866119c3565b858552366024878301011161029d578561073296602460209301838801378501015260443591611bb9565b80f35b5090346102485761074536611946565b9161075294919394611a3e565b61075d83821461204c565b865b81811061076a578780f35b60ff61077f61077a83858a612097565b6120bd565b16808952602060088152848a208054908b8155816108fa575b5050858310156108e7578260051b870135601e19883603018112156108e357870180359067ffffffffffffffff82116108df57828101908260061b80360383136108db5784906107e7856120cb565b946107f48b5196876119c3565b8552818501920101913683116108db57905b8282106108ad575050508051928b5b84811061082957505050505060010161075f565b818d5260088452878d2061083d82856120f0565b5190805490680100000000000000008210156108985760018201808255821015610883578f6001949392888287948294522090831b019280518455015191015501610815565b505060248e60328f634e487b7160e01b835252fd5b505060248e60418f634e487b7160e01b835252fd5b88823603126108db5784899182516108c481611991565b843581528285013583820152815201910190610806565b8d80fd5b8b80fd5b8a80fd5b60248a60328b634e487b7160e01b835252fd5b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82168203610950578b52818b2090600190811b8201915b82811061093f5750610798565b808d600292558d8382015501610932565b60248c60118d634e487b7160e01b835252fd5b50903461024857806003193601126102485761097d61187b565b9060243591821515809303610a30576001600160a01b0316928333146109ee57503384526005602052808420836000526020528060002060ff1981541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b6020606492519162461bcd60e51b8352820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152fd5b8480fd5b5091346104605780600319360112610460578151918160019283549384811c91818616958615610b40575b6020968785108114610b2d578899509688969785829a529182600014610b06575050600114610aab575b5050506103dc9291610a9c9103856119c3565b51928284938452830190611856565b91908693508083527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828410610aee5750505082010181610a9c6103dc610a89565b8054848a018601528895508794909301928101610ad5565b60ff19168782015293151560051b86019093019350849250610a9c91506103dc9050610a89565b60248360228c634e487b7160e01b835252fd5b92607f1692610a5f565b50503461029d578160031936011261029d576020906001600160a01b03600654169051908152f35b5082903461029d5760209260031991848336011261055a57803560ff8116809103610a3057808552600886528285208054610bac816120cb565b91610bb9865193846119c3565b81835287528787208790898085015b848410610f9d5750505050508051948515610f5b57828752600a885284872054600b8952858820541115610f1a57610bff86612104565b95610c0981612104565b92885b828110610eeb575050506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690813b15610ee75791879291839287519485809481937f3db0f8ab000000000000000000000000000000000000000000000000000000008352338b84015260249c8d84016060905260648401610c95916118ac565b90838203016044840152610ca8916118ac565b03925af18015610edd57610eb0575b50808552600a8652828520610ccc8154612136565b9055610cd9600c54612136565b80600c558351916060830183811067ffffffffffffffff821117610e9c57855282528682019065ffffffffffff421682528483019032825287526009885260ff8588209351167fffffffffff0000000000000000000000000000000000000000000000000000007affffffffffffffffffffffffffffffffffffffff0000000000000066ffffffffffff008654955160081b16935160381b1693161717179055600c54923315610e5d57610da38460005260026020526001600160a01b0360406000205416151590565b610e1d57338552600386528285209081549260018401809411610e0c5750505581835260028452808320336001600160a01b0319825416179055519133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600c548152f35b60118791634e487b7160e01b835252fd5b601c9086606494519362461bcd60e51b85528401528201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152fd5b859081606494519362461bcd60e51b85528401528201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b86604186634e487b7160e01b600052526000fd5b67ffffffffffffffff8196929611610ecb5783529386610cb7565b5060418492634e487b7160e01b835252fd5b84513d88823e3d90fd5b8780fd5b808b610ef9600193856120f0565b518051610f06848e6120f0565b520151610f1382886120f0565b5201610c0c565b606484898088519262461bcd60e51b845283015260248201527f4d617820737570706c79207265616368656420666f72207374617220747970656044820152fd5b6064848987519162461bcd60e51b8352820152601160248201527f496e76616c6964207374617220747970650000000000000000000000000000006044820152fd5b6001916002918a51610fae81611991565b8554815284860154838201528152019201920191908a90610bc8565b8334610460578060031936011261046057610fe3611a3e565b806001600160a01b036006546001600160a01b03198116600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5082903461029d57602036600319011261029d576001600160a01b0361104961187b565b169081156110665760208480858581526003845220549051908152f35b608490602085519162461bcd60e51b8352820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152fd5b5090346102485736600319011261029d57356001600160a01b03811680910361029d576110fa611a3e565b6001600160a01b0319600e541617600e55602435600d5580f35b50913461046057602036600319011261046057506001600160a01b0361113c60209335611ae1565b915191168152f35b50503461029d5761115436611946565b61116094929194611a3e565b61116b81831461204c565b855b828110611178578680f35b806111866001928489612097565b3560ff61119761077a84888b612097565b168952600b602052858920550161116d565b5091903461029d576111ba366118e0565b91835193602085019085821067ffffffffffffffff8311176111e55761073296975052858452611bb9565b60248760418a634e487b7160e01b835252fd5b5034610248576020366003190112610248573560ff81168091036102485782829160209452600b845220549051908152f35b8334610460576020366003190112610460576001600160a01b0361124c61187b565b611254611a3e565b166001600160a01b0319600754161760075580f35b508234610460578260031936011261046057602435906001600160a01b03600e541692600d54928381029381850414901517156112b3575050612710908351928352046020820152f35b906011602492634e487b7160e01b835252fd5b8334610460576107326112d8366118e0565b916112eb6112e68433611c4f565b611b48565b611cbd565b50503461029d578160031936011261029d57602090600c549051908152f35b50503461029d57602036600319011261029d576103dc91506060906001600160a01b03600e541661134d575b519182916020835260208301906118ac565b8051915061135a82611991565b6001825260203681840137600d54611371836120e3565b5261133b565b503461024857816003193601126102485761139061187b565b90602435926001600160a01b039182806113a987611ae1565b1694169380851461149557803314908115611476575b501561140e578486526020528420826001600160a01b03198254161790556113e683611ae1565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b6020608492519162461bcd60e51b8352820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152fd5b90508652600560205281862033875260205260ff8287205416386113bf565b506020608492519162461bcd60e51b8352820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152fd5b50913461046057602036600319011261046057506001600160a01b0361113c60209335611b06565b50913461046057806003193601126104605781519181825492600184811c918186169586156115e7575b6020968785108114610b2d578899509688969785829a529182600014610b0657505060011461158c575050506103dc9291610a9c9103856119c3565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8284106115cf5750505082010181610a9c6103dc610a89565b8054848a0186015288955087949093019281016115b6565b92607f1692611550565b508234610460576020918260031936011261029d573560ff811680910361029d5781939293526008835281812090815461162a816120cb565b90611637855192836119c3565b8082528582018094845286842084915b83831061169a5750505050835194859481860192828752518093528086019493905b8382106116765786860387f35b84518051875283015186840152879650948501949382019360019190910190611669565b6002896001928a9b9897999a516116b081611991565b855481528486015483820152815201920192019190979695939497611647565b9250503461024857602036600319011261024857357fffffffff00000000000000000000000000000000000000000000000000000000811680910361024857602092507f80ac58cd000000000000000000000000000000000000000000000000000000008114908115611809575b81156117df575b81156117b5575b811561178b575b8115611761575b5015158152f35b7fb7799584000000000000000000000000000000000000000000000000000000009150143861175a565b7f2a55205a0000000000000000000000000000000000000000000000000000000081149150611753565b7fbb3bafd6000000000000000000000000000000000000000000000000000000008114915061174c565b7f01ffc9a70000000000000000000000000000000000000000000000000000000081149150611745565b7f5b5e139f000000000000000000000000000000000000000000000000000000008114915061173e565b60005b8381106118465750506000910152565b8181015183820152602001611836565b9060209161186f81518092818552858086019101611833565b601f01601f1916010190565b600435906001600160a01b038216820361189157565b600080fd5b602435906001600160a01b038216820361189157565b90815180825260208080930193019160005b8281106118cc575050505090565b8351855293810193928101926001016118be565b6060906003190112611891576001600160a01b0390600435828116810361189157916024359081168103611891579060443590565b9181601f840112156118915782359167ffffffffffffffff8311611891576020808501948460051b01011161189157565b60406003198201126118915767ffffffffffffffff91600435838111611891578261197391600401611915565b939093926024359182116118915761198d91600401611915565b9091565b6040810190811067ffffffffffffffff8211176119ad57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff8211176119ad57604052565b67ffffffffffffffff81116119ad57601f01601f191660200190565b90815180825260208080930193019160005b828110611a21575050505090565b83516001600160a01b031685529381019392810192600101611a13565b6001600160a01b03600654163303611a5257565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b15611a9d57565b606460405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152fd5b60005260026020526001600160a01b0360406000205416611b03811515611a96565b90565b611b2e611b298260005260026020526001600160a01b0360406000205416151590565b611a96565b60005260046020526001600160a01b036040600020541690565b15611b4f57565b608460405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152fd5b90611bdd939291611bcd6112e68433611c4f565b611bd8838383611cbd565b611e8f565b15611be457565b60405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b906001600160a01b038080611c6384611ae1565b16931691838314938415611c96575b508315611c80575b50505090565b611c8c91929350611b06565b1614388080611c7a565b909350600052600560205260406000208260005260205260ff604060002054169238611c72565b611cc683611ae1565b916001600160a01b0392838093169283911603611e25578216918215611dbc576000908482526004602052848260408120926001600160a01b031993848154169055611d1183611ae1565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258280a48282526003602052604082208054600019810191908211611da8575583825260036020526040822080549060018201809211611da857558482526002602052604082208054909116841790557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9080a4565b602484634e487b7160e01b81526011600452fd5b608460405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152fd5b9293600093909291803b1561204157948491611f0396604051809481937f150b7a0200000000000000000000000000000000000000000000000000000000978884523360048501526001600160a01b0380921660248501526044840152608060648401528260209b8c976084830190611856565b0393165af1849181611fe9575b50611fc0575050503d600014611fb8573d611f2a816119e5565b90611f3860405192836119c3565b81528091833d92013e5b80519182611fb55760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b01fd5b506060611f42565b7fffffffff00000000000000000000000000000000000000000000000000000000161492509050565b9091508581813d831161203a575b61200181836119c3565b81010312610a3057517fffffffff0000000000000000000000000000000000000000000000000000000081168103610a30579038611f10565b503d611ff7565b505050915050600190565b1561205357565b606460405162461bcd60e51b815260206004820152600d60248201527f496e76616c696420696e707574000000000000000000000000000000000000006044820152fd5b91908110156120a75760051b0190565b634e487b7160e01b600052603260045260246000fd5b3560ff811681036118915790565b67ffffffffffffffff81116119ad5760051b60200190565b8051156120a75760200190565b80518210156120a75760209160051b010190565b9061210e826120cb565b61211b60405191826119c3565b828152809261212c601f19916120cb565b0190602036910137565b60001981146121455760010190565b634e487b7160e01b600052601160045260246000fdfea26469706673582212209acff11608ead6d655fe204815079a7a6a07de40dfe55568ad14560a68bdf89a64736f6c6343000811003300000000000000000000000097a20815a061eae224c4fdf3109731f73743db73

Deployed Bytecode

0x6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a7146116d05750806305e49c99146115f157806306fdde0314611526578063081812fc146114fe578063095ea7b3146113775780630ebd4c7f1461130f57806318160ddd146112f057806323b872dd146112c65780632a55205a1461126957806340c588f41461122a578063416cdb48146111f857806342842e0e146111a95780634edb1060146111445780636352211e146111145780636c2f5acd146110cf57806370a0823114611025578063715018a614610fca5780638cc9c9ce14610b725780638da5cb5b14610b4a57806395d89b4114610a34578063a22cb46514610963578063b2e981ef14610735578063b88d4fde146106ac578063b9c4d9fb14610644578063bb3bafd6146105a2578063c7aef0201461055e578063c87b56dd146102d3578063e6d3cc9b146102a1578063e985e9c51461024c5763f2fde38b1461016d57600080fd5b346102485760203660031901126102485761018661187b565b9061018f611a3e565b6001600160a01b038092169283156101df575050600654826001600160a01b0319821617600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b8280fd5b50503461029d578060031936011261029d5760209161026961187b565b82610272611896565b926001600160a01b03809316815260058652209116600052825260ff81600020541690519015158152f35b5080fd5b5034610248576020366003190112610248573560ff81168091036102485782829160209452600a845220549051908152f35b509034610248576020918260031936011261055a57803561030a8160005260026020526001600160a01b0360406000205416151590565b156104f2578085526009845261033c60ff848720541660005260026020526001600160a01b0360406000205416151590565b156104b0576001600160a01b03918260075416801561046e578291608491889485526009885286852095875196879586947fd564f76b0000000000000000000000000000000000000000000000000000000086528501525460ff8116602485015265ffffffffffff8160081c16604485015260381c1660648301525afa9384156104635780946103e0575b50506103dc9051928284938452830190611856565b0390f35b909193503d8082843e6103f381846119c3565b820191838184031261029d5780519067ffffffffffffffff8211610248570182601f8201121561029d57805191610429836119e5565b93610436875195866119c3565b838552858484010111610460575082916104589185806103dc96019101611833565b9290386103c7565b80fd5b8251903d90823e3d90fd5b6064828787519162461bcd60e51b8352820152601460248201527f4e6f206d6574616461746120636f6e74726163740000000000000000000000006044820152fd5b5082606492519162461bcd60e51b8352820152601760248201527f517565727920666f72206d616c666f726d6564204e46540000000000000000006044820152fd5b5082608492519162461bcd60e51b8352820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152fd5b8380fd5b50503461029d578160031936011261029d57602090516001600160a01b037f00000000000000000000000097a20815a061eae224c4fdf3109731f73743db73168152f35b50503461029d57602091826003193601126104605750606091826001600160a01b03600e5416806105f4575b50906103dc916105e78451958587968752860190611a01565b91848303908501526118ac565b9350506103dc9082519361060785611991565b6001855281368187013761061a856120e3565b52825161062681611991565b60018152813681830137600d5461063c826120e3565b5290916105ce565b50503461029d57602036600319011261029d576103dc91506060906001600160a01b03600e541680610684575b5051918291602083526020830190611a01565b8151925061069183611991565b60018352602036818501376106a5836120e3565b5238610671565b509034610248576080366003190112610248576106c761187b565b6106cf611896565b846064359467ffffffffffffffff861161029d573660238701121561029d57850135946107076106fe876119e5565b955195866119c3565b858552366024878301011161029d578561073296602460209301838801378501015260443591611bb9565b80f35b5090346102485761074536611946565b9161075294919394611a3e565b61075d83821461204c565b865b81811061076a578780f35b60ff61077f61077a83858a612097565b6120bd565b16808952602060088152848a208054908b8155816108fa575b5050858310156108e7578260051b870135601e19883603018112156108e357870180359067ffffffffffffffff82116108df57828101908260061b80360383136108db5784906107e7856120cb565b946107f48b5196876119c3565b8552818501920101913683116108db57905b8282106108ad575050508051928b5b84811061082957505050505060010161075f565b818d5260088452878d2061083d82856120f0565b5190805490680100000000000000008210156108985760018201808255821015610883578f6001949392888287948294522090831b019280518455015191015501610815565b505060248e60328f634e487b7160e01b835252fd5b505060248e60418f634e487b7160e01b835252fd5b88823603126108db5784899182516108c481611991565b843581528285013583820152815201910190610806565b8d80fd5b8b80fd5b8a80fd5b60248a60328b634e487b7160e01b835252fd5b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82168203610950578b52818b2090600190811b8201915b82811061093f5750610798565b808d600292558d8382015501610932565b60248c60118d634e487b7160e01b835252fd5b50903461024857806003193601126102485761097d61187b565b9060243591821515809303610a30576001600160a01b0316928333146109ee57503384526005602052808420836000526020528060002060ff1981541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b6020606492519162461bcd60e51b8352820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152fd5b8480fd5b5091346104605780600319360112610460578151918160019283549384811c91818616958615610b40575b6020968785108114610b2d578899509688969785829a529182600014610b06575050600114610aab575b5050506103dc9291610a9c9103856119c3565b51928284938452830190611856565b91908693508083527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828410610aee5750505082010181610a9c6103dc610a89565b8054848a018601528895508794909301928101610ad5565b60ff19168782015293151560051b86019093019350849250610a9c91506103dc9050610a89565b60248360228c634e487b7160e01b835252fd5b92607f1692610a5f565b50503461029d578160031936011261029d576020906001600160a01b03600654169051908152f35b5082903461029d5760209260031991848336011261055a57803560ff8116809103610a3057808552600886528285208054610bac816120cb565b91610bb9865193846119c3565b81835287528787208790898085015b848410610f9d5750505050508051948515610f5b57828752600a885284872054600b8952858820541115610f1a57610bff86612104565b95610c0981612104565b92885b828110610eeb575050506001600160a01b037f00000000000000000000000097a20815a061eae224c4fdf3109731f73743db731690813b15610ee75791879291839287519485809481937f3db0f8ab000000000000000000000000000000000000000000000000000000008352338b84015260249c8d84016060905260648401610c95916118ac565b90838203016044840152610ca8916118ac565b03925af18015610edd57610eb0575b50808552600a8652828520610ccc8154612136565b9055610cd9600c54612136565b80600c558351916060830183811067ffffffffffffffff821117610e9c57855282528682019065ffffffffffff421682528483019032825287526009885260ff8588209351167fffffffffff0000000000000000000000000000000000000000000000000000007affffffffffffffffffffffffffffffffffffffff0000000000000066ffffffffffff008654955160081b16935160381b1693161717179055600c54923315610e5d57610da38460005260026020526001600160a01b0360406000205416151590565b610e1d57338552600386528285209081549260018401809411610e0c5750505581835260028452808320336001600160a01b0319825416179055519133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600c548152f35b60118791634e487b7160e01b835252fd5b601c9086606494519362461bcd60e51b85528401528201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152fd5b859081606494519362461bcd60e51b85528401528201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b86604186634e487b7160e01b600052526000fd5b67ffffffffffffffff8196929611610ecb5783529386610cb7565b5060418492634e487b7160e01b835252fd5b84513d88823e3d90fd5b8780fd5b808b610ef9600193856120f0565b518051610f06848e6120f0565b520151610f1382886120f0565b5201610c0c565b606484898088519262461bcd60e51b845283015260248201527f4d617820737570706c79207265616368656420666f72207374617220747970656044820152fd5b6064848987519162461bcd60e51b8352820152601160248201527f496e76616c6964207374617220747970650000000000000000000000000000006044820152fd5b6001916002918a51610fae81611991565b8554815284860154838201528152019201920191908a90610bc8565b8334610460578060031936011261046057610fe3611a3e565b806001600160a01b036006546001600160a01b03198116600655167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5082903461029d57602036600319011261029d576001600160a01b0361104961187b565b169081156110665760208480858581526003845220549051908152f35b608490602085519162461bcd60e51b8352820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152fd5b5090346102485736600319011261029d57356001600160a01b03811680910361029d576110fa611a3e565b6001600160a01b0319600e541617600e55602435600d5580f35b50913461046057602036600319011261046057506001600160a01b0361113c60209335611ae1565b915191168152f35b50503461029d5761115436611946565b61116094929194611a3e565b61116b81831461204c565b855b828110611178578680f35b806111866001928489612097565b3560ff61119761077a84888b612097565b168952600b602052858920550161116d565b5091903461029d576111ba366118e0565b91835193602085019085821067ffffffffffffffff8311176111e55761073296975052858452611bb9565b60248760418a634e487b7160e01b835252fd5b5034610248576020366003190112610248573560ff81168091036102485782829160209452600b845220549051908152f35b8334610460576020366003190112610460576001600160a01b0361124c61187b565b611254611a3e565b166001600160a01b0319600754161760075580f35b508234610460578260031936011261046057602435906001600160a01b03600e541692600d54928381029381850414901517156112b3575050612710908351928352046020820152f35b906011602492634e487b7160e01b835252fd5b8334610460576107326112d8366118e0565b916112eb6112e68433611c4f565b611b48565b611cbd565b50503461029d578160031936011261029d57602090600c549051908152f35b50503461029d57602036600319011261029d576103dc91506060906001600160a01b03600e541661134d575b519182916020835260208301906118ac565b8051915061135a82611991565b6001825260203681840137600d54611371836120e3565b5261133b565b503461024857816003193601126102485761139061187b565b90602435926001600160a01b039182806113a987611ae1565b1694169380851461149557803314908115611476575b501561140e578486526020528420826001600160a01b03198254161790556113e683611ae1565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b6020608492519162461bcd60e51b8352820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152fd5b90508652600560205281862033875260205260ff8287205416386113bf565b506020608492519162461bcd60e51b8352820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152fd5b50913461046057602036600319011261046057506001600160a01b0361113c60209335611b06565b50913461046057806003193601126104605781519181825492600184811c918186169586156115e7575b6020968785108114610b2d578899509688969785829a529182600014610b0657505060011461158c575050506103dc9291610a9c9103856119c3565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8284106115cf5750505082010181610a9c6103dc610a89565b8054848a0186015288955087949093019281016115b6565b92607f1692611550565b508234610460576020918260031936011261029d573560ff811680910361029d5781939293526008835281812090815461162a816120cb565b90611637855192836119c3565b8082528582018094845286842084915b83831061169a5750505050835194859481860192828752518093528086019493905b8382106116765786860387f35b84518051875283015186840152879650948501949382019360019190910190611669565b6002896001928a9b9897999a516116b081611991565b855481528486015483820152815201920192019190979695939497611647565b9250503461024857602036600319011261024857357fffffffff00000000000000000000000000000000000000000000000000000000811680910361024857602092507f80ac58cd000000000000000000000000000000000000000000000000000000008114908115611809575b81156117df575b81156117b5575b811561178b575b8115611761575b5015158152f35b7fb7799584000000000000000000000000000000000000000000000000000000009150143861175a565b7f2a55205a0000000000000000000000000000000000000000000000000000000081149150611753565b7fbb3bafd6000000000000000000000000000000000000000000000000000000008114915061174c565b7f01ffc9a70000000000000000000000000000000000000000000000000000000081149150611745565b7f5b5e139f000000000000000000000000000000000000000000000000000000008114915061173e565b60005b8381106118465750506000910152565b8181015183820152602001611836565b9060209161186f81518092818552858086019101611833565b601f01601f1916010190565b600435906001600160a01b038216820361189157565b600080fd5b602435906001600160a01b038216820361189157565b90815180825260208080930193019160005b8281106118cc575050505090565b8351855293810193928101926001016118be565b6060906003190112611891576001600160a01b0390600435828116810361189157916024359081168103611891579060443590565b9181601f840112156118915782359167ffffffffffffffff8311611891576020808501948460051b01011161189157565b60406003198201126118915767ffffffffffffffff91600435838111611891578261197391600401611915565b939093926024359182116118915761198d91600401611915565b9091565b6040810190811067ffffffffffffffff8211176119ad57604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff8211176119ad57604052565b67ffffffffffffffff81116119ad57601f01601f191660200190565b90815180825260208080930193019160005b828110611a21575050505090565b83516001600160a01b031685529381019392810192600101611a13565b6001600160a01b03600654163303611a5257565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b15611a9d57565b606460405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152fd5b60005260026020526001600160a01b0360406000205416611b03811515611a96565b90565b611b2e611b298260005260026020526001600160a01b0360406000205416151590565b611a96565b60005260046020526001600160a01b036040600020541690565b15611b4f57565b608460405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152fd5b90611bdd939291611bcd6112e68433611c4f565b611bd8838383611cbd565b611e8f565b15611be457565b60405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b906001600160a01b038080611c6384611ae1565b16931691838314938415611c96575b508315611c80575b50505090565b611c8c91929350611b06565b1614388080611c7a565b909350600052600560205260406000208260005260205260ff604060002054169238611c72565b611cc683611ae1565b916001600160a01b0392838093169283911603611e25578216918215611dbc576000908482526004602052848260408120926001600160a01b031993848154169055611d1183611ae1565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258280a48282526003602052604082208054600019810191908211611da8575583825260036020526040822080549060018201809211611da857558482526002602052604082208054909116841790557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9080a4565b602484634e487b7160e01b81526011600452fd5b608460405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152fd5b9293600093909291803b1561204157948491611f0396604051809481937f150b7a0200000000000000000000000000000000000000000000000000000000978884523360048501526001600160a01b0380921660248501526044840152608060648401528260209b8c976084830190611856565b0393165af1849181611fe9575b50611fc0575050503d600014611fb8573d611f2a816119e5565b90611f3860405192836119c3565b81528091833d92013e5b80519182611fb55760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b01fd5b506060611f42565b7fffffffff00000000000000000000000000000000000000000000000000000000161492509050565b9091508581813d831161203a575b61200181836119c3565b81010312610a3057517fffffffff0000000000000000000000000000000000000000000000000000000081168103610a30579038611f10565b503d611ff7565b505050915050600190565b1561205357565b606460405162461bcd60e51b815260206004820152600d60248201527f496e76616c696420696e707574000000000000000000000000000000000000006044820152fd5b91908110156120a75760051b0190565b634e487b7160e01b600052603260045260246000fd5b3560ff811681036118915790565b67ffffffffffffffff81116119ad5760051b60200190565b8051156120a75760200190565b80518210156120a75760209160051b010190565b9061210e826120cb565b61211b60405191826119c3565b828152809261212c601f19916120cb565b0190602036910137565b60001981146121455760010190565b634e487b7160e01b600052601160045260246000fdfea26469706673582212209acff11608ead6d655fe204815079a7a6a07de40dfe55568ad14560a68bdf89a64736f6c63430008110033

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

00000000000000000000000097a20815a061eae224c4fdf3109731f73743db73

-----Decoded View---------------
Arg [0] : resourcesAddress (address): 0x97A20815a061EaE224c4fdF3109731f73743db73

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000097a20815a061eae224c4fdf3109731f73743db73


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.