ETH Price: $3,096.63 (-0.47%)
Gas: 2 Gwei

Contract

0xd9792C140F893da27b4612075c19FD74a42575dF
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Reserve202032102024-06-30 8:08:4710 days ago1719734927IN
0xd9792C14...4a42575dF
0 ETH0.00024682.62713512
Mint Batch202025032024-06-30 5:46:4711 days ago1719726407IN
0xd9792C14...4a42575dF
0.1555 ETH0.000223721.78766092
Reserve195819192024-04-04 10:50:4797 days ago1712227847IN
0xd9792C14...4a42575dF
0 ETH0.0015559716.56277087
Mint Batch195819152024-04-04 10:49:5997 days ago1712227799IN
0xd9792C14...4a42575dF
0.1555 ETH0.002315718.50310681
Reserve194088292024-03-11 2:19:59122 days ago1710123599IN
0xd9792C14...4a42575dF
0 ETH0.0040338642.93355787
Reserve194088102024-03-11 2:16:11122 days ago1710123371IN
0xd9792C14...4a42575dF
0 ETH0.0040793243.41735382
Reserve194087982024-03-11 2:13:47122 days ago1710123227IN
0xd9792C14...4a42575dF
0 ETH0.0041903844.60509631
Mint Batch194087842024-03-11 2:10:59122 days ago1710123059IN
0xd9792C14...4a42575dF
0.4665 ETH0.0067120541.60578591
Reserve194087282024-03-11 1:59:47122 days ago1710122387IN
0xd9792C14...4a42575dF
0 ETH0.004367146.48627574
Mint Batch194087032024-03-11 1:54:47122 days ago1710122087IN
0xd9792C14...4a42575dF
0.1555 ETH0.0049177545.51286465
Reserve194049132024-03-10 13:12:35122 days ago1710076355IN
0xd9792C14...4a42575dF
0 ETH0.0047089950.12556369
Mint Batch194048262024-03-10 12:55:11122 days ago1710075311IN
0xd9792C14...4a42575dF
0.1555 ETH0.0062016157.39474442
Reserve193892452024-03-08 8:26:23124 days ago1709886383IN
0xd9792C14...4a42575dF
0 ETH0.0048439251.55522666
Mint Batch193885162024-03-08 5:59:23125 days ago1709877563IN
0xd9792C14...4a42575dF
0.1555 ETH0.0049145239.2684587
Reserve193878692024-03-08 3:48:47125 days ago1709869727IN
0xd9792C14...4a42575dF
0 ETH0.0042303845.02515166
Mint Batch193878142024-03-08 3:37:47125 days ago1709869067IN
0xd9792C14...4a42575dF
0.1555 ETH0.0045090241.73009917
Reserve193821542024-03-07 8:39:35125 days ago1709800775IN
0xd9792C14...4a42575dF
0 ETH0.0048623951.75183485
Mint Batch193821482024-03-07 8:38:23125 days ago1709800703IN
0xd9792C14...4a42575dF
0.1555 ETH0.0068704854.89713271
Reserve193428542024-03-01 20:55:59131 days ago1709326559IN
0xd9792C14...4a42575dF
0 ETH0.0055856759.44988247
Mint Batch193423552024-03-01 19:16:11131 days ago1709320571IN
0xd9792C14...4a42575dF
0.1555 ETH0.0060755856.22831111
Reserve193374892024-03-01 2:57:47132 days ago1709261867IN
0xd9792C14...4a42575dF
0 ETH0.003456136.78903898
Mint Batch193374652024-03-01 2:52:59132 days ago1709261579IN
0xd9792C14...4a42575dF
0.1555 ETH0.0050905147.11169434
Reserve193363792024-02-29 23:14:23132 days ago1709248463IN
0xd9792C14...4a42575dF
0 ETH0.0058005265.80739996
Mint Batch193362842024-02-29 22:55:23132 days ago1709247323IN
0xd9792C14...4a42575dF
0.1555 ETH0.0081979965.50434195
Reserve192871732024-02-23 1:58:59139 days ago1708653539IN
0xd9792C14...4a42575dF
0 ETH0.0034213836.41940799
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
202025032024-06-30 5:46:4711 days ago1719726407
0xd9792C14...4a42575dF
0.1555 ETH
195819152024-04-04 10:49:5997 days ago1712227799
0xd9792C14...4a42575dF
0.1555 ETH
194087842024-03-11 2:10:59122 days ago1710123059
0xd9792C14...4a42575dF
0.4665 ETH
194087032024-03-11 1:54:47122 days ago1710122087
0xd9792C14...4a42575dF
0.1555 ETH
194048262024-03-10 12:55:11122 days ago1710075311
0xd9792C14...4a42575dF
0.1555 ETH
193885162024-03-08 5:59:23125 days ago1709877563
0xd9792C14...4a42575dF
0.1555 ETH
193878142024-03-08 3:37:47125 days ago1709869067
0xd9792C14...4a42575dF
0.1555 ETH
193821482024-03-07 8:38:23125 days ago1709800703
0xd9792C14...4a42575dF
0.1555 ETH
193423552024-03-01 19:16:11131 days ago1709320571
0xd9792C14...4a42575dF
0.1555 ETH
193374652024-03-01 2:52:59132 days ago1709261579
0xd9792C14...4a42575dF
0.1555 ETH
193362842024-02-29 22:55:23132 days ago1709247323
0xd9792C14...4a42575dF
0.1555 ETH
192871692024-02-23 1:58:11139 days ago1708653491
0xd9792C14...4a42575dF
0.1555 ETH
192823762024-02-22 9:50:59139 days ago1708595459
0xd9792C14...4a42575dF
0.1555 ETH
192448732024-02-17 3:19:59145 days ago1708139999
0xd9792C14...4a42575dF
0.1555 ETH
192448612024-02-17 3:17:35145 days ago1708139855
0xd9792C14...4a42575dF
0.1555 ETH
192335822024-02-15 13:19:35146 days ago1708003175
0xd9792C14...4a42575dF
0.1555 ETH
192198342024-02-13 15:00:23148 days ago1707836423
0xd9792C14...4a42575dF
0.1555 ETH
191486252024-02-03 15:08:59158 days ago1706972939
0xd9792C14...4a42575dF
0.1555 ETH
191432462024-02-02 20:59:23159 days ago1706907563
0xd9792C14...4a42575dF
0.1555 ETH
191003442024-01-27 20:39:23165 days ago1706387963
0xd9792C14...4a42575dF
0.1555 ETH
190729432024-01-24 0:31:35169 days ago1706056295
0xd9792C14...4a42575dF
0.1555 ETH
189905562024-01-12 11:36:11180 days ago1705059371
0xd9792C14...4a42575dF
1.555 ETH
189641542024-01-08 18:45:47184 days ago1704739547
0xd9792C14...4a42575dF
0.7775 ETH
189418862024-01-05 15:13:47187 days ago1704467627
0xd9792C14...4a42575dF
0.1555 ETH
189224402024-01-02 21:42:11190 days ago1704231731
0xd9792C14...4a42575dF
0.1555 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Pickable

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 300 runs

Other Settings:
default evmVersion
File 1 of 21 : Pickable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// Interfaces
import "@manifoldxyz/creator-core-solidity/contracts/core/IERC721CreatorCore.sol";
import "@manifoldxyz/creator-core-solidity/contracts/extensions/ICreatorExtensionTokenURI.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "./IERC721LazyPayableClaim.sol";
import "./IERC721CreatorCoreVersion.sol";

// Abstract
import "./LazyPayableClaim.sol";

/**
 * @title Pickable Claim
 * @author @thedepthofthedaimon
 * @notice Pickable Claim with optional whitelist ERC721 tokens
 */
