ETH Price: $3,530.60 (+7.08%)

Token

[ Ledger ] Market – Deadfellaz Nano X (DFZNX)
 

Overview

Max Total Supply

1,993 DFZNX

Holders

553

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
Null: 0x000...000
Balance
0 DFZNX
0x0000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Trade this NFT for one of Ledger's limited edition Deadfellaz Nano X hardware wallets. For details on how to redeem each NFT, go to market.ledger.com/drop/DEADFELLAZ-NANO-X. Upon redemption, the NFT is permanently destroyed. Technical note: Holders of the [ Ledger ] Market Pass - Genesis Edition NFT, Deadfellaz, or Deadfrenz Collection, had the exclusive right to mint this NFT November 14-21 2022.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
DeadfellazNanoX

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

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

pragma solidity >=0.8.4;

import {ERC721} from "@rari-capital/solmate/src/tokens/ERC721.sol";
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./ReentrancyGuard.sol";
import "./Signable.sol";
import "../Helpers.sol";
import "./Errors.sol";

contract DeadfellazNanoX is ERC721, ReentrancyGuard, Signable, AccessControl {
    bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE");

    // Phase States: None - can't mint, Pre Sale - only mint with sign, Main Sale - only regular mint
    enum Phase {
        NONE,
        PRE_SALE,
        MAIN_SALE
    }

    struct WithdrawalAddress {
        address account;
        uint96 percentage;
    }

    // Current phase of the contract
    Phase private _phase;

    // Constants
    // Maximum number of NFTs can be allocated
    uint256 public orginalMaxSupply;
    uint256 public maxSupply;

    // ETH value should be sent with mint (owner mint is free)
    uint256 public mintPrice = 0.3 ether;

    // Number of mints account can do on the public sale
    uint256 public mintsPerAccountOnPublicSale = 5;

    // Addresses where money from the contract will go if the owner of the contract will call withdraw function
    WithdrawalAddress[] public withdrawalAddresses;

    // Counter used for token number in minting
    uint256 private _nextTokenCount = 1;

    // Base token and contract URI
    string private baseTokenURI;
    string private baseContractURI;

    // Number of tokens account has minted
    mapping(address => uint256) public minted;

    // Modifier is used to check if the phase rule is met
    modifier phaseRequired(Phase phase_) {
        if (phase_ != _phase) revert Errors.MintNotAvailable();
        _;
    }

    // Modifier is used to check if at least a minimal amount of money was sent
    modifier costs(uint256 amount) {
        if (msg.value < mintPrice * amount) revert Errors.InsufficientFunds();
        _;
    }

    constructor(
        uint256 _maxSupply,
        string memory _baseTokenURI,
        string memory _baseContractURI,
        string memory _name,
        string memory _symbol,
        WithdrawalAddress[] memory _withdrawalAddresses
    ) ERC721(_name, _symbol) {
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);

        maxSupply = _maxSupply;
        orginalMaxSupply = _maxSupply;
        baseTokenURI = _baseTokenURI;
        baseContractURI = _baseContractURI;

        uint256 length = _withdrawalAddresses.length;
        if (length == 0) revert Errors.WithdrawalPercentageWrongSize();

        uint256 sum;
        for (uint256 i; i < length; ) {
            uint256 percentage = _withdrawalAddresses[i].percentage;
            if (percentage == 0) revert Errors.WithdrawalPercentageZero();
            sum += percentage;
            withdrawalAddresses.push(_withdrawalAddresses[i]);
            unchecked {
                ++i;
            }
        }
        if (sum != 100) revert Errors.WithdrawalPercentageNot100();
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC721, AccessControl)
        returns (bool)
    {
        return
            ERC721.supportsInterface(interfaceId) ||
            AccessControl.supportsInterface(interfaceId);
    }

    // Contract owner can call this function to mint `amount` of tokens into account with the address `to`
    function ownerMint(address to, uint256 amount) external onlyOwner lock {
        if (_nextTokenCount + amount - 1 > maxSupply)
            revert Errors.SupplyLimitReached();

        for (uint256 i; i < amount; ) {
            _safeMint(to, _nextTokenCount);

            unchecked {
                ++_nextTokenCount;
                ++i;
            }
        }
    }

    // Function used to do minting on pre-sale phase (with signature)
    function preSaleMint(
        uint256 amount,
        uint256 maxAmount,
        bytes calldata signature
    ) external payable costs(amount) phaseRequired(Phase.PRE_SALE) lock {
        if (!_verify(signer(), _hash(msg.sender, maxAmount), signature))
            revert Errors.InvalidSignature();

        if (minted[msg.sender] + amount > maxAmount)
            revert Errors.AccountAlreadyMintedMax();

        _mintLogic(amount);
    }

    // Function used to do minting on main-sale phase
    function mint(uint256 amount)
        external
        payable
        costs(amount)
        phaseRequired(Phase.MAIN_SALE)
        lock
    {
        if (minted[msg.sender] + amount > mintsPerAccountOnPublicSale)
            revert Errors.AccountAlreadyMintedMax();

        _mintLogic(amount);
    }

    function burn(uint256 id, address tokenOwner)
        external
        onlyRole(BURNER_ROLE)
    {
        _burnLogic(id, tokenOwner);
    }

    // Contract owner can call this function to withdraw all money from the contract into a defined wallet
    function withdrawAll() external onlyOwner {
        uint256 balance = address(this).balance;
        if (balance == 0) revert Errors.NothingToWithdraw();

        uint256 length = withdrawalAddresses.length;
        for (uint256 i; i < length; ) {
            uint256 percentage = withdrawalAddresses[i].percentage;
            address withdrawalAddress = withdrawalAddresses[i].account;
            uint256 value = (balance * percentage) / 100;

            (withdrawalAddress.call{value: value}(""));

            unchecked {
                ++i;
            }
        }

        balance = address(this).balance;
        if (balance > 0) {
            (withdrawalAddresses[0].account.call{value: balance}(""));
        }
    }

    // Contract owner can call this function to set minting price on pre-sale and main-sale
    function setMintPrice(uint256 mintPrice_) external onlyOwner {
        mintPrice = mintPrice_;
    }

    // The contract owner can call this function to change the max supply. It can only be reduced but can't be smaller than the amount of already minted tokens
    function reduceMaxSupply(uint256 newMaxSupply) external onlyOwner {
        if (newMaxSupply < _nextTokenCount - 1)
            revert Errors.MaxSupplyTooSmall();

        if (newMaxSupply >= orginalMaxSupply)
            revert Errors.CanNotIncreaseMaxSupply();

        maxSupply = newMaxSupply;
    }

    // Contract owner can call this function to change the number of mints per account on public sale
    function setMintsPerAccountOnPublicSale(
        uint256 mintsPerAccountOnPublicSale_
    ) external onlyOwner {
        mintsPerAccountOnPublicSale = mintsPerAccountOnPublicSale_;
    }

    function setContractURI(string calldata baseContractURI_)
        external
        onlyOwner
    {
        baseContractURI = baseContractURI_;
    }

    function setBaseURI(string calldata baseURI_) external onlyOwner {
        baseTokenURI = baseURI_;
    }

    function setPhase(Phase phase_) external onlyOwner {
        _phase = phase_;
    }

    function totalSupply() external view returns (uint256) {
        return _nextTokenCount - 1;
    }

    function contractURI() external view returns (string memory) {
        return baseContractURI;
    }

    function phase() external view returns (Phase) {
        return _phase;
    }

    function tokenURI(uint256 tokenId)
        public
        view
        override
        returns (string memory)
    {
        if (ownerOf(tokenId) == address(0)) revert Errors.TokenDoesNotExist();

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

    function _baseURI() internal view virtual returns (string memory) {
        return baseTokenURI;
    }

    function _mintLogic(uint256 amount) private {
        if (_nextTokenCount + amount - 1 > maxSupply)
            revert Errors.SupplyLimitReached();

        for (uint256 i; i < amount; ) {
            _safeMint(msg.sender, _nextTokenCount);

            unchecked {
                ++_nextTokenCount;
                ++i;
            }
        }

        minted[msg.sender] += amount;
    }

    function _verify(
        address signer,
        bytes32 hash,
        bytes calldata signature
    ) private pure returns (bool) {
        return signer == ECDSA.recover(hash, signature);
    }

    function _hash(address account, uint256 amount)
        private
        pure
        returns (bytes32)
    {
        return
            ECDSA.toEthSignedMessageHash(
                keccak256(abi.encodePacked(account, amount))
            );
    }

    function _burnLogic(uint256 id, address tokenOwner) private {
        address owner_ = ownerOf(id);

        if (tokenOwner != owner_) revert Errors.InvalidOwner();

        _burn(id);
    }
}

