ETH Price: $3,295.16 (-2.58%)

Contract

0xe4462eb568E2DFbb5b0cA2D3DbB1A35C9Aa98aad
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...209752092024-10-16 2:42:4737 days ago1729046567IN
0xe4462eb5...C9Aa98aad
0 ETH0.0006602414.29493189
Safe Transfer Fr...209695972024-10-15 7:52:4738 days ago1728978767IN
0xe4462eb5...C9Aa98aad
0 ETH0.0007896614.55544922
Safe Transfer Fr...209694572024-10-15 7:24:3538 days ago1728977075IN
0xe4462eb5...C9Aa98aad
0 ETH0.0007644514.08762542
Safe Transfer Fr...208666822024-09-30 23:12:3552 days ago1727737955IN
0xe4462eb5...C9Aa98aad
0 ETH0.0007664510.81964402
Safe Transfer Fr...208666702024-09-30 23:10:1152 days ago1727737811IN
0xe4462eb5...C9Aa98aad
0 ETH0.0007986211.27385961
Safe Transfer Fr...208666572024-09-30 23:07:3552 days ago1727737655IN
0xe4462eb5...C9Aa98aad
0 ETH0.0008240411.63271142
Set Approval For...208320582024-09-26 3:20:2357 days ago1727320823IN
0xe4462eb5...C9Aa98aad
0 ETH0.0007675716.6188927
Safe Transfer Fr...206187842024-08-27 8:40:2387 days ago1724748023IN
0xe4462eb5...C9Aa98aad
0 ETH0.000039771.06993995
Safe Transfer Fr...206187692024-08-27 8:37:1187 days ago1724747831IN
0xe4462eb5...C9Aa98aad
0 ETH0.000063561.07596877
Set Approval For...205249952024-08-14 6:11:47100 days ago1723615907IN
0xe4462eb5...C9Aa98aad
0 ETH0.000047151.9423287
Set Approval For...204614602024-08-05 9:26:23109 days ago1722849983IN
0xe4462eb5...C9Aa98aad
0 ETH0.0008826919.11131904
Safe Transfer Fr...203717832024-07-23 21:00:23121 days ago1721768423IN
0xe4462eb5...C9Aa98aad
0 ETH0.000243344.4887958
Set Approval For...203452842024-07-20 4:14:35125 days ago1721448875IN
0xe4462eb5...C9Aa98aad
0 ETH0.000141743.0689288
Safe Transfer Fr...202715452024-07-09 21:13:35135 days ago1720559615IN
0xe4462eb5...C9Aa98aad
0 ETH0.000743385.84910361
Safe Transfer Fr...202373272024-07-05 2:29:23140 days ago1720146563IN
0xe4462eb5...C9Aa98aad
0 ETH0.0008977.05849282
Safe Transfer Fr...201395502024-06-21 10:38:35154 days ago1718966315IN
0xe4462eb5...C9Aa98aad
0 ETH0.000660325.19148838
Safe Transfer Fr...201395412024-06-21 10:36:47154 days ago1718966207IN
0xe4462eb5...C9Aa98aad
0 ETH0.000272724.6063689
Safe Transfer Fr...200618822024-06-10 13:59:11165 days ago1718027951IN
0xe4462eb5...C9Aa98aad
0 ETH0.001419911.17217583
Set Approval For...199954202024-06-01 7:17:11174 days ago1717226231IN
0xe4462eb5...C9Aa98aad
0 ETH0.000213154.61504445
Set Approval For...198932592024-05-18 0:27:47188 days ago1715992067IN
0xe4462eb5...C9Aa98aad
0 ETH0.000165043.5735025
Set Approval For...198695652024-05-14 16:57:47192 days ago1715705867IN
0xe4462eb5...C9Aa98aad
0 ETH0.000322486.98214179
Safe Transfer Fr...198284462024-05-08 22:55:11197 days ago1715208911IN
0xe4462eb5...C9Aa98aad
0 ETH0.000484343.81098437
Set Approval For...198276222024-05-08 20:08:11197 days ago1715198891IN
0xe4462eb5...C9Aa98aad
0 ETH0.00021894.73943359
Safe Transfer Fr...198119892024-05-06 15:39:35200 days ago1715009975IN
0xe4462eb5...C9Aa98aad
0 ETH0.000466898.60218755
Set Approval For...197303342024-04-25 5:36:23211 days ago1714023383IN
0xe4462eb5...C9Aa98aad
0 ETH0.000343687.44117836
View all transactions

Latest 2 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
142524752022-02-21 23:50:591004 days ago1645487459
0xe4462eb5...C9Aa98aad
1,243.65 ETH
142524542022-02-21 23:46:391004 days ago1645487199
0xe4462eb5...C9Aa98aad
0.1 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
A0K1Credits

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

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

pragma solidity ^0.8.0;

/// @artist: Steve Aoki
/// @title: A0K1 Credits
/// @author: manifold.xyz

/////////////////////////////////////////////////////////////////////////////////////
//                                                                                 //
//                                                                                 //
//                                    ,xWWWWWx,.                                   //
//                                   'OWWWWWWWNd.                                  //
//                                  .xWWWK0KNWWNl                                  //
//                                 .oNWWXc.,xWWWX:                                 //
//                                 lNWWNo.  .OWWW0,                                //
//                                :XWWWx.    ,0WWWO'                               //
//                               ,0WWWO.      :XWWWx.                              //
//                              'OWWW0,  ...   lNWWNd.                             //
//                             .xWWWX:   o0k;  .dNWWXl                             //
//                            .dNWWNl   cXWW0'  .kWWWX:                            //
//                            lXWWNd.  ;KWWWWk.  '0WWW0,                           //
//                           :XWWWk.  '0WWWWWNd.  ;KWWWO'                          //
//                          ,0WWWO'  .kWWWWWWWNo.  cXWWWx.                         //
//                         .OWWWK;  .dNWWWWWWWWXc  .oNWWNo.                        //
//                        .xWWWXc   oNWWWKOKNWWWK;  .xWWWXl                        //
//                       .oNWWNo   cXWWWX:.,dNWWW0'  'OWWWX:                       //
//                       lXWWWd.  ;KWWWNl   .kWWWWk.  ;KWWW0,                      //
//                      :XWWWk.  '0WWWNd.    ,0WWWWd.  :XWWWO'                     //
//                     ,0WWW0'   ;dddxl.      ,ddddo'   lNWWWx.                    //
//                    .xWWWNl                           .OWWWNc                    //
//                     :XWWWO.   ,llll:.      .clllc.   :KWWWO'                    //
//                      lNWWWx.  ;KWWWNo.    .OWWWWk.  ,0WWWK,                     //
//                      .dNWWNo   :XWWWXc   .xWWWWO'  .OWWWX:                      //
//                       .xWWWXc   lNWWWK;..oNWWWK;  .xWWWNl                       //
//                        'OWWWK;  .dNWWW0kOXWWWX:   oNWWNd.                       //
//                         ,0WWWO'  .kWWWWWWWWWNl   cXWWWx.                        //
//                          :XWWWk.  'OWWWWWWWNd.  ;KWWWO'                         //
//                           lNWWNd.  ;KWWWWWWk.  '0WWWK;                          //
//                           .dNWWNl   :XWWWWO'  .kWWWX:                           //
//                            .xWWWK:   lNWWK;  .dNWWNl                            //
//                             'OWWW0,  .dK0c   lNWWNd.                            //
//                              ,0WWWk.  .,..  :XWWWx.                             //
//                               :XWWWx.      ,KWWWO'                              //
//                                lNWWNo     'OWWWK,                               //
//                                .dNWWXc   .xWWWX:                                //
//                                 .xWWWK;..oNWWNl                                 //
//                                  'OWWW0x0XWWNd.                                 //
//                                   ,KWWWWWWWWx.                                  //
//                                    :XWWWWWWO'                                   //
//                                    .l000O0l.                                    //
//                                                                                 //
//                                                                                 //
/////////////////////////////////////////////////////////////////////////////////////


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

import "./ERC1155CollectionBase.sol";

/**
 * ERC1155 Collection Drop Contract
 */