contract Pickable is IERC165, IERC721LazyPayableClaim, ICreatorExtensionTokenURI, LazyPayableClaim {
    using Strings for uint256;

    // stores mapping from contractAddress/instanceId to the claim it represents
    // { contractAddress => { instanceId => Claim } }
    mapping(address => mapping(uint256 => Claim)) private _claims;

    // stores mapping from contractAddress/instanceId to the _picks information
    mapping(address => mapping(uint256 => mapping(uint256 => uint256))) private _tokenToCombination; // _tokenToCombination[contractCreatorAddress][instanceId][tokenId] = combinationId + 1 (0: Available to Reserve)
    mapping(address => mapping(uint256 => mapping(uint256 => uint256))) private _combinationToToken; // _combinationToToken[contractCreatorAddress][instanceId][combinationId] = tokenId (0: Available to Reserve, tokenId starts at 1)

    // bitmapped information on picked nfts
    mapping(address => mapping(uint256 => mapping(uint256 => uint256))) private _combinationMap; // _combinationMap[contractCreatorAddress][instanceId][bitmapOffset] = uint256
    event ReservedCombination(address indexed creatorContract, uint256 indexed instanceId, uint256 tokenId, uint256 combinationId);

    function supportsInterface(bytes4 interfaceId) public view virtual override(AdminControl, IERC165) returns (bool) {
        return interfaceId == type(IERC721LazyPayableClaim).interfaceId ||
            interfaceId == type(ILazyPayableClaim).interfaceId ||
            interfaceId == type(ICreatorExtensionTokenURI).interfaceId ||
            interfaceId == type(IAdminControl).interfaceId ||
            interfaceId == type(IERC165).interfaceId;
    }


    function checkVersion(address creatorContractAddress) public view returns (uint8) {
        uint8 creatorContractVersion;
        try IERC721CreatorCoreVersion(creatorContractAddress).VERSION() returns(uint256 version) {
            require(version > 0, "Unsupported contract version");
            require(version <= 255, "Unsupported contract version");
            creatorContractVersion = uint8(version);
        } catch {
            creatorContractVersion = 252;
        }
        return creatorContractVersion;
    }

    /**
     * See {IERC721LazyClaim-initializeClaim}.
     */
    function initializeClaim(
        address creatorContractAddress,
        uint256 instanceId,
        ClaimParameters calldata claimParameters
    ) external override creatorAdminRequired(creatorContractAddress) {
        require(instanceId > 0 && instanceId <= MAX_UINT_56, "Invalid instanceId");
        require(_claims[creatorContractAddress][instanceId].contractVersion == 0, "Claim already initialized");
        require(claimParameters.endDate == 0 || claimParameters.startDate < claimParameters.endDate, "Cannot have startDate greater than or equal to endDate");

        uint8 creatorContractVersion = checkVersion(creatorContractAddress);

        // Create the claim
        _claims[creatorContractAddress][instanceId] = Claim({
            total: 0,
            totalMax: claimParameters.totalMax,
            combinationMax: claimParameters.combinationMax,
            startDate: claimParameters.startDate,
            endDate: claimParameters.endDate,
            contractVersion: creatorContractVersion,
            tokenUriStyle: claimParameters.tokenUriStyle,
            reservationState: claimParameters.reservationState,
            location: claimParameters.location,
            extension: claimParameters.extension,
            cost: claimParameters.cost,
            paymentReceiver: claimParameters.paymentReceiver,
            erc20: claimParameters.erc20
        });

        emit ClaimInitialized(creatorContractAddress, instanceId, msg.sender);
    }

    /**
     * See {IERC721LazyClaim-udpateClaim}.
     */
    function updateClaim(
        address creatorContractAddress,
        uint256 instanceId,
        ClaimParameters memory claimParameters
    ) external override creatorAdminRequired(creatorContractAddress) {
        // Sanity checks
        Claim memory claim = _claims[creatorContractAddress][instanceId];
        require(claim.contractVersion != 0, "Claim not initialized");
        require(claimParameters.endDate == 0 || claimParameters.startDate < claimParameters.endDate, "Cannot have startDate greater than or equal to endDate");
        require(claimParameters.erc20 == claim.erc20, "Cannot change payment token");
        if (claimParameters.totalMax != 0 && claim.total > claimParameters.totalMax) {
            claimParameters.totalMax = claim.total;
        }

        // Overwrite the existing claim
        _claims[creatorContractAddress][instanceId] = Claim({
            total: claim.total,
            totalMax: claimParameters.totalMax,
            combinationMax: claimParameters.combinationMax,
            startDate: claimParameters.startDate,
            endDate: claimParameters.endDate,
            contractVersion: claim.contractVersion,
            tokenUriStyle: claimParameters.tokenUriStyle,
            reservationState: claimParameters.reservationState,
            location: claimParameters.location,
            extension: claimParameters.extension,
            cost: claimParameters.cost,
            paymentReceiver: claimParameters.paymentReceiver,
            erc20: claim.erc20
        });
        emit ClaimUpdated(creatorContractAddress, instanceId);
    }

    /**
     * See {IERC721LazyClaim-updateTokenURIParams}.
     */
    function updateTokenURIParams(
        address creatorContractAddress, uint256 instanceId,
        TokenUriStyle tokenUriStyle,
        ReservationState reservationState,
        string calldata location,
        string calldata extension
    ) external override creatorAdminRequired(creatorContractAddress) {
        Claim storage claim = _claims[creatorContractAddress][instanceId];
        require(_claims[creatorContractAddress][instanceId].contractVersion != 0, "Claim not initialized");
        claim.tokenUriStyle = tokenUriStyle;
        claim.reservationState = reservationState;
        claim.location = location;
        claim.extension = extension;
        emit ClaimUpdated(creatorContractAddress, instanceId);
    }

    /**
     * See {ILazyPayableClaim-getClaim}.
     */
    function getClaim(address creatorContractAddress, uint256 instanceId) public override view returns(Claim memory) {
        return _getClaim(creatorContractAddress, instanceId);
    }

    /**
     * See {ILazyPayableClaim-getClaimForToken}.
     */
    function getClaimForToken(address creatorContractAddress, uint256 tokenId) external override view returns(uint256 instanceId, Claim memory claim) {
        // No claim, try to retrieve from tokenData
        uint80 tokenData = IERC721CreatorCore(creatorContractAddress).tokenData(tokenId);
        instanceId = uint56(tokenData >> 24);
        claim = _getClaim(creatorContractAddress, instanceId);
    }

    function _getClaim(address creatorContractAddress, uint256 instanceId) private view returns(Claim storage claim) {
        claim = _claims[creatorContractAddress][instanceId];
        require(claim.contractVersion != 0, "Claim not initialized");
    }

    /**
     * See {ILazyPayableClaim-mint}.
     */
    function mint(address creatorContractAddress, uint256 instanceId) external payable override {
        Claim storage claim = _getClaim(creatorContractAddress, instanceId);

        // Check totalMax
        require((++claim.total <= claim.totalMax || claim.totalMax == 0) && claim.total <= MAX_UINT_24, "Maximum tokens already minted for this claim");

        // Validate mint
        _validateMintTime(claim.startDate, claim.endDate);

        // Transfer funds
        _transferFunds(claim.erc20, claim.cost, claim.paymentReceiver, 1);

        // Do mint
        uint80 tokenData = uint56(instanceId) << 24 | uint24(claim.total);
        IERC721CreatorCore(creatorContractAddress).mintExtension(msg.sender, tokenData);

        emit ClaimMint(creatorContractAddress, instanceId);
    }

    /**
     * See {ILazyPayableClaim-mintBatch}.
     */
    function mintBatch(address creatorContractAddress, uint256 instanceId, uint16 mintCount) external payable override {
        Claim storage claim = _getClaim(creatorContractAddress, instanceId);

        // Check totalMax
        claim.total += mintCount;
        require((claim.totalMax == 0 || claim.total <= claim.totalMax) && claim.total <= MAX_UINT_24, "Too many requested for this claim");

        // Validate mint
        _validateMintTime(claim.startDate, claim.endDate);
        uint256 newMintIndex = claim.total - mintCount + 1;

        // Transfer funds
        _transferFunds(claim.erc20, claim.cost, claim.paymentReceiver, mintCount);

        uint80[] memory tokenData = new uint80[](mintCount);
        for (uint256 i; i < mintCount;) {
            tokenData[i] = uint56(instanceId) << 24 | uint24(newMintIndex+i);
            unchecked { ++i; }
        }
        IERC721CreatorCore(creatorContractAddress).mintExtensionBatch(msg.sender, tokenData);

        emit ClaimMintBatch(creatorContractAddress, instanceId, mintCount);
    }

    /**
     * See {IERC721LazyClaim-airdrop}.
     */
    function airdrop(address creatorContractAddress, uint256 instanceId, address[] calldata recipients,
            uint16[] calldata amounts) external override creatorAdminRequired(creatorContractAddress) {
        require(recipients.length == amounts.length, "Unequal number of recipients and amounts");

        Claim storage claim = _claims[creatorContractAddress][instanceId];
        uint256 newMintIndex = claim.total+1;

        for (uint256 i; i < recipients.length;) {
            uint16 mintCount = amounts[i];
            uint80[] memory tokenDatas = new uint80[](mintCount);
            for (uint256 j; j < mintCount;) {
                tokenDatas[j] = uint56(instanceId) << 24 | uint24(newMintIndex+j);
                unchecked { ++j; }
            }
            IERC721CreatorCore(creatorContractAddress).mintExtensionBatch(recipients[i], tokenDatas);
            unchecked{ newMintIndex += mintCount; }
            unchecked{ ++i; }
        }

        require(newMintIndex - claim.total - 1 <= MAX_UINT_24, "Too many requested");
        claim.total += uint32(newMintIndex - claim.total - 1);
        if (claim.totalMax != 0) {
            require( claim.total <= claim.totalMax, "Requested > Max");
        }
    }

    function getCombinationMapPage(address creatorContractAddress, uint256 instanceId, uint256 page) external view returns(uint256) {
        return _combinationMap[creatorContractAddress][instanceId][page];
    }


    function _reserve(address creatorContractAddress, uint256 instanceId, uint256 tokenId, uint256 combinationId) internal {
        Claim storage claim = _claims[creatorContractAddress][instanceId];
        AdminControl creatorCoreContract = AdminControl(creatorContractAddress);
        if(creatorCoreContract.isAdmin(msg.sender) == false) {
            require( msg.sender == IERC721(creatorContractAddress).ownerOf(tokenId), "Caller not owner" );
        }
        require( claim.reservationState == ReservationState.RESERVATION_OPEN, "Reservations Closed");
        require( tokenId < claim.totalMax, "Invalid Token");
        require( combinationId < claim.combinationMax, "Invalid Combination"); // maxCombintion = 100, valid combinationId = 0..99

        // Solidity 0.8 required 
        uint256 combinationPage = combinationId / 256;
        uint256 combinationMask = 1 << (combinationId % 256);

        // Mark Combination Map
        require (_combinationMap[creatorContractAddress][instanceId][combinationPage] & combinationMask == 0, "Combination Unavailable");
        _combinationMap[creatorContractAddress][instanceId][combinationPage] |= combinationMask;

        // Map Token => Combination
        require (_tokenToCombination[creatorContractAddress][instanceId][tokenId] == 0, "Token Has Reservation");
        _tokenToCombination[creatorContractAddress][instanceId][tokenId] = combinationId + 1; /* offset by 1, unused = 0 */

        // Map Combination => Token
        _combinationToToken[creatorContractAddress][instanceId][combinationId] = tokenId;

        // Finish
        emit ReservedCombination(creatorContractAddress, instanceId, tokenId, combinationId);
    }

    function reserve(address creatorContractAddress, uint256 instanceId, uint256 tokenId, uint256 combinationId) external {
        _reserve(creatorContractAddress, instanceId, tokenId, combinationId);
    }

    function reserveBatch(address creatorContractAddress, uint256 instanceId, uint256[] calldata tokenIds, uint256[] calldata combinationIds) external {
        require(tokenIds.length == combinationIds.length, "Unequal number of tokens and combinations");
        for (uint256 i; i < tokenIds.length;) {
            _reserve(creatorContractAddress, instanceId, tokenIds[i], combinationIds[i]);
            unchecked{ ++i; }
        }
    }
            

    function getTokenData(address creatorContractAddress, uint256 tokenId) external view returns(uint80 tokenData) {
        return IERC721CreatorCore(creatorContractAddress).tokenData(tokenId);
    }

    function getCombinationForInstanceToken(address creatorContractAddress, uint256 instanceId, uint256 tokenId) external view returns(uint256 combinationId) {
        combinationId = _tokenToCombination[creatorContractAddress][instanceId][tokenId]; 
        require (combinationId > 0, "No Reservation");
        return combinationId - 1;
    }

    function getInstanceIdForToken(address creatorContractAddress, uint256 tokenId) external view returns(uint56 instanceId ) {
        // No claim, try to retrieve from tokenData
        uint80 tokenData = IERC721CreatorCore(creatorContractAddress).tokenData(tokenId);
        instanceId = uint56(tokenData >> 24);
        return instanceId;
    }

    function getCombinationForToken(address creatorContractAddress, uint256 tokenId) external view returns(uint256 combinationId) {
        // No claim, try to retrieve from tokenData
        uint80 tokenData = IERC721CreatorCore(creatorContractAddress).tokenData(tokenId);
        uint56 instanceId = uint56(tokenData >> 24);

        combinationId = _tokenToCombination[creatorContractAddress][instanceId][tokenId]; 
        require (combinationId > 0, "No Reservation");
        return combinationId - 1;
    }

    /**
     * See {ICreatorExtensionTokenURI-tokenURI}.
     */
    function tokenURI(address creatorContractAddress, uint256 tokenId) external override view returns(string memory uri) {
        Claim memory claim;
        uint256 mintOrder;

        uint80 tokenData = IERC721CreatorCore(creatorContractAddress).tokenData(tokenId);
        uint56 instanceId = uint56(tokenData >> 24);
        require(instanceId != 0, "Token does not exist");
        claim = _claims[creatorContractAddress][instanceId];
        mintOrder = uint24(tokenData & MAX_UINT_24); // mintOrder duplicated across multible instanceIds

        if (claim.tokenUriStyle == TokenUriStyle.COMBINATION_ID) {
            // During Reservation { COMBINTAION_ID }
            uint256 combinationId = _tokenToCombination[creatorContractAddress][instanceId][tokenId]; 
            if (combinationId > 0) {
                uri = string(abi.encodePacked(claim.location, uint256(combinationId - 1).toString(), claim.extension)); // remove +1 offset
            } else {
                uri = string(abi.encodePacked(claim.location, "default", claim.extension));
            }
        } else if (claim.tokenUriStyle == TokenUriStyle.MINT_ORDER) {
            // Reservations Disabled { MINT_ORDER } - claim+instanceId Index
            uri = string(abi.encodePacked(claim.location, uint256(mintOrder).toString(), claim.extension));  
        } else {
            // Reservations Disabled { INVALID, TOKEN_ID } - Absolute Index
            uri = string(abi.encodePacked(claim.location, uint256(tokenId).toString(), claim.extension)); 
        }
    }
}

File 2 of 21 : LazyPayableClaim.sol
// SPDX-License-Identifier: MIT
// solhint-disable reason-string
pragma solidity ^0.8.0;

// Interfaces
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
// import "./IDelegationRegistry.sol";
import "./ILazyPayableClaim.sol";

// Libaries
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol";

/**
 * @title Lazy Payable Claim
 * @author manifold.xyz
 * @notice Lazy payable claim with optional whitelist ERC721 tokens
 */
abstract contract LazyPayableClaim is ILazyPayableClaim, AdminControl {
    using EnumerableSet for EnumerableSet.AddressSet;

    uint256 internal constant MAX_UINT_24 = 0xffffff;
    //uint256 internal constant MAX_UINT_32 = 0xffffffff;
    uint256 internal constant MAX_UINT_56 = 0xffffffffffffff;
    //uint256 internal constant MAX_UINT_256 = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
    address private constant ADDRESS_ZERO = 0x0000000000000000000000000000000000000000;

    EnumerableSet.AddressSet private _proxyAddresses;

    /**
     * @notice This extension is shared, not single-creator. So we must ensure
     * that a claim's initializer is an admin on the creator contract
     * @param creatorContractAddress    the address of the creator contract to check the admin against
     */
    modifier creatorAdminRequired(address creatorContractAddress) {
        AdminControl creatorCoreContract = AdminControl(creatorContractAddress);
        require(creatorCoreContract.isAdmin(msg.sender), "Wallet is not an administrator for contract");
        _;
    }

    /**
     * See {ILazyPayableClaim-withdraw}.
     */
    function withdraw(address payable receiver, uint256 amount) external override adminRequired {
        (bool sent, ) = receiver.call{value: amount}("");
        require(sent, "Failed to transfer to receiver");
    }

    function _transferFunds(address erc20, uint256 cost, address payable recipient, uint16 mintCount) internal {
        uint256 payableCost;
        if (erc20 != ADDRESS_ZERO) {
            require(IERC20(erc20).transferFrom(msg.sender, recipient, cost*mintCount), "Insufficient funds");
        } else {
            payableCost = cost;
        }

        if (mintCount > 1) {
            payableCost *= mintCount;
        }

        // Check price
        require(msg.value >= payableCost, "Invalid amount");
        if (erc20 == ADDRESS_ZERO && cost != 0) {
            // solhint-disable-next-line
            (bool sent, ) = recipient.call{value: msg.value}("");
            require(sent, "Failed to transfer to receiver");
        }
    }

    function _validateMintTime(uint48 startDate, uint48 endDate) internal view {
        // Check timestamps
        require(
            (startDate <= block.timestamp) &&
            (endDate == 0 || endDate >= block.timestamp),
            "Claim inactive"
        );
    }
}

File 3 of 21 : IERC721CreatorCoreVersion.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IERC721CreatorCoreVersion {
    function VERSION() external view returns(uint256);
}

File 4 of 21 : IERC721LazyPayableClaim.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "./ILazyPayableClaim.sol";

/**
 * Lazy Payable Claim interface
 */
interface IERC721LazyPayableClaim is ILazyPayableClaim {
    enum TokenUriStyle { INVALID, TOKEN_ID, MINT_ORDER, COMBINATION_ID }
    enum ReservationState { RESERVATION_CLOSED, RESERVATION_OPEN }

    struct ClaimParameters {
        uint32 totalMax;
        uint32 combinationMax;
        uint48 startDate;
        uint48 endDate;
        TokenUriStyle tokenUriStyle;
        ReservationState reservationState;
        string location;
        string extension;
        uint256 cost;
        address payable paymentReceiver;
        address erc20;
    }

    struct Claim {
        uint32 total;
        uint32 totalMax;
        uint32 combinationMax;
        uint48 startDate;
        uint48 endDate;
        uint8 contractVersion;
        TokenUriStyle tokenUriStyle;
        ReservationState reservationState;
        string location;
        string extension;
        uint256 cost;
        address payable paymentReceiver;
        address erc20;
    }

    /**
     * @notice initialize a new claim, emit initialize event
     * @param creatorContractAddress    the creator contract the claim will mint tokens for
     * @param instanceId                the claim instanceId for the creator contract
     * @param claimParameters           the parameters which will affect the minting behavior of the claim
     */
    function initializeClaim(address creatorContractAddress, uint256 instanceId, ClaimParameters calldata claimParameters) external;

    /**
     * @notice update an existing claim at instanceId
     * @param creatorContractAddress    the creator contract corresponding to the claim
     * @param instanceId                the claim instanceId for the creator contract
     * @param claimParameters           the parameters which will affect the minting behavior of the claim
     */
    function updateClaim(address creatorContractAddress, uint256 instanceId, ClaimParameters calldata claimParameters) external;

    /**
     * @notice update tokenURI parameters for an existing claim at instanceId
     * @param creatorContractAddress    the creator contract corresponding to the claim
     * @param instanceId                the claim instanceId for the creator contract
     * @param tokenUriStyle             the style of tokenURI
     * @param reservationState          the reservationState
     * @param location                  the new location
     * @param extension                 the new extension
     */
    function updateTokenURIParams(address creatorContractAddress, uint256 instanceId, TokenUriStyle tokenUriStyle, ReservationState reservationState, string calldata location, string calldata extension) external;


    /**
     * @notice extend tokenURI parameters for an existing claim at instanceId.  Must have NONE StorageProtocol
     * @param creatorContractAddress    the creator contract corresponding to the claim
     * @param instanceId                the claim instanceId for the creator contract
     * @param locationChunk             the additional location chunk
     */
    //function extendTokenURI(address creatorContractAddress, uint256 instanceId, string calldata locationChunk) external;

    /**
     * @notice get a claim corresponding to a creator contract and instanceId
     * @param creatorContractAddress    the address of the creator contract
     * @param instanceId                the claim instanceId for the creator contract
     * @return                          the claim object
     */
    function getClaim(address creatorContractAddress, uint256 instanceId) external view returns(Claim memory);

    /**
     * @notice get a claim corresponding to a token
     * @param creatorContractAddress    the address of the creator contract
     * @param tokenId                   the tokenId of the claim
     * @return                          the claim instanceId and claim object
     */
    function getClaimForToken(address creatorContractAddress, uint256 tokenId) external view returns(uint256, Claim memory);

    /**
     * @notice allow admin to airdrop arbitrary tokens 
     * @param creatorContractAddress    the creator contract the claim will mint tokens for
     * @param instanceId                the claim instanceId for the creator contract
     * @param recipients                addresses to airdrop to
     * @param amounts                   number of tokens to airdrop to each address in addresses
     */
    function airdrop(address creatorContractAddress, uint256 instanceId, address[] calldata recipients, uint16[] calldata amounts) external;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

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

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

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

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

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

pragma solidity ^0.8.0;

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

File 7 of 21 : ICreatorExtensionTokenURI.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

/**
 * @dev Implement this if you want your extension to have overloadable URI's
 */
interface ICreatorExtensionTokenURI is IERC165 {