File 2 of 15 : AccessControl.sol
// 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());
        }
    }
}

File 3 of 15 : IAccessControl.sol
// 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;
}

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

pragma solidity ^0.8.0;

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

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

File 5 of 15 : ECDSA.sol
// 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));
    }
}

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 8 of 15 : Math.sol
// 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);
        }
    }
}

File 9 of 15 : Strings.sol
// 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);
    }
}

File 10 of 15 : Owned.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Simple single owner authorization mixin.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Owned.sol)
abstract contract Owned {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event OwnerUpdated(address indexed user, address indexed newOwner);

    /*//////////////////////////////////////////////////////////////
                            OWNERSHIP STORAGE
    //////////////////////////////////////////////////////////////*/

    address public owner;

    modifier onlyOwner() virtual {
        require(msg.sender == owner, "UNAUTHORIZED");

        _;
    }

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(address _owner) {
        owner = _owner;

        emit OwnerUpdated(address(0), _owner);
    }

    /*//////////////////////////////////////////////////////////////
                             OWNERSHIP LOGIC
    //////////////////////////////////////////////////////////////*/

    function setOwner(address newOwner) public virtual onlyOwner {
        owner = newOwner;

        emit OwnerUpdated(msg.sender, newOwner);
    }
}

File 11 of 15 : ERC721.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern, minimalist, and gas efficient ERC-721 implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 indexed id);

    event Approval(address indexed owner, address indexed spender, uint256 indexed id);

    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /*//////////////////////////////////////////////////////////////
                         METADATA STORAGE/LOGIC
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    function tokenURI(uint256 id) public view virtual returns (string memory);

    /*//////////////////////////////////////////////////////////////
                      ERC721 BALANCE/OWNER STORAGE
    //////////////////////////////////////////////////////////////*/

    mapping(uint256 => address) internal _ownerOf;

    mapping(address => uint256) internal _balanceOf;

    function ownerOf(uint256 id) public view virtual returns (address owner) {
        require((owner = _ownerOf[id]) != address(0), "NOT_MINTED");
    }

    function balanceOf(address owner) public view virtual returns (uint256) {
        require(owner != address(0), "ZERO_ADDRESS");

        return _balanceOf[owner];
    }

    /*//////////////////////////////////////////////////////////////
                         ERC721 APPROVAL STORAGE
    //////////////////////////////////////////////////////////////*/

    mapping(uint256 => address) public getApproved;

    mapping(address => mapping(address => bool)) public isApprovedForAll;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(string memory _name, string memory _symbol) {
        name = _name;
        symbol = _symbol;
    }

    /*//////////////////////////////////////////////////////////////
                              ERC721 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 id) public virtual {
        address owner = _ownerOf[id];

        require(msg.sender == owner || isApprovedForAll[owner][msg.sender], "NOT_AUTHORIZED");

        getApproved[id] = spender;

        emit Approval(owner, spender, id);
    }

    function setApprovalForAll(address operator, bool approved) public virtual {
        isApprovedForAll[msg.sender][operator] = approved;

        emit ApprovalForAll(msg.sender, operator, approved);
    }

    function transferFrom(
        address from,
        address to,
        uint256 id
    ) public virtual {
        require(from == _ownerOf[id], "WRONG_FROM");

        require(to != address(0), "INVALID_RECIPIENT");

        require(
            msg.sender == from || isApprovedForAll[from][msg.sender] || msg.sender == getApproved[id],
            "NOT_AUTHORIZED"
        );

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        unchecked {
            _balanceOf[from]--;

            _balanceOf[to]++;
        }

        _ownerOf[id] = to;

        delete getApproved[id];

        emit Transfer(from, to, id);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 id
    ) public virtual {
        transferFrom(from, to, id);

        require(
            to.code.length == 0 ||
                ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, "") ==
                ERC721TokenReceiver.onERC721Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        bytes calldata data
    ) public virtual {
        transferFrom(from, to, id);

        require(
            to.code.length == 0 ||
                ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) ==
                ERC721TokenReceiver.onERC721Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }

    /*//////////////////////////////////////////////////////////////
                              ERC165 LOGIC
    //////////////////////////////////////////////////////////////*/

    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return
            interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165
            interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721
            interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 id) internal virtual {
        require(to != address(0), "INVALID_RECIPIENT");

        require(_ownerOf[id] == address(0), "ALREADY_MINTED");

        // Counter overflow is incredibly unrealistic.
        unchecked {
            _balanceOf[to]++;
        }

        _ownerOf[id] = to;

        emit Transfer(address(0), to, id);
    }

    function _burn(uint256 id) internal virtual {
        address owner = _ownerOf[id];

        require(owner != address(0), "NOT_MINTED");

        // Ownership check above ensures no underflow.
        unchecked {
            _balanceOf[owner]--;
        }

        delete _ownerOf[id];

        delete getApproved[id];

        emit Transfer(owner, address(0), id);
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL SAFE MINT LOGIC
    //////////////////////////////////////////////////////////////*/

    function _safeMint(address to, uint256 id) internal virtual {
        _mint(to, id);

        require(
            to.code.length == 0 ||
                ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, "") ==
                ERC721TokenReceiver.onERC721Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }

    function _safeMint(
        address to,
        uint256 id,
        bytes memory data
    ) internal virtual {
        _mint(to, id);

        require(
            to.code.length == 0 ||
                ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) ==
                ERC721TokenReceiver.onERC721Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }
}

/// @notice A generic interface for a contract which properly accepts ERC721 tokens.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721TokenReceiver {
    function onERC721Received(
        address,
        address,
        uint256,
        bytes calldata
    ) external virtual returns (bytes4) {
        return ERC721TokenReceiver.onERC721Received.selector;
    }
}

File 12 of 15 : Errors.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.4;

library Errors {
    error WithdrawalPercentageWrongSize();
    error WithdrawalPercentageNot100();
    error WithdrawalPercentageZero();
    error MintNotAvailable();
    error InsufficientFunds();
    error SupplyLimitReached();
    error ContractCantMint();
    error InvalidSignature();
    error AccountAlreadyMintedMax();
    error TokenDoesNotExist();
    error NotOwner();
    error NotAuthorized();
    error MaxSupplyTooSmall();
    error CanNotIncreaseMaxSupply();
    error InvalidOwner();

    error NothingToWithdraw();
    error WithdrawFailed();

    /* ReentrancyGuard.sol */
    error ContractLocked();

    /* Signable.sol */
    error NewSignerCantBeZero();
}

File 13 of 15 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.4;

import "./Errors.sol";

abstract contract ReentrancyGuard {
    uint256 private unlocked = 1;
    modifier lock() {
        if (unlocked == 0) revert Errors.ContractLocked();

        unlocked = 0;
        _;
        unlocked = 1;
    }
}