contract A0K1Credits is ERC1155, ERC1155CollectionBase, AdminControl {

    constructor(address signingAddress_) ERC1155('') {
        _initialize(
            50000,                  // maxSupply
            25000,                  // purchaseMax
            250000000000000000,     // purchasePrice
            0,                      // purchaseLimit
            24,                     // transactionLimit
            250000000000000000,     // presalePurchasePrice
            0,                      // presalePurchaseLimit
            signingAddress_
        );
    }

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

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

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

    /**
     * @dev See {IERC1155Collection-setTransferLocked}.
     */
    function setTransferLocked(bool locked) external override adminRequired {
        _setTransferLocked(locked);
    }

    /**
     * @dev See {IERC1155Collection-premint}.
     */
    function premint(uint16 amount) external override adminRequired {
        _premint(amount, owner());
    }

    /**
     * @dev See {IERC1155Collection-premint}.
     */
    function premint(uint16[] calldata amounts, address[] calldata addresses) external override adminRequired {
        _premint(amounts, addresses);
    }

    /**
     * @dev See {IERC1155Collection-mintReserve}.
     */
    function mintReserve(uint16 amount) external override adminRequired {
        _mintReserve(amount, owner());
    }

    /**
     * @dev See {IERC1155Collection-mintReserve}.
     */
    function mintReserve(uint16[] calldata amounts, address[] calldata addresses) external override adminRequired {
        _mintReserve(amounts, addresses);
    }

    /**
     * @dev See {IERC1155Collection-activate}.
     */
    function activate(uint256 startTime_, uint256 duration, uint256 presaleInterval_, uint256 claimStartTime_, uint256 claimEndTime_) external override adminRequired {
        _activate(startTime_, duration, presaleInterval_, claimStartTime_, claimEndTime_);
    }

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

    /**
     * @dev See {IERC1155Collection-updateRoyalties}.
     */
    function updateRoyalties(address payable recipient, uint256 bps) external override adminRequired {
      _updateRoyalties(recipient, bps);
    }

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

    /**
     * @dev See {IERC1155Collection-burn}
     */
    function burn(address from, uint16 amount) public virtual override {
        require(from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved");
        ERC1155._burn(from, TOKEN_ID, amount);
    }

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

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

File 2 of 19 : ERC1155CollectionBase.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

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

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

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

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

    // Royalty
    address payable private _royaltyRecipient;
    uint256 private _royaltyBps;

    // Transfer lock
    bool public transferLocked;

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

    /**
     * @dev See {IERC1155Collection-claim}.
     */
    function claim(uint16 amount, bytes32 message, bytes calldata signature, string calldata nonce) external virtual override {
        _validateClaimRestrictions();
        _validateClaimRequest(message, signature, nonce, amount);
        _mint(msg.sender, amount, true);
    }
    
    /**
     * @dev See {IERC1155Collection-purchase}.
     */
    function purchase(uint16 amount, bytes32 message, bytes calldata signature, string calldata nonce) external virtual override payable {
        _validatePurchaseRestrictions();

        // Check purchase amounts
        require(amount <= purchaseRemaining() && (transactionLimit == 0 || amount <= transactionLimit), "Too many requested");
        uint256 balance;
        if (!transferLocked && (presalePurchaseLimit > 0 || purchaseLimit > 0)) {
             balance = _mintCount[msg.sender];
        } else {
             balance = balanceOf(msg.sender);
        }
         
        bool presale;
        if (block.timestamp - startTime < presaleInterval) {
            require((presalePurchaseLimit == 0 || amount <= (presalePurchaseLimit - balance)) && (purchaseLimit == 0 || amount <= (purchaseLimit - balance)), "Too many requested");
            _validatePresalePrice(amount);
            presale = true;
        } else {
            require(purchaseLimit == 0 || amount <= (purchaseLimit - balance), "Too many requested");
            _validatePrice(amount);
        }
        _validatePurchaseRequest(message, signature, nonce);
        _mint(msg.sender, amount, presale);
    }

    /**
     * @dev See {IERC1155Collection-state}
     */
    function state() external override view returns (CollectionState memory) {
        if (msg.sender == address(0)) {
            // No message sender, no purchase balance
            return CollectionState(transactionLimit, purchaseMax, purchaseRemaining(), purchasePrice, purchaseLimit, presalePurchasePrice, presalePurchaseLimit, 0, active, startTime, endTime, presaleInterval, claimStartTime, claimEndTime);
        } else {
            if (!transferLocked && (presalePurchaseLimit > 0 || purchaseLimit > 0)) {
                return CollectionState(transactionLimit, purchaseMax, purchaseRemaining(), purchasePrice, purchaseLimit, presalePurchasePrice, presalePurchaseLimit, _mintCount[msg.sender], active, startTime, endTime, presaleInterval, claimStartTime, claimEndTime);
            } else {
                return CollectionState(transactionLimit, purchaseMax, purchaseRemaining(), purchasePrice, purchaseLimit, presalePurchasePrice, presalePurchaseLimit, uint16(balanceOf(msg.sender)), active, startTime, endTime, presaleInterval, claimStartTime, claimEndTime);
            }
        }
    }

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

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

    /**
     * @dev See {IERC1155Collection-getRoyalties}.
     */
    function getRoyalties(uint256) external override view returns (address payable, uint256) {
        return (_royaltyRecipient, _royaltyBps);
    }

    /**
     * @dev See {IERC1155Collection-royaltyInfo}.
     */
    function royaltyInfo(uint256, uint256 salePrice) external override view returns (address, uint256) {
        return (_royaltyRecipient, (salePrice * _royaltyBps) / 10000);
    }

    /**
     * Premint tokens to the owner.  Purchase must not be active.
     */
    function _premint(uint16 amount, address owner) internal virtual {
        require(!active, "Already active");
        _mint(owner, amount, true);
    }

    /**
     * Premint tokens to the list of addresses.  Purchase must not be active.
     */
    function _premint(uint16[] calldata amounts, address[] calldata addresses) internal virtual {
        require(!active, "Already active");
        for (uint256 i = 0; i < addresses.length; i++) {
            _mint(addresses[i], amounts[i], true);
        }
    }

    /**
     * Mint reserve tokens. Purchase must be completed.
     */
    function _mintReserve(uint16 amount, address owner) internal virtual {
        require(endTime != 0 && endTime <= block.timestamp, "Cannot mint reserve until after sale complete");
        require(purchaseCount + reserveCount + amount <= maxSupply, "Too many requested");
        reserveCount += amount;
        _mintERC1155(owner, amount);
    }

    /**
     * Mint reserve tokens. Purchase must be completed.
     */
    function _mintReserve(uint16[] calldata amounts, address[] calldata addresses) internal virtual {
        require(endTime != 0 && endTime <= block.timestamp, "Cannot mint reserve until after sale complete");
        uint16 totalAmount;
        for (uint256 i = 0; i < addresses.length; i++) {
            totalAmount += amounts[i];
        }
        require(purchaseCount + reserveCount + totalAmount <= maxSupply, "Too many requested");
        reserveCount += totalAmount;
        for (uint256 i = 0; i < addresses.length; i++) {
            _mintERC1155(addresses[i], amounts[i]);
        }
    }

    /**
     * Mint function internal to ERC1155CollectionBase to keep track of state
     */
    function _mint(address to, uint16 amount, bool presale) internal {
        purchaseCount += amount;
        // Track total mints per address only if necessary
        if (!transferLocked && ((presalePurchaseLimit > 0 && presale) || purchaseLimit > 0)) {
           _mintCount[msg.sender] += amount;
        }
        _mintERC1155(to, amount);
    }

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

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

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

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

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

    /**
     * @dev See {IERC1155Collection-updateRoyalties}.
     */
    function _updateRoyalties(address payable recipient, uint256 bps) internal {
        _royaltyRecipient = recipient;
        _royaltyBps = bps;
    }
}

File 3 of 19 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

        return batchBalances;
    }

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

        return array;
    }
}

File 4 of 19 : 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 5 of 19 : CollectionBase.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

import "./ICollectionBase.sol";

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

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

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

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

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

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

    /**
     * Activate the sale
     */
    function _activate(uint256 startTime_, uint256 duration, uint256 presaleInterval_, uint256 claimStartTime_, uint256 claimEndTime_) internal virtual {
        require(!active, "Already active");
        require(startTime_ > block.timestamp, "Cannot activate in the past");
        require(presaleInterval_ < duration, "Presale Interval cannot be longer than the sale");
        require(claimStartTime_ <= claimEndTime_ && claimEndTime_ <= startTime_, "Invalid claim times");
        startTime = startTime_;
        endTime = startTime + duration;
        presaleInterval = presaleInterval_;
        claimStartTime = claimStartTime_;
        claimEndTime = claimEndTime_;
        active = true;

        emit CollectionActivated(startTime, endTime, presaleInterval, claimStartTime, claimEndTime);
    }

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

        emit CollectionDeactivated();
    }

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

        _usedNonces[nonce] = true;
    }

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

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

        _usedNonces[nonce] = true;
    }

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

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

}

File 6 of 19 : IERC1155Collection.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// @author: manifold.xyz

import "./ICollectionBase.sol";

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

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

    /**
     * @dev Activates the contract.
     * @param startTime_ The UNIX timestamp in seconds the sale should start at.
     * @param duration The number of seconds the sale should remain active.
     * @param presaleInterval_ The period of time the contract should only be active for presale.
     */
    function activate(uint256 startTime_, uint256 duration, uint256 presaleInterval_, uint256 claimStartTime_, uint256 claimEndTime_) external;

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

    /**
     * @dev Pre-mint tokens to the owner. Sale must not be active.
     * @param amount The number of tokens to mint.
     */
    function premint(uint16 amount) external;

    /**
     * @dev Pre-mint tokens to the list of addresses. Sale must not be active.
     * @param amounts The amount of tokens to mint per address.
     * @param addresses The list of addresses to mint a token to.
     */
    function premint(uint16[] calldata amounts, address[] calldata addresses) external;

    /**
     * @dev Claim - mint with validation.
     * @param amount The number of tokens to mint.
     * @param message Signed message to validate input args.
     * @param signature Signature of the signer to recover from signed message.
     * @param nonce Manifold-generated nonce.
     */
    function claim(uint16 amount, bytes32 message, bytes calldata signature, string calldata nonce) external;

    /**
     * @dev Purchase - mint with validation.
     * @param amount The number of tokens to mint.
     * @param message Signed message to validate input args.
     * @param signature Signature of the signer to recover from signed message.
     * @param nonce Manifold-generated nonce.
     */
    function purchase(uint16 amount, bytes32 message, bytes calldata signature, string calldata nonce) external payable;

    /**
     * @dev Mint reserve tokens to the owner. Sale must be complete.
     * @param amount The number of tokens to mint.
     */
    function mintReserve(uint16 amount) external;

    /**
     * @dev Mint reserve tokens to the list of addresses. Sale must be complete.
     * @param amounts The amount of tokens to mint per address.
     * @param addresses The list of addresses to mint a token to.
     */
    function mintReserve(uint16[] calldata amounts, address[] calldata addresses) external;

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

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

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

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

    /**
     * @dev Set whether or not token transfers are locked until end of sale.
     * @param locked Whether or not transfers are locked
     */
    function setTransferLocked(bool locked) external;

    /**
     * @dev Update royalties
     * @param recipient The address to set as the royalty recipient
     * @param bps The basis points to set as the royalty
     */
    function updateRoyalties(address payable recipient, uint256 bps) external;

    /**
     * @dev Get the current royalty recipient and amount
     */
    function getRoyalties(uint256) external view returns (address payable recipient, uint256 bps);

    /**
     * @dev EIP-2981 compatibility to determine royalty info on sale
     */
    function royaltyInfo(uint256, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount);

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

    /**
     * @dev Destroys `amount` tokens from `from`
     * @param from The address to remove tokens from
     * @param amount The amount of tokens to remove
     */
    function burn(address from, uint16 amount) external;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 8 of 19 : 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 9 of 19 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 10 of 19 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 11 of 19 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

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

File 12 of 19 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

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

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

File 13 of 19 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

File 14 of 19 : 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 15 of 19 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 16 of 19 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

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

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

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

        assembly {
            result := store
        }

        return result;
    }
}

File 17 of 19 : ICollectionBase.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

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

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

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

