ETH Price: $2,508.05 (-5.79%)

Token

Gumball Machine (GUM)
 

Overview

Max Total Supply

10,000 GUM

Holders

208

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
jaredfromsubway: MEV Bot
0x6b75d8af000000e20b7a7ddf000ba900b4009a80
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Gumball Machine is an experimental 'game of chance' project combining ERC20, ERC1155, and ERC721 into a single new asset. Each Gumball can be used as a 'lootbox' on chain, and can be opened for various rewards.

# Exchange Pair Price  24H Volume % Volume

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x04a03d0D...f8A8CE4f8
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
ERC_X

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 200 runs

Other Settings:
istanbul EvmVersion, MIT license
File 1 of 1 : TokenA.sol
/**
 *Submitted for verification at Etherscan.io on 2024-02-11
*/

//Inspired by all the great work out there from ERC20, 404, 721, 721a, 721Psi, 1155, 1155Delta

// SPDX-License-Identifier: MIT

pragma solidity 0.8.24;

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

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

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

interface IERC20 {
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address to, uint256 value) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 value) external returns (bool);
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

interface IERC20Metadata is IERC20 {
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
}

interface IERC20Errors {
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
    error ERC20InvalidSender(address sender);
    error ERC20InvalidReceiver(address receiver);
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
    error ERC20InvalidApprover(address approver);
    error ERC20InvalidSpender(address spender);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

interface IERCX {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

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

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

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

    /**
     * Cannot burn from the zero address.
     */
    error BurnFromZeroAddress();

    /**
     * Cannot burn from the address that doesn't owne the token.
     */
    error BurnFromNonOnwerAddress();

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

    /**
     * The token must be owned by `from` or the `amount` is not 1.
     */
    error TransferFromIncorrectOwnerOrInvalidAmount();

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

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

    /**
     * The length of input arraies is not matching.
     */
    error InputLengthMistmatch();

    function isOwnerOf(address account, uint256 id) external view returns(bool);
}

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

/**
 * @dev Interface that must be implemented by smart contracts in order to receive
 * ERC-1155 token transfers.
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

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


abstract contract ERC721Receiver {
    function onERC721Received(
        address,
        address,
        uint256,
        bytes calldata
    ) external virtual returns (bytes4) {
        return ERC721Receiver.onERC721Received.selector;
    }
}

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

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

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

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

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

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

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

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

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

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

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

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


/// @notice Library for bit twiddling and boolean operations.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibBit.sol)
/// @author Inspired by (https://graphics.stanford.edu/~seander/bithacks.html)
library LibBit {
    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                  BIT TWIDDLING OPERATIONS                  */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Find last set.
    /// Returns the index of the most significant bit of `x`,
    /// counting from the least significant bit position.
    /// If `x` is zero, returns 256.
    function fls(uint256 x) internal pure returns (uint256 r) {
        /// @solidity memory-safe-assembly
        assembly {
            r := or(shl(8, iszero(x)), shl(7, lt(0xffffffffffffffffffffffffffffffff, x)))
            r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))
            r := or(r, shl(5, lt(0xffffffff, shr(r, x))))
            r := or(r, shl(4, lt(0xffff, shr(r, x))))
            r := or(r, shl(3, lt(0xff, shr(r, x))))
            // forgefmt: disable-next-item
            r := or(r, byte(and(0x1f, shr(shr(r, x), 0x8421084210842108cc6318c6db6d54be)),
                0x0706060506020504060203020504030106050205030304010505030400000000))
        }
    }

    /// @dev Count leading zeros.
    /// Returns the number of zeros preceding the most significant one bit.
    /// If `x` is zero, returns 256.
    function clz(uint256 x) internal pure returns (uint256 r) {
        /// @solidity memory-safe-assembly
        assembly {
            r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))
            r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))
            r := or(r, shl(5, lt(0xffffffff, shr(r, x))))
            r := or(r, shl(4, lt(0xffff, shr(r, x))))
            r := or(r, shl(3, lt(0xff, shr(r, x))))
            // forgefmt: disable-next-item
            r := add(xor(r, byte(and(0x1f, shr(shr(r, x), 0x8421084210842108cc6318c6db6d54be)),
                0xf8f9f9faf9fdfafbf9fdfcfdfafbfcfef9fafdfafcfcfbfefafafcfbffffffff)), iszero(x))
        }
    }

    /// @dev Find first set.
    /// Returns the index of the least significant bit of `x`,
    /// counting from the least significant bit position.
    /// If `x` is zero, returns 256.
    /// Equivalent to `ctz` (count trailing zeros), which gives
    /// the number of zeros following the least significant one bit.
    function ffs(uint256 x) internal pure returns (uint256 r) {
        /// @solidity memory-safe-assembly
        assembly {
            // Isolate the least significant bit.
            let b := and(x, add(not(x), 1))

            r := or(shl(8, iszero(x)), shl(7, lt(0xffffffffffffffffffffffffffffffff, b)))
            r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, b))))
            r := or(r, shl(5, lt(0xffffffff, shr(r, b))))

            // For the remaining 32 bits, use a De Bruijn lookup.
            // forgefmt: disable-next-item
            r := or(r, byte(and(div(0xd76453e0, shr(r, b)), 0x1f),
                0x001f0d1e100c1d070f090b19131c1706010e11080a1a141802121b1503160405))
        }
    }

    /// @dev Returns the number of set bits in `x`.
    function popCount(uint256 x) internal pure returns (uint256 c) {
        /// @solidity memory-safe-assembly
        assembly {
            let max := not(0)
            let isMax := eq(x, max)
            x := sub(x, and(shr(1, x), div(max, 3)))
            x := add(and(x, div(max, 5)), and(shr(2, x), div(max, 5)))
            x := and(add(x, shr(4, x)), div(max, 17))
            c := or(shl(8, isMax), shr(248, mul(x, div(max, 255))))
        }
    }

    /// @dev Returns whether `x` is a power of 2.
    function isPo2(uint256 x) internal pure returns (bool result) {
        /// @solidity memory-safe-assembly
        assembly {
            // Equivalent to `x && !(x & (x - 1))`.
            result := iszero(add(and(x, sub(x, 1)), iszero(x)))
        }
    }

    /// @dev Returns `x` reversed at the bit level.
    function reverseBits(uint256 x) internal pure returns (uint256 r) {
        uint256 m0 = 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f;
        uint256 m1 = m0 ^ (m0 << 2);
        uint256 m2 = m1 ^ (m1 << 1);
        r = reverseBytes(x);
        r = (m2 & (r >> 1)) | ((m2 & r) << 1);
        r = (m1 & (r >> 2)) | ((m1 & r) << 2);
        r = (m0 & (r >> 4)) | ((m0 & r) << 4);
    }

    /// @dev Returns `x` reversed at the byte level.
    function reverseBytes(uint256 x) internal pure returns (uint256 r) {
        unchecked {
            // Computing masks on-the-fly reduces bytecode size by about 200 bytes.
            uint256 m0 = 0x100000000000000000000000000000001 * (~toUint(x == 0) >> 192);
            uint256 m1 = m0 ^ (m0 << 32);
            uint256 m2 = m1 ^ (m1 << 16);
            uint256 m3 = m2 ^ (m2 << 8);
            r = (m3 & (x >> 8)) | ((m3 & x) << 8);
            r = (m2 & (r >> 16)) | ((m2 & r) << 16);
            r = (m1 & (r >> 32)) | ((m1 & r) << 32);
            r = (m0 & (r >> 64)) | ((m0 & r) << 64);
            r = (r >> 128) | (r << 128);
        }
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                     BOOLEAN OPERATIONS                     */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    // A Solidity bool on the stack or memory is represented as a 256-bit word.
    // Non-zero values are true, zero is false.
    // A clean bool is either 0 (false) or 1 (true) under the hood.
    // Usually, if not always, the bool result of a regular Solidity expression,
    // or the argument of a public/external function will be a clean bool.
    // You can usually use the raw variants for more performance.
    // If uncertain, test (best with exact compiler settings).
    // Or use the non-raw variants (compiler can sometimes optimize out the double `iszero`s).

    /// @dev Returns `x & y`. Inputs must be clean.
    function rawAnd(bool x, bool y) internal pure returns (bool z) {
        /// @solidity memory-safe-assembly
        assembly {
            z := and(x, y)
        }
    }

    /// @dev Returns `x & y`.
    function and(bool x, bool y) internal pure returns (bool z) {
        /// @solidity memory-safe-assembly
        assembly {
            z := and(iszero(iszero(x)), iszero(iszero(y)))
        }
    }

    /// @dev Returns `x | y`. Inputs must be clean.
    function rawOr(bool x, bool y) internal pure returns (bool z) {
        /// @solidity memory-safe-assembly
        assembly {
            z := or(x, y)
        }
    }

    /// @dev Returns `x | y`.
    function or(bool x, bool y) internal pure returns (bool z) {
        /// @solidity memory-safe-assembly
        assembly {
            z := or(iszero(iszero(x)), iszero(iszero(y)))
        }
    }

    /// @dev Returns 1 if `b` is true, else 0. Input must be clean.
    function rawToUint(bool b) internal pure returns (uint256 z) {
        /// @solidity memory-safe-assembly
        assembly {
            z := b
        }
    }

    /// @dev Returns 1 if `b` is true, else 0.
    function toUint(bool b) internal pure returns (uint256 z) {
        /// @solidity memory-safe-assembly
        assembly {
            z := iszero(iszero(b))
        }
    }
}