File 14 of 15 : Signable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import "@rari-capital/solmate/src/auth/Owned.sol";
import "./Errors.sol";

/// @title Contract that manages the signer/owner roles
abstract contract Signable is Owned {
    address private _signer;

    constructor() Owned(msg.sender) {
        _signer = msg.sender;
    }

    function signer() public view returns (address) {
        return _signer;
    }

    /// @notice This method allow the owner change the signer role
    /// @dev At first, the signer role and the owner role is associated to the same address
    /// @param newSigner The address of the new signer
    function transferSigner(address newSigner) external onlyOwner {
        if (newSigner == address(0)) revert Errors.NewSignerCantBeZero();

        _signer = newSigner;
    }
}

File 15 of 15 : Helpers.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

library Helpers {
    function uint2string(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"string","name":"_baseTokenURI","type":"string"},{"internalType":"string","name":"_baseContractURI","type":"string"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint96","name":"percentage","type":"uint96"}],"internalType":"struct DeadfellazNanoX.WithdrawalAddress[]","name":"_withdrawalAddresses","type":"tuple[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccountAlreadyMintedMax","type":"error"},{"inputs":[],"name":"CanNotIncreaseMaxSupply","type":"error"},{"inputs":[],"name":"ContractLocked","type":"error"},{"inputs":[],"name":"InsufficientFunds","type":"error"},{"inputs":[],"name":"InvalidOwner","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"MaxSupplyTooSmall","type":"error"},{"inputs":[],"name":"MintNotAvailable","type":"error"},{"inputs":[],"name":"NewSignerCantBeZero","type":"error"},{"inputs":[],"name":"NothingToWithdraw","type":"error"},{"inputs":[],"name":"SupplyLimitReached","type":"error"},{"inputs":[],"name":"TokenDoesNotExist","type":"error"},{"inputs":[],"name":"WithdrawalPercentageNot100","type":"error"},{"inputs":[],"name":"WithdrawalPercentageWrongSize","type":"error"},{"inputs":[],"name":"WithdrawalPercentageZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","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":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdated","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":"id","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"BURNER_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":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"tokenOwner","type":"address"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","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":"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":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintsPerAccountOnPublicSale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"orginalMaxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phase","outputs":[{"internalType":"enum DeadfellazNanoX.Phase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"preSaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxSupply","type":"uint256"}],"name":"reduceMaxSupply","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":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseContractURI_","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintPrice_","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintsPerAccountOnPublicSale_","type":"uint256"}],"name":"setMintsPerAccountOnPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum DeadfellazNanoX.Phase","name":"phase_","type":"uint8"}],"name":"setPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":"id","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSigner","type":"address"}],"name":"transferSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"withdrawalAddresses","outputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint96","name":"percentage","type":"uint96"}],"stateMutability":"view","type":"function"}]