File 18 of 19 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"signingAddress_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"presaleInterval","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"claimStartTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"claimEndTime","type":"uint256"}],"name":"CollectionActivated","type":"event"},{"anonymous":false,"inputs":[],"name":"CollectionDeactivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"uint256","name":"startTime_","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"presaleInterval_","type":"uint256"},{"internalType":"uint256","name":"claimStartTime_","type":"uint256"},{"internalType":"uint256","name":"claimEndTime_","type":"uint256"}],"name":"activate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"active","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"approveAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint16","name":"amount","type":"uint16"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"amount","type":"uint16"},{"internalType":"bytes32","name":"message","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"string","name":"nonce","type":"string"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deactivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAdmins","outputs":[{"internalType":"address[]","name":"admins","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"amounts","type":"uint16[]"},{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"mintReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"amount","type":"uint16"}],"name":"mintReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"nonce","type":"string"}],"name":"nonceUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"amounts","type":"uint16[]"},{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"premint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"amount","type":"uint16"}],"name":"premint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"presaleInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presalePurchaseLimit","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presalePurchasePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"amount","type":"uint16"},{"internalType":"bytes32","name":"message","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"string","name":"nonce","type":"string"}],"name":"purchase","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"purchaseCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchaseLimit","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchaseMax","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchasePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchaseRemaining","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"revokeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setCollectionURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"locked","type":"bool"}],"name":"setTransferLocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"state","outputs":[{"components":[{"internalType":"uint16","name":"transactionLimit","type":"uint16"},{"internalType":"uint16","name":"purchaseMax","type":"uint16"},{"internalType":"uint16","name":"purchaseRemaining","type":"uint16"},{"internalType":"uint256","name":"purchasePrice","type":"uint256"},{"internalType":"uint16","name":"purchaseLimit","type":"uint16"},{"internalType":"uint256","name":"presalePurchasePrice","type":"uint256"},{"internalType":"uint16","name":"presalePurchaseLimit","type":"uint16"},{"internalType":"uint16","name":"purchaseCount","type":"uint16"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"presaleInterval","type":"uint256"},{"internalType":"uint256","name":"claimStartTime","type":"uint256"},{"internalType":"uint256","name":"claimEndTime","type":"uint256"}],"internalType":"struct IERC1155Collection.CollectionState","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transactionLimit","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transferLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"bps","type":"uint256"}],"name":"updateRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162004894380380620048948339810160408190526200003491620002cb565b6040805160208101909152600081526200004e3362000081565b6200005981620000d1565b506200007a61c3506161a86703782dace9d9000060006018828288620000ea565b506200033a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8051620000e690600390602084019062000225565b5050565b6004546001600160a01b031615620001495760405162461bcd60e51b815260206004820152601360248201527f416c726561647920696e697469616c697a65640000000000000000000000000060448201526064015b60405180910390fd5b8661ffff168861ffff161015620001935760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b604482015260640162000140565b6010805461ffff1990811661ffff9a8b1617909155600c8054600d9890985565ffffffff00001990971662010000988a169890980261ffff60201b1916979097176401000000009589169590950294909417861692871692909217909355600e8054909416941693909317909155600f55600480546001600160a01b0319166001600160a01b03909216919091179055565b8280546200023390620002fd565b90600052602060002090601f016020900481019282620002575760008555620002a2565b82601f106200027257805160ff1916838001178555620002a2565b82800160010185558215620002a2579182015b82811115620002a257825182559160200191906001019062000285565b50620002b0929150620002b4565b5090565b5b80821115620002b05760008155600101620002b5565b600060208284031215620002de57600080fd5b81516001600160a01b0381168114620002f657600080fd5b9392505050565b600181811c908216806200031257607f821691505b602082108114156200033457634e487b7160e01b600052602260045260246000fd5b50919050565b61454a806200034a6000396000f3fe6080604052600436106102c85760003560e01c806370a0823111610175578063c19d93fb116100dc578063e985e9c511610095578063f2fde38b1161006f578063f2fde38b146108ca578063f3fef3a3146108ea578063f47430701461090a578063fe73ad771461092557600080fd5b8063e985e9c514610846578063f19605d61461088f578063f242432a146108aa57600080fd5b8063c19d93fb1461079c578063c8a84a82146107be578063d55f2d9d146107df578063d5abeb01146107ff578063defd6c5f1461081a578063e3b9398b1461083057600080fd5b8063923c235b1161012e578063923c235b146106e3578063956447d814610703578063a22cb46514610723578063a6a11bb114610743578063b0ad354114610759578063bb3bafd61461076c57600080fd5b806370a082311461063a578063715018a61461065a57806378e979251461066f57806381960b5c14610685578063850217d81461069b5780638da5cb5b146106bb57600080fd5b80632b85ed9c1161023457806336ef89af116101ed57806351b42b00116101c757806351b42b00146105c55780636c2f5acd146105da5780636d73e669146105fa5780636f6f53fe1461061a57600080fd5b806336ef89af1461056257806340d1d255146105825780634e1273f41461059857600080fd5b80632b85ed9c146104a95780632d345670146104ca5780632eb2c2d6146104ea5780633197cbb61461050a57806331ae450b1461052057806335e60bd41461054257600080fd5b806317bffd6b1161028657806317bffd6b146103c657806318886657146103e8578063249c478b1461040a57806324d7806c1461042a5780632639f4601461044a5780632a55205a1461046a57600080fd5b8062fdd58e146102cd57806301ffc9a71461030057806302fb0c5e146103305780630e89341c1461034a57806312686aae1461037757806316317c2114610391575b600080fd5b3480156102d957600080fd5b506102ed6102e836600461373a565b61093a565b6040519081526020015b60405180910390f35b34801561030c57600080fd5b5061032061031b366004613a6d565b6109d6565b60405190151581526020016102f7565b34801561033c57600080fd5b506006546103209060ff1681565b34801561035657600080fd5b5061036a610365366004613bd4565b6109f0565b6040516102f79190613f0a565b34801561038357600080fd5b506014546103209060ff1681565b34801561039d57600080fd5b506010546103b390600160201b900461ffff1681565b60405161ffff90911681526020016102f7565b3480156103d257600080fd5b506103e66103e13660046139e7565b610a84565b005b3480156103f457600080fd5b50600c546103b390600160201b900461ffff1681565b34801561041657600080fd5b506103e6610425366004613b30565b610ae0565b34801561043657600080fd5b5061032061044536600461371d565b610b48565b34801561045657600080fd5b506103e6610465366004613aa7565b610b81565b34801561047657600080fd5b5061048a610485366004613bed565b610c0e565b604080516001600160a01b0390931683526020830191909152016102f7565b3480156104b557600080fd5b506010546103b39062010000900461ffff1681565b3480156104d657600080fd5b506103e66104e536600461371d565b610c49565b3480156104f657600080fd5b506103e661050536600461379f565b610cc4565b34801561051657600080fd5b506102ed60085481565b34801561052c57600080fd5b50610535610d5b565b6040516102f79190613e7c565b34801561054e57600080fd5b506103e661055d366004613a52565b610e09565b34801561056e57600080fd5b506103e661057d366004613b4b565b610e64565b34801561058e57600080fd5b506102ed600b5481565b3480156105a457600080fd5b506105b86105b3366004613915565b610e8e565b6040516102f79190613ec9565b3480156105d157600080fd5b506103e6610fb7565b3480156105e657600080fd5b506103e66105f536600461373a565b61100b565b34801561060657600080fd5b506103e661061536600461371d565b611079565b34801561062657600080fd5b506103e66106353660046139e7565b6110f3565b34801561064657600080fd5b506102ed61065536600461371d565b611149565b34801561066657600080fd5b506103e6611156565b34801561067b57600080fd5b506102ed60075481565b34801561069157600080fd5b506102ed600f5481565b3480156106a757600080fd5b506103e66106b6366004613b30565b61118a565b3480156106c757600080fd5b506000546040516001600160a01b0390911681526020016102f7565b3480156106ef57600080fd5b506103206106fe366004613ae8565b6111ef565b34801561070f57600080fd5b506103e661071e366004613c0f565b61121a565b34801561072f57600080fd5b506103e661073e3660046138b4565b611271565b34801561074f57600080fd5b506102ed600a5481565b6103e6610767366004613b4b565b61127c565b34801561077857600080fd5b5061048a610787366004613bd4565b506012546013546001600160a01b0390911691565b3480156107a857600080fd5b506107b161145b565b6040516102f79190614157565b3480156107ca57600080fd5b50600c546103b39062010000900461ffff1681565b3480156107eb57600080fd5b506103e66107fa3660046138e9565b611716565b34801561080b57600080fd5b506010546103b39061ffff1681565b34801561082657600080fd5b506102ed600d5481565b34801561083c57600080fd5b506102ed60095481565b34801561085257600080fd5b50610320610861366004613766565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b34801561089b57600080fd5b50600c546103b39061ffff1681565b3480156108b657600080fd5b506103e66108c536600461384c565b61175e565b3480156108d657600080fd5b506103e66108e536600461371d565b6117a3565b3480156108f657600080fd5b506103e661090536600461373a565b61183b565b34801561091657600080fd5b50600e546103b39061ffff1681565b34801561093157600080fd5b506103b361188f565b60006001600160a01b0383166109ab5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526001602090815260408083206001600160a01b03861684529091529020545b92915050565b60006109e1826118b8565b806109d057506109d082611908565b6060600380546109ff9061432b565b80601f0160208091040260200160405190810160405280929190818152602001828054610a2b9061432b565b8015610a785780601f10610a4d57610100808354040283529160200191610a78565b820191906000526020600020905b815481529060010190602001808311610a5b57829003601f168201915b50505050509050919050565b33610a976000546001600160a01b031690565b6001600160a01b03161480610ab25750610ab260153361192d565b610ace5760405162461bcd60e51b81526004016109a290614113565b610ada84848484611952565b50505050565b33610af36000546001600160a01b031690565b6001600160a01b03161480610b0e5750610b0e60153361192d565b610b2a5760405162461bcd60e51b81526004016109a290614113565b610b4581610b406000546001600160a01b031690565b611ad2565b50565b6000816001600160a01b0316610b666000546001600160a01b031690565b6001600160a01b031614806109d057506109d060158361192d565b33610b946000546001600160a01b031690565b6001600160a01b03161480610baf5750610baf60153361192d565b610bcb5760405162461bcd60e51b81526004016109a290614113565b610c0a82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611b9792505050565b5050565b60125460135460009182916001600160a01b039091169061271090610c3390866142a6565b610c3d9190614292565b915091505b9250929050565b6000546001600160a01b03163314610c735760405162461bcd60e51b81526004016109a2906140b6565b610c7e60158261192d565b15610b455760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a3610c0a601582611baa565b6001600160a01b038516331480610ce05750610ce08533610861565b610d475760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016109a2565b610d548585858585611bbf565b5050505050565b6060610d676015611da5565b6001600160401b03811115610d7e57610d7e61442f565b604051908082528060200260200182016040528015610da7578160200160208202803683370190505b50905060005b610db76015611da5565b811015610e0557610dc9601582611daf565b828281518110610ddb57610ddb614419565b6001600160a01b039092166020928302919091019091015280610dfd81614392565b915050610dad565b5090565b33610e1c6000546001600160a01b031690565b6001600160a01b03161480610e375750610e3760153361192d565b610e535760405162461bcd60e51b81526004016109a290614113565b6014805460ff191682151517905550565b610e6c611dbb565b610e7a85858585858b611e50565b610e8633876001612040565b505050505050565b60608151835114610ef35760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016109a2565b600083516001600160401b03811115610f0e57610f0e61442f565b604051908082528060200260200182016040528015610f37578160200160208202803683370190505b50905060005b8451811015610faf57610f82858281518110610f5b57610f5b614419565b6020026020010151858381518110610f7557610f75614419565b602002602001015161093a565b828281518110610f9457610f94614419565b6020908102919091010152610fa881614392565b9050610f3d565b509392505050565b33610fca6000546001600160a01b031690565b6001600160a01b03161480610fe55750610fe560153361192d565b6110015760405162461bcd60e51b81526004016109a290614113565b611009612106565b565b3361101e6000546001600160a01b031690565b6001600160a01b03161480611039575061103960153361192d565b6110555760405162461bcd60e51b81526004016109a290614113565b601280546001600160a01b0319166001600160a01b03841617905560138190555050565b6000546001600160a01b031633146110a35760405162461bcd60e51b81526004016109a2906140b6565b6110ae60158261192d565b610b455760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a3610c0a60158261214f565b336111066000546001600160a01b031690565b6001600160a01b03161480611121575061112160153361192d565b61113d5760405162461bcd60e51b81526004016109a290614113565b610ada84848484612164565b60006109d082600161093a565b6000546001600160a01b031633146111805760405162461bcd60e51b81526004016109a2906140b6565b61100960006121fc565b3361119d6000546001600160a01b031690565b6001600160a01b031614806111b857506111b860153361192d565b6111d45760405162461bcd60e51b81526004016109a290614113565b610b45816111ea6000546001600160a01b031690565b61224c565b60006005826040516112019190613cc1565b9081526040519081900360200190205460ff1692915050565b3361122d6000546001600160a01b031690565b6001600160a01b03161480611248575061124860153361192d565b6112645760405162461bcd60e51b81526004016109a290614113565b610d54858585858561227b565b610c0a338383612430565b611284612511565b61128c61188f565b61ffff168661ffff16111580156112bb5750600c5461ffff1615806112bb5750600c5461ffff90811690871611155b6112d75760405162461bcd60e51b81526004016109a290613fae565b60145460009060ff161580156113085750600e5461ffff161515806113085750600c54600160201b900461ffff1615155b1561132757503360009081526011602052604090205461ffff16611333565b61133033611149565b90505b60006009546007544261134691906142e8565b10156113de57600e5461ffff1615806113745750600e5461136c90839061ffff166142e8565b8861ffff1611155b80156113b15750600c54600160201b900461ffff1615806113b15750600c546113a9908390600160201b900461ffff166142e8565b8861ffff1611155b6113cd5760405162461bcd60e51b81526004016109a290613fae565b6113d688612598565b506001611439565b600c54600160201b900461ffff1615806114145750600c5461140c908390600160201b900461ffff166142e8565b8861ffff1611155b6114305760405162461bcd60e51b81526004016109a290613fae565b611439886125f7565b6114468787878787612608565b611451338983612040565b5050505050505050565b604080516101c081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a08101919091523361157757604080516101c081018252600c5461ffff8082168352620100009091041660208201529081016114ff61188f565b61ffff9081168252600d546020830152600c54600160201b900481166040830152600f546060830152600e54166080820152600060a082015260065460ff16151560c082015260075460e0820152600854610100820152600954610120820152600a54610140820152600b5461016090910152919050565b60145460ff161580156115a55750600e5461ffff161515806115a55750600c54600160201b900461ffff1615155b1561166657604080516101c081018252600c5461ffff8082168352620100009091041660208201529081016115d861188f565b61ffff9081168252600d54602080840191909152600c54600160201b90048216604080850191909152600f546060850152600e548316608085015233600090815260119092529020541660a082015260065460ff16151560c082015260075460e0820152600854610100820152600954610120820152600a54610140820152600b5461016090910152919050565b604080516101c081018252600c5461ffff80821683526201000090910416602082015290810161169461188f565b61ffff9081168252600d546020830152600c54600160201b900481166040830152600f546060830152600e5416608082015260a0016116d233611149565b61ffff16815260065460ff1615156020820152600754604082015260085460608201526009546080820152600a5460a0820152600b5460c090910152919050565b90565b6001600160a01b03821633148061173257506117328233610861565b61174e5760405162461bcd60e51b81526004016109a290613f65565b610c0a82600161ffff84166127cc565b6001600160a01b03851633148061177a575061177a8533610861565b6117965760405162461bcd60e51b81526004016109a290613f65565b610d548585858585612949565b6000546001600160a01b031633146117cd5760405162461bcd60e51b81526004016109a2906140b6565b6001600160a01b0381166118325760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109a2565b610b45816121fc565b3361184e6000546001600160a01b031690565b6001600160a01b03161480611869575061186960153361192d565b6118855760405162461bcd60e51b81526004016109a290614113565b610c0a8282612a79565b601054600c546000916118b39161ffff6201000092839004811692909104166142c5565b905090565b60006001600160e01b03198216636cdb3d1360e11b14806118e957506001600160e01b031982166303a24d0760e21b145b806109d057506301ffc9a760e01b6001600160e01b03198316146109d0565b60006001600160e01b03198216632a9f3abf60e11b14806109d057506109d0826118b8565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b6008541580159061196557504260085411155b6119815760405162461bcd60e51b81526004016109a290613fda565b6000805b828110156119d25785858281811061199f5761199f614419565b90506020020160208101906119b49190613b30565b6119be9083614254565b9150806119ca81614392565b915050611985565b5060105461ffff8082169183916119fa91600160201b81048216916201000090910416614254565b611a049190614254565b61ffff161115611a265760405162461bcd60e51b81526004016109a290613fae565b80601060048282829054906101000a900461ffff16611a459190614254565b92506101000a81548161ffff021916908361ffff16021790555060005b82811015610e8657611ac0848483818110611a7f57611a7f614419565b9050602002016020810190611a94919061371d565b878784818110611aa657611aa6614419565b9050602002016020810190611abb9190613b30565b612ad9565b80611aca81614392565b915050611a62565b60085415801590611ae557504260085411155b611b015760405162461bcd60e51b81526004016109a290613fda565b60105461ffff808216918491611b2891600160201b81048216916201000090910416614254565b611b329190614254565b61ffff161115611b545760405162461bcd60e51b81526004016109a290613fae565b81601060048282829054906101000a900461ffff16611b739190614254565b92506101000a81548161ffff021916908361ffff160217905550610c0a8183612ad9565b8051610c0a9060039060208401906134ed565b600061194b836001600160a01b038416612afd565b8151835114611c215760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016109a2565b6001600160a01b038416611c475760405162461bcd60e51b81526004016109a290614027565b33611c56818787878787612bf0565b60005b8451811015611d3f576000858281518110611c7657611c76614419565b602002602001015190506000858381518110611c9457611c94614419565b60209081029190910181015160008481526001835260408082206001600160a01b038e168352909352919091205490915081811015611ce55760405162461bcd60e51b81526004016109a29061406c565b60008381526001602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611d2490849061427a565b9250508190555050505080611d3890614392565b9050611c59565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611d8f929190613edc565b60405180910390a4610e86818787878787612bf9565b60006109d0825490565b600061194b8383612d64565b60065460ff16611df85760405162461bcd60e51b8152602060048201526008602482015267496e61637469766560c01b60448201526064016109a2565b600a544210158015611e0c5750600b544211155b6110095760405162461bcd60e51b815260206004820152601560248201527427baba39b4b2329031b630b4b6903832b934b7b21760591b60448201526064016109a2565b60058383604051611e62929190613cb1565b9081526040519081900360200190205460ff1615611ebe5760405162461bcd60e51b815260206004820152601960248201527821b0b73737ba103932b83630bc903a3930b739b0b1ba34b7b760391b60448201526064016109a2565b6000611eeb611ed08361ffff16612d8e565b51611edc85601461427a565b611ee6919061427a565b612d8e565b338585611efb8661ffff16612d8e565b604051602001611f0f959493929190613d4d565b604051602081830303815290604052805190602001209050808714611f6a5760405162461bcd60e51b81526020600482015260116024820152704d616c666f726d6564206d65737361676560781b60448201526064016109a2565b6000611fae87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c93925050612e939050565b6004549091506001600160a01b038083169116146120025760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b60448201526064016109a2565b600160058686604051612016929190613cb1565b908152604051908190036020019020805491151560ff199092169190911790555050505050505050565b81601060028282829054906101000a900461ffff1661205f9190614254565b825461ffff9182166101009390930a92830291909202199091161790555060145460ff161580156120b45750600e5461ffff161580159061209d5750805b806120b45750600c54600160201b900461ffff1615155b156120f75733600090815260116020526040812080548492906120dc90849061ffff16614254565b92506101000a81548161ffff021916908361ffff1602179055505b6121018383612ad9565b505050565b6000600781905560088190556006805460ff19169055600a819055600b8190556040517fb02389feab3af620e2374d4d559b436ea226b1e6c9c31fe77dfbff3d40cbe9ba9190a1565b600061194b836001600160a01b038416612eaf565b60065460ff16156121875760405162461bcd60e51b81526004016109a2906140eb565b60005b81811015610d54576121ea8383838181106121a7576121a7614419565b90506020020160208101906121bc919061371d565b8686848181106121ce576121ce614419565b90506020020160208101906121e39190613b30565b6001612040565b806121f481614392565b91505061218a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60065460ff161561226f5760405162461bcd60e51b81526004016109a2906140eb565b610c0a81836001612040565b60065460ff161561229e5760405162461bcd60e51b81526004016109a2906140eb565b4285116122ed5760405162461bcd60e51b815260206004820152601b60248201527f43616e6e6f7420616374697661746520696e207468652070617374000000000060448201526064016109a2565b8383106123545760405162461bcd60e51b815260206004820152602f60248201527f50726573616c6520496e74657276616c2063616e6e6f74206265206c6f6e676560448201526e72207468616e207468652073616c6560881b60648201526084016109a2565b8082111580156123645750848111155b6123a65760405162461bcd60e51b8152602060048201526013602482015272496e76616c696420636c61696d2074696d657360681b60448201526064016109a2565b60078590556123b5848661427a565b60088190556009849055600a839055600b8290556006805460ff1916600117905560075460408051918252602082019290925290810184905260608101839052608081018290527fe512d106f8172b08abfd2fc5ddfdb7e2401381780ae29e29f1352b862f1d27319060a00160405180910390a15050505050565b816001600160a01b0316836001600160a01b031614156124a45760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016109a2565b6001600160a01b03838116600081815260026020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60065460ff1661254e5760405162461bcd60e51b8152602060048201526008602482015267496e61637469766560c01b60448201526064016109a2565b6007544210156110095760405162461bcd60e51b815260206004820152601560248201527450757263686173696e67206e6f742061637469766560581b60448201526064016109a2565b600f546125a99061ffff83166142a6565b3414610b455760405162461bcd60e51b815260206004820152601c60248201527f496e76616c696420707572636861736520616d6f756e742073656e740000000060448201526064016109a2565b600d546125a99061ffff83166142a6565b6005828260405161261a929190613cb1565b9081526040519081900360200190205460ff16156126765760405162461bcd60e51b815260206004820152601960248201527821b0b73737ba103932b83630bc903a3930b739b0b1ba34b7b760391b60448201526064016109a2565b6000612686611ee683601461427a565b33848460405160200161269c9493929190613cdd565b6040516020818303038152906040528051906020012090508086146126f75760405162461bcd60e51b81526020600482015260116024820152704d616c666f726d6564206d65737361676560781b60448201526064016109a2565b600061273b86868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b93925050612e939050565b6004549091506001600160a01b0380831691161461278f5760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b60448201526064016109a2565b6001600585856040516127a3929190613cb1565b908152604051908190036020019020805491151560ff1990921691909117905550505050505050565b6001600160a01b03831661282e5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016109a2565b3361285d8185600061283f87612efe565b61284887612efe565b60405180602001604052806000815250612bf0565b60008381526001602090815260408083206001600160a01b0388168452909152902054828110156128dc5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016109a2565b60008481526001602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b03841661296f5760405162461bcd60e51b81526004016109a290614027565b3361298e81878761297f88612efe565b61298888612efe565b87612bf0565b60008481526001602090815260408083206001600160a01b038a168452909152902054838110156129d15760405162461bcd60e51b81526004016109a29061406c565b60008581526001602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290612a1090849061427a565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612a70828888888888612f49565b50505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612ac6576040519150601f19603f3d011682016040523d82523d6000602084013e612acb565b606091505b505090508061210157600080fd5b610c0a82600161ffff168361ffff1660405180602001604052806000815250613013565b60008181526001830160205260408120548015612be6576000612b216001836142e8565b8554909150600090612b35906001906142e8565b9050818114612b9a576000866000018281548110612b5557612b55614419565b9060005260206000200154905080876000018481548110612b7857612b78614419565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612bab57612bab614403565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109d0565b60009150506109d0565b610e8685613116565b6001600160a01b0384163b15610e865760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612c3d9089908990889088908890600401613dd9565b602060405180830381600087803b158015612c5757600080fd5b505af1925050508015612c87575060408051601f3d908101601f19168201909252612c8491810190613a8a565b60015b612d3457612c93614445565b806308c379a01415612ccd5750612ca8614460565b80612cb35750612ccf565b8060405162461bcd60e51b81526004016109a29190613f0a565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016109a2565b6001600160e01b0319811663bc197c8160e01b14612a705760405162461bcd60e51b81526004016109a290613f1d565b6000826000018281548110612d7b57612d7b614419565b9060005260206000200154905092915050565b606081612db25750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612ddc5780612dc681614392565b9150612dd59050600a83614292565b9150612db6565b6000816001600160401b03811115612df657612df661442f565b6040519080825280601f01601f191660200182016040528015612e20576020820181803683370190505b5090505b8415612e8b57612e356001836142e8565b9150612e42600a866143ad565b612e4d90603061427a565b60f81b818381518110612e6257612e62614419565b60200101906001600160f81b031916908160001a905350612e84600a86614292565b9450612e24565b949350505050565b6000806000612ea285856131a9565b91509150610faf81613216565b6000818152600183016020526040812054612ef6575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109d0565b5060006109d0565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612f3857612f38614419565b602090810291909101015292915050565b6001600160a01b0384163b15610e865760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612f8d9089908990889088908890600401613e37565b602060405180830381600087803b158015612fa757600080fd5b505af1925050508015612fd7575060408051601f3d908101601f19168201909252612fd491810190613a8a565b60015b612fe357612c93614445565b6001600160e01b0319811663f23a6e6160e01b14612a705760405162461bcd60e51b81526004016109a290613f1d565b6001600160a01b0384166130735760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016109a2565b336130848160008761297f88612efe565b60008481526001602090815260408083206001600160a01b0389168452909152812080548592906130b690849061427a565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610d5481600087878787612f49565b60145460ff161580613131575061312b61188f565b61ffff16155b8061314b575060065460ff16801561314b57506008544210155b8061315d57506001600160a01b038116155b610b455760405162461bcd60e51b815260206004820152601f60248201527f5472616e73666572206c6f636b656420756e74696c2073616c6520656e64730060448201526064016109a2565b6000808251604114156131e05760208301516040840151606085015160001a6131d4878285856133d1565b94509450505050610c42565b82516040141561320a57602083015160408401516131ff8683836134be565b935093505050610c42565b50600090506002610c42565b600081600481111561322a5761322a6143ed565b14156132335750565b6001816004811115613247576132476143ed565b14156132955760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109a2565b60028160048111156132a9576132a96143ed565b14156132f75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109a2565b600381600481111561330b5761330b6143ed565b14156133645760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109a2565b6004816004811115613378576133786143ed565b1415610b455760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016109a2565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561340857506000905060036134b5565b8460ff16601b1415801561342057508460ff16601c14155b1561343157506000905060046134b5565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613485573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166134ae576000600192509250506134b5565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016134df878288856133d1565b935093505050935093915050565b8280546134f99061432b565b90600052602060002090601f01602090048101928261351b5760008555613561565b82601f1061353457805160ff1916838001178555613561565b82800160010185558215613561579182015b82811115613561578251825591602001919060010190613546565b50610e059291505b80821115610e055760008155600101613569565b60006001600160401b038311156135965761359661442f565b6040516135ad601f8501601f191660200182614366565b8091508381528484840111156135c257600080fd5b83836020830137600060208583010152509392505050565b60008083601f8401126135ec57600080fd5b5081356001600160401b0381111561360357600080fd5b6020830191508360208260051b8501011115610c4257600080fd5b600082601f83011261362f57600080fd5b8135602061363c82614231565b6040516136498282614366565b8381528281019150858301600585901b8701840188101561366957600080fd5b60005b858110156136885781358452928401929084019060010161366c565b5090979650505050505050565b803580151581146136a557600080fd5b919050565b60008083601f8401126136bc57600080fd5b5081356001600160401b038111156136d357600080fd5b602083019150836020828501011115610c4257600080fd5b600082601f8301126136fc57600080fd5b61194b8383356020850161357d565b803561ffff811681146136a557600080fd5b60006020828403121561372f57600080fd5b813561194b816144e9565b6000806040838503121561374d57600080fd5b8235613758816144e9565b946020939093013593505050565b6000806040838503121561377957600080fd5b8235613784816144e9565b91506020830135613794816144e9565b809150509250929050565b600080600080600060a086880312156137b757600080fd5b85356137c2816144e9565b945060208601356137d2816144e9565b935060408601356001600160401b03808211156137ee57600080fd5b6137fa89838a0161361e565b9450606088013591508082111561381057600080fd5b61381c89838a0161361e565b9350608088013591508082111561383257600080fd5b5061383f888289016136eb565b9150509295509295909350565b600080600080600060a0868803121561386457600080fd5b853561386f816144e9565b9450602086013561387f816144e9565b9350604086013592506060860135915060808601356001600160401b038111156138a857600080fd5b61383f888289016136eb565b600080604083850312156138c757600080fd5b82356138d2816144e9565b91506138e060208401613695565b90509250929050565b600080604083850312156138fc57600080fd5b8235613907816144e9565b91506138e06020840161370b565b6000806040838503121561392857600080fd5b82356001600160401b038082111561393f57600080fd5b818501915085601f83011261395357600080fd5b8135602061396082614231565b60405161396d8282614366565b8381528281019150858301600585901b870184018b101561398d57600080fd5b600096505b848710156139b95780356139a5816144e9565b835260019690960195918301918301613992565b50965050860135925050808211156139d057600080fd5b506139dd8582860161361e565b9150509250929050565b600080600080604085870312156139fd57600080fd5b84356001600160401b0380821115613a1457600080fd5b613a20888389016135da565b90965094506020870135915080821115613a3957600080fd5b50613a46878288016135da565b95989497509550505050565b600060208284031215613a6457600080fd5b61194b82613695565b600060208284031215613a7f57600080fd5b813561194b816144fe565b600060208284031215613a9c57600080fd5b815161194b816144fe565b60008060208385031215613aba57600080fd5b82356001600160401b03811115613ad057600080fd5b613adc858286016136aa565b90969095509350505050565b600060208284031215613afa57600080fd5b81356001600160401b03811115613b1057600080fd5b8201601f81018413613b2157600080fd5b612e8b8482356020840161357d565b600060208284031215613b4257600080fd5b61194b8261370b565b60008060008060008060808789031215613b6457600080fd5b613b6d8761370b565b95506020870135945060408701356001600160401b0380821115613b9057600080fd5b613b9c8a838b016136aa565b90965094506060890135915080821115613bb557600080fd5b50613bc289828a016136aa565b979a9699509497509295939492505050565b600060208284031215613be657600080fd5b5035919050565b60008060408385031215613c0057600080fd5b50508035926020909101359150565b600080600080600060a08688031215613c2757600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600081518084526020808501945080840160005b83811015613c7a57815187529582019590820190600101613c5e565b509495945050505050565b60008151808452613c9d8160208601602086016142ff565b601f01601f19169290920160200192915050565b8183823760009101908152919050565b60008251613cd38184602087016142ff565b9190910192915050565b7f19457468657265756d205369676e6564204d6573736167653a0a000000000000815260008551613d1581601a850160208a016142ff565b606086901b6bffffffffffffffffffffffff1916601a918401918201528385602e83013760009301602e019283525090949350505050565b7f19457468657265756d205369676e6564204d6573736167653a0a000000000000815260008651613d8581601a850160208b016142ff565b606087901b6bffffffffffffffffffffffff1916601a918401918201528486602e8301378481019050602e8101600081528451613dc68183602089016142ff565b91909101602e0198975050505050505050565b6001600160a01b0386811682528516602082015260a060408201819052600090613e0590830186613c4a565b8281036060840152613e178186613c4a565b90508281036080840152613e2b8185613c85565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090613e7190830184613c85565b979650505050505050565b6020808252825182820181905260009190848201906040850190845b81811015613ebd5783516001600160a01b031683529284019291840191600101613e98565b50909695505050505050565b60208152600061194b6020830184613c4a565b604081526000613eef6040830185613c4a565b8281036020840152613f018185613c4a565b95945050505050565b60208152600061194b6020830184613c85565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b602080825260129082015271151bdbc81b585b9e481c995c5d595cdd195960721b604082015260600190565b6020808252602d908201527f43616e6e6f74206d696e74207265736572766520756e74696c2061667465722060408201526c73616c6520636f6d706c65746560981b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600e908201526d416c72656164792061637469766560901b604082015260600190565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b815161ffff1681526101c081016020830151614179602084018261ffff169052565b50604083015161418f604084018261ffff169052565b506060830151606083015260808301516141af608084018261ffff169052565b5060a083015160a083015260c08301516141cf60c084018261ffff169052565b5060e08301516141e560e084018261ffff169052565b506101008381015115159083015261012080840151908301526101408084015190830152610160808401519083015261018080840151908301526101a092830151929091019190915290565b60006001600160401b0382111561424a5761424a61442f565b5060051b60200190565b600061ffff808316818516808303821115614271576142716143c1565b01949350505050565b6000821982111561428d5761428d6143c1565b500190565b6000826142a1576142a16143d7565b500490565b60008160001904831182151516156142c0576142c06143c1565b500290565b600061ffff838116908316818110156142e0576142e06143c1565b039392505050565b6000828210156142fa576142fa6143c1565b500390565b60005b8381101561431a578181015183820152602001614302565b83811115610ada5750506000910152565b600181811c9082168061433f57607f821691505b6020821081141561436057634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f191681016001600160401b038111828210171561438b5761438b61442f565b6040525050565b60006000198214156143a6576143a66143c1565b5060010190565b6000826143bc576143bc6143d7565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d11156117135760046000803e5060005160e01c90565b600060443d101561446e5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561449d57505050505090565b82850191508151818111156144b55750505050505090565b843d87010160208285010111156144cf5750505050505090565b6144de60208286010187614366565b509095945050505050565b6001600160a01b0381168114610b4557600080fd5b6001600160e01b031981168114610b4557600080fdfea264697066735822122075c383e77be842ce2f6d82b1d0eaf6a26382d6e22e2923dc2f1b9164c229045864736f6c63430008070033000000000000000000000000a7817b07ad491f032232caf477d880113967a420