/// @notice Library for storage of packed unsigned booleans.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibBitmap.sol)
/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/LibBitmap.sol)
/// @author Modified from Solidity-Bits (https://github.com/estarriolvetch/solidity-bits/blob/main/contracts/BitMaps.sol)
library LibBitmap {
    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                         CONSTANTS                          */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev The constant returned when a bitmap scan does not find a result.
    uint256 internal constant NOT_FOUND = type(uint256).max;

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                          STRUCTS                           */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev A bitmap in storage.
    struct Bitmap {
        mapping(uint256 => uint256) map;
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                         OPERATIONS                         */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Returns the boolean value of the bit at `index` in `bitmap`.
    function get(Bitmap storage bitmap, uint256 index) internal view returns (bool isSet) {
        // It is better to set `isSet` to either 0 or 1, than zero vs non-zero.
        // Both cost the same amount of gas, but the former allows the returned value
        // to be reused without cleaning the upper bits.
        uint256 b = (bitmap.map[index >> 8] >> (index & 0xff)) & 1;
        /// @solidity memory-safe-assembly
        assembly {
            isSet := b
        }
    }

    /// @dev Updates the bit at `index` in `bitmap` to true.
    function set(Bitmap storage bitmap, uint256 index) internal {
        bitmap.map[index >> 8] |= (1 << (index & 0xff));
    }

    /// @dev Updates the bit at `index` in `bitmap` to false.
    function unset(Bitmap storage bitmap, uint256 index) internal {
        bitmap.map[index >> 8] &= ~(1 << (index & 0xff));
    }

    /// @dev Flips the bit at `index` in `bitmap`.
    /// Returns the boolean result of the flipped bit.
    function toggle(Bitmap storage bitmap, uint256 index) internal returns (bool newIsSet) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x20, bitmap.slot)
            mstore(0x00, shr(8, index))
            let storageSlot := keccak256(0x00, 0x40)
            let shift := and(index, 0xff)
            let storageValue := xor(sload(storageSlot), shl(shift, 1))
            // It makes sense to return the `newIsSet`,
            // as it allow us to skip an additional warm `sload`,
            // and it costs minimal gas (about 15),
            // which may be optimized away if the returned value is unused.
            newIsSet := and(1, shr(shift, storageValue))
            sstore(storageSlot, storageValue)
        }
    }

    /// @dev Updates the bit at `index` in `bitmap` to `shouldSet`.
    function setTo(Bitmap storage bitmap, uint256 index, bool shouldSet) internal {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x20, bitmap.slot)
            mstore(0x00, shr(8, index))
            let storageSlot := keccak256(0x00, 0x40)
            let storageValue := sload(storageSlot)
            let shift := and(index, 0xff)
            sstore(
                storageSlot,
                // Unsets the bit at `shift` via `and`, then sets its new value via `or`.
                or(and(storageValue, not(shl(shift, 1))), shl(shift, iszero(iszero(shouldSet))))
            )
        }
    }

    /// @dev Consecutively sets `amount` of bits starting from the bit at `start`.
    function setBatch(Bitmap storage bitmap, uint256 start, uint256 amount) internal {
        /// @solidity memory-safe-assembly
        assembly {
            let max := not(0)
            let shift := and(start, 0xff)
            mstore(0x20, bitmap.slot)
            mstore(0x00, shr(8, start))
            if iszero(lt(add(shift, amount), 257)) {
                let storageSlot := keccak256(0x00, 0x40)
                sstore(storageSlot, or(sload(storageSlot), shl(shift, max)))
                let bucket := add(mload(0x00), 1)
                let bucketEnd := add(mload(0x00), shr(8, add(amount, shift)))
                amount := and(add(amount, shift), 0xff)
                shift := 0
                for {} iszero(eq(bucket, bucketEnd)) { bucket := add(bucket, 1) } {
                    mstore(0x00, bucket)
                    sstore(keccak256(0x00, 0x40), max)
                }
                mstore(0x00, bucket)
            }
            let storageSlot := keccak256(0x00, 0x40)
            sstore(storageSlot, or(sload(storageSlot), shl(shift, shr(sub(256, amount), max))))
        }
    }

    /// @dev Consecutively unsets `amount` of bits starting from the bit at `start`.
    function unsetBatch(Bitmap storage bitmap, uint256 start, uint256 amount) internal {
        /// @solidity memory-safe-assembly
        assembly {
            let shift := and(start, 0xff)
            mstore(0x20, bitmap.slot)
            mstore(0x00, shr(8, start))
            if iszero(lt(add(shift, amount), 257)) {
                let storageSlot := keccak256(0x00, 0x40)
                sstore(storageSlot, and(sload(storageSlot), not(shl(shift, not(0)))))
                let bucket := add(mload(0x00), 1)
                let bucketEnd := add(mload(0x00), shr(8, add(amount, shift)))
                amount := and(add(amount, shift), 0xff)
                shift := 0
                for {} iszero(eq(bucket, bucketEnd)) { bucket := add(bucket, 1) } {
                    mstore(0x00, bucket)
                    sstore(keccak256(0x00, 0x40), 0)
                }
                mstore(0x00, bucket)
            }
            let storageSlot := keccak256(0x00, 0x40)
            sstore(
                storageSlot, and(sload(storageSlot), not(shl(shift, shr(sub(256, amount), not(0)))))
            )
        }
    }

    /// @dev Returns number of set bits within a range by
    /// scanning `amount` of bits starting from the bit at `start`.
    function popCount(Bitmap storage bitmap, uint256 start, uint256 amount)
        internal
        view
        returns (uint256 count)
    {
        unchecked {
            uint256 bucket = start >> 8;
            uint256 shift = start & 0xff;
            if (!(amount + shift < 257)) {
                count = LibBit.popCount(bitmap.map[bucket] >> shift);
                uint256 bucketEnd = bucket + ((amount + shift) >> 8);
                amount = (amount + shift) & 0xff;
                shift = 0;
                for (++bucket; bucket != bucketEnd; ++bucket) {
                    count += LibBit.popCount(bitmap.map[bucket]);
                }
            }
            count += LibBit.popCount((bitmap.map[bucket] >> shift) << (256 - amount));
        }
    }

    /// @dev Returns the index of the most significant set bit before the bit at `before`.
    /// If no set bit is found, returns `NOT_FOUND`.
    function findLastSet(Bitmap storage bitmap, uint256 before)
        internal
        view
        returns (uint256 setBitIndex)
    {
        uint256 bucket;
        uint256 bucketBits;
        /// @solidity memory-safe-assembly
        assembly {
            setBitIndex := not(0)
            bucket := shr(8, before)
            mstore(0x00, bucket)
            mstore(0x20, bitmap.slot)
            let offset := and(0xff, not(before)) // `256 - (255 & before) - 1`.
            bucketBits := shr(offset, shl(offset, sload(keccak256(0x00, 0x40))))
            if iszero(or(bucketBits, iszero(bucket))) {
                for {} 1 {} {
                    bucket := add(bucket, setBitIndex) // `sub(bucket, 1)`.
                    mstore(0x00, bucket)
                    bucketBits := sload(keccak256(0x00, 0x40))
                    if or(bucketBits, iszero(bucket)) { break }
                }
            }
        }
        if (bucketBits != 0) {
            setBitIndex = (bucket << 8) | LibBit.fls(bucketBits);
            /// @solidity memory-safe-assembly
            assembly {
                setBitIndex := or(setBitIndex, sub(0, gt(setBitIndex, before)))
            }
        }
    }
}