60806040526001600655670429d069189e0000600d556005600e5560016010553480156200002c57600080fd5b5060405162003232380380620032328339810160408190526200004f91620004d8565b338383600062000060838262000651565b5060016200006f828262000651565b5050600780546001600160a01b0319166001600160a01b0384169081179091556040519091506000907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76908290a350600880546001600160a01b03191633908117909155620000e19060009062000233565b600c869055600b8690556011620000f9868262000651565b50601262000108858262000651565b50805160008190036200012e5760405163c7f1ac2560e01b815260040160405180910390fd5b6000805b82811015620002025760008482815181106200015257620001526200071d565b6020026020010151602001516001600160601b03169050806000036200018b57604051631bdb102160e01b815260040160405180910390fd5b62000197818462000733565b9250600f858381518110620001b057620001b06200071d565b602090810291909101810151825460018181018555600094855293839020825192909301516001600160601b0316600160a01b026001600160a01b039092169190911791015591909101905062000132565b508060641462000225576040516369c4f37960e11b815260040160405180910390fd5b505050505050505062000755565b6200023f828262000243565b5050565b6200024f8282620002cd565b6200023f5760008281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002893390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff165b92915050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715620003355762000335620002fa565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620003665762000366620002fa565b604052919050565b600082601f8301126200038057600080fd5b81516001600160401b038111156200039c576200039c620002fa565b6020620003b2601f8301601f191682016200033b565b8281528582848701011115620003c757600080fd5b60005b83811015620003e7578581018301518282018401528201620003ca565b506000928101909101919091529392505050565b600082601f8301126200040d57600080fd5b815160206001600160401b038211156200042b576200042b620002fa565b6200043b818360051b016200033b565b82815260069290921b840181019181810190868411156200045b57600080fd5b8286015b84811015620004cd57604081890312156200047a5760008081fd5b6200048462000310565b81516001600160a01b03811681146200049d5760008081fd5b8152818501516001600160601b0381168114620004ba5760008081fd5b818601528352918301916040016200045f565b509695505050505050565b60008060008060008060c08789031215620004f257600080fd5b865160208801519096506001600160401b03808211156200051257600080fd5b620005208a838b016200036e565b965060408901519150808211156200053757600080fd5b620005458a838b016200036e565b955060608901519150808211156200055c57600080fd5b6200056a8a838b016200036e565b945060808901519150808211156200058157600080fd5b6200058f8a838b016200036e565b935060a0890151915080821115620005a657600080fd5b50620005b589828a01620003fb565b9150509295509295509295565b600181811c90821680620005d757607f821691505b602082108103620005f857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200064c57600081815260208120601f850160051c81016020861015620006275750805b601f850160051c820191505b81811015620006485782815560010162000633565b5050505b505050565b81516001600160401b038111156200066d576200066d620002fa565b62000685816200067e8454620005c2565b84620005fe565b602080601f831160018114620006bd5760008415620006a45750858301515b600019600386901b1c1916600185901b17855562000648565b600085815260208120601f198616915b82811015620006ee57888601518255948401946001909101908401620006cd565b50858210156200070d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b80820180821115620002f457634e487b7160e01b600052601160045260246000fd5b612acd80620007656000396000f3fe6080604052600436106102675760003560e01c806370a0823111610144578063a22cb465116100b6578063d547741f1161007a578063d547741f14610773578063d5abeb0114610793578063e8a3d485146107a9578063e985e9c5146107be578063f4a0a528146107f9578063fcd3533c1461081957600080fd5b8063a22cb465146106d3578063b1c9fe6e146106f3578063b88d4fde14610713578063c03afb5914610733578063c87b56dd1461075357600080fd5b80638da5cb5b116101085780638da5cb5b1461063657806391d1485414610656578063938e3d7b1461067657806395d89b4114610696578063a0712d68146106ab578063a217fddf146106be57600080fd5b806370a08231146105b857806373532802146105d85780637f1c7189146105f8578063827481ea1461060e578063853828b61461062157600080fd5b80632b5f5a4c116101dd57806342842e0e116101a157806342842e0e1461050c578063433535611461052c578063484b973c1461054257806355f804b3146105625780636352211e146105825780636817c76c146105a257600080fd5b80632b5f5a4c146104455780632f2ff15d1461046557806336568abe146104855780633660a084146104a55780633caaa09f146104c557600080fd5b806318160ddd1161022f57806318160ddd146103535780631e7269c514610376578063238ac933146103a357806323b872dd146103c1578063248a9ca3146103e1578063282c51f31461041157600080fd5b806301ffc9a71461026c57806306fdde03146102a1578063081812fc146102c3578063095ea7b31461031157806313af403514610333575b600080fd5b34801561027857600080fd5b5061028c6102873660046123a1565b610839565b60405190151581526020015b60405180910390f35b3480156102ad57600080fd5b506102b6610859565b60405161029891906123e2565b3480156102cf57600080fd5b506102f96102de366004612415565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610298565b34801561031d57600080fd5b5061033161032c366004612445565b6108e7565b005b34801561033f57600080fd5b5061033161034e36600461246f565b6109ce565b34801561035f57600080fd5b50610368610a44565b604051908152602001610298565b34801561038257600080fd5b5061036861039136600461246f565b60136020526000908152604090205481565b3480156103af57600080fd5b506008546001600160a01b03166102f9565b3480156103cd57600080fd5b506103316103dc36600461248a565b610a5a565b3480156103ed57600080fd5b506103686103fc366004612415565b60009081526009602052604090206001015490565b34801561041d57600080fd5b506103687f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b34801561045157600080fd5b50610331610460366004612415565b610c21565b34801561047157600080fd5b506103316104803660046124c6565b610c50565b34801561049157600080fd5b506103316104a03660046124c6565b610c7a565b3480156104b157600080fd5b506103316104c036600461246f565b610cf8565b3480156104d157600080fd5b506104e56104e0366004612415565b610d6b565b604080516001600160a01b0390931683526001600160601b03909116602083015201610298565b34801561051857600080fd5b5061033161052736600461248a565b610da6565b34801561053857600080fd5b50610368600e5481565b34801561054e57600080fd5b5061033161055d366004612445565b610e76565b34801561056e57600080fd5b5061033161057d366004612534565b610f38565b34801561058e57600080fd5b506102f961059d366004612415565b610f6f565b3480156105ae57600080fd5b50610368600d5481565b3480156105c457600080fd5b506103686105d336600461246f565b610fc6565b3480156105e457600080fd5b506103316105f3366004612415565b611029565b34801561060457600080fd5b50610368600b5481565b61033161061c366004612576565b6110a9565b34801561062d57600080fd5b506103316111df565b34801561064257600080fd5b506007546102f9906001600160a01b031681565b34801561066257600080fd5b5061028c6106713660046124c6565b61138f565b34801561068257600080fd5b50610331610691366004612534565b6113ba565b3480156106a257600080fd5b506102b66113f1565b6103316106b9366004612415565b6113fe565b3480156106ca57600080fd5b50610368600081565b3480156106df57600080fd5b506103316106ee3660046125c9565b6114e4565b3480156106ff57600080fd5b50600a5460ff16604051610298919061261b565b34801561071f57600080fd5b5061033161072e366004612643565b611550565b34801561073f57600080fd5b5061033161074e3660046126b2565b61160e565b34801561075f57600080fd5b506102b661076e366004612415565b61165f565b34801561077f57600080fd5b5061033161078e3660046124c6565b6116ef565b34801561079f57600080fd5b50610368600c5481565b3480156107b557600080fd5b506102b6611714565b3480156107ca57600080fd5b5061028c6107d93660046126d3565b600560209081526000928352604080842090915290825290205460ff1681565b34801561080557600080fd5b50610331610814366004612415565b6117a6565b34801561082557600080fd5b506103316108343660046124c6565b6117d5565b600061084482611809565b80610853575061085382611857565b92915050565b60008054610866906126fd565b80601f0160208091040260200160405190810160405280929190818152602001828054610892906126fd565b80156108df5780601f106108b4576101008083540402835291602001916108df565b820191906000526020600020905b8154815290600101906020018083116108c257829003601f168201915b505050505081565b6000818152600260205260409020546001600160a01b03163381148061093057506001600160a01b038116600090815260056020908152604080832033845290915290205460ff165b6109725760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b60008281526004602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6007546001600160a01b031633146109f85760405162461bcd60e51b815260040161096990612737565b600780546001600160a01b0319166001600160a01b03831690811790915560405133907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a350565b60006001601054610a559190612773565b905090565b6000818152600260205260409020546001600160a01b03848116911614610ab05760405162461bcd60e51b815260206004820152600a60248201526957524f4e475f46524f4d60b01b6044820152606401610969565b6001600160a01b038216610afa5760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b6044820152606401610969565b336001600160a01b0384161480610b3457506001600160a01b038316600090815260056020908152604080832033845290915290205460ff165b80610b5557506000818152600460205260409020546001600160a01b031633145b610b925760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b6044820152606401610969565b6001600160a01b0380841660008181526003602090815260408083208054600019019055938616808352848320805460010190558583526002825284832080546001600160a01b03199081168317909155600490925284832080549092169091559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6007546001600160a01b03163314610c4b5760405162461bcd60e51b815260040161096990612737565b600e55565b600082815260096020526040902060010154610c6b8161188c565b610c758383611899565b505050565b6001600160a01b0381163314610cea5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610969565b610cf4828261191f565b5050565b6007546001600160a01b03163314610d225760405162461bcd60e51b815260040161096990612737565b6001600160a01b038116610d49576040516326120ecd60e11b815260040160405180910390fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b600f8181548110610d7b57600080fd5b6000918252602090912001546001600160a01b0381169150600160a01b90046001600160601b031682565b610db1838383610a5a565b6001600160a01b0382163b1580610e5a5750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610e2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4e9190612786565b6001600160e01b031916145b610c755760405162461bcd60e51b8152600401610969906127a3565b6007546001600160a01b03163314610ea05760405162461bcd60e51b815260040161096990612737565b600654600003610ec3576040516337affdbf60e11b815260040160405180910390fd5b6000600655600c54601054600190610edc9084906127cd565b610ee69190612773565b1115610f055760405163704d6bf960e11b815260040160405180910390fd5b60005b81811015610f2e57610f1c83601054611986565b60108054600190810190915501610f08565b5050600160065550565b6007546001600160a01b03163314610f625760405162461bcd60e51b815260040161096990612737565b6011610c75828483612844565b6000818152600260205260409020546001600160a01b031680610fc15760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b6044820152606401610969565b919050565b60006001600160a01b03821661100d5760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b6044820152606401610969565b506001600160a01b031660009081526003602052604090205490565b6007546001600160a01b031633146110535760405162461bcd60e51b815260040161096990612737565b60016010546110629190612773565b8110156110825760405163378d3bcb60e21b815260040160405180910390fd5b600b5481106110a4576040516333cbe1a360e01b815260040160405180910390fd5b600c55565b8380600d546110b89190612904565b3410156110d85760405163356680b760e01b815260040160405180910390fd5b600a5460019060ff1660028111156110f2576110f2612605565b81600281111561110457611104612605565b14611122576040516365a2ea6560e11b815260040160405180910390fd5b600654600003611145576040516337affdbf60e11b815260040160405180910390fd5b600060065561117061115f6008546001600160a01b031690565b6111693388611a52565b8686611ae8565b61118d57604051638baa579f60e01b815260040160405180910390fd5b3360009081526013602052604090205485906111aa9088906127cd565b11156111c95760405163020805f560e61b815260040160405180910390fd5b6111d286611b48565b5050600160065550505050565b6007546001600160a01b031633146112095760405162461bcd60e51b815260040161096990612737565b47600081900361122c57604051630686827b60e51b815260040160405180910390fd5b600f5460005b81811015611311576000600f828154811061124f5761124f61291b565b6000918252602082200154600f8054600160a01b9092046001600160601b0316935090849081106112825761128261291b565b60009182526020822001546001600160a01b0316915060646112a48488612904565b6112ae9190612947565b9050816001600160a01b03168160405160006040518083038185875af1925050503d80600081146112fb576040519150601f19603f3d011682016040523d82523d6000602084013e611300565b606091505b505050836001019350505050611232565b504791508115610cf457600f60008154811061132f5761132f61291b565b60009182526020822001546040516001600160a01b039091169184919081818185875af1925050503d8060008114611383576040519150601f19603f3d011682016040523d82523d6000602084013e611388565b606091505b5050505050565b60009182526009602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6007546001600160a01b031633146113e45760405162461bcd60e51b815260040161096990612737565b6012610c75828483612844565b60018054610866906126fd565b8080600d5461140d9190612904565b34101561142d5760405163356680b760e01b815260040160405180910390fd5b600a5460029060ff168181111561144657611446612605565b81600281111561145857611458612605565b14611476576040516365a2ea6560e11b815260040160405180910390fd5b600654600003611499576040516337affdbf60e11b815260040160405180910390fd5b60006006819055600e5433825260136020526040909120546114bc9085906127cd565b11156114db5760405163020805f560e61b815260040160405180910390fd5b610f2e83611b48565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61155b858585610a5a565b6001600160a01b0384163b15806115f25750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a02906115a39033908a9089908990899060040161295b565b6020604051808303816000875af11580156115c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e69190612786565b6001600160e01b031916145b6113885760405162461bcd60e51b8152600401610969906127a3565b6007546001600160a01b031633146116385760405162461bcd60e51b815260040161096990612737565b600a805482919060ff1916600183600281111561165757611657612605565b021790555050565b6060600061166c83610f6f565b6001600160a01b0316036116935760405163677510db60e11b815260040160405180910390fd5b600061169d611bd5565b905060008151116116bd57604051806020016040528060008152506116e8565b806116c784611be4565b6040516020016116d89291906129af565b6040516020818303038152906040525b9392505050565b60008281526009602052604090206001015461170a8161188c565b610c75838361191f565b606060128054611723906126fd565b80601f016020809104026020016040519081016040528092919081815260200182805461174f906126fd565b801561179c5780601f106117715761010080835404028352916020019161179c565b820191906000526020600020905b81548152906001019060200180831161177f57829003601f168201915b5050505050905090565b6007546001600160a01b031633146117d05760405162461bcd60e51b815260040161096990612737565b600d55565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8486117ff8161188c565b610c758383611ced565b60006301ffc9a760e01b6001600160e01b03198316148061183a57506380ac58cd60e01b6001600160e01b03198316145b806108535750506001600160e01b031916635b5e139f60e01b1490565b60006001600160e01b03198216637965db0b60e01b148061085357506301ffc9a760e01b6001600160e01b0319831614610853565b6118968133611d35565b50565b6118a3828261138f565b610cf45760008281526009602090815260408083206001600160a01b03851684529091529020805460ff191660011790556118db3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611929828261138f565b15610cf45760008281526009602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6119908282611d8e565b6001600160a01b0382163b1580611a365750604051630a85bd0160e11b80825233600483015260006024830181905260448301849052608060648401526084830152906001600160a01b0384169063150b7a029060a4016020604051808303816000875af1158015611a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a2a9190612786565b6001600160e01b031916145b610cf45760405162461bcd60e51b8152600401610969906127a3565b6040516bffffffffffffffffffffffff19606084901b166020820152603481018290526000906116e890605401604051602081830303815290604052805190602001206040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6000611b2a8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611e9992505050565b6001600160a01b0316856001600160a01b0316149050949350505050565b600c54600182601054611b5b91906127cd565b611b659190612773565b1115611b845760405163704d6bf960e11b815260040160405180910390fd5b60005b81811015611bad57611b9b33601054611986565b60108054600190810190915501611b87565b503360009081526013602052604081208054839290611bcd9084906127cd565b909155505050565b606060118054611723906126fd565b606081600003611c0b5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611c355780611c1f816129de565b9150611c2e9050600a83612947565b9150611c0f565b60008167ffffffffffffffff811115611c5057611c506127e0565b6040519080825280601f01601f191660200182016040528015611c7a576020820181803683370190505b5090505b8415611ce557611c8f600183612773565b9150611c9c600a866129f7565b611ca79060306127cd565b60f81b818381518110611cbc57611cbc61291b565b60200101906001600160f81b031916908160001a905350611cde600a86612947565b9450611c7e565b949350505050565b6000611cf883610f6f565b9050806001600160a01b0316826001600160a01b031614611d2c576040516349e27cff60e01b815260040160405180910390fd5b610c7583611ebd565b611d3f828261138f565b610cf457611d4c81611f8a565b611d57836020611f9c565b604051602001611d68929190612a0b565b60408051601f198184030181529082905262461bcd60e51b8252610969916004016123e2565b6001600160a01b038216611dd85760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b6044820152606401610969565b6000818152600260205260409020546001600160a01b031615611e2e5760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d3525395115160921b6044820152606401610969565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000806000611ea88585612138565b91509150611eb58161217d565b509392505050565b6000818152600260205260409020546001600160a01b031680611f0f5760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b6044820152606401610969565b6001600160a01b038116600081815260036020908152604080832080546000190190558583526002825280832080546001600160a01b031990811690915560049092528083208054909216909155518492907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60606108536001600160a01b03831660145b60606000611fab836002612904565b611fb69060026127cd565b67ffffffffffffffff811115611fce57611fce6127e0565b6040519080825280601f01601f191660200182016040528015611ff8576020820181803683370190505b509050600360fc1b816000815181106120135761201361291b565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106120425761204261291b565b60200101906001600160f81b031916908160001a9053506000612066846002612904565b6120719060016127cd565b90505b60018111156120e9576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106120a5576120a561291b565b1a60f81b8282815181106120bb576120bb61291b565b60200101906001600160f81b031916908160001a90535060049490941c936120e281612a80565b9050612074565b5083156116e85760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610969565b600080825160410361216e5760208301516040840151606085015160001a612162878285856122c7565b94509450505050612176565b506000905060025b9250929050565b600081600481111561219157612191612605565b036121995750565b60018160048111156121ad576121ad612605565b036121fa5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610969565b600281600481111561220e5761220e612605565b0361225b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610969565b600381600481111561226f5761226f612605565b036118965760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610969565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156122fe5750600090506003612382565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612352573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661237b57600060019250925050612382565b9150600090505b94509492505050565b6001600160e01b03198116811461189657600080fd5b6000602082840312156123b357600080fd5b81356116e88161238b565b60005b838110156123d95781810151838201526020016123c1565b50506000910152565b60208152600082518060208401526124018160408501602087016123be565b601f01601f19169190910160400192915050565b60006020828403121561242757600080fd5b5035919050565b80356001600160a01b0381168114610fc157600080fd5b6000806040838503121561245857600080fd5b6124618361242e565b946020939093013593505050565b60006020828403121561248157600080fd5b6116e88261242e565b60008060006060848603121561249f57600080fd5b6124a88461242e565b92506124b66020850161242e565b9150604084013590509250925092565b600080604083850312156124d957600080fd5b823591506124e96020840161242e565b90509250929050565b60008083601f84011261250457600080fd5b50813567ffffffffffffffff81111561251c57600080fd5b60208301915083602082850101111561217657600080fd5b6000806020838503121561254757600080fd5b823567ffffffffffffffff81111561255e57600080fd5b61256a858286016124f2565b90969095509350505050565b6000806000806060858703121561258c57600080fd5b8435935060208501359250604085013567ffffffffffffffff8111156125b157600080fd5b6125bd878288016124f2565b95989497509550505050565b600080604083850312156125dc57600080fd5b6125e58361242e565b9150602083013580151581146125fa57600080fd5b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016003831061263d57634e487b7160e01b600052602160045260246000fd5b91905290565b60008060008060006080868803121561265b57600080fd5b6126648661242e565b94506126726020870161242e565b935060408601359250606086013567ffffffffffffffff81111561269557600080fd5b6126a1888289016124f2565b969995985093965092949392505050565b6000602082840312156126c457600080fd5b8135600381106116e857600080fd5b600080604083850312156126e657600080fd5b6126ef8361242e565b91506124e96020840161242e565b600181811c9082168061271157607f821691505b60208210810361273157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156108535761085361275d565b60006020828403121561279857600080fd5b81516116e88161238b565b60208082526010908201526f155394d0519157d49150d2541251539560821b604082015260600190565b808201808211156108535761085361275d565b634e487b7160e01b600052604160045260246000fd5b601f821115610c7557600081815260208120601f850160051c8101602086101561281d5750805b601f850160051c820191505b8181101561283c57828155600101612829565b505050505050565b67ffffffffffffffff83111561285c5761285c6127e0565b6128708361286a83546126fd565b836127f6565b6000601f8411600181146128a4576000851561288c5750838201355b600019600387901b1c1916600186901b178355611388565b600083815260209020601f19861690835b828110156128d557868501358255602094850194600190920191016128b5565b50868210156128f25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b80820281158282048414176108535761085361275d565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60008261295657612956612931565b500490565b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b600083516129c18184602088016123be565b8351908301906129d58183602088016123be565b01949350505050565b6000600182016129f0576129f061275d565b5060010190565b600082612a0657612a06612931565b500690565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612a438160178501602088016123be565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612a748160288401602088016123be565b01602801949350505050565b600081612a8f57612a8f61275d565b50600019019056fea26469706673582212201334a0adb15654fa12cc85a1ecb03148ca794b9e53c5fd34972f8113751b8a5364736f6c6343000811003300000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000004368747470733a2f2f6d657461646174612e6c65646765722e636f6d2f6c65646765722d6d61726b65742d6465616466656c6c617a2d6e616e6f2d782f746f6b656e732f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d68747470733a2f2f6d657461646174612e6c65646765722e636f6d2f6c65646765722d6d61726b65742d6465616466656c6c617a2d6e616e6f2d782f636f6e74726163742d6d657461646174610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000275b204c6564676572205d204d61726b657420e28093204465616466656c6c617a204e616e6f205800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000544465a4e58000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000018217c3cd0808210b231616ebd5a97390b0d8d750000000000000000000000000000000000000000000000000000000000000064

