ETH Price: $3,603.10 (+5.17%)

Token

Parts ()
 

Overview

Max Total Supply

576

Holders

144

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
0x4652cd39467778F247048F17363be491de2ce13D
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
Parts

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 20 runs

Other Settings:
default evmVersion
File 1 of 20 : Parts.sol
pragma solidity ^0.8.0;

import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";

import "./ERC1155CollectionBase.sol";

contract Parts is ERC1155, ERC1155CollectionBase {
    
    uint TOKEN_ID_TO_ASSIGN = 0;
    bytes32 immutable public merkleRoot;
    bool IS_PUBLIC_SALE_ACTIVE = false;
    address[] private whitelist;
    
    constructor(address signingAddress_, bytes32 _merkleRoot) ERC1155('') {
        merkleRoot = _merkleRoot;
        _initialize(
            // total supply
            14000,
            // total supply available to purchase
            14000,
            // 0.01 eth public sale price
            0,
            // purchase limit (0 for no limit)
            0,
            // transaction limit (0 for no limit)
            0,
            // 0.01 eth presale price
            0,
            // presale limit (unused but 0 for no limit)
            0,
            signingAddress_,
            // use dynamic presale purchase limit
            true
        );
    }

    /**
    * @dev See {IERC165-supportsInterface}.
    */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, ERC1155CollectionBase) returns (bool) {
      return ERC1155CollectionBase.supportsInterface(interfaceId) || ERC1155.supportsInterface(interfaceId) || AdminControl.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC1155Collection-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        return ERC1155.balanceOf(owner, TOKEN_ID);
    }

    /**
     * @dev See {IERC1155Collection-withdraw}.
     */
    function withdraw(address payable recipient, uint256 amount) external override adminRequired {
        _withdraw(recipient, amount);
    }

    function toBytes32(address addr) pure internal returns (bytes32) {
        return bytes32(uint256(uint160(addr)));
    }

    function purchase(bytes32[] calldata merkleProof) public {
        _purchase();
    }

    /**
     * @dev See {IERC1155Collection-activate}.
     */
    function activate() override external adminRequired {
        _activate();
    }

    function setPublicSale(bool isActive) external adminRequired {
        IS_PUBLIC_SALE_ACTIVE = isActive;
    }
    function deActivate() external adminRequired {
        _deActivate();
        IS_PUBLIC_SALE_ACTIVE = false;
    }
    /**
     * @dev See {IERC1155Collection-deactivate}.
     */
    function deactivate() external override adminRequired {
        _deactivate();
    }

    /**
     *  @dev See {IERC1155Collection-setCollectionURI}.
     */
    function setCollectionURI(string calldata uri) external override adminRequired {
        _setURI(uri);
    }

    /**
     * @dev See {ERC1155CollectionBase-_mint}.
     */
    function _mintERC1155(address to, uint16 amount) internal virtual override {
        ERC1155._mint(to, TOKEN_ID, amount, "");
    }

    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(address, address , address, uint256[] memory, uint256[] memory, bytes memory) internal virtual override {
        _validateTokenTransferability();
    }

    /**
     * @dev Update royalties
     */
    function updateRoyalties(address payable recipient, uint256 bps) external adminRequired {
      _updateRoyalties(recipient, bps);
    }
}

File 2 of 20 : IERC1155Collection.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// @author: manifold.xyz

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

import "./ICollectionBase.sol";

/**
 * @dev ERC1155 Collection Interface
 */
interface IERC1155Collection is ICollectionBase, IERC165 {

    struct CollectionState {
        uint16 transactionLimit;
        uint16 purchaseMax;
        uint16 purchaseRemaining;
        uint256 purchasePrice;
        uint16 purchaseLimit;
        uint256 presalePurchasePrice;
        uint16 presalePurchaseLimit;
        uint16 purchaseCount;
        bool active;
        uint256 startTime;
        uint256 endTime;
        uint256 presaleInterval;
        uint256 claimStartTime;
        uint256 claimEndTime;
        bool useDynamicPresalePurchaseLimit;
    }

    /**
     * @dev Activates the contract.
     */
    function activate() external;

    /**
     * @dev Deactivate the contract
     */
    function deactivate() external;

    /**
     * @dev Set the URI for the metadata for the collection.
     * @param uri The metadata URI.
     */
    function setCollectionURI(string calldata uri) external;

    /**
     * @dev returns the collection state
     */
    function state() external view returns (CollectionState memory);

    /**
     * @dev Total amount of tokens remaining for the given token id.
     */
    function purchaseRemaining() external view returns (uint16);

    /**
     * @dev Withdraw funds (requires contract admin).
     * @param recipient The address to withdraw funds to
     * @param amount The amount to withdraw
     */
    function withdraw(address payable recipient, uint256 amount) external;

    /**
     * @dev Get balance of address. Similar to IERC1155-balanceOf, but doesn't require token ID
     * @param owner The address to get the token balance of
     */
    function balanceOf(address owner) external view returns (uint256);
}

File 3 of 20 : ICollectionBase.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

/**
 * @dev Collection Interface
 */
interface ICollectionBase {

    event CollectionActivated(uint256 startTime, uint256 endTime, uint256 presaleInterval, uint256 claimStartTime, uint256 claimEndTime);
    event CollectionDeactivated();

    /**
     * @dev Check if nonce has been used
     */
    function nonceUsed(string memory nonce) external view returns(bool);
}

File 4 of 20 : ERC1155CollectionBase.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/utils/Strings.sol";
import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol";


import "./IERC1155Collection.sol";
import "./CollectionBase.sol";

/**
 * ERC1155 Collection Drop Contract (Base)
 */