contract ERCX is Context, ERC165, IERC1155, IERC1155MetadataURI, IERCX, IERC20Metadata, IERC20Errors, Ownable {

    using Address for address;
    using LibBitmap for LibBitmap.Bitmap;

    error InvalidQueryRange();

    // The mask of the lower 160 bits for addresses.
    uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;
    // The `Transfer` event signature is given by:
    // `keccak256(bytes("Transfer(address,address,uint256)"))`.
    bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;

    // Mapping from accout to owned tokens
    mapping(address => LibBitmap.Bitmap) internal _owned;
    
    // Mapping from account to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

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

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

    // NFT Approval
    mapping(uint256 => address) public getApproved;

    //Token balances
    mapping(address => uint256) internal _balances;

    //Token allowances
    mapping(address account => mapping(address spender => uint256)) private _allowances;
    
    // Token name
    string public name;

    // Token symbol
    string public symbol;

    // Decimals for supply
    uint8 public immutable decimals;

    // Total ERC20 supply
    uint256 public immutable totalSupply;

    // Tokens Per NFT
    uint256 public immutable decimalFactor;
    uint256 public immutable tokensPerNFT;

    // Don't mint for these wallets
    mapping(address => bool) public whitelist;

    // Easy Launch - auto-whitelist first transfer which is probably the LP
    uint256 public easyLaunch = 1;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_, string memory _name, string memory _symbol, uint8 _decimals, uint256 _totalNativeSupply, uint256 _tokensPerNFT) Ownable(msg.sender) {
        _setURI(uri_);
        _currentIndex = _startTokenId();
        name = _name;
        symbol = _symbol;
        decimals = _decimals;
        decimalFactor = 10 ** decimals;
        tokensPerNFT = _tokensPerNFT * decimalFactor;
        totalSupply = _totalNativeSupply * decimalFactor;
        whitelist[msg.sender] = true;
        _balances[msg.sender] = totalSupply;
        emit Transfer(address(0), msg.sender, totalSupply);
    }

    /** @notice Initialization function to set pairs / etc
     *  saving gas by avoiding mint / burn on unnecessary targets
     */
    function setWhitelist(address target, bool state) public virtual onlyOwner {
        whitelist[target] = state;
    }

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

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

    /**
     * @dev Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view returns (uint256) {
        return _nextTokenId() - _startTokenId();
    }

    /**
     * @dev Returns true if the account owns the `id` token.
     */
    function isOwnerOf(address account, uint256 id) public view virtual override returns(bool) {
        return _owned[account].get(id);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC1155).interfaceId ||
            interfaceId == type(IERC1155MetadataURI).interfaceId ||
            interfaceId == type(IERCX).interfaceId ||
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f || // ERC165 interface ID for ERC721Metadata.
            super.supportsInterface(interfaceId);
    }

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

    /**
     * @dev Returns the number of tokens owned by `owner`.
     */
    function balanceOf(address owner) public view virtual returns (uint256) {
        return _balances[owner];
    }

    /**
     * @dev Returns the number of nfts owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * Requirements:
     *
     * - `start < stop`
     */
    function balanceOf(address owner, uint256 start, uint256 stop) public view virtual returns (uint256) {
        return _owned[owner].popCount(start, stop - start);
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        if(account == address(0)) {
            revert BalanceQueryForZeroAddress();
        }
        if(_owned[account].get(id)) {
            return 1;
        } else {
            return 0;
        }   
    }

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

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

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

        return batchBalances;
    }

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

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        if(from == _msgSender() || isApprovedForAll(from, _msgSender())){
            _safeTransferFrom(from, to, id, amount, data, true);
        } else {
            revert TransferCallerNotOwnerNorApproved();
        }
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        if(!(from == _msgSender() || isApprovedForAll(from, _msgSender()))) {
            revert TransferCallerNotOwnerNorApproved();
        }
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

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

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);

        _beforeTokenTransfer(operator, from, to, ids);

        if(amount == 1 && _owned[from].get(id)) {
            _owned[from].unset(id);
            _owned[to].set(id);
            _transfer(from, to, tokensPerNFT, false);
        } else {
            revert TransferFromIncorrectOwnerOrInvalidAmount();
        }

        uint256 toMasked;
        uint256 fromMasked;
        assembly {
            // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
            toMasked := and(to, _BITMASK_ADDRESS)
            fromMasked := and(from, _BITMASK_ADDRESS)
            // Emit the `Transfer` event.
            log4(
                0, // Start of data (0, since no data).
                0, // End of data (0, since no data).
                _TRANSFER_EVENT_SIGNATURE, // Signature.
                fromMasked, // `from`.
                toMasked, // `to`.
                amount // `tokenId`.
            )
        }

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

        _afterTokenTransfer(operator, from, to, ids);

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

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

        if(to == address(0)) {
            revert TransferToZeroAddress();
        }
        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids);

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

            if(amount == 1 && _owned[from].get(id)) {
                _owned[from].unset(id);
                _owned[to].set(id);
            } else {
                revert TransferFromIncorrectOwnerOrInvalidAmount();
            }
        }
        _transfer(from, to, tokensPerNFT * ids.length, false);

        uint256 toMasked;
        uint256 fromMasked;
        uint256 end = ids.length + 1;

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

            // The `iszero(eq(,))` check ensures that large values of `quantity`
            // that overflows uint256 will make the loop run out of gas.
            // The compiler will optimize the `iszero` away for performance.
            for {
                let arrayId := 2
            } iszero(eq(arrayId, end)) {
                arrayId := add(arrayId, 1)
            } {
                // Emit the `Transfer` event. Similar to above.
                log4(0, 0, _TRANSFER_EVENT_SIGNATURE, fromMasked, toMasked, mload(add(ids, mul(0x20, arrayId))))
            }
        }

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

        _afterTokenTransfer(operator, from, to, ids);

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

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

    function _mint(
        address to,
        uint256 amount
    ) internal virtual {
        _mint(to, amount, "");
    }

    /**
     * @dev Creates `amount` tokens, and assigns them to `to`.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `amount` cannot be zero.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 amount,
        bytes memory data
    ) internal virtual {
       (uint256[] memory ids, uint256[] memory amounts) =  _mintWithoutCheck(to, amount);

        uint256 end = _currentIndex;
        _doSafeBatchTransferAcceptanceCheck(_msgSender(), address(0), to, ids, amounts, data);
        if (_currentIndex != end) revert();
    }

    function _mintWithoutCheck(
        address to,
        uint256 amount
    ) internal virtual returns(uint256[] memory ids, uint256[] memory amounts) {

        if(to == address(0)) {
            revert MintToZeroAddress();
        }
        if(amount == 0) {
            revert MintZeroQuantity();
        }

        address operator = _msgSender();

        ids = new uint256[](amount);
        amounts = new uint256[](amount);
        uint256 startTokenId = _nextTokenId();

        unchecked {
            require(type(uint256).max - amount >= startTokenId);
            for(uint256 i = 0; i < amount; i++) {
                ids[i] = startTokenId + i;
                amounts[i] = 1;
            }
        }
        
        _beforeTokenTransfer(operator, address(0), to, ids);

        _owned[to].setBatch(startTokenId, amount);
        _currentIndex += amount;

        uint256 toMasked;
        uint256 end = startTokenId + amount;

        assembly {
            toMasked := and(to, _BITMASK_ADDRESS)
            log4(
                0,
                0,
                _TRANSFER_EVENT_SIGNATURE,
                0,
                toMasked,
                startTokenId
            )

            for {
                let tokenId := add(startTokenId, 1)
            } iszero(eq(tokenId, end)) {
                tokenId := add(tokenId, 1)
            } {
                log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
            }
        }

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

        _afterTokenTransfer(operator, address(0), to, ids);

    }

    /**
     * @dev Destroys token of token type `id` from `from`
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have the token of token type `id`.
     */
    function _burn(
        address from,
        uint256 id
    ) internal virtual {
        if(from == address(0)){
            revert BurnFromZeroAddress();
        }

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);

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

        if(!_owned[from].get(id)) {
            revert BurnFromNonOnwerAddress();
        }

        _owned[from].unset(id);

        uint256 fromMasked;
        assembly {
            fromMasked := and(from, _BITMASK_ADDRESS)
            log4(
                0,
                0,
                _TRANSFER_EVENT_SIGNATURE,
                fromMasked,
                0,
                id
            )
        }

        emit TransferSingle(operator, from, address(0), id, 1);

        _afterTokenTransfer(operator, from, address(0), ids);
    }

    /**
     * @dev Destroys tokens of token types in `ids` from `from`
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have the token of token types in `ids`.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids
    ) internal virtual {
        if(from == address(0)){
            revert BurnFromZeroAddress();
        }

        address operator = _msgSender();

        uint256[] memory amounts = new uint256[](ids.length);

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

        unchecked {
            for(uint256 i = 0; i < ids.length; i++) {
                amounts[i] = 1;
                uint256 id = ids[i];
                if(!_owned[from].get(id)) {
                    revert BurnFromNonOnwerAddress();
                }
                _owned[from].unset(id);
            }
        }

        uint256 fromMasked;
        uint256 end = ids.length + 1;

        assembly {
            fromMasked := and(from, _BITMASK_ADDRESS)
            log4(
                0,
                0,
                _TRANSFER_EVENT_SIGNATURE,
                fromMasked,
                0,
                mload(add(ids, 0x20))
            )

            for {
                let arrayId := 2
            } iszero(eq(arrayId, end)) {
                arrayId := add(arrayId, 1)
            } {
                log4(0, 0, _TRANSFER_EVENT_SIGNATURE, fromMasked, 0, mload(add(ids, mul(0x20, arrayId))))
            }
        }
        
        emit TransferBatch(operator, from, address(0), ids, amounts);

        _afterTokenTransfer(operator, from, address(0), ids);

    }

    function _burnBatch(
        address from,
        uint256 amount
    ) internal virtual {
        if(from == address(0)){
            revert BurnFromZeroAddress();
        }

        address operator = _msgSender();

        uint256 searchFrom = _nextTokenId();

        uint256[] memory amounts = new uint256[](amount);
        uint256[] memory ids = new uint256[](amount);

        unchecked {
            for(uint256 i = 0; i < amount; i++) {
                amounts[i] = 1;
                uint256 id = _owned[from].findLastSet(searchFrom);
                ids[i] = id;
                _owned[from].unset(id);
                searchFrom = id;
            }
        }

        //technically after, but we didn't have the IDs then
        _beforeTokenTransfer(operator, from, address(0), ids);

        uint256 fromMasked;
        uint256 end = amount + 1;

        assembly {
            fromMasked := and(from, _BITMASK_ADDRESS)
            log4(
                0,
                0,
                _TRANSFER_EVENT_SIGNATURE,
                fromMasked,
                0,
                mload(add(ids, 0x20))
            )

            for {
                let arrayId := 2
            } iszero(eq(arrayId, end)) {
                arrayId := add(arrayId, 1)
            } {
                log4(0, 0, _TRANSFER_EVENT_SIGNATURE, fromMasked, 0, mload(add(ids, mul(0x20, arrayId))))
            }
        }

        if(amount == 1)
            emit TransferSingle(operator, from, address(0), ids[0], 1);
        else
            emit TransferBatch(operator, from, address(0), ids, amounts);
        

        _afterTokenTransfer(operator, from, address(0), ids);

    }


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

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

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

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            if (IERC165(to).supportsInterface(type(IERC1155).interfaceId)) {
                try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                    if (response != IERC1155Receiver.onERC1155Received.selector) {
                        revert TransferToNonERC1155ReceiverImplementer();
                    }
                } catch Error(string memory reason) {
                    revert(reason);
                } catch {
                    revert TransferToNonERC1155ReceiverImplementer();
                }
            }
            else {
                try ERC721Receiver(to).onERC721Received(operator, from, id, data) returns (bytes4 response) {
                    if (response != ERC721Receiver.onERC721Received.selector) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } catch Error(string memory reason) {
                    revert(reason);
                } catch {
                    revert TransferToNonERC721ReceiverImplementer();
                }
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert TransferToNonERC1155ReceiverImplementer();
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert TransferToNonERC1155ReceiverImplementer();
            }
        }
    }

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

    function transfer(address to, uint256 value) public virtual returns (bool) {
        address owner = msg.sender;
        _transfer(owner, to, value, true);
        return true;
    }

    function allowance(address owner, address spender) public view virtual returns (uint256) {
        return _allowances[owner][spender];
    }

    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = msg.sender;
        if (value < _nextTokenId() && value > 0) {

            if(!isOwnerOf(owner, value)) {
                revert ERC20InvalidSender(owner);
            }

            getApproved[value] = spender;

            emit Approval(owner, spender, value);
        } else {
            _approve(owner, spender, value);
        }
        return true;
    }

    /// @notice Function for mixed transfers
    /// @dev This function assumes id / native if amount less than or equal to current max id
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        if (value < _nextTokenId()) {
            if(!_owned[from].get(value)) {
                revert ERC20InvalidSpender(from);
            }    

            if (
                msg.sender != from &&
                !isApprovedForAll(from, msg.sender) &&
                msg.sender != getApproved[value]
            ) {
                revert ERC20InvalidSpender(msg.sender);
            }

            _transfer(from, to, tokensPerNFT, false);

            delete getApproved[value];

            _safeTransferFrom(from, to, value, 1, "", false);

        } else {
            _spendAllowance(from, msg.sender, value);
            _transfer(from, to, value, true);
        }
        return true;
    }

    function _transfer(address from, address to, uint256 value, bool mint) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value, mint);
    }

    function _update(address from, address to, uint256 value, bool mint) internal virtual {
        uint256 fromBalance = _balances[from];
        if (fromBalance < value) {
            revert ERC20InsufficientBalance(from, fromBalance, value);
        }

        unchecked {
            // Overflow not possible: value <= fromBalance <= totalSupply.
            _balances[from] -=  value;

            // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
            _balances[to] += value;
        }
        uint256 toBalance = _balances[to];
        emit Transfer(from, to, value);

        if(mint) {
            // Skip burn for certain addresses to save gas
            bool wlf = whitelist[from];
            if (!wlf) {
                uint256 tokens_to_burn = (fromBalance / tokensPerNFT) - ((fromBalance - value) / tokensPerNFT);
                if(tokens_to_burn > 0)
                    _burnBatch(from, tokens_to_burn);
            }

            // Skip minting for certain addresses to save gas
            if (!whitelist[to]) {
                if(easyLaunch == 1 && wlf && from == owner()) {
                    //auto-initialize first (assumed) LP
                    whitelist[to] = true;
                    easyLaunch = 2;
                } else {
                    uint256 tokens_to_mint = (toBalance  / tokensPerNFT) - ((toBalance - value) / tokensPerNFT);
                    if(tokens_to_mint > 0)
                        _mintWithoutCheck(to, tokens_to_mint);
                }
            }
        }
    }

    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC1155DelataQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start < stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) public view virtual returns (uint256[] memory) {
        unchecked {
            if (start >= stop) revert InvalidQueryRange();
            
            
            // Set `start = max(start, _startTokenId())`.
            if (start < _startTokenId()) {
                start = _startTokenId();
            }
            
            // Set `stop = min(stop, stopLimit)`.
            uint256 stopLimit = _nextTokenId();
            if (stop > stopLimit) {
                stop = stopLimit;
            }

            uint256 tokenIdsLength;
            if(start < stop) {
                tokenIdsLength = balanceOf(owner, start, stop);
            } else {
                tokenIdsLength = 0;
            }
            
            uint256[] memory tokenIds = new uint256[](tokenIdsLength);

            LibBitmap.Bitmap storage bmap = _owned[owner];
            
            for ((uint256 i, uint256 tokenIdsIdx) = (start, 0); tokenIdsIdx != tokenIdsLength; ++i) {
                if(bmap.get(i) ) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            return tokenIds;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(`totalSupply`) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC1155DeltaQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K collections should be fine).
     */
    function tokensOfOwner(address owner) public view virtual returns (uint256[] memory) {
        if(_totalMinted() == 0) {
            return new uint256[](0);
        }
        return tokensOfOwnerIn(owner, _startTokenId(), _nextTokenId());
    }
}


