ETH Price: $1,978.20 (-2.22%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

TokenTracker

Multichain Info

1 address found via
Transaction Hash
Method
Block
From
To
Set Approval For...221192552025-03-24 20:48:59342 days ago1742849339IN
0x6A00a098...B8721C42D
0 ETH0.000018670.76858552
Set Approval For...218466962025-02-14 19:11:35380 days ago1739560295IN
0x6A00a098...B8721C42D
0 ETH0.000044241.82684429
Set Approval For...175168922023-06-19 22:56:23986 days ago1687215383IN
0x6A00a098...B8721C42D
0 ETH0.0010517722.75869421
Set Approval For...169803992023-04-05 5:01:591061 days ago1680670919IN
0x6A00a098...B8721C42D
0 ETH0.0013756629.82153622
Set Approval For...169094792023-03-26 5:19:351071 days ago1679807975IN
0x6A00a098...B8721C42D
0 ETH0.0006677514.47559242
Set Approval For...167007612023-02-24 21:09:351101 days ago1677272975IN
0x6A00a098...B8721C42D
0 ETH0.0011291724.47817835
Safe Transfer Fr...165151172023-01-29 21:19:231127 days ago1675027163IN
0x6A00a098...B8721C42D
0 ETH0.0012973319.95845479
Set Approval For...164383182023-01-19 3:58:351137 days ago1674100715IN
0x6A00a098...B8721C42D
0 ETH0.000837318.15105787
Set Approval For...164142742023-01-15 19:25:351141 days ago1673810735IN
0x6A00a098...B8721C42D
0 ETH0.0010672123.13483843
Set Approval For...164132782023-01-15 16:05:111141 days ago1673798711IN
0x6A00a098...B8721C42D
0 ETH0.0011403124.71952695
Set Approval For...164050062023-01-14 12:20:351142 days ago1673698835IN
0x6A00a098...B8721C42D
0 ETH0.0006987615.14776985
Set Approval For...163817522023-01-11 6:22:591145 days ago1673418179IN
0x6A00a098...B8721C42D
0 ETH0.0007309915.84642463
Set Approval For...163735012023-01-10 2:45:111147 days ago1673318711IN
0x6A00a098...B8721C42D
0 ETH0.0010415522.57868678
Set Approval For...163468112023-01-06 9:20:471150 days ago1672996847IN
0x6A00a098...B8721C42D
0 ETH0.0006871514.89599103
Set Approval For...163454472023-01-06 4:46:111150 days ago1672980371IN
0x6A00a098...B8721C42D
0 ETH0.0007606816.4901101
Set Approval For...162901992022-12-29 11:45:111158 days ago1672314311IN
0x6A00a098...B8721C42D
0 ETH0.0006085313.19180549
Set Approval For...162855332022-12-28 20:06:231159 days ago1672257983IN
0x6A00a098...B8721C42D
0 ETH0.0013047828.28506095
Transfer From162822622022-12-28 9:10:111159 days ago1672218611IN
0x6A00a098...B8721C42D
0 ETH0.0010507815.73597241
Transfer From162822552022-12-28 9:08:471159 days ago1672218527IN
0x6A00a098...B8721C42D
0 ETH0.0018630914.06742699
Safe Transfer Fr...162820522022-12-28 8:27:591159 days ago1672216079IN
0x6A00a098...B8721C42D
0 ETH0.0006773514.35217914
Withdraw162787622022-12-27 21:26:471160 days ago1672176407IN
0x6A00a098...B8721C42D
0 ETH0.0009825813.26759581
Set Active162781612022-12-27 19:25:591160 days ago1672169159IN
0x6A00a098...B8721C42D
0 ETH0.0005607718.63485091
Mint Token162781572022-12-27 19:25:111160 days ago1672169111IN
0x6A00a098...B8721C42D
0 ETH0.0016655815.81287432
Mint Token162781082022-12-27 19:15:231160 days ago1672168523IN
0x6A00a098...B8721C42D
0.0001 ETH0.0023509130.03637219
Set Max Per User162780802022-12-27 19:09:471160 days ago1672168187IN
0x6A00a098...B8721C42D
0 ETH0.0005416318.73017455
View all transactions

Latest 8 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer162787622022-12-27 21:26:471160 days ago1672176407
0x6A00a098...B8721C42D
0.032525 ETH
Transfer162787622022-12-27 21:26:471160 days ago1672176407
0x6A00a098...B8721C42D
0.032525 ETH
Transfer162787622022-12-27 21:26:471160 days ago1672176407
0x6A00a098...B8721C42D
0.032525 ETH
Transfer162787622022-12-27 21:26:471160 days ago1672176407
0x6A00a098...B8721C42D
0.032525 ETH
Transfer162555402022-12-24 15:38:351163 days ago1671896315
0x6A00a098...B8721C42D
0.6875 ETH
Transfer162555402022-12-24 15:38:351163 days ago1671896315
0x6A00a098...B8721C42D
0.6875 ETH
Transfer162555402022-12-24 15:38:351163 days ago1671896315
0x6A00a098...B8721C42D
0.6875 ETH
Transfer162555402022-12-24 15:38:351163 days ago1671896315
0x6A00a098...B8721C42D
0.6875 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
JALB

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
File 1 of 20 : JALB.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.4;

import "./OnchainERC721JM.sol";
import "./interfaces/IPixArtNFT.sol";

/**                                 
                                 █████████
                              ███████████████
                              ███████████████
                              ███████████████
                                 █████████
                                    ███
                     █████████████████████████████████
                  ▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒█████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▓▓▓            █████████                        ▓▓▓
         ░░░      ▓▓▓            ███████████████                  ▓▓▓
      ░░░         ▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒███▒▒▒▒▒▒███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓         ░░░
░░░   ░░░         ▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒███▒▒▒▒▒▒███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓      ░░░   ░░░
   ░░░      ░░░   ▓▓▓░░░            ███      ███               ▒▒▒▓▓▓      ░░░
   ░░░      ░░░   ▓▓▓░░░            ███      █████▌    JALB    ▒▒▒▓▓▓      ░░░
*/

/// @title JALB
/// @author justalittlebit.me
/// @notice JALB is a collection of 1010 unique NFTs.
contract JALB is OnchainERC721JM {
    constructor(
        string memory tokenName,
        string memory symbol,
        uint256 collectionSize,
        uint256 devReserved,
        uint256 _royalties,
        address[] memory _beneficiary
    ) OnchainERC721JM(tokenName, symbol, collectionSize, devReserved, _royalties, _beneficiary) {
        ERC721JM.price = 0.03 ether;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(account),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControlEnumerable.sol";
import "./AccessControl.sol";
import "../utils/structs/EnumerableSet.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;

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

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {_grantRole} to track enumerable memberships
     */
    function _grantRole(bytes32 role, address account) internal virtual override {
        super._grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {_revokeRole} to track enumerable memberships
     */
    function _revokeRole(bytes32 role, address account) internal virtual override {
        super._revokeRole(role, account);
        _roleMembers[role].remove(account);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

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

    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");
        }
    }

    /**
     * @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) {
        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.
            /// @solidity memory-safe-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 {
            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 = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 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 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));
    }
}

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

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

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

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

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

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

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

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

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

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

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

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

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

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

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

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

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

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

        return result;
    }
}

// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";

error ContractIsLocked();
error ContractIsNotLocked();
error MintingNotStarted();
error MintingFinished();
error InvalidSignature();
error OnlyHumans();
error isZero();
error ExcededMaxPerTx();
error ExcededMaxPerUser();
error InsufficientETH();
error NotYourToken();
error CollectionIsRevealed();
error CollectionIsNotRevealed();
error MissingBaseURI();
error MissingContractURI();
error MissingPreviewTokenURI();
error ReserveArlreadyClaimed();
error BeneficiaryReserveExceded();

/// @title ERC721JM
/// @author Joyce and TheSergeant
/// @notice You can use this contract to mint an ERC721JM NFT
contract ERC721JM is ERC721A, IERC2981, Ownable, AccessControlEnumerable, ReentrancyGuard {
    using Strings for uint256;

    string internal __baseURI;
    string internal _contractURI;
    uint256 internal DEV_RESERVE;
    uint256 public immutable MAX_SUPPLY;
    uint256 internal immutable MAX_MINT_PER_BENEFICIARY;

    // IMPORTANT: the signer obj and the _signer solidity variable must have the same address
    address private _signer;
    uint256 public price = 0.2 ether;
    uint8 public maxPerUser = 2;
    uint8 public maxPerTx = 2;
    address[] public beneficiary;
    mapping(address => uint256) internal beneficiaryReserve;

    // ROYALTIES
    uint256 private royalties;
    address private royaltiesAddr;

    // CONTRACT STATE
    bool public isActive = false;
    bool public contractLocked = false;
    bool public isWhitelisteActive = true;
    bool private devMinted = false;
    bool public isRevealed = false;
    string public previewTokenURI;
    mapping(uint256 => string) public customTokenURI;

    // ROLE
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
    bytes32 public constant BENEFICIARY_ROLE = keccak256("BENEFICIARY_ROLE");

    // EVENTS
    event Mint(address _from, uint256 quantity, uint256 price);
    event Withdraw(address _from, uint256 quantity);
    event NewBaseURI(string _baseURI);
    event ActiveStatus(bool _ActiveStatus);
    event ContractLocked(bool _isLocked);
    event PermanentURI(string _value, uint256 indexed _id);

    constructor(
        string memory tokenName,
        string memory symbol,
        uint256 _collectionSize,
        uint256 _devReserved,
        uint256 _royalties,
        address[] memory _beneficiary
    ) ERC721A(tokenName, symbol) {
        __baseURI = "ipfs://";

        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
        _setupRole(BENEFICIARY_ROLE, _msgSender());
        _setupRole(PAUSER_ROLE, _msgSender());

        // Minter Role
        for (uint256 i = 0; i < _beneficiary.length; i++) {
            _setupRole(BENEFICIARY_ROLE, _beneficiary[i]);
        }

        MAX_SUPPLY = _collectionSize;
        DEV_RESERVE = _devReserved;
        MAX_MINT_PER_BENEFICIARY = DEV_RESERVE / _beneficiary.length;

        royalties = _royalties;
        royaltiesAddr = address(this);

        setBeneficiary(_beneficiary);
        _signer = beneficiary[0]; //FIXME - msg.sender
    }

    /// @dev See {ERC721A-_startTokenId}.
    function _startTokenId() internal view virtual override returns (uint256) {
        return 1;
    }

    /// @dev See {ERC721A-tokenURI}.
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
        // custom token URI
        if (bytes(customTokenURI[tokenId]).length > 0) {
            return customTokenURI[tokenId];
        }
        // is revealed
        if (!isRevealed && bytes(previewTokenURI).length != 0) {
            if (bytes(previewTokenURI).length == 0) revert MissingPreviewTokenURI();
            return previewTokenURI;
        } else {
            string memory baseURI = _baseURI();
            if (bytes(baseURI).length == 0) revert MissingBaseURI();
            return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
        }
    }

    /// @dev See {IERC165-supportsInterface}.
    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC721A, IERC165, AccessControlEnumerable)
        returns (bool)
    {
        return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
    }

    /// @dev See {IERC2981-royaltyInfo}.
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        override
        returns (address receiver, uint256 royaltyAmount)
    {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
        return (royaltiesAddr, (salePrice * royalties) / 100);
    }

    /// @notice Get contractURI
    /// @return (string memory) The JSON metadata of the collection
    function contractURI() public view returns (string memory) {
        return _contractURI;
    }

    /// @notice Get baseURI
    /// @return (string memory) Base url of the collection
    function _baseURI() internal view virtual override returns (string memory) {
        return __baseURI;
    }

    modifier _requireMint(uint256 quantity) {
        if(!isActive) revert MintingNotStarted();
        if(quantity == 0) revert isZero();
        if(tx.origin != _msgSender()) revert OnlyHumans();
        if(totalSupply() + quantity > MAX_SUPPLY) revert MintingFinished();
        if(quantity > maxPerTx) revert ExcededMaxPerTx();
        if(_numberMinted(_msgSender()) + quantity > maxPerUser) revert ExcededMaxPerUser();
        _;
    }

    /// @notice  Mint the NFT to the caller addres
    /// @param quantity (uint256) Number of NFTs to mint
    /// @param signature (bytes) Whitelist signature
    /// @param nonce (bytes32) Nonce
    function mintToken(
        uint256 quantity,
        bytes calldata signature,
        bytes32 nonce
    ) external payable nonReentrant _requireMint(quantity){
        if (isWhitelisteActive) {
            if(!_verifySignature(signature, quantity, msg.value, nonce)) revert InvalidSignature();
        } else {
			if(msg.value < currentPrice() * quantity) revert InsufficientETH();
        }

        _safeMint(_msgSender(), quantity);
        //_mint(_msgSender(), quantity, '', false);
        emit Mint(_msgSender(), quantity, msg.value);
        // Refund excedeed ETH
        if (msg.value > (quantity * currentPrice()) && !isWhitelisteActive) {
            payable(_msgSender()).transfer(msg.value - (quantity * currentPrice()));
        }
    }

    /// @notice Check if an user is allowed to mint a token
    /// @notice It checks if the signature given by the user is valid
    /// @param signature (bytes) Signature to check
    /// @param quantity (uint256) Number of NFT requested to mint
    /// @param nonce (bytes32) Nonce
    /// @return (bool) Returns true if the signature is valid
    function _verifySignature(
        bytes calldata signature,
        uint256 quantity,
        uint256 _price,
        bytes32 nonce
    ) internal view returns (bool) {
        bytes32 hashMsg = keccak256(abi.encodePacked(address(this), _msgSender(), quantity, _price, nonce));
        address ecdsa_rec = ECDSA.recover(
            keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hashMsg)),
            signature
        );
        return (ecdsa_rec == _signer) ? true : false;
    }

    /// @notice Returns the mint current price
    /// @return (uint256) Current price
    function currentPrice() public view returns (uint256) {
        return price;
    }

    /// @notice It emits a PermanentURI event required by OpenSea to freeze metadata for a particular url
    /// @param nftID (uint256) The ID of the NFT, you should be the owner
    function freezeMetadata(uint256 nftID) external {
        if(!contractLocked) revert ContractIsNotLocked();
        if(ownerOf(nftID) != _msgSender()) revert NotYourToken();
        if(!isRevealed) revert CollectionIsNotRevealed();
        emit PermanentURI(tokenURI(nftID), nftID);
    }


    //  ===================================
    //  ========= ADMIN FUNCTIONS =========
    //  ===================================

    /// @notice Set the Beneficiary
    function setBeneficiary(address[] memory _beneficiary) public onlyRole(DEFAULT_ADMIN_ROLE) {
        beneficiary = _beneficiary;
    }

    /// @notice Set the mint price
    /// @param newPrice (uint256) New price
    function setPrice(uint256 newPrice) external onlyRole(DEFAULT_ADMIN_ROLE) {
        price = newPrice;
    }

    /// @notice Reveal the collection
    function reveal() external onlyRole(DEFAULT_ADMIN_ROLE) {
        isRevealed = true;
    }

    /// @notice Set a new signer for the whitelist
    /// @param signer (address) New signer
    function setSigner(address signer) external onlyRole(DEFAULT_ADMIN_ROLE) {
        _signer = signer;
    }

    /// @notice Pause the contract
    /// @param _isActive (bool) ID of the NFT to retrive its metadata url
    function setActive(bool _isActive) external onlyRole(PAUSER_ROLE) {
        isActive = _isActive;
        emit ActiveStatus(isActive);
    }

    /// @notice Set the whitelist status
    /// @param _isWhitelisteActive (bool) ID of the NFT to retrive its metadata url
    function setWhitelistActive(bool _isWhitelisteActive) external onlyRole(DEFAULT_ADMIN_ROLE) {
        isWhitelisteActive = _isWhitelisteActive;
    }

    /// @notice Set a new baseURI
    /// @param _baseTokenURI (string memory) New baseURI
    function setBaseTokenURI(string memory _baseTokenURI) public onlyRole(DEFAULT_ADMIN_ROLE) {
        if(contractLocked) revert ContractIsLocked();
        __baseURI = _baseTokenURI;
        emit NewBaseURI(__baseURI);
    }

    /// @notice Set a new previewTokenURI
    /// @param _previewTokenURI (string memory) New previewTokenURI
    function setPreviewTokenURI(string memory _previewTokenURI) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if(contractLocked) revert ContractIsLocked();
        if(isRevealed) revert CollectionIsRevealed();
        previewTokenURI = _previewTokenURI;
    }

    /// @notice Set a custom TokenURI for unique NFTs
    function setCustomTokenURI(string memory _customTokenURI, uint256 tokenID) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if(contractLocked) revert ContractIsLocked();
        if(isRevealed) revert CollectionIsRevealed();
        customTokenURI[tokenID] = _customTokenURI;
    }

    /// @notice Lock contract
    function lockContract() external onlyRole(DEFAULT_ADMIN_ROLE) {
        contractLocked = true;
        emit ContractLocked(true);
    }

    /// @notice Set the royalties on the contract
    /// @dev This function can be called only by ADMIN
    /// @param royaltyReceiver The royalties recipient
    /// @param royaltyPercentage Royalties value (between 0 and 10000)
    function setRoyalties(address royaltyReceiver, uint256 royaltyPercentage) public onlyRole(DEFAULT_ADMIN_ROLE) {
        royaltiesAddr = royaltyReceiver;
        royalties = royaltyPercentage;
    }

    /// @notice Set a new contractURI
    /// @param _contractURI_ (string memory) The new contractURI
    function setContractURI(string memory _contractURI_) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if(contractLocked) revert ContractIsLocked();
        _contractURI = _contractURI_;
    }

    /// @notice Set the maximum amount of NFTs that can be minted per user
    function setMaxPerUser(uint8 _maxPerUser) external onlyRole(DEFAULT_ADMIN_ROLE) {
        maxPerUser = _maxPerUser;
    }

    /// @notice Set the maximum amount of NFTs that can be minted per Transaction
    function setMaxTransaction(uint8 _maxPerTransaction) external onlyRole(DEFAULT_ADMIN_ROLE) {
        maxPerTx = _maxPerTransaction;
    }

    /// @notice Claim an amount of NFTs reserved for the dev
    /// @param _number (uint256) Number of NFTs to claim
    function claimReserve(uint256 _number) external onlyRole(BENEFICIARY_ROLE) nonReentrant {
        if(devMinted) revert ReserveArlreadyClaimed();
        if(beneficiaryReserve[_msgSender()] + _number > MAX_MINT_PER_BENEFICIARY)  revert BeneficiaryReserveExceded();
        DEV_RESERVE -=  _number;
        beneficiaryReserve[_msgSender()] += _number;
        if (DEV_RESERVE == 0) devMinted = true;

        _safeMint(_msgSender(), _number);
    }

    /// @notice Allows to withdraw found from contract
    /// @dev This function can be called only from ADMIN
    function withdraw() external onlyRole(BENEFICIARY_ROLE) nonReentrant {
        uint256 balance = address(this).balance;
        if(balance == 0) revert InsufficientETH();
        uint256 beneficiaryNumber = beneficiary.length;
        uint256 amount = balance / beneficiaryNumber;
        for (uint256 i = 0; i < beneficiaryNumber; ) {
            payable(beneficiary[i]).transfer(amount);
            unchecked {
                i++;
            }
        }
        emit Withdraw(_msgSender(), balance);
    }
}

// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.4;

/// @title IPixArtNFT
/// @notice Interface for the PixArtNFT contract
interface IPixArtNFT {

    /// @notice Build the NFT for a given token ID
    /// @param tokenId (uint256) ID of the token to query
    /// @return (string) base64 encoded metadata and SVG
    function composeTokenUri(uint256 tokenId) external view returns (string memory);
}

// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.4;

import "./ERC721JM.sol";
import "./interfaces/IPixArtNFT.sol";

error MissingOnchainContract();

contract OnchainERC721JM is ERC721JM {
    IPixArtNFT public onchain;

    constructor(
        string memory tokenName,
        string memory symbol,
        uint256 collectionSize,
        uint256 devReserved,
        uint256 _royalties,
        address[] memory _beneficiary
    ) ERC721JM(tokenName, symbol, collectionSize, devReserved, _royalties, _beneficiary) {}

    /// @dev Set the onchain contract
    /// @param contract_ (IPixArtNFT) The onchain contract
    function setOnchainContract(IPixArtNFT contract_) public onlyRole(DEFAULT_ADMIN_ROLE) {
			if(contractLocked) revert ContractIsLocked();
			onchain = contract_;
    }

    /// @dev See {ERC721A-tokenURI}.
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
        if (!isRevealed) {
            if (bytes(previewTokenURI).length == 0) revert MissingPreviewTokenURI();
            return previewTokenURI;
        } else {
            if (address(onchain) == address(0)) revert MissingOnchainContract();
            return onchain.composeTokenUri(tokenId);
        }
    }
}

File 19 of 20 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

/**
 * @dev Interface of ERC721 token receiver.
 */
interface ERC721A__IERC721Receiver {
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
    struct TokenApprovalRef {
        address value;
    }

    // =============================================================
    //                           CONSTANTS
    // =============================================================

    // Mask of an entry in packed address data.
    uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;

    // The bit position of `numberMinted` in packed address data.
    uint256 private constant _BITPOS_NUMBER_MINTED = 64;

    // The bit position of `numberBurned` in packed address data.
    uint256 private constant _BITPOS_NUMBER_BURNED = 128;

    // The bit position of `aux` in packed address data.
    uint256 private constant _BITPOS_AUX = 192;

    // Mask of all 256 bits in packed address data except the 64 bits for `aux`.
    uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;

    // The bit position of `startTimestamp` in packed ownership.
    uint256 private constant _BITPOS_START_TIMESTAMP = 160;

    // The bit mask of the `burned` bit in packed ownership.
    uint256 private constant _BITMASK_BURNED = 1 << 224;

    // The bit position of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;

    // The bit mask of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;

    // The bit position of `extraData` in packed ownership.
    uint256 private constant _BITPOS_EXTRA_DATA = 232;

    // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
    uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;

    // The mask of the lower 160 bits for addresses.
    uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;

    // The maximum `quantity` that can be minted with {_mintERC2309}.
    // This limit is to prevent overflows on the address data entries.
    // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
    // is required to cause an overflow, which is unrealistic.
    uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;

    // The `Transfer` event signature is given by:
    // `keccak256(bytes("Transfer(address,address,uint256)"))`.
    bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
        0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;

    // =============================================================
    //                            STORAGE
    // =============================================================

    // The next token ID to be minted.
    uint256 private _currentIndex;

    // The number of tokens burned.
    uint256 private _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned.
    // See {_packedOwnershipOf} implementation for details.
    //
    // Bits Layout:
    // - [0..159]   `addr`
    // - [160..223] `startTimestamp`
    // - [224]      `burned`
    // - [225]      `nextInitialized`
    // - [232..255] `extraData`
    mapping(uint256 => uint256) private _packedOwnerships;

    // Mapping owner address to address data.
    //
    // Bits Layout:
    // - [0..63]    `balance`
    // - [64..127]  `numberMinted`
    // - [128..191] `numberBurned`
    // - [192..255] `aux`
    mapping(address => uint256) private _packedAddressData;

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

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

    // =============================================================
    //                          CONSTRUCTOR
    // =============================================================

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    // =============================================================
    //                   TOKEN COUNTING OPERATIONS
    // =============================================================

    /**
     * @dev Returns the starting token ID.
     * To change the starting token ID, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Returns the next token ID to be minted.
     */
    function _nextTokenId() internal view virtual returns (uint256) {
        return _currentIndex;
    }

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than `_currentIndex - _startTokenId()` times.
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * @dev Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view virtual returns (uint256) {
        // Counter underflow is impossible as `_currentIndex` does not decrement,
        // and it is initialized to `_startTokenId()`.
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

    /**
     * @dev Returns the total number of tokens burned.
     */
    function _totalBurned() internal view virtual returns (uint256) {
        return _burnCounter;
    }

    // =============================================================
    //                    ADDRESS DATA OPERATIONS
    // =============================================================

    /**
     * @dev Returns the number of tokens in `owner`'s account.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
    }

    /**
     * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal virtual {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        // Cast `aux` with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes
        // of the XOR of all function selectors in the interface.
        // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
        // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

    /**
     * @dev Returns the token collection name.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        string memory baseURI = _baseURI();
        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, it can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    // =============================================================
    //                     OWNERSHIPS OPERATIONS
    // =============================================================

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

    /**
     * @dev Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around over time.
     */
    function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnershipOf(tokenId));
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct at `index`.
     */
    function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnerships[index]);
    }

    /**
     * @dev Initializes the ownership slot minted at `index` for efficiency purposes.
     */
    function _initializeOwnershipAt(uint256 index) internal virtual {
        if (_packedOwnerships[index] == 0) {
            _packedOwnerships[index] = _packedOwnershipOf(index);
        }
    }

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < _currentIndex) {
                    uint256 packed = _packedOwnerships[curr];
                    // If not burned.
                    if (packed & _BITMASK_BURNED == 0) {
                        // Invariant:
                        // There will always be an initialized ownership slot
                        // (i.e. `ownership.addr != address(0) && ownership.burned == false`)
                        // before an unintialized ownership slot
                        // (i.e. `ownership.addr == address(0) && ownership.burned == false`)
                        // Hence, `curr` will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed will be zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct from `packed`.
     */
    function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
        ownership.addr = address(uint160(packed));
        ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
        ownership.burned = packed & _BITMASK_BURNED != 0;
        ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
    }

    /**
     * @dev Packs ownership data into a single uint256.
     */
    function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
            result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
        }
    }

    /**
     * @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
     */
    function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
        // For branchless setting of the `nextInitialized` flag.
        assembly {
            // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
            result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
        }
    }

    // =============================================================
    //                      APPROVAL OPERATIONS
    // =============================================================

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

        if (_msgSenderERC721A() != owner)
            if (!isApprovedForAll(owner, _msgSenderERC721A())) {
                revert ApprovalCallerNotOwnerNorApproved();
            }

        _tokenApprovals[tokenId].value = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId].value;
    }

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

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

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted. See {_mint}.
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < _currentIndex && // If within bounds,
            _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.
    }

    /**
     * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
     */
    function _isSenderApprovedOrOwner(
        address approvedAddress,
        address owner,
        address msgSender
    ) private pure returns (bool result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
            msgSender := and(msgSender, _BITMASK_ADDRESS)
            // `msgSender == owner || msgSender == approvedAddress`.
            result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
        }
    }

    /**
     * @dev Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedSlotAndAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.
        assembly {
            approvedAddressSlot := tokenApproval.slot
            approvedAddress := sload(approvedAddressSlot)
        }
    }

    // =============================================================
    //                      TRANSFER OPERATIONS
    // =============================================================

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
            if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();

        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // We can directly increment and decrement the balances.
            --_packedAddressData[from]; // Updates: `balance -= 1`.
            ++_packedAddressData[to]; // Updates: `balance += 1`.

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                to,
                _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public payable virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token IDs
     * are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * `startTokenId` - the first token ID to be transferred.
     * `quantity` - the amount to be transferred.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token IDs
     * have been transferred. This includes minting.
     * And also called after one token has been burned.
     *
     * `startTokenId` - the first token ID to be transferred.
     * `quantity` - the amount to be transferred.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * `from` - Previous owner of the given token ID.
     * `to` - Target address that will receive the token.
     * `tokenId` - Token ID to be transferred.
     * `_data` - Optional data to send along with the call.
     *
     * Returns whether the call correctly returned the expected magic value.
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
            bytes4 retval
        ) {
            return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    // =============================================================
    //                        MINT OPERATIONS
    // =============================================================

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _mint(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

            // Use assembly to loop and emit the `Transfer` event for gas savings.
            // The duplicated `log4` removes an extra check and reduces stack juggling.
            // The assembly, together with the surrounding Solidity code, have been
            // delicately arranged to nudge the compiler into producing optimized opcodes.
            assembly {
                // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
                toMasked := and(to, _BITMASK_ADDRESS)
                // Emit the `Transfer` event.
                log4(
                    0, // Start of data (0, since no data).
                    0, // End of data (0, since no data).
                    _TRANSFER_EVENT_SIGNATURE, // Signature.
                    0, // `address(0)`.
                    toMasked, // `to`.
                    startTokenId // `tokenId`.
                )

                // The `iszero(eq(,))` check ensures that large values of `quantity`
                // that overflows uint256 will make the loop run out of gas.
                // The compiler will optimize the `iszero` away for performance.
                for {
                    let tokenId := add(startTokenId, 1)
                } iszero(eq(tokenId, end)) {
                    tokenId := add(tokenId, 1)
                } {
                    // Emit the `Transfer` event. Similar to above.
                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
                }
            }
            if (toMasked == 0) revert MintToZeroAddress();

            _currentIndex = end;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * This function is intended for efficient minting only during contract creation.
     *
     * It emits only one {ConsecutiveTransfer} as defined in
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
     * instead of a sequence of {Transfer} event(s).
     *
     * Calling this function outside of contract creation WILL make your contract
     * non-compliant with the ERC721 standard.
     * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
     * {ConsecutiveTransfer} event is only permissible during contract creation.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {ConsecutiveTransfer} event.
     */
    function _mintERC2309(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();
        if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are unrealistic due to the above check for `quantity` to be below the limit.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);

            _currentIndex = startTokenId + quantity;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * See {_mint}.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal virtual {
        _mint(to, quantity);

        unchecked {
            if (to.code.length != 0) {
                uint256 end = _currentIndex;
                uint256 index = end - quantity;
                do {
                    if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (index < end);
                // Reentrancy protection.
                if (_currentIndex != end) revert();
            }
        }
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal virtual {
        _safeMint(to, quantity, '');
    }

    // =============================================================
    //                        BURN OPERATIONS
    // =============================================================

    /**
     * @dev Equivalent to `_burn(tokenId, false)`.
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        address from = address(uint160(prevOwnershipPacked));

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
                if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // Updates:
            // - `balance -= 1`.
            // - `numberBurned += 1`.
            //
            // We can directly decrement the balance, and increment the number burned.
            // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
            _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                from,
                (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

    // =============================================================
    //                     EXTRA DATA OPERATIONS
    // =============================================================

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
        uint256 packed = _packedOwnerships[index];
        if (packed == 0) revert OwnershipNotInitializedForExtraData();
        uint256 extraDataCasted;
        // Cast `extraData` with assembly to avoid redundant masking.
        assembly {
            extraDataCasted := extraData
        }
        packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
        _packedOwnerships[index] = packed;
    }

    /**
     * @dev Called during each token transfer to set the 24bit `extraData` field.
     * Intended to be overridden by the cosumer contract.
     *
     * `previousExtraData` - the value of `extraData` before transfer.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _extraData(
        address from,
        address to,
        uint24 previousExtraData
    ) internal view virtual returns (uint24) {}

    /**
     * @dev Returns the next extra data for the packed ownership data.
     * The returned result is shifted into position.
     */
    function _nextExtraData(
        address from,
        address to,
        uint256 prevOwnershipPacked
    ) private view returns (uint256) {
        uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
        return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
    }

    // =============================================================
    //                       OTHER OPERATIONS
    // =============================================================

    /**
     * @dev Returns the message sender (defaults to `msg.sender`).
     *
     * If you are writing GSN compatible contracts, you need to override this function.
     */
    function _msgSenderERC721A() internal view virtual returns (address) {
        return msg.sender;
    }

    /**
     * @dev Converts a uint256 to its ASCII string decimal representation.
     */
    function _toString(uint256 value) internal pure virtual returns (string memory str) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), but
            // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.
            // We will need 1 word for the trailing zeros padding, 1 word for the length,
            // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.
            let m := add(mload(0x40), 0xa0)
            // Update the free memory pointer to allocate.
            mstore(0x40, m)
            // Assign the `str` to the end.
            str := sub(m, 0x20)
            // Zeroize the slot after the string.
            mstore(str, 0)

            // Cache the end of the memory to calculate the length later.
            let end := str

            // We write the string from rightmost digit to leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // prettier-ignore
            for { let temp := value } 1 {} {
                str := sub(str, 1)
                // Write the character to the pointer.
                // The ASCII index of the '0' character is 48.
                mstore8(str, add(48, mod(temp, 10)))
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
                // prettier-ignore
                if iszero(temp) { break }
            }

            let length := sub(end, str)
            // Move the pointer 32 bytes leftwards to make room for the length.
            str := sub(str, 0x20)
            // Store the length.
            mstore(str, length)
        }
    }
}

// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of ERC721A.
 */
interface IERC721A {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The token does not exist.
     */
    error OwnerQueryForNonexistentToken();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the
     * ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * The token does not exist.
     */
    error URIQueryForNonexistentToken();

    /**
     * The `quantity` minted with ERC2309 exceeds the safety limit.
     */
    error MintERC2309QuantityExceedsLimit();

    /**
     * The `extraData` cannot be set on an unintialized ownership slot.
     */
    error OwnershipNotInitializedForExtraData();

    // =============================================================
    //                            STRUCTS
    // =============================================================

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Stores the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
        // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
        uint24 extraData;
    }

    // =============================================================
    //                         TOKEN COUNTERS
    // =============================================================

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() external view returns (uint256);

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

    // =============================================================
    //                            IERC721
    // =============================================================

    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

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

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

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

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

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

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external payable;

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

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

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

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

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

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

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

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

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

    // =============================================================
    //                           IERC2309
    // =============================================================

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId`
     * (inclusive) is transferred from `from` to `to`, as defined in the
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
     *
     * See {_mintERC2309} for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"string","name":"tokenName","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"collectionSize","type":"uint256"},{"internalType":"uint256","name":"devReserved","type":"uint256"},{"internalType":"uint256","name":"_royalties","type":"uint256"},{"internalType":"address[]","name":"_beneficiary","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"BeneficiaryReserveExceded","type":"error"},{"inputs":[],"name":"CollectionIsNotRevealed","type":"error"},{"inputs":[],"name":"CollectionIsRevealed","type":"error"},{"inputs":[],"name":"ContractIsLocked","type":"error"},{"inputs":[],"name":"ContractIsNotLocked","type":"error"},{"inputs":[],"name":"ExcededMaxPerTx","type":"error"},{"inputs":[],"name":"ExcededMaxPerUser","type":"error"},{"inputs":[],"name":"InsufficientETH","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"MintingFinished","type":"error"},{"inputs":[],"name":"MintingNotStarted","type":"error"},{"inputs":[],"name":"MissingOnchainContract","type":"error"},{"inputs":[],"name":"MissingPreviewTokenURI","type":"error"},{"inputs":[],"name":"NotYourToken","type":"error"},{"inputs":[],"name":"OnlyHumans","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"ReserveArlreadyClaimed","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"isZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_ActiveStatus","type":"bool"}],"name":"ActiveStatus","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_isLocked","type":"bool"}],"name":"ContractLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_baseURI","type":"string"}],"name":"NewBaseURI","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":false,"internalType":"string","name":"_value","type":"string"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"PermanentURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"BENEFICIARY_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"beneficiary","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_number","type":"uint256"}],"name":"claimReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"customTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftID","type":"uint256"}],"name":"freezeMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRevealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWhitelisteActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxPerTx","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerUser","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"mintToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onchain","outputs":[{"internalType":"contract IPixArtNFT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"previewTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"setActive","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":"_baseTokenURI","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_beneficiary","type":"address[]"}],"name":"setBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contractURI_","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_customTokenURI","type":"string"},{"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"setCustomTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_maxPerUser","type":"uint8"}],"name":"setMaxPerUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_maxPerTransaction","type":"uint8"}],"name":"setMaxTransaction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPixArtNFT","name":"contract_","type":"address"}],"name":"setOnchainContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_previewTokenURI","type":"string"}],"name":"setPreviewTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"royaltyReceiver","type":"address"},{"internalType":"uint256","name":"royaltyPercentage","type":"uint256"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isWhitelisteActive","type":"bool"}],"name":"setWhitelistActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040526702c68af0bb1400006010556011805461020261ffff199091161790556015805464ffffffffff60a01b1916600160b01b1790553480156200004557600080fd5b50604051620042023803806200420283398101604081905262000068916200085b565b858585858585858585858585858581600290805190602001906200008e929190620006eb565b508051620000a4906003906020840190620006eb565b5050600160005550620000b7336200025c565b6001600b5560408051808201909152600780825266697066733a2f2f60c81b6020909201918252620000ec91600c91620006eb565b50620000fa600033620002ae565b62000115600080516020620041e283398151915233620002ae565b620001417f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33620002ae565b60005b8151811015620001ac5762000197600080516020620041e28339815191528383815181106200018357634e487b7160e01b600052603260045260246000fd5b6020026020010151620002ae60201b60201c565b80620001a38162000b55565b91505062000144565b506080849052600e8390558051620001c5908462000a88565b60a0526014829055601580546001600160a01b03191630179055620001ea81620002be565b60126000815481106200020d57634e487b7160e01b600052603260045260246000fd5b600091825260209091200154600f80546001600160a01b0319166001600160a01b039092169190911790555050666a94d74f4300006010555062000b9f9e505050505050505050505050505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620002ba8282620002e5565b5050565b6000620002cb8162000323565b8151620002e09060129060208501906200077a565b505050565b620002fc82826200033260201b62001edd1760201c565b6000828152600a60209081526040909120620002e091839062001f7f620003d6821b17901c565b6200032f8133620003f6565b50565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16620002ba5760008281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620003923390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620003ed836001600160a01b03841662000491565b90505b92915050565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16620002ba576200043781620004e360201b62001f941760201c565b6200044d83602062001fa6620004f6821b17811c565b604051602001620004609291906200098c565b60408051601f198184030181529082905262461bcd60e51b8252620004889160040162000a05565b60405180910390fd5b6000818152600183016020526040812054620004da57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620003f0565b506000620003f0565b6060620003f06001600160a01b03831660145b606060006200050783600262000aa9565b6200051490600262000a6d565b6001600160401b038111156200053a57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801562000565576020820181803683370190505b509050600360fc1b816000815181106200058f57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110620005cd57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000620005f384600262000aa9565b6200060090600162000a6d565b90505b60018111156200069a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106200064457634e487b7160e01b600052603260045260246000fd5b1a60f81b8282815181106200066957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93620006928162000afe565b905062000603565b508315620003ed5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640162000488565b828054620006f99062000b18565b90600052602060002090601f0160209004810192826200071d576000855562000768565b82601f106200073857805160ff191683800117855562000768565b8280016001018555821562000768579182015b82811115620007685782518255916020019190600101906200074b565b5062000776929150620007d2565b5090565b82805482825590600052602060002090810192821562000768579160200282015b828111156200076857825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200079b565b5b80821115620007765760008155600101620007d3565b600082601f830112620007fa578081fd5b81516001600160401b0381111562000816576200081662000b89565b6200082b601f8201601f191660200162000a3a565b81815284602083860101111562000840578283fd5b6200085382602083016020870162000acb565b949350505050565b60008060008060008060c0878903121562000874578182fd5b86516001600160401b03808211156200088b578384fd5b620008998a838b01620007e9565b9750602091508189015181811115620008b0578485fd5b620008be8b828c01620007e9565b97505060408901519550606089015194506080890151935060a089015181811115620008e8578384fd5b8901601f81018b13620008f9578384fd5b8051828111156200090e576200090e62000b89565b8060051b92506200092184840162000a3a565b8181528481019083860185850187018f10156200093c578788fd5b8795505b838610156200097857805194506001600160a01b038516851462000962578788fd5b8483526001959095019491860191860162000940565b508096505050505050509295509295509295565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351620009c681601785016020880162000acb565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351620009f981602884016020880162000acb565b01602801949350505050565b602081526000825180602084015262000a2681604085016020870162000acb565b601f01601f19169190910160400192915050565b604051601f8201601f191681016001600160401b038111828210171562000a655762000a6562000b89565b604052919050565b6000821982111562000a835762000a8362000b73565b500190565b60008262000aa457634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161562000ac65762000ac662000b73565b500290565b60005b8381101562000ae857818101518382015260200162000ace565b8381111562000af8576000848401525b50505050565b60008162000b105762000b1062000b73565b506000190190565b600181811c9082168062000b2d57607f821691505b6020821081141562000b4f57634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141562000b6c5762000b6c62000b73565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60805160a05161361662000bcc600039600061175b01526000818161062a01526114ac01526136166000f3fe6080604052600436106103a25760003560e01c8063715018a6116101e7578063a475b5dd1161010d578063ca15c873116100a0578063e8a3d4851161006f578063e8a3d48514610afb578063e985e9c514610b10578063f2fde38b14610b59578063f968adbe14610b7957600080fd5b8063ca15c87314610a53578063ced3a40314610a73578063d547741f14610aa7578063e63ab1e914610ac757600080fd5b8063b88d4fde116100dc578063b88d4fde146109e0578063bc3a0574146109f3578063c3b754dc14610a13578063c87b56dd14610a3357600080fd5b8063a475b5dd1461096b578063acdae89914610980578063acec338a146109a0578063b4039066146109c057600080fd5b806391b7f5ed116101855780639d1b464a116101545780639d1b464a1461090b578063a035b1fe14610920578063a217fddf14610936578063a22cb4651461094b57600080fd5b806391b7f5ed1461087057806391d1485414610890578063938e3d7b146108d657806395d89b41146108f657600080fd5b80638aa16d11116101c15780638aa16d11146107f25780638c7ea24b146108125780638da5cb5b146108325780639010d07c1461085057600080fd5b8063715018a6146107a8578063753868e3146107bd5780638013f9a8146107d257600080fd5b806330176e13116102cc57806353cd77011161026a578063645d634111610239578063645d6341146107355780636c19e783146107485780636c6589af1461076857806370a082311461078857600080fd5b806353cd7701146106b457806354214f69146106d45780635daa3160146106f55780636352211e1461071557600080fd5b806336568abe116102a657806336568abe1461064c5780633ccfd60b1461066c57806342842e0e146106815780634dcf6ad61461069457600080fd5b806330176e13146105d7578063324cb3cb146105f757806332cb6b0c1461061857600080fd5b80631b07937311610344578063264f43eb11610313578063264f43eb1461054357806329abd80d146105585780632a55205a146105785780632f2ff15d146105b757600080fd5b80631b079373146104bf57806322f3e2d4146104df57806323b872dd14610500578063248a9ca31461051357600080fd5b8063081812fc11610380578063081812fc1461042a578063095ea7b3146104625780630ce1031b1461047757806318160ddd1461049857600080fd5b806301ffc9a7146103a757806306d586bb146103dc57806306fdde0314610408575b600080fd5b3480156103b357600080fd5b506103c76103c23660046130e3565b610b98565b60405190151581526020015b60405180910390f35b3480156103e857600080fd5b506011546103f69060ff1681565b60405160ff90911681526020016103d3565b34801561041457600080fd5b5061041d610bc3565b6040516103d3919061338b565b34801561043657600080fd5b5061044a610445366004613086565b610c55565b6040516001600160a01b0390911681526020016103d3565b610475610470366004612f8d565b610c99565b005b34801561048357600080fd5b506015546103c790600160b01b900460ff1681565b3480156104a457600080fd5b5060015460005403600019015b6040519081526020016103d3565b3480156104cb57600080fd5b506104756104da3660046131c1565b610d39565b3480156104eb57600080fd5b506015546103c790600160a01b900460ff1681565b61047561050e366004612e9c565b610dbf565b34801561051f57600080fd5b506104b161052e366004613086565b60009081526009602052604090206001015490565b34801561054f57600080fd5b5061041d610f50565b34801561056457600080fd5b5061041d610573366004613086565b610fde565b34801561058457600080fd5b506105986105933660046130c2565b610ff7565b604080516001600160a01b0390931683526020830191909152016103d3565b3480156105c357600080fd5b506104756105d236600461309e565b611055565b3480156105e357600080fd5b506104756105f236600461311b565b61107f565b34801561060357600080fd5b506015546103c790600160a81b900460ff1681565b34801561062457600080fd5b506104b17f000000000000000000000000000000000000000000000000000000000000000081565b34801561065857600080fd5b5061047561066736600461309e565b611105565b34801561067857600080fd5b50610475611196565b61047561068f366004612e9c565b6112c1565b3480156106a057600080fd5b506104756106af366004613086565b6112dc565b3480156106c057600080fd5b506104756106cf366004612e48565b6113a4565b3480156106e057600080fd5b506015546103c790600160c01b900460ff1681565b34801561070157600080fd5b5061044a610710366004613086565b6113fd565b34801561072157600080fd5b5061044a610730366004613086565b611427565b610475610743366004613204565b611432565b34801561075457600080fd5b50610475610763366004612e48565b6116be565b34801561077457600080fd5b50610475610783366004613086565b6116ec565b34801561079457600080fd5b506104b16107a3366004612e48565b61182a565b3480156107b457600080fd5b50610475611879565b3480156107c957600080fd5b5061047561188d565b3480156107de57600080fd5b506104756107ed366004613281565b6118fd565b3480156107fe57600080fd5b5061047561080d366004613281565b611925565b34801561081e57600080fd5b5061047561082d366004612f8d565b611947565b34801561083e57600080fd5b506008546001600160a01b031661044a565b34801561085c57600080fd5b5061044a61086b3660046130c2565b611979565b34801561087c57600080fd5b5061047561088b366004613086565b611998565b34801561089c57600080fd5b506103c76108ab36600461309e565b60009182526009602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156108e257600080fd5b506104756108f136600461311b565b6119a9565b34801561090257600080fd5b5061041d6119f2565b34801561091757600080fd5b506010546104b1565b34801561092c57600080fd5b506104b160105481565b34801561094257600080fd5b506104b1600081565b34801561095757600080fd5b50610475610966366004612f59565b611a01565b34801561097757600080fd5b50610475611a6d565b34801561098c57600080fd5b5060185461044a906001600160a01b031681565b3480156109ac57600080fd5b506104756109bb36600461306c565b611aa9565b3480156109cc57600080fd5b506104756109db36600461311b565b611b43565b6104756109ee366004612edc565b611bb7565b3480156109ff57600080fd5b50610475610a0e366004612fb8565b611bfb565b348015610a1f57600080fd5b50610475610a2e36600461306c565b611c19565b348015610a3f57600080fd5b5061041d610a4e366004613086565b611c5e565b348015610a5f57600080fd5b506104b1610a6e366004613086565b611e05565b348015610a7f57600080fd5b506104b17fc8a41221bcd7fcf2c225f5a9265e1d4d39949d89197159d59e5f4b87b62c419e81565b348015610ab357600080fd5b50610475610ac236600461309e565b611e1c565b348015610ad357600080fd5b506104b17f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b348015610b0757600080fd5b5061041d611e41565b348015610b1c57600080fd5b506103c7610b2b366004612e64565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610b6557600080fd5b50610475610b74366004612e48565b611e50565b348015610b8557600080fd5b506011546103f690610100900460ff1681565b60006001600160e01b0319821663152a902d60e11b1480610bbd5750610bbd82612195565b92915050565b606060028054610bd29061354e565b80601f0160208091040260200160405190810160405280929190818152602001828054610bfe9061354e565b8015610c4b5780601f10610c2057610100808354040283529160200191610c4b565b820191906000526020600020905b815481529060010190602001808311610c2e57829003601f168201915b5050505050905090565b6000610c60826121ba565b610c7d576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610ca482611427565b9050336001600160a01b03821614610cdd57610cc08133610b2b565b610cdd576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000610d44816121ef565b601554600160a81b900460ff1615610d6f5760405163af9e1b4360e01b815260040160405180910390fd5b601554600160c01b900460ff1615610d9a576040516344cad7bf60e01b815260040160405180910390fd5b60008281526017602090815260409091208451610db992860190612ced565b50505050565b6000610dca826121f9565b9050836001600160a01b0316816001600160a01b031614610dfd5760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417610e4a57610e2d8633610b2b565b610e4a57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610e7157604051633a954ecd60e21b815260040160405180910390fd5b8015610e7c57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040902055600160e11b8316610f075760018401600081815260046020526040902054610f05576000548114610f055760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b60168054610f5d9061354e565b80601f0160208091040260200160405190810160405280929190818152602001828054610f899061354e565b8015610fd65780601f10610fab57610100808354040283529160200191610fd6565b820191906000526020600020905b815481529060010190602001808311610fb957829003601f168201915b505050505081565b60176020526000908152604090208054610f5d9061354e565b600080611003846121ba565b61102057604051630a14c4b560e41b815260040160405180910390fd5b6015546014546001600160a01b039091169060649061103f90866134d5565b61104991906134b5565b915091505b9250929050565b600082815260096020526040902060010154611070816121ef565b61107a8383612262565b505050565b600061108a816121ef565b601554600160a81b900460ff16156110b55760405163af9e1b4360e01b815260040160405180910390fd5b81516110c890600c906020850190612ced565b507f325d37e8fb549c86966f09bc3e6f62eb3afa93b255d6e3234338001f3d80bd86600c6040516110f9919061339e565b60405180910390a15050565b6001600160a01b03811633146111885760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6111928282612284565b5050565b7fc8a41221bcd7fcf2c225f5a9265e1d4d39949d89197159d59e5f4b87b62c419e6111c0816121ef565b6111c86122a6565b47806111e757604051631a84bc4160e21b815260040160405180910390fd5b60125460006111f682846134b5565b905060005b8281101561126d576012818154811061122457634e487b7160e01b600052603260045260246000fd5b60009182526020822001546040516001600160a01b039091169184156108fc02918591818181858888f19350505050158015611264573d6000803e3d6000fd5b506001016111fb565b507f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436433604080516001600160a01b039092168252602082018690520160405180910390a15050506112be6001600b55565b50565b61107a83838360405180602001604052806000815250611bb7565b601554600160a81b900460ff16611306576040516341966ae960e01b815260040160405180910390fd5b3361131082611427565b6001600160a01b03161461133757604051630247f98760e21b815260040160405180910390fd5b601554600160c01b900460ff1661136157604051635785260b60e11b815260040160405180910390fd5b807fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b5565720761138c83611c5e565b604051611399919061338b565b60405180910390a250565b60006113af816121ef565b601554600160a81b900460ff16156113da5760405163af9e1b4360e01b815260040160405180910390fd5b50601880546001600160a01b0319166001600160a01b0392909216919091179055565b6012818154811061140d57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000610bbd826121f9565b61143a6122a6565b6015548490600160a01b900460ff16611466576040516369183ba160e11b815260040160405180910390fd5b8061148457604051634896bcb160e01b815260040160405180910390fd5b3233146114a45760405163f896ca4b60e01b815260040160405180910390fd5b6001546000547f000000000000000000000000000000000000000000000000000000000000000091839103600019016114dd919061349d565b11156114fc5760405163b828d9b560e01b815260040160405180910390fd5b601154610100900460ff168111156115275760405163cbc52a5f60e01b815260040160405180910390fd5b60115460ff168161155b336001600160a01b03166000908152600560205260409081902054901c67ffffffffffffffff1690565b611565919061349d565b111561158457604051632c1bae1760e11b815260040160405180910390fd5b601554600160b01b900460ff16156115c5576115a38484873486612300565b6115c057604051638baa579f60e01b815260040160405180910390fd5b6115f9565b846115cf60105490565b6115d991906134d5565b3410156115f957604051631a84bc4160e21b815260040160405180910390fd5b611603338661241e565b6040805133815260208101879052348183015290517f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f9181900360600190a160105461164f90866134d5565b341180156116675750601554600160b01b900460ff16155b156116b35760105433906108fc9061167f90886134d5565b61168990346134f4565b6040518115909202916000818181858888f193505050501580156116b1573d6000803e3d6000fd5b505b50610db96001600b55565b60006116c9816121ef565b50600f80546001600160a01b0319166001600160a01b0392909216919091179055565b7fc8a41221bcd7fcf2c225f5a9265e1d4d39949d89197159d59e5f4b87b62c419e611716816121ef565b61171e6122a6565b601554600160b81b900460ff16156117495760405163a7d3365160e01b815260040160405180910390fd5b336000908152601360205260409020547f00000000000000000000000000000000000000000000000000000000000000009061178690849061349d565b11156117a5576040516326a0f77d60e11b815260040160405180910390fd5b81600e60008282546117b791906134f4565b909155505033600090815260136020526040812080548492906117db90849061349d565b9091555050600e5461181657601580547fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff16600160b81b1790555b611820338361241e565b6111926001600b55565b60006001600160a01b038216611853576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b611881612438565b61188b6000612492565b565b6000611898816121ef565b601580547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16600160a81b179055604051600181527fb08f70f6219c5c2ed5e08e7cf45080e4840fde880b27a0841faf45475cd02d2e9060200160405180910390a150565b6000611908816121ef565b506011805460ff9092166101000261ff0019909216919091179055565b6000611930816121ef565b506011805460ff191660ff92909216919091179055565b6000611952816121ef565b50601580546001600160a01b0319166001600160a01b039390931692909217909155601455565b6000828152600a6020526040812061199190836124e4565b9392505050565b60006119a3816121ef565b50601055565b60006119b4816121ef565b601554600160a81b900460ff16156119df5760405163af9e1b4360e01b815260040160405180910390fd5b815161107a90600d906020850190612ced565b606060038054610bd29061354e565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000611a78816121ef565b50601580547fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b179055565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611ad3816121ef565b601580547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b8415158102919091179182905560405160ff9190920416151581527f2a9c7e9da7f0fa57f817819f7ec7c77d448c5f91ea757867c2503c612a61e1cb906020016110f9565b6000611b4e816121ef565b601554600160a81b900460ff1615611b795760405163af9e1b4360e01b815260040160405180910390fd5b601554600160c01b900460ff1615611ba4576040516344cad7bf60e01b815260040160405180910390fd5b815161107a906016906020850190612ced565b611bc2848484610dbf565b6001600160a01b0383163b15610db957611bde848484846124f0565b610db9576040516368d2bf6b60e11b815260040160405180910390fd5b6000611c06816121ef565b815161107a906012906020850190612d71565b6000611c24816121ef565b5060158054911515600160b01b027fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6060611c69826121ba565b611c8657604051630a14c4b560e41b815260040160405180910390fd5b601554600160c01b900460ff16611d575760168054611ca49061354e565b15159050611cc557604051634ea3cd5f60e11b815260040160405180910390fd5b60168054611cd29061354e565b80601f0160208091040260200160405190810160405280929190818152602001828054611cfe9061354e565b8015611d4b5780601f10611d2057610100808354040283529160200191611d4b565b820191906000526020600020905b815481529060010190602001808311611d2e57829003601f168201915b50505050509050919050565b6018546001600160a01b0316611d80576040516311f6a3c160e21b815260040160405180910390fd5b601854604051632da393ff60e01b8152600481018490526001600160a01b0390911690632da393ff9060240160006040518083038186803b158015611dc457600080fd5b505afa158015611dd8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bbd919081019061314e565b919050565b6000818152600a60205260408120610bbd906125e8565b600082815260096020526040902060010154611e37816121ef565b61107a8383612284565b6060600d8054610bd29061354e565b611e58612438565b6001600160a01b038116611ed45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161117f565b6112be81612492565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff166111925760008281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611f3b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611991836001600160a01b0384166125f2565b6060610bbd6001600160a01b03831660145b60606000611fb58360026134d5565b611fc090600261349d565b67ffffffffffffffff811115611fe657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612010576020820181803683370190505b509050600360fc1b8160008151811061203957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061207657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061209a8460026134d5565b6120a590600161349d565b90505b6001811115612146577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106120f457634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061211857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361213f81613537565b90506120a8565b5083156119915760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161117f565b60006001600160e01b03198216635a05180f60e01b1480610bbd5750610bbd82612641565b6000816001111580156121ce575060005482105b8015610bbd575050600090815260046020526040902054600160e01b161590565b6112be8133612676565b600081806001116122495760005481101561224957600081815260046020526040902054600160e01b8116612247575b80611991575060001901600081815260046020526040902054612229565b505b604051636f96cda160e11b815260040160405180910390fd5b61226c8282611edd565b6000828152600a6020526040902061107a9082611f7f565b61228e82826126eb565b6000828152600a6020526040902061107a908261276e565b6002600b5414156122f95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161117f565b6002600b55565b60008030336040516bffffffffffffffffffffffff19606093841b811660208301529190921b16603482015260488101869052606881018590526088810184905260a80160405160208183030381529060405280519060200120905060006123f08260405160200161239e91907f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b6040516020818303038152906040528051906020012089898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061278392505050565b600f549091506001600160a01b0380831691161461240f576000612412565b60015b98975050505050505050565b6111928282604051806020016040528060008152506127a7565b6008546001600160a01b0316331461188b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161117f565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006119918383612814565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061252590339089908890889060040161334f565b602060405180830381600087803b15801561253f57600080fd5b505af192505050801561256f575060408051601f3d908101601f1916820190925261256c918101906130ff565b60015b6125ca573d80801561259d576040519150601f19603f3d011682016040523d82523d6000602084013e6125a2565b606091505b5080516125c2576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6000610bbd825490565b600081815260018301602052604081205461263957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610bbd565b506000610bbd565b60006001600160e01b03198216637965db0b60e01b1480610bbd57506301ffc9a760e01b6001600160e01b0319831614610bbd565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16611192576126a981611f94565b6126b4836020611fa6565b6040516020016126c59291906132ce565b60408051601f198184030181529082905262461bcd60e51b825261117f9160040161338b565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16156111925760008281526009602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611991836001600160a01b03841661284c565b60008060006127928585612969565b9150915061279f816129ac565b509392505050565b6127b18383612b32565b6001600160a01b0383163b1561107a576000548281035b6127db60008683806001019450866124f0565b6127f8576040516368d2bf6b60e11b815260040160405180910390fd5b8181106127c857816000541461280d57600080fd5b5050505050565b600082600001828154811061283957634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6000818152600183016020526040812054801561295f5760006128706001836134f4565b8554909150600090612884906001906134f4565b90508181146129055760008660000182815481106128b257634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050808760000184815481106128e357634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061292457634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610bbd565b6000915050610bbd565b6000808251604114156129a05760208301516040840151606085015160001a61299487828585612c29565b9450945050505061104e565b5060009050600261104e565b60008160048111156129ce57634e487b7160e01b600052602160045260246000fd5b14156129d75750565b60018160048111156129f957634e487b7160e01b600052602160045260246000fd5b1415612a475760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161117f565b6002816004811115612a6957634e487b7160e01b600052602160045260246000fd5b1415612ab75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161117f565b6003816004811115612ad957634e487b7160e01b600052602160045260246000fd5b14156112be5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161117f565b60005481612b535760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114612c0257808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612bca565b5081612c2057604051622e076360e81b815260040160405180910390fd5b60005550505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612c605750600090506003612ce4565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612cb4573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612cdd57600060019250925050612ce4565b9150600090505b94509492505050565b828054612cf99061354e565b90600052602060002090601f016020900481019282612d1b5760008555612d61565b82601f10612d3457805160ff1916838001178555612d61565b82800160010185558215612d61579182015b82811115612d61578251825591602001919060010190612d46565b50612d6d929150612dc6565b5090565b828054828255906000526020600020908101928215612d61579160200282015b82811115612d6157825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612d91565b5b80821115612d6d5760008155600101612dc7565b6000612dee612de984613475565b613444565b9050828152838383011115612e0257600080fd5b828260208301376000602084830101529392505050565b80358015158114611e0057600080fd5b600082601f830112612e39578081fd5b61199183833560208501612ddb565b600060208284031215612e59578081fd5b8135611991816135b5565b60008060408385031215612e76578081fd5b8235612e81816135b5565b91506020830135612e91816135b5565b809150509250929050565b600080600060608486031215612eb0578081fd5b8335612ebb816135b5565b92506020840135612ecb816135b5565b929592945050506040919091013590565b60008060008060808587031215612ef1578081fd5b8435612efc816135b5565b93506020850135612f0c816135b5565b925060408501359150606085013567ffffffffffffffff811115612f2e578182fd5b8501601f81018713612f3e578182fd5b612f4d87823560208401612ddb565b91505092959194509250565b60008060408385031215612f6b578182fd5b8235612f76816135b5565b9150612f8460208401612e19565b90509250929050565b60008060408385031215612f9f578182fd5b8235612faa816135b5565b946020939093013593505050565b60006020808385031215612fca578182fd5b823567ffffffffffffffff80821115612fe1578384fd5b818501915085601f830112612ff4578384fd5b8135818111156130065761300661359f565b8060051b9150613017848301613444565b8181528481019084860184860187018a1015613031578788fd5b8795505b8386101561305f578035945061304a856135b5565b84835260019590950194918601918601613035565b5098975050505050505050565b60006020828403121561307d578081fd5b61199182612e19565b600060208284031215613097578081fd5b5035919050565b600080604083850312156130b0578182fd5b823591506020830135612e91816135b5565b600080604083850312156130d4578182fd5b50508035926020909101359150565b6000602082840312156130f4578081fd5b8135611991816135ca565b600060208284031215613110578081fd5b8151611991816135ca565b60006020828403121561312c578081fd5b813567ffffffffffffffff811115613142578182fd5b6125e084828501612e29565b60006020828403121561315f578081fd5b815167ffffffffffffffff811115613175578182fd5b8201601f81018413613185578182fd5b8051613193612de982613475565b8181528560208385010111156131a7578384fd5b6131b882602083016020860161350b565b95945050505050565b600080604083850312156131d3578182fd5b823567ffffffffffffffff8111156131e9578283fd5b6131f585828601612e29565b95602094909401359450505050565b60008060008060608587031215613219578182fd5b84359350602085013567ffffffffffffffff80821115613237578384fd5b818701915087601f83011261324a578384fd5b813581811115613258578485fd5b886020828501011115613269578485fd5b95986020929092019750949560400135945092505050565b600060208284031215613292578081fd5b813560ff81168114611991578182fd5b600081518084526132ba81602086016020860161350b565b601f01601f19169290920160200192915050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161330681601785016020880161350b565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161334381602884016020880161350b565b01602801949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261338160808301846132a2565b9695505050505050565b60208152600061199160208301846132a2565b6000602080835281845483600182811c9150808316806133bf57607f831692505b8583108114156133dd57634e487b7160e01b87526022600452602487fd5b8786018381526020018180156133fa576001811461340b57613435565b60ff19861682528782019650613435565b60008b815260209020895b8681101561342f57815484820152908501908901613416565b83019750505b50949998505050505050505050565b604051601f8201601f1916810167ffffffffffffffff8111828210171561346d5761346d61359f565b604052919050565b600067ffffffffffffffff82111561348f5761348f61359f565b50601f01601f191660200190565b600082198211156134b0576134b0613589565b500190565b6000826134d057634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156134ef576134ef613589565b500290565b60008282101561350657613506613589565b500390565b60005b8381101561352657818101518382015260200161350e565b83811115610db95750506000910152565b60008161354657613546613589565b506000190190565b600181811c9082168061356257607f821691505b6020821081141561358357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146112be57600080fd5b6001600160e01b0319811681146112be57600080fdfea264697066735822122010f0a0937a6faba568e7a3a712e3ca49c5eeeb138f38553648c305eb93b793f864736f6c63430008040033c8a41221bcd7fcf2c225f5a9265e1d4d39949d89197159d59e5f4b87b62c419e00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003f200000000000000000000000000000000000000000000000000000000000000c800000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000044a414c420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044a414c42000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d43e6164092f1fcc6953bcc2684847cdda8bb3ce0000000000000000000000001f4fd4fb3ca0ab27403e80cd74b552147aafb38300000000000000000000000034aa2dd5bc7837238673a919a9e9a28bd6374ed4000000000000000000000000b31cf5cb11115329d5aea6afda5316b41f2737e7

Deployed Bytecode

0x6080604052600436106103a25760003560e01c8063715018a6116101e7578063a475b5dd1161010d578063ca15c873116100a0578063e8a3d4851161006f578063e8a3d48514610afb578063e985e9c514610b10578063f2fde38b14610b59578063f968adbe14610b7957600080fd5b8063ca15c87314610a53578063ced3a40314610a73578063d547741f14610aa7578063e63ab1e914610ac757600080fd5b8063b88d4fde116100dc578063b88d4fde146109e0578063bc3a0574146109f3578063c3b754dc14610a13578063c87b56dd14610a3357600080fd5b8063a475b5dd1461096b578063acdae89914610980578063acec338a146109a0578063b4039066146109c057600080fd5b806391b7f5ed116101855780639d1b464a116101545780639d1b464a1461090b578063a035b1fe14610920578063a217fddf14610936578063a22cb4651461094b57600080fd5b806391b7f5ed1461087057806391d1485414610890578063938e3d7b146108d657806395d89b41146108f657600080fd5b80638aa16d11116101c15780638aa16d11146107f25780638c7ea24b146108125780638da5cb5b146108325780639010d07c1461085057600080fd5b8063715018a6146107a8578063753868e3146107bd5780638013f9a8146107d257600080fd5b806330176e13116102cc57806353cd77011161026a578063645d634111610239578063645d6341146107355780636c19e783146107485780636c6589af1461076857806370a082311461078857600080fd5b806353cd7701146106b457806354214f69146106d45780635daa3160146106f55780636352211e1461071557600080fd5b806336568abe116102a657806336568abe1461064c5780633ccfd60b1461066c57806342842e0e146106815780634dcf6ad61461069457600080fd5b806330176e13146105d7578063324cb3cb146105f757806332cb6b0c1461061857600080fd5b80631b07937311610344578063264f43eb11610313578063264f43eb1461054357806329abd80d146105585780632a55205a146105785780632f2ff15d146105b757600080fd5b80631b079373146104bf57806322f3e2d4146104df57806323b872dd14610500578063248a9ca31461051357600080fd5b8063081812fc11610380578063081812fc1461042a578063095ea7b3146104625780630ce1031b1461047757806318160ddd1461049857600080fd5b806301ffc9a7146103a757806306d586bb146103dc57806306fdde0314610408575b600080fd5b3480156103b357600080fd5b506103c76103c23660046130e3565b610b98565b60405190151581526020015b60405180910390f35b3480156103e857600080fd5b506011546103f69060ff1681565b60405160ff90911681526020016103d3565b34801561041457600080fd5b5061041d610bc3565b6040516103d3919061338b565b34801561043657600080fd5b5061044a610445366004613086565b610c55565b6040516001600160a01b0390911681526020016103d3565b610475610470366004612f8d565b610c99565b005b34801561048357600080fd5b506015546103c790600160b01b900460ff1681565b3480156104a457600080fd5b5060015460005403600019015b6040519081526020016103d3565b3480156104cb57600080fd5b506104756104da3660046131c1565b610d39565b3480156104eb57600080fd5b506015546103c790600160a01b900460ff1681565b61047561050e366004612e9c565b610dbf565b34801561051f57600080fd5b506104b161052e366004613086565b60009081526009602052604090206001015490565b34801561054f57600080fd5b5061041d610f50565b34801561056457600080fd5b5061041d610573366004613086565b610fde565b34801561058457600080fd5b506105986105933660046130c2565b610ff7565b604080516001600160a01b0390931683526020830191909152016103d3565b3480156105c357600080fd5b506104756105d236600461309e565b611055565b3480156105e357600080fd5b506104756105f236600461311b565b61107f565b34801561060357600080fd5b506015546103c790600160a81b900460ff1681565b34801561062457600080fd5b506104b17f00000000000000000000000000000000000000000000000000000000000003f281565b34801561065857600080fd5b5061047561066736600461309e565b611105565b34801561067857600080fd5b50610475611196565b61047561068f366004612e9c565b6112c1565b3480156106a057600080fd5b506104756106af366004613086565b6112dc565b3480156106c057600080fd5b506104756106cf366004612e48565b6113a4565b3480156106e057600080fd5b506015546103c790600160c01b900460ff1681565b34801561070157600080fd5b5061044a610710366004613086565b6113fd565b34801561072157600080fd5b5061044a610730366004613086565b611427565b610475610743366004613204565b611432565b34801561075457600080fd5b50610475610763366004612e48565b6116be565b34801561077457600080fd5b50610475610783366004613086565b6116ec565b34801561079457600080fd5b506104b16107a3366004612e48565b61182a565b3480156107b457600080fd5b50610475611879565b3480156107c957600080fd5b5061047561188d565b3480156107de57600080fd5b506104756107ed366004613281565b6118fd565b3480156107fe57600080fd5b5061047561080d366004613281565b611925565b34801561081e57600080fd5b5061047561082d366004612f8d565b611947565b34801561083e57600080fd5b506008546001600160a01b031661044a565b34801561085c57600080fd5b5061044a61086b3660046130c2565b611979565b34801561087c57600080fd5b5061047561088b366004613086565b611998565b34801561089c57600080fd5b506103c76108ab36600461309e565b60009182526009602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156108e257600080fd5b506104756108f136600461311b565b6119a9565b34801561090257600080fd5b5061041d6119f2565b34801561091757600080fd5b506010546104b1565b34801561092c57600080fd5b506104b160105481565b34801561094257600080fd5b506104b1600081565b34801561095757600080fd5b50610475610966366004612f59565b611a01565b34801561097757600080fd5b50610475611a6d565b34801561098c57600080fd5b5060185461044a906001600160a01b031681565b3480156109ac57600080fd5b506104756109bb36600461306c565b611aa9565b3480156109cc57600080fd5b506104756109db36600461311b565b611b43565b6104756109ee366004612edc565b611bb7565b3480156109ff57600080fd5b50610475610a0e366004612fb8565b611bfb565b348015610a1f57600080fd5b50610475610a2e36600461306c565b611c19565b348015610a3f57600080fd5b5061041d610a4e366004613086565b611c5e565b348015610a5f57600080fd5b506104b1610a6e366004613086565b611e05565b348015610a7f57600080fd5b506104b17fc8a41221bcd7fcf2c225f5a9265e1d4d39949d89197159d59e5f4b87b62c419e81565b348015610ab357600080fd5b50610475610ac236600461309e565b611e1c565b348015610ad357600080fd5b506104b17f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b348015610b0757600080fd5b5061041d611e41565b348015610b1c57600080fd5b506103c7610b2b366004612e64565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610b6557600080fd5b50610475610b74366004612e48565b611e50565b348015610b8557600080fd5b506011546103f690610100900460ff1681565b60006001600160e01b0319821663152a902d60e11b1480610bbd5750610bbd82612195565b92915050565b606060028054610bd29061354e565b80601f0160208091040260200160405190810160405280929190818152602001828054610bfe9061354e565b8015610c4b5780601f10610c2057610100808354040283529160200191610c4b565b820191906000526020600020905b815481529060010190602001808311610c2e57829003601f168201915b5050505050905090565b6000610c60826121ba565b610c7d576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610ca482611427565b9050336001600160a01b03821614610cdd57610cc08133610b2b565b610cdd576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000610d44816121ef565b601554600160a81b900460ff1615610d6f5760405163af9e1b4360e01b815260040160405180910390fd5b601554600160c01b900460ff1615610d9a576040516344cad7bf60e01b815260040160405180910390fd5b60008281526017602090815260409091208451610db992860190612ced565b50505050565b6000610dca826121f9565b9050836001600160a01b0316816001600160a01b031614610dfd5760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417610e4a57610e2d8633610b2b565b610e4a57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610e7157604051633a954ecd60e21b815260040160405180910390fd5b8015610e7c57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040902055600160e11b8316610f075760018401600081815260046020526040902054610f05576000548114610f055760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b60168054610f5d9061354e565b80601f0160208091040260200160405190810160405280929190818152602001828054610f899061354e565b8015610fd65780601f10610fab57610100808354040283529160200191610fd6565b820191906000526020600020905b815481529060010190602001808311610fb957829003601f168201915b505050505081565b60176020526000908152604090208054610f5d9061354e565b600080611003846121ba565b61102057604051630a14c4b560e41b815260040160405180910390fd5b6015546014546001600160a01b039091169060649061103f90866134d5565b61104991906134b5565b915091505b9250929050565b600082815260096020526040902060010154611070816121ef565b61107a8383612262565b505050565b600061108a816121ef565b601554600160a81b900460ff16156110b55760405163af9e1b4360e01b815260040160405180910390fd5b81516110c890600c906020850190612ced565b507f325d37e8fb549c86966f09bc3e6f62eb3afa93b255d6e3234338001f3d80bd86600c6040516110f9919061339e565b60405180910390a15050565b6001600160a01b03811633146111885760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6111928282612284565b5050565b7fc8a41221bcd7fcf2c225f5a9265e1d4d39949d89197159d59e5f4b87b62c419e6111c0816121ef565b6111c86122a6565b47806111e757604051631a84bc4160e21b815260040160405180910390fd5b60125460006111f682846134b5565b905060005b8281101561126d576012818154811061122457634e487b7160e01b600052603260045260246000fd5b60009182526020822001546040516001600160a01b039091169184156108fc02918591818181858888f19350505050158015611264573d6000803e3d6000fd5b506001016111fb565b507f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436433604080516001600160a01b039092168252602082018690520160405180910390a15050506112be6001600b55565b50565b61107a83838360405180602001604052806000815250611bb7565b601554600160a81b900460ff16611306576040516341966ae960e01b815260040160405180910390fd5b3361131082611427565b6001600160a01b03161461133757604051630247f98760e21b815260040160405180910390fd5b601554600160c01b900460ff1661136157604051635785260b60e11b815260040160405180910390fd5b807fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b5565720761138c83611c5e565b604051611399919061338b565b60405180910390a250565b60006113af816121ef565b601554600160a81b900460ff16156113da5760405163af9e1b4360e01b815260040160405180910390fd5b50601880546001600160a01b0319166001600160a01b0392909216919091179055565b6012818154811061140d57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000610bbd826121f9565b61143a6122a6565b6015548490600160a01b900460ff16611466576040516369183ba160e11b815260040160405180910390fd5b8061148457604051634896bcb160e01b815260040160405180910390fd5b3233146114a45760405163f896ca4b60e01b815260040160405180910390fd5b6001546000547f00000000000000000000000000000000000000000000000000000000000003f291839103600019016114dd919061349d565b11156114fc5760405163b828d9b560e01b815260040160405180910390fd5b601154610100900460ff168111156115275760405163cbc52a5f60e01b815260040160405180910390fd5b60115460ff168161155b336001600160a01b03166000908152600560205260409081902054901c67ffffffffffffffff1690565b611565919061349d565b111561158457604051632c1bae1760e11b815260040160405180910390fd5b601554600160b01b900460ff16156115c5576115a38484873486612300565b6115c057604051638baa579f60e01b815260040160405180910390fd5b6115f9565b846115cf60105490565b6115d991906134d5565b3410156115f957604051631a84bc4160e21b815260040160405180910390fd5b611603338661241e565b6040805133815260208101879052348183015290517f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f9181900360600190a160105461164f90866134d5565b341180156116675750601554600160b01b900460ff16155b156116b35760105433906108fc9061167f90886134d5565b61168990346134f4565b6040518115909202916000818181858888f193505050501580156116b1573d6000803e3d6000fd5b505b50610db96001600b55565b60006116c9816121ef565b50600f80546001600160a01b0319166001600160a01b0392909216919091179055565b7fc8a41221bcd7fcf2c225f5a9265e1d4d39949d89197159d59e5f4b87b62c419e611716816121ef565b61171e6122a6565b601554600160b81b900460ff16156117495760405163a7d3365160e01b815260040160405180910390fd5b336000908152601360205260409020547f00000000000000000000000000000000000000000000000000000000000000329061178690849061349d565b11156117a5576040516326a0f77d60e11b815260040160405180910390fd5b81600e60008282546117b791906134f4565b909155505033600090815260136020526040812080548492906117db90849061349d565b9091555050600e5461181657601580547fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff16600160b81b1790555b611820338361241e565b6111926001600b55565b60006001600160a01b038216611853576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b611881612438565b61188b6000612492565b565b6000611898816121ef565b601580547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16600160a81b179055604051600181527fb08f70f6219c5c2ed5e08e7cf45080e4840fde880b27a0841faf45475cd02d2e9060200160405180910390a150565b6000611908816121ef565b506011805460ff9092166101000261ff0019909216919091179055565b6000611930816121ef565b506011805460ff191660ff92909216919091179055565b6000611952816121ef565b50601580546001600160a01b0319166001600160a01b039390931692909217909155601455565b6000828152600a6020526040812061199190836124e4565b9392505050565b60006119a3816121ef565b50601055565b60006119b4816121ef565b601554600160a81b900460ff16156119df5760405163af9e1b4360e01b815260040160405180910390fd5b815161107a90600d906020850190612ced565b606060038054610bd29061354e565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000611a78816121ef565b50601580547fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b179055565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611ad3816121ef565b601580547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b8415158102919091179182905560405160ff9190920416151581527f2a9c7e9da7f0fa57f817819f7ec7c77d448c5f91ea757867c2503c612a61e1cb906020016110f9565b6000611b4e816121ef565b601554600160a81b900460ff1615611b795760405163af9e1b4360e01b815260040160405180910390fd5b601554600160c01b900460ff1615611ba4576040516344cad7bf60e01b815260040160405180910390fd5b815161107a906016906020850190612ced565b611bc2848484610dbf565b6001600160a01b0383163b15610db957611bde848484846124f0565b610db9576040516368d2bf6b60e11b815260040160405180910390fd5b6000611c06816121ef565b815161107a906012906020850190612d71565b6000611c24816121ef565b5060158054911515600160b01b027fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6060611c69826121ba565b611c8657604051630a14c4b560e41b815260040160405180910390fd5b601554600160c01b900460ff16611d575760168054611ca49061354e565b15159050611cc557604051634ea3cd5f60e11b815260040160405180910390fd5b60168054611cd29061354e565b80601f0160208091040260200160405190810160405280929190818152602001828054611cfe9061354e565b8015611d4b5780601f10611d2057610100808354040283529160200191611d4b565b820191906000526020600020905b815481529060010190602001808311611d2e57829003601f168201915b50505050509050919050565b6018546001600160a01b0316611d80576040516311f6a3c160e21b815260040160405180910390fd5b601854604051632da393ff60e01b8152600481018490526001600160a01b0390911690632da393ff9060240160006040518083038186803b158015611dc457600080fd5b505afa158015611dd8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bbd919081019061314e565b919050565b6000818152600a60205260408120610bbd906125e8565b600082815260096020526040902060010154611e37816121ef565b61107a8383612284565b6060600d8054610bd29061354e565b611e58612438565b6001600160a01b038116611ed45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161117f565b6112be81612492565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff166111925760008281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611f3b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611991836001600160a01b0384166125f2565b6060610bbd6001600160a01b03831660145b60606000611fb58360026134d5565b611fc090600261349d565b67ffffffffffffffff811115611fe657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612010576020820181803683370190505b509050600360fc1b8160008151811061203957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061207657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600061209a8460026134d5565b6120a590600161349d565b90505b6001811115612146577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106120f457634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061211857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361213f81613537565b90506120a8565b5083156119915760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161117f565b60006001600160e01b03198216635a05180f60e01b1480610bbd5750610bbd82612641565b6000816001111580156121ce575060005482105b8015610bbd575050600090815260046020526040902054600160e01b161590565b6112be8133612676565b600081806001116122495760005481101561224957600081815260046020526040902054600160e01b8116612247575b80611991575060001901600081815260046020526040902054612229565b505b604051636f96cda160e11b815260040160405180910390fd5b61226c8282611edd565b6000828152600a6020526040902061107a9082611f7f565b61228e82826126eb565b6000828152600a6020526040902061107a908261276e565b6002600b5414156122f95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161117f565b6002600b55565b60008030336040516bffffffffffffffffffffffff19606093841b811660208301529190921b16603482015260488101869052606881018590526088810184905260a80160405160208183030381529060405280519060200120905060006123f08260405160200161239e91907f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b6040516020818303038152906040528051906020012089898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061278392505050565b600f549091506001600160a01b0380831691161461240f576000612412565b60015b98975050505050505050565b6111928282604051806020016040528060008152506127a7565b6008546001600160a01b0316331461188b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161117f565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006119918383612814565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061252590339089908890889060040161334f565b602060405180830381600087803b15801561253f57600080fd5b505af192505050801561256f575060408051601f3d908101601f1916820190925261256c918101906130ff565b60015b6125ca573d80801561259d576040519150601f19603f3d011682016040523d82523d6000602084013e6125a2565b606091505b5080516125c2576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6000610bbd825490565b600081815260018301602052604081205461263957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610bbd565b506000610bbd565b60006001600160e01b03198216637965db0b60e01b1480610bbd57506301ffc9a760e01b6001600160e01b0319831614610bbd565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16611192576126a981611f94565b6126b4836020611fa6565b6040516020016126c59291906132ce565b60408051601f198184030181529082905262461bcd60e51b825261117f9160040161338b565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16156111925760008281526009602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611991836001600160a01b03841661284c565b60008060006127928585612969565b9150915061279f816129ac565b509392505050565b6127b18383612b32565b6001600160a01b0383163b1561107a576000548281035b6127db60008683806001019450866124f0565b6127f8576040516368d2bf6b60e11b815260040160405180910390fd5b8181106127c857816000541461280d57600080fd5b5050505050565b600082600001828154811061283957634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6000818152600183016020526040812054801561295f5760006128706001836134f4565b8554909150600090612884906001906134f4565b90508181146129055760008660000182815481106128b257634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050808760000184815481106128e357634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061292457634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610bbd565b6000915050610bbd565b6000808251604114156129a05760208301516040840151606085015160001a61299487828585612c29565b9450945050505061104e565b5060009050600261104e565b60008160048111156129ce57634e487b7160e01b600052602160045260246000fd5b14156129d75750565b60018160048111156129f957634e487b7160e01b600052602160045260246000fd5b1415612a475760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161117f565b6002816004811115612a6957634e487b7160e01b600052602160045260246000fd5b1415612ab75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161117f565b6003816004811115612ad957634e487b7160e01b600052602160045260246000fd5b14156112be5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161117f565b60005481612b535760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114612c0257808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612bca565b5081612c2057604051622e076360e81b815260040160405180910390fd5b60005550505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612c605750600090506003612ce4565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612cb4573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612cdd57600060019250925050612ce4565b9150600090505b94509492505050565b828054612cf99061354e565b90600052602060002090601f016020900481019282612d1b5760008555612d61565b82601f10612d3457805160ff1916838001178555612d61565b82800160010185558215612d61579182015b82811115612d61578251825591602001919060010190612d46565b50612d6d929150612dc6565b5090565b828054828255906000526020600020908101928215612d61579160200282015b82811115612d6157825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612d91565b5b80821115612d6d5760008155600101612dc7565b6000612dee612de984613475565b613444565b9050828152838383011115612e0257600080fd5b828260208301376000602084830101529392505050565b80358015158114611e0057600080fd5b600082601f830112612e39578081fd5b61199183833560208501612ddb565b600060208284031215612e59578081fd5b8135611991816135b5565b60008060408385031215612e76578081fd5b8235612e81816135b5565b91506020830135612e91816135b5565b809150509250929050565b600080600060608486031215612eb0578081fd5b8335612ebb816135b5565b92506020840135612ecb816135b5565b929592945050506040919091013590565b60008060008060808587031215612ef1578081fd5b8435612efc816135b5565b93506020850135612f0c816135b5565b925060408501359150606085013567ffffffffffffffff811115612f2e578182fd5b8501601f81018713612f3e578182fd5b612f4d87823560208401612ddb565b91505092959194509250565b60008060408385031215612f6b578182fd5b8235612f76816135b5565b9150612f8460208401612e19565b90509250929050565b60008060408385031215612f9f578182fd5b8235612faa816135b5565b946020939093013593505050565b60006020808385031215612fca578182fd5b823567ffffffffffffffff80821115612fe1578384fd5b818501915085601f830112612ff4578384fd5b8135818111156130065761300661359f565b8060051b9150613017848301613444565b8181528481019084860184860187018a1015613031578788fd5b8795505b8386101561305f578035945061304a856135b5565b84835260019590950194918601918601613035565b5098975050505050505050565b60006020828403121561307d578081fd5b61199182612e19565b600060208284031215613097578081fd5b5035919050565b600080604083850312156130b0578182fd5b823591506020830135612e91816135b5565b600080604083850312156130d4578182fd5b50508035926020909101359150565b6000602082840312156130f4578081fd5b8135611991816135ca565b600060208284031215613110578081fd5b8151611991816135ca565b60006020828403121561312c578081fd5b813567ffffffffffffffff811115613142578182fd5b6125e084828501612e29565b60006020828403121561315f578081fd5b815167ffffffffffffffff811115613175578182fd5b8201601f81018413613185578182fd5b8051613193612de982613475565b8181528560208385010111156131a7578384fd5b6131b882602083016020860161350b565b95945050505050565b600080604083850312156131d3578182fd5b823567ffffffffffffffff8111156131e9578283fd5b6131f585828601612e29565b95602094909401359450505050565b60008060008060608587031215613219578182fd5b84359350602085013567ffffffffffffffff80821115613237578384fd5b818701915087601f83011261324a578384fd5b813581811115613258578485fd5b886020828501011115613269578485fd5b95986020929092019750949560400135945092505050565b600060208284031215613292578081fd5b813560ff81168114611991578182fd5b600081518084526132ba81602086016020860161350b565b601f01601f19169290920160200192915050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161330681601785016020880161350b565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161334381602884016020880161350b565b01602801949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261338160808301846132a2565b9695505050505050565b60208152600061199160208301846132a2565b6000602080835281845483600182811c9150808316806133bf57607f831692505b8583108114156133dd57634e487b7160e01b87526022600452602487fd5b8786018381526020018180156133fa576001811461340b57613435565b60ff19861682528782019650613435565b60008b815260209020895b8681101561342f57815484820152908501908901613416565b83019750505b50949998505050505050505050565b604051601f8201601f1916810167ffffffffffffffff8111828210171561346d5761346d61359f565b604052919050565b600067ffffffffffffffff82111561348f5761348f61359f565b50601f01601f191660200190565b600082198211156134b0576134b0613589565b500190565b6000826134d057634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156134ef576134ef613589565b500290565b60008282101561350657613506613589565b500390565b60005b8381101561352657818101518382015260200161350e565b83811115610db95750506000910152565b60008161354657613546613589565b506000190190565b600181811c9082168061356257607f821691505b6020821081141561358357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146112be57600080fd5b6001600160e01b0319811681146112be57600080fdfea264697066735822122010f0a0937a6faba568e7a3a712e3ca49c5eeeb138f38553648c305eb93b793f864736f6c63430008040033

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

00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003f200000000000000000000000000000000000000000000000000000000000000c800000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000044a414c420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044a414c42000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000d43e6164092f1fcc6953bcc2684847cdda8bb3ce0000000000000000000000001f4fd4fb3ca0ab27403e80cd74b552147aafb38300000000000000000000000034aa2dd5bc7837238673a919a9e9a28bd6374ed4000000000000000000000000b31cf5cb11115329d5aea6afda5316b41f2737e7

-----Decoded View---------------
Arg [0] : tokenName (string): JALB
Arg [1] : symbol (string): JALB
Arg [2] : collectionSize (uint256): 1010
Arg [3] : devReserved (uint256): 200
Arg [4] : _royalties (uint256): 1000
Arg [5] : _beneficiary (address[]): 0xD43E6164092F1fcc6953bcc2684847CddA8bb3cE,0x1F4FD4Fb3CA0AB27403e80cd74B552147AAfB383,0x34AA2DD5BC7837238673A919a9e9a28bd6374ed4,0xb31cF5CB11115329D5aeA6afDA5316B41F2737E7

-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 00000000000000000000000000000000000000000000000000000000000003f2
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000c8
Arg [4] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [7] : 4a414c4200000000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [9] : 4a414c4200000000000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [11] : 000000000000000000000000d43e6164092f1fcc6953bcc2684847cdda8bb3ce
Arg [12] : 0000000000000000000000001f4fd4fb3ca0ab27403e80cd74b552147aafb383
Arg [13] : 00000000000000000000000034aa2dd5bc7837238673a919a9e9a28bd6374ed4
Arg [14] : 000000000000000000000000b31cf5cb11115329d5aea6afda5316b41f2737e7


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.