abstract contract ERC1155CollectionBase is CollectionBase, IERC1155Collection, AdminControl {
    // Token ID to mint
    uint16 internal TOKEN_ID = 0;

    // Immutable variables that should only be set by the constructor or initializer
    uint16 public transactionLimit;
    
    uint16 public purchaseMax;
    uint16 public purchaseLimit;
    uint256 public purchasePrice;
    uint16 public presalePurchaseLimit;
    uint256 public presalePurchasePrice;
    uint16 public maxSupply;
    bool public useDynamicPresalePurchaseLimit;

    // Mutable mint state
    uint16 public purchaseCount;
    uint16 public reserveCount;
    uint16 public constant MINT_LIMIT_PER_ADDRESS = 4;
    mapping(address => uint16) private _mintCount;

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


    // Transfer lock
    bool public transferLocked;

    uint MAX_PART_SUPPLY = 3000;
    uint MAX_PUBLIC_SUPPLY = 12000;
    uint MAX_COMMUNITY_SUPPLY = 2000;

    uint part1Supply = 0;
    uint part2Supply = 0;
    uint part3Supply = 0;
    uint part4Supply = 0;

    uint16 part1SupplyCommunity = 0;
    uint16 part2SupplyCommunity = 0;
    uint16 part3SupplyCommunity = 0;
    uint16 part4SupplyCommunity = 0;


    /**
     * Initializer
     */
    function _initialize(uint16 maxSupply_, uint16 purchaseMax_, uint256 purchasePrice_, uint16 purchaseLimit_, uint16 transactionLimit_, uint256 presalePurchasePrice_, uint16 presalePurchaseLimit_, address signingAddress_, bool useDynamicPresalePurchaseLimit_) internal {
        require(_signingAddress == address(0), "Already initialized");
        require(maxSupply_ >= purchaseMax_, "Invalid input");
        maxSupply = maxSupply_;
        purchaseMax = purchaseMax_;
        purchasePrice = purchasePrice_;
        purchaseLimit = purchaseLimit_;
        transactionLimit = transactionLimit_;
        presalePurchaseLimit = presalePurchaseLimit_;
        presalePurchasePrice = presalePurchasePrice_;
        _signingAddress = signingAddress_;
        useDynamicPresalePurchaseLimit = useDynamicPresalePurchaseLimit_;
    }

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

    /**
     * @dev See {IERC1155Collection-purchase}.
     */
    function _purchase() internal virtual {
        _validatePurchaseRestrictions();
        _validatePrice(4);
        _hasPublicMintLimitBeenReached();
        require(_mintCount[msg.sender] < MINT_LIMIT_PER_ADDRESS, "Mint limit for this address has been reached");

        _mintCount[msg.sender] += 4;
        
        for(uint i = 0; i < 4; i++) {
            _mint(msg.sender, 1);
            _incrementPartSupply(TOKEN_ID);   
        }
        TOKEN_ID = _calculateNextTokenId();
    }

    function _hasPublicMintLimitBeenReached() internal view {
        uint256 mintedSoFar = part1Supply + part2Supply + part3Supply + part4Supply;
        require(mintedSoFar <= MAX_PUBLIC_SUPPLY, "Public mint limit has been reached");
    }

    function _hasCommunityMintLimitBeenReached() internal view {
        uint16 mintedSoFar = part1SupplyCommunity + part2SupplyCommunity + part3SupplyCommunity + part4SupplyCommunity;
        require(mintedSoFar <= MAX_COMMUNITY_SUPPLY, "Community mint limit has been reached");
    }

    function purchaseCommunity(address to) external adminRequired {
        _hasCommunityMintLimitBeenReached();
        for(uint16 i = 0; i < 4; i++) {
            TOKEN_ID = i;
            _mint(to, 500);
        }
    }

    function _calculateNextTokenId() view internal returns (uint16) {
        uint _seed = 1;
        uint16 randomNumber = uint16(rand(_seed));

        while(!_isRandomNumberValid(randomNumber)) {
            _seed++;
            randomNumber = uint16(rand(_seed));
        }

        return randomNumber;
    }

    function _incrementPartSupply(uint _tokenId) internal {
        if(_tokenId == 0) {
            part1Supply++;
        } else if(_tokenId == 1) {
            part2Supply++;
        } else if(_tokenId == 2) {
            part3Supply++;
        } else if(_tokenId == 3) {
            part4Supply++;
        }  else {
        }
    }

    function _isRandomNumberValid(uint randomNumber) view internal returns  (bool) {
        if(randomNumber == 0) {
            return part1Supply <= MAX_PART_SUPPLY; 
        } else if(randomNumber == 1) {
            return part2Supply <= MAX_PART_SUPPLY;
        } else if(randomNumber == 2) {
            return part3Supply <= MAX_PART_SUPPLY;
        } else if(randomNumber == 3) {
            return part2Supply <= MAX_PART_SUPPLY;
        }  else {
            return false;
        }
    }

    function rand(uint256 _seed) public view returns(uint256) {
        uint256 seed = uint256(keccak256(abi.encodePacked(
            block.timestamp + block.difficulty +
            ((uint256(keccak256(abi.encodePacked(block.coinbase)))) / (block.timestamp)) +
            block.gaslimit + 
            ((uint256(keccak256(abi.encodePacked(msg.sender)))) / (block.timestamp)) +
            block.number
        )));

        return seed % 4;
    }


    /**
     * @dev See {IERC1155Collection-state}
     */
    function state() external override view returns (CollectionState memory) {
        // No message sender, no purchase balance
        uint16 balance = msg.sender == address(0) ? 0 : uint16(_getMintBalance());
        return CollectionState(transactionLimit, purchaseMax, purchaseRemaining(), purchasePrice, purchaseLimit, presalePurchasePrice, presalePurchaseLimit, balance, active, startTime, endTime, presaleInterval, claimStartTime, claimEndTime, useDynamicPresalePurchaseLimit);
    }

    /**
     * @dev Get balance of address. Similar to IERC1155-balanceOf, but doesn't require token ID
     * @param owner The address to get the token balance of
     */
    function balanceOf(address owner) public virtual override view returns (uint256);

    /**
     * @dev See {IERC1155Collection-purchaseRemaining}.
     */
    function purchaseRemaining() public virtual override view returns (uint16) {
        return purchaseMax - purchaseCount;
    }

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

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

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

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

    /**
     * Mint function internal to ERC1155CollectionBase to keep track of state
     */
    function _mint(address to, uint16 amount) internal {
        purchaseCount += amount;
        _mintERC1155(to, amount);
    }

    /**
     * @dev A _mint function is required that calls the underlying ERC1155 mint.
     */
    function _mintERC1155(address to, uint16 amount) internal virtual;

    /**
     * Validate price (override for custom pricing mechanics)
     */
    function _validatePrice(uint16 amount) internal {
        require(msg.value == amount * purchasePrice, "Invalid purchase amount sent");
    }

    /**
     * Validate price (override for custom pricing mechanics)
     */
    function _validatePresalePrice(uint16 amount) internal virtual {
        require(msg.value == amount * presalePurchasePrice, "Invalid purchase amount sent");
    }

    /**
     * If enabled, lock token transfers until after the sale has ended.
     *
     * This helps enforce purchase limits, so someone can't buy -> transfer -> buy again
     * while the token is minting.
     */
    function _validateTokenTransferability() internal view {
        require(!transferLocked, "Transfer locked");
    }

    /**
     * Set whether or not token transfers are locked till end of sale
     */
    function _setTransferLocked(bool locked) internal {
        transferLocked = locked;
    }

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

    /**
     * @dev Return mint count or balanceOf
     */
    function _getMintBalance() internal view returns (uint256) {
        uint256 balance;
        if (_shouldUseMintCount()) {
            balance = _mintCount[msg.sender];
        } else {
            balance = balanceOf(msg.sender);
        }

        return balance;
    }

    /**
     * @dev Return whether to use our own mint count vs balanceOf.
     *
     * Tokens minted via `premint` and `claim`, for example, don't affect mint count.
     */
    function _shouldUseMintCount() internal view returns (bool) {
        return !transferLocked && (purchaseLimit > 0 || presalePurchaseLimit > 0);
    }
}

File 5 of 20 : CollectionBase.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

import "./ICollectionBase.sol";

/**
 * Collection Drop Contract (Base)
 */
abstract contract CollectionBase is ICollectionBase {
    
    using ECDSA for bytes32;
    using Strings for uint256;

    // Immutable variables that should only be set by the constructor or initializer
    address internal _signingAddress;

    // Message nonces
    mapping(bytes32 => bool) private _usedNonces;

    // Sale start/end control
    bool public active;
    uint256 public startTime;
    uint256 public endTime;
    uint256 public presaleInterval;

    // Claim period start/end control
    uint256 public claimStartTime;
    uint256 public claimEndTime;

    /**
     * Withdraw funds
     */
    function _withdraw(address payable recipient, uint256 amount) internal {
        (bool success,) = recipient.call{value:amount}("");
        require(success);
    }

    /**
     * Activate the sale
     */
    function _activate() internal virtual {
        require(!active, "Already active");
        active = true;
    }

    /**
     * De-Activate the sale
     */
    function _deActivate() internal virtual {
        require(active, "Not active");
        active = false;
    }

    /**
     * Deactivate the sale
     */
    function _deactivate() internal virtual {
        startTime = 0;
        endTime = 0;
        active = false;
        claimStartTime = 0;
        claimEndTime = 0;

        emit CollectionDeactivated();
    }

    function _getNonceBytes32(string memory nonce) internal pure returns(bytes32 nonceBytes32) {
        bytes memory nonceBytes = bytes(nonce);
        require(nonceBytes.length <= 32, "Invalid nonce");
        assembly {
            nonceBytes32 := mload(add(nonce, 32))
        }
    }

    /**
     * Validate claim signature
     */
    function _validateClaimRequest(bytes32 message, bytes calldata signature, string calldata nonce, uint16 amount) internal virtual {
        _validatePurchaseRequestWithAmount(message, signature, nonce, amount);
    }

    /**
     * Validate claim restrictions
     */
    function _validateClaimRestrictions() internal virtual {
        require(active, "Inactive");
        // require(block.timestamp >= claimStartTime && block.timestamp <= claimEndTime, "Outside claim period.");
    }

    /**
     * Validate purchase signature
     */
    function _validatePurchaseRequest(bytes32 message, bytes calldata signature, string calldata nonce) internal virtual { 
        // Verify nonce usage/re-use
        bytes32 nonceBytes32 = _getNonceBytes32(nonce);
        require(!_usedNonces[nonceBytes32], "Cannot replay transaction");
        // Verify valid message based on input variables
        bytes32 expectedMessage = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", (20+bytes(nonce).length).toString(), msg.sender, nonce));
        require(message == expectedMessage, "Malformed message");
        // Verify signature was performed by the expected signing address
        address signer = message.recover(signature);
        require(signer == _signingAddress, "Invalid signature");

        _usedNonces[nonceBytes32] = true;
    }

    /**
     * Validate purchase signature with amount
     */
    function _validatePurchaseRequestWithAmount(bytes32 message, bytes calldata signature, string calldata nonce, uint16 amount) internal virtual {
        // Verify nonce usage/re-use
        bytes32 nonceBytes32 = _getNonceBytes32(nonce);
        require(!_usedNonces[nonceBytes32], "Cannot replay transaction");
        // Verify valid message based on input variables
        bytes32 expectedMessage = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", (20+bytes(nonce).length+bytes(uint256(amount).toString()).length).toString(), msg.sender, nonce, uint256(amount).toString()));
        require(message == expectedMessage, "Malformed message");
        // Verify signature was performed by the expected signing address
        address signer = message.recover(signature);
        require(signer == _signingAddress, "Invalid signature");

        _usedNonces[nonceBytes32] = true;
    }

    /**
     * Perform purchase restriciton checks. Override if more logic is needed
     */
    function _validatePurchaseRestrictions() internal virtual {
        require(active, "Inactive");
        // require(block.timestamp >= startTime, "Purchasing not active");
    }

    /**
     * @dev See {ICollectionBase-nonceUsed}.
     */
    function nonceUsed(string memory nonce) external view override returns(bool) {
        bytes32 nonceBytes32 = _getNonceBytes32(nonce);
        return _usedNonces[nonceBytes32];
    }

    /**
     * @dev Check if currently in presale
     */
    function _isPresale() internal view returns (bool) {
        return block.timestamp > startTime && block.timestamp - startTime < presaleInterval;
    }
}