Deployed Bytecode

0x6080604052600436106102675760003560e01c806370a0823111610144578063a22cb465116100b6578063d547741f1161007a578063d547741f14610773578063d5abeb0114610793578063e8a3d485146107a9578063e985e9c5146107be578063f4a0a528146107f9578063fcd3533c1461081957600080fd5b8063a22cb465146106d3578063b1c9fe6e146106f3578063b88d4fde14610713578063c03afb5914610733578063c87b56dd1461075357600080fd5b80638da5cb5b116101085780638da5cb5b1461063657806391d1485414610656578063938e3d7b1461067657806395d89b4114610696578063a0712d68146106ab578063a217fddf146106be57600080fd5b806370a08231146105b857806373532802146105d85780637f1c7189146105f8578063827481ea1461060e578063853828b61461062157600080fd5b80632b5f5a4c116101dd57806342842e0e116101a157806342842e0e1461050c578063433535611461052c578063484b973c1461054257806355f804b3146105625780636352211e146105825780636817c76c146105a257600080fd5b80632b5f5a4c146104455780632f2ff15d1461046557806336568abe146104855780633660a084146104a55780633caaa09f146104c557600080fd5b806318160ddd1161022f57806318160ddd146103535780631e7269c514610376578063238ac933146103a357806323b872dd146103c1578063248a9ca3146103e1578063282c51f31461041157600080fd5b806301ffc9a71461026c57806306fdde03146102a1578063081812fc146102c3578063095ea7b31461031157806313af403514610333575b600080fd5b34801561027857600080fd5b5061028c6102873660046123a1565b610839565b60405190151581526020015b60405180910390f35b3480156102ad57600080fd5b506102b6610859565b60405161029891906123e2565b3480156102cf57600080fd5b506102f96102de366004612415565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610298565b34801561031d57600080fd5b5061033161032c366004612445565b6108e7565b005b34801561033f57600080fd5b5061033161034e36600461246f565b6109ce565b34801561035f57600080fd5b50610368610a44565b604051908152602001610298565b34801561038257600080fd5b5061036861039136600461246f565b60136020526000908152604090205481565b3480156103af57600080fd5b506008546001600160a01b03166102f9565b3480156103cd57600080fd5b506103316103dc36600461248a565b610a5a565b3480156103ed57600080fd5b506103686103fc366004612415565b60009081526009602052604090206001015490565b34801561041d57600080fd5b506103687f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b34801561045157600080fd5b50610331610460366004612415565b610c21565b34801561047157600080fd5b506103316104803660046124c6565b610c50565b34801561049157600080fd5b506103316104a03660046124c6565b610c7a565b3480156104b157600080fd5b506103316104c036600461246f565b610cf8565b3480156104d157600080fd5b506104e56104e0366004612415565b610d6b565b604080516001600160a01b0390931683526001600160601b03909116602083015201610298565b34801561051857600080fd5b5061033161052736600461248a565b610da6565b34801561053857600080fd5b50610368600e5481565b34801561054e57600080fd5b5061033161055d366004612445565b610e76565b34801561056e57600080fd5b5061033161057d366004612534565b610f38565b34801561058e57600080fd5b506102f961059d366004612415565b610f6f565b3480156105ae57600080fd5b50610368600d5481565b3480156105c457600080fd5b506103686105d336600461246f565b610fc6565b3480156105e457600080fd5b506103316105f3366004612415565b611029565b34801561060457600080fd5b50610368600b5481565b61033161061c366004612576565b6110a9565b34801561062d57600080fd5b506103316111df565b34801561064257600080fd5b506007546102f9906001600160a01b031681565b34801561066257600080fd5b5061028c6106713660046124c6565b61138f565b34801561068257600080fd5b50610331610691366004612534565b6113ba565b3480156106a257600080fd5b506102b66113f1565b6103316106b9366004612415565b6113fe565b3480156106ca57600080fd5b50610368600081565b3480156106df57600080fd5b506103316106ee3660046125c9565b6114e4565b3480156106ff57600080fd5b50600a5460ff16604051610298919061261b565b34801561071f57600080fd5b5061033161072e366004612643565b611550565b34801561073f57600080fd5b5061033161074e3660046126b2565b61160e565b34801561075f57600080fd5b506102b661076e366004612415565b61165f565b34801561077f57600080fd5b5061033161078e3660046124c6565b6116ef565b34801561079f57600080fd5b50610368600c5481565b3480156107b557600080fd5b506102b6611714565b3480156107ca57600080fd5b5061028c6107d93660046126d3565b600560209081526000928352604080842090915290825290205460ff1681565b34801561080557600080fd5b50610331610814366004612415565b6117a6565b34801561082557600080fd5b506103316108343660046124c6565b6117d5565b600061084482611809565b80610853575061085382611857565b92915050565b60008054610866906126fd565b80601f0160208091040260200160405190810160405280929190818152602001828054610892906126fd565b80156108df5780601f106108b4576101008083540402835291602001916108df565b820191906000526020600020905b8154815290600101906020018083116108c257829003601f168201915b505050505081565b6000818152600260205260409020546001600160a01b03163381148061093057506001600160a01b038116600090815260056020908152604080832033845290915290205460ff165b6109725760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b60008281526004602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6007546001600160a01b031633146109f85760405162461bcd60e51b815260040161096990612737565b600780546001600160a01b0319166001600160a01b03831690811790915560405133907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a350565b60006001601054610a559190612773565b905090565b6000818152600260205260409020546001600160a01b03848116911614610ab05760405162461bcd60e51b815260206004820152600a60248201526957524f4e475f46524f4d60b01b6044820152606401610969565b6001600160a01b038216610afa5760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b6044820152606401610969565b336001600160a01b0384161480610b3457506001600160a01b038316600090815260056020908152604080832033845290915290205460ff165b80610b5557506000818152600460205260409020546001600160a01b031633145b610b925760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b6044820152606401610969565b6001600160a01b0380841660008181526003602090815260408083208054600019019055938616808352848320805460010190558583526002825284832080546001600160a01b03199081168317909155600490925284832080549092169091559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6007546001600160a01b03163314610c4b5760405162461bcd60e51b815260040161096990612737565b600e55565b600082815260096020526040902060010154610c6b8161188c565b610c758383611899565b505050565b6001600160a01b0381163314610cea5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610969565b610cf4828261191f565b5050565b6007546001600160a01b03163314610d225760405162461bcd60e51b815260040161096990612737565b6001600160a01b038116610d49576040516326120ecd60e11b815260040160405180910390fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b600f8181548110610d7b57600080fd5b6000918252602090912001546001600160a01b0381169150600160a01b90046001600160601b031682565b610db1838383610a5a565b6001600160a01b0382163b1580610e5a5750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610e2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4e9190612786565b6001600160e01b031916145b610c755760405162461bcd60e51b8152600401610969906127a3565b6007546001600160a01b03163314610ea05760405162461bcd60e51b815260040161096990612737565b600654600003610ec3576040516337affdbf60e11b815260040160405180910390fd5b6000600655600c54601054600190610edc9084906127cd565b610ee69190612773565b1115610f055760405163704d6bf960e11b815260040160405180910390fd5b60005b81811015610f2e57610f1c83601054611986565b60108054600190810190915501610f08565b5050600160065550565b6007546001600160a01b03163314610f625760405162461bcd60e51b815260040161096990612737565b6011610c75828483612844565b6000818152600260205260409020546001600160a01b031680610fc15760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b6044820152606401610969565b919050565b60006001600160a01b03821661100d5760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b6044820152606401610969565b506001600160a01b031660009081526003602052604090205490565b6007546001600160a01b031633146110535760405162461bcd60e51b815260040161096990612737565b60016010546110629190612773565b8110156110825760405163378d3bcb60e21b815260040160405180910390fd5b600b5481106110a4576040516333cbe1a360e01b815260040160405180910390fd5b600c55565b8380600d546110b89190612904565b3410156110d85760405163356680b760e01b815260040160405180910390fd5b600a5460019060ff1660028111156110f2576110f2612605565b81600281111561110457611104612605565b14611122576040516365a2ea6560e11b815260040160405180910390fd5b600654600003611145576040516337affdbf60e11b815260040160405180910390fd5b600060065561117061115f6008546001600160a01b031690565b6111693388611a52565b8686611ae8565b61118d57604051638baa579f60e01b815260040160405180910390fd5b3360009081526013602052604090205485906111aa9088906127cd565b11156111c95760405163020805f560e61b815260040160405180910390fd5b6111d286611b48565b5050600160065550505050565b6007546001600160a01b031633146112095760405162461bcd60e51b815260040161096990612737565b47600081900361122c57604051630686827b60e51b815260040160405180910390fd5b600f5460005b81811015611311576000600f828154811061124f5761124f61291b565b6000918252602082200154600f8054600160a01b9092046001600160601b0316935090849081106112825761128261291b565b60009182526020822001546001600160a01b0316915060646112a48488612904565b6112ae9190612947565b9050816001600160a01b03168160405160006040518083038185875af1925050503d80600081146112fb576040519150601f19603f3d011682016040523d82523d6000602084013e611300565b606091505b505050836001019350505050611232565b504791508115610cf457600f60008154811061132f5761132f61291b565b60009182526020822001546040516001600160a01b039091169184919081818185875af1925050503d8060008114611383576040519150601f19603f3d011682016040523d82523d6000602084013e611388565b606091505b5050505050565b60009182526009602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6007546001600160a01b031633146113e45760405162461bcd60e51b815260040161096990612737565b6012610c75828483612844565b60018054610866906126fd565b8080600d5461140d9190612904565b34101561142d5760405163356680b760e01b815260040160405180910390fd5b600a5460029060ff168181111561144657611446612605565b81600281111561145857611458612605565b14611476576040516365a2ea6560e11b815260040160405180910390fd5b600654600003611499576040516337affdbf60e11b815260040160405180910390fd5b60006006819055600e5433825260136020526040909120546114bc9085906127cd565b11156114db5760405163020805f560e61b815260040160405180910390fd5b610f2e83611b48565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61155b858585610a5a565b6001600160a01b0384163b15806115f25750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a02906115a39033908a9089908990899060040161295b565b6020604051808303816000875af11580156115c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e69190612786565b6001600160e01b031916145b6113885760405162461bcd60e51b8152600401610969906127a3565b6007546001600160a01b031633146116385760405162461bcd60e51b815260040161096990612737565b600a805482919060ff1916600183600281111561165757611657612605565b021790555050565b6060600061166c83610f6f565b6001600160a01b0316036116935760405163677510db60e11b815260040160405180910390fd5b600061169d611bd5565b905060008151116116bd57604051806020016040528060008152506116e8565b806116c784611be4565b6040516020016116d89291906129af565b6040516020818303038152906040525b9392505050565b60008281526009602052604090206001015461170a8161188c565b610c75838361191f565b606060128054611723906126fd565b80601f016020809104026020016040519081016040528092919081815260200182805461174f906126fd565b801561179c5780601f106117715761010080835404028352916020019161179c565b820191906000526020600020905b81548152906001019060200180831161177f57829003601f168201915b5050505050905090565b6007546001600160a01b031633146117d05760405162461bcd60e51b815260040161096990612737565b600d55565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a8486117ff8161188c565b610c758383611ced565b60006301ffc9a760e01b6001600160e01b03198316148061183a57506380ac58cd60e01b6001600160e01b03198316145b806108535750506001600160e01b031916635b5e139f60e01b1490565b60006001600160e01b03198216637965db0b60e01b148061085357506301ffc9a760e01b6001600160e01b0319831614610853565b6118968133611d35565b50565b6118a3828261138f565b610cf45760008281526009602090815260408083206001600160a01b03851684529091529020805460ff191660011790556118db3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611929828261138f565b15610cf45760008281526009602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6119908282611d8e565b6001600160a01b0382163b1580611a365750604051630a85bd0160e11b80825233600483015260006024830181905260448301849052608060648401526084830152906001600160a01b0384169063150b7a029060a4016020604051808303816000875af1158015611a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a2a9190612786565b6001600160e01b031916145b610cf45760405162461bcd60e51b8152600401610969906127a3565b6040516bffffffffffffffffffffffff19606084901b166020820152603481018290526000906116e890605401604051602081830303815290604052805190602001206040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6000611b2a8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611e9992505050565b6001600160a01b0316856001600160a01b0316149050949350505050565b600c54600182601054611b5b91906127cd565b611b659190612773565b1115611b845760405163704d6bf960e11b815260040160405180910390fd5b60005b81811015611bad57611b9b33601054611986565b60108054600190810190915501611b87565b503360009081526013602052604081208054839290611bcd9084906127cd565b909155505050565b606060118054611723906126fd565b606081600003611c0b5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611c355780611c1f816129de565b9150611c2e9050600a83612947565b9150611c0f565b60008167ffffffffffffffff811115611c5057611c506127e0565b6040519080825280601f01601f191660200182016040528015611c7a576020820181803683370190505b5090505b8415611ce557611c8f600183612773565b9150611c9c600a866129f7565b611ca79060306127cd565b60f81b818381518110611cbc57611cbc61291b565b60200101906001600160f81b031916908160001a905350611cde600a86612947565b9450611c7e565b949350505050565b6000611cf883610f6f565b9050806001600160a01b0316826001600160a01b031614611d2c576040516349e27cff60e01b815260040160405180910390fd5b610c7583611ebd565b611d3f828261138f565b610cf457611d4c81611f8a565b611d57836020611f9c565b604051602001611d68929190612a0b565b60408051601f198184030181529082905262461bcd60e51b8252610969916004016123e2565b6001600160a01b038216611dd85760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b6044820152606401610969565b6000818152600260205260409020546001600160a01b031615611e2e5760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d3525395115160921b6044820152606401610969565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000806000611ea88585612138565b91509150611eb58161217d565b509392505050565b6000818152600260205260409020546001600160a01b031680611f0f5760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b6044820152606401610969565b6001600160a01b038116600081815260036020908152604080832080546000190190558583526002825280832080546001600160a01b031990811690915560049092528083208054909216909155518492907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60606108536001600160a01b03831660145b60606000611fab836002612904565b611fb69060026127cd565b67ffffffffffffffff811115611fce57611fce6127e0565b6040519080825280601f01601f191660200182016040528015611ff8576020820181803683370190505b509050600360fc1b816000815181106120135761201361291b565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106120425761204261291b565b60200101906001600160f81b031916908160001a9053506000612066846002612904565b6120719060016127cd565b90505b60018111156120e9576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106120a5576120a561291b565b1a60f81b8282815181106120bb576120bb61291b565b60200101906001600160f81b031916908160001a90535060049490941c936120e281612a80565b9050612074565b5083156116e85760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610969565b600080825160410361216e5760208301516040840151606085015160001a612162878285856122c7565b94509450505050612176565b506000905060025b9250929050565b600081600481111561219157612191612605565b036121995750565b60018160048111156121ad576121ad612605565b036121fa5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610969565b600281600481111561220e5761220e612605565b0361225b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610969565b600381600481111561226f5761226f612605565b036118965760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610969565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156122fe5750600090506003612382565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612352573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661237b57600060019250925050612382565b9150600090505b94509492505050565b6001600160e01b03198116811461189657600080fd5b6000602082840312156123b357600080fd5b81356116e88161238b565b60005b838110156123d95781810151838201526020016123c1565b50506000910152565b60208152600082518060208401526124018160408501602087016123be565b601f01601f19169190910160400192915050565b60006020828403121561242757600080fd5b5035919050565b80356001600160a01b0381168114610fc157600080fd5b6000806040838503121561245857600080fd5b6124618361242e565b946020939093013593505050565b60006020828403121561248157600080fd5b6116e88261242e565b60008060006060848603121561249f57600080fd5b6124a88461242e565b92506124b66020850161242e565b9150604084013590509250925092565b600080604083850312156124d957600080fd5b823591506124e96020840161242e565b90509250929050565b60008083601f84011261250457600080fd5b50813567ffffffffffffffff81111561251c57600080fd5b60208301915083602082850101111561217657600080fd5b6000806020838503121561254757600080fd5b823567ffffffffffffffff81111561255e57600080fd5b61256a858286016124f2565b90969095509350505050565b6000806000806060858703121561258c57600080fd5b8435935060208501359250604085013567ffffffffffffffff8111156125b157600080fd5b6125bd878288016124f2565b95989497509550505050565b600080604083850312156125dc57600080fd5b6125e58361242e565b9150602083013580151581146125fa57600080fd5b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016003831061263d57634e487b7160e01b600052602160045260246000fd5b91905290565b60008060008060006080868803121561265b57600080fd5b6126648661242e565b94506126726020870161242e565b935060408601359250606086013567ffffffffffffffff81111561269557600080fd5b6126a1888289016124f2565b969995985093965092949392505050565b6000602082840312156126c457600080fd5b8135600381106116e857600080fd5b600080604083850312156126e657600080fd5b6126ef8361242e565b91506124e96020840161242e565b600181811c9082168061271157607f821691505b60208210810361273157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156108535761085361275d565b60006020828403121561279857600080fd5b81516116e88161238b565b60208082526010908201526f155394d0519157d49150d2541251539560821b604082015260600190565b808201808211156108535761085361275d565b634e487b7160e01b600052604160045260246000fd5b601f821115610c7557600081815260208120601f850160051c8101602086101561281d5750805b601f850160051c820191505b8181101561283c57828155600101612829565b505050505050565b67ffffffffffffffff83111561285c5761285c6127e0565b6128708361286a83546126fd565b836127f6565b6000601f8411600181146128a4576000851561288c5750838201355b600019600387901b1c1916600186901b178355611388565b600083815260209020601f19861690835b828110156128d557868501358255602094850194600190920191016128b5565b50868210156128f25760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b80820281158282048414176108535761085361275d565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60008261295657612956612931565b500490565b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b600083516129c18184602088016123be565b8351908301906129d58183602088016123be565b01949350505050565b6000600182016129f0576129f061275d565b5060010190565b600082612a0657612a06612931565b500690565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612a438160178501602088016123be565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612a748160288401602088016123be565b01602801949350505050565b600081612a8f57612a8f61275d565b50600019019056fea26469706673582212201334a0adb15654fa12cc85a1ecb03148ca794b9e53c5fd34972f8113751b8a5364736f6c63430008110033

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