Deployed Bytecode

0x6080604052600436106102c85760003560e01c806370a0823111610175578063c19d93fb116100dc578063e985e9c511610095578063f2fde38b1161006f578063f2fde38b146108ca578063f3fef3a3146108ea578063f47430701461090a578063fe73ad771461092557600080fd5b8063e985e9c514610846578063f19605d61461088f578063f242432a146108aa57600080fd5b8063c19d93fb1461079c578063c8a84a82146107be578063d55f2d9d146107df578063d5abeb01146107ff578063defd6c5f1461081a578063e3b9398b1461083057600080fd5b8063923c235b1161012e578063923c235b146106e3578063956447d814610703578063a22cb46514610723578063a6a11bb114610743578063b0ad354114610759578063bb3bafd61461076c57600080fd5b806370a082311461063a578063715018a61461065a57806378e979251461066f57806381960b5c14610685578063850217d81461069b5780638da5cb5b146106bb57600080fd5b80632b85ed9c1161023457806336ef89af116101ed57806351b42b00116101c757806351b42b00146105c55780636c2f5acd146105da5780636d73e669146105fa5780636f6f53fe1461061a57600080fd5b806336ef89af1461056257806340d1d255146105825780634e1273f41461059857600080fd5b80632b85ed9c146104a95780632d345670146104ca5780632eb2c2d6146104ea5780633197cbb61461050a57806331ae450b1461052057806335e60bd41461054257600080fd5b806317bffd6b1161028657806317bffd6b146103c657806318886657146103e8578063249c478b1461040a57806324d7806c1461042a5780632639f4601461044a5780632a55205a1461046a57600080fd5b8062fdd58e146102cd57806301ffc9a71461030057806302fb0c5e146103305780630e89341c1461034a57806312686aae1461037757806316317c2114610391575b600080fd5b3480156102d957600080fd5b506102ed6102e836600461373a565b61093a565b6040519081526020015b60405180910390f35b34801561030c57600080fd5b5061032061031b366004613a6d565b6109d6565b60405190151581526020016102f7565b34801561033c57600080fd5b506006546103209060ff1681565b34801561035657600080fd5b5061036a610365366004613bd4565b6109f0565b6040516102f79190613f0a565b34801561038357600080fd5b506014546103209060ff1681565b34801561039d57600080fd5b506010546103b390600160201b900461ffff1681565b60405161ffff90911681526020016102f7565b3480156103d257600080fd5b506103e66103e13660046139e7565b610a84565b005b3480156103f457600080fd5b50600c546103b390600160201b900461ffff1681565b34801561041657600080fd5b506103e6610425366004613b30565b610ae0565b34801561043657600080fd5b5061032061044536600461371d565b610b48565b34801561045657600080fd5b506103e6610465366004613aa7565b610b81565b34801561047657600080fd5b5061048a610485366004613bed565b610c0e565b604080516001600160a01b0390931683526020830191909152016102f7565b3480156104b557600080fd5b506010546103b39062010000900461ffff1681565b3480156104d657600080fd5b506103e66104e536600461371d565b610c49565b3480156104f657600080fd5b506103e661050536600461379f565b610cc4565b34801561051657600080fd5b506102ed60085481565b34801561052c57600080fd5b50610535610d5b565b6040516102f79190613e7c565b34801561054e57600080fd5b506103e661055d366004613a52565b610e09565b34801561056e57600080fd5b506103e661057d366004613b4b565b610e64565b34801561058e57600080fd5b506102ed600b5481565b3480156105a457600080fd5b506105b86105b3366004613915565b610e8e565b6040516102f79190613ec9565b3480156105d157600080fd5b506103e6610fb7565b3480156105e657600080fd5b506103e66105f536600461373a565b61100b565b34801561060657600080fd5b506103e661061536600461371d565b611079565b34801561062657600080fd5b506103e66106353660046139e7565b6110f3565b34801561064657600080fd5b506102ed61065536600461371d565b611149565b34801561066657600080fd5b506103e6611156565b34801561067b57600080fd5b506102ed60075481565b34801561069157600080fd5b506102ed600f5481565b3480156106a757600080fd5b506103e66106b6366004613b30565b61118a565b3480156106c757600080fd5b506000546040516001600160a01b0390911681526020016102f7565b3480156106ef57600080fd5b506103206106fe366004613ae8565b6111ef565b34801561070f57600080fd5b506103e661071e366004613c0f565b61121a565b34801561072f57600080fd5b506103e661073e3660046138b4565b611271565b34801561074f57600080fd5b506102ed600a5481565b6103e6610767366004613b4b565b61127c565b34801561077857600080fd5b5061048a610787366004613bd4565b506012546013546001600160a01b0390911691565b3480156107a857600080fd5b506107b161145b565b6040516102f79190614157565b3480156107ca57600080fd5b50600c546103b39062010000900461ffff1681565b3480156107eb57600080fd5b506103e66107fa3660046138e9565b611716565b34801561080b57600080fd5b506010546103b39061ffff1681565b34801561082657600080fd5b506102ed600d5481565b34801561083c57600080fd5b506102ed60095481565b34801561085257600080fd5b50610320610861366004613766565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b34801561089b57600080fd5b50600c546103b39061ffff1681565b3480156108b657600080fd5b506103e66108c536600461384c565b61175e565b3480156108d657600080fd5b506103e66108e536600461371d565b6117a3565b3480156108f657600080fd5b506103e661090536600461373a565b61183b565b34801561091657600080fd5b50600e546103b39061ffff1681565b34801561093157600080fd5b506103b361188f565b60006001600160a01b0383166109ab5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526001602090815260408083206001600160a01b03861684529091529020545b92915050565b60006109e1826118b8565b806109d057506109d082611908565b6060600380546109ff9061432b565b80601f0160208091040260200160405190810160405280929190818152602001828054610a2b9061432b565b8015610a785780601f10610a4d57610100808354040283529160200191610a78565b820191906000526020600020905b815481529060010190602001808311610a5b57829003601f168201915b50505050509050919050565b33610a976000546001600160a01b031690565b6001600160a01b03161480610ab25750610ab260153361192d565b610ace5760405162461bcd60e51b81526004016109a290614113565b610ada84848484611952565b50505050565b33610af36000546001600160a01b031690565b6001600160a01b03161480610b0e5750610b0e60153361192d565b610b2a5760405162461bcd60e51b81526004016109a290614113565b610b4581610b406000546001600160a01b031690565b611ad2565b50565b6000816001600160a01b0316610b666000546001600160a01b031690565b6001600160a01b031614806109d057506109d060158361192d565b33610b946000546001600160a01b031690565b6001600160a01b03161480610baf5750610baf60153361192d565b610bcb5760405162461bcd60e51b81526004016109a290614113565b610c0a82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611b9792505050565b5050565b60125460135460009182916001600160a01b039091169061271090610c3390866142a6565b610c3d9190614292565b915091505b9250929050565b6000546001600160a01b03163314610c735760405162461bcd60e51b81526004016109a2906140b6565b610c7e60158261192d565b15610b455760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a3610c0a601582611baa565b6001600160a01b038516331480610ce05750610ce08533610861565b610d475760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016109a2565b610d548585858585611bbf565b5050505050565b6060610d676015611da5565b6001600160401b03811115610d7e57610d7e61442f565b604051908082528060200260200182016040528015610da7578160200160208202803683370190505b50905060005b610db76015611da5565b811015610e0557610dc9601582611daf565b828281518110610ddb57610ddb614419565b6001600160a01b039092166020928302919091019091015280610dfd81614392565b915050610dad565b5090565b33610e1c6000546001600160a01b031690565b6001600160a01b03161480610e375750610e3760153361192d565b610e535760405162461bcd60e51b81526004016109a290614113565b6014805460ff191682151517905550565b610e6c611dbb565b610e7a85858585858b611e50565b610e8633876001612040565b505050505050565b60608151835114610ef35760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016109a2565b600083516001600160401b03811115610f0e57610f0e61442f565b604051908082528060200260200182016040528015610f37578160200160208202803683370190505b50905060005b8451811015610faf57610f82858281518110610f5b57610f5b614419565b6020026020010151858381518110610f7557610f75614419565b602002602001015161093a565b828281518110610f9457610f94614419565b6020908102919091010152610fa881614392565b9050610f3d565b509392505050565b33610fca6000546001600160a01b031690565b6001600160a01b03161480610fe55750610fe560153361192d565b6110015760405162461bcd60e51b81526004016109a290614113565b611009612106565b565b3361101e6000546001600160a01b031690565b6001600160a01b03161480611039575061103960153361192d565b6110555760405162461bcd60e51b81526004016109a290614113565b601280546001600160a01b0319166001600160a01b03841617905560138190555050565b6000546001600160a01b031633146110a35760405162461bcd60e51b81526004016109a2906140b6565b6110ae60158261192d565b610b455760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a3610c0a60158261214f565b336111066000546001600160a01b031690565b6001600160a01b03161480611121575061112160153361192d565b61113d5760405162461bcd60e51b81526004016109a290614113565b610ada84848484612164565b60006109d082600161093a565b6000546001600160a01b031633146111805760405162461bcd60e51b81526004016109a2906140b6565b61100960006121fc565b3361119d6000546001600160a01b031690565b6001600160a01b031614806111b857506111b860153361192d565b6111d45760405162461bcd60e51b81526004016109a290614113565b610b45816111ea6000546001600160a01b031690565b61224c565b60006005826040516112019190613cc1565b9081526040519081900360200190205460ff1692915050565b3361122d6000546001600160a01b031690565b6001600160a01b03161480611248575061124860153361192d565b6112645760405162461bcd60e51b81526004016109a290614113565b610d54858585858561227b565b610c0a338383612430565b611284612511565b61128c61188f565b61ffff168661ffff16111580156112bb5750600c5461ffff1615806112bb5750600c5461ffff90811690871611155b6112d75760405162461bcd60e51b81526004016109a290613fae565b60145460009060ff161580156113085750600e5461ffff161515806113085750600c54600160201b900461ffff1615155b1561132757503360009081526011602052604090205461ffff16611333565b61133033611149565b90505b60006009546007544261134691906142e8565b10156113de57600e5461ffff1615806113745750600e5461136c90839061ffff166142e8565b8861ffff1611155b80156113b15750600c54600160201b900461ffff1615806113b15750600c546113a9908390600160201b900461ffff166142e8565b8861ffff1611155b6113cd5760405162461bcd60e51b81526004016109a290613fae565b6113d688612598565b506001611439565b600c54600160201b900461ffff1615806114145750600c5461140c908390600160201b900461ffff166142e8565b8861ffff1611155b6114305760405162461bcd60e51b81526004016109a290613fae565b611439886125f7565b6114468787878787612608565b611451338983612040565b5050505050505050565b604080516101c081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a08101919091523361157757604080516101c081018252600c5461ffff8082168352620100009091041660208201529081016114ff61188f565b61ffff9081168252600d546020830152600c54600160201b900481166040830152600f546060830152600e54166080820152600060a082015260065460ff16151560c082015260075460e0820152600854610100820152600954610120820152600a54610140820152600b5461016090910152919050565b60145460ff161580156115a55750600e5461ffff161515806115a55750600c54600160201b900461ffff1615155b1561166657604080516101c081018252600c5461ffff8082168352620100009091041660208201529081016115d861188f565b61ffff9081168252600d54602080840191909152600c54600160201b90048216604080850191909152600f546060850152600e548316608085015233600090815260119092529020541660a082015260065460ff16151560c082015260075460e0820152600854610100820152600954610120820152600a54610140820152600b5461016090910152919050565b604080516101c081018252600c5461ffff80821683526201000090910416602082015290810161169461188f565b61ffff9081168252600d546020830152600c54600160201b900481166040830152600f546060830152600e5416608082015260a0016116d233611149565b61ffff16815260065460ff1615156020820152600754604082015260085460608201526009546080820152600a5460a0820152600b5460c090910152919050565b90565b6001600160a01b03821633148061173257506117328233610861565b61174e5760405162461bcd60e51b81526004016109a290613f65565b610c0a82600161ffff84166127cc565b6001600160a01b03851633148061177a575061177a8533610861565b6117965760405162461bcd60e51b81526004016109a290613f65565b610d548585858585612949565b6000546001600160a01b031633146117cd5760405162461bcd60e51b81526004016109a2906140b6565b6001600160a01b0381166118325760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109a2565b610b45816121fc565b3361184e6000546001600160a01b031690565b6001600160a01b03161480611869575061186960153361192d565b6118855760405162461bcd60e51b81526004016109a290614113565b610c0a8282612a79565b601054600c546000916118b39161ffff6201000092839004811692909104166142c5565b905090565b60006001600160e01b03198216636cdb3d1360e11b14806118e957506001600160e01b031982166303a24d0760e21b145b806109d057506301ffc9a760e01b6001600160e01b03198316146109d0565b60006001600160e01b03198216632a9f3abf60e11b14806109d057506109d0826118b8565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b6008541580159061196557504260085411155b6119815760405162461bcd60e51b81526004016109a290613fda565b6000805b828110156119d25785858281811061199f5761199f614419565b90506020020160208101906119b49190613b30565b6119be9083614254565b9150806119ca81614392565b915050611985565b5060105461ffff8082169183916119fa91600160201b81048216916201000090910416614254565b611a049190614254565b61ffff161115611a265760405162461bcd60e51b81526004016109a290613fae565b80601060048282829054906101000a900461ffff16611a459190614254565b92506101000a81548161ffff021916908361ffff16021790555060005b82811015610e8657611ac0848483818110611a7f57611a7f614419565b9050602002016020810190611a94919061371d565b878784818110611aa657611aa6614419565b9050602002016020810190611abb9190613b30565b612ad9565b80611aca81614392565b915050611a62565b60085415801590611ae557504260085411155b611b015760405162461bcd60e51b81526004016109a290613fda565b60105461ffff808216918491611b2891600160201b81048216916201000090910416614254565b611b329190614254565b61ffff161115611b545760405162461bcd60e51b81526004016109a290613fae565b81601060048282829054906101000a900461ffff16611b739190614254565b92506101000a81548161ffff021916908361ffff160217905550610c0a8183612ad9565b8051610c0a9060039060208401906134ed565b600061194b836001600160a01b038416612afd565b8151835114611c215760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016109a2565b6001600160a01b038416611c475760405162461bcd60e51b81526004016109a290614027565b33611c56818787878787612bf0565b60005b8451811015611d3f576000858281518110611c7657611c76614419565b602002602001015190506000858381518110611c9457611c94614419565b60209081029190910181015160008481526001835260408082206001600160a01b038e168352909352919091205490915081811015611ce55760405162461bcd60e51b81526004016109a29061406c565b60008381526001602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611d2490849061427a565b9250508190555050505080611d3890614392565b9050611c59565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611d8f929190613edc565b60405180910390a4610e86818787878787612bf9565b60006109d0825490565b600061194b8383612d64565b60065460ff16611df85760405162461bcd60e51b8152602060048201526008602482015267496e61637469766560c01b60448201526064016109a2565b600a544210158015611e0c5750600b544211155b6110095760405162461bcd60e51b815260206004820152601560248201527427baba39b4b2329031b630b4b6903832b934b7b21760591b60448201526064016109a2565b60058383604051611e62929190613cb1565b9081526040519081900360200190205460ff1615611ebe5760405162461bcd60e51b815260206004820152601960248201527821b0b73737ba103932b83630bc903a3930b739b0b1ba34b7b760391b60448201526064016109a2565b6000611eeb611ed08361ffff16612d8e565b51611edc85601461427a565b611ee6919061427a565b612d8e565b338585611efb8661ffff16612d8e565b604051602001611f0f959493929190613d4d565b604051602081830303815290604052805190602001209050808714611f6a5760405162461bcd60e51b81526020600482015260116024820152704d616c666f726d6564206d65737361676560781b60448201526064016109a2565b6000611fae87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c93925050612e939050565b6004549091506001600160a01b038083169116146120025760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b60448201526064016109a2565b600160058686604051612016929190613cb1565b908152604051908190036020019020805491151560ff199092169190911790555050505050505050565b81601060028282829054906101000a900461ffff1661205f9190614254565b825461ffff9182166101009390930a92830291909202199091161790555060145460ff161580156120b45750600e5461ffff161580159061209d5750805b806120b45750600c54600160201b900461ffff1615155b156120f75733600090815260116020526040812080548492906120dc90849061ffff16614254565b92506101000a81548161ffff021916908361ffff1602179055505b6121018383612ad9565b505050565b6000600781905560088190556006805460ff19169055600a819055600b8190556040517fb02389feab3af620e2374d4d559b436ea226b1e6c9c31fe77dfbff3d40cbe9ba9190a1565b600061194b836001600160a01b038416612eaf565b60065460ff16156121875760405162461bcd60e51b81526004016109a2906140eb565b60005b81811015610d54576121ea8383838181106121a7576121a7614419565b90506020020160208101906121bc919061371d565b8686848181106121ce576121ce614419565b90506020020160208101906121e39190613b30565b6001612040565b806121f481614392565b91505061218a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60065460ff161561226f5760405162461bcd60e51b81526004016109a2906140eb565b610c0a81836001612040565b60065460ff161561229e5760405162461bcd60e51b81526004016109a2906140eb565b4285116122ed5760405162461bcd60e51b815260206004820152601b60248201527f43616e6e6f7420616374697661746520696e207468652070617374000000000060448201526064016109a2565b8383106123545760405162461bcd60e51b815260206004820152602f60248201527f50726573616c6520496e74657276616c2063616e6e6f74206265206c6f6e676560448201526e72207468616e207468652073616c6560881b60648201526084016109a2565b8082111580156123645750848111155b6123a65760405162461bcd60e51b8152602060048201526013602482015272496e76616c696420636c61696d2074696d657360681b60448201526064016109a2565b60078590556123b5848661427a565b60088190556009849055600a839055600b8290556006805460ff1916600117905560075460408051918252602082019290925290810184905260608101839052608081018290527fe512d106f8172b08abfd2fc5ddfdb7e2401381780ae29e29f1352b862f1d27319060a00160405180910390a15050505050565b816001600160a01b0316836001600160a01b031614156124a45760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016109a2565b6001600160a01b03838116600081815260026020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60065460ff1661254e5760405162461bcd60e51b8152602060048201526008602482015267496e61637469766560c01b60448201526064016109a2565b6007544210156110095760405162461bcd60e51b815260206004820152601560248201527450757263686173696e67206e6f742061637469766560581b60448201526064016109a2565b600f546125a99061ffff83166142a6565b3414610b455760405162461bcd60e51b815260206004820152601c60248201527f496e76616c696420707572636861736520616d6f756e742073656e740000000060448201526064016109a2565b600d546125a99061ffff83166142a6565b6005828260405161261a929190613cb1565b9081526040519081900360200190205460ff16156126765760405162461bcd60e51b815260206004820152601960248201527821b0b73737ba103932b83630bc903a3930b739b0b1ba34b7b760391b60448201526064016109a2565b6000612686611ee683601461427a565b33848460405160200161269c9493929190613cdd565b6040516020818303038152906040528051906020012090508086146126f75760405162461bcd60e51b81526020600482015260116024820152704d616c666f726d6564206d65737361676560781b60448201526064016109a2565b600061273b86868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b93925050612e939050565b6004549091506001600160a01b0380831691161461278f5760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b60448201526064016109a2565b6001600585856040516127a3929190613cb1565b908152604051908190036020019020805491151560ff1990921691909117905550505050505050565b6001600160a01b03831661282e5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016109a2565b3361285d8185600061283f87612efe565b61284887612efe565b60405180602001604052806000815250612bf0565b60008381526001602090815260408083206001600160a01b0388168452909152902054828110156128dc5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016109a2565b60008481526001602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b03841661296f5760405162461bcd60e51b81526004016109a290614027565b3361298e81878761297f88612efe565b61298888612efe565b87612bf0565b60008481526001602090815260408083206001600160a01b038a168452909152902054838110156129d15760405162461bcd60e51b81526004016109a29061406c565b60008581526001602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290612a1090849061427a565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612a70828888888888612f49565b50505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612ac6576040519150601f19603f3d011682016040523d82523d6000602084013e612acb565b606091505b505090508061210157600080fd5b610c0a82600161ffff168361ffff1660405180602001604052806000815250613013565b60008181526001830160205260408120548015612be6576000612b216001836142e8565b8554909150600090612b35906001906142e8565b9050818114612b9a576000866000018281548110612b5557612b55614419565b9060005260206000200154905080876000018481548110612b7857612b78614419565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612bab57612bab614403565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506109d0565b60009150506109d0565b610e8685613116565b6001600160a01b0384163b15610e865760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612c3d9089908990889088908890600401613dd9565b602060405180830381600087803b158015612c5757600080fd5b505af1925050508015612c87575060408051601f3d908101601f19168201909252612c8491810190613a8a565b60015b612d3457612c93614445565b806308c379a01415612ccd5750612ca8614460565b80612cb35750612ccf565b8060405162461bcd60e51b81526004016109a29190613f0a565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016109a2565b6001600160e01b0319811663bc197c8160e01b14612a705760405162461bcd60e51b81526004016109a290613f1d565b6000826000018281548110612d7b57612d7b614419565b9060005260206000200154905092915050565b606081612db25750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612ddc5780612dc681614392565b9150612dd59050600a83614292565b9150612db6565b6000816001600160401b03811115612df657612df661442f565b6040519080825280601f01601f191660200182016040528015612e20576020820181803683370190505b5090505b8415612e8b57612e356001836142e8565b9150612e42600a866143ad565b612e4d90603061427a565b60f81b818381518110612e6257612e62614419565b60200101906001600160f81b031916908160001a905350612e84600a86614292565b9450612e24565b949350505050565b6000806000612ea285856131a9565b91509150610faf81613216565b6000818152600183016020526040812054612ef6575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556109d0565b5060006109d0565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612f3857612f38614419565b602090810291909101015292915050565b6001600160a01b0384163b15610e865760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612f8d9089908990889088908890600401613e37565b602060405180830381600087803b158015612fa757600080fd5b505af1925050508015612fd7575060408051601f3d908101601f19168201909252612fd491810190613a8a565b60015b612fe357612c93614445565b6001600160e01b0319811663f23a6e6160e01b14612a705760405162461bcd60e51b81526004016109a290613f1d565b6001600160a01b0384166130735760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016109a2565b336130848160008761297f88612efe565b60008481526001602090815260408083206001600160a01b0389168452909152812080548592906130b690849061427a565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610d5481600087878787612f49565b60145460ff161580613131575061312b61188f565b61ffff16155b8061314b575060065460ff16801561314b57506008544210155b8061315d57506001600160a01b038116155b610b455760405162461bcd60e51b815260206004820152601f60248201527f5472616e73666572206c6f636b656420756e74696c2073616c6520656e64730060448201526064016109a2565b6000808251604114156131e05760208301516040840151606085015160001a6131d4878285856133d1565b94509450505050610c42565b82516040141561320a57602083015160408401516131ff8683836134be565b935093505050610c42565b50600090506002610c42565b600081600481111561322a5761322a6143ed565b14156132335750565b6001816004811115613247576132476143ed565b14156132955760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109a2565b60028160048111156132a9576132a96143ed565b14156132f75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109a2565b600381600481111561330b5761330b6143ed565b14156133645760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109a2565b6004816004811115613378576133786143ed565b1415610b455760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016109a2565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561340857506000905060036134b5565b8460ff16601b1415801561342057508460ff16601c14155b1561343157506000905060046134b5565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613485573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166134ae576000600192509250506134b5565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016134df878288856133d1565b935093505050935093915050565b8280546134f99061432b565b90600052602060002090601f01602090048101928261351b5760008555613561565b82601f1061353457805160ff1916838001178555613561565b82800160010185558215613561579182015b82811115613561578251825591602001919060010190613546565b50610e059291505b80821115610e055760008155600101613569565b60006001600160401b038311156135965761359661442f565b6040516135ad601f8501601f191660200182614366565b8091508381528484840111156135c257600080fd5b83836020830137600060208583010152509392505050565b60008083601f8401126135ec57600080fd5b5081356001600160401b0381111561360357600080fd5b6020830191508360208260051b8501011115610c4257600080fd5b600082601f83011261362f57600080fd5b8135602061363c82614231565b6040516136498282614366565b8381528281019150858301600585901b8701840188101561366957600080fd5b60005b858110156136885781358452928401929084019060010161366c565b5090979650505050505050565b803580151581146136a557600080fd5b919050565b60008083601f8401126136bc57600080fd5b5081356001600160401b038111156136d357600080fd5b602083019150836020828501011115610c4257600080fd5b600082601f8301126136fc57600080fd5b61194b8383356020850161357d565b803561ffff811681146136a557600080fd5b60006020828403121561372f57600080fd5b813561194b816144e9565b6000806040838503121561374d57600080fd5b8235613758816144e9565b946020939093013593505050565b6000806040838503121561377957600080fd5b8235613784816144e9565b91506020830135613794816144e9565b809150509250929050565b600080600080600060a086880312156137b757600080fd5b85356137c2816144e9565b945060208601356137d2816144e9565b935060408601356001600160401b03808211156137ee57600080fd5b6137fa89838a0161361e565b9450606088013591508082111561381057600080fd5b61381c89838a0161361e565b9350608088013591508082111561383257600080fd5b5061383f888289016136eb565b9150509295509295909350565b600080600080600060a0868803121561386457600080fd5b853561386f816144e9565b9450602086013561387f816144e9565b9350604086013592506060860135915060808601356001600160401b038111156138a857600080fd5b61383f888289016136eb565b600080604083850312156138c757600080fd5b82356138d2816144e9565b91506138e060208401613695565b90509250929050565b600080604083850312156138fc57600080fd5b8235613907816144e9565b91506138e06020840161370b565b6000806040838503121561392857600080fd5b82356001600160401b038082111561393f57600080fd5b818501915085601f83011261395357600080fd5b8135602061396082614231565b60405161396d8282614366565b8381528281019150858301600585901b870184018b101561398d57600080fd5b600096505b848710156139b95780356139a5816144e9565b835260019690960195918301918301613992565b50965050860135925050808211156139d057600080fd5b506139dd8582860161361e565b9150509250929050565b600080600080604085870312156139fd57600080fd5b84356001600160401b0380821115613a1457600080fd5b613a20888389016135da565b90965094506020870135915080821115613a3957600080fd5b50613a46878288016135da565b95989497509550505050565b600060208284031215613a6457600080fd5b61194b82613695565b600060208284031215613a7f57600080fd5b813561194b816144fe565b600060208284031215613a9c57600080fd5b815161194b816144fe565b60008060208385031215613aba57600080fd5b82356001600160401b03811115613ad057600080fd5b613adc858286016136aa565b90969095509350505050565b600060208284031215613afa57600080fd5b81356001600160401b03811115613b1057600080fd5b8201601f81018413613b2157600080fd5b612e8b8482356020840161357d565b600060208284031215613b4257600080fd5b61194b8261370b565b60008060008060008060808789031215613b6457600080fd5b613b6d8761370b565b95506020870135945060408701356001600160401b0380821115613b9057600080fd5b613b9c8a838b016136aa565b90965094506060890135915080821115613bb557600080fd5b50613bc289828a016136aa565b979a9699509497509295939492505050565b600060208284031215613be657600080fd5b5035919050565b60008060408385031215613c0057600080fd5b50508035926020909101359150565b600080600080600060a08688031215613c2757600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b600081518084526020808501945080840160005b83811015613c7a57815187529582019590820190600101613c5e565b509495945050505050565b60008151808452613c9d8160208601602086016142ff565b601f01601f19169290920160200192915050565b8183823760009101908152919050565b60008251613cd38184602087016142ff565b9190910192915050565b7f19457468657265756d205369676e6564204d6573736167653a0a000000000000815260008551613d1581601a850160208a016142ff565b606086901b6bffffffffffffffffffffffff1916601a918401918201528385602e83013760009301602e019283525090949350505050565b7f19457468657265756d205369676e6564204d6573736167653a0a000000000000815260008651613d8581601a850160208b016142ff565b606087901b6bffffffffffffffffffffffff1916601a918401918201528486602e8301378481019050602e8101600081528451613dc68183602089016142ff565b91909101602e0198975050505050505050565b6001600160a01b0386811682528516602082015260a060408201819052600090613e0590830186613c4a565b8281036060840152613e178186613c4a565b90508281036080840152613e2b8185613c85565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090613e7190830184613c85565b979650505050505050565b6020808252825182820181905260009190848201906040850190845b81811015613ebd5783516001600160a01b031683529284019291840191600101613e98565b50909695505050505050565b60208152600061194b6020830184613c4a565b604081526000613eef6040830185613c4a565b8281036020840152613f018185613c4a565b95945050505050565b60208152600061194b6020830184613c85565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b602080825260129082015271151bdbc81b585b9e481c995c5d595cdd195960721b604082015260600190565b6020808252602d908201527f43616e6e6f74206d696e74207265736572766520756e74696c2061667465722060408201526c73616c6520636f6d706c65746560981b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600e908201526d416c72656164792061637469766560901b604082015260600190565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b815161ffff1681526101c081016020830151614179602084018261ffff169052565b50604083015161418f604084018261ffff169052565b506060830151606083015260808301516141af608084018261ffff169052565b5060a083015160a083015260c08301516141cf60c084018261ffff169052565b5060e08301516141e560e084018261ffff169052565b506101008381015115159083015261012080840151908301526101408084015190830152610160808401519083015261018080840151908301526101a092830151929091019190915290565b60006001600160401b0382111561424a5761424a61442f565b5060051b60200190565b600061ffff808316818516808303821115614271576142716143c1565b01949350505050565b6000821982111561428d5761428d6143c1565b500190565b6000826142a1576142a16143d7565b500490565b60008160001904831182151516156142c0576142c06143c1565b500290565b600061ffff838116908316818110156142e0576142e06143c1565b039392505050565b6000828210156142fa576142fa6143c1565b500390565b60005b8381101561431a578181015183820152602001614302565b83811115610ada5750506000910152565b600181811c9082168061433f57607f821691505b6020821081141561436057634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f191681016001600160401b038111828210171561438b5761438b61442f565b6040525050565b60006000198214156143a6576143a66143c1565b5060010190565b6000826143bc576143bc6143d7565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d11156117135760046000803e5060005160e01c90565b600060443d101561446e5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561449d57505050505090565b82850191508151818111156144b55750505050505090565b843d87010160208285010111156144cf5750505050505090565b6144de60208286010187614366565b509095945050505050565b6001600160a01b0381168114610b4557600080fd5b6001600160e01b031981168114610b4557600080fdfea264697066735822122075c383e77be842ce2f6d82b1d0eaf6a26382d6e22e2923dc2f1b9164c229045864736f6c63430008070033

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

000000000000000000000000a7817b07ad491f032232caf477d880113967a420

-----Decoded View---------------
Arg [0] : signingAddress_ (address): 0xa7817B07Ad491F032232CAF477D880113967a420

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a7817b07ad491f032232caf477d880113967a420


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.