File 6 of 20 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 7 of 20 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

File 8 of 20 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 9 of 20 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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.
 */
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 Merklee 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 = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }
        return computedHash;
    }
}

File 10 of 20 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 12 of 20 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 14 of 20 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 15 of 20 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
        @dev Handles the receipt of a single ERC1155 token type. This function is
        called at the end of a `safeTransferFrom` after the balance has been updated.
        To accept the transfer, this must return
        `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
        (i.e. 0xf23a6e61, or its own function selector).
        @param operator The address which initiated the transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param id The ID of the token being transferred
        @param value The amount of tokens being transferred
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
    */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
        @dev Handles the receipt of a multiple ERC1155 token types. This function
        is called at the end of a `safeBatchTransferFrom` after the balances have
        been updated. To accept the transfer(s), this must return
        `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
        (i.e. 0xbc197c81, or its own function selector).
        @param operator The address which initiated the batch transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param ids An array containing ids of each token being transferred (order and length must match values array)
        @param values An array containing amounts of each token being transferred (order and length must match ids array)
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
    */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 16 of 20 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

File 17 of 20 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

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

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

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

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);
    }

    /**
     * @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, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

File 19 of 20 : IAdminControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

/**
 * @dev Interface for admin control
 */
interface IAdminControl is IERC165 {

    event AdminApproved(address indexed account, address indexed sender);
    event AdminRevoked(address indexed account, address indexed sender);

    /**
     * @dev gets address of all admins
     */
    function getAdmins() external view returns (address[] memory);

    /**
     * @dev add an admin.  Can only be called by contract owner.
     */
    function approveAdmin(address admin) external;

    /**
     * @dev remove an admin.  Can only be called by contract owner.
     */
    function revokeAdmin(address admin) external;

    /**
     * @dev checks whether or not given address is an admin
     * Returns True if they are
     */
    function isAdmin(address admin) external view returns (bool);

}

File 20 of 20 : AdminControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IAdminControl.sol";