    /**
     * Get the uri for a given creator/tokenId
     */
    function tokenURI(address creator, uint256 tokenId) external view returns (string memory);
}

File 8 of 21 : IERC721CreatorCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "./ICreatorCore.sol";

/**
 * @dev Core ERC721 creator interface
 */
interface IERC721CreatorCore is ICreatorCore {

    /**
     * @dev mint a token with no extension. Can only be called by an admin.
     * Returns tokenId minted
     */
    function mintBase(address to) external returns (uint256);

    /**
     * @dev mint a token with no extension. Can only be called by an admin.
     * Returns tokenId minted
     */
    function mintBase(address to, string calldata uri) external returns (uint256);

    /**
     * @dev batch mint a token with no extension. Can only be called by an admin.
     * Returns tokenId minted
     */
    function mintBaseBatch(address to, uint16 count) external returns (uint256[] memory);

    /**
     * @dev batch mint a token with no extension. Can only be called by an admin.
     * Returns tokenId minted
     */
    function mintBaseBatch(address to, string[] calldata uris) external returns (uint256[] memory);

    /**
     * @dev mint a token. Can only be called by a registered extension.
     * Returns tokenId minted
     */
    function mintExtension(address to) external returns (uint256);

    /**
     * @dev mint a token. Can only be called by a registered extension.
     * Returns tokenId minted
     */
    function mintExtension(address to, string calldata uri) external returns (uint256);

    /**
     * @dev mint a token. Can only be called by a registered extension.
     * Returns tokenId minted
     */
    function mintExtension(address to, uint80 data) external returns (uint256);

    /**
     * @dev batch mint a token. Can only be called by a registered extension.
     * Returns tokenIds minted
     */
    function mintExtensionBatch(address to, uint16 count) external returns (uint256[] memory);

    /**
     * @dev batch mint a token. Can only be called by a registered extension.
     * Returns tokenId minted
     */
    function mintExtensionBatch(address to, string[] calldata uris) external returns (uint256[] memory);

    /**
     * @dev batch mint a token. Can only be called by a registered extension.
     * Returns tokenId minted
     */
    function mintExtensionBatch(address to, uint80[] calldata data) external returns (uint256[] memory);

    /**
     * @dev burn a token. Can only be called by token owner or approved address.
     * On burn, calls back to the registered extension's onBurn method
     */
    function burn(uint256 tokenId) external;

    /**
     * @dev get token data
     */
    function tokenData(uint256 tokenId) external view returns (uint80);

}

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

}