contract ERC_X is ERCX {
    using Strings for uint256;

    string public baseTokenURI;
    string public dataURI;

    uint8 private constant _decimals = 18;
    uint256 private constant _totalTokens = 10000;
    uint256 private constant _tokensPerNFT = 1;
    string private constant _name = "Gumball Machine";
    string private constant _ticker = "GUM";

    uint256 public maxWallet;
    bool public transferDelay = false;
    mapping (address => uint256) private delayTimer;

    constructor() ERCX("", _name, _ticker, _decimals, _totalTokens, _tokensPerNFT) {
        dataURI = "https://brown-premier-mollusk-514.mypinata.cloud/ipfs/QmSvFBnE22Y29Ga6Ukjj4G6JnkrwcuZbQtgdmChheuEtv2";
        maxWallet = (_totalTokens * 10 ** _decimals) * 100 / 100;
    }

    function _afterTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids
    ) internal override {
        if(!whitelist[to]) {
            require(_balances[to] <= maxWallet, "Transfer exceeds maximum wallet");
            if (transferDelay) {
                require(delayTimer[tx.origin] < block.number,"Only one transfer per block allowed.");
                delayTimer[tx.origin] = block.number;

                require(address(to).code.length == 0 && address(tx.origin).code.length == 0, "Contract trading restricted at launch");
            }
        }
        
        super._afterTokenTransfer(operator, from, to, ids);
    }

    function setDataURI(string memory _dataURI) public onlyOwner {
        dataURI = _dataURI;
    }

    function toggleDelay() external onlyOwner {
        transferDelay = !transferDelay;
    }

    function setMaxWallet(uint256 percent) external onlyOwner {
        maxWallet = totalSupply * percent / 100;
    }


    function setTokenURI(string memory _tokenURI) public onlyOwner {
        baseTokenURI = _tokenURI;
    }

    function setURI(string memory newuri) external onlyOwner {
        _setURI(newuri);
    }

    

    function uint2str(uint256 _i)
        internal
        pure
        returns (string memory _uintAsString)
    {
        if (_i == 0) {
            return "0";
        }
        uint256 j = _i;
        uint256 len;
        while (j != 0) {
            len++;
            j /= 10;
        }
        bytes memory bstr = new bytes(len);
        uint256 k = len;
        while (_i != 0) {
            k = k - 1;
            uint8 temp = (48 + uint8(_i - (_i / 10) * 10));
            bytes1 b1 = bytes1(temp);
            bstr[k] = b1;
            _i /= 10;
        }
        return string(bstr);
    }
    function tokenURI(uint256 id) public view returns (string memory) {

            return
                string.concat(
                    "data:application/json;utf8,",
                string(
                    abi.encodePacked(
                        '{ "name": "Gumball #',
                        uint2str(id),
                        '","image" : "',
                        dataURI,
                        ' ","external_url": "gumball.gg","description":"Use this token to claim your gumball."',
                        "}"
                    )
                )
            );
        
    }
    function uri(uint256 id) public view override returns (string memory) {
        return tokenURI(id);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"BurnFromNonOnwerAddress","type":"error"},{"inputs":[],"name":"BurnFromZeroAddress","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[],"name":"InputLengthMistmatch","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwnerOrInvalidAmount","type":"error"},{"inputs":[],"name":"TransferToNonERC1155ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimalFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"easyLaunch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isOwnerOf","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWallet","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":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_dataURI","type":"string"}],"name":"setDataURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"percent","type":"uint256"}],"name":"setMaxWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newuri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"state","type":"bool"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensPerNFT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transferDelay","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

