ETH Price: $3,316.13 (+2.73%)

Contract

0x06903cC35c37f90B4A9ef38B0b037262a327F83B
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Safe Transfer Fr...210072982024-10-20 14:10:1192 days ago1729433411IN
Light Annual: LIGHTANNUAL Token
0 ETH0.000902118.70574217
Set Approval For...200485292024-06-08 17:13:59226 days ago1717866839IN
Light Annual: LIGHTANNUAL Token
0 ETH0.000397028.6104647
Set Approval For...196657162024-04-16 4:38:59279 days ago1713242339IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0002824511.67269804
Set Approval For...195546922024-03-31 15:13:35295 days ago1711898015IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0012315726.66087961
Set Approval For...193605302024-03-04 8:13:23322 days ago1709540003IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0027908960.41676997
Set Approval For...190749422024-01-24 7:15:11362 days ago1706080511IN
Light Annual: LIGHTANNUAL Token
0 ETH0.000219769.07307306
Set Approval For...188831222023-12-28 9:08:59389 days ago1703754539IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0015692733.97138018
Set Approval For...181308012023-09-13 23:58:35494 days ago1694649515IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0002847611.76793273
Set Approval For...180676112023-09-05 3:31:35503 days ago1693884695IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0004856610.53278797
Safe Transfer Fr...178905702023-08-11 8:51:47528 days ago1691743907IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0015360821.1680561
Set Executive Of...178905492023-08-11 8:47:35528 days ago1691743655IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0005125718.94424326
Set Financial Of...178905122023-08-11 8:40:11528 days ago1691743211IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0005068717.43630764
Set Approval For...176735342023-07-11 23:08:47558 days ago1689116927IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0006644614.38427539
Set Approval For...175281282023-06-21 12:47:23579 days ago1687351643IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0011854325.70878783
Set Approval For...174720382023-06-13 15:43:35587 days ago1686671015IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0011621325.20342719
Safe Transfer Fr...174720362023-06-13 15:43:11587 days ago1686670991IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0016210226.50989061
Set Approval For...173766422023-05-31 5:00:35600 days ago1685509235IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0015238833.04889537
Set Approval For...172978082023-05-20 2:56:59611 days ago1684551419IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0013521329.32413755
Set Approval For...170090342023-04-09 6:38:59652 days ago1681022339IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0004739519.58648466
Set Approval For...170064112023-04-08 21:45:59652 days ago1680990359IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0008928719.36399646
Safe Transfer Fr...169737782023-04-04 6:29:35657 days ago1680589775IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0011637219.24729343
Set Approval For...168650292023-03-19 23:29:11672 days ago1679268551IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0005356122.13464995
Safe Transfer Fr...168583042023-03-19 0:47:59673 days ago1679186879IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0008362613.67875379
Set Approval For...168357622023-03-15 20:46:59677 days ago1678913219IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0009982921.65023228
Set Approval For...168326432023-03-15 10:15:11677 days ago1678875311IN
Light Annual: LIGHTANNUAL Token
0 ETH0.0009091619.70700522
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
152766812022-08-04 15:24:24900 days ago1659626664
Light Annual: LIGHTANNUAL Token
100 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Light

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 14 : Light.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.15; // code below expects that integer overflows will revert
/*
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░██░░░░░██░░██████░░██░░██░░██████░░░░██████░░█████░░░██████░░
░░██░░░░░██░░██░░░░░░██░░██░░░░██░░░░░░██░░██░░██░░██░░░░██░░░░
░░██░░░░░██░░██░███░░██████░░░░██░░░░░░██████░░█████░░░░░██░░░░
░░██░░░░░██░░██░░██░░██░░██░░░░██░░░░░░██░░██░░██░░██░░░░██░░░░
░░█████░░██░░██████░░██░░██░░░░██░░░██░██░░██░░██░░██░░░░██░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
*/

import "./vendor/openzeppelin-contracts-4.6.0-d4fb3a89f9d0a39c7ee6f2601d33ffbf30085322/contracts/token/ERC721/ERC721.sol";
import "./vendor/openzeppelin-contracts-4.6.0-d4fb3a89f9d0a39c7ee6f2601d33ffbf30085322/contracts/utils/cryptography/MerkleProof.sol";
import "./vendor/openzeppelin-contracts-4.6.0-d4fb3a89f9d0a39c7ee6f2601d33ffbf30085322/contracts/utils/Strings.sol";
import "./ThreeChiefOfficersWithRoyalties.sol";
import "./Packing.sol";