00000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000004368747470733a2f2f6d657461646174612e6c65646765722e636f6d2f6c65646765722d6d61726b65742d6465616466656c6c617a2d6e616e6f2d782f746f6b656e732f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d68747470733a2f2f6d657461646174612e6c65646765722e636f6d2f6c65646765722d6d61726b65742d6465616466656c6c617a2d6e616e6f2d782f636f6e74726163742d6d657461646174610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000275b204c6564676572205d204d61726b657420e28093204465616466656c6c617a204e616e6f205800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000544465a4e58000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000018217c3cd0808210b231616ebd5a97390b0d8d750000000000000000000000000000000000000000000000000000000000000064

-----Decoded View---------------
Arg [0] : _maxSupply (uint256): 100000
Arg [1] : _baseTokenURI (string): https://metadata.ledger.com/ledger-market-deadfellaz-nano-x/tokens/
Arg [2] : _baseContractURI (string): https://metadata.ledger.com/ledger-market-deadfellaz-nano-x/contract-metadata
Arg [3] : _name (string): [ Ledger ] Market – Deadfellaz Nano X
Arg [4] : _symbol (string): DFZNX
Arg [5] : _withdrawalAddresses (tuple[]): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
22 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000186a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [3] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000220
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000260
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000043
Arg [7] : 68747470733a2f2f6d657461646174612e6c65646765722e636f6d2f6c656467
Arg [8] : 65722d6d61726b65742d6465616466656c6c617a2d6e616e6f2d782f746f6b65
Arg [9] : 6e732f0000000000000000000000000000000000000000000000000000000000
Arg [10] : 000000000000000000000000000000000000000000000000000000000000004d
Arg [11] : 68747470733a2f2f6d657461646174612e6c65646765722e636f6d2f6c656467
Arg [12] : 65722d6d61726b65742d6465616466656c6c617a2d6e616e6f2d782f636f6e74
Arg [13] : 726163742d6d6574616461746100000000000000000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000027
Arg [15] : 5b204c6564676572205d204d61726b657420e28093204465616466656c6c617a
Arg [16] : 204e616e6f205800000000000000000000000000000000000000000000000000
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [18] : 44465a4e58000000000000000000000000000000000000000000000000000000
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [20] : 00000000000000000000000018217c3cd0808210b231616ebd5a97390b0d8d75
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000064


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

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