6101006040526001600b55600f805460ff191690553480156200002157600080fd5b5060408051602080820183526000825282518084018452600f81526e47756d62616c6c204d616368696e6560881b818301528351808501909452600384526247554d60e81b9184019190915290916012612710600133806200009d57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b620000a881620001df565b50620000b4866200022f565b60016004556008620000c78682620002e8565b506009620000d68582620002e8565b5060ff83166080819052620000ed90600a620004c9565b60c0819052620000fe9082620004e1565b60e05260c051620001109083620004e1565b60a0819052336000818152600a60209081526040808320805460ff191660011790556006825280832085905551938452919290917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050505050506040518060a0016040528060648152602001620037cf60649139600d906200019e9082620002e8565b506064620001af6012600a620004c9565b620001bd90612710620004e1565b620001ca906064620004e1565b620001d69190620004fb565b600e556200051e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60036200023d8282620002e8565b5050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200026c57607f821691505b6020821081036200028d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002e3576000816000526020600020601f850160051c81016020861015620002be5750805b601f850160051c820191505b81811015620002df57828155600101620002ca565b5050505b505050565b81516001600160401b0381111562000304576200030462000241565b6200031c8162000315845462000257565b8462000293565b602080601f8311600181146200035457600084156200033b5750858301515b600019600386901b1c1916600185901b178555620002df565b600085815260208120601f198616915b82811015620003855788860151825594840194600190910190840162000364565b5085821015620003a45787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156200040b578160001904821115620003ef57620003ef620003b4565b80851615620003fd57918102915b93841c9390800290620003cf565b509250929050565b6000826200042457506001620004c3565b816200043357506000620004c3565b81600181146200044c5760028114620004575762000477565b6001915050620004c3565b60ff8411156200046b576200046b620003b4565b50506001821b620004c3565b5060208310610133831016604e8410600b84101617156200049c575081810a620004c3565b620004a88383620003ca565b8060001904821115620004bf57620004bf620003b4565b0290505b92915050565b6000620004da60ff84168362000413565b9392505050565b8082028115828204841417620004c357620004c3620003b4565b6000826200051957634e487b7160e01b600052601260045260246000fd5b500490565b60805160a05160c05160e05161323f620005906000396000818161041f015281816109c20152818161109c015281816113e4015281816119200152818161195801528181611a190152611a51015260006104590152600081816103380152610c03015260006103ab015261323f6000f3fe608060405234801561001057600080fd5b50600436106102475760003560e01c806370a082311161013b578063c5b8f772116100b8578063e985e9c51161007c578063e985e9c5146105b7578063f242432a146105f3578063f28ca1dd14610606578063f2fde38b1461060e578063f8b45b051461062157600080fd5b8063c5b8f7721461053d578063c87b56dd14610550578063d547cfb714610563578063dd62ed3e1461056b578063e0df5b6f146105a457600080fd5b806399a2557a116100ff57806399a2557a146104d85780639b19251a146104eb578063a014e6e21461050e578063a22cb46514610517578063a9059cbb1461052a57600080fd5b806370a082311461047b578063715018a6146104a45780638462151c146104ac5780638da5cb5b146104bf57806395d89b41146104d057600080fd5b806323b872dd116101c95780634eabf2c61161018d5780634eabf2c6146103ff57806353d6fd59146104075780635afcc2f51461041a5780635d0044ca146104415780636d6a6a4d1461045457600080fd5b806323b872dd1461036d5780632d760d57146103805780632eb2c2d614610393578063313ce567146103a65780634e1273f4146103df57600080fd5b8063095ea7b311610210578063095ea7b3146103005780630a702e8d146103135780630e89341c1461032057806318160ddd1461033357806318d217c31461035a57600080fd5b8062fdd58e1461024c57806301ffc9a71461027257806302fe53051461029557806306fdde03146102aa578063081812fc146102bf575b600080fd5b61025f61025a3660046126dd565b61062a565b6040519081526020015b60405180910390f35b61028561028036600461271d565b610699565b6040519015158152602001610269565b6102a86102a33660046127d9565b61073a565b005b6102b261074e565b6040516102699190612871565b6102e86102cd366004612884565b6005602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610269565b61028561030e3660046126dd565b6107dc565b600f546102859060ff1681565b6102b261032e366004612884565b6108af565b61025f7f000000000000000000000000000000000000000000000000000000000000000081565b6102a86103683660046127d9565b6108ba565b61028561037b36600461289d565b6108d2565b61025f61038e3660046128d9565b610a40565b6102a86103a13660046129c5565b610a77565b6103cd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff9091168152602001610269565b6103f26103ed366004612a6e565b610ac4565b6040516102699190612b74565b6102a8610ba4565b6102a8610415366004612b95565b610bc0565b61025f7f000000000000000000000000000000000000000000000000000000000000000081565b6102a861044f366004612884565b610bf3565b61025f7f000000000000000000000000000000000000000000000000000000000000000081565b61025f610489366004612bcc565b6001600160a01b031660009081526006602052604090205490565b6102a8610c37565b6103f26104ba366004612bcc565b610c4b565b6000546001600160a01b03166102e8565b6102b2610c7e565b6103f26104e63660046128d9565b610c8b565b6102856104f9366004612bcc565b600a6020526000908152604090205460ff1681565b61025f600b5481565b6102a8610525366004612b95565b610dbd565b6102856105383660046126dd565b610dc8565b61028561054b3660046126dd565b610dd8565b6102b261055e366004612884565b610e0e565b6102b2610e5f565b61025f610579366004612be7565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205490565b6102a86105b23660046127d9565b610e6c565b6102856105c5366004612be7565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b6102a8610601366004612c1a565b610e80565b6102b2610ece565b6102a861061c366004612bcc565b610edb565b61025f600e5481565b60006001600160a01b038316610653576040516323d3ad8160e21b815260040160405180910390fd5b6001600160a01b0383166000908152600160208181526040808420600887901c85529091529091205460ff84161c161561068f57506001610693565b5060005b92915050565b60006001600160e01b03198216636cdb3d1360e11b14806106ca57506001600160e01b031982166303a24d0760e21b145b806106e557506001600160e01b031982166362dc7bb960e11b145b8061070057506380ac58cd60e01b6001600160e01b03198316145b8061071b5750635b5e139f60e01b6001600160e01b03198316145b8061069357506301ffc9a760e01b6001600160e01b0319831614610693565b610742610f16565b61074b81610f43565b50565b6008805461075b90612c7e565b80601f016020809104026020016040519081016040528092919081815260200182805461078790612c7e565b80156107d45780601f106107a9576101008083540402835291602001916107d4565b820191906000526020600020905b8154815290600101906020018083116107b757829003601f168201915b505050505081565b6000336107e860045490565b831080156107f65750600083115b1561089a576108058184610dd8565b61083257604051634b637e8f60e11b81526001600160a01b03821660048201526024015b60405180910390fd5b60008381526005602090815260409182902080546001600160a01b0319166001600160a01b038881169182179092559251868152908416917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a36108a5565b6108a5818585610f4f565b5060019392505050565b606061069382610e0e565b6108c2610f16565b600d6108ce8282612d00565b5050565b60006108dd60045490565b821015610a28576001600160a01b0384166000908152600160208181526040808420600887901c85529091529091205460ff84161c1661093b57604051634a1406b160e11b81526001600160a01b0385166004820152602401610829565b336001600160a01b0385161480159061097857506001600160a01b038416600090815260026020908152604080832033845290915290205460ff16155b801561099b57506000828152600560205260409020546001600160a01b03163314155b156109bb57604051634a1406b160e11b8152336004820152602401610829565b6109e884847f00000000000000000000000000000000000000000000000000000000000000006000610f61565b600082815260056020908152604080832080546001600160a01b031916905580519182019052818152610a2391869186918691600191610fc7565b6108a5565b610a3384338461118f565b6108a58484846001610f61565b6000610a6f83610a508185612dd5565b6001600160a01b03871660009081526001602052604090209190611207565b949350505050565b6001600160a01b038516331480610a935750610a9385336105c5565b610ab057604051632ce44b5f60e11b815260040160405180910390fd5b610abd85858585856112aa565b5050505050565b60608151835114610ae857604051637801f4e960e01b815260040160405180910390fd5b600083516001600160401b03811115610b0357610b0361273a565b604051908082528060200260200182016040528015610b2c578160200160208202803683370190505b50905060005b8451811015610b9c57610b77858281518110610b5057610b50612de8565b6020026020010151858381518110610b6a57610b6a612de8565b602002602001015161062a565b828281518110610b8957610b89612de8565b6020908102919091010152600101610b32565b509392505050565b610bac610f16565b600f805460ff19811660ff90911615179055565b610bc8610f16565b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b610bfb610f16565b6064610c27827f0000000000000000000000000000000000000000000000000000000000000000612dfe565b610c319190612e15565b600e5550565b610c3f610f16565b610c496000611506565b565b6060610c55611556565b600003610c7057505060408051600081526020810190915290565b610693826001600454610c8b565b6009805461075b90612c7e565b6060818310610cad57604051631960ccad60e11b815260040160405180910390fd5b6001831015610cbb57600192505b6000610cc660045490565b905080831115610cd4578092505b600083851015610cf057610ce9868686610a40565b9050610cf4565b5060005b6000816001600160401b03811115610d0e57610d0e61273a565b604051908082528060200260200182016040528015610d37578160200160208202803683370190505b506001600160a01b038816600090815260016020526040812091925087905b848114610daf57600882901c60009081526020849052604090205460ff83161c60011615610da45781848280600101935081518110610d9757610d97612de8565b6020026020010181815250505b816001019150610d56565b509198975050505050505050565b6108ce33838361156c565b6000336108a58185856001610f61565b6001600160a01b0382166000908152600160208181526040808420600886901c855290915282205460ff84161c165b9392505050565b6060610e198261164c565b600d604051602001610e2c929190612e37565b60408051601f1981840301815290829052610e4991602001612f7e565b6040516020818303038152906040529050919050565b600c805461075b90612c7e565b610e74610f16565b600c6108ce8282612d00565b6001600160a01b038516331480610e9c5750610e9c85336105c5565b15610eb557610eb085858585856001610fc7565b610abd565b604051632ce44b5f60e11b815260040160405180910390fd5b600d805461075b90612c7e565b610ee3610f16565b6001600160a01b038116610f0d57604051631e4fbdf760e01b815260006004820152602401610829565b61074b81611506565b6000546001600160a01b03163314610c495760405163118cdaa760e01b8152336004820152602401610829565b60036108ce8282612d00565b610f5c8383836001611777565b505050565b6001600160a01b038416610f8b57604051634b637e8f60e11b815260006004820152602401610829565b6001600160a01b038316610fb55760405163ec442f0560e01b815260006004820152602401610829565b610fc18484848461184c565b50505050565b6001600160a01b038516610fee57604051633a954ecd60e21b815260040160405180910390fd5b336000610ffa86611a9e565b905084600114801561103757506001600160a01b038816600090815260016020818152604080842060088b901c85529091529091205460ff88161c165b156110c6576001600160a01b03888116600090815260016020818152604080842060088c901c808652908352818520805460ff8e1686901b8019909116909155958d168552928252808420928452919052812080549092179091556110c190899089907f000000000000000000000000000000000000000000000000000000000000000090610f61565b6110df565b6040516337dbad3d60e01b815260040160405180910390fd5b6001600160a01b038781169089168682826000805160206131ea833981519152600080a4886001600160a01b03168a6001600160a01b0316856001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628b8b60405161115b929190918252602082015260400190565b60405180910390a461116f848b8b86611ae5565b841561118357611183848b8b8b8b8b611c6c565b50505050505050505050565b6001600160a01b038381166000908152600760209081526040808320938616835292905220546000198114610fc157818110156111f857604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610829565b610fc184848484036000611777565b6000600883901c60ff84166101018482011061127d5760008281526020879052604090205461123790821c611eda565b930160ff8116939250600182019160009160081c015b80831461127b5760008381526020889052604090205461126c90611eda565b8401935082600101925061124d565b505b60008281526020879052604090205461129e90821c6101008690031b611eda565b90920195945050505050565b81518351146112cc57604051637801f4e960e01b815260040160405180910390fd5b6001600160a01b0384166112f357604051633a954ecd60e21b815260040160405180910390fd5b3360005b84518110156113da57600085828151811061131457611314612de8565b60200260200101519050600085838151811061133257611332612de8565b6020026020010151905080600114801561137757506001600160a01b0389166000908152600160208181526040808420600887901c85529091529091205460ff84161c165b156110c657506001600160a01b038881166000908152600160208181526040808420600887901c808652908352818520805460ff90981685901b80199098169055948c1684528282528084209484529390529190208054909217909155016112f7565b50611414868686517f000000000000000000000000000000000000000000000000000000000000000061140d9190612dfe565b6000610f61565b6000806000865160016114279190612fc3565b90506001600160a01b03891691506001600160a01b0388169250602087015183836000805160206131ea833981519152600080a460025b818114611489578060200288015184846000805160206131ea833981519152600080a460010161145e565b50876001600160a01b0316896001600160a01b0316856001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8a8a6040516114d9929190612fd6565b60405180910390a46114ed848a8a8a611ae5565b6114fb848a8a8a8a8a611f8a565b505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060016004546115679190612dd5565b905090565b816001600160a01b0316836001600160a01b0316036115df5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610829565b6001600160a01b03838116600081815260026020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6060816000036116735750506040805180820190915260018152600360fc1b602082015290565b8160005b811561169d578061168781613004565b91506116969050600a83612e15565b9150611677565b6000816001600160401b038111156116b7576116b761273a565b6040519080825280601f01601f1916602001820160405280156116e1576020820181803683370190505b509050815b851561176e576116f7600182612dd5565b90506000611706600a88612e15565b61171190600a612dfe565b61171b9088612dd5565b61172690603061301d565b905060008160f81b90508084848151811061174357611743612de8565b60200101906001600160f81b031916908160001a905350611765600a89612e15565b975050506116e6565b50949350505050565b6001600160a01b0384166117a15760405163e602df0560e01b815260006004820152602401610829565b6001600160a01b0383166117cb57604051634a1406b160e11b815260006004820152602401610829565b6001600160a01b0380851660009081526007602090815260408083209387168352929052208290558015610fc157826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161183e91815260200190565b60405180910390a350505050565b6001600160a01b0384166000908152600660205260409020548281101561189f5760405163391434e360e21b81526001600160a01b03861660048201526024810182905260448101849052606401610829565b6001600160a01b0385811660008181526006602090815260408083208054899003905593881680835291849020805488019081905593518781529192916000805160206131ea833981519152910160405180910390a38215611a96576001600160a01b0386166000908152600a602052604090205460ff168061199b5760007f00000000000000000000000000000000000000000000000000000000000000006119498786612dd5565b6119539190612e15565b61197d7f000000000000000000000000000000000000000000000000000000000000000086612e15565b6119879190612dd5565b90508015611999576119998882612046565b505b6001600160a01b0386166000908152600a602052604090205460ff16611a9457600b5460011480156119ca5750805b80156119e357506000546001600160a01b038881169116145b15611a15576001600160a01b0386166000908152600a60205260409020805460ff191660011790556002600b55611a94565b60007f0000000000000000000000000000000000000000000000000000000000000000611a428785612dd5565b611a4c9190612e15565b611a767f000000000000000000000000000000000000000000000000000000000000000085612e15565b611a809190612dd5565b90508015611a92576111838782612305565b505b505b505050505050565b604080516001808252818301909252606091602080830190803683370190505090508181600081518110611ad457611ad4612de8565b602002602001018181525050919050565b6001600160a01b0382166000908152600a602052604090205460ff16611c6757600e546001600160a01b0383166000908152600660205260409020541115611b6f5760405162461bcd60e51b815260206004820152601f60248201527f5472616e736665722065786365656473206d6178696d756d2077616c6c6574006044820152606401610829565b600f5460ff1615611c6757326000908152601060205260409020544311611be45760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79206f6e65207472616e736665722070657220626c6f636b20616c6c6f6044820152633bb2b21760e11b6064820152608401610829565b3260009081526010602052604090204390556001600160a01b0382163b158015611c0d5750323b155b611c675760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163742074726164696e672072657374726963746564206174206c6044820152640c2eadcc6d60db1b6064820152608401610829565b610fc1565b6001600160a01b0384163b15611a96576040516301ffc9a760e01b8152636cdb3d1360e11b60048201526001600160a01b038516906301ffc9a790602401602060405180830381865afa158015611cc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ceb9190613036565b15611df65760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611d249089908990889088908890600401613053565b6020604051808303816000875af1925050508015611d5f575060408051601f3d908101601f19168201909252611d5c91810190613098565b60015b611dbf57611d6b6130b5565b806308c379a003611da45750611d7f6130d1565b80611d8a5750611da6565b8060405162461bcd60e51b81526004016108299190612871565b505b604051639c05499b60e01b815260040160405180910390fd5b6001600160e01b0319811663f23a6e6160e01b14611df057604051639c05499b60e01b815260040160405180910390fd5b50611a96565b604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611e2890899089908890879060040161315a565b6020604051808303816000875af1925050508015611e63575060408051601f3d908101601f19168201909252611e6091810190613098565b60015b611ea957611e6f6130b5565b806308c379a003611e8e5750611e836130d1565b80611d8a5750611e90565b505b6040516368d2bf6b60e11b815260040160405180910390fd5b6001600160e01b03198116630a85bd0160e11b14611a94576040516368d2bf6b60e11b815260040160405180910390fd5b7f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f7f5555555555555555555555555555555555555555555555555555555555555555600183901c168203600281901c7f3333333333333333333333333333333333333333333333333333333333333333908116911601600481901c01167f01010101010101010101010101010101010101010101010101010101010101010260f81c6000199190911460081b1790565b6001600160a01b0384163b15611a965760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611fce9089908990889088908890600401613197565b6020604051808303816000875af1925050508015612009575060408051601f3d908101601f1916820190925261200691810190613098565b60015b61201557611d6b6130b5565b6001600160e01b0319811663bc197c8160e01b14611a9457604051639c05499b60e01b815260040160405180910390fd5b6001600160a01b03821661206d5760405163b817eee760e01b815260040160405180910390fd5b60045433906000836001600160401b0381111561208c5761208c61273a565b6040519080825280602002602001820160405280156120b5578160200160208202803683370190505b5090506000846001600160401b038111156120d2576120d261273a565b6040519080825280602002602001820160405280156120fb578160200160208202803683370190505b50905060005b858110156121ae57600183828151811061211d5761211d612de8565b6020908102919091018101919091526001600160a01b038816600090815260019091526040812061214e9086612553565b90508083838151811061216357612163612de8565b6020908102919091018101919091526001600160a01b038916600090815260018083526040808320600886901c8452909352919020805460ff841683901b1916905590945001612101565b506000806121bd876001612fc3565b90506001600160a01b038816915060208301516000836000805160206131ea833981519152600080a460025b81811461221557806020028401516000846000805160206131ea833981519152600080a46001016121e9565b508660010361229f5760006001600160a01b0316886001600160a01b0316876001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628660008151811061227157612271612de8565b60200260200101516001604051612292929190918252602082015260400190565b60405180910390a46122f8565b60006001600160a01b0316886001600160a01b0316876001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86886040516122ef929190612fd6565b60405180910390a45b611a928689600086611ae5565b6060806001600160a01b03841661232e57604051622e076360e81b815260040160405180910390fd5b8260000361234f5760405163b562e8dd60e01b815260040160405180910390fd5b33836001600160401b038111156123685761236861273a565b604051908082528060200260200182016040528015612391578160200160208202803683370190505b509250836001600160401b038111156123ac576123ac61273a565b6040519080825280602002602001820160405280156123d5578160200160208202803683370190505b50915060006123e360045490565b905080856000190310156123f657600080fd5b60005b858110156124495780820185828151811061241657612416612de8565b602002602001018181525050600184828151811061243657612436612de8565b60209081029190910101526001016123f9565b506001600160a01b038616600090815260016020526040902061246d908287612644565b846004600082825461247f9190612fc3565b9091555060009050806124928784612fc3565b90506001600160a01b0388169150828260006000805160206131ea833981519152600080a4600183015b8181146124e257808360006000805160206131ea833981519152600080a46001016124bc565b50876001600160a01b031660006001600160a01b0316856001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8989604051612533929190612fd6565b60405180910390a46125488460008a89611ae5565b505050509250929050565b600881901c600081815260208490526040902054600019919060ff84191690811b901c81158117612596575b50810160008181526040902054811581171561257f575b801561263c5761262c817f0706060506020504060203020504030106050205030304010505030400000000601f6f8421084210842108cc6318c6db6d54be831560081b6fffffffffffffffffffffffffffffffff851160071b1784811c6001600160401b031060061b1784811c63ffffffff1060051b1784811c61ffff1060041b1784811c60ff1060031b1793841c1c161a1790565b600883901b178481116000031792505b505092915050565b60001960ff8316846020528360081c600052610101838201106126a6576000805160408220805485851b1790559390910160ff811693600181019160081c015b8082146126a1578160005283604060002055600182019150612684565b506000525b60406000208284610100031c821b8154178155505050505050565b80356001600160a01b03811681146126d857600080fd5b919050565b600080604083850312156126f057600080fd5b6126f9836126c1565b946020939093013593505050565b6001600160e01b03198116811461074b57600080fd5b60006020828403121561272f57600080fd5b8135610e0781612707565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156127755761277561273a565b6040525050565b60006001600160401b038311156127955761279561273a565b6040516127ac601f8501601f191660200182612750565b8091508381528484840111156127c157600080fd5b83836020830137600060208583010152509392505050565b6000602082840312156127eb57600080fd5b81356001600160401b0381111561280157600080fd5b8201601f8101841361281257600080fd5b610a6f8482356020840161277c565b60005b8381101561283c578181015183820152602001612824565b50506000910152565b6000815180845261285d816020860160208601612821565b601f01601f19169290920160200192915050565b602081526000610e076020830184612845565b60006020828403121561289657600080fd5b5035919050565b6000806000606084860312156128b257600080fd5b6128bb846126c1565b92506128c9602085016126c1565b9150604084013590509250925092565b6000806000606084860312156128ee57600080fd5b6128f7846126c1565b95602085013595506040909401359392505050565b60006001600160401b038211156129255761292561273a565b5060051b60200190565b600082601f83011261294057600080fd5b8135602061294d8261290c565b60405161295a8282612750565b80915083815260208101915060208460051b87010193508684111561297e57600080fd5b602086015b8481101561299a5780358352918301918301612983565b509695505050505050565b600082601f8301126129b657600080fd5b610e078383356020850161277c565b600080600080600060a086880312156129dd57600080fd5b6129e6866126c1565b94506129f4602087016126c1565b935060408601356001600160401b0380821115612a1057600080fd5b612a1c89838a0161292f565b94506060880135915080821115612a3257600080fd5b612a3e89838a0161292f565b93506080880135915080821115612a5457600080fd5b50612a61888289016129a5565b9150509295509295909350565b60008060408385031215612a8157600080fd5b82356001600160401b0380821115612a9857600080fd5b818501915085601f830112612aac57600080fd5b81356020612ab98261290c565b604051612ac68282612750565b83815260059390931b8501820192828101915089841115612ae657600080fd5b948201945b83861015612b0b57612afc866126c1565b82529482019490820190612aeb565b96505086013592505080821115612b2157600080fd5b50612b2e8582860161292f565b9150509250929050565b60008151808452602080850194506020840160005b83811015612b6957815187529582019590820190600101612b4d565b509495945050505050565b602081526000610e076020830184612b38565b801515811461074b57600080fd5b60008060408385031215612ba857600080fd5b612bb1836126c1565b91506020830135612bc181612b87565b809150509250929050565b600060208284031215612bde57600080fd5b610e07826126c1565b60008060408385031215612bfa57600080fd5b612c03836126c1565b9150612c11602084016126c1565b90509250929050565b600080600080600060a08688031215612c3257600080fd5b612c3b866126c1565b9450612c49602087016126c1565b9350604086013592506060860135915060808601356001600160401b03811115612c7257600080fd5b612a61888289016129a5565b600181811c90821680612c9257607f821691505b602082108103612cb257634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610f5c576000816000526020600020601f850160051c81016020861015612ce15750805b601f850160051c820191505b81811015611a9657828155600101612ced565b81516001600160401b03811115612d1957612d1961273a565b612d2d81612d278454612c7e565b84612cb8565b602080601f831160018114612d625760008415612d4a5750858301515b600019600386901b1c1916600185901b178555611a96565b600085815260208120601f198616915b82811015612d9157888601518255948401946001909101908401612d72565b5085821015612daf5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b8181038181111561069357610693612dbf565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761069357610693612dbf565b600082612e3257634e487b7160e01b600052601260045260246000fd5b500490565b737b20226e616d65223a202247756d62616c6c202360601b815282516000906020612e688260148601838901612821565b6c11161134b6b0b3b291101d101160991b6014928501928301528454602190600090612e9381612c7e565b60018281168015612eab5760018114612ec657612ef8565b60ff1984166021890152602183151584028901019450612ef8565b8a600052602060002060005b84811015612eed5781548a8201890152908301908801612ed2565b505060218389010194505b50507f20222c2265787465726e616c5f75726c223a202267756d62616c6c2e6767222c835250507f226465736372697074696f6e223a22557365207468697320746f6b656e20746f6020820152741031b630b4b6903cb7bab91033bab6b130b636171160591b6040820152607d60f81b6055820152605681015b98975050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c0000000000815260008251612fb681601b850160208701612821565b91909101601b0192915050565b8082018082111561069357610693612dbf565b604081526000612fe96040830185612b38565b8281036020840152612ffb8185612b38565b95945050505050565b60006001820161301657613016612dbf565b5060010190565b60ff818116838216019081111561069357610693612dbf565b60006020828403121561304857600080fd5b8151610e0781612b87565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061308d90830184612845565b979650505050505050565b6000602082840312156130aa57600080fd5b8151610e0781612707565b600060033d11156130ce5760046000803e5060005160e01c5b90565b600060443d10156130df5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561310e57505050505090565b82850191508151818111156131265750505050505090565b843d87010160208285010111156131405750505050505090565b61314f60208286010187612750565b509095945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061318d90830184612845565b9695505050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906131c390830186612b38565b82810360608401526131d58186612b38565b90508281036080840152612f72818561284556feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220ebec76e9837560c031cb5858c1729749eabdae5d8fe9a08ee1a6588f0341159864736f6c6343000818003368747470733a2f2f62726f776e2d7072656d6965722d6d6f6c6c75736b2d3531342e6d7970696e6174612e636c6f75642f697066732f516d537646426e453232593239476136556b6a6a3447364a6e6b727763755a62517467646d436868657545747632

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102475760003560e01c806370a082311161013b578063c5b8f772116100b8578063e985e9c51161007c578063e985e9c5146105b7578063f242432a146105f3578063f28ca1dd14610606578063f2fde38b1461060e578063f8b45b051461062157600080fd5b8063c5b8f7721461053d578063c87b56dd14610550578063d547cfb714610563578063dd62ed3e1461056b578063e0df5b6f146105a457600080fd5b806399a2557a116100ff57806399a2557a146104d85780639b19251a146104eb578063a014e6e21461050e578063a22cb46514610517578063a9059cbb1461052a57600080fd5b806370a082311461047b578063715018a6146104a45780638462151c146104ac5780638da5cb5b146104bf57806395d89b41146104d057600080fd5b806323b872dd116101c95780634eabf2c61161018d5780634eabf2c6146103ff57806353d6fd59146104075780635afcc2f51461041a5780635d0044ca146104415780636d6a6a4d1461045457600080fd5b806323b872dd1461036d5780632d760d57146103805780632eb2c2d614610393578063313ce567146103a65780634e1273f4146103df57600080fd5b8063095ea7b311610210578063095ea7b3146103005780630a702e8d146103135780630e89341c1461032057806318160ddd1461033357806318d217c31461035a57600080fd5b8062fdd58e1461024c57806301ffc9a71461027257806302fe53051461029557806306fdde03146102aa578063081812fc146102bf575b600080fd5b61025f61025a3660046126dd565b61062a565b6040519081526020015b60405180910390f35b61028561028036600461271d565b610699565b6040519015158152602001610269565b6102a86102a33660046127d9565b61073a565b005b6102b261074e565b6040516102699190612871565b6102e86102cd366004612884565b6005602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610269565b61028561030e3660046126dd565b6107dc565b600f546102859060ff1681565b6102b261032e366004612884565b6108af565b61025f7f00000000000000000000000000000000000000000000021e19e0c9bab240000081565b6102a86103683660046127d9565b6108ba565b61028561037b36600461289d565b6108d2565b61025f61038e3660046128d9565b610a40565b6102a86103a13660046129c5565b610a77565b6103cd7f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff9091168152602001610269565b6103f26103ed366004612a6e565b610ac4565b6040516102699190612b74565b6102a8610ba4565b6102a8610415366004612b95565b610bc0565b61025f7f0000000000000000000000000000000000000000000000000de0b6b3a764000081565b6102a861044f366004612884565b610bf3565b61025f7f0000000000000000000000000000000000000000000000000de0b6b3a764000081565b61025f610489366004612bcc565b6001600160a01b031660009081526006602052604090205490565b6102a8610c37565b6103f26104ba366004612bcc565b610c4b565b6000546001600160a01b03166102e8565b6102b2610c7e565b6103f26104e63660046128d9565b610c8b565b6102856104f9366004612bcc565b600a6020526000908152604090205460ff1681565b61025f600b5481565b6102a8610525366004612b95565b610dbd565b6102856105383660046126dd565b610dc8565b61028561054b3660046126dd565b610dd8565b6102b261055e366004612884565b610e0e565b6102b2610e5f565b61025f610579366004612be7565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205490565b6102a86105b23660046127d9565b610e6c565b6102856105c5366004612be7565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b6102a8610601366004612c1a565b610e80565b6102b2610ece565b6102a861061c366004612bcc565b610edb565b61025f600e5481565b60006001600160a01b038316610653576040516323d3ad8160e21b815260040160405180910390fd5b6001600160a01b0383166000908152600160208181526040808420600887901c85529091529091205460ff84161c161561068f57506001610693565b5060005b92915050565b60006001600160e01b03198216636cdb3d1360e11b14806106ca57506001600160e01b031982166303a24d0760e21b145b806106e557506001600160e01b031982166362dc7bb960e11b145b8061070057506380ac58cd60e01b6001600160e01b03198316145b8061071b5750635b5e139f60e01b6001600160e01b03198316145b8061069357506301ffc9a760e01b6001600160e01b0319831614610693565b610742610f16565b61074b81610f43565b50565b6008805461075b90612c7e565b80601f016020809104026020016040519081016040528092919081815260200182805461078790612c7e565b80156107d45780601f106107a9576101008083540402835291602001916107d4565b820191906000526020600020905b8154815290600101906020018083116107b757829003601f168201915b505050505081565b6000336107e860045490565b831080156107f65750600083115b1561089a576108058184610dd8565b61083257604051634b637e8f60e11b81526001600160a01b03821660048201526024015b60405180910390fd5b60008381526005602090815260409182902080546001600160a01b0319166001600160a01b038881169182179092559251868152908416917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a36108a5565b6108a5818585610f4f565b5060019392505050565b606061069382610e0e565b6108c2610f16565b600d6108ce8282612d00565b5050565b60006108dd60045490565b821015610a28576001600160a01b0384166000908152600160208181526040808420600887901c85529091529091205460ff84161c1661093b57604051634a1406b160e11b81526001600160a01b0385166004820152602401610829565b336001600160a01b0385161480159061097857506001600160a01b038416600090815260026020908152604080832033845290915290205460ff16155b801561099b57506000828152600560205260409020546001600160a01b03163314155b156109bb57604051634a1406b160e11b8152336004820152602401610829565b6109e884847f0000000000000000000000000000000000000000000000000de0b6b3a76400006000610f61565b600082815260056020908152604080832080546001600160a01b031916905580519182019052818152610a2391869186918691600191610fc7565b6108a5565b610a3384338461118f565b6108a58484846001610f61565b6000610a6f83610a508185612dd5565b6001600160a01b03871660009081526001602052604090209190611207565b949350505050565b6001600160a01b038516331480610a935750610a9385336105c5565b610ab057604051632ce44b5f60e11b815260040160405180910390fd5b610abd85858585856112aa565b5050505050565b60608151835114610ae857604051637801f4e960e01b815260040160405180910390fd5b600083516001600160401b03811115610b0357610b0361273a565b604051908082528060200260200182016040528015610b2c578160200160208202803683370190505b50905060005b8451811015610b9c57610b77858281518110610b5057610b50612de8565b6020026020010151858381518110610b6a57610b6a612de8565b602002602001015161062a565b828281518110610b8957610b89612de8565b6020908102919091010152600101610b32565b509392505050565b610bac610f16565b600f805460ff19811660ff90911615179055565b610bc8610f16565b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b610bfb610f16565b6064610c27827f00000000000000000000000000000000000000000000021e19e0c9bab2400000612dfe565b610c319190612e15565b600e5550565b610c3f610f16565b610c496000611506565b565b6060610c55611556565b600003610c7057505060408051600081526020810190915290565b610693826001600454610c8b565b6009805461075b90612c7e565b6060818310610cad57604051631960ccad60e11b815260040160405180910390fd5b6001831015610cbb57600192505b6000610cc660045490565b905080831115610cd4578092505b600083851015610cf057610ce9868686610a40565b9050610cf4565b5060005b6000816001600160401b03811115610d0e57610d0e61273a565b604051908082528060200260200182016040528015610d37578160200160208202803683370190505b506001600160a01b038816600090815260016020526040812091925087905b848114610daf57600882901c60009081526020849052604090205460ff83161c60011615610da45781848280600101935081518110610d9757610d97612de8565b6020026020010181815250505b816001019150610d56565b509198975050505050505050565b6108ce33838361156c565b6000336108a58185856001610f61565b6001600160a01b0382166000908152600160208181526040808420600886901c855290915282205460ff84161c165b9392505050565b6060610e198261164c565b600d604051602001610e2c929190612e37565b60408051601f1981840301815290829052610e4991602001612f7e565b6040516020818303038152906040529050919050565b600c805461075b90612c7e565b610e74610f16565b600c6108ce8282612d00565b6001600160a01b038516331480610e9c5750610e9c85336105c5565b15610eb557610eb085858585856001610fc7565b610abd565b604051632ce44b5f60e11b815260040160405180910390fd5b600d805461075b90612c7e565b610ee3610f16565b6001600160a01b038116610f0d57604051631e4fbdf760e01b815260006004820152602401610829565b61074b81611506565b6000546001600160a01b03163314610c495760405163118cdaa760e01b8152336004820152602401610829565b60036108ce8282612d00565b610f5c8383836001611777565b505050565b6001600160a01b038416610f8b57604051634b637e8f60e11b815260006004820152602401610829565b6001600160a01b038316610fb55760405163ec442f0560e01b815260006004820152602401610829565b610fc18484848461184c565b50505050565b6001600160a01b038516610fee57604051633a954ecd60e21b815260040160405180910390fd5b336000610ffa86611a9e565b905084600114801561103757506001600160a01b038816600090815260016020818152604080842060088b901c85529091529091205460ff88161c165b156110c6576001600160a01b03888116600090815260016020818152604080842060088c901c808652908352818520805460ff8e1686901b8019909116909155958d168552928252808420928452919052812080549092179091556110c190899089907f0000000000000000000000000000000000000000000000000de0b6b3a764000090610f61565b6110df565b6040516337dbad3d60e01b815260040160405180910390fd5b6001600160a01b038781169089168682826000805160206131ea833981519152600080a4886001600160a01b03168a6001600160a01b0316856001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628b8b60405161115b929190918252602082015260400190565b60405180910390a461116f848b8b86611ae5565b841561118357611183848b8b8b8b8b611c6c565b50505050505050505050565b6001600160a01b038381166000908152600760209081526040808320938616835292905220546000198114610fc157818110156111f857604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610829565b610fc184848484036000611777565b6000600883901c60ff84166101018482011061127d5760008281526020879052604090205461123790821c611eda565b930160ff8116939250600182019160009160081c015b80831461127b5760008381526020889052604090205461126c90611eda565b8401935082600101925061124d565b505b60008281526020879052604090205461129e90821c6101008690031b611eda565b90920195945050505050565b81518351146112cc57604051637801f4e960e01b815260040160405180910390fd5b6001600160a01b0384166112f357604051633a954ecd60e21b815260040160405180910390fd5b3360005b84518110156113da57600085828151811061131457611314612de8565b60200260200101519050600085838151811061133257611332612de8565b6020026020010151905080600114801561137757506001600160a01b0389166000908152600160208181526040808420600887901c85529091529091205460ff84161c165b156110c657506001600160a01b038881166000908152600160208181526040808420600887901c808652908352818520805460ff90981685901b80199098169055948c1684528282528084209484529390529190208054909217909155016112f7565b50611414868686517f0000000000000000000000000000000000000000000000000de0b6b3a764000061140d9190612dfe565b6000610f61565b6000806000865160016114279190612fc3565b90506001600160a01b03891691506001600160a01b0388169250602087015183836000805160206131ea833981519152600080a460025b818114611489578060200288015184846000805160206131ea833981519152600080a460010161145e565b50876001600160a01b0316896001600160a01b0316856001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8a8a6040516114d9929190612fd6565b60405180910390a46114ed848a8a8a611ae5565b6114fb848a8a8a8a8a611f8a565b505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060016004546115679190612dd5565b905090565b816001600160a01b0316836001600160a01b0316036115df5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610829565b6001600160a01b03838116600081815260026020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6060816000036116735750506040805180820190915260018152600360fc1b602082015290565b8160005b811561169d578061168781613004565b91506116969050600a83612e15565b9150611677565b6000816001600160401b038111156116b7576116b761273a565b6040519080825280601f01601f1916602001820160405280156116e1576020820181803683370190505b509050815b851561176e576116f7600182612dd5565b90506000611706600a88612e15565b61171190600a612dfe565b61171b9088612dd5565b61172690603061301d565b905060008160f81b90508084848151811061174357611743612de8565b60200101906001600160f81b031916908160001a905350611765600a89612e15565b975050506116e6565b50949350505050565b6001600160a01b0384166117a15760405163e602df0560e01b815260006004820152602401610829565b6001600160a01b0383166117cb57604051634a1406b160e11b815260006004820152602401610829565b6001600160a01b0380851660009081526007602090815260408083209387168352929052208290558015610fc157826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161183e91815260200190565b60405180910390a350505050565b6001600160a01b0384166000908152600660205260409020548281101561189f5760405163391434e360e21b81526001600160a01b03861660048201526024810182905260448101849052606401610829565b6001600160a01b0385811660008181526006602090815260408083208054899003905593881680835291849020805488019081905593518781529192916000805160206131ea833981519152910160405180910390a38215611a96576001600160a01b0386166000908152600a602052604090205460ff168061199b5760007f0000000000000000000000000000000000000000000000000de0b6b3a76400006119498786612dd5565b6119539190612e15565b61197d7f0000000000000000000000000000000000000000000000000de0b6b3a764000086612e15565b6119879190612dd5565b90508015611999576119998882612046565b505b6001600160a01b0386166000908152600a602052604090205460ff16611a9457600b5460011480156119ca5750805b80156119e357506000546001600160a01b038881169116145b15611a15576001600160a01b0386166000908152600a60205260409020805460ff191660011790556002600b55611a94565b60007f0000000000000000000000000000000000000000000000000de0b6b3a7640000611a428785612dd5565b611a4c9190612e15565b611a767f0000000000000000000000000000000000000000000000000de0b6b3a764000085612e15565b611a809190612dd5565b90508015611a92576111838782612305565b505b505b505050505050565b604080516001808252818301909252606091602080830190803683370190505090508181600081518110611ad457611ad4612de8565b602002602001018181525050919050565b6001600160a01b0382166000908152600a602052604090205460ff16611c6757600e546001600160a01b0383166000908152600660205260409020541115611b6f5760405162461bcd60e51b815260206004820152601f60248201527f5472616e736665722065786365656473206d6178696d756d2077616c6c6574006044820152606401610829565b600f5460ff1615611c6757326000908152601060205260409020544311611be45760405162461bcd60e51b8152602060048201526024808201527f4f6e6c79206f6e65207472616e736665722070657220626c6f636b20616c6c6f6044820152633bb2b21760e11b6064820152608401610829565b3260009081526010602052604090204390556001600160a01b0382163b158015611c0d5750323b155b611c675760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163742074726164696e672072657374726963746564206174206c6044820152640c2eadcc6d60db1b6064820152608401610829565b610fc1565b6001600160a01b0384163b15611a96576040516301ffc9a760e01b8152636cdb3d1360e11b60048201526001600160a01b038516906301ffc9a790602401602060405180830381865afa158015611cc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ceb9190613036565b15611df65760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611d249089908990889088908890600401613053565b6020604051808303816000875af1925050508015611d5f575060408051601f3d908101601f19168201909252611d5c91810190613098565b60015b611dbf57611d6b6130b5565b806308c379a003611da45750611d7f6130d1565b80611d8a5750611da6565b8060405162461bcd60e51b81526004016108299190612871565b505b604051639c05499b60e01b815260040160405180910390fd5b6001600160e01b0319811663f23a6e6160e01b14611df057604051639c05499b60e01b815260040160405180910390fd5b50611a96565b604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611e2890899089908890879060040161315a565b6020604051808303816000875af1925050508015611e63575060408051601f3d908101601f19168201909252611e6091810190613098565b60015b611ea957611e6f6130b5565b806308c379a003611e8e5750611e836130d1565b80611d8a5750611e90565b505b6040516368d2bf6b60e11b815260040160405180910390fd5b6001600160e01b03198116630a85bd0160e11b14611a94576040516368d2bf6b60e11b815260040160405180910390fd5b7f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f7f5555555555555555555555555555555555555555555555555555555555555555600183901c168203600281901c7f3333333333333333333333333333333333333333333333333333333333333333908116911601600481901c01167f01010101010101010101010101010101010101010101010101010101010101010260f81c6000199190911460081b1790565b6001600160a01b0384163b15611a965760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611fce9089908990889088908890600401613197565b6020604051808303816000875af1925050508015612009575060408051601f3d908101601f1916820190925261200691810190613098565b60015b61201557611d6b6130b5565b6001600160e01b0319811663bc197c8160e01b14611a9457604051639c05499b60e01b815260040160405180910390fd5b6001600160a01b03821661206d5760405163b817eee760e01b815260040160405180910390fd5b60045433906000836001600160401b0381111561208c5761208c61273a565b6040519080825280602002602001820160405280156120b5578160200160208202803683370190505b5090506000846001600160401b038111156120d2576120d261273a565b6040519080825280602002602001820160405280156120fb578160200160208202803683370190505b50905060005b858110156121ae57600183828151811061211d5761211d612de8565b6020908102919091018101919091526001600160a01b038816600090815260019091526040812061214e9086612553565b90508083838151811061216357612163612de8565b6020908102919091018101919091526001600160a01b038916600090815260018083526040808320600886901c8452909352919020805460ff841683901b1916905590945001612101565b506000806121bd876001612fc3565b90506001600160a01b038816915060208301516000836000805160206131ea833981519152600080a460025b81811461221557806020028401516000846000805160206131ea833981519152600080a46001016121e9565b508660010361229f5760006001600160a01b0316886001600160a01b0316876001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628660008151811061227157612271612de8565b60200260200101516001604051612292929190918252602082015260400190565b60405180910390a46122f8565b60006001600160a01b0316886001600160a01b0316876001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86886040516122ef929190612fd6565b60405180910390a45b611a928689600086611ae5565b6060806001600160a01b03841661232e57604051622e076360e81b815260040160405180910390fd5b8260000361234f5760405163b562e8dd60e01b815260040160405180910390fd5b33836001600160401b038111156123685761236861273a565b604051908082528060200260200182016040528015612391578160200160208202803683370190505b509250836001600160401b038111156123ac576123ac61273a565b6040519080825280602002602001820160405280156123d5578160200160208202803683370190505b50915060006123e360045490565b905080856000190310156123f657600080fd5b60005b858110156124495780820185828151811061241657612416612de8565b602002602001018181525050600184828151811061243657612436612de8565b60209081029190910101526001016123f9565b506001600160a01b038616600090815260016020526040902061246d908287612644565b846004600082825461247f9190612fc3565b9091555060009050806124928784612fc3565b90506001600160a01b0388169150828260006000805160206131ea833981519152600080a4600183015b8181146124e257808360006000805160206131ea833981519152600080a46001016124bc565b50876001600160a01b031660006001600160a01b0316856001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8989604051612533929190612fd6565b60405180910390a46125488460008a89611ae5565b505050509250929050565b600881901c600081815260208490526040902054600019919060ff84191690811b901c81158117612596575b50810160008181526040902054811581171561257f575b801561263c5761262c817f0706060506020504060203020504030106050205030304010505030400000000601f6f8421084210842108cc6318c6db6d54be831560081b6fffffffffffffffffffffffffffffffff851160071b1784811c6001600160401b031060061b1784811c63ffffffff1060051b1784811c61ffff1060041b1784811c60ff1060031b1793841c1c161a1790565b600883901b178481116000031792505b505092915050565b60001960ff8316846020528360081c600052610101838201106126a6576000805160408220805485851b1790559390910160ff811693600181019160081c015b8082146126a1578160005283604060002055600182019150612684565b506000525b60406000208284610100031c821b8154178155505050505050565b80356001600160a01b03811681146126d857600080fd5b919050565b600080604083850312156126f057600080fd5b6126f9836126c1565b946020939093013593505050565b6001600160e01b03198116811461074b57600080fd5b60006020828403121561272f57600080fd5b8135610e0781612707565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156127755761277561273a565b6040525050565b60006001600160401b038311156127955761279561273a565b6040516127ac601f8501601f191660200182612750565b8091508381528484840111156127c157600080fd5b83836020830137600060208583010152509392505050565b6000602082840312156127eb57600080fd5b81356001600160401b0381111561280157600080fd5b8201601f8101841361281257600080fd5b610a6f8482356020840161277c565b60005b8381101561283c578181015183820152602001612824565b50506000910152565b6000815180845261285d816020860160208601612821565b601f01601f19169290920160200192915050565b602081526000610e076020830184612845565b60006020828403121561289657600080fd5b5035919050565b6000806000606084860312156128b257600080fd5b6128bb846126c1565b92506128c9602085016126c1565b9150604084013590509250925092565b6000806000606084860312156128ee57600080fd5b6128f7846126c1565b95602085013595506040909401359392505050565b60006001600160401b038211156129255761292561273a565b5060051b60200190565b600082601f83011261294057600080fd5b8135602061294d8261290c565b60405161295a8282612750565b80915083815260208101915060208460051b87010193508684111561297e57600080fd5b602086015b8481101561299a5780358352918301918301612983565b509695505050505050565b600082601f8301126129b657600080fd5b610e078383356020850161277c565b600080600080600060a086880312156129dd57600080fd5b6129e6866126c1565b94506129f4602087016126c1565b935060408601356001600160401b0380821115612a1057600080fd5b612a1c89838a0161292f565b94506060880135915080821115612a3257600080fd5b612a3e89838a0161292f565b93506080880135915080821115612a5457600080fd5b50612a61888289016129a5565b9150509295509295909350565b60008060408385031215612a8157600080fd5b82356001600160401b0380821115612a9857600080fd5b818501915085601f830112612aac57600080fd5b81356020612ab98261290c565b604051612ac68282612750565b83815260059390931b8501820192828101915089841115612ae657600080fd5b948201945b83861015612b0b57612afc866126c1565b82529482019490820190612aeb565b96505086013592505080821115612b2157600080fd5b50612b2e8582860161292f565b9150509250929050565b60008151808452602080850194506020840160005b83811015612b6957815187529582019590820190600101612b4d565b509495945050505050565b602081526000610e076020830184612b38565b801515811461074b57600080fd5b60008060408385031215612ba857600080fd5b612bb1836126c1565b91506020830135612bc181612b87565b809150509250929050565b600060208284031215612bde57600080fd5b610e07826126c1565b60008060408385031215612bfa57600080fd5b612c03836126c1565b9150612c11602084016126c1565b90509250929050565b600080600080600060a08688031215612c3257600080fd5b612c3b866126c1565b9450612c49602087016126c1565b9350604086013592506060860135915060808601356001600160401b03811115612c7257600080fd5b612a61888289016129a5565b600181811c90821680612c9257607f821691505b602082108103612cb257634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610f5c576000816000526020600020601f850160051c81016020861015612ce15750805b601f850160051c820191505b81811015611a9657828155600101612ced565b81516001600160401b03811115612d1957612d1961273a565b612d2d81612d278454612c7e565b84612cb8565b602080601f831160018114612d625760008415612d4a5750858301515b600019600386901b1c1916600185901b178555611a96565b600085815260208120601f198616915b82811015612d9157888601518255948401946001909101908401612d72565b5085821015612daf5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b8181038181111561069357610693612dbf565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761069357610693612dbf565b600082612e3257634e487b7160e01b600052601260045260246000fd5b500490565b737b20226e616d65223a202247756d62616c6c202360601b815282516000906020612e688260148601838901612821565b6c11161134b6b0b3b291101d101160991b6014928501928301528454602190600090612e9381612c7e565b60018281168015612eab5760018114612ec657612ef8565b60ff1984166021890152602183151584028901019450612ef8565b8a600052602060002060005b84811015612eed5781548a8201890152908301908801612ed2565b505060218389010194505b50507f20222c2265787465726e616c5f75726c223a202267756d62616c6c2e6767222c835250507f226465736372697074696f6e223a22557365207468697320746f6b656e20746f6020820152741031b630b4b6903cb7bab91033bab6b130b636171160591b6040820152607d60f81b6055820152605681015b98975050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c0000000000815260008251612fb681601b850160208701612821565b91909101601b0192915050565b8082018082111561069357610693612dbf565b604081526000612fe96040830185612b38565b8281036020840152612ffb8185612b38565b95945050505050565b60006001820161301657613016612dbf565b5060010190565b60ff818116838216019081111561069357610693612dbf565b60006020828403121561304857600080fd5b8151610e0781612b87565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061308d90830184612845565b979650505050505050565b6000602082840312156130aa57600080fd5b8151610e0781612707565b600060033d11156130ce5760046000803e5060005160e01c5b90565b600060443d10156130df5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561310e57505050505090565b82850191508151818111156131265750505050505090565b843d87010160208285010111156131405750505050505090565b61314f60208286010187612750565b509095945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061318d90830184612845565b9695505050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906131c390830186612b38565b82810360608401526131d58186612b38565b90508281036080840152612f72818561284556feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220ebec76e9837560c031cb5858c1729749eabdae5d8fe9a08ee1a6588f0341159864736f6c63430008180033

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.