/// @title  Light 💡
/// @notice This contract has reusable functions and is meant to be deployed multiple times to accommodate different
///         Light collections.
/// @author William Entriken
contract Light is ERC721, ThreeChiefOfficersWithRoyalties {
    /// @param startTime      effective beginning time for phase to take effect
    /// @param ethPrice       price in Wei for the sale
    /// @param accessListRoot Merkle root for addresses and quantities on an access list, or zero to indicate public
    ///                       availability; reusing an access list will continue depleting from that list
    struct DropPhase {
        uint64 startTime;
        uint128 ethPrice;
        bytes32 accessListRoot;
    }

    /// @param quantity     How many tokens are included in this drop
    /// @param passwordHash A secret hash known by the contract owner which is used to end the drop, or zero to indicate
    ///                     no randomness in this drop
    struct Drop {
        uint32 quantityForSale;
        uint32 quantitySold;
        uint32 quantityFrozenMetadata;
        string tokenURIBase; // final URI will add a token number to the end
        DropPhase[] phases; // Must be in ascending-time order
        bytes32 passwordHash; // A non-zero value indicates this drop's randomness is still accumulating
        uint256 accumulatedRandomness; // Beware, randomness on-chain is a game and can always be hacked to some extent
        string unrevealedTokenURIOverride; // If set, this will apply to the drop, otherwise the general URI will apply
    }

    /// @notice Metadata is no longer changeable by anyone
    /// @param  value   The metadata URI
    /// @param  tokenID Which token is set
    event PermanentURI(string value, uint256 indexed tokenID);

    uint256 immutable MAX_DROP_SIZE = 1000000; // Must fit into size of tokenIDInDrop

    /// @notice Listing of all drops
    mapping(uint64 => Drop) public drops;

    mapping(bytes32 => mapping(address => uint96)) public quantityMinted;

    /// @notice The URI to show for tokens that are not revealed yet
    string public unrevealedTokenURI;

    /// @notice Initializes the contract
    /// @param  name                     Name of the contract
    /// @param  symbol                   Symbol of the contract
    /// @param  unrevealedTokenURI_      URI of tokens that are randomized, before randomization is done
    /// @param  newChiefFinancialOfficer Address that will sale proceeds and is indicated to receive royalties
    constructor(
        string memory name,
        string memory symbol,
        string memory unrevealedTokenURI_,
        address payable newChiefFinancialOfficer,
        uint256 newRoyaltyFraction
    ) ERC721(name, symbol) ThreeChiefOfficersWithRoyalties(newChiefFinancialOfficer, newRoyaltyFraction) {
        unrevealedTokenURI = unrevealedTokenURI_;
    }

    /// @notice Opens a new drop for preparation by the contract owner
    /// @param  dropID          The identifier, or batch number, for the drop
    /// @param  quantityForSale How many tokens are included in this drop
    /// @param  tokenURIBase    A prefix to build each token's URI from
    /// @param  passwordHash    A secret hash known by the contract owner which is used to end the drop, or zero to
    ///                         indicate no randomness in this drop
    function prepareDrop(
        uint64 dropID,
        uint32 quantityForSale,
        string calldata tokenURIBase,
        bytes32 passwordHash
    ) external onlyOperatingOfficer {
        require(quantityForSale > 0, "Light: quantity may not be zero");
        require(quantityForSale <= MAX_DROP_SIZE, "Light: drop is too large");
        require(drops[dropID].quantityForSale == 0, "Light: This drop was already prepared");
        require(bytes(tokenURIBase).length > 0, "Light: missing URI base");
        Drop storage drop = drops[dropID];
        drop.quantityForSale = quantityForSale;
        drop.tokenURIBase = tokenURIBase;
        drop.passwordHash = passwordHash;
        drop.accumulatedRandomness = uint256(passwordHash);
    }

    /// @notice Ends a drop before any were sold
    /// @param  dropID The identifier, or batch number, for the drop
    function abortDrop(uint64 dropID) external onlyOperatingOfficer {
        require(drops[dropID].quantitySold == 0, "Light: this drop has already started selling");
        delete (drops[dropID]);
    }

    /// @notice Schedules sales phases for a drop, replacing any previously set phases; reusing an access list will
    ///         continue depleting from that list; if you don't want this, make any change to the access list
    /// @dev    This function will fail unless all URIs have been loaded for the drop.
    /// @param  dropID     The identifier, or batch number, for the drop
    /// @param  dropPhases Drop phases for the sale (must be in time-sequential order)
    function setDropPhases(uint64 dropID, DropPhase[] calldata dropPhases) external onlyOperatingOfficer {
        Drop storage drop = drops[dropID];
        require(drop.quantityForSale > 0, "Light: this drop has not been prepared");
        delete drop.phases;
        for (uint256 index = 0; index < dropPhases.length; index++) {
            drop.phases.push(dropPhases[index]);
        }
    }

    /// @notice Mints a quantity of tokens, the related tokenURI is unknown until finalized
    /// @dev    This reverts unless there is randomness in this drop.
    /// @param  dropID             The identifier, or batch number, for the drop
    /// @param  quantity           How many tokens to purchase
    /// @param  accessListProof    A Merkle proof demonstrating that the message sender is on the access list,
    ///                            or zero if publicly available
    /// @param  accessListQuantity The amount of tokens this access list allows you to mint
    function mintRandom(
        uint64 dropID,
        uint64 quantity,
        bytes32[] calldata accessListProof,
        uint96 accessListQuantity
    ) external payable {
        Drop storage drop = drops[dropID];
        require(quantity > 0, "Light: missing purchase quantity");
        require(quantity + drop.quantitySold <= drop.quantityForSale, "Light: not enough left for sale");
        require(drop.accumulatedRandomness != 0, "Light: no randomness in this drop, use mintChosen instead");

        DropPhase memory dropPhase = _getEffectivePhase(drop);
        require(msg.value >= dropPhase.ethPrice * quantity, "Light: not enough Ether paid");

        if (dropPhase.accessListRoot != bytes32(0)) {
            _requireValidMerkleProof(dropPhase.accessListRoot, accessListProof, accessListQuantity);
            require(
                quantityMinted[dropPhase.accessListRoot][msg.sender] + quantity <= accessListQuantity,
                "Light: exceeded access list limit"
            );
        }

        _addEntropyBit(dropID, uint256(blockhash(block.number - 1)));

        if (dropPhase.accessListRoot != bytes32(0)) {
            quantityMinted[dropPhase.accessListRoot][msg.sender] += quantity;
        }

        for (uint256 mintCounter = 0; mintCounter < quantity; mintCounter++) {
            _mint(msg.sender, _assembleTokenID(dropID, drop.quantitySold));
            drop.quantitySold++;
        }
    }

    /// @notice Mints a selected set of tokens
    /// @dev    This reverts if there is randomness in this drop.
    /// @param  dropID             The identifier, or batch number, for the drop
    /// @param  tokenIDsInDrop     Which tokens to purchase
    /// @param  accessListProof    A Merkle proof demonstrating that the message sender is on the access list,
    ///                            or zero if publicly available
    /// @param  accessListQuantity The amount of tokens this access list allows you to mint
    function mintChosen(
        uint64 dropID,
        uint32[] calldata tokenIDsInDrop,
        bytes32[] calldata accessListProof,
        uint96 accessListQuantity
    ) external payable {
        Drop storage drop = drops[dropID];
        require(tokenIDsInDrop.length > 0, "Light: missing tokens to purchase");
        require(tokenIDsInDrop.length + drop.quantitySold <= drop.quantityForSale, "Light: not enough left for sale");
        require(tokenIDsInDrop.length < type(uint64).max);
        require(drop.accumulatedRandomness == 0, "Light: this drop uses randomness, use mintRandom instead");

        DropPhase memory dropPhase = _getEffectivePhase(drop);
        require(msg.value >= dropPhase.ethPrice * tokenIDsInDrop.length, "Light: not enough Ether paid");

        if (dropPhase.accessListRoot != bytes32(0)) {
            _requireValidMerkleProof(dropPhase.accessListRoot, accessListProof, accessListQuantity);
            require(
                quantityMinted[dropPhase.accessListRoot][msg.sender] + tokenIDsInDrop.length <= accessListQuantity,
                "Light: exceeded access list limit"
            );
        }

        drop.quantitySold += uint32(tokenIDsInDrop.length);

        if (dropPhase.accessListRoot != bytes32(0)) {
            quantityMinted[dropPhase.accessListRoot][msg.sender] += uint96(tokenIDsInDrop.length);
        }

        for (uint256 index = 0; index < tokenIDsInDrop.length; index++) {
            require(tokenIDsInDrop[index] < drop.quantityForSale, "Light: invalid token ID");
            _mint(msg.sender, _assembleTokenID(dropID, tokenIDsInDrop[index]));
        }
    }

    /// @notice Ends the sale and assigns any random tokens for a random drop
    /// @dev    Randomness is used from the owner's randomization secret as well as each buyer.
    /// @param  dropID   The identifier, or batch number, for the drop
    /// @param  password The secret of the hash originally used to prepare the drop, or zero if no randomness in this
    ///                  drop
    function finalizeRandomDrop(uint64 dropID, string calldata password) external onlyOperatingOfficer {
        Drop storage drop = drops[dropID];
        require(drop.passwordHash != bytes32(0), "Light: this drop does not have a password (anymore)");
        require(drop.quantitySold == drop.quantityForSale, "Light: this drop has not completed selling");
        require(keccak256(abi.encode(password)) == drop.passwordHash, "Light: wrong secret");
        _addEntropyBit(dropID, bytes(password).length);
        drop.passwordHash = bytes32(0);
    }

    /// @notice Ends the sale and assigns any random tokens for a random drop, only use this if operating officer
    ///         forgot the password and accepts the shame for such
    /// @dev    Randomness is used from the owner's randomization secret as well as each buyer.
    /// @param  dropID The identifier, or batch number, for the drop
    function finalizeRandomDropAndIForgotThePassword(uint64 dropID) external onlyOperatingOfficer {
        Drop storage drop = drops[dropID];
        require(drop.passwordHash != bytes32(0), "Light: this drop does not have a password (anymore)");
        require(drop.quantitySold == drop.quantityForSale, "Light: this drop has not completed selling");
        _addEntropyBit(dropID, uint256(blockhash(block.number - 1)));
        drop.passwordHash = bytes32(0);
    }

    /// @notice After a drop is sold out, indicate that metadata is no longer changeable by anyone
    /// @param  dropID           The identifier, or batch number, for the drop
    /// @param  quantityToFreeze How many remaining tokens to indicate as frozen (up to this many)
    function freezeMetadataForDrop(uint64 dropID, uint256 quantityToFreeze) external {
        Drop storage drop = drops[dropID];
        require(drop.quantitySold == drop.quantityForSale, "Light: this drop has not sold out yet");
        require(drop.passwordHash == bytes32(0), "Light: this random drop has not been finalized yet");
        require(drop.quantityFrozenMetadata < drop.quantityForSale, "Light: all metadata is already frozen");
        while (quantityToFreeze > 0 && drop.quantityFrozenMetadata < drop.quantityForSale) {
            uint256 tokenID = _assembleTokenID(dropID, drop.quantityFrozenMetadata);
            emit PermanentURI(tokenURI(tokenID), tokenID);
            drop.quantityFrozenMetadata++;
            quantityToFreeze--;
        }
    }

    /// @notice Set the portion of sale price (in basis points) that should be paid for token royalties
    /// @param  newRoyaltyFraction The new royalty fraction, in basis points
    function setRoyaltyAmount(uint256 newRoyaltyFraction) external onlyOperatingOfficer {
        _royaltyFraction = newRoyaltyFraction;
    }

    /// @notice Set the URI for tokens that are randomized and not yet revealed
    /// @param  newUnrevealedTokenURI URI of tokens that are randomized, before randomization is done
    function setUnrevealedTokenURI(string calldata newUnrevealedTokenURI) external onlyOperatingOfficer {
        unrevealedTokenURI = newUnrevealedTokenURI;
    }

    /// @notice Set the URI for tokens that are randomized and not yet revealed, overriding for a specific drop
    /// @param  dropID                        The identifier, or batch number, for the drop
    /// @param  newUnrevealedTokenURIOverride URI of tokens that are randomized, before randomization is done
    function setUnrevealedTokenURIOverride(uint64 dropID, string calldata newUnrevealedTokenURIOverride)
        external
        onlyOperatingOfficer
    {
        Drop storage drop = drops[dropID];
        drop.unrevealedTokenURIOverride = newUnrevealedTokenURIOverride;
    }

    /// @notice Hash a password to be used in a randomized drop
    /// @param  password The secret which will be hashed to prepare a drop
    /// @return The hash of the password
    function hashPassword(string calldata password) external pure returns (bytes32) {
        return keccak256(abi.encode(password));
    }

    /// @notice Gets the tokenURI for a token
    /// @dev    If randomness applies to this drop, then it will rotate with the tokenID to find the applicable URI.
    /// @param  tokenID The identifier for the token
    function tokenURI(uint256 tokenID) public view override(ERC721) returns (string memory) {
        require(ERC721._exists(tokenID), "Light: token does not exist");
        (uint64 dropID, uint64 tokenIDInDrop) = _dissectTokenID(tokenID);
        Drop storage drop = drops[dropID];

        if (drop.accumulatedRandomness == 0) {
            // Not randomized
            return string.concat(drop.tokenURIBase, Strings.toString(tokenIDInDrop));
        }
        if (drop.passwordHash != bytes32(0)) {
            // Randomized but not revealed
            if (bytes(drop.unrevealedTokenURIOverride).length > 0) {
                return drop.unrevealedTokenURIOverride;
            }
            return unrevealedTokenURI;
        }
        // Randomized and revealed
        uint256 offset = drop.accumulatedRandomness % drop.quantityForSale;
        uint256 index = (tokenIDInDrop + offset) % drop.quantityForSale;
        return string.concat(drop.tokenURIBase, Strings.toString(index));
    }

    /// @inheritdoc IERC165
    function supportsInterface(bytes4 interfaceID)
        public
        view
        override(ThreeChiefOfficersWithRoyalties, ERC721)
        returns (bool)
    {
        return super.supportsInterface(interfaceID);
    }

    /// @dev    Find the effective phase in the drop, revert if no phases are active.
    /// @param  drop An active drop
    /// @return The current drop phase
    function _getEffectivePhase(Drop storage drop) internal view returns (DropPhase memory) {
        require(drop.phases.length > 0, "Light: no drop phases are set");
        require(drop.phases[0].startTime != 0, "Light: first drop phase has no start time");
        require(drop.phases[0].startTime <= block.timestamp, "Light: first drop phase has not started yet");
        uint256 phaseIndex = 0;
        while (phaseIndex < drop.phases.length - 1) {
            if (drop.phases[phaseIndex + 1].startTime <= block.timestamp) {
                phaseIndex++;
            } else {
                break;
            }
        }
        return drop.phases[phaseIndex];
    }

    /// @dev   Require that the message sender is authorized in a given access list.
    /// @param accessListRoot  The designated Merkle tree root
    /// @param accessListProof A Merkle inclusion proof showing the current message sender is on the access list
    /// @param allowedQuantity The quantity of tokens allowed for this msg.sender in this access list
    function _requireValidMerkleProof(
        bytes32 accessListRoot,
        bytes32[] calldata accessListProof,
        uint96 allowedQuantity
    ) internal view {
        bytes32 merkleLeaf = Packing.addressUint96(msg.sender, allowedQuantity);
        require(MerkleProof.verify(accessListProof, accessListRoot, merkleLeaf), "Light: invalid access list proof");
    }

    /// @dev    Generate one token ID inside a drop.
    /// @param  dropID        A identifier, or batch number, for a drop
    /// @param  tokenIDInDrop An identified token inside the drop, from 0 to MAX_DROP_SIZE, inclusive
    /// @return tokenID       The token ID representing the token inside the drop
    function _assembleTokenID(uint64 dropID, uint32 tokenIDInDrop) internal pure returns (uint256 tokenID) {
        return MAX_DROP_SIZE * dropID + tokenIDInDrop;
    }

    /// @dev    Analyze parts in a token ID.
    /// @param  tokenID       A token ID representing a token inside a drop
    /// @return dropID        The identifier, or batch number, for the drop
    /// @return tokenIDInDrop The identified token inside the drop, from 0 to MAX_DROP_SIZE, inclusive
    function _dissectTokenID(uint256 tokenID) internal pure returns (uint64 dropID, uint32 tokenIDInDrop) {
        dropID = uint64(tokenID / MAX_DROP_SIZE);
        tokenIDInDrop = uint32(tokenID % MAX_DROP_SIZE);
    }

    /// @dev   Add one bit of entropy to the entropy pool.
    /// @dev   Entropy pools discussed at https://blog.phor.net/2022/02/04/Randomization-strategies-for-NFT-drops.html
    /// @param dropID            The identifier, or batch number, for the drop
    /// @param additionalEntropy The additional entropy to add one bit from, may be a biased random variable
    function _addEntropyBit(uint64 dropID, uint256 additionalEntropy) internal {
        Drop storage drop = drops[dropID];
        uint256 unbiasedAdditionalEntropy = uint256(keccak256(abi.encode(additionalEntropy)));
        uint256 mixedEntropy = drop.accumulatedRandomness ^ (unbiasedAdditionalEntropy % 2);
        drop.accumulatedRandomness = uint256(keccak256(abi.encode(mixedEntropy)));
    }
}

File 2 of 14 : Packing.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

library Packing {
    /// @dev    This packs inputs into a bytes32
    /// @param  a      The first type to pack
    /// @param  b      The second type to pack
    /// @return retval The packed bytes32
    function addressUint96(address a, uint96 b) internal pure returns (bytes32 retval) {
        retval |= bytes32(bytes20(a)); // bits 0...159
        retval |= bytes32(bytes12(b)) >> 160; // bits 160...255
    }
}