File 10 of 21 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

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

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 11 of 21 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

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.
 *
 * ```solidity
 * 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.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
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) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // 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;

        /// @solidity memory-safe-assembly
        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 in 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;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 12 of 21 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.2) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates merkle trees that are safe
 * against this attack out of the box.
 */
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 Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

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

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            require(proofPos == proofLen, "MerkleProof: invalid multiproof");
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            require(proofPos == proofLen, "MerkleProof: invalid multiproof");
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 13 of 21 : ILazyPayableClaim.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

/**
 * Lazy Payable Claim interface
 */
interface ILazyPayableClaim {
    event ClaimInitialized(address indexed creatorContract, uint256 indexed instanceId, address initializer);
    event ClaimUpdated(address indexed creatorContract, uint256 indexed instanceId);
    event ClaimMint(address indexed creatorContract, uint256 indexed instanceId);
    event ClaimMintBatch(address indexed creatorContract, uint256 indexed instanceId, uint16 mintCount);
    event ClaimMintProxy(address indexed creatorContract, uint256 indexed instanceId, uint16 mintCount, address proxy, address mintFor);

    /**
     * @notice Withdraw funds
     */
    function withdraw(address payable receiver, uint256 amount) external;

    /**
     * @notice check if a mint index has been consumed or not (only for merkle claims)
     *
     * @param creatorContractAddress    the address of the creator contract for the claim
     * @param instanceId                the claim instanceId for the creator contract
     * @param mintIndex                 the mint claim instance
     * @return                          whether or not the mint index was consumed
     */
    //function checkMintIndex(address creatorContractAddress, uint256 instanceId, uint32 mintIndex) external view returns(bool);

    /**
     * @notice check if multiple mint indices has been consumed or not (only for merkle claims)
     *
     * @param creatorContractAddress    the address of the creator contract for the claim
     * @param instanceId                the claim instanceId for the creator contract
     * @param mintIndices               the mint claim instance
     * @return                          whether or not the mint index was consumed
     */
    //function checkMintIndices(address creatorContractAddress, uint256 instanceId, uint32[] calldata mintIndices) external view returns(bool[] memory);

    /**
     * @notice get mints made for a wallet (only for non-merkle claims with walletMax)
     *
     * @param minter                    the address of the minting address
     * @param creatorContractAddress    the address of the creator contract for the claim
     * @param instanceId                the claim instance for the creator contract
     * @return                          how many mints the minter has made
     */
    //function getTotalMints(address minter, address creatorContractAddress, uint256 instanceId) external view returns(uint32);

    /**
     * @notice allow a wallet to lazily claim a token according to parameters
     * @param creatorContractAddress    the creator contract address
     * @param instanceId                the claim instanceId for the creator contract
     */
    function mint(address creatorContractAddress, uint256 instanceId) external payable;

    /**
     * @notice allow a wallet to lazily claim a token according to parameters
     * @param creatorContractAddress    the creator contract address
     * @param instanceId                the claim instanceId for the creator contract
     * @param mintCount                 the number of claims to mint
     */
    function mintBatch(address creatorContractAddress, uint256 instanceId, uint16 mintCount) external payable;


    /**
     * @notice allow a proxy to mint a token for another address
     * @param creatorContractAddress    the creator contract address
     * @param instanceId                the claim instanceId for the creator contract
     * @param mintCount                 the number of claims to mint
     * @param mintFor                   the address to mint for
     */
    //function mintProxy(address creatorContractAddress, uint256 instanceId, uint16 mintCount, address mintFor) external payable;
}

File 14 of 21 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

File 15 of 21 : ICreatorCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

/**
 * @dev Core creator interface
 */
interface ICreatorCore is IERC165 {

    event ExtensionRegistered(address indexed extension, address indexed sender);
    event ExtensionUnregistered(address indexed extension, address indexed sender);
    event ExtensionBlacklisted(address indexed extension, address indexed sender);
    event MintPermissionsUpdated(address indexed extension, address indexed permissions, address indexed sender);
    event RoyaltiesUpdated(uint256 indexed tokenId, address payable[] receivers, uint256[] basisPoints);
    event DefaultRoyaltiesUpdated(address payable[] receivers, uint256[] basisPoints);
    event ApproveTransferUpdated(address extension);
    event ExtensionRoyaltiesUpdated(address indexed extension, address payable[] receivers, uint256[] basisPoints);
    event ExtensionApproveTransferUpdated(address indexed extension, bool enabled);

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

    /**
     * @dev add an extension.  Can only be called by contract owner or admin.
     * extension address must point to a contract implementing ICreatorExtension.
     * Returns True if newly added, False if already added.
     */
    function registerExtension(address extension, string calldata baseURI) external;

    /**
     * @dev add an extension.  Can only be called by contract owner or admin.
     * extension address must point to a contract implementing ICreatorExtension.
     * Returns True if newly added, False if already added.
     */
    function registerExtension(address extension, string calldata baseURI, bool baseURIIdentical) external;

    /**
     * @dev add an extension.  Can only be called by contract owner or admin.
     * Returns True if removed, False if already removed.
     */
    function unregisterExtension(address extension) external;

    /**
     * @dev blacklist an extension.  Can only be called by contract owner or admin.
     * This function will destroy all ability to reference the metadata of any tokens created
     * by the specified extension. It will also unregister the extension if needed.
     * Returns True if removed, False if already removed.
     */
    function blacklistExtension(address extension) external;

    /**
     * @dev set the baseTokenURI of an extension.  Can only be called by extension.
     */
    function setBaseTokenURIExtension(string calldata uri) external;

    /**
     * @dev set the baseTokenURI of an extension.  Can only be called by extension.
     * For tokens with no uri configured, tokenURI will return "uri+tokenId"
     */
    function setBaseTokenURIExtension(string calldata uri, bool identical) external;

    /**
     * @dev set the common prefix of an extension.  Can only be called by extension.
     * If configured, and a token has a uri set, tokenURI will return "prefixURI+tokenURI"
     * Useful if you want to use ipfs/arweave
     */
    function setTokenURIPrefixExtension(string calldata prefix) external;

    /**
     * @dev set the tokenURI of a token extension.  Can only be called by extension that minted token.
     */
    function setTokenURIExtension(uint256 tokenId, string calldata uri) external;

    /**
     * @dev set the tokenURI of a token extension for multiple tokens.  Can only be called by extension that minted token.
     */
    function setTokenURIExtension(uint256[] memory tokenId, string[] calldata uri) external;

    /**
     * @dev set the baseTokenURI for tokens with no extension.  Can only be called by owner/admin.
     * For tokens with no uri configured, tokenURI will return "uri+tokenId"
     */
    function setBaseTokenURI(string calldata uri) external;

    /**
     * @dev set the common prefix for tokens with no extension.  Can only be called by owner/admin.
     * If configured, and a token has a uri set, tokenURI will return "prefixURI+tokenURI"
     * Useful if you want to use ipfs/arweave
     */
    function setTokenURIPrefix(string calldata prefix) external;

    /**
     * @dev set the tokenURI of a token with no extension.  Can only be called by owner/admin.
     */
    function setTokenURI(uint256 tokenId, string calldata uri) external;

    /**
     * @dev set the tokenURI of multiple tokens with no extension.  Can only be called by owner/admin.
     */
    function setTokenURI(uint256[] memory tokenIds, string[] calldata uris) external;

    /**
     * @dev set a permissions contract for an extension.  Used to control minting.
     */
    function setMintPermissions(address extension, address permissions) external;

    /**
     * @dev Configure so transfers of tokens created by the caller (must be extension) gets approval
     * from the extension before transferring
     */
    function setApproveTransferExtension(bool enabled) external;

    /**
     * @dev get the extension of a given token
     */
    function tokenExtension(uint256 tokenId) external view returns (address);

    /**
     * @dev Set default royalties
     */
    function setRoyalties(address payable[] calldata receivers, uint256[] calldata basisPoints) external;

    /**
     * @dev Set royalties of a token
     */
    function setRoyalties(uint256 tokenId, address payable[] calldata receivers, uint256[] calldata basisPoints) external;

    /**
     * @dev Set royalties of an extension
     */
    function setRoyaltiesExtension(address extension, address payable[] calldata receivers, uint256[] calldata basisPoints) external;

    /**
     * @dev Get royalites of a token.  Returns list of receivers and basisPoints
     */
    function getRoyalties(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);
    
    // Royalty support for various other standards
    function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory);
    function getFeeBps(uint256 tokenId) external view returns (uint[] memory);
    function getFees(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);
    function royaltyInfo(uint256 tokenId, uint256 value) external view returns (address, uint256);

    /**
     * @dev Set the default approve transfer contract location.
     */
    function setApproveTransfer(address extension) external; 

    /**
     * @dev Get the default approve transfer contract location.
     */
    function getApproveTransfer() external view returns (address);
}

File 16 of 21 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 17 of 21 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 18 of 21 : 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 19 of 21 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 20 of 21 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

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

Contract Security Audit

Contract ABI

[{"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":"creatorContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"instanceId","type":"uint256"},{"indexed":false,"internalType":"address","name":"initializer","type":"address"}],"name":"ClaimInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creatorContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"instanceId","type":"uint256"}],"name":"ClaimMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creatorContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"instanceId","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"mintCount","type":"uint16"}],"name":"ClaimMintBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creatorContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"instanceId","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"mintCount","type":"uint16"},{"indexed":false,"internalType":"address","name":"proxy","type":"address"},{"indexed":false,"internalType":"address","name":"mintFor","type":"address"}],"name":"ClaimMintProxy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creatorContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"instanceId","type":"uint256"}],"name":"ClaimUpdated","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":"creatorContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"instanceId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"combinationId","type":"uint256"}],"name":"ReservedCombination","type":"event"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint16[]","name":"amounts","type":"uint16[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"approveAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"}],"name":"checkVersion","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAdmins","outputs":[{"internalType":"address[]","name":"admins","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"}],"name":"getClaim","outputs":[{"components":[{"internalType":"uint32","name":"total","type":"uint32"},{"internalType":"uint32","name":"totalMax","type":"uint32"},{"internalType":"uint32","name":"combinationMax","type":"uint32"},{"internalType":"uint48","name":"startDate","type":"uint48"},{"internalType":"uint48","name":"endDate","type":"uint48"},{"internalType":"uint8","name":"contractVersion","type":"uint8"},{"internalType":"enum IERC721LazyPayableClaim.TokenUriStyle","name":"tokenUriStyle","type":"uint8"},{"internalType":"enum IERC721LazyPayableClaim.ReservationState","name":"reservationState","type":"uint8"},{"internalType":"string","name":"location","type":"string"},{"internalType":"string","name":"extension","type":"string"},{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"address payable","name":"paymentReceiver","type":"address"},{"internalType":"address","name":"erc20","type":"address"}],"internalType":"struct IERC721LazyPayableClaim.Claim","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getClaimForToken","outputs":[{"internalType":"uint256","name":"instanceId","type":"uint256"},{"components":[{"internalType":"uint32","name":"total","type":"uint32"},{"internalType":"uint32","name":"totalMax","type":"uint32"},{"internalType":"uint32","name":"combinationMax","type":"uint32"},{"internalType":"uint48","name":"startDate","type":"uint48"},{"internalType":"uint48","name":"endDate","type":"uint48"},{"internalType":"uint8","name":"contractVersion","type":"uint8"},{"internalType":"enum IERC721LazyPayableClaim.TokenUriStyle","name":"tokenUriStyle","type":"uint8"},{"internalType":"enum IERC721LazyPayableClaim.ReservationState","name":"reservationState","type":"uint8"},{"internalType":"string","name":"location","type":"string"},{"internalType":"string","name":"extension","type":"string"},{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"address payable","name":"paymentReceiver","type":"address"},{"internalType":"address","name":"erc20","type":"address"}],"internalType":"struct IERC721LazyPayableClaim.Claim","name":"claim","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getCombinationForInstanceToken","outputs":[{"internalType":"uint256","name":"combinationId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getCombinationForToken","outputs":[{"internalType":"uint256","name":"combinationId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"internalType":"uint256","name":"page","type":"uint256"}],"name":"getCombinationMapPage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getInstanceIdForToken","outputs":[{"internalType":"uint56","name":"instanceId","type":"uint56"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenData","outputs":[{"internalType":"uint80","name":"tokenData","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"components":[{"internalType":"uint32","name":"totalMax","type":"uint32"},{"internalType":"uint32","name":"combinationMax","type":"uint32"},{"internalType":"uint48","name":"startDate","type":"uint48"},{"internalType":"uint48","name":"endDate","type":"uint48"},{"internalType":"enum IERC721LazyPayableClaim.TokenUriStyle","name":"tokenUriStyle","type":"uint8"},{"internalType":"enum IERC721LazyPayableClaim.ReservationState","name":"reservationState","type":"uint8"},{"internalType":"string","name":"location","type":"string"},{"internalType":"string","name":"extension","type":"string"},{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"address payable","name":"paymentReceiver","type":"address"},{"internalType":"address","name":"erc20","type":"address"}],"internalType":"struct IERC721LazyPayableClaim.ClaimParameters","name":"claimParameters","type":"tuple"}],"name":"initializeClaim","outputs":[],"stateMutability":"nonpayable","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":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"internalType":"uint16","name":"mintCount","type":"uint16"}],"name":"mintBatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"combinationId","type":"uint256"}],"name":"reserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"combinationIds","type":"uint256[]"}],"name":"reserveBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"revokeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"components":[{"internalType":"uint32","name":"totalMax","type":"uint32"},{"internalType":"uint32","name":"combinationMax","type":"uint32"},{"internalType":"uint48","name":"startDate","type":"uint48"},{"internalType":"uint48","name":"endDate","type":"uint48"},{"internalType":"enum IERC721LazyPayableClaim.TokenUriStyle","name":"tokenUriStyle","type":"uint8"},{"internalType":"enum IERC721LazyPayableClaim.ReservationState","name":"reservationState","type":"uint8"},{"internalType":"string","name":"location","type":"string"},{"internalType":"string","name":"extension","type":"string"},{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"address payable","name":"paymentReceiver","type":"address"},{"internalType":"address","name":"erc20","type":"address"}],"internalType":"struct IERC721LazyPayableClaim.ClaimParameters","name":"claimParameters","type":"tuple"}],"name":"updateClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"creatorContractAddress","type":"address"},{"internalType":"uint256","name":"instanceId","type":"uint256"},{"internalType":"enum IERC721LazyPayableClaim.TokenUriStyle","name":"tokenUriStyle","type":"uint8"},{"internalType":"enum IERC721LazyPayableClaim.ReservationState","name":"reservationState","type":"uint8"},{"internalType":"string","name":"location","type":"string"},{"internalType":"string","name":"extension","type":"string"}],"name":"updateTokenURIParams","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506200001d3362000023565b62000073565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61489380620000836000396000f3fe6080604052600436106101a15760003560e01c806370613f12116100e15780639f292d761161008a578063cb67bf6411610064578063cb67bf64146104e6578063e9dc63751461051e578063f2fde38b1461054b578063f3fef3a31461056b57600080fd5b80639f292d761461046b578063b3654627146104a6578063b9b79053146104c657600080fd5b8063890e0eb7116100bb578063890e0eb7146103e3578063895696f2146104155780638da5cb5b1461044357600080fd5b806370613f121461038e578063715018a6146103ae578063782e1ad9146103c357600080fd5b80632a92b01f1161014e57806340c10f191161012857806340c10f19146103285780635f2f51291461033b5780636d73e6691461035b5780636d9bd03e1461037b57600080fd5b80632a92b01f146102c65780632d345670146102e657806331ae450b1461030657600080fd5b806324d7806c1161017f57806324d7806c1461022a57806324f68ea81461024a578063259e4a981461026a57600080fd5b806301ffc9a7146101a65780630f79ab39146101db5780631f28e87e14610208575b600080fd5b3480156101b257600080fd5b506101c66101c136600461396e565b61058b565b60405190151581526020015b60405180910390f35b3480156101e757600080fd5b506101fb6101f63660046139bd565b610613565b6040516101d29190613b9f565b34801561021457600080fd5b50610228610223366004613bfe565b610850565b005b34801561023657600080fd5b506101c6610245366004613c8a565b61090e565b34801561025657600080fd5b50610228610265366004613d07565b610947565b34801561027657600080fd5b506102b8610285366004613db4565b6001600160a01b038316600090815260086020908152604080832085845282528083208484529091529020549392505050565b6040519081526020016101d2565b3480156102d257600080fd5b506102286102e1366004613de9565b610afc565b3480156102f257600080fd5b50610228610301366004613c8a565b610b0e565b34801561031257600080fd5b5061031b610b6c565b6040516101d29190613e24565b6102286103363660046139bd565b610c1b565b34801561034757600080fd5b50610228610356366004613bfe565b610e12565b34801561036757600080fd5b50610228610376366004613c8a565b611201565b610228610389366004613e83565b611259565b34801561039a57600080fd5b506102286103a9366004613ec1565b61152d565b3480156103ba57600080fd5b50610228611a88565b3480156103cf57600080fd5b506102b86103de3660046139bd565b611a9c565b3480156103ef57600080fd5b506104036103fe366004613c8a565b611b9d565b60405160ff90911681526020016101d2565b34801561042157600080fd5b506104356104303660046139bd565b611cae565b6040516101d2929190613f22565b34801561044f57600080fd5b506000546040516001600160a01b0390911681526020016101d2565b34801561047757600080fd5b5061048b6104863660046139bd565b611f70565b60405169ffffffffffffffffffff90911681526020016101d2565b3480156104b257600080fd5b506102b86104c1366004613db4565b611fdc565b3480156104d257600080fd5b506102286104e1366004614046565b612059565b3480156104f257600080fd5b506105066105013660046139bd565b612725565b60405166ffffffffffffff90911681526020016101d2565b34801561052a57600080fd5b5061053e6105393660046139bd565b6127a7565b6040516101d2919061418f565b34801561055757600080fd5b50610228610566366004613c8a565b612c4d565b34801561057757600080fd5b506102286105863660046139bd565b612cc3565b60006001600160e01b031982166334204d0b60e01b14806105bc57506001600160e01b031982166337a90b2160e21b145b806105d757506001600160e01b0319821663e9dc637560e01b145b806105f257506001600160e01b03198216632a9f3abf60e11b145b8061060d57506001600160e01b031982166301ffc9a760e01b145b92915050565b61061b6138f4565b6106258383612df1565b604080516101a081018252825463ffffffff8082168352600160201b820481166020840152600160401b8204169282019290925265ffffffffffff600160601b830481166060830152600160901b830416608082015260ff600160c01b8304811660a083015290929160c0840191600160c81b9091041660038111156106ad576106ad6139e9565b60038111156106be576106be6139e9565b81528154602090910190600160d01b900460ff1660018111156106e3576106e36139e9565b60018111156106f4576106f46139e9565b8152602001600182018054610708906141a2565b80601f0160208091040260200160405190810160405280929190818152602001828054610734906141a2565b80156107815780601f1061075657610100808354040283529160200191610781565b820191906000526020600020905b81548152906001019060200180831161076457829003601f168201915b5050505050815260200160028201805461079a906141a2565b80601f01602080910402602001604051908101604052809291908181526020018280546107c6906141a2565b80156108135780601f106107e857610100808354040283529160200191610813565b820191906000526020600020905b8154815290600101906020018083116107f657829003601f168201915b50505091835250506003820154602082015260048201546001600160a01b0390811660408301526005909201549091166060909101529392505050565b8281146108b65760405162461bcd60e51b815260206004820152602960248201527f556e657175616c206e756d626572206f6620746f6b656e7320616e6420636f6d60448201526862696e6174696f6e7360b81b60648201526084015b60405180910390fd5b60005b83811015610905576108fd87878787858181106108d8576108d86141dc565b905060200201358686868181106108f1576108f16141dc565b90506020020135612e69565b6001016108b9565b50505050505050565b6000816001600160a01b031661092c6000546001600160a01b031690565b6001600160a01b0316148061060d575061060d600183613286565b604051630935e01b60e21b8152336004820152889081906001600160a01b038216906324d7806c90602401602060405180830381865afa15801561098f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b391906141f2565b6109cf5760405162461bcd60e51b81526004016108ad90614214565b6001600160a01b038a1660009081526005602090815260408083208c8452909152812080549091600160c01b90910460ff169003610a475760405162461bcd60e51b815260206004820152601560248201527410db185a5b481b9bdd081a5b9a5d1a585b1a5e9959605a1b60448201526064016108ad565b80548990829060ff60c81b1916600160c81b836003811115610a6b57610a6b6139e9565b021790555080548890829060ff60d01b1916600160d01b836001811115610a9457610a946139e9565b021790555060018101610aa88789836142a5565b5060028101610ab88587836142a5565b506040518a906001600160a01b038d16907f657336af9bb6c51d60c05491508d7d3026a24ee549d7a0af42e44c75bfaec47c90600090a35050505050505050505050565b610b0884848484612e69565b50505050565b610b166132a8565b610b21600182613286565b15610b695760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a3610b67600182613302565b505b50565b6060610b786001613317565b67ffffffffffffffff811115610b9057610b90613f3b565b604051908082528060200260200182016040528015610bb9578160200160208202803683370190505b50905060005b610bc96001613317565b811015610c1757610bdb600182613321565b828281518110610bed57610bed6141dc565b6001600160a01b039092166020928302919091019091015280610c0f8161437b565b915050610bbf565b5090565b6000610c278383612df1565b805490915063ffffffff600160201b82048116918391600091610c4a9116614394565b91906101000a81548163ffffffff021916908363ffffffff160217905563ffffffff16111580610c8657508054600160201b900463ffffffff16155b8015610c9e5750805462ffffff63ffffffff90911611155b610cff5760405162461bcd60e51b815260206004820152602c60248201527f4d6178696d756d20746f6b656e7320616c7265616479206d696e74656420666f60448201526b72207468697320636c61696d60a01b60648201526084016108ad565b8054610d239065ffffffffffff600160601b8204811691600160901b90041661332d565b600581015460038201546004830154610d4b926001600160a01b03908116929116600161339a565b805460405163d397371960e01b815233600482015262ffffff909116601884901b66ffffffff000000161760248201819052906001600160a01b0385169063d3973719906044016020604051808303816000875af1158015610db1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd591906143b7565b5060405183906001600160a01b038616907f5d404f369772cfab2b65717fca9bc2077efeab89a0dbec036bf0c13783154eb190600090a350505050565b604051630935e01b60e21b8152336004820152869081906001600160a01b038216906324d7806c90602401602060405180830381865afa158015610e5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7e91906141f2565b610e9a5760405162461bcd60e51b81526004016108ad90614214565b848314610efa5760405162461bcd60e51b815260206004820152602860248201527f556e657175616c206e756d626572206f6620726563697069656e747320616e6460448201526720616d6f756e747360c01b60648201526084016108ad565b6001600160a01b03881660009081526005602090815260408083208a845290915281208054909190610f339063ffffffff1660016143d0565b63ffffffff16905060005b878110156110d6576000878783818110610f5a57610f5a6141dc565b9050602002016020810190610f6f91906143ed565b905060008161ffff1667ffffffffffffffff811115610f9057610f90613f3b565b604051908082528060200260200182016040528015610fb9578160200160208202803683370190505b50905060005b8261ffff1681101561102757610fd58186614408565b62ffffff1660188e66ffffffffffffff16901b1766ffffffffffffff16828281518110611004576110046141dc565b69ffffffffffffffffffff90921660209283029190910190910152600101610fbf565b508c6001600160a01b0316634278330e8c8c86818110611049576110496141dc565b905060200201602081019061105e9190613c8a565b836040518363ffffffff1660e01b815260040161107c92919061441b565b6000604051808303816000875af115801561109b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110c3919081019061447e565b505061ffff169190910190600101610f3e565b50815462ffffff906001906110f19063ffffffff1684614524565b6110fb9190614524565b111561113e5760405162461bcd60e51b8152602060048201526012602482015271151bdbc81b585b9e481c995c5d595cdd195960721b60448201526064016108ad565b81546001906111539063ffffffff1683614524565b61115d9190614524565b8254839060009061117590849063ffffffff166143d0565b82546101009290920a63ffffffff8181021990931691831602179091558354600160201b9004161590506111f557815463ffffffff600160201b82048116911611156111f55760405162461bcd60e51b815260206004820152600f60248201526e0a4cae2eacae6e8cac8407c409ac2f608b1b60448201526064016108ad565b50505050505050505050565b6112096132a8565b611214600182613286565b610b695760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a3610b676001826135b1565b60006112658484612df1565b805490915061ffff831690829060009061128690849063ffffffff166143d0565b82546101009290920a63ffffffff8181021990931691831602179091558254600160201b900416159050806112cb5750805463ffffffff600160201b82048116911611155b80156112e35750805462ffffff63ffffffff90911611155b6113395760405162461bcd60e51b815260206004820152602160248201527f546f6f206d616e792072657175657374656420666f72207468697320636c61696044820152606d60f81b60648201526084016108ad565b805461135d9065ffffffffffff600160601b8204811691600160901b90041661332d565b80546000906113779061ffff85169063ffffffff16614537565b6113829060016143d0565b60058301546003840154600485015463ffffffff9390931693506113b3926001600160a01b0392831692168661339a565b60008361ffff1667ffffffffffffffff8111156113d2576113d2613f3b565b6040519080825280602002602001820160405280156113fb578160200160208202803683370190505b50905060005b8461ffff16811015611469576114178184614408565b62ffffff1660188766ffffffffffffff16901b1766ffffffffffffff16828281518110611446576114466141dc565b69ffffffffffffffffffff90921660209283029190910190910152600101611401565b5060405163213c198760e11b81526001600160a01b03871690634278330e90611498903390859060040161441b565b6000604051808303816000875af11580156114b7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526114df919081019061447e565b5060405161ffff8516815285906001600160a01b038816907f74f5d3254dfa39a7b1217a27d5d9b3e061eafe11720eca1cf499da2dc1eb1259906020015b60405180910390a3505050505050565b604051630935e01b60e21b8152336004820152839081906001600160a01b038216906324d7806c90602401602060405180830381865afa158015611575573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061159991906141f2565b6115b55760405162461bcd60e51b81526004016108ad90614214565b6000841180156115cc575066ffffffffffffff8411155b61160d5760405162461bcd60e51b8152602060048201526012602482015271125b9d985b1a59081a5b9cdd185b98d9525960721b60448201526064016108ad565b6001600160a01b0385166000908152600560209081526040808320878452909152902054600160c01b900460ff16156116885760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c726561647920696e697469616c697a65640000000000000060448201526064016108ad565b6116986080840160608501614554565b65ffffffffffff1615806116d957506116b76080840160608501614554565b65ffffffffffff166116cf6060850160408601614554565b65ffffffffffff16105b6116f55760405162461bcd60e51b81526004016108ad9061456f565b600061170086611b9d565b604080516101a0810190915260008152909150602080820190611725908701876145cc565b63ffffffff16815260200185602001602081019061174391906145cc565b63ffffffff16815260200161175e6060870160408801614554565b65ffffffffffff16815260200161177b6080870160608801614554565b65ffffffffffff16815260ff831660208201526040016117a160a08701608088016145e7565b60038111156117b2576117b26139e9565b81526020016117c760c0870160a08801614602565b60018111156117d8576117d86139e9565b81526020016117ea60c087018761461d565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525060200161183160e087018761461d565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250610100860135602082015260400161188861014087016101208801613c8a565b6001600160a01b031681526020016118a861016087016101408801613c8a565b6001600160a01b03908116909152871660009081526005602090815260408083208984528252918290208351815492850151938501516060860151608087015160a088015160ff16600160c01b0260ff60c01b1965ffffffffffff928316600160901b021666ffffffffffffff60901b1992909316600160601b0265ffffffffffff60601b1963ffffffff958616600160401b021669ffffffffffffffffffff60401b19998616600160201b0267ffffffffffffffff1990991695909616949094179690961796909616929092171793909316929092171780825560c083015190829060ff60c81b1916600160c81b8360038111156119a9576119a96139e9565b021790555060e08201518154829060ff60d01b1916600160d01b8360018111156119d5576119d56139e9565b021790555061010082015160018201906119ef9082614664565b506101208201516002820190611a059082614664565b5061014082015160038201556101608201516004820180546001600160a01b03199081166001600160a01b039384161790915561018090930151600590920180549093169181169190911790915560405133815286918816907fd02727da4c6c6c111e00310108209a4de39f6817414df43ca1a10730d47c6a349060200161151d565b611a906132a8565b611a9a60006135c6565b565b60405163b4b5b48f60e01b81526004810182905260009081906001600160a01b0385169063b4b5b48f90602401602060405180830381865afa158015611ae6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0a9190614724565b6001600160a01b038516600090815260066020908152604080832066ffffffffffffff601886901c1680855290835281842088855290925290912054935090915082611b895760405162461bcd60e51b815260206004820152600e60248201526d2737902932b9b2b93b30ba34b7b760911b60448201526064016108ad565b611b94600184614524565b95945050505050565b600080826001600160a01b031663ffa1ad746040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611bfa575060408051601f3d908101601f19168201909252611bf7918101906143b7565b60015b611c06575060fc61060d565b60008111611c565760405162461bcd60e51b815260206004820152601c60248201527f556e737570706f7274656420636f6e74726163742076657273696f6e0000000060448201526064016108ad565b60ff811115611ca75760405162461bcd60e51b815260206004820152601c60248201527f556e737570706f7274656420636f6e74726163742076657273696f6e0000000060448201526064016108ad565b9392505050565b6000611cb86138f4565b60405163b4b5b48f60e01b8152600481018490526000906001600160a01b0386169063b4b5b48f90602401602060405180830381865afa158015611d00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d249190614724565b66ffffffffffffff601882901c1693509050611d408584612df1565b604080516101a081018252825463ffffffff8082168352600160201b820481166020840152600160401b8204169282019290925265ffffffffffff600160601b830481166060830152600160901b830416608082015260ff600160c01b8304811660a083015290929160c0840191600160c81b909104166003811115611dc857611dc86139e9565b6003811115611dd957611dd96139e9565b81528154602090910190600160d01b900460ff166001811115611dfe57611dfe6139e9565b6001811115611e0f57611e0f6139e9565b8152602001600182018054611e23906141a2565b80601f0160208091040260200160405190810160405280929190818152602001828054611e4f906141a2565b8015611e9c5780601f10611e7157610100808354040283529160200191611e9c565b820191906000526020600020905b815481529060010190602001808311611e7f57829003601f168201915b50505050508152602001600282018054611eb5906141a2565b80601f0160208091040260200160405190810160405280929190818152602001828054611ee1906141a2565b8015611f2e5780601f10611f0357610100808354040283529160200191611f2e565b820191906000526020600020905b815481529060010190602001808311611f1157829003601f168201915b50505091835250506003820154602082015260048201546001600160a01b03908116604083015260059092015490911660609091015292959294509192505050565b60405163b4b5b48f60e01b8152600481018290526000906001600160a01b0384169063b4b5b48f90602401602060405180830381865afa158015611fb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca79190614724565b6001600160a01b03831660009081526006602090815260408083208584528252808320848452909152902054806120465760405162461bcd60e51b815260206004820152600e60248201526d2737902932b9b2b93b30ba34b7b760911b60448201526064016108ad565b612051600182614524565b949350505050565b604051630935e01b60e21b8152336004820152839081906001600160a01b038216906324d7806c90602401602060405180830381865afa1580156120a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c591906141f2565b6120e15760405162461bcd60e51b81526004016108ad90614214565b6001600160a01b0385166000908152600560209081526040808320878452825280832081516101a081018352815463ffffffff8082168352600160201b8204811695830195909552600160401b81049094169281019290925265ffffffffffff600160601b840481166060840152600160901b840416608083015260ff600160c01b8404811660a08401529192909160c0840191600160c81b900416600381111561218e5761218e6139e9565b600381111561219f5761219f6139e9565b81528154602090910190600160d01b900460ff1660018111156121c4576121c46139e9565b60018111156121d5576121d56139e9565b81526020016001820180546121e9906141a2565b80601f0160208091040260200160405190810160405280929190818152602001828054612215906141a2565b80156122625780601f1061223757610100808354040283529160200191612262565b820191906000526020600020905b81548152906001019060200180831161224557829003601f168201915b5050505050815260200160028201805461227b906141a2565b80601f01602080910402602001604051908101604052809291908181526020018280546122a7906141a2565b80156122f45780601f106122c9576101008083540402835291602001916122f4565b820191906000526020600020905b8154815290600101906020018083116122d757829003601f168201915b50505091835250506003820154602082015260048201546001600160a01b03908116604083015260059092015490911660609091015260a081015190915060ff1660000361237c5760405162461bcd60e51b815260206004820152601560248201527410db185a5b481b9bdd081a5b9a5d1a585b1a5e9959605a1b60448201526064016108ad565b606084015165ffffffffffff1615806123ac5750836060015165ffffffffffff16846040015165ffffffffffff16105b6123c85760405162461bcd60e51b81526004016108ad9061456f565b8061018001516001600160a01b03168461014001516001600160a01b0316146124335760405162461bcd60e51b815260206004820152601b60248201527f43616e6e6f74206368616e6765207061796d656e7420746f6b656e000000000060448201526064016108ad565b835163ffffffff161580159061245457508351815163ffffffff9182169116115b1561246457805163ffffffff1684525b604051806101a00160405280826000015163ffffffff168152602001856000015163ffffffff168152602001856020015163ffffffff168152602001856040015165ffffffffffff168152602001856060015165ffffffffffff1681526020018260a0015160ff168152602001856080015160038111156124e7576124e76139e9565b81526020018560a001516001811115612502576125026139e9565b815260c08087015160208084019190915260e08801516040808501919091526101008901516060808601919091526101208a01516001600160a01b03908116608080880191909152610180890151821660a097880152908d166000908152600585528381208d8252855283902087518154958901519489015193890151928901519789015160ff16600160c01b0260ff60c01b1965ffffffffffff998a16600160901b021666ffffffffffffff60901b1999909416600160601b0265ffffffffffff60601b1963ffffffff968716600160401b021669ffffffffffffffffffff60401b19978716600160201b0267ffffffffffffffff199099169690931695909517969096179490941693909317919091179490941693909317178083559083015190829060ff60c81b1916600160c81b836003811115612645576126456139e9565b021790555060e08201518154829060ff60d01b1916600160d01b836001811115612671576126716139e9565b0217905550610100820151600182019061268b9082614664565b5061012082015160028201906126a19082614664565b5061014082015160038201556101608201516004820180546001600160a01b03199081166001600160a01b039384161790915561018090930151600590920180549093169181169190911790915560405186918816907f657336af9bb6c51d60c05491508d7d3026a24ee549d7a0af42e44c75bfaec47c90600090a3505050505050565b60405163b4b5b48f60e01b81526004810182905260009081906001600160a01b0385169063b4b5b48f90602401602060405180830381865afa15801561276f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127939190614724565b60181c66ffffffffffffff16949350505050565b60606127b16138f4565b60405163b4b5b48f60e01b81526004810184905260009081906001600160a01b0387169063b4b5b48f90602401602060405180830381865afa1580156127fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061281f9190614724565b905066ffffffffffffff601882901c1660008190036128805760405162461bcd60e51b815260206004820152601460248201527f546f6b656e20646f6573206e6f7420657869737400000000000000000000000060448201526064016108ad565b6001600160a01b038716600090815260056020908152604080832066ffffffffffffff8516845282529182902082516101a081018452815463ffffffff8082168352600160201b8204811694830194909452600160401b81049093169381019390935265ffffffffffff600160601b830481166060850152600160901b830416608084015260ff600160c01b8304811660a0850152909160c0840191600160c81b909104166003811115612936576129366139e9565b6003811115612947576129476139e9565b81528154602090910190600160d01b900460ff16600181111561296c5761296c6139e9565b600181111561297d5761297d6139e9565b8152602001600182018054612991906141a2565b80601f01602080910402602001604051908101604052809291908181526020018280546129bd906141a2565b8015612a0a5780601f106129df57610100808354040283529160200191612a0a565b820191906000526020600020905b8154815290600101906020018083116129ed57829003601f168201915b50505050508152602001600282018054612a23906141a2565b80601f0160208091040260200160405190810160405280929190818152602001828054612a4f906141a2565b8015612a9c5780601f10612a7157610100808354040283529160200191612a9c565b820191906000526020600020905b815481529060010190602001808311612a7f57829003601f168201915b5050509183525050600382810154602083015260048301546001600160a01b03908116604084015260059093015490921660609091015290945062ffffff831693508460c001516003811115612af457612af46139e9565b03612bb0576001600160a01b038716600090815260066020908152604080832066ffffffffffffff8516845282528083208984529091529020548015612b7b57610100850151612b4d612b48600184614524565b613616565b866101200151604051602001612b6593929190614750565b6040516020818303038152906040529550612baa565b846101000151856101200151604051602001612b98929190614793565b60405160208183030381529060405295505b50612c43565b60028460c001516003811115612bc857612bc86139e9565b03612c0a57836101000151612bdc84613616565b856101200151604051602001612bf493929190614750565b6040516020818303038152906040529450612c43565b836101000151612c1987613616565b856101200151604051602001612c3193929190614750565b60405160208183030381529060405294505b5050505092915050565b612c556132a8565b6001600160a01b038116612cba5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108ad565b610b69816135c6565b33612cd66000546001600160a01b031690565b6001600160a01b03161480612cf15750612cf1600133613286565b612d495760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b60648201526084016108ad565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612d96576040519150601f19603f3d011682016040523d82523d6000602084013e612d9b565b606091505b5050905080612dec5760405162461bcd60e51b815260206004820152601e60248201527f4661696c656420746f207472616e7366657220746f207265636569766572000060448201526064016108ad565b505050565b6001600160a01b0382166000908152600560209081526040808320848452909152812080549091600160c01b90910460ff16900361060d5760405162461bcd60e51b815260206004820152601560248201527410db185a5b481b9bdd081a5b9a5d1a585b1a5e9959605a1b60448201526064016108ad565b6001600160a01b0384166000818152600560209081526040808320878452909152908190209051630935e01b60e21b8152336004820152909186916324d7806c90602401602060405180830381865afa158015612eca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612eee91906141f2565b1515600003612fb3576040516331a9108f60e11b8152600481018590526001600160a01b03871690636352211e90602401602060405180830381865afa158015612f3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f6091906147d5565b6001600160a01b0316336001600160a01b031614612fb35760405162461bcd60e51b815260206004820152601060248201526f21b0b63632b9103737ba1037bbb732b960811b60448201526064016108ad565b60018254600160d01b900460ff166001811115612fd257612fd26139e9565b146130155760405162461bcd60e51b815260206004820152601360248201527214995cd95c9d985d1a5bdb9cc810db1bdcd959606a1b60448201526064016108ad565b8154600160201b900463ffffffff1684106130625760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2102a37b5b2b760991b60448201526064016108ad565b8154600160401b900463ffffffff1683106130b55760405162461bcd60e51b815260206004820152601360248201527224b73b30b634b21021b7b6b134b730ba34b7b760691b60448201526064016108ad565b60006130c361010085614808565b905060006130d36101008661481c565b6001600160a01b03891660009081526008602090815260408083208b84528252808320868452909152902054600190911b91508116156131555760405162461bcd60e51b815260206004820152601760248201527f436f6d62696e6174696f6e20556e617661696c61626c6500000000000000000060448201526064016108ad565b6001600160a01b03881660008181526008602090815260408083208b845282528083208684528252808320805486179055928252600681528282208a8352815282822089835290522054156131ec5760405162461bcd60e51b815260206004820152601560248201527f546f6b656e20486173205265736572766174696f6e000000000000000000000060448201526064016108ad565b6131f7856001614408565b6001600160a01b03891660008181526006602090815260408083208c845282528083208b8452825280832094909455828252600781528382208b83528152838220898352815290839020899055825189815290810188905289927f64f600a86b5c7099227559084a0329e97513a1d9ac08eef014a449d1aeb7d266910160405180910390a35050505050505050565b6001600160a01b03811660009081526001830160205260408120541515611ca7565b6000546001600160a01b03163314611a9a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108ad565b6000611ca7836001600160a01b0384166136a9565b600061060d825490565b6000611ca783836137a3565b428265ffffffffffff161115801561335d575065ffffffffffff8116158061335d5750428165ffffffffffff1610155b610b675760405162461bcd60e51b815260206004820152600e60248201526d436c61696d20696e61637469766560901b60448201526064016108ad565b60006001600160a01b03851615613488576001600160a01b0385166323b872dd33856133ca61ffff871689614830565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af115801561341e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061344291906141f2565b6134835760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b60448201526064016108ad565b61348b565b50825b60018261ffff1611156134a9576134a661ffff831682614830565b90505b803410156134ea5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b60448201526064016108ad565b6001600160a01b03851615801561350057508315155b156135aa576000836001600160a01b03163460405160006040518083038185875af1925050503d8060008114613552576040519150601f19603f3d011682016040523d82523d6000602084013e613557565b606091505b50509050806135a85760405162461bcd60e51b815260206004820152601e60248201527f4661696c656420746f207472616e7366657220746f207265636569766572000060448201526064016108ad565b505b5050505050565b6000611ca7836001600160a01b0384166137cd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606060006136238361381c565b600101905060008167ffffffffffffffff81111561364357613643613f3b565b6040519080825280601f01601f19166020018201604052801561366d576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461367757509392505050565b600081815260018301602052604081205480156137925760006136cd600183614524565b85549091506000906136e190600190614524565b9050818114613746576000866000018281548110613701576137016141dc565b9060005260206000200154905080876000018481548110613724576137246141dc565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061375757613757614847565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061060d565b600091505061060d565b5092915050565b60008260000182815481106137ba576137ba6141dc565b9060005260206000200154905092915050565b60008181526001830160205260408120546138145750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561060d565b50600061060d565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061385b5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310613887576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106138a557662386f26fc10000830492506010015b6305f5e10083106138bd576305f5e100830492506008015b61271083106138d157612710830492506004015b606483106138e3576064830492506002015b600a831061060d5760010192915050565b604080516101a081018252600080825260208201819052918101829052606081018290526080810182905260a081018290529060c082019081526020016000815260200160608152602001606081526020016000815260200160006001600160a01b0316815260200160006001600160a01b031681525090565b60006020828403121561398057600080fd5b81356001600160e01b031981168114611ca757600080fd5b6001600160a01b0381168114610b6957600080fd5b80356139b881613998565b919050565b600080604083850312156139d057600080fd5b82356139db81613998565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b60048110613a0f57613a0f6139e9565b9052565b60028110613a0f57613a0f6139e9565b60005b83811015613a3e578181015183820152602001613a26565b50506000910152565b60008151808452613a5f816020860160208601613a23565b601f01601f19169290920160200192915050565b805163ffffffff16825260006101a06020830151613a99602086018263ffffffff169052565b506040830151613ab1604086018263ffffffff169052565b506060830151613acb606086018265ffffffffffff169052565b506080830151613ae5608086018265ffffffffffff169052565b5060a0830151613afa60a086018260ff169052565b5060c0830151613b0d60c08601826139ff565b5060e0830151613b2060e0860182613a13565b50610100808401518282870152613b3983870182613a47565b925050506101208084015185830382870152613b558382613a47565b9250505061014080840151818601525061016080840151613b80828701826001600160a01b03169052565b5050610180928301516001600160a01b03169390920192909252919050565b602081526000611ca76020830184613a73565b60008083601f840112613bc457600080fd5b50813567ffffffffffffffff811115613bdc57600080fd5b6020830191508360208260051b8501011115613bf757600080fd5b9250929050565b60008060008060008060808789031215613c1757600080fd5b8635613c2281613998565b955060208701359450604087013567ffffffffffffffff80821115613c4657600080fd5b613c528a838b01613bb2565b90965094506060890135915080821115613c6b57600080fd5b50613c7889828a01613bb2565b979a9699509497509295939492505050565b600060208284031215613c9c57600080fd5b8135611ca781613998565b8035600481106139b857600080fd5b8035600281106139b857600080fd5b60008083601f840112613cd757600080fd5b50813567ffffffffffffffff811115613cef57600080fd5b602083019150836020828501011115613bf757600080fd5b60008060008060008060008060c0898b031215613d2357600080fd5b8835613d2e81613998565b975060208901359650613d4360408a01613ca7565b9550613d5160608a01613cb6565b9450608089013567ffffffffffffffff80821115613d6e57600080fd5b613d7a8c838d01613cc5565b909650945060a08b0135915080821115613d9357600080fd5b50613da08b828c01613cc5565b999c989b5096995094979396929594505050565b600080600060608486031215613dc957600080fd5b8335613dd481613998565b95602085013595506040909401359392505050565b60008060008060808587031215613dff57600080fd5b8435613e0a81613998565b966020860135965060408601359560600135945092505050565b6020808252825182820181905260009190848201906040850190845b81811015613e655783516001600160a01b031683529284019291840191600101613e40565b50909695505050505050565b803561ffff811681146139b857600080fd5b600080600060608486031215613e9857600080fd5b8335613ea381613998565b925060208401359150613eb860408501613e71565b90509250925092565b600080600060608486031215613ed657600080fd5b8335613ee181613998565b925060208401359150604084013567ffffffffffffffff811115613f0457600080fd5b84016101608187031215613f1757600080fd5b809150509250925092565b8281526040602082015260006120516040830184613a73565b634e487b7160e01b600052604160045260246000fd5b604051610160810167ffffffffffffffff81118282101715613f7557613f75613f3b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715613fa457613fa4613f3b565b604052919050565b803563ffffffff811681146139b857600080fd5b803565ffffffffffff811681146139b857600080fd5b600082601f830112613fe757600080fd5b813567ffffffffffffffff81111561400157614001613f3b565b614014601f8201601f1916602001613f7b565b81815284602083860101111561402957600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121561405b57600080fd5b833561406681613998565b925060208401359150604084013567ffffffffffffffff8082111561408a57600080fd5b90850190610160828803121561409f57600080fd5b6140a7613f51565b6140b083613fac565b81526140be60208401613fac565b60208201526140cf60408401613fc0565b60408201526140e060608401613fc0565b60608201526140f160808401613ca7565b608082015261410260a08401613cb6565b60a082015260c08301358281111561411957600080fd5b61412589828601613fd6565b60c08301525060e08301358281111561413d57600080fd5b61414989828601613fd6565b60e0830152506101008381013590820152610120915061416a8284016139ad565b82820152610140915061417e8284016139ad565b828201528093505050509250925092565b602081526000611ca76020830184613a47565b600181811c908216806141b657607f821691505b6020821081036141d657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561420457600080fd5b81518015158114611ca757600080fd5b6020808252602b908201527f57616c6c6574206973206e6f7420616e2061646d696e6973747261746f72206660408201526a1bdc8818dbdb9d1c9858dd60aa1b606082015260800190565b601f821115612dec57600081815260208120601f850160051c810160208610156142865750805b601f850160051c820191505b818110156135a857828155600101614292565b67ffffffffffffffff8311156142bd576142bd613f3b565b6142d1836142cb83546141a2565b8361425f565b6000601f84116001811461430557600085156142ed5750838201355b600019600387901b1c1916600186901b1783556135aa565b600083815260209020601f19861690835b828110156143365786850135825560209485019460019092019101614316565b50868210156143535760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052601160045260246000fd5b60006001820161438d5761438d614365565b5060010190565b600063ffffffff8083168181036143ad576143ad614365565b6001019392505050565b6000602082840312156143c957600080fd5b5051919050565b63ffffffff81811683821601908082111561379c5761379c614365565b6000602082840312156143ff57600080fd5b611ca782613e71565b8082018082111561060d5761060d614365565b6000604082016001600160a01b03851683526020604081850152818551808452606086019150828701935060005b8181101561447157845169ffffffffffffffffffff1683529383019391830191600101614449565b5090979650505050505050565b6000602080838503121561449157600080fd5b825167ffffffffffffffff808211156144a957600080fd5b818501915085601f8301126144bd57600080fd5b8151818111156144cf576144cf613f3b565b8060051b91506144e0848301613f7b565b81815291830184019184810190888411156144fa57600080fd5b938501935b83851015614518578451825293850193908501906144ff565b98975050505050505050565b8181038181111561060d5761060d614365565b63ffffffff82811682821603908082111561379c5761379c614365565b60006020828403121561456657600080fd5b611ca782613fc0565b60208082526036908201527f43616e6e6f74206861766520737461727444617465206772656174657220746860408201527f616e206f7220657175616c20746f20656e644461746500000000000000000000606082015260800190565b6000602082840312156145de57600080fd5b611ca782613fac565b6000602082840312156145f957600080fd5b611ca782613ca7565b60006020828403121561461457600080fd5b611ca782613cb6565b6000808335601e1984360301811261463457600080fd5b83018035915067ffffffffffffffff82111561464f57600080fd5b602001915036819003821315613bf757600080fd5b815167ffffffffffffffff81111561467e5761467e613f3b565b6146928161468c84546141a2565b8461425f565b602080601f8311600181146146c757600084156146af5750858301515b600019600386901b1c1916600185901b1785556135a8565b600085815260208120601f198616915b828110156146f6578886015182559484019460019091019084016146d7565b50858210156147145787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020828403121561473657600080fd5b815169ffffffffffffffffffff81168114611ca757600080fd5b60008451614762818460208901613a23565b845190830190614776818360208901613a23565b8451910190614789818360208801613a23565b0195945050505050565b600083516147a5818460208801613a23565b66191959985d5b1d60ca1b90830190815283516147c9816007840160208801613a23565b01600701949350505050565b6000602082840312156147e757600080fd5b8151611ca781613998565b634e487b7160e01b600052601260045260246000fd5b600082614817576148176147f2565b500490565b60008261482b5761482b6147f2565b500690565b808202811582820484141761060d5761060d614365565b634e487b7160e01b600052603160045260246000fdfea264697066735822122041908abfe4bd3a58208a46c28cb100212330f423984ae509c061681b7b78f29464736f6c63430008110033

Deployed Bytecode

0x6080604052600436106101a15760003560e01c806370613f12116100e15780639f292d761161008a578063cb67bf6411610064578063cb67bf64146104e6578063e9dc63751461051e578063f2fde38b1461054b578063f3fef3a31461056b57600080fd5b80639f292d761461046b578063b3654627146104a6578063b9b79053146104c657600080fd5b8063890e0eb7116100bb578063890e0eb7146103e3578063895696f2146104155780638da5cb5b1461044357600080fd5b806370613f121461038e578063715018a6146103ae578063782e1ad9146103c357600080fd5b80632a92b01f1161014e57806340c10f191161012857806340c10f19146103285780635f2f51291461033b5780636d73e6691461035b5780636d9bd03e1461037b57600080fd5b80632a92b01f146102c65780632d345670146102e657806331ae450b1461030657600080fd5b806324d7806c1161017f57806324d7806c1461022a57806324f68ea81461024a578063259e4a981461026a57600080fd5b806301ffc9a7146101a65780630f79ab39146101db5780631f28e87e14610208575b600080fd5b3480156101b257600080fd5b506101c66101c136600461396e565b61058b565b60405190151581526020015b60405180910390f35b3480156101e757600080fd5b506101fb6101f63660046139bd565b610613565b6040516101d29190613b9f565b34801561021457600080fd5b50610228610223366004613bfe565b610850565b005b34801561023657600080fd5b506101c6610245366004613c8a565b61090e565b34801561025657600080fd5b50610228610265366004613d07565b610947565b34801561027657600080fd5b506102b8610285366004613db4565b6001600160a01b038316600090815260086020908152604080832085845282528083208484529091529020549392505050565b6040519081526020016101d2565b3480156102d257600080fd5b506102286102e1366004613de9565b610afc565b3480156102f257600080fd5b50610228610301366004613c8a565b610b0e565b34801561031257600080fd5b5061031b610b6c565b6040516101d29190613e24565b6102286103363660046139bd565b610c1b565b34801561034757600080fd5b50610228610356366004613bfe565b610e12565b34801561036757600080fd5b50610228610376366004613c8a565b611201565b610228610389366004613e83565b611259565b34801561039a57600080fd5b506102286103a9366004613ec1565b61152d565b3480156103ba57600080fd5b50610228611a88565b3480156103cf57600080fd5b506102b86103de3660046139bd565b611a9c565b3480156103ef57600080fd5b506104036103fe366004613c8a565b611b9d565b60405160ff90911681526020016101d2565b34801561042157600080fd5b506104356104303660046139bd565b611cae565b6040516101d2929190613f22565b34801561044f57600080fd5b506000546040516001600160a01b0390911681526020016101d2565b34801561047757600080fd5b5061048b6104863660046139bd565b611f70565b60405169ffffffffffffffffffff90911681526020016101d2565b3480156104b257600080fd5b506102b86104c1366004613db4565b611fdc565b3480156104d257600080fd5b506102286104e1366004614046565b612059565b3480156104f257600080fd5b506105066105013660046139bd565b612725565b60405166ffffffffffffff90911681526020016101d2565b34801561052a57600080fd5b5061053e6105393660046139bd565b6127a7565b6040516101d2919061418f565b34801561055757600080fd5b50610228610566366004613c8a565b612c4d565b34801561057757600080fd5b506102286105863660046139bd565b612cc3565b60006001600160e01b031982166334204d0b60e01b14806105bc57506001600160e01b031982166337a90b2160e21b145b806105d757506001600160e01b0319821663e9dc637560e01b145b806105f257506001600160e01b03198216632a9f3abf60e11b145b8061060d57506001600160e01b031982166301ffc9a760e01b145b92915050565b61061b6138f4565b6106258383612df1565b604080516101a081018252825463ffffffff8082168352600160201b820481166020840152600160401b8204169282019290925265ffffffffffff600160601b830481166060830152600160901b830416608082015260ff600160c01b8304811660a083015290929160c0840191600160c81b9091041660038111156106ad576106ad6139e9565b60038111156106be576106be6139e9565b81528154602090910190600160d01b900460ff1660018111156106e3576106e36139e9565b60018111156106f4576106f46139e9565b8152602001600182018054610708906141a2565b80601f0160208091040260200160405190810160405280929190818152602001828054610734906141a2565b80156107815780601f1061075657610100808354040283529160200191610781565b820191906000526020600020905b81548152906001019060200180831161076457829003601f168201915b5050505050815260200160028201805461079a906141a2565b80601f01602080910402602001604051908101604052809291908181526020018280546107c6906141a2565b80156108135780601f106107e857610100808354040283529160200191610813565b820191906000526020600020905b8154815290600101906020018083116107f657829003601f168201915b50505091835250506003820154602082015260048201546001600160a01b0390811660408301526005909201549091166060909101529392505050565b8281146108b65760405162461bcd60e51b815260206004820152602960248201527f556e657175616c206e756d626572206f6620746f6b656e7320616e6420636f6d60448201526862696e6174696f6e7360b81b60648201526084015b60405180910390fd5b60005b83811015610905576108fd87878787858181106108d8576108d86141dc565b905060200201358686868181106108f1576108f16141dc565b90506020020135612e69565b6001016108b9565b50505050505050565b6000816001600160a01b031661092c6000546001600160a01b031690565b6001600160a01b0316148061060d575061060d600183613286565b604051630935e01b60e21b8152336004820152889081906001600160a01b038216906324d7806c90602401602060405180830381865afa15801561098f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b391906141f2565b6109cf5760405162461bcd60e51b81526004016108ad90614214565b6001600160a01b038a1660009081526005602090815260408083208c8452909152812080549091600160c01b90910460ff169003610a475760405162461bcd60e51b815260206004820152601560248201527410db185a5b481b9bdd081a5b9a5d1a585b1a5e9959605a1b60448201526064016108ad565b80548990829060ff60c81b1916600160c81b836003811115610a6b57610a6b6139e9565b021790555080548890829060ff60d01b1916600160d01b836001811115610a9457610a946139e9565b021790555060018101610aa88789836142a5565b5060028101610ab88587836142a5565b506040518a906001600160a01b038d16907f657336af9bb6c51d60c05491508d7d3026a24ee549d7a0af42e44c75bfaec47c90600090a35050505050505050505050565b610b0884848484612e69565b50505050565b610b166132a8565b610b21600182613286565b15610b695760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a3610b67600182613302565b505b50565b6060610b786001613317565b67ffffffffffffffff811115610b9057610b90613f3b565b604051908082528060200260200182016040528015610bb9578160200160208202803683370190505b50905060005b610bc96001613317565b811015610c1757610bdb600182613321565b828281518110610bed57610bed6141dc565b6001600160a01b039092166020928302919091019091015280610c0f8161437b565b915050610bbf565b5090565b6000610c278383612df1565b805490915063ffffffff600160201b82048116918391600091610c4a9116614394565b91906101000a81548163ffffffff021916908363ffffffff160217905563ffffffff16111580610c8657508054600160201b900463ffffffff16155b8015610c9e5750805462ffffff63ffffffff90911611155b610cff5760405162461bcd60e51b815260206004820152602c60248201527f4d6178696d756d20746f6b656e7320616c7265616479206d696e74656420666f60448201526b72207468697320636c61696d60a01b60648201526084016108ad565b8054610d239065ffffffffffff600160601b8204811691600160901b90041661332d565b600581015460038201546004830154610d4b926001600160a01b03908116929116600161339a565b805460405163d397371960e01b815233600482015262ffffff909116601884901b66ffffffff000000161760248201819052906001600160a01b0385169063d3973719906044016020604051808303816000875af1158015610db1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd591906143b7565b5060405183906001600160a01b038616907f5d404f369772cfab2b65717fca9bc2077efeab89a0dbec036bf0c13783154eb190600090a350505050565b604051630935e01b60e21b8152336004820152869081906001600160a01b038216906324d7806c90602401602060405180830381865afa158015610e5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7e91906141f2565b610e9a5760405162461bcd60e51b81526004016108ad90614214565b848314610efa5760405162461bcd60e51b815260206004820152602860248201527f556e657175616c206e756d626572206f6620726563697069656e747320616e6460448201526720616d6f756e747360c01b60648201526084016108ad565b6001600160a01b03881660009081526005602090815260408083208a845290915281208054909190610f339063ffffffff1660016143d0565b63ffffffff16905060005b878110156110d6576000878783818110610f5a57610f5a6141dc565b9050602002016020810190610f6f91906143ed565b905060008161ffff1667ffffffffffffffff811115610f9057610f90613f3b565b604051908082528060200260200182016040528015610fb9578160200160208202803683370190505b50905060005b8261ffff1681101561102757610fd58186614408565b62ffffff1660188e66ffffffffffffff16901b1766ffffffffffffff16828281518110611004576110046141dc565b69ffffffffffffffffffff90921660209283029190910190910152600101610fbf565b508c6001600160a01b0316634278330e8c8c86818110611049576110496141dc565b905060200201602081019061105e9190613c8a565b836040518363ffffffff1660e01b815260040161107c92919061441b565b6000604051808303816000875af115801561109b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110c3919081019061447e565b505061ffff169190910190600101610f3e565b50815462ffffff906001906110f19063ffffffff1684614524565b6110fb9190614524565b111561113e5760405162461bcd60e51b8152602060048201526012602482015271151bdbc81b585b9e481c995c5d595cdd195960721b60448201526064016108ad565b81546001906111539063ffffffff1683614524565b61115d9190614524565b8254839060009061117590849063ffffffff166143d0565b82546101009290920a63ffffffff8181021990931691831602179091558354600160201b9004161590506111f557815463ffffffff600160201b82048116911611156111f55760405162461bcd60e51b815260206004820152600f60248201526e0a4cae2eacae6e8cac8407c409ac2f608b1b60448201526064016108ad565b50505050505050505050565b6112096132a8565b611214600182613286565b610b695760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a3610b676001826135b1565b60006112658484612df1565b805490915061ffff831690829060009061128690849063ffffffff166143d0565b82546101009290920a63ffffffff8181021990931691831602179091558254600160201b900416159050806112cb5750805463ffffffff600160201b82048116911611155b80156112e35750805462ffffff63ffffffff90911611155b6113395760405162461bcd60e51b815260206004820152602160248201527f546f6f206d616e792072657175657374656420666f72207468697320636c61696044820152606d60f81b60648201526084016108ad565b805461135d9065ffffffffffff600160601b8204811691600160901b90041661332d565b80546000906113779061ffff85169063ffffffff16614537565b6113829060016143d0565b60058301546003840154600485015463ffffffff9390931693506113b3926001600160a01b0392831692168661339a565b60008361ffff1667ffffffffffffffff8111156113d2576113d2613f3b565b6040519080825280602002602001820160405280156113fb578160200160208202803683370190505b50905060005b8461ffff16811015611469576114178184614408565b62ffffff1660188766ffffffffffffff16901b1766ffffffffffffff16828281518110611446576114466141dc565b69ffffffffffffffffffff90921660209283029190910190910152600101611401565b5060405163213c198760e11b81526001600160a01b03871690634278330e90611498903390859060040161441b565b6000604051808303816000875af11580156114b7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526114df919081019061447e565b5060405161ffff8516815285906001600160a01b038816907f74f5d3254dfa39a7b1217a27d5d9b3e061eafe11720eca1cf499da2dc1eb1259906020015b60405180910390a3505050505050565b604051630935e01b60e21b8152336004820152839081906001600160a01b038216906324d7806c90602401602060405180830381865afa158015611575573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061159991906141f2565b6115b55760405162461bcd60e51b81526004016108ad90614214565b6000841180156115cc575066ffffffffffffff8411155b61160d5760405162461bcd60e51b8152602060048201526012602482015271125b9d985b1a59081a5b9cdd185b98d9525960721b60448201526064016108ad565b6001600160a01b0385166000908152600560209081526040808320878452909152902054600160c01b900460ff16156116885760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c726561647920696e697469616c697a65640000000000000060448201526064016108ad565b6116986080840160608501614554565b65ffffffffffff1615806116d957506116b76080840160608501614554565b65ffffffffffff166116cf6060850160408601614554565b65ffffffffffff16105b6116f55760405162461bcd60e51b81526004016108ad9061456f565b600061170086611b9d565b604080516101a0810190915260008152909150602080820190611725908701876145cc565b63ffffffff16815260200185602001602081019061174391906145cc565b63ffffffff16815260200161175e6060870160408801614554565b65ffffffffffff16815260200161177b6080870160608801614554565b65ffffffffffff16815260ff831660208201526040016117a160a08701608088016145e7565b60038111156117b2576117b26139e9565b81526020016117c760c0870160a08801614602565b60018111156117d8576117d86139e9565b81526020016117ea60c087018761461d565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525060200161183160e087018761461d565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250610100860135602082015260400161188861014087016101208801613c8a565b6001600160a01b031681526020016118a861016087016101408801613c8a565b6001600160a01b03908116909152871660009081526005602090815260408083208984528252918290208351815492850151938501516060860151608087015160a088015160ff16600160c01b0260ff60c01b1965ffffffffffff928316600160901b021666ffffffffffffff60901b1992909316600160601b0265ffffffffffff60601b1963ffffffff958616600160401b021669ffffffffffffffffffff60401b19998616600160201b0267ffffffffffffffff1990991695909616949094179690961796909616929092171793909316929092171780825560c083015190829060ff60c81b1916600160c81b8360038111156119a9576119a96139e9565b021790555060e08201518154829060ff60d01b1916600160d01b8360018111156119d5576119d56139e9565b021790555061010082015160018201906119ef9082614664565b506101208201516002820190611a059082614664565b5061014082015160038201556101608201516004820180546001600160a01b03199081166001600160a01b039384161790915561018090930151600590920180549093169181169190911790915560405133815286918816907fd02727da4c6c6c111e00310108209a4de39f6817414df43ca1a10730d47c6a349060200161151d565b611a906132a8565b611a9a60006135c6565b565b60405163b4b5b48f60e01b81526004810182905260009081906001600160a01b0385169063b4b5b48f90602401602060405180830381865afa158015611ae6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0a9190614724565b6001600160a01b038516600090815260066020908152604080832066ffffffffffffff601886901c1680855290835281842088855290925290912054935090915082611b895760405162461bcd60e51b815260206004820152600e60248201526d2737902932b9b2b93b30ba34b7b760911b60448201526064016108ad565b611b94600184614524565b95945050505050565b600080826001600160a01b031663ffa1ad746040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611bfa575060408051601f3d908101601f19168201909252611bf7918101906143b7565b60015b611c06575060fc61060d565b60008111611c565760405162461bcd60e51b815260206004820152601c60248201527f556e737570706f7274656420636f6e74726163742076657273696f6e0000000060448201526064016108ad565b60ff811115611ca75760405162461bcd60e51b815260206004820152601c60248201527f556e737570706f7274656420636f6e74726163742076657273696f6e0000000060448201526064016108ad565b9392505050565b6000611cb86138f4565b60405163b4b5b48f60e01b8152600481018490526000906001600160a01b0386169063b4b5b48f90602401602060405180830381865afa158015611d00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d249190614724565b66ffffffffffffff601882901c1693509050611d408584612df1565b604080516101a081018252825463ffffffff8082168352600160201b820481166020840152600160401b8204169282019290925265ffffffffffff600160601b830481166060830152600160901b830416608082015260ff600160c01b8304811660a083015290929160c0840191600160c81b909104166003811115611dc857611dc86139e9565b6003811115611dd957611dd96139e9565b81528154602090910190600160d01b900460ff166001811115611dfe57611dfe6139e9565b6001811115611e0f57611e0f6139e9565b8152602001600182018054611e23906141a2565b80601f0160208091040260200160405190810160405280929190818152602001828054611e4f906141a2565b8015611e9c5780601f10611e7157610100808354040283529160200191611e9c565b820191906000526020600020905b815481529060010190602001808311611e7f57829003601f168201915b50505050508152602001600282018054611eb5906141a2565b80601f0160208091040260200160405190810160405280929190818152602001828054611ee1906141a2565b8015611f2e5780601f10611f0357610100808354040283529160200191611f2e565b820191906000526020600020905b815481529060010190602001808311611f1157829003601f168201915b50505091835250506003820154602082015260048201546001600160a01b03908116604083015260059092015490911660609091015292959294509192505050565b60405163b4b5b48f60e01b8152600481018290526000906001600160a01b0384169063b4b5b48f90602401602060405180830381865afa158015611fb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca79190614724565b6001600160a01b03831660009081526006602090815260408083208584528252808320848452909152902054806120465760405162461bcd60e51b815260206004820152600e60248201526d2737902932b9b2b93b30ba34b7b760911b60448201526064016108ad565b612051600182614524565b949350505050565b604051630935e01b60e21b8152336004820152839081906001600160a01b038216906324d7806c90602401602060405180830381865afa1580156120a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c591906141f2565b6120e15760405162461bcd60e51b81526004016108ad90614214565b6001600160a01b0385166000908152600560209081526040808320878452825280832081516101a081018352815463ffffffff8082168352600160201b8204811695830195909552600160401b81049094169281019290925265ffffffffffff600160601b840481166060840152600160901b840416608083015260ff600160c01b8404811660a08401529192909160c0840191600160c81b900416600381111561218e5761218e6139e9565b600381111561219f5761219f6139e9565b81528154602090910190600160d01b900460ff1660018111156121c4576121c46139e9565b60018111156121d5576121d56139e9565b81526020016001820180546121e9906141a2565b80601f0160208091040260200160405190810160405280929190818152602001828054612215906141a2565b80156122625780601f1061223757610100808354040283529160200191612262565b820191906000526020600020905b81548152906001019060200180831161224557829003601f168201915b5050505050815260200160028201805461227b906141a2565b80601f01602080910402602001604051908101604052809291908181526020018280546122a7906141a2565b80156122f45780601f106122c9576101008083540402835291602001916122f4565b820191906000526020600020905b8154815290600101906020018083116122d757829003601f168201915b50505091835250506003820154602082015260048201546001600160a01b03908116604083015260059092015490911660609091015260a081015190915060ff1660000361237c5760405162461bcd60e51b815260206004820152601560248201527410db185a5b481b9bdd081a5b9a5d1a585b1a5e9959605a1b60448201526064016108ad565b606084015165ffffffffffff1615806123ac5750836060015165ffffffffffff16846040015165ffffffffffff16105b6123c85760405162461bcd60e51b81526004016108ad9061456f565b8061018001516001600160a01b03168461014001516001600160a01b0316146124335760405162461bcd60e51b815260206004820152601b60248201527f43616e6e6f74206368616e6765207061796d656e7420746f6b656e000000000060448201526064016108ad565b835163ffffffff161580159061245457508351815163ffffffff9182169116115b1561246457805163ffffffff1684525b604051806101a00160405280826000015163ffffffff168152602001856000015163ffffffff168152602001856020015163ffffffff168152602001856040015165ffffffffffff168152602001856060015165ffffffffffff1681526020018260a0015160ff168152602001856080015160038111156124e7576124e76139e9565b81526020018560a001516001811115612502576125026139e9565b815260c08087015160208084019190915260e08801516040808501919091526101008901516060808601919091526101208a01516001600160a01b03908116608080880191909152610180890151821660a097880152908d166000908152600585528381208d8252855283902087518154958901519489015193890151928901519789015160ff16600160c01b0260ff60c01b1965ffffffffffff998a16600160901b021666ffffffffffffff60901b1999909416600160601b0265ffffffffffff60601b1963ffffffff968716600160401b021669ffffffffffffffffffff60401b19978716600160201b0267ffffffffffffffff199099169690931695909517969096179490941693909317919091179490941693909317178083559083015190829060ff60c81b1916600160c81b836003811115612645576126456139e9565b021790555060e08201518154829060ff60d01b1916600160d01b836001811115612671576126716139e9565b0217905550610100820151600182019061268b9082614664565b5061012082015160028201906126a19082614664565b5061014082015160038201556101608201516004820180546001600160a01b03199081166001600160a01b039384161790915561018090930151600590920180549093169181169190911790915560405186918816907f657336af9bb6c51d60c05491508d7d3026a24ee549d7a0af42e44c75bfaec47c90600090a3505050505050565b60405163b4b5b48f60e01b81526004810182905260009081906001600160a01b0385169063b4b5b48f90602401602060405180830381865afa15801561276f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127939190614724565b60181c66ffffffffffffff16949350505050565b60606127b16138f4565b60405163b4b5b48f60e01b81526004810184905260009081906001600160a01b0387169063b4b5b48f90602401602060405180830381865afa1580156127fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061281f9190614724565b905066ffffffffffffff601882901c1660008190036128805760405162461bcd60e51b815260206004820152601460248201527f546f6b656e20646f6573206e6f7420657869737400000000000000000000000060448201526064016108ad565b6001600160a01b038716600090815260056020908152604080832066ffffffffffffff8516845282529182902082516101a081018452815463ffffffff8082168352600160201b8204811694830194909452600160401b81049093169381019390935265ffffffffffff600160601b830481166060850152600160901b830416608084015260ff600160c01b8304811660a0850152909160c0840191600160c81b909104166003811115612936576129366139e9565b6003811115612947576129476139e9565b81528154602090910190600160d01b900460ff16600181111561296c5761296c6139e9565b600181111561297d5761297d6139e9565b8152602001600182018054612991906141a2565b80601f01602080910402602001604051908101604052809291908181526020018280546129bd906141a2565b8015612a0a5780601f106129df57610100808354040283529160200191612a0a565b820191906000526020600020905b8154815290600101906020018083116129ed57829003601f168201915b50505050508152602001600282018054612a23906141a2565b80601f0160208091040260200160405190810160405280929190818152602001828054612a4f906141a2565b8015612a9c5780601f10612a7157610100808354040283529160200191612a9c565b820191906000526020600020905b815481529060010190602001808311612a7f57829003601f168201915b5050509183525050600382810154602083015260048301546001600160a01b03908116604084015260059093015490921660609091015290945062ffffff831693508460c001516003811115612af457612af46139e9565b03612bb0576001600160a01b038716600090815260066020908152604080832066ffffffffffffff8516845282528083208984529091529020548015612b7b57610100850151612b4d612b48600184614524565b613616565b866101200151604051602001612b6593929190614750565b6040516020818303038152906040529550612baa565b846101000151856101200151604051602001612b98929190614793565b60405160208183030381529060405295505b50612c43565b60028460c001516003811115612bc857612bc86139e9565b03612c0a57836101000151612bdc84613616565b856101200151604051602001612bf493929190614750565b6040516020818303038152906040529450612c43565b836101000151612c1987613616565b856101200151604051602001612c3193929190614750565b60405160208183030381529060405294505b5050505092915050565b612c556132a8565b6001600160a01b038116612cba5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108ad565b610b69816135c6565b33612cd66000546001600160a01b031690565b6001600160a01b03161480612cf15750612cf1600133613286565b612d495760405162461bcd60e51b8152602060048201526024808201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616044820152633236b4b760e11b60648201526084016108ad565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612d96576040519150601f19603f3d011682016040523d82523d6000602084013e612d9b565b606091505b5050905080612dec5760405162461bcd60e51b815260206004820152601e60248201527f4661696c656420746f207472616e7366657220746f207265636569766572000060448201526064016108ad565b505050565b6001600160a01b0382166000908152600560209081526040808320848452909152812080549091600160c01b90910460ff16900361060d5760405162461bcd60e51b815260206004820152601560248201527410db185a5b481b9bdd081a5b9a5d1a585b1a5e9959605a1b60448201526064016108ad565b6001600160a01b0384166000818152600560209081526040808320878452909152908190209051630935e01b60e21b8152336004820152909186916324d7806c90602401602060405180830381865afa158015612eca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612eee91906141f2565b1515600003612fb3576040516331a9108f60e11b8152600481018590526001600160a01b03871690636352211e90602401602060405180830381865afa158015612f3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f6091906147d5565b6001600160a01b0316336001600160a01b031614612fb35760405162461bcd60e51b815260206004820152601060248201526f21b0b63632b9103737ba1037bbb732b960811b60448201526064016108ad565b60018254600160d01b900460ff166001811115612fd257612fd26139e9565b146130155760405162461bcd60e51b815260206004820152601360248201527214995cd95c9d985d1a5bdb9cc810db1bdcd959606a1b60448201526064016108ad565b8154600160201b900463ffffffff1684106130625760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2102a37b5b2b760991b60448201526064016108ad565b8154600160401b900463ffffffff1683106130b55760405162461bcd60e51b815260206004820152601360248201527224b73b30b634b21021b7b6b134b730ba34b7b760691b60448201526064016108ad565b60006130c361010085614808565b905060006130d36101008661481c565b6001600160a01b03891660009081526008602090815260408083208b84528252808320868452909152902054600190911b91508116156131555760405162461bcd60e51b815260206004820152601760248201527f436f6d62696e6174696f6e20556e617661696c61626c6500000000000000000060448201526064016108ad565b6001600160a01b03881660008181526008602090815260408083208b845282528083208684528252808320805486179055928252600681528282208a8352815282822089835290522054156131ec5760405162461bcd60e51b815260206004820152601560248201527f546f6b656e20486173205265736572766174696f6e000000000000000000000060448201526064016108ad565b6131f7856001614408565b6001600160a01b03891660008181526006602090815260408083208c845282528083208b8452825280832094909455828252600781528382208b83528152838220898352815290839020899055825189815290810188905289927f64f600a86b5c7099227559084a0329e97513a1d9ac08eef014a449d1aeb7d266910160405180910390a35050505050505050565b6001600160a01b03811660009081526001830160205260408120541515611ca7565b6000546001600160a01b03163314611a9a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108ad565b6000611ca7836001600160a01b0384166136a9565b600061060d825490565b6000611ca783836137a3565b428265ffffffffffff161115801561335d575065ffffffffffff8116158061335d5750428165ffffffffffff1610155b610b675760405162461bcd60e51b815260206004820152600e60248201526d436c61696d20696e61637469766560901b60448201526064016108ad565b60006001600160a01b03851615613488576001600160a01b0385166323b872dd33856133ca61ffff871689614830565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af115801561341e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061344291906141f2565b6134835760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b60448201526064016108ad565b61348b565b50825b60018261ffff1611156134a9576134a661ffff831682614830565b90505b803410156134ea5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b60448201526064016108ad565b6001600160a01b03851615801561350057508315155b156135aa576000836001600160a01b03163460405160006040518083038185875af1925050503d8060008114613552576040519150601f19603f3d011682016040523d82523d6000602084013e613557565b606091505b50509050806135a85760405162461bcd60e51b815260206004820152601e60248201527f4661696c656420746f207472616e7366657220746f207265636569766572000060448201526064016108ad565b505b5050505050565b6000611ca7836001600160a01b0384166137cd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606060006136238361381c565b600101905060008167ffffffffffffffff81111561364357613643613f3b565b6040519080825280601f01601f19166020018201604052801561366d576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461367757509392505050565b600081815260018301602052604081205480156137925760006136cd600183614524565b85549091506000906136e190600190614524565b9050818114613746576000866000018281548110613701576137016141dc565b9060005260206000200154905080876000018481548110613724576137246141dc565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061375757613757614847565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061060d565b600091505061060d565b5092915050565b60008260000182815481106137ba576137ba6141dc565b9060005260206000200154905092915050565b60008181526001830160205260408120546138145750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561060d565b50600061060d565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061385b5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310613887576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106138a557662386f26fc10000830492506010015b6305f5e10083106138bd576305f5e100830492506008015b61271083106138d157612710830492506004015b606483106138e3576064830492506002015b600a831061060d5760010192915050565b604080516101a081018252600080825260208201819052918101829052606081018290526080810182905260a081018290529060c082019081526020016000815260200160608152602001606081526020016000815260200160006001600160a01b0316815260200160006001600160a01b031681525090565b60006020828403121561398057600080fd5b81356001600160e01b031981168114611ca757600080fd5b6001600160a01b0381168114610b6957600080fd5b80356139b881613998565b919050565b600080604083850312156139d057600080fd5b82356139db81613998565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b60048110613a0f57613a0f6139e9565b9052565b60028110613a0f57613a0f6139e9565b60005b83811015613a3e578181015183820152602001613a26565b50506000910152565b60008151808452613a5f816020860160208601613a23565b601f01601f19169290920160200192915050565b805163ffffffff16825260006101a06020830151613a99602086018263ffffffff169052565b506040830151613ab1604086018263ffffffff169052565b506060830151613acb606086018265ffffffffffff169052565b506080830151613ae5608086018265ffffffffffff169052565b5060a0830151613afa60a086018260ff169052565b5060c0830151613b0d60c08601826139ff565b5060e0830151613b2060e0860182613a13565b50610100808401518282870152613b3983870182613a47565b925050506101208084015185830382870152613b558382613a47565b9250505061014080840151818601525061016080840151613b80828701826001600160a01b03169052565b5050610180928301516001600160a01b03169390920192909252919050565b602081526000611ca76020830184613a73565b60008083601f840112613bc457600080fd5b50813567ffffffffffffffff811115613bdc57600080fd5b6020830191508360208260051b8501011115613bf757600080fd5b9250929050565b60008060008060008060808789031215613c1757600080fd5b8635613c2281613998565b955060208701359450604087013567ffffffffffffffff80821115613c4657600080fd5b613c528a838b01613bb2565b90965094506060890135915080821115613c6b57600080fd5b50613c7889828a01613bb2565b979a9699509497509295939492505050565b600060208284031215613c9c57600080fd5b8135611ca781613998565b8035600481106139b857600080fd5b8035600281106139b857600080fd5b60008083601f840112613cd757600080fd5b50813567ffffffffffffffff811115613cef57600080fd5b602083019150836020828501011115613bf757600080fd5b60008060008060008060008060c0898b031215613d2357600080fd5b8835613d2e81613998565b975060208901359650613d4360408a01613ca7565b9550613d5160608a01613cb6565b9450608089013567ffffffffffffffff80821115613d6e57600080fd5b613d7a8c838d01613cc5565b909650945060a08b0135915080821115613d9357600080fd5b50613da08b828c01613cc5565b999c989b5096995094979396929594505050565b600080600060608486031215613dc957600080fd5b8335613dd481613998565b95602085013595506040909401359392505050565b60008060008060808587031215613dff57600080fd5b8435613e0a81613998565b966020860135965060408601359560600135945092505050565b6020808252825182820181905260009190848201906040850190845b81811015613e655783516001600160a01b031683529284019291840191600101613e40565b50909695505050505050565b803561ffff811681146139b857600080fd5b600080600060608486031215613e9857600080fd5b8335613ea381613998565b925060208401359150613eb860408501613e71565b90509250925092565b600080600060608486031215613ed657600080fd5b8335613ee181613998565b925060208401359150604084013567ffffffffffffffff811115613f0457600080fd5b84016101608187031215613f1757600080fd5b809150509250925092565b8281526040602082015260006120516040830184613a73565b634e487b7160e01b600052604160045260246000fd5b604051610160810167ffffffffffffffff81118282101715613f7557613f75613f3b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715613fa457613fa4613f3b565b604052919050565b803563ffffffff811681146139b857600080fd5b803565ffffffffffff811681146139b857600080fd5b600082601f830112613fe757600080fd5b813567ffffffffffffffff81111561400157614001613f3b565b614014601f8201601f1916602001613f7b565b81815284602083860101111561402957600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121561405b57600080fd5b833561406681613998565b925060208401359150604084013567ffffffffffffffff8082111561408a57600080fd5b90850190610160828803121561409f57600080fd5b6140a7613f51565b6140b083613fac565b81526140be60208401613fac565b60208201526140cf60408401613fc0565b60408201526140e060608401613fc0565b60608201526140f160808401613ca7565b608082015261410260a08401613cb6565b60a082015260c08301358281111561411957600080fd5b61412589828601613fd6565b60c08301525060e08301358281111561413d57600080fd5b61414989828601613fd6565b60e0830152506101008381013590820152610120915061416a8284016139ad565b82820152610140915061417e8284016139ad565b828201528093505050509250925092565b602081526000611ca76020830184613a47565b600181811c908216806141b657607f821691505b6020821081036141d657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561420457600080fd5b81518015158114611ca757600080fd5b6020808252602b908201527f57616c6c6574206973206e6f7420616e2061646d696e6973747261746f72206660408201526a1bdc8818dbdb9d1c9858dd60aa1b606082015260800190565b601f821115612dec57600081815260208120601f850160051c810160208610156142865750805b601f850160051c820191505b818110156135a857828155600101614292565b67ffffffffffffffff8311156142bd576142bd613f3b565b6142d1836142cb83546141a2565b8361425f565b6000601f84116001811461430557600085156142ed5750838201355b600019600387901b1c1916600186901b1783556135aa565b600083815260209020601f19861690835b828110156143365786850135825560209485019460019092019101614316565b50868210156143535760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052601160045260246000fd5b60006001820161438d5761438d614365565b5060010190565b600063ffffffff8083168181036143ad576143ad614365565b6001019392505050565b6000602082840312156143c957600080fd5b5051919050565b63ffffffff81811683821601908082111561379c5761379c614365565b6000602082840312156143ff57600080fd5b611ca782613e71565b8082018082111561060d5761060d614365565b6000604082016001600160a01b03851683526020604081850152818551808452606086019150828701935060005b8181101561447157845169ffffffffffffffffffff1683529383019391830191600101614449565b5090979650505050505050565b6000602080838503121561449157600080fd5b825167ffffffffffffffff808211156144a957600080fd5b818501915085601f8301126144bd57600080fd5b8151818111156144cf576144cf613f3b565b8060051b91506144e0848301613f7b565b81815291830184019184810190888411156144fa57600080fd5b938501935b83851015614518578451825293850193908501906144ff565b98975050505050505050565b8181038181111561060d5761060d614365565b63ffffffff82811682821603908082111561379c5761379c614365565b60006020828403121561456657600080fd5b611ca782613fc0565b60208082526036908201527f43616e6e6f74206861766520737461727444617465206772656174657220746860408201527f616e206f7220657175616c20746f20656e644461746500000000000000000000606082015260800190565b6000602082840312156145de57600080fd5b611ca782613fac565b6000602082840312156145f957600080fd5b611ca782613ca7565b60006020828403121561461457600080fd5b611ca782613cb6565b6000808335601e1984360301811261463457600080fd5b83018035915067ffffffffffffffff82111561464f57600080fd5b602001915036819003821315613bf757600080fd5b815167ffffffffffffffff81111561467e5761467e613f3b565b6146928161468c84546141a2565b8461425f565b602080601f8311600181146146c757600084156146af5750858301515b600019600386901b1c1916600185901b1785556135a8565b600085815260208120601f198616915b828110156146f6578886015182559484019460019091019084016146d7565b50858210156147145787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020828403121561473657600080fd5b815169ffffffffffffffffffff81168114611ca757600080fd5b60008451614762818460208901613a23565b845190830190614776818360208901613a23565b8451910190614789818360208801613a23565b0195945050505050565b600083516147a5818460208801613a23565b66191959985d5b1d60ca1b90830190815283516147c9816007840160208801613a23565b01600701949350505050565b6000602082840312156147e757600080fd5b8151611ca781613998565b634e487b7160e01b600052601260045260246000fd5b600082614817576148176147f2565b500490565b60008261482b5761482b6147f2565b500690565b808202811582820484141761060d5761060d614365565b634e487b7160e01b600052603160045260246000fdfea264697066735822122041908abfe4bd3a58208a46c28cb100212330f423984ae509c061681b7b78f29464736f6c63430008110033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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