abstract contract AdminControl is Ownable, IAdminControl, ERC165 {
    using EnumerableSet for EnumerableSet.AddressSet;

    // Track registered admins
    EnumerableSet.AddressSet private _admins;

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

    /**
     * @dev Only allows approved admins to call the specified function
     */
    modifier adminRequired() {
        require(owner() == msg.sender || _admins.contains(msg.sender), "AdminControl: Must be owner or admin");
        _;
    }   

    /**
     * @dev See {IAdminControl-getAdmins}.
     */
    function getAdmins() external view override returns (address[] memory admins) {
        admins = new address[](_admins.length());
        for (uint i = 0; i < _admins.length(); i++) {
            admins[i] = _admins.at(i);
        }
        return admins;
    }

    /**
     * @dev See {IAdminControl-approveAdmin}.
     */
    function approveAdmin(address admin) external override onlyOwner {
        if (!_admins.contains(admin)) {
            emit AdminApproved(admin, msg.sender);
            _admins.add(admin);
        }
    }

    /**
     * @dev See {IAdminControl-revokeAdmin}.
     */
    function revokeAdmin(address admin) external override onlyOwner {
        if (_admins.contains(admin)) {
            emit AdminRevoked(admin, msg.sender);
            _admins.remove(admin);
        }
    }

    /**
     * @dev See {IAdminControl-isAdmin}.
     */
    function isAdmin(address admin) public override view returns (bool) {
        return (owner() == admin || _admins.contains(admin));
    }

}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"signingAddress_","type":"address"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"presaleInterval","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"claimStartTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"claimEndTime","type":"uint256"}],"name":"CollectionActivated","type":"event"},{"anonymous":false,"inputs":[],"name":"CollectionDeactivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"MINT_LIMIT_PER_ADDRESS","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"activate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"active","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"approveAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deActivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deactivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAdmins","outputs":[{"internalType":"address[]","name":"admins","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"nonce","type":"string"}],"name":"nonceUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presalePurchaseLimit","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presalePurchasePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"purchase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"purchaseCommunity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"purchaseCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchaseLimit","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchaseMax","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchasePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchaseRemaining","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_seed","type":"uint256"}],"name":"rand","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"revokeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setCollectionURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isActive","type":"bool"}],"name":"setPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"state","outputs":[{"components":[{"internalType":"uint16","name":"transactionLimit","type":"uint16"},{"internalType":"uint16","name":"purchaseMax","type":"uint16"},{"internalType":"uint16","name":"purchaseRemaining","type":"uint16"},{"internalType":"uint256","name":"purchasePrice","type":"uint256"},{"internalType":"uint16","name":"purchaseLimit","type":"uint16"},{"internalType":"uint256","name":"presalePurchasePrice","type":"uint256"},{"internalType":"uint16","name":"presalePurchaseLimit","type":"uint16"},{"internalType":"uint16","name":"purchaseCount","type":"uint16"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"presaleInterval","type":"uint256"},{"internalType":"uint256","name":"claimStartTime","type":"uint256"},{"internalType":"uint256","name":"claimEndTime","type":"uint256"},{"internalType":"bool","name":"useDynamicPresalePurchaseLimit","type":"bool"}],"internalType":"struct IERC1155Collection.CollectionState","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transactionLimit","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transferLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"bps","type":"uint256"}],"name":"updateRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"useDynamicPresalePurchaseLimit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a0604052600e805461ffff19169055610bb8601655612ee06017556107d060185560006019819055601a819055601b819055601c819055601d80546001600160401b0319169055601e55601f805460ff191690553480156200006157600080fd5b50604051620036b7380380620036b7833981016040819052620000849162000333565b6040805160208101909152600081526200009e33620000ce565b620000a98162000120565b506080819052620000c66136b08060008080808089600162000139565b5050620003ac565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516200013590600b9060208401906200028d565b5050565b6000546001600160a01b031615620001985760405162461bcd60e51b815260206004820152601360248201527f416c726561647920696e697469616c697a65640000000000000000000000000060448201526064015b60405180910390fd5b8761ffff168961ffff161015620001e25760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b60448201526064016200018f565b60128054600e8054600f9a909a5563ffffffff60201b1990991664010000000061ffff9b8c160261ffff60301b1916176601000000000000988b16989098029790971763ffff0000191662010000968a168702179097556010805461ffff191693891693909317909255601192909255600080546001600160a01b0319166001600160a01b03909316929092179091559490931662ffffff1990911617921515909102919091179055565b8280546200029b906200036f565b90600052602060002090601f016020900481019282620002bf57600085556200030a565b82601f10620002da57805160ff19168380011785556200030a565b828001600101855582156200030a579182015b828111156200030a578251825591602001919060010190620002ed565b50620003189291506200031c565b5090565b5b808211156200031857600081556001016200031d565b600080604083850312156200034757600080fd5b82516001600160a01b03811681146200035f57600080fd5b6020939093015192949293505050565b600181811c908216806200038457607f821691505b60208210811415620003a657634e487b7160e01b600052602260045260246000fd5b50919050565b6080516132ef620003c8600039600061042701526132ef6000f3fe608060405234801561001057600080fd5b506004361061026b5760003560e01c80636c2f5acd1161014d5780636c2f5acd146104b15780636d73e669146104c457806370a08231146104d7578063715018a6146104ea57806378e97925146104f257806381960b5c146104fb5780638da5cb5b14610504578063923c235b14610524578063a22cb46514610537578063a6a11bb11461054a578063b9c4d9fb14610553578063bb3bafd614610573578063c19d93fb14610594578063c8a84a82146105a9578063d5abeb01146105be578063defd6c5f146105cc578063e3b9398b146105d5578063e985e9c5146105de578063eb23fcd21461061a578063f19605d61461062d578063f242432a14610641578063f2fde38b14610654578063f3fef3a314610667578063f47430701461067a578063fe73ad7714610688578063ff895a621461069057600080fd5b8062fdd58e1461027057806301ffc9a71461029657806302fb0c5e146102b95780630e89341c146102c65780630ebd4c7f146102e65780630f15f4c01461030657806312686aae1461031057806316317c2114610324578063188866571461034c5780631a5030371461036157806324d7806c146103695780632530c9051461037c5780632639f4601461038f57806326887d53146103a25780632a55205a146103b55780632b85ed9c146103e75780632d345670146103fc5780632eb2c2d61461040f5780632eb4a7ab146104225780633197cbb61461044957806331ae450b1461045257806340d1d255146104675780634e1273f41461047057806351b42b001461048357806355461d6d1461048b5780635aca1bb61461049e575b600080fd5b61028361027e366004612647565b610698565b6040519081526020015b60405180910390f35b6102a96102a4366004612689565b610734565b604051901515815260200161028d565b6002546102a99060ff1681565b6102d96102d43660046126a6565b61075d565b60405161028d919061270c565b6102f96102f43660046126a6565b6107f1565b60405161028d919061275a565b61030e61084d565b005b6015546102a990600160a01b900460ff1681565b60125461033990600160281b900461ffff1681565b60405161ffff909116815260200161028d565b600e5461033990600160301b900461ffff1681565b610339600481565b6102a961037736600461276d565b610897565b61028361038a3660046126a6565b6108c6565b61030e61039d36600461278a565b6109a5565b61030e6103b03660046127fb565b610a28565b6103c86103c336600461285d565b610a30565b604080516001600160a01b03909316835260208301919091520161028d565b601254610339906301000000900461ffff1681565b61030e61040a36600461276d565b610a6a565b61030e61041d3660046129d2565b610aed565b6102837f000000000000000000000000000000000000000000000000000000000000000081565b61028360045481565b61045a610b84565b60405161028d9190612a7f565b61028360075481565b6102f961047e366004612acc565b610c32565b61030e610d5b565b6012546102a99062010000900460ff1681565b61030e6104ac366004612ba8565b610da3565b61030e6104bf366004612647565b610df6565b61030e6104d236600461276d565b610e5a565b6102836104e536600461276d565b610ed9565b61030e610eee565b61028360035481565b61028360115481565b61050c610f27565b6040516001600160a01b03909116815260200161028d565b6102a9610532366004612bc3565b610f36565b61030e610545366004612c13565b610f5b565b61028360065481565b6105666105613660046126a6565b610f66565b60405161028d9190612c81565b6105866105813660046126a6565b610fdf565b60405161028d929190612c94565b61059c611093565b60405161028d9190612cc2565b600e5461033990600160201b900461ffff1681565b6012546103399061ffff1681565b610283600f5481565b61028360055481565b6102a96105ec366004612da9565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205460ff1690565b61030e61062836600461276d565b6111ea565b600e546103399062010000900461ffff1681565b61030e61064f366004612de2565b611271565b61030e61066236600461276d565b6112f8565b61030e610675366004612647565b611395565b6010546103399061ffff1681565b6103396113df565b61030e61140d565b60006001600160a01b0383166107095760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526009602090815260408083206001600160a01b03861684529091529020545b92915050565b600061073f82611461565b8061074e575061074e826114cd565b8061072e575061072e8261151d565b6060600b805461076c90612e4a565b80601f016020809104026020016040519081016040528092919081815260200182805461079890612e4a565b80156107e55780601f106107ba576101008083540402835291602001916107e5565b820191906000526020600020905b8154815290600101906020018083116107c857829003601f168201915b50505050509050919050565b6015546060906001600160a01b0316156108485760408051600180825281830190925290602080830190803683370190505090506014548160008151811061083b5761083b612e85565b6020026020010181815250505b919050565b33610856610f27565b6001600160a01b031614806108715750610871600c33611542565b61088d5760405162461bcd60e51b815260040161070090612e9b565b610895611564565b565b6000816001600160a01b03166108ab610f27565b6001600160a01b0316148061072e575061072e600c83611542565b6000804342336040516020016108dc9190612edf565b6040516020818303038152906040528051906020012060001c6108ff9190612f23565b4542416040516020016109129190612edf565b6040516020818303038152906040528051906020012060001c6109359190612f23565b61093f4442612f37565b6109499190612f37565b6109539190612f37565b61095d9190612f37565b6109679190612f37565b60405160200161097991815260200190565b60408051601f198184030181529190528051602090910120905061099e600482612f4f565b9392505050565b336109ae610f27565b6001600160a01b031614806109c957506109c9600c33611542565b6109e55760405162461bcd60e51b815260040161070090612e9b565b610a2482828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506115b792505050565b5050565b610a246115ca565b60155460145460009182916001600160a01b039091169061271090610a559086612f63565b610a5f9190612f23565b915091509250929050565b33610a73610f27565b6001600160a01b031614610a995760405162461bcd60e51b815260040161070090612f82565b610aa4600c82611542565b15610aea5760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a3610a24600c826116f6565b50565b6001600160a01b038516331480610b095750610b0985336105ec565b610b705760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610700565b610b7d858585858561170b565b5050505050565b6060610b90600c6118f9565b6001600160401b03811115610ba757610ba761287f565b604051908082528060200260200182016040528015610bd0578160200160208202803683370190505b50905060005b610be0600c6118f9565b811015610c2e57610bf2600c82611903565b828281518110610c0457610c04612e85565b6001600160a01b039092166020928302919091019091015280610c2681612fb7565b915050610bd6565b5090565b60608151835114610c975760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610700565b600083516001600160401b03811115610cb257610cb261287f565b604051908082528060200260200182016040528015610cdb578160200160208202803683370190505b50905060005b8451811015610d5357610d26858281518110610cff57610cff612e85565b6020026020010151858381518110610d1957610d19612e85565b6020026020010151610698565b828281518110610d3857610d38612e85565b6020908102919091010152610d4c81612fb7565b9050610ce1565b509392505050565b33610d64610f27565b6001600160a01b03161480610d7f5750610d7f600c33611542565b610d9b5760405162461bcd60e51b815260040161070090612e9b565b61089561190f565b33610dac610f27565b6001600160a01b03161480610dc75750610dc7600c33611542565b610de35760405162461bcd60e51b815260040161070090612e9b565b601f805460ff1916911515919091179055565b33610dff610f27565b6001600160a01b03161480610e1a5750610e1a600c33611542565b610e365760405162461bcd60e51b815260040161070090612e9b565b601580546001600160a01b0319166001600160a01b03841617905560148190555050565b33610e63610f27565b6001600160a01b031614610e895760405162461bcd60e51b815260040161070090612f82565b610e94600c82611542565b610aea5760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a3610a24600c82611958565b600e5460009061072e90839061ffff16610698565b33610ef7610f27565b6001600160a01b031614610f1d5760405162461bcd60e51b815260040161070090612f82565b610895600061196d565b6008546001600160a01b031690565b600080610f42836119bf565b60009081526001602052604090205460ff169392505050565b610a24338383611a10565b6015546060906001600160a01b031615610848576040805160018082528183019092529060208083019080368337505060155482519293506001600160a01b031691839150600090610fba57610fba612e85565b60200260200101906001600160a01b031690816001600160a01b031681525050919050565b60155460609081906001600160a01b03161561108e576040805160018082528183019092529060208083019080368337505060155482519294506001600160a01b03169184915060009061103557611035612e85565b6001600160a01b03929092166020928302919091018201526040805160018082528183019092529182810190803683370190505090506014548160008151811061108157611081612e85565b6020026020010181815250505b915091565b604080516101e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c0810182905290331561111f5761111a611af1565b611122565b60005b604080516101e081018252600e5461ffff62010000820481168352600160201b90910416602082015291925081016111586113df565b61ffff9081168252600f546020830152600e54600160301b9004811660408301526011546060830152601054811660808301529290921660a083015260025460ff908116151560c084015260035460e084015260045461010084015260055461012084015260065461014084015260075461016084015260125462010000900416151561018090920191909152919050565b336111f3610f27565b6001600160a01b0316148061120e575061120e600c33611542565b61122a5760405162461bcd60e51b815260040161070090612e9b565b611232611b23565b60005b60048161ffff161015610a2457600e805461ffff191661ffff831617905561125f826101f4611bcd565b8061126981612fd2565b915050611235565b6001600160a01b03851633148061128d575061128d85336105ec565b6112eb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610700565b610b7d8585858585611c10565b33611301610f27565b6001600160a01b0316146113275760405162461bcd60e51b815260040161070090612f82565b6001600160a01b03811661138c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610700565b610aea8161196d565b3361139e610f27565b6001600160a01b031614806113b957506113b9600c33611542565b6113d55760405162461bcd60e51b815260040161070090612e9b565b610a248282611d40565b601254600e546000916114089161ffff6301000000909204821691600160201b90910416612ff4565b905090565b33611416610f27565b6001600160a01b031614806114315750611431600c33611542565b61144d5760405162461bcd60e51b815260040161070090612e9b565b611455611da5565b601f805460ff19169055565b60006001600160e01b03198216636214325f60e11b148061149257506001600160e01b03198216635d9dd7eb60e11b145b806114ad57506001600160e01b0319821663152a902d60e11b145b8061072e57506001600160e01b03198216632dde656160e21b1492915050565b60006001600160e01b03198216636cdb3d1360e11b14806114fe57506001600160e01b031982166303a24d0760e21b145b8061072e57506301ffc9a760e01b6001600160e01b031983161461072e565b60006001600160e01b03198216632a9f3abf60e11b148061072e575061072e826114cd565b6001600160a01b0381166000908152600183016020526040812054151561099e565b60025460ff16156115a85760405162461bcd60e51b815260206004820152600e60248201526d416c72656164792061637469766560901b6044820152606401610700565b6002805460ff19166001179055565b8051610a2490600b9060208401906125a2565b6115d2611df0565b6115dc6004611e2d565b6115e4611e8b565b33600090815260136020526040902054600461ffff9091161061165e5760405162461bcd60e51b815260206004820152602c60248201527f4d696e74206c696d697420666f7220746869732061646472657373206861732060448201526b1899595b881c995858da195960a21b6064820152608401610700565b33600090815260136020526040812080546004929061168290849061ffff16613017565b92506101000a81548161ffff021916908361ffff16021790555060005b60048110156116d5576116b3336001611bcd565b600e546116c39061ffff16611f16565b806116cd81612fb7565b91505061169f565b506116de611f7e565b600e805461ffff191661ffff92909216919091179055565b600061099e836001600160a01b038416611fbd565b815183511461176d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610700565b6001600160a01b0384166117935760405162461bcd60e51b81526004016107009061303d565b336117a28187878787876120b0565b60005b845181101561188b5760008582815181106117c2576117c2612e85565b6020026020010151905060008583815181106117e0576117e0612e85565b60209081029190910181015160008481526009835260408082206001600160a01b038e1683529093529190912054909150818110156118315760405162461bcd60e51b815260040161070090613082565b60008381526009602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611870908490612f37565b925050819055505050508061188490612fb7565b90506117a5565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516118db9291906130cc565b60405180910390a46118f18187878787876120b8565b505050505050565b600061072e825490565b600061099e8383612214565b6000600381905560048190556002805460ff19169055600681905560078190556040517fb02389feab3af620e2374d4d559b436ea226b1e6c9c31fe77dfbff3d40cbe9ba9190a1565b600061099e836001600160a01b03841661223e565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080829050602081511115611a075760405162461bcd60e51b815260206004820152600d60248201526c496e76616c6964206e6f6e636560981b6044820152606401610700565b50506020015190565b816001600160a01b0316836001600160a01b03161415611a845760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610700565b6001600160a01b038381166000818152600a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600080611afc61228d565b15611b1a5750503360009081526013602052604090205461ffff1690565b61072e33610ed9565b601d5460009061ffff600160301b8204811691600160201b8104821691611b539162010000810482169116613017565b611b5d9190613017565b611b679190613017565b90506018548161ffff161115610aea5760405162461bcd60e51b815260206004820152602560248201527f436f6d6d756e697479206d696e74206c696d697420686173206265656e2072656044820152641858da195960da1b6064820152608401610700565b80601260038282829054906101000a900461ffff16611bec9190613017565b92506101000a81548161ffff021916908361ffff160217905550610a2482826122c8565b6001600160a01b038416611c365760405162461bcd60e51b81526004016107009061303d565b33611c55818787611c46886122ef565b611c4f886122ef565b876120b0565b60008481526009602090815260408083206001600160a01b038a16845290915290205483811015611c985760405162461bcd60e51b815260040161070090613082565b60008581526009602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290611cd7908490612f37565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611d3782888888888861233a565b50505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611d8d576040519150601f19603f3d011682016040523d82523d6000602084013e611d92565b606091505b5050905080611da057600080fd5b505050565b60025460ff16611de45760405162461bcd60e51b815260206004820152600a6024820152694e6f742061637469766560b01b6044820152606401610700565b6002805460ff19169055565b60025460ff166108955760405162461bcd60e51b8152602060048201526008602482015267496e61637469766560c01b6044820152606401610700565b600f54611e3e9061ffff8316612f63565b3414610aea5760405162461bcd60e51b815260206004820152601c60248201527b125b9d985b1a59081c1d5c98da185cd948185b5bdd5b9d081cd95b9d60221b6044820152606401610700565b6000601c54601b54601a54601954611ea39190612f37565b611ead9190612f37565b611eb79190612f37565b9050601754811115610aea5760405162461bcd60e51b815260206004820152602260248201527f5075626c6963206d696e74206c696d697420686173206265656e207265616368604482015261195960f21b6064820152608401610700565b80611f335760198054906000611f2b83612fb7565b919050555050565b8060011415611f4c57601a8054906000611f2b83612fb7565b8060021415611f6557601b8054906000611f2b83612fb7565b8060031415610aea57601c8054906000611f2b83612fb7565b6000600181611f8c826108c6565b90505b611f9c8161ffff166123f5565b61072e5781611faa81612fb7565b925050611fb6826108c6565b9050611f8f565b600081815260018301602052604081205480156120a6576000611fe16001836130df565b8554909150600090611ff5906001906130df565b905081811461205a57600086600001828154811061201557612015612e85565b906000526020600020015490508087600001848154811061203857612038612e85565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061206b5761206b6130f6565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061072e565b600091505061072e565b6118f1612453565b6001600160a01b0384163b156118f15760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906120fc908990899088908890889060040161310c565b6020604051808303816000875af1925050508015612137575060408051601f3d908101601f191682019092526121349181019061316a565b60015b6121e457612143613187565b806308c379a0141561217d57506121586131a3565b80612163575061217f565b8060405162461bcd60e51b8152600401610700919061270c565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610700565b6001600160e01b0319811663bc197c8160e01b14611d375760405162461bcd60e51b81526004016107009061322c565b600082600001828154811061222b5761222b612e85565b9060005260206000200154905092915050565b60008181526001830160205260408120546122855750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561072e565b50600061072e565b601554600090600160a01b900460ff161580156114085750600e54600160301b900461ffff1615158061140857505060105461ffff16151590565b600e54604080516020810190915260008152610a2491849161ffff9182169185169061249f565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061232957612329612e85565b602090810291909101015292915050565b6001600160a01b0384163b156118f15760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061237e9089908990889088908890600401613274565b6020604051808303816000875af19250505080156123b9575060408051601f3d908101601f191682019092526123b69181019061316a565b60015b6123c557612143613187565b6001600160e01b0319811663f23a6e6160e01b14611d375760405162461bcd60e51b81526004016107009061322c565b600081612409575050601654601954111590565b816001141561241f575050601654601a54111590565b8160021415612435575050601654601b54111590565b816003141561244b575050601654601a54111590565b506000919050565b601554600160a01b900460ff16156108955760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c881b1bd8dad959608a1b6044820152606401610700565b6001600160a01b0384166124ff5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610700565b3361251081600087611c46886122ef565b60008481526009602090815260408083206001600160a01b038916845290915281208054859290612542908490612f37565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610b7d8160008787878761233a565b8280546125ae90612e4a565b90600052602060002090601f0160209004810192826125d05760008555612616565b82601f106125e957805160ff1916838001178555612616565b82800160010185558215612616579182015b828111156126165782518255916020019190600101906125fb565b50610c2e9291505b80821115610c2e576000815560010161261e565b6001600160a01b0381168114610aea57600080fd5b6000806040838503121561265a57600080fd5b823561266581612632565b946020939093013593505050565b6001600160e01b031981168114610aea57600080fd5b60006020828403121561269b57600080fd5b813561099e81612673565b6000602082840312156126b857600080fd5b5035919050565b6000815180845260005b818110156126e5576020818501810151868301820152016126c9565b818111156126f7576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061099e60208301846126bf565b600081518084526020808501945080840160005b8381101561274f57815187529582019590820190600101612733565b509495945050505050565b60208152600061099e602083018461271f565b60006020828403121561277f57600080fd5b813561099e81612632565b6000806020838503121561279d57600080fd5b82356001600160401b03808211156127b457600080fd5b818501915085601f8301126127c857600080fd5b8135818111156127d757600080fd5b8660208285010111156127e957600080fd5b60209290920196919550909350505050565b6000806020838503121561280e57600080fd5b82356001600160401b038082111561282557600080fd5b818501915085601f83011261283957600080fd5b81358181111561284857600080fd5b8660208260051b85010111156127e957600080fd5b6000806040838503121561287057600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156128ba576128ba61287f565b6040525050565b60006001600160401b038211156128da576128da61287f565b5060051b60200190565b600082601f8301126128f557600080fd5b81356020612902826128c1565b60405161290f8282612895565b83815260059390931b850182019282810191508684111561292f57600080fd5b8286015b8481101561294a5780358352918301918301612933565b509695505050505050565b60006001600160401b0383111561296e5761296e61287f565b604051612985601f8501601f191660200182612895565b80915083815284848401111561299a57600080fd5b83836020830137600060208583010152509392505050565b600082601f8301126129c357600080fd5b61099e83833560208501612955565b600080600080600060a086880312156129ea57600080fd5b85356129f581612632565b94506020860135612a0581612632565b935060408601356001600160401b0380821115612a2157600080fd5b612a2d89838a016128e4565b94506060880135915080821115612a4357600080fd5b612a4f89838a016128e4565b93506080880135915080821115612a6557600080fd5b50612a72888289016129b2565b9150509295509295909350565b6020808252825182820181905260009190848201906040850190845b81811015612ac05783516001600160a01b031683529284019291840191600101612a9b565b50909695505050505050565b60008060408385031215612adf57600080fd5b82356001600160401b0380821115612af657600080fd5b818501915085601f830112612b0a57600080fd5b81356020612b17826128c1565b604051612b248282612895565b83815260059390931b8501820192828101915089841115612b4457600080fd5b948201945b83861015612b6b578535612b5c81612632565b82529482019490820190612b49565b96505086013592505080821115612b8157600080fd5b50612b8e858286016128e4565b9150509250929050565b8035801515811461084857600080fd5b600060208284031215612bba57600080fd5b61099e82612b98565b600060208284031215612bd557600080fd5b81356001600160401b03811115612beb57600080fd5b8201601f81018413612bfc57600080fd5b612c0b84823560208401612955565b949350505050565b60008060408385031215612c2657600080fd5b8235612c3181612632565b9150612c3f60208401612b98565b90509250929050565b600081518084526020808501945080840160005b8381101561274f5781516001600160a01b031687529582019590820190600101612c5c565b60208152600061099e6020830184612c48565b604081526000612ca76040830185612c48565b8281036020840152612cb9818561271f565b95945050505050565b815161ffff1681526101e081016020830151612ce4602084018261ffff169052565b506040830151612cfa604084018261ffff169052565b50606083015160608301526080830151612d1a608084018261ffff169052565b5060a083015160a083015260c0830151612d3a60c084018261ffff169052565b5060e0830151612d5060e084018261ffff169052565b506101008381015115159083015261012080840151908301526101408084015190830152610160808401519083015261018080840151908301526101a080840151908301526101c0928301511515929091019190915290565b60008060408385031215612dbc57600080fd5b8235612dc781612632565b91506020830135612dd781612632565b809150509250929050565b600080600080600060a08688031215612dfa57600080fd5b8535612e0581612632565b94506020860135612e1581612632565b9350604086013592506060860135915060808601356001600160401b03811115612e3e57600080fd5b612a72888289016129b2565b600181811c90821680612e5e57607f821691505b60208210811415612e7f57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b60609190911b6001600160601b031916815260140190565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082612f3257612f32612ef7565b500490565b60008219821115612f4a57612f4a612f0d565b500190565b600082612f5e57612f5e612ef7565b500690565b6000816000190483118215151615612f7d57612f7d612f0d565b500290565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000600019821415612fcb57612fcb612f0d565b5060010190565b600061ffff80831681811415612fea57612fea612f0d565b6001019392505050565b600061ffff8381169083168181101561300f5761300f612f0d565b039392505050565b600061ffff80831681851680830382111561303457613034612f0d565b01949350505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b604081526000612ca7604083018561271f565b6000828210156130f1576130f1612f0d565b500390565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b0386811682528516602082015260a0604082018190526000906131389083018661271f565b828103606084015261314a818661271f565b9050828103608084015261315e81856126bf565b98975050505050505050565b60006020828403121561317c57600080fd5b815161099e81612673565b600060033d11156131a05760046000803e5060005160e01c5b90565b600060443d10156131b15790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156131e057505050505090565b82850191508151818111156131f85750505050505090565b843d87010160208285010111156132125750505050505090565b61322160208286010187612895565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906132ae908301846126bf565b97965050505050505056fea2646970667358221220cb23cd3cc76cca34498eb2c4475cb74227b22909628d053fb8b0dada055a583464736f6c634300080b0033000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1e3d8cf00ec8627c6e3daab7bd4af012e3b2b243717c5949f841c73b76e82f25a

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061026b5760003560e01c80636c2f5acd1161014d5780636c2f5acd146104b15780636d73e669146104c457806370a08231146104d7578063715018a6146104ea57806378e97925146104f257806381960b5c146104fb5780638da5cb5b14610504578063923c235b14610524578063a22cb46514610537578063a6a11bb11461054a578063b9c4d9fb14610553578063bb3bafd614610573578063c19d93fb14610594578063c8a84a82146105a9578063d5abeb01146105be578063defd6c5f146105cc578063e3b9398b146105d5578063e985e9c5146105de578063eb23fcd21461061a578063f19605d61461062d578063f242432a14610641578063f2fde38b14610654578063f3fef3a314610667578063f47430701461067a578063fe73ad7714610688578063ff895a621461069057600080fd5b8062fdd58e1461027057806301ffc9a71461029657806302fb0c5e146102b95780630e89341c146102c65780630ebd4c7f146102e65780630f15f4c01461030657806312686aae1461031057806316317c2114610324578063188866571461034c5780631a5030371461036157806324d7806c146103695780632530c9051461037c5780632639f4601461038f57806326887d53146103a25780632a55205a146103b55780632b85ed9c146103e75780632d345670146103fc5780632eb2c2d61461040f5780632eb4a7ab146104225780633197cbb61461044957806331ae450b1461045257806340d1d255146104675780634e1273f41461047057806351b42b001461048357806355461d6d1461048b5780635aca1bb61461049e575b600080fd5b61028361027e366004612647565b610698565b6040519081526020015b60405180910390f35b6102a96102a4366004612689565b610734565b604051901515815260200161028d565b6002546102a99060ff1681565b6102d96102d43660046126a6565b61075d565b60405161028d919061270c565b6102f96102f43660046126a6565b6107f1565b60405161028d919061275a565b61030e61084d565b005b6015546102a990600160a01b900460ff1681565b60125461033990600160281b900461ffff1681565b60405161ffff909116815260200161028d565b600e5461033990600160301b900461ffff1681565b610339600481565b6102a961037736600461276d565b610897565b61028361038a3660046126a6565b6108c6565b61030e61039d36600461278a565b6109a5565b61030e6103b03660046127fb565b610a28565b6103c86103c336600461285d565b610a30565b604080516001600160a01b03909316835260208301919091520161028d565b601254610339906301000000900461ffff1681565b61030e61040a36600461276d565b610a6a565b61030e61041d3660046129d2565b610aed565b6102837fe3d8cf00ec8627c6e3daab7bd4af012e3b2b243717c5949f841c73b76e82f25a81565b61028360045481565b61045a610b84565b60405161028d9190612a7f565b61028360075481565b6102f961047e366004612acc565b610c32565b61030e610d5b565b6012546102a99062010000900460ff1681565b61030e6104ac366004612ba8565b610da3565b61030e6104bf366004612647565b610df6565b61030e6104d236600461276d565b610e5a565b6102836104e536600461276d565b610ed9565b61030e610eee565b61028360035481565b61028360115481565b61050c610f27565b6040516001600160a01b03909116815260200161028d565b6102a9610532366004612bc3565b610f36565b61030e610545366004612c13565b610f5b565b61028360065481565b6105666105613660046126a6565b610f66565b60405161028d9190612c81565b6105866105813660046126a6565b610fdf565b60405161028d929190612c94565b61059c611093565b60405161028d9190612cc2565b600e5461033990600160201b900461ffff1681565b6012546103399061ffff1681565b610283600f5481565b61028360055481565b6102a96105ec366004612da9565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205460ff1690565b61030e61062836600461276d565b6111ea565b600e546103399062010000900461ffff1681565b61030e61064f366004612de2565b611271565b61030e61066236600461276d565b6112f8565b61030e610675366004612647565b611395565b6010546103399061ffff1681565b6103396113df565b61030e61140d565b60006001600160a01b0383166107095760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526009602090815260408083206001600160a01b03861684529091529020545b92915050565b600061073f82611461565b8061074e575061074e826114cd565b8061072e575061072e8261151d565b6060600b805461076c90612e4a565b80601f016020809104026020016040519081016040528092919081815260200182805461079890612e4a565b80156107e55780601f106107ba576101008083540402835291602001916107e5565b820191906000526020600020905b8154815290600101906020018083116107c857829003601f168201915b50505050509050919050565b6015546060906001600160a01b0316156108485760408051600180825281830190925290602080830190803683370190505090506014548160008151811061083b5761083b612e85565b6020026020010181815250505b919050565b33610856610f27565b6001600160a01b031614806108715750610871600c33611542565b61088d5760405162461bcd60e51b815260040161070090612e9b565b610895611564565b565b6000816001600160a01b03166108ab610f27565b6001600160a01b0316148061072e575061072e600c83611542565b6000804342336040516020016108dc9190612edf565b6040516020818303038152906040528051906020012060001c6108ff9190612f23565b4542416040516020016109129190612edf565b6040516020818303038152906040528051906020012060001c6109359190612f23565b61093f4442612f37565b6109499190612f37565b6109539190612f37565b61095d9190612f37565b6109679190612f37565b60405160200161097991815260200190565b60408051601f198184030181529190528051602090910120905061099e600482612f4f565b9392505050565b336109ae610f27565b6001600160a01b031614806109c957506109c9600c33611542565b6109e55760405162461bcd60e51b815260040161070090612e9b565b610a2482828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506115b792505050565b5050565b610a246115ca565b60155460145460009182916001600160a01b039091169061271090610a559086612f63565b610a5f9190612f23565b915091509250929050565b33610a73610f27565b6001600160a01b031614610a995760405162461bcd60e51b815260040161070090612f82565b610aa4600c82611542565b15610aea5760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a3610a24600c826116f6565b50565b6001600160a01b038516331480610b095750610b0985336105ec565b610b705760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610700565b610b7d858585858561170b565b5050505050565b6060610b90600c6118f9565b6001600160401b03811115610ba757610ba761287f565b604051908082528060200260200182016040528015610bd0578160200160208202803683370190505b50905060005b610be0600c6118f9565b811015610c2e57610bf2600c82611903565b828281518110610c0457610c04612e85565b6001600160a01b039092166020928302919091019091015280610c2681612fb7565b915050610bd6565b5090565b60608151835114610c975760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610700565b600083516001600160401b03811115610cb257610cb261287f565b604051908082528060200260200182016040528015610cdb578160200160208202803683370190505b50905060005b8451811015610d5357610d26858281518110610cff57610cff612e85565b6020026020010151858381518110610d1957610d19612e85565b6020026020010151610698565b828281518110610d3857610d38612e85565b6020908102919091010152610d4c81612fb7565b9050610ce1565b509392505050565b33610d64610f27565b6001600160a01b03161480610d7f5750610d7f600c33611542565b610d9b5760405162461bcd60e51b815260040161070090612e9b565b61089561190f565b33610dac610f27565b6001600160a01b03161480610dc75750610dc7600c33611542565b610de35760405162461bcd60e51b815260040161070090612e9b565b601f805460ff1916911515919091179055565b33610dff610f27565b6001600160a01b03161480610e1a5750610e1a600c33611542565b610e365760405162461bcd60e51b815260040161070090612e9b565b601580546001600160a01b0319166001600160a01b03841617905560148190555050565b33610e63610f27565b6001600160a01b031614610e895760405162461bcd60e51b815260040161070090612f82565b610e94600c82611542565b610aea5760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a3610a24600c82611958565b600e5460009061072e90839061ffff16610698565b33610ef7610f27565b6001600160a01b031614610f1d5760405162461bcd60e51b815260040161070090612f82565b610895600061196d565b6008546001600160a01b031690565b600080610f42836119bf565b60009081526001602052604090205460ff169392505050565b610a24338383611a10565b6015546060906001600160a01b031615610848576040805160018082528183019092529060208083019080368337505060155482519293506001600160a01b031691839150600090610fba57610fba612e85565b60200260200101906001600160a01b031690816001600160a01b031681525050919050565b60155460609081906001600160a01b03161561108e576040805160018082528183019092529060208083019080368337505060155482519294506001600160a01b03169184915060009061103557611035612e85565b6001600160a01b03929092166020928302919091018201526040805160018082528183019092529182810190803683370190505090506014548160008151811061108157611081612e85565b6020026020010181815250505b915091565b604080516101e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c0810182905290331561111f5761111a611af1565b611122565b60005b604080516101e081018252600e5461ffff62010000820481168352600160201b90910416602082015291925081016111586113df565b61ffff9081168252600f546020830152600e54600160301b9004811660408301526011546060830152601054811660808301529290921660a083015260025460ff908116151560c084015260035460e084015260045461010084015260055461012084015260065461014084015260075461016084015260125462010000900416151561018090920191909152919050565b336111f3610f27565b6001600160a01b0316148061120e575061120e600c33611542565b61122a5760405162461bcd60e51b815260040161070090612e9b565b611232611b23565b60005b60048161ffff161015610a2457600e805461ffff191661ffff831617905561125f826101f4611bcd565b8061126981612fd2565b915050611235565b6001600160a01b03851633148061128d575061128d85336105ec565b6112eb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610700565b610b7d8585858585611c10565b33611301610f27565b6001600160a01b0316146113275760405162461bcd60e51b815260040161070090612f82565b6001600160a01b03811661138c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610700565b610aea8161196d565b3361139e610f27565b6001600160a01b031614806113b957506113b9600c33611542565b6113d55760405162461bcd60e51b815260040161070090612e9b565b610a248282611d40565b601254600e546000916114089161ffff6301000000909204821691600160201b90910416612ff4565b905090565b33611416610f27565b6001600160a01b031614806114315750611431600c33611542565b61144d5760405162461bcd60e51b815260040161070090612e9b565b611455611da5565b601f805460ff19169055565b60006001600160e01b03198216636214325f60e11b148061149257506001600160e01b03198216635d9dd7eb60e11b145b806114ad57506001600160e01b0319821663152a902d60e11b145b8061072e57506001600160e01b03198216632dde656160e21b1492915050565b60006001600160e01b03198216636cdb3d1360e11b14806114fe57506001600160e01b031982166303a24d0760e21b145b8061072e57506301ffc9a760e01b6001600160e01b031983161461072e565b60006001600160e01b03198216632a9f3abf60e11b148061072e575061072e826114cd565b6001600160a01b0381166000908152600183016020526040812054151561099e565b60025460ff16156115a85760405162461bcd60e51b815260206004820152600e60248201526d416c72656164792061637469766560901b6044820152606401610700565b6002805460ff19166001179055565b8051610a2490600b9060208401906125a2565b6115d2611df0565b6115dc6004611e2d565b6115e4611e8b565b33600090815260136020526040902054600461ffff9091161061165e5760405162461bcd60e51b815260206004820152602c60248201527f4d696e74206c696d697420666f7220746869732061646472657373206861732060448201526b1899595b881c995858da195960a21b6064820152608401610700565b33600090815260136020526040812080546004929061168290849061ffff16613017565b92506101000a81548161ffff021916908361ffff16021790555060005b60048110156116d5576116b3336001611bcd565b600e546116c39061ffff16611f16565b806116cd81612fb7565b91505061169f565b506116de611f7e565b600e805461ffff191661ffff92909216919091179055565b600061099e836001600160a01b038416611fbd565b815183511461176d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610700565b6001600160a01b0384166117935760405162461bcd60e51b81526004016107009061303d565b336117a28187878787876120b0565b60005b845181101561188b5760008582815181106117c2576117c2612e85565b6020026020010151905060008583815181106117e0576117e0612e85565b60209081029190910181015160008481526009835260408082206001600160a01b038e1683529093529190912054909150818110156118315760405162461bcd60e51b815260040161070090613082565b60008381526009602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611870908490612f37565b925050819055505050508061188490612fb7565b90506117a5565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516118db9291906130cc565b60405180910390a46118f18187878787876120b8565b505050505050565b600061072e825490565b600061099e8383612214565b6000600381905560048190556002805460ff19169055600681905560078190556040517fb02389feab3af620e2374d4d559b436ea226b1e6c9c31fe77dfbff3d40cbe9ba9190a1565b600061099e836001600160a01b03841661223e565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080829050602081511115611a075760405162461bcd60e51b815260206004820152600d60248201526c496e76616c6964206e6f6e636560981b6044820152606401610700565b50506020015190565b816001600160a01b0316836001600160a01b03161415611a845760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610700565b6001600160a01b038381166000818152600a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600080611afc61228d565b15611b1a5750503360009081526013602052604090205461ffff1690565b61072e33610ed9565b601d5460009061ffff600160301b8204811691600160201b8104821691611b539162010000810482169116613017565b611b5d9190613017565b611b679190613017565b90506018548161ffff161115610aea5760405162461bcd60e51b815260206004820152602560248201527f436f6d6d756e697479206d696e74206c696d697420686173206265656e2072656044820152641858da195960da1b6064820152608401610700565b80601260038282829054906101000a900461ffff16611bec9190613017565b92506101000a81548161ffff021916908361ffff160217905550610a2482826122c8565b6001600160a01b038416611c365760405162461bcd60e51b81526004016107009061303d565b33611c55818787611c46886122ef565b611c4f886122ef565b876120b0565b60008481526009602090815260408083206001600160a01b038a16845290915290205483811015611c985760405162461bcd60e51b815260040161070090613082565b60008581526009602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290611cd7908490612f37565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611d3782888888888861233a565b50505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611d8d576040519150601f19603f3d011682016040523d82523d6000602084013e611d92565b606091505b5050905080611da057600080fd5b505050565b60025460ff16611de45760405162461bcd60e51b815260206004820152600a6024820152694e6f742061637469766560b01b6044820152606401610700565b6002805460ff19169055565b60025460ff166108955760405162461bcd60e51b8152602060048201526008602482015267496e61637469766560c01b6044820152606401610700565b600f54611e3e9061ffff8316612f63565b3414610aea5760405162461bcd60e51b815260206004820152601c60248201527b125b9d985b1a59081c1d5c98da185cd948185b5bdd5b9d081cd95b9d60221b6044820152606401610700565b6000601c54601b54601a54601954611ea39190612f37565b611ead9190612f37565b611eb79190612f37565b9050601754811115610aea5760405162461bcd60e51b815260206004820152602260248201527f5075626c6963206d696e74206c696d697420686173206265656e207265616368604482015261195960f21b6064820152608401610700565b80611f335760198054906000611f2b83612fb7565b919050555050565b8060011415611f4c57601a8054906000611f2b83612fb7565b8060021415611f6557601b8054906000611f2b83612fb7565b8060031415610aea57601c8054906000611f2b83612fb7565b6000600181611f8c826108c6565b90505b611f9c8161ffff166123f5565b61072e5781611faa81612fb7565b925050611fb6826108c6565b9050611f8f565b600081815260018301602052604081205480156120a6576000611fe16001836130df565b8554909150600090611ff5906001906130df565b905081811461205a57600086600001828154811061201557612015612e85565b906000526020600020015490508087600001848154811061203857612038612e85565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061206b5761206b6130f6565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061072e565b600091505061072e565b6118f1612453565b6001600160a01b0384163b156118f15760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906120fc908990899088908890889060040161310c565b6020604051808303816000875af1925050508015612137575060408051601f3d908101601f191682019092526121349181019061316a565b60015b6121e457612143613187565b806308c379a0141561217d57506121586131a3565b80612163575061217f565b8060405162461bcd60e51b8152600401610700919061270c565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610700565b6001600160e01b0319811663bc197c8160e01b14611d375760405162461bcd60e51b81526004016107009061322c565b600082600001828154811061222b5761222b612e85565b9060005260206000200154905092915050565b60008181526001830160205260408120546122855750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561072e565b50600061072e565b601554600090600160a01b900460ff161580156114085750600e54600160301b900461ffff1615158061140857505060105461ffff16151590565b600e54604080516020810190915260008152610a2491849161ffff9182169185169061249f565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061232957612329612e85565b602090810291909101015292915050565b6001600160a01b0384163b156118f15760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061237e9089908990889088908890600401613274565b6020604051808303816000875af19250505080156123b9575060408051601f3d908101601f191682019092526123b69181019061316a565b60015b6123c557612143613187565b6001600160e01b0319811663f23a6e6160e01b14611d375760405162461bcd60e51b81526004016107009061322c565b600081612409575050601654601954111590565b816001141561241f575050601654601a54111590565b8160021415612435575050601654601b54111590565b816003141561244b575050601654601a54111590565b506000919050565b601554600160a01b900460ff16156108955760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c881b1bd8dad959608a1b6044820152606401610700565b6001600160a01b0384166124ff5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610700565b3361251081600087611c46886122ef565b60008481526009602090815260408083206001600160a01b038916845290915281208054859290612542908490612f37565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610b7d8160008787878761233a565b8280546125ae90612e4a565b90600052602060002090601f0160209004810192826125d05760008555612616565b82601f106125e957805160ff1916838001178555612616565b82800160010185558215612616579182015b828111156126165782518255916020019190600101906125fb565b50610c2e9291505b80821115610c2e576000815560010161261e565b6001600160a01b0381168114610aea57600080fd5b6000806040838503121561265a57600080fd5b823561266581612632565b946020939093013593505050565b6001600160e01b031981168114610aea57600080fd5b60006020828403121561269b57600080fd5b813561099e81612673565b6000602082840312156126b857600080fd5b5035919050565b6000815180845260005b818110156126e5576020818501810151868301820152016126c9565b818111156126f7576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061099e60208301846126bf565b600081518084526020808501945080840160005b8381101561274f57815187529582019590820190600101612733565b509495945050505050565b60208152600061099e602083018461271f565b60006020828403121561277f57600080fd5b813561099e81612632565b6000806020838503121561279d57600080fd5b82356001600160401b03808211156127b457600080fd5b818501915085601f8301126127c857600080fd5b8135818111156127d757600080fd5b8660208285010111156127e957600080fd5b60209290920196919550909350505050565b6000806020838503121561280e57600080fd5b82356001600160401b038082111561282557600080fd5b818501915085601f83011261283957600080fd5b81358181111561284857600080fd5b8660208260051b85010111156127e957600080fd5b6000806040838503121561287057600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156128ba576128ba61287f565b6040525050565b60006001600160401b038211156128da576128da61287f565b5060051b60200190565b600082601f8301126128f557600080fd5b81356020612902826128c1565b60405161290f8282612895565b83815260059390931b850182019282810191508684111561292f57600080fd5b8286015b8481101561294a5780358352918301918301612933565b509695505050505050565b60006001600160401b0383111561296e5761296e61287f565b604051612985601f8501601f191660200182612895565b80915083815284848401111561299a57600080fd5b83836020830137600060208583010152509392505050565b600082601f8301126129c357600080fd5b61099e83833560208501612955565b600080600080600060a086880312156129ea57600080fd5b85356129f581612632565b94506020860135612a0581612632565b935060408601356001600160401b0380821115612a2157600080fd5b612a2d89838a016128e4565b94506060880135915080821115612a4357600080fd5b612a4f89838a016128e4565b93506080880135915080821115612a6557600080fd5b50612a72888289016129b2565b9150509295509295909350565b6020808252825182820181905260009190848201906040850190845b81811015612ac05783516001600160a01b031683529284019291840191600101612a9b565b50909695505050505050565b60008060408385031215612adf57600080fd5b82356001600160401b0380821115612af657600080fd5b818501915085601f830112612b0a57600080fd5b81356020612b17826128c1565b604051612b248282612895565b83815260059390931b8501820192828101915089841115612b4457600080fd5b948201945b83861015612b6b578535612b5c81612632565b82529482019490820190612b49565b96505086013592505080821115612b8157600080fd5b50612b8e858286016128e4565b9150509250929050565b8035801515811461084857600080fd5b600060208284031215612bba57600080fd5b61099e82612b98565b600060208284031215612bd557600080fd5b81356001600160401b03811115612beb57600080fd5b8201601f81018413612bfc57600080fd5b612c0b84823560208401612955565b949350505050565b60008060408385031215612c2657600080fd5b8235612c3181612632565b9150612c3f60208401612b98565b90509250929050565b600081518084526020808501945080840160005b8381101561274f5781516001600160a01b031687529582019590820190600101612c5c565b60208152600061099e6020830184612c48565b604081526000612ca76040830185612c48565b8281036020840152612cb9818561271f565b95945050505050565b815161ffff1681526101e081016020830151612ce4602084018261ffff169052565b506040830151612cfa604084018261ffff169052565b50606083015160608301526080830151612d1a608084018261ffff169052565b5060a083015160a083015260c0830151612d3a60c084018261ffff169052565b5060e0830151612d5060e084018261ffff169052565b506101008381015115159083015261012080840151908301526101408084015190830152610160808401519083015261018080840151908301526101a080840151908301526101c0928301511515929091019190915290565b60008060408385031215612dbc57600080fd5b8235612dc781612632565b91506020830135612dd781612632565b809150509250929050565b600080600080600060a08688031215612dfa57600080fd5b8535612e0581612632565b94506020860135612e1581612632565b9350604086013592506060860135915060808601356001600160401b03811115612e3e57600080fd5b612a72888289016129b2565b600181811c90821680612e5e57607f821691505b60208210811415612e7f57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b60609190911b6001600160601b031916815260140190565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082612f3257612f32612ef7565b500490565b60008219821115612f4a57612f4a612f0d565b500190565b600082612f5e57612f5e612ef7565b500690565b6000816000190483118215151615612f7d57612f7d612f0d565b500290565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000600019821415612fcb57612fcb612f0d565b5060010190565b600061ffff80831681811415612fea57612fea612f0d565b6001019392505050565b600061ffff8381169083168181101561300f5761300f612f0d565b039392505050565b600061ffff80831681851680830382111561303457613034612f0d565b01949350505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b604081526000612ca7604083018561271f565b6000828210156130f1576130f1612f0d565b500390565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b0386811682528516602082015260a0604082018190526000906131389083018661271f565b828103606084015261314a818661271f565b9050828103608084015261315e81856126bf565b98975050505050505050565b60006020828403121561317c57600080fd5b815161099e81612673565b600060033d11156131a05760046000803e5060005160e01c5b90565b600060443d10156131b15790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156131e057505050505090565b82850191508151818111156131f85750505050505090565b843d87010160208285010111156132125750505050505090565b61322160208286010187612895565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906132ae908301846126bf565b97965050505050505056fea2646970667358221220cb23cd3cc76cca34498eb2c4475cb74227b22909628d053fb8b0dada055a583464736f6c634300080b0033

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

000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1e3d8cf00ec8627c6e3daab7bd4af012e3b2b243717c5949f841c73b76e82f25a

-----Decoded View---------------
Arg [0] : signingAddress_ (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
Arg [1] : _merkleRoot (bytes32): 0xe3d8cf00ec8627c6e3daab7bd4af012e3b2b243717c5949f841c73b76e82f25a

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [1] : e3d8cf00ec8627c6e3daab7bd4af012e3b2b243717c5949f841c73b76e82f25a


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

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