File 3 of 14 : ThreeChiefOfficersWithRoyalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

import "./vendor/openzeppelin-contracts-4.6.0-d4fb3a89f9d0a39c7ee6f2601d33ffbf30085322/contracts/interfaces/IERC2981.sol";
import "./vendor/openzeppelin-contracts-4.6.0-d4fb3a89f9d0a39c7ee6f2601d33ffbf30085322/contracts/utils/introspection/ERC165.sol";

/// @title  Three-party access control inspired by CryptoKitties. By default, the highest-privileged account will be the
///         same account that deploys this contract. ERC-2981 designates royalties to the CFO account. Uses an ownable
///         function to show who is the CEO.
/// @dev    Keep the CEO wallet stored offline, I warned you.
///         Subclassing notes:
///          - Use inheritance to gain functionality from `ThreeChiefOfficers`.
///          - Modify your functions with `onlyOperatingOfficer` to restrict access as needed.
/// @author William Entriken (https://phor.net) from Solidity-Template
abstract contract ThreeChiefOfficersWithRoyalties is IERC2981, ERC165 {
    /// @notice The account that can only reassign officer accounts
    address private _executiveOfficer;

    /// @notice The account that can perform privileged actions
    address private _operatingOfficer;

    /// @notice The account that can collect Ether from this contract
    address payable private _financialOfficer;

    /// @notice The account of recommended royalties for this contract
    uint256 internal _royaltyFraction;

    uint256 internal _royaltyDenominator = 10000;

    /// @dev Revert with an error when attempting privileged access without being executive officer.
    error NotExecutiveOfficer();

    /// @dev Revert with an error when attempting privileged access without being operating officer.
    error NotOperatingOfficer();

    /// @dev Revert with an error when attempting privileged access without being financial officer.
    error NotFinancialOfficer();

    /// @dev The withdrawal operation failed on the receiving side.
    error WithdrawFailed();

    /// @dev This throws unless called by the owner.
    modifier onlyOperatingOfficer() {
        if (msg.sender != _operatingOfficer) {
            revert NotOperatingOfficer();
        }
        _;
    }

    constructor(address payable newFinancialOfficer, uint256 newRoyaltyFraction) {
        _executiveOfficer = msg.sender;
        _financialOfficer = newFinancialOfficer;
        _royaltyFraction = newRoyaltyFraction;
    }

    /// @notice Reassign the executive officer role
    /// @param  newExecutiveOfficer new officer address
    function setExecutiveOfficer(address newExecutiveOfficer) external {
        if (msg.sender != _executiveOfficer) {
            revert NotExecutiveOfficer();
        }
        _executiveOfficer = newExecutiveOfficer;
    }

    /// @notice Reassign the operating officer role
    /// @param  newOperatingOfficer new officer address
    function setOperatingOfficer(address payable newOperatingOfficer) external {
        if (msg.sender != _executiveOfficer) {
            revert NotExecutiveOfficer();
        }
        _operatingOfficer = newOperatingOfficer;
    }

    /// @notice Reassign the financial officer role
    /// @param  newFinancialOfficer new officer address
    function setFinancialOfficer(address payable newFinancialOfficer) external {
        if (msg.sender != _executiveOfficer) {
            revert NotExecutiveOfficer();
        }
        _financialOfficer = newFinancialOfficer;
    }

    /// @notice Collect Ether from this contract
    function withdrawBalance() external {
        if (msg.sender != _financialOfficer) {
            revert NotFinancialOfficer();
        }
        (bool success, ) = _financialOfficer.call{value: address(this).balance}("");
        if (!success) {
            revert WithdrawFailed();
        }
    }

    /// @notice Get the chief executive officer
    /// @return The chief executive officer account
    function executiveOfficer() public view returns (address) {
        return _executiveOfficer;
    }

    /// @notice Get the chief operating officer
    /// @return The chief operating officer account
    function operatingOfficer() public view returns (address) {
        return _operatingOfficer;
    }

    /// @notice Get the chief financial officer
    /// @return The chief financial officer account
    function financialOfficer() public view returns (address) {
        return _financialOfficer;
    }

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

    /// @inheritdoc IERC2981
    function royaltyInfo(uint256, uint256 _salePrice) public view virtual override returns (address, uint256) {
        uint256 royaltyAmount = (_salePrice * _royaltyFraction) / _royaltyDenominator;
        return (_financialOfficer, royaltyAmount);
    }

    /// @notice EIP-5313 (DRAFT) implementation
    /// @return The account that can control this contract
    function owner() public view returns (address) {
        return _executiveOfficer;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 5 of 14 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = _efficientHash(computedHash, proofElement);
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = _efficientHash(proofElement, computedHash);
            }
        }
        return computedHash;
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be 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 owner nor approved for all"
        );

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || 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 a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

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

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

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

    /**
     * @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 14 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 8 of 14 : 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 9 of 14 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 11 of 14 : 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 12 of 14 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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 be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

    /**
     * @dev 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 14 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

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

File 14 of 14 : 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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"unrevealedTokenURI_","type":"string"},{"internalType":"address payable","name":"newChiefFinancialOfficer","type":"address"},{"internalType":"uint256","name":"newRoyaltyFraction","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NotExecutiveOfficer","type":"error"},{"inputs":[],"name":"NotFinancialOfficer","type":"error"},{"inputs":[],"name":"NotOperatingOfficer","type":"error"},{"inputs":[],"name":"WithdrawFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"PermanentURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"uint64","name":"dropID","type":"uint64"}],"name":"abortDrop","outputs":[],"stateMutability":"nonpayable","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":"uint64","name":"","type":"uint64"}],"name":"drops","outputs":[{"internalType":"uint32","name":"quantityForSale","type":"uint32"},{"internalType":"uint32","name":"quantitySold","type":"uint32"},{"internalType":"uint32","name":"quantityFrozenMetadata","type":"uint32"},{"internalType":"string","name":"tokenURIBase","type":"string"},{"internalType":"bytes32","name":"passwordHash","type":"bytes32"},{"internalType":"uint256","name":"accumulatedRandomness","type":"uint256"},{"internalType":"string","name":"unrevealedTokenURIOverride","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"executiveOfficer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"dropID","type":"uint64"},{"internalType":"string","name":"password","type":"string"}],"name":"finalizeRandomDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"dropID","type":"uint64"}],"name":"finalizeRandomDropAndIForgotThePassword","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"financialOfficer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"dropID","type":"uint64"},{"internalType":"uint256","name":"quantityToFreeze","type":"uint256"}],"name":"freezeMetadataForDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"password","type":"string"}],"name":"hashPassword","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"dropID","type":"uint64"},{"internalType":"uint32[]","name":"tokenIDsInDrop","type":"uint32[]"},{"internalType":"bytes32[]","name":"accessListProof","type":"bytes32[]"},{"internalType":"uint96","name":"accessListQuantity","type":"uint96"}],"name":"mintChosen","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint64","name":"dropID","type":"uint64"},{"internalType":"uint64","name":"quantity","type":"uint64"},{"internalType":"bytes32[]","name":"accessListProof","type":"bytes32[]"},{"internalType":"uint96","name":"accessListQuantity","type":"uint96"}],"name":"mintRandom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatingOfficer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"dropID","type":"uint64"},{"internalType":"uint32","name":"quantityForSale","type":"uint32"},{"internalType":"string","name":"tokenURIBase","type":"string"},{"internalType":"bytes32","name":"passwordHash","type":"bytes32"}],"name":"prepareDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"name":"quantityMinted","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"dropID","type":"uint64"},{"components":[{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint128","name":"ethPrice","type":"uint128"},{"internalType":"bytes32","name":"accessListRoot","type":"bytes32"}],"internalType":"struct Light.DropPhase[]","name":"dropPhases","type":"tuple[]"}],"name":"setDropPhases","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newExecutiveOfficer","type":"address"}],"name":"setExecutiveOfficer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newFinancialOfficer","type":"address"}],"name":"setFinancialOfficer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newOperatingOfficer","type":"address"}],"name":"setOperatingOfficer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newRoyaltyFraction","type":"uint256"}],"name":"setRoyaltyAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newUnrevealedTokenURI","type":"string"}],"name":"setUnrevealedTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"dropID","type":"uint64"},{"internalType":"string","name":"newUnrevealedTokenURIOverride","type":"string"}],"name":"setUnrevealedTokenURIOverride","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":[{"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":[],"name":"unrevealedTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawBalance","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a0604052612710600a55620f42406080523480156200001e57600080fd5b5060405162003f8838038062003f8883398101604081905262000041916200017e565b818186866000620000538382620002cc565b506001620000628282620002cc565b505060068054336001600160a01b031991821617909155600880549091166001600160a01b03949094169390931790925560095550600d620000a58482620002cc565b50505050505062000398565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000d957600080fd5b81516001600160401b0380821115620000f657620000f6620000b1565b604051601f8301601f19908116603f01168101908282118183101715620001215762000121620000b1565b816040528381526020925086838588010111156200013e57600080fd5b600091505b8382101562000162578582018301518183018401529082019062000143565b83821115620001745760008385830101525b9695505050505050565b600080600080600060a086880312156200019757600080fd5b85516001600160401b0380821115620001af57600080fd5b620001bd89838a01620000c7565b96506020880151915080821115620001d457600080fd5b620001e289838a01620000c7565b95506040880151915080821115620001f957600080fd5b506200020888828901620000c7565b606088015190945090506001600160a01b03811681146200022857600080fd5b80925050608086015190509295509295909350565b600181811c908216806200025257607f821691505b6020821081036200027357634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002c757600081815260208120601f850160051c81016020861015620002a25750805b601f850160051c820191505b81811015620002c357828155600101620002ae565b5050505b505050565b81516001600160401b03811115620002e857620002e8620000b1565b6200030081620002f984546200023d565b8462000279565b602080601f8311600181146200033857600084156200031f5750858301515b600019600386901b1c1916600185901b178555620002c3565b600085815260208120601f198616915b82811015620003695788860151825594840194600190910190840162000348565b5085821015620003885787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b608051613bbf620003c9600039600081816118a70152818161283b01528181612abb0152612ae70152613bbf6000f3fe60806040526004361061021a5760003560e01c8063888a554c11610123578063b9ac1571116100ab578063ddd20aff1161006f578063ddd20aff1461062f578063df2e1d0614610688578063e550da4e146106a8578063e985e9c5146106c8578063ec13df6b1461071157600080fd5b8063b9ac157114610591578063bb22212c146105af578063c87b56dd146105cf578063c9521ebf146105ef578063d978a0d31461060f57600080fd5b8063a22cb465116100f2578063a22cb46514610509578063a3267ed1146104c3578063b1a9ac5a14610529578063b2873d5c1461055c578063b88d4fde1461057157600080fd5b8063888a554c146104a55780638da5cb5b146104c357806395d89b41146104e15780639d9a34c5146104f657600080fd5b806342842e0e116101a65780636352211e116101755780636352211e1461041257806369aeb6a81461043257806370a0823114610452578063762374b814610472578063820de0c51461048557600080fd5b806342842e0e1461039d5780634f07de09146103bd578063524227be146103dd5780635fd8c710146103fd57600080fd5b8063104974ea116101ed578063104974ea146102d057806323b872dd146102f05780632a55205a146103105780632aad292e1461034f5780633f75a07d1461036f57600080fd5b806301ffc9a71461021f57806306fdde0314610254578063081812fc14610276578063095ea7b3146102ae575b600080fd5b34801561022b57600080fd5b5061023f61023a366004612e9e565b610731565b60405190151581526020015b60405180910390f35b34801561026057600080fd5b50610269610742565b60405161024b9190612f13565b34801561028257600080fd5b50610296610291366004612f26565b6107d4565b6040516001600160a01b03909116815260200161024b565b3480156102ba57600080fd5b506102ce6102c9366004612f54565b61086e565b005b3480156102dc57600080fd5b506102ce6102eb366004612fd6565b610983565b3480156102fc57600080fd5b506102ce61030b36600461302a565b6109dc565b34801561031c57600080fd5b5061033061032b36600461306b565b610a0d565b604080516001600160a01b03909316835260208301919091520161024b565b34801561035b57600080fd5b506102ce61036a36600461308d565b610a46565b34801561037b57600080fd5b5061038f61038a3660046130aa565b610a93565b60405190815260200161024b565b3480156103a957600080fd5b506102ce6103b836600461302a565b610ac6565b3480156103c957600080fd5b506102ce6103d8366004612f26565b610ae1565b3480156103e957600080fd5b506102ce6103f83660046130eb565b610b11565b34801561040957600080fd5b506102ce610bc5565b34801561041e57600080fd5b5061029661042d366004612f26565b610c66565b34801561043e57600080fd5b506102ce61044d3660046130eb565b610cdd565b34801561045e57600080fd5b5061038f61046d36600461308d565b610df7565b6102ce610480366004613168565b610e7e565b34801561049157600080fd5b506102ce6104a03660046130aa565b611251565b3480156104b157600080fd5b506007546001600160a01b0316610296565b3480156104cf57600080fd5b506006546001600160a01b0316610296565b3480156104ed57600080fd5b50610269611289565b6102ce6105043660046131f9565b611298565b34801561051557600080fd5b506102ce610524366004613272565b6115f3565b34801561053557600080fd5b506105496105443660046130eb565b611602565b60405161024b97969594939291906132b0565b34801561056857600080fd5b5061026961175e565b34801561057d57600080fd5b506102ce61058c366004613323565b6117ec565b34801561059d57600080fd5b506008546001600160a01b0316610296565b3480156105bb57600080fd5b506102ce6105ca366004613416565b611824565b3480156105db57600080fd5b506102696105ea366004612f26565b611a2e565b3480156105fb57600080fd5b506102ce61060a366004612fd6565b611c5d565b34801561061b57600080fd5b506102ce61062a36600461308d565b611d79565b34801561063b57600080fd5b5061067061064a366004613480565b600c6020908152600092835260408084209091529082529020546001600160601b031681565b6040516001600160601b03909116815260200161024b565b34801561069457600080fd5b506102ce6106a33660046134a5565b611dc6565b3480156106b457600080fd5b506102ce6106c336600461352c565b611ede565b3480156106d457600080fd5b5061023f6106e336600461354a565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561071d57600080fd5b506102ce61072c36600461308d565b612111565b600061073c8261215e565b92915050565b60606000805461075190613578565b80601f016020809104026020016040519081016040528092919081815260200182805461077d90613578565b80156107ca5780601f1061079f576101008083540402835291602001916107ca565b820191906000526020600020905b8154815290600101906020018083116107ad57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166108525760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061087982610c66565b9050806001600160a01b0316836001600160a01b0316036108e65760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610849565b336001600160a01b0382161480610902575061090281336106e3565b6109745760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610849565b61097e8383612183565b505050565b6007546001600160a01b031633146109ae5760405163f8bcfff160e01b815260040160405180910390fd5b6001600160401b0383166000908152600b60205260409020600581016109d5838583613600565b5050505050565b6109e633826121f1565b610a025760405162461bcd60e51b8152600401610849906136bf565b61097e8383836122e8565b6000806000600a5460095485610a239190613726565b610a2d919061375b565b6008546001600160a01b031693509150505b9250929050565b6006546001600160a01b03163314610a715760405163222569ef60e01b815260040160405180910390fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60008282604051602001610aa892919061376f565b60405160208183030381529060405280519060200120905092915050565b61097e838383604051806020016040528060008152506117ec565b6007546001600160a01b03163314610b0c5760405163f8bcfff160e01b815260040160405180910390fd5b600955565b6007546001600160a01b03163314610b3c5760405163f8bcfff160e01b815260040160405180910390fd5b6001600160401b0381166000908152600b602052604090206003810154610b755760405162461bcd60e51b81526004016108499061379e565b8054600160201b810463ffffffff908116911614610ba55760405162461bcd60e51b8152600401610849906137f1565b610bba82610bb460014361383b565b40612484565b600060039091015550565b6008546001600160a01b03163314610bef5760405162177aa560ea1b815260040160405180910390fd5b6008546040516000916001600160a01b03169047908381818185875af1925050503d8060008114610c3c576040519150601f19603f3d011682016040523d82523d6000602084013e610c41565b606091505b5050905080610c6357604051631d42c86760e21b815260040160405180910390fd5b50565b6000818152600260205260408120546001600160a01b03168061073c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610849565b6007546001600160a01b03163314610d085760405163f8bcfff160e01b815260040160405180910390fd5b6001600160401b0381166000908152600b6020526040902054600160201b900463ffffffff1615610d905760405162461bcd60e51b815260206004820152602c60248201527f4c696768743a20746869732064726f702068617320616c72656164792073746160448201526b727465642073656c6c696e6760a01b6064820152608401610849565b6001600160401b0381166000908152600b6020526040812080546bffffffffffffffffffffffff1916815590610dc96001830182612dee565b610dd7600283016000612e28565b6003820160009055600482016000905560058201600061097e9190612dee565b60006001600160a01b038216610e625760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610849565b506001600160a01b031660009081526003602052604090205490565b6001600160401b0386166000908152600b6020526040902084610eed5760405162461bcd60e51b815260206004820152602160248201527f4c696768743a206d697373696e6720746f6b656e7320746f20707572636861736044820152606560f81b6064820152608401610849565b805463ffffffff80821691610f0b91600160201b9091041687613852565b1115610f595760405162461bcd60e51b815260206004820152601f60248201527f4c696768743a206e6f7420656e6f756768206c65667420666f722073616c65006044820152606401610849565b6001600160401b038510610f6c57600080fd5b600481015415610fe45760405162461bcd60e51b815260206004820152603860248201527f4c696768743a20746869732064726f7020757365732072616e646f6d6e65737360448201527f2c20757365206d696e7452616e646f6d20696e737465616400000000000000006064820152608401610849565b6000610fef8261250d565b602081015190915061100b9087906001600160801b0316613726565b34101561105a5760405162461bcd60e51b815260206004820152601c60248201527f4c696768743a206e6f7420656e6f7567682045746865722070616964000000006044820152606401610849565b6040810151156110c6576110748160400151868686612775565b6040808201516000908152600c6020908152828220338352905220546001600160601b03808516916110a891899116613852565b11156110c65760405162461bcd60e51b81526004016108499061386a565b8154869083906004906110e7908490600160201b900463ffffffff166138ab565b92506101000a81548163ffffffff021916908363ffffffff1602179055506000801b81604001511461116e576040808201516000908152600c6020908152828220338352905290812080548892906111499084906001600160601b03166138d3565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b60005b8681101561124657825463ffffffff16888883818110611193576111936138f5565b90506020020160208101906111a8919061390b565b63ffffffff16106111fb5760405162461bcd60e51b815260206004820152601760248201527f4c696768743a20696e76616c696420746f6b656e2049440000000000000000006044820152606401610849565b6112343361122f8b8b8b86818110611215576112156138f5565b905060200201602081019061122a919061390b565b612823565b612870565b8061123e81613926565b915050611171565b505050505050505050565b6007546001600160a01b0316331461127c5760405163f8bcfff160e01b815260040160405180910390fd5b600d61097e828483613600565b60606001805461075190613578565b6001600160401b038086166000908152600b602052604090209085166113005760405162461bcd60e51b815260206004820181905260248201527f4c696768743a206d697373696e67207075726368617365207175616e746974796044820152606401610849565b805463ffffffff8082169161131e91600160201b909104168761393f565b6001600160401b031611156113755760405162461bcd60e51b815260206004820152601f60248201527f4c696768743a206e6f7420656e6f756768206c65667420666f722073616c65006044820152606401610849565b80600401546000036113ef5760405162461bcd60e51b815260206004820152603960248201527f4c696768743a206e6f2072616e646f6d6e65737320696e20746869732064726f60448201527f702c20757365206d696e7443686f73656e20696e7374656164000000000000006064820152608401610849565b60006113fa8261250d565b9050856001600160401b031681602001516114159190613961565b6001600160801b031634101561146d5760405162461bcd60e51b815260206004820152601c60248201527f4c696768743a206e6f7420656e6f7567682045746865722070616964000000006044820152606401610849565b6040810151156114eb576114878160400151868686612775565b6040808201516000908152600c6020908152828220338352905220546001600160601b03808516916114c4916001600160401b038a1691166138d3565b6001600160601b031611156114eb5760405162461bcd60e51b81526004016108499061386a565b6114fa87610bb460014361383b565b604081015115611568576040808201516000908152600c6020908152828220338352905290812080546001600160401b03891692906115439084906001600160601b03166138d3565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b60005b866001600160401b03168110156115e957825461159c90339061122f908b90600160201b900463ffffffff16612823565b8254600160201b900463ffffffff168360046115b783613990565b91906101000a81548163ffffffff021916908363ffffffff1602179055505080806115e190613926565b91505061156b565b5050505050505050565b6115fe3383836129b2565b5050565b600b602052600090815260409020805460018201805463ffffffff80841694600160201b8504821694600160401b900490911692909161164190613578565b80601f016020809104026020016040519081016040528092919081815260200182805461166d90613578565b80156116ba5780601f1061168f576101008083540402835291602001916116ba565b820191906000526020600020905b81548152906001019060200180831161169d57829003601f168201915b5050505050908060030154908060040154908060050180546116db90613578565b80601f016020809104026020016040519081016040528092919081815260200182805461170790613578565b80156117545780601f1061172957610100808354040283529160200191611754565b820191906000526020600020905b81548152906001019060200180831161173757829003601f168201915b5050505050905087565b600d805461176b90613578565b80601f016020809104026020016040519081016040528092919081815260200182805461179790613578565b80156117e45780601f106117b9576101008083540402835291602001916117e4565b820191906000526020600020905b8154815290600101906020018083116117c757829003601f168201915b505050505081565b6117f633836121f1565b6118125760405162461bcd60e51b8152600401610849906136bf565b61181e84848484612a80565b50505050565b6007546001600160a01b0316331461184f5760405163f8bcfff160e01b815260040160405180910390fd5b60008463ffffffff16116118a55760405162461bcd60e51b815260206004820152601f60248201527f4c696768743a207175616e74697479206d6179206e6f74206265207a65726f006044820152606401610849565b7f00000000000000000000000000000000000000000000000000000000000000008463ffffffff16111561191b5760405162461bcd60e51b815260206004820152601860248201527f4c696768743a2064726f7020697320746f6f206c6172676500000000000000006044820152606401610849565b6001600160401b0385166000908152600b602052604090205463ffffffff16156119955760405162461bcd60e51b815260206004820152602560248201527f4c696768743a20546869732064726f702077617320616c7265616479207072656044820152641c185c995960da1b6064820152608401610849565b816119e25760405162461bcd60e51b815260206004820152601760248201527f4c696768743a206d697373696e672055524920626173650000000000000000006044820152606401610849565b6001600160401b0385166000908152600b60205260409020805463ffffffff191663ffffffff861617815560018101611a1c848683613600565b50600381018290556004015550505050565b6000818152600260205260409020546060906001600160a01b0316611a955760405162461bcd60e51b815260206004820152601b60248201527f4c696768743a20746f6b656e20646f6573206e6f7420657869737400000000006044820152606401610849565b600080611aa184612ab3565b6001600160401b0382166000908152600b60205260408120600481015493955063ffffffff92909216935090919003611b145780600101611aea836001600160401b0316612b13565b604051602001611afb9291906139b3565b6040516020818303038152906040529350505050919050565b600381015415611bdb576000816005018054611b2f90613578565b90501115611bce57806005018054611b4690613578565b80601f0160208091040260200160405190810160405280929190818152602001828054611b7290613578565b8015611bbf5780601f10611b9457610100808354040283529160200191611bbf565b820191906000526020600020905b815481529060010190602001808311611ba257829003601f168201915b50505050509350505050919050565b600d8054611b4690613578565b80546004820154600091611bf79163ffffffff90911690613a31565b825490915060009063ffffffff16611c18836001600160401b038716613852565b611c229190613a31565b905082600101611c3182612b13565b604051602001611c429291906139b3565b60405160208183030381529060405295505050505050919050565b6007546001600160a01b03163314611c885760405163f8bcfff160e01b815260040160405180910390fd5b6001600160401b0383166000908152600b602052604090206003810154611cc15760405162461bcd60e51b81526004016108499061379e565b8054600160201b810463ffffffff908116911614611cf15760405162461bcd60e51b8152600401610849906137f1565b80600301548383604051602001611d0992919061376f565b6040516020818303038152906040528051906020012014611d625760405162461bcd60e51b8152602060048201526013602482015272131a59da1d0e881ddc9bdb99c81cd958dc995d606a1b6044820152606401610849565b611d6c8483612484565b6000600390910155505050565b6006546001600160a01b03163314611da45760405163222569ef60e01b815260040160405180910390fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6007546001600160a01b03163314611df15760405163f8bcfff160e01b815260040160405180910390fd5b6001600160401b0383166000908152600b60205260409020805463ffffffff16611e6c5760405162461bcd60e51b815260206004820152602660248201527f4c696768743a20746869732064726f7020686173206e6f74206265656e207072604482015265195c185c995960d21b6064820152608401610849565b611e7a600282016000612e28565b60005b828110156109d55781600201848483818110611e9b57611e9b6138f5565b835460018101855560009485526020909420606090910292909201926002029091019050611ec98282613a45565b50508080611ed690613926565b915050611e7d565b6001600160401b0382166000908152600b602052604090208054600160201b810463ffffffff908116911614611f645760405162461bcd60e51b815260206004820152602560248201527f4c696768743a20746869732064726f7020686173206e6f7420736f6c64206f756044820152641d081e595d60da1b6064820152608401610849565b600381015415611fd15760405162461bcd60e51b815260206004820152603260248201527f4c696768743a20746869732072616e646f6d2064726f7020686173206e6f74206044820152711899595b88199a5b985b1a5e9959081e595d60721b6064820152608401610849565b805463ffffffff808216600160401b909204161061203f5760405162461bcd60e51b815260206004820152602560248201527f4c696768743a20616c6c206d6574616461746120697320616c726561647920666044820152643937bd32b760d91b6064820152608401610849565b60008211801561205f5750805463ffffffff808216600160401b90920416105b1561097e578054600090612081908590600160401b900463ffffffff16612823565b9050807fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b556572076120ae83611a2e565b6040516120bb9190612f13565b60405180910390a28154600160401b900463ffffffff168260086120de83613990565b91906101000a81548163ffffffff021916908363ffffffff16021790555050828061210890613ac6565b9350505061203f565b6006546001600160a01b0316331461213c5760405163222569ef60e01b815260040160405180910390fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b0319821663152a902d60e11b148061073c575061073c82612c13565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906121b882610c66565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661226a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610849565b600061227583610c66565b9050806001600160a01b0316846001600160a01b031614806122bc57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806122e05750836001600160a01b03166122d5846107d4565b6001600160a01b0316145b949350505050565b826001600160a01b03166122fb82610c66565b6001600160a01b03161461235f5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610849565b6001600160a01b0382166123c15760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610849565b6123cc600082612183565b6001600160a01b03831660009081526003602052604081208054600192906123f590849061383b565b90915550506001600160a01b0382166000908152600360205260408120805460019290612423908490613852565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160401b0382166000908152600b6020908152604080832081518084018690528251808203850181529083019092528151919092012090916124ca600283613a31565b8360040154189050806040516020016124e591815260200190565b6040516020818303038152906040528051906020012060001c83600401819055505050505050565b6040805160608101825260008082526020820181905291810191909152600282015461257b5760405162461bcd60e51b815260206004820152601d60248201527f4c696768743a206e6f2064726f702070686173657320617265207365740000006044820152606401610849565b81600201600081548110612591576125916138f5565b600091825260208220600290910201546001600160401b0316900361260a5760405162461bcd60e51b815260206004820152602960248201527f4c696768743a2066697273742064726f7020706861736520686173206e6f2073604482015268746172742074696d6560b81b6064820152608401610849565b4282600201600081548110612621576126216138f5565b60009182526020909120600290910201546001600160401b0316111561269d5760405162461bcd60e51b815260206004820152602b60248201527f4c696768743a2066697273742064726f7020706861736520686173206e6f742060448201526a1cdd185c9d1959081e595d60aa1b6064820152608401610849565b60005b60028301546126b19060019061383b565b8110156127095742600284016126c8836001613852565b815481106126d8576126d86138f5565b60009182526020909120600290910201546001600160401b031611612709578061270181613926565b9150506126a0565b82600201818154811061271e5761271e6138f5565b600091825260209182902060408051606081018252600290930290910180546001600160401b03811684526001600160801b03600160401b9091041693830193909352600190920154918101919091529392505050565b60003360601b6bffffffffffffffffffffffff19166001600160601b0383161790506127d7848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250859150612c639050565b6109d55760405162461bcd60e51b815260206004820181905260248201527f4c696768743a20696e76616c696420616363657373206c6973742070726f6f666044820152606401610849565b600063ffffffff821661285f6001600160401b0385167f0000000000000000000000000000000000000000000000000000000000000000613726565b6128699190613852565b9392505050565b6001600160a01b0382166128c65760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610849565b6000818152600260205260409020546001600160a01b03161561292b5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610849565b6001600160a01b0382166000908152600360205260408120805460019290612954908490613852565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b816001600160a01b0316836001600160a01b031603612a135760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610849565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612a8b8484846122e8565b612a9784848484612c79565b61181e5760405162461bcd60e51b815260040161084990613add565b600080612ae07f00000000000000000000000000000000000000000000000000000000000000008461375b565b9150612b0c7f000000000000000000000000000000000000000000000000000000000000000084613a31565b9050915091565b606081600003612b3a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612b645780612b4e81613926565b9150612b5d9050600a8361375b565b9150612b3e565b6000816001600160401b03811115612b7e57612b7e61330d565b6040519080825280601f01601f191660200182016040528015612ba8576020820181803683370190505b5090505b84156122e057612bbd60018361383b565b9150612bca600a86613a31565b612bd5906030613852565b60f81b818381518110612bea57612bea6138f5565b60200101906001600160f81b031916908160001a905350612c0c600a8661375b565b9450612bac565b60006001600160e01b031982166380ac58cd60e01b1480612c4457506001600160e01b03198216635b5e139f60e01b145b8061073c57506301ffc9a760e01b6001600160e01b031983161461073c565b600082612c708584612d7a565b14949350505050565b60006001600160a01b0384163b15612d6f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612cbd903390899088908890600401613b2f565b6020604051808303816000875af1925050508015612cf8575060408051601f3d908101601f19168201909252612cf591810190613b6c565b60015b612d55573d808015612d26576040519150601f19603f3d011682016040523d82523d6000602084013e612d2b565b606091505b508051600003612d4d5760405162461bcd60e51b815260040161084990613add565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506122e0565b506001949350505050565b600081815b8451811015612de6576000858281518110612d9c57612d9c6138f5565b60200260200101519050808311612dc25760008381526020829052604090209250612dd3565b600081815260208490526040902092505b5080612dde81613926565b915050612d7f565b509392505050565b508054612dfa90613578565b6000825580601f10612e0a575050565b601f016020900490600052602060002090810190610c639190612e49565b5080546000825560020290600052602060002090810190610c639190612e62565b5b80821115612e5e5760008155600101612e4a565b5090565b5b80821115612e5e5780546001600160c01b031916815560006001820155600201612e63565b6001600160e01b031981168114610c6357600080fd5b600060208284031215612eb057600080fd5b813561286981612e88565b60005b83811015612ed6578181015183820152602001612ebe565b8381111561181e5750506000910152565b60008151808452612eff816020860160208601612ebb565b601f01601f19169290920160200192915050565b6020815260006128696020830184612ee7565b600060208284031215612f3857600080fd5b5035919050565b6001600160a01b0381168114610c6357600080fd5b60008060408385031215612f6757600080fd5b8235612f7281612f3f565b946020939093013593505050565b6001600160401b0381168114610c6357600080fd5b60008083601f840112612fa757600080fd5b5081356001600160401b03811115612fbe57600080fd5b602083019150836020828501011115610a3f57600080fd5b600080600060408486031215612feb57600080fd5b8335612ff681612f80565b925060208401356001600160401b0381111561301157600080fd5b61301d86828701612f95565b9497909650939450505050565b60008060006060848603121561303f57600080fd5b833561304a81612f3f565b9250602084013561305a81612f3f565b929592945050506040919091013590565b6000806040838503121561307e57600080fd5b50508035926020909101359150565b60006020828403121561309f57600080fd5b813561286981612f3f565b600080602083850312156130bd57600080fd5b82356001600160401b038111156130d357600080fd5b6130df85828601612f95565b90969095509350505050565b6000602082840312156130fd57600080fd5b813561286981612f80565b60008083601f84011261311a57600080fd5b5081356001600160401b0381111561313157600080fd5b6020830191508360208260051b8501011115610a3f57600080fd5b80356001600160601b038116811461316357600080fd5b919050565b6000806000806000806080878903121561318157600080fd5b863561318c81612f80565b955060208701356001600160401b03808211156131a857600080fd5b6131b48a838b01613108565b909750955060408901359150808211156131cd57600080fd5b506131da89828a01613108565b90945092506131ed90506060880161314c565b90509295509295509295565b60008060008060006080868803121561321157600080fd5b853561321c81612f80565b9450602086013561322c81612f80565b935060408601356001600160401b0381111561324757600080fd5b61325388828901613108565b909450925061326690506060870161314c565b90509295509295909350565b6000806040838503121561328557600080fd5b823561329081612f3f565b9150602083013580151581146132a557600080fd5b809150509250929050565b600063ffffffff808a168352808916602084015280881660408401525060e060608301526132e160e0830187612ee7565b8560808401528460a084015282810360c08401526132ff8185612ee7565b9a9950505050505050505050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561333957600080fd5b843561334481612f3f565b9350602085013561335481612f3f565b92506040850135915060608501356001600160401b038082111561337757600080fd5b818701915087601f83011261338b57600080fd5b81358181111561339d5761339d61330d565b604051601f8201601f19908116603f011681019083821181831017156133c5576133c561330d565b816040528281528a60208487010111156133de57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b803563ffffffff8116811461316357600080fd5b60008060008060006080868803121561342e57600080fd5b853561343981612f80565b945061344760208701613402565b935060408601356001600160401b0381111561346257600080fd5b61346e88828901612f95565b96999598509660600135949350505050565b6000806040838503121561349357600080fd5b8235915060208301356132a581612f3f565b6000806000604084860312156134ba57600080fd5b83356134c581612f80565b925060208401356001600160401b03808211156134e157600080fd5b818601915086601f8301126134f557600080fd5b81358181111561350457600080fd5b87602060608302850101111561351957600080fd5b6020830194508093505050509250925092565b6000806040838503121561353f57600080fd5b8235612f7281612f80565b6000806040838503121561355d57600080fd5b823561356881612f3f565b915060208301356132a581612f3f565b600181811c9082168061358c57607f821691505b6020821081036135ac57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561097e57600081815260208120601f850160051c810160208610156135d95750805b601f850160051c820191505b818110156135f8578281556001016135e5565b505050505050565b6001600160401b038311156136175761361761330d565b61362b836136258354613578565b836135b2565b6000601f84116001811461365f57600085156136475750838201355b600019600387901b1c1916600186901b1783556109d5565b600083815260209020601f19861690835b828110156136905786850135825560209485019460019092019101613670565b50868210156136ad5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561374057613740613710565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261376a5761376a613745565b500490565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60208082526033908201527f4c696768743a20746869732064726f7020646f6573206e6f74206861766520616040820152722070617373776f72642028616e796d6f72652960681b606082015260800190565b6020808252602a908201527f4c696768743a20746869732064726f7020686173206e6f7420636f6d706c657460408201526965642073656c6c696e6760b01b606082015260800190565b60008282101561384d5761384d613710565b500390565b6000821982111561386557613865613710565b500190565b60208082526021908201527f4c696768743a20657863656564656420616363657373206c697374206c696d696040820152601d60fa1b606082015260800190565b600063ffffffff8083168185168083038211156138ca576138ca613710565b01949350505050565b60006001600160601b038083168185168083038211156138ca576138ca613710565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561391d57600080fd5b61286982613402565b60006001820161393857613938613710565b5060010190565b60006001600160401b038083168185168083038211156138ca576138ca613710565b60006001600160801b038083168185168183048111821515161561398757613987613710565b02949350505050565b600063ffffffff8083168181036139a9576139a9613710565b6001019392505050565b60008084546139c181613578565b600182811680156139d957600181146139ee57613a1d565b60ff1984168752821515830287019450613a1d565b8860005260208060002060005b85811015613a145781548a8201529084019082016139fb565b50505082870194505b5050505083516138ca818360208801612ebb565b600082613a4057613a40613745565b500690565b8135613a5081612f80565b6001600160401b03811690508154816001600160401b0319821617835560208401356001600160801b0381168114613a8757600080fd5b6001600160c01b031991909116909117604091821b77ffffffffffffffffffffffffffffffff0000000000000000161782559190910135600190910155565b600081613ad557613ad5613710565b506000190190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613b6290830184612ee7565b9695505050505050565b600060208284031215613b7e57600080fd5b815161286981612e8856fea264697066735822122068e53d14b23cb0f48ebdabcbaa6e6149e7294f41b7d839c7700ab139843c595864736f6c634300080f003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000037092545f3de0a2f2bf9a19fd059e88fec98ff6a00000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000000c4c6967687420416e6e75616c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b4c49474854414e4e55414c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000042697066733a2f2f6261666b72656968786d32656f6e646e6a66797a77357764373574686132786c6e6b356e68686e656e3472686d68623679346d72776e7837377661000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061021a5760003560e01c8063888a554c11610123578063b9ac1571116100ab578063ddd20aff1161006f578063ddd20aff1461062f578063df2e1d0614610688578063e550da4e146106a8578063e985e9c5146106c8578063ec13df6b1461071157600080fd5b8063b9ac157114610591578063bb22212c146105af578063c87b56dd146105cf578063c9521ebf146105ef578063d978a0d31461060f57600080fd5b8063a22cb465116100f2578063a22cb46514610509578063a3267ed1146104c3578063b1a9ac5a14610529578063b2873d5c1461055c578063b88d4fde1461057157600080fd5b8063888a554c146104a55780638da5cb5b146104c357806395d89b41146104e15780639d9a34c5146104f657600080fd5b806342842e0e116101a65780636352211e116101755780636352211e1461041257806369aeb6a81461043257806370a0823114610452578063762374b814610472578063820de0c51461048557600080fd5b806342842e0e1461039d5780634f07de09146103bd578063524227be146103dd5780635fd8c710146103fd57600080fd5b8063104974ea116101ed578063104974ea146102d057806323b872dd146102f05780632a55205a146103105780632aad292e1461034f5780633f75a07d1461036f57600080fd5b806301ffc9a71461021f57806306fdde0314610254578063081812fc14610276578063095ea7b3146102ae575b600080fd5b34801561022b57600080fd5b5061023f61023a366004612e9e565b610731565b60405190151581526020015b60405180910390f35b34801561026057600080fd5b50610269610742565b60405161024b9190612f13565b34801561028257600080fd5b50610296610291366004612f26565b6107d4565b6040516001600160a01b03909116815260200161024b565b3480156102ba57600080fd5b506102ce6102c9366004612f54565b61086e565b005b3480156102dc57600080fd5b506102ce6102eb366004612fd6565b610983565b3480156102fc57600080fd5b506102ce61030b36600461302a565b6109dc565b34801561031c57600080fd5b5061033061032b36600461306b565b610a0d565b604080516001600160a01b03909316835260208301919091520161024b565b34801561035b57600080fd5b506102ce61036a36600461308d565b610a46565b34801561037b57600080fd5b5061038f61038a3660046130aa565b610a93565b60405190815260200161024b565b3480156103a957600080fd5b506102ce6103b836600461302a565b610ac6565b3480156103c957600080fd5b506102ce6103d8366004612f26565b610ae1565b3480156103e957600080fd5b506102ce6103f83660046130eb565b610b11565b34801561040957600080fd5b506102ce610bc5565b34801561041e57600080fd5b5061029661042d366004612f26565b610c66565b34801561043e57600080fd5b506102ce61044d3660046130eb565b610cdd565b34801561045e57600080fd5b5061038f61046d36600461308d565b610df7565b6102ce610480366004613168565b610e7e565b34801561049157600080fd5b506102ce6104a03660046130aa565b611251565b3480156104b157600080fd5b506007546001600160a01b0316610296565b3480156104cf57600080fd5b506006546001600160a01b0316610296565b3480156104ed57600080fd5b50610269611289565b6102ce6105043660046131f9565b611298565b34801561051557600080fd5b506102ce610524366004613272565b6115f3565b34801561053557600080fd5b506105496105443660046130eb565b611602565b60405161024b97969594939291906132b0565b34801561056857600080fd5b5061026961175e565b34801561057d57600080fd5b506102ce61058c366004613323565b6117ec565b34801561059d57600080fd5b506008546001600160a01b0316610296565b3480156105bb57600080fd5b506102ce6105ca366004613416565b611824565b3480156105db57600080fd5b506102696105ea366004612f26565b611a2e565b3480156105fb57600080fd5b506102ce61060a366004612fd6565b611c5d565b34801561061b57600080fd5b506102ce61062a36600461308d565b611d79565b34801561063b57600080fd5b5061067061064a366004613480565b600c6020908152600092835260408084209091529082529020546001600160601b031681565b6040516001600160601b03909116815260200161024b565b34801561069457600080fd5b506102ce6106a33660046134a5565b611dc6565b3480156106b457600080fd5b506102ce6106c336600461352c565b611ede565b3480156106d457600080fd5b5061023f6106e336600461354a565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561071d57600080fd5b506102ce61072c36600461308d565b612111565b600061073c8261215e565b92915050565b60606000805461075190613578565b80601f016020809104026020016040519081016040528092919081815260200182805461077d90613578565b80156107ca5780601f1061079f576101008083540402835291602001916107ca565b820191906000526020600020905b8154815290600101906020018083116107ad57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166108525760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061087982610c66565b9050806001600160a01b0316836001600160a01b0316036108e65760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610849565b336001600160a01b0382161480610902575061090281336106e3565b6109745760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610849565b61097e8383612183565b505050565b6007546001600160a01b031633146109ae5760405163f8bcfff160e01b815260040160405180910390fd5b6001600160401b0383166000908152600b60205260409020600581016109d5838583613600565b5050505050565b6109e633826121f1565b610a025760405162461bcd60e51b8152600401610849906136bf565b61097e8383836122e8565b6000806000600a5460095485610a239190613726565b610a2d919061375b565b6008546001600160a01b031693509150505b9250929050565b6006546001600160a01b03163314610a715760405163222569ef60e01b815260040160405180910390fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60008282604051602001610aa892919061376f565b60405160208183030381529060405280519060200120905092915050565b61097e838383604051806020016040528060008152506117ec565b6007546001600160a01b03163314610b0c5760405163f8bcfff160e01b815260040160405180910390fd5b600955565b6007546001600160a01b03163314610b3c5760405163f8bcfff160e01b815260040160405180910390fd5b6001600160401b0381166000908152600b602052604090206003810154610b755760405162461bcd60e51b81526004016108499061379e565b8054600160201b810463ffffffff908116911614610ba55760405162461bcd60e51b8152600401610849906137f1565b610bba82610bb460014361383b565b40612484565b600060039091015550565b6008546001600160a01b03163314610bef5760405162177aa560ea1b815260040160405180910390fd5b6008546040516000916001600160a01b03169047908381818185875af1925050503d8060008114610c3c576040519150601f19603f3d011682016040523d82523d6000602084013e610c41565b606091505b5050905080610c6357604051631d42c86760e21b815260040160405180910390fd5b50565b6000818152600260205260408120546001600160a01b03168061073c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610849565b6007546001600160a01b03163314610d085760405163f8bcfff160e01b815260040160405180910390fd5b6001600160401b0381166000908152600b6020526040902054600160201b900463ffffffff1615610d905760405162461bcd60e51b815260206004820152602c60248201527f4c696768743a20746869732064726f702068617320616c72656164792073746160448201526b727465642073656c6c696e6760a01b6064820152608401610849565b6001600160401b0381166000908152600b6020526040812080546bffffffffffffffffffffffff1916815590610dc96001830182612dee565b610dd7600283016000612e28565b6003820160009055600482016000905560058201600061097e9190612dee565b60006001600160a01b038216610e625760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610849565b506001600160a01b031660009081526003602052604090205490565b6001600160401b0386166000908152600b6020526040902084610eed5760405162461bcd60e51b815260206004820152602160248201527f4c696768743a206d697373696e6720746f6b656e7320746f20707572636861736044820152606560f81b6064820152608401610849565b805463ffffffff80821691610f0b91600160201b9091041687613852565b1115610f595760405162461bcd60e51b815260206004820152601f60248201527f4c696768743a206e6f7420656e6f756768206c65667420666f722073616c65006044820152606401610849565b6001600160401b038510610f6c57600080fd5b600481015415610fe45760405162461bcd60e51b815260206004820152603860248201527f4c696768743a20746869732064726f7020757365732072616e646f6d6e65737360448201527f2c20757365206d696e7452616e646f6d20696e737465616400000000000000006064820152608401610849565b6000610fef8261250d565b602081015190915061100b9087906001600160801b0316613726565b34101561105a5760405162461bcd60e51b815260206004820152601c60248201527f4c696768743a206e6f7420656e6f7567682045746865722070616964000000006044820152606401610849565b6040810151156110c6576110748160400151868686612775565b6040808201516000908152600c6020908152828220338352905220546001600160601b03808516916110a891899116613852565b11156110c65760405162461bcd60e51b81526004016108499061386a565b8154869083906004906110e7908490600160201b900463ffffffff166138ab565b92506101000a81548163ffffffff021916908363ffffffff1602179055506000801b81604001511461116e576040808201516000908152600c6020908152828220338352905290812080548892906111499084906001600160601b03166138d3565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b60005b8681101561124657825463ffffffff16888883818110611193576111936138f5565b90506020020160208101906111a8919061390b565b63ffffffff16106111fb5760405162461bcd60e51b815260206004820152601760248201527f4c696768743a20696e76616c696420746f6b656e2049440000000000000000006044820152606401610849565b6112343361122f8b8b8b86818110611215576112156138f5565b905060200201602081019061122a919061390b565b612823565b612870565b8061123e81613926565b915050611171565b505050505050505050565b6007546001600160a01b0316331461127c5760405163f8bcfff160e01b815260040160405180910390fd5b600d61097e828483613600565b60606001805461075190613578565b6001600160401b038086166000908152600b602052604090209085166113005760405162461bcd60e51b815260206004820181905260248201527f4c696768743a206d697373696e67207075726368617365207175616e746974796044820152606401610849565b805463ffffffff8082169161131e91600160201b909104168761393f565b6001600160401b031611156113755760405162461bcd60e51b815260206004820152601f60248201527f4c696768743a206e6f7420656e6f756768206c65667420666f722073616c65006044820152606401610849565b80600401546000036113ef5760405162461bcd60e51b815260206004820152603960248201527f4c696768743a206e6f2072616e646f6d6e65737320696e20746869732064726f60448201527f702c20757365206d696e7443686f73656e20696e7374656164000000000000006064820152608401610849565b60006113fa8261250d565b9050856001600160401b031681602001516114159190613961565b6001600160801b031634101561146d5760405162461bcd60e51b815260206004820152601c60248201527f4c696768743a206e6f7420656e6f7567682045746865722070616964000000006044820152606401610849565b6040810151156114eb576114878160400151868686612775565b6040808201516000908152600c6020908152828220338352905220546001600160601b03808516916114c4916001600160401b038a1691166138d3565b6001600160601b031611156114eb5760405162461bcd60e51b81526004016108499061386a565b6114fa87610bb460014361383b565b604081015115611568576040808201516000908152600c6020908152828220338352905290812080546001600160401b03891692906115439084906001600160601b03166138d3565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b60005b866001600160401b03168110156115e957825461159c90339061122f908b90600160201b900463ffffffff16612823565b8254600160201b900463ffffffff168360046115b783613990565b91906101000a81548163ffffffff021916908363ffffffff1602179055505080806115e190613926565b91505061156b565b5050505050505050565b6115fe3383836129b2565b5050565b600b602052600090815260409020805460018201805463ffffffff80841694600160201b8504821694600160401b900490911692909161164190613578565b80601f016020809104026020016040519081016040528092919081815260200182805461166d90613578565b80156116ba5780601f1061168f576101008083540402835291602001916116ba565b820191906000526020600020905b81548152906001019060200180831161169d57829003601f168201915b5050505050908060030154908060040154908060050180546116db90613578565b80601f016020809104026020016040519081016040528092919081815260200182805461170790613578565b80156117545780601f1061172957610100808354040283529160200191611754565b820191906000526020600020905b81548152906001019060200180831161173757829003601f168201915b5050505050905087565b600d805461176b90613578565b80601f016020809104026020016040519081016040528092919081815260200182805461179790613578565b80156117e45780601f106117b9576101008083540402835291602001916117e4565b820191906000526020600020905b8154815290600101906020018083116117c757829003601f168201915b505050505081565b6117f633836121f1565b6118125760405162461bcd60e51b8152600401610849906136bf565b61181e84848484612a80565b50505050565b6007546001600160a01b0316331461184f5760405163f8bcfff160e01b815260040160405180910390fd5b60008463ffffffff16116118a55760405162461bcd60e51b815260206004820152601f60248201527f4c696768743a207175616e74697479206d6179206e6f74206265207a65726f006044820152606401610849565b7f00000000000000000000000000000000000000000000000000000000000f42408463ffffffff16111561191b5760405162461bcd60e51b815260206004820152601860248201527f4c696768743a2064726f7020697320746f6f206c6172676500000000000000006044820152606401610849565b6001600160401b0385166000908152600b602052604090205463ffffffff16156119955760405162461bcd60e51b815260206004820152602560248201527f4c696768743a20546869732064726f702077617320616c7265616479207072656044820152641c185c995960da1b6064820152608401610849565b816119e25760405162461bcd60e51b815260206004820152601760248201527f4c696768743a206d697373696e672055524920626173650000000000000000006044820152606401610849565b6001600160401b0385166000908152600b60205260409020805463ffffffff191663ffffffff861617815560018101611a1c848683613600565b50600381018290556004015550505050565b6000818152600260205260409020546060906001600160a01b0316611a955760405162461bcd60e51b815260206004820152601b60248201527f4c696768743a20746f6b656e20646f6573206e6f7420657869737400000000006044820152606401610849565b600080611aa184612ab3565b6001600160401b0382166000908152600b60205260408120600481015493955063ffffffff92909216935090919003611b145780600101611aea836001600160401b0316612b13565b604051602001611afb9291906139b3565b6040516020818303038152906040529350505050919050565b600381015415611bdb576000816005018054611b2f90613578565b90501115611bce57806005018054611b4690613578565b80601f0160208091040260200160405190810160405280929190818152602001828054611b7290613578565b8015611bbf5780601f10611b9457610100808354040283529160200191611bbf565b820191906000526020600020905b815481529060010190602001808311611ba257829003601f168201915b50505050509350505050919050565b600d8054611b4690613578565b80546004820154600091611bf79163ffffffff90911690613a31565b825490915060009063ffffffff16611c18836001600160401b038716613852565b611c229190613a31565b905082600101611c3182612b13565b604051602001611c429291906139b3565b60405160208183030381529060405295505050505050919050565b6007546001600160a01b03163314611c885760405163f8bcfff160e01b815260040160405180910390fd5b6001600160401b0383166000908152600b602052604090206003810154611cc15760405162461bcd60e51b81526004016108499061379e565b8054600160201b810463ffffffff908116911614611cf15760405162461bcd60e51b8152600401610849906137f1565b80600301548383604051602001611d0992919061376f565b6040516020818303038152906040528051906020012014611d625760405162461bcd60e51b8152602060048201526013602482015272131a59da1d0e881ddc9bdb99c81cd958dc995d606a1b6044820152606401610849565b611d6c8483612484565b6000600390910155505050565b6006546001600160a01b03163314611da45760405163222569ef60e01b815260040160405180910390fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6007546001600160a01b03163314611df15760405163f8bcfff160e01b815260040160405180910390fd5b6001600160401b0383166000908152600b60205260409020805463ffffffff16611e6c5760405162461bcd60e51b815260206004820152602660248201527f4c696768743a20746869732064726f7020686173206e6f74206265656e207072604482015265195c185c995960d21b6064820152608401610849565b611e7a600282016000612e28565b60005b828110156109d55781600201848483818110611e9b57611e9b6138f5565b835460018101855560009485526020909420606090910292909201926002029091019050611ec98282613a45565b50508080611ed690613926565b915050611e7d565b6001600160401b0382166000908152600b602052604090208054600160201b810463ffffffff908116911614611f645760405162461bcd60e51b815260206004820152602560248201527f4c696768743a20746869732064726f7020686173206e6f7420736f6c64206f756044820152641d081e595d60da1b6064820152608401610849565b600381015415611fd15760405162461bcd60e51b815260206004820152603260248201527f4c696768743a20746869732072616e646f6d2064726f7020686173206e6f74206044820152711899595b88199a5b985b1a5e9959081e595d60721b6064820152608401610849565b805463ffffffff808216600160401b909204161061203f5760405162461bcd60e51b815260206004820152602560248201527f4c696768743a20616c6c206d6574616461746120697320616c726561647920666044820152643937bd32b760d91b6064820152608401610849565b60008211801561205f5750805463ffffffff808216600160401b90920416105b1561097e578054600090612081908590600160401b900463ffffffff16612823565b9050807fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b556572076120ae83611a2e565b6040516120bb9190612f13565b60405180910390a28154600160401b900463ffffffff168260086120de83613990565b91906101000a81548163ffffffff021916908363ffffffff16021790555050828061210890613ac6565b9350505061203f565b6006546001600160a01b0316331461213c5760405163222569ef60e01b815260040160405180910390fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b0319821663152a902d60e11b148061073c575061073c82612c13565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906121b882610c66565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661226a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610849565b600061227583610c66565b9050806001600160a01b0316846001600160a01b031614806122bc57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806122e05750836001600160a01b03166122d5846107d4565b6001600160a01b0316145b949350505050565b826001600160a01b03166122fb82610c66565b6001600160a01b03161461235f5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610849565b6001600160a01b0382166123c15760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610849565b6123cc600082612183565b6001600160a01b03831660009081526003602052604081208054600192906123f590849061383b565b90915550506001600160a01b0382166000908152600360205260408120805460019290612423908490613852565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160401b0382166000908152600b6020908152604080832081518084018690528251808203850181529083019092528151919092012090916124ca600283613a31565b8360040154189050806040516020016124e591815260200190565b6040516020818303038152906040528051906020012060001c83600401819055505050505050565b6040805160608101825260008082526020820181905291810191909152600282015461257b5760405162461bcd60e51b815260206004820152601d60248201527f4c696768743a206e6f2064726f702070686173657320617265207365740000006044820152606401610849565b81600201600081548110612591576125916138f5565b600091825260208220600290910201546001600160401b0316900361260a5760405162461bcd60e51b815260206004820152602960248201527f4c696768743a2066697273742064726f7020706861736520686173206e6f2073604482015268746172742074696d6560b81b6064820152608401610849565b4282600201600081548110612621576126216138f5565b60009182526020909120600290910201546001600160401b0316111561269d5760405162461bcd60e51b815260206004820152602b60248201527f4c696768743a2066697273742064726f7020706861736520686173206e6f742060448201526a1cdd185c9d1959081e595d60aa1b6064820152608401610849565b60005b60028301546126b19060019061383b565b8110156127095742600284016126c8836001613852565b815481106126d8576126d86138f5565b60009182526020909120600290910201546001600160401b031611612709578061270181613926565b9150506126a0565b82600201818154811061271e5761271e6138f5565b600091825260209182902060408051606081018252600290930290910180546001600160401b03811684526001600160801b03600160401b9091041693830193909352600190920154918101919091529392505050565b60003360601b6bffffffffffffffffffffffff19166001600160601b0383161790506127d7848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250859150612c639050565b6109d55760405162461bcd60e51b815260206004820181905260248201527f4c696768743a20696e76616c696420616363657373206c6973742070726f6f666044820152606401610849565b600063ffffffff821661285f6001600160401b0385167f00000000000000000000000000000000000000000000000000000000000f4240613726565b6128699190613852565b9392505050565b6001600160a01b0382166128c65760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610849565b6000818152600260205260409020546001600160a01b03161561292b5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610849565b6001600160a01b0382166000908152600360205260408120805460019290612954908490613852565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b816001600160a01b0316836001600160a01b031603612a135760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610849565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612a8b8484846122e8565b612a9784848484612c79565b61181e5760405162461bcd60e51b815260040161084990613add565b600080612ae07f00000000000000000000000000000000000000000000000000000000000f42408461375b565b9150612b0c7f00000000000000000000000000000000000000000000000000000000000f424084613a31565b9050915091565b606081600003612b3a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612b645780612b4e81613926565b9150612b5d9050600a8361375b565b9150612b3e565b6000816001600160401b03811115612b7e57612b7e61330d565b6040519080825280601f01601f191660200182016040528015612ba8576020820181803683370190505b5090505b84156122e057612bbd60018361383b565b9150612bca600a86613a31565b612bd5906030613852565b60f81b818381518110612bea57612bea6138f5565b60200101906001600160f81b031916908160001a905350612c0c600a8661375b565b9450612bac565b60006001600160e01b031982166380ac58cd60e01b1480612c4457506001600160e01b03198216635b5e139f60e01b145b8061073c57506301ffc9a760e01b6001600160e01b031983161461073c565b600082612c708584612d7a565b14949350505050565b60006001600160a01b0384163b15612d6f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612cbd903390899088908890600401613b2f565b6020604051808303816000875af1925050508015612cf8575060408051601f3d908101601f19168201909252612cf591810190613b6c565b60015b612d55573d808015612d26576040519150601f19603f3d011682016040523d82523d6000602084013e612d2b565b606091505b508051600003612d4d5760405162461bcd60e51b815260040161084990613add565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506122e0565b506001949350505050565b600081815b8451811015612de6576000858281518110612d9c57612d9c6138f5565b60200260200101519050808311612dc25760008381526020829052604090209250612dd3565b600081815260208490526040902092505b5080612dde81613926565b915050612d7f565b509392505050565b508054612dfa90613578565b6000825580601f10612e0a575050565b601f016020900490600052602060002090810190610c639190612e49565b5080546000825560020290600052602060002090810190610c639190612e62565b5b80821115612e5e5760008155600101612e4a565b5090565b5b80821115612e5e5780546001600160c01b031916815560006001820155600201612e63565b6001600160e01b031981168114610c6357600080fd5b600060208284031215612eb057600080fd5b813561286981612e88565b60005b83811015612ed6578181015183820152602001612ebe565b8381111561181e5750506000910152565b60008151808452612eff816020860160208601612ebb565b601f01601f19169290920160200192915050565b6020815260006128696020830184612ee7565b600060208284031215612f3857600080fd5b5035919050565b6001600160a01b0381168114610c6357600080fd5b60008060408385031215612f6757600080fd5b8235612f7281612f3f565b946020939093013593505050565b6001600160401b0381168114610c6357600080fd5b60008083601f840112612fa757600080fd5b5081356001600160401b03811115612fbe57600080fd5b602083019150836020828501011115610a3f57600080fd5b600080600060408486031215612feb57600080fd5b8335612ff681612f80565b925060208401356001600160401b0381111561301157600080fd5b61301d86828701612f95565b9497909650939450505050565b60008060006060848603121561303f57600080fd5b833561304a81612f3f565b9250602084013561305a81612f3f565b929592945050506040919091013590565b6000806040838503121561307e57600080fd5b50508035926020909101359150565b60006020828403121561309f57600080fd5b813561286981612f3f565b600080602083850312156130bd57600080fd5b82356001600160401b038111156130d357600080fd5b6130df85828601612f95565b90969095509350505050565b6000602082840312156130fd57600080fd5b813561286981612f80565b60008083601f84011261311a57600080fd5b5081356001600160401b0381111561313157600080fd5b6020830191508360208260051b8501011115610a3f57600080fd5b80356001600160601b038116811461316357600080fd5b919050565b6000806000806000806080878903121561318157600080fd5b863561318c81612f80565b955060208701356001600160401b03808211156131a857600080fd5b6131b48a838b01613108565b909750955060408901359150808211156131cd57600080fd5b506131da89828a01613108565b90945092506131ed90506060880161314c565b90509295509295509295565b60008060008060006080868803121561321157600080fd5b853561321c81612f80565b9450602086013561322c81612f80565b935060408601356001600160401b0381111561324757600080fd5b61325388828901613108565b909450925061326690506060870161314c565b90509295509295909350565b6000806040838503121561328557600080fd5b823561329081612f3f565b9150602083013580151581146132a557600080fd5b809150509250929050565b600063ffffffff808a168352808916602084015280881660408401525060e060608301526132e160e0830187612ee7565b8560808401528460a084015282810360c08401526132ff8185612ee7565b9a9950505050505050505050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561333957600080fd5b843561334481612f3f565b9350602085013561335481612f3f565b92506040850135915060608501356001600160401b038082111561337757600080fd5b818701915087601f83011261338b57600080fd5b81358181111561339d5761339d61330d565b604051601f8201601f19908116603f011681019083821181831017156133c5576133c561330d565b816040528281528a60208487010111156133de57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b803563ffffffff8116811461316357600080fd5b60008060008060006080868803121561342e57600080fd5b853561343981612f80565b945061344760208701613402565b935060408601356001600160401b0381111561346257600080fd5b61346e88828901612f95565b96999598509660600135949350505050565b6000806040838503121561349357600080fd5b8235915060208301356132a581612f3f565b6000806000604084860312156134ba57600080fd5b83356134c581612f80565b925060208401356001600160401b03808211156134e157600080fd5b818601915086601f8301126134f557600080fd5b81358181111561350457600080fd5b87602060608302850101111561351957600080fd5b6020830194508093505050509250925092565b6000806040838503121561353f57600080fd5b8235612f7281612f80565b6000806040838503121561355d57600080fd5b823561356881612f3f565b915060208301356132a581612f3f565b600181811c9082168061358c57607f821691505b6020821081036135ac57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561097e57600081815260208120601f850160051c810160208610156135d95750805b601f850160051c820191505b818110156135f8578281556001016135e5565b505050505050565b6001600160401b038311156136175761361761330d565b61362b836136258354613578565b836135b2565b6000601f84116001811461365f57600085156136475750838201355b600019600387901b1c1916600186901b1783556109d5565b600083815260209020601f19861690835b828110156136905786850135825560209485019460019092019101613670565b50868210156136ad5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561374057613740613710565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261376a5761376a613745565b500490565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60208082526033908201527f4c696768743a20746869732064726f7020646f6573206e6f74206861766520616040820152722070617373776f72642028616e796d6f72652960681b606082015260800190565b6020808252602a908201527f4c696768743a20746869732064726f7020686173206e6f7420636f6d706c657460408201526965642073656c6c696e6760b01b606082015260800190565b60008282101561384d5761384d613710565b500390565b6000821982111561386557613865613710565b500190565b60208082526021908201527f4c696768743a20657863656564656420616363657373206c697374206c696d696040820152601d60fa1b606082015260800190565b600063ffffffff8083168185168083038211156138ca576138ca613710565b01949350505050565b60006001600160601b038083168185168083038211156138ca576138ca613710565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561391d57600080fd5b61286982613402565b60006001820161393857613938613710565b5060010190565b60006001600160401b038083168185168083038211156138ca576138ca613710565b60006001600160801b038083168185168183048111821515161561398757613987613710565b02949350505050565b600063ffffffff8083168181036139a9576139a9613710565b6001019392505050565b60008084546139c181613578565b600182811680156139d957600181146139ee57613a1d565b60ff1984168752821515830287019450613a1d565b8860005260208060002060005b85811015613a145781548a8201529084019082016139fb565b50505082870194505b5050505083516138ca818360208801612ebb565b600082613a4057613a40613745565b500690565b8135613a5081612f80565b6001600160401b03811690508154816001600160401b0319821617835560208401356001600160801b0381168114613a8757600080fd5b6001600160c01b031991909116909117604091821b77ffffffffffffffffffffffffffffffff0000000000000000161782559190910135600190910155565b600081613ad557613ad5613710565b506000190190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613b6290830184612ee7565b9695505050505050565b600060208284031215613b7e57600080fd5b815161286981612e8856fea264697066735822122068e53d14b23cb0f48ebdabcbaa6e6149e7294f41b7d839c7700ab139843c595864736f6c634300080f0033

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

00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000037092545f3de0a2f2bf9a19fd059e88fec98ff6a00000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000000c4c6967687420416e6e75616c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b4c49474854414e4e55414c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000042697066733a2f2f6261666b72656968786d32656f6e646e6a66797a77357764373574686132786c6e6b356e68686e656e3472686d68623679346d72776e7837377661000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name (string): Light Annual
Arg [1] : symbol (string): LIGHTANNUAL
Arg [2] : unrevealedTokenURI_ (string): ipfs://bafkreihxm2eondnjfyzw5wd75tha2xlnk5nhhnen4rhmhb6y4mrwnx77va
Arg [3] : newChiefFinancialOfficer (address): 0x37092545f3De0A2F2Bf9A19fD059E88Fec98ff6A
Arg [4] : newRoyaltyFraction (uint256): 1000

-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [3] : 00000000000000000000000037092545f3de0a2f2bf9a19fd059e88fec98ff6a
Arg [4] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [6] : 4c6967687420416e6e75616c0000000000000000000000000000000000000000
Arg [7] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [8] : 4c49474854414e4e55414c000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000042
Arg [10] : 697066733a2f2f6261666b72656968786d32656f6e646e6a66797a7735776437
Arg [11] : 3574686132786c6e6b356e68686e656e3472686d68623679346d72776e783737
Arg [12] : 7661000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.