ETH Price: $3,389.24 (-2.64%)
Gas: 1 Gwei

Token

MPL (MPL)
 

Overview

Max Total Supply

10,000 MPL

Holders

2,248

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
Blur: Blend
Balance
1 MPL
0x29469395eaf6f95920e59f858042f0e28d98a20b
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

The Martian Premier League is a collection of 10,000 unique human and Martian characters living on the Ethereum blockchain.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
MPL

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 20 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 2 of 20 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 3 of 20 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 4 of 20 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 5 of 20 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

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

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

File 6 of 20 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 9 of 20 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 12 of 20 : ReentrancyGuard.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Gas optimized reentrancy protection for smart contracts.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/ReentrancyGuard.sol)
/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol)
abstract contract ReentrancyGuard {
    uint256 private reentrancyStatus = 1;

    modifier nonReentrant() {
        require(reentrancyStatus == 1, "REENTRANCY");

        reentrancyStatus = 2;

        _;

        reentrancyStatus = 1;
    }
}

File 13 of 20 : BatchOffsets.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;


/// @title Batch Offsets
/// @author Adam Fuller (@azf20)
/// Randomly shuffles IDs in batches, given an overall token limit
/// Requirements: batchSize() divides perfectly into limit(), tokenIds start at 0
contract BatchOffsets {

  error BatchNotRevealed();
  event BatchRevealed(uint256 batch, uint256 batchSize, uint256 within, uint256 overall);

  // counter of revealed batches
  uint256 public revealedBatches;

  // tracking the number of tokens in a batch
  uint256 internal _batchSize;

  function batchSize() public view virtual returns (uint256) {
    return _batchSize;
  }

  // limit function, to be overriden by the importing contract
  function limit() public view virtual returns (uint256) {
    return 0;
  }

  // structure for an individual batch offset
  struct BatchOffset {
    uint256 seed; // the random number used to generate the offsets
    uint256 within; // the offset of tokens within the batch
    uint256 overall; // the offset of the batch overall, relative to other batches
  }

  // batches start at 1
  mapping(uint256 => BatchOffset) public offsets;
  mapping(uint256 => bool) private takenOffsets;


  // Storing the offsets which are taken in a packed array of booleans
  mapping(uint256 => uint256) public takenBitMap;

  /// @notice Internal function to set an index as taken
  /// @param index the index
  function _setTaken(uint256 index) private {
      uint256 takenWordIndex = index / 256;
      uint256 takenBitIndex = index % 256;
      takenBitMap[takenWordIndex] = takenBitMap[takenWordIndex] | (1 << takenBitIndex);
  }

  // set the batch offset for a batch, given a random number
  function _setBatchOffset(uint256 _batch, uint256 random) internal {

    // get an offset for within this batch
    BatchOffset memory newBatchOffset;
    newBatchOffset.seed = random;
    newBatchOffset.within = random % batchSize();

    // get an initial overall offset, out of the remaining slots
    uint256 range = ((limit() / batchSize()) - revealedBatches);
    random >>= 16;
    uint256 overall = random % range;

    // create an array to populate with the remaining available offsets
    uint256[] memory offsetOptions = new uint256[](range);
    uint256 counter;
    uint256 word;

    // fetch the first word from the packed booleans (makes it closer to O(1))
    uint256 takenWord = takenBitMap[word];

    // check which offsets are already taken from the full range
    for(uint256 j=0; j<(limit() / batchSize()); j++) {
      // if the offset is beyond the range of the current word, fetch the next word
      if ((j / 256) > word) {
        takenWord = takenBitMap[j / 256];
      }
      // check if a given offset is taken. If it is not, add it to the array of options
      uint256 takenBitIndex = j % 256;
      uint256 mask = (1 << takenBitIndex);
      if(takenWord & mask != mask) {
        offsetOptions[counter] = j;
        counter += 1;
      }
    }
    // the offset uses the initial offset to pick from the remaining available offsets
    newBatchOffset.overall = offsetOptions[overall];

    // set the selected offset as taken, and save the batch offset and increase the revealedBatches counter
    _setTaken(newBatchOffset.overall);
    offsets[_batch] = newBatchOffset;
    revealedBatches += 1;
    emit BatchRevealed(_batch, batchSize(), newBatchOffset.within, newBatchOffset.overall);
  }

  // helper to work out which batch an ID is from
  function idToBatch(uint256 id) public view returns (uint256) {
    return ((id) / batchSize()) + 1;
  }

  // get the shuffled ID, based on its batch's offsets
  function getShuffledId(uint256 id) public virtual view returns (uint256) {
    uint256 _batch = idToBatch(id);
    if(offsets[_batch].seed == 0) revert BatchNotRevealed();
    BatchOffset memory _offset = offsets[_batch];
    uint256 within = (((id) % batchSize()) + _offset.within) % batchSize();
    return (within * (limit() / batchSize())) + _offset.overall
    ;
  }

}

File 14 of 20 : ERC2981Base.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

import './IERC2981Royalties.sol';

/// @dev This is a contract used to add ERC2981 support to ERC721 and 1155
abstract contract ERC2981Base is ERC165, IERC2981Royalties {
    struct RoyaltyInfo {
        address recipient;
        uint24 amount;
    }

    /// @inheritdoc	ERC165
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceId == type(IERC2981Royalties).interfaceId ||
            super.supportsInterface(interfaceId);
    }
}

File 15 of 20 : ERC2981ContractWideRoyalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

import './ERC2981Base.sol';

/// @dev This is a contract used to add ERC2981 support to ERC721 and 1155
/// @dev This implementation has the same royalties for each and every tokens
abstract contract ERC2981ContractWideRoyalties is ERC2981Base {
    RoyaltyInfo private _royalties;

    /// @dev Sets token royalties
    /// @param recipient recipient of the royalties
    /// @param value percentage (using 2 decimals - 10000 = 100, 0 = 0)
    function _setRoyalties(address recipient, uint256 value) internal {
        require(value <= 10000, 'ERC2981Royalties: Too high');
        _royalties = RoyaltyInfo(recipient, uint24(value));
    }

    /// @inheritdoc	IERC2981Royalties
    function royaltyInfo(uint256, uint256 value)
        external
        view
        override
        returns (address receiver, uint256 royaltyAmount)
    {
        RoyaltyInfo memory royalties = _royalties;
        receiver = royalties.recipient;
        royaltyAmount = (value * royalties.amount) / 10000;
    }
}

File 16 of 20 : IERC2981Royalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title IERC2981Royalties
/// @dev Interface for the ERC2981 - Token Royalty standard
interface IERC2981Royalties {
    /// @notice Called with the sale price to determine how much royalty
    //          is owed and to whom.
    /// @param _tokenId - the NFT asset queried for royalty information
    /// @param _value - the sale price of the NFT asset specified by _tokenId
    /// @return _receiver - address of who should be sent the royalty payment
    /// @return _royaltyAmount - the royalty payment amount for value sale price
    function royaltyInfo(uint256 _tokenId, uint256 _value)
        external
        view
        returns (address _receiver, uint256 _royaltyAmount);
}

File 17 of 20 : MPL.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import "@openzeppelin/contracts/utils/Strings.sol";
import "@rari-capital/solmate/src/utils/ReentrancyGuard.sol";
import "erc721a/contracts/ERC721A.sol";
import "./SignedAllowance.sol";
import "./MultisigOwnable.sol";
import "./BatchOffsets.sol";
import './ERC2981ContractWideRoyalties.sol';

/*
'##::::'##:'########::'##:::::::
 ###::'###: ##.... ##: ##:::::::
 ####'####: ##:::: ##: ##:::::::
 ## ### ##: ########:: ##:::::::
 ##. #: ##: ##.....::: ##:::::::
 ##:.:: ##: ##:::::::: ##:::::::
 ##:::: ##: ##:::::::: ########:
..:::::..::..:::::::::........::
*/

/// @title Martian Premier League
contract MPL is ERC721A, BatchOffsets, SignedAllowance, ReentrancyGuard, MultisigOwnable, ERC2981ContractWideRoyalties {

  using Strings for uint256;

  // Custom errors
  error OverMintLimit();
  error AllMinted();
  error InsufficientValue();
  error InvalidRecipient();
  error TokenDoesNotExist();
  error PublicSaleNotStarted();
  error MarsListInactive();
  error AlreadyClaimed();
  error SenderNotTxOrigin();
  error BatchNotMinted();
  error NonSequentialBatch();
  error LimitBatchMismatch();
  error OnlyOneCallPerBlockForNonEOA();
  error ContractIsFrozen();
  error NotUsingBatches();

  // events to help with indexing
  event LimitUpdated(uint256 newLimit);
  event BaseURIUpdated(string newBaseURI);
  event SuffixUpdated(string newSuffix);
  event PreRevealURIUpdated(string newPreRevealURI);
  event MaxQuantityUpdated(uint256 newMaxQuantity);
  event PriceUpdated(uint256 newPrice);
  event FundsWithdrawn(uint256 amount);
  event PublicSaleUpdated(bool newValue);
  event MarsListUpdated(bool newValue);
  event BatchSizeUpdated(uint256 newBatchSize);
  event Frozen();
  event FancyMathUpdated();
  event RoyaltiesUpdated(uint256 value);

  /*///////////////////////////////////////////////////////////////
                            Settings
  //////////////////////////////////////////////////////////////*/

  // tracking internal variables
  uint256 private _limit;
  uint256 private _revealedBatch;

  // max quantity that can be minted per mint()
  uint256 public maxQuantity;

  // price per character
  uint256 public price;

  // tokens reserved for the MPL team
  uint256 public ownerLimit;
  uint256 public ownerCount;

  // sale state variables
  bool public publicSale;
  bool public marsList;

  // metadata configuration
  string public baseURI;
  string public preRevealURI;
  string private _suffix = ".json";
  bool public frozen;
  bool public useFancyMath = true;

  // minimum index
  uint256 public minimumIndex;

  // tracking last calls from smart contracts minting, to prevent multi-minting
  mapping(address => uint256) public lastCallFrom;

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

  struct InitialConfiguration {
      address owner;
      uint256 limit;
      uint256 maxQuantity;
      uint256 ownerLimit;
      uint256 price;
      string baseURI;
      string preRevealURI;
      uint256 revealBatchSize;
      uint256 royaltyValue;
  }

  /// @param config initial configuration for the MPL
  constructor(InitialConfiguration memory config) ERC721A("MPL", "MPL") {
      setBatchSize(config.revealBatchSize);
      setLimit(config.limit);
      setMaxQuantity(config.maxQuantity);
      ownerLimit = config.ownerLimit;
      setPrice(config.price);
      setBaseURI(config.baseURI);
      setPreRevealURI(config.preRevealURI);
      setRoyalties(config.royaltyValue);
      transferOwnership(config.owner);
      transferRealOwnership(config.owner);
  }

  /*///////////////////////////////////////////////////////////////
                        View functions
  //////////////////////////////////////////////////////////////*/

  /// @notice returns the maximum number of tokens available to mint
  /// @return limit the limit
  function limit() public view override returns (uint256) {
    return _limit;
  }

  /// @notice get the shuffled final character ID for a given token (once revealed)
  /// @param id tokenId
  /// @return the shuffled character ID
  function getShuffledId(uint256 id) public view override returns (uint256) {
    if(!useFancyMath) revert NotUsingBatches();
    if(ownerOf(id) == address(0)) revert TokenDoesNotExist();
    return BatchOffsets.getShuffledId(id);
  }

  /// @notice Returns the URI for a given token's metadata
  /// @param id the token ID of interest
  /// @return the URI for this token
  function tokenURI(uint256 id) public view override returns (string memory) {
      if(ownerOf(id) == address(0)) revert TokenDoesNotExist();
      if(!useFancyMath) {
        return string(abi.encodePacked(baseURI,id.toString(),_suffix));
      }
      if(idToBatch(id) > _revealedBatch) return preRevealURI;
      uint256 offsetId = getShuffledId(id);
      return string(abi.encodePacked(baseURI,offsetId.toString(),_suffix));
  }


  /// @notice Helper to know allowancesSigner address
  /// @return the allowance signer address
  function allowancesSigner() public view override returns (address) {
      return owner();
  }

  struct Configuration {
      uint256 limit;
      uint256 totalSupply;
      uint256 maxQuantity;
      uint256 price;
      string baseURI;
      bool marsList;
      bool publicSale;
  }

  /// @notice helper to fetch a lot of useful data in a single call
  /// @return the overall configuration
  function configuration() public view returns (Configuration memory) {
      Configuration memory config;
      config.limit = limit();
      config.totalSupply = totalSupply();
      config.maxQuantity = maxQuantity;
      config.price = price;
      config.baseURI = baseURI;
      config.marsList = marsList;
      config.publicSale = publicSale;
      return config;
  }

  /// @inheritdoc	ERC165
  function supportsInterface(bytes4 interfaceId)
      public
      view
      virtual
      override(ERC721A, ERC2981Base)
      returns (bool)
  {
      return super.supportsInterface(interfaceId);
  }

  /*///////////////////////////////////////////////////////////////
                        Updating settings
  //////////////////////////////////////////////////////////////*/

  /// @notice modifier to check if the contract metadata has been frozen
  modifier notFrozen() {
      if(frozen) revert ContractIsFrozen();
      _;
  }

  /// @notice owner only function to freeze the metadata
  function setFrozen() public onlyRealOwner notFrozen {
      emit Frozen();
      frozen = true;
  }

  /// @notice owner only function to toggle if we are using offsets for token IDs
  function setUseFancyMath() public onlyRealOwner notFrozen {
      emit FancyMathUpdated();
      useFancyMath = !useFancyMath;
  }

  /// @notice owner only function to update the metadata suffix
  /// @param newSuffix new suffix
  function setSuffix(string memory newSuffix) public onlyRealOwner notFrozen {
      emit SuffixUpdated(newSuffix);
      _suffix = newSuffix;
  }

  /// @notice owner only function to update the baseURI
  /// @param newBaseURI the new BaseURI
  function setBaseURI(string memory newBaseURI) public onlyRealOwner notFrozen {
      emit BaseURIUpdated(newBaseURI);
      baseURI = newBaseURI;
  }

  /// @notice owner only function to update the preRevealURI
  /// @param newPreRevealURI the new preRevealURI
  function setPreRevealURI(string memory newPreRevealURI) public onlyRealOwner {
      emit PreRevealURIUpdated(newPreRevealURI);
      preRevealURI = newPreRevealURI;
  }

  /// @notice owner only function to update the limit (not available once hit)
  /// batch reveal must divide cleanly into it
  /// @param newLimit the new Limit
  function setLimit(uint256 newLimit) public onlyRealOwner {
      if(totalSupply() == limit() && totalSupply() > 0) revert AllMinted();
      if(newLimit % batchSize() != 0) revert LimitBatchMismatch();
      emit LimitUpdated(newLimit);
      _limit = newLimit;
  }

  /// @notice owner only function to update the batch size for token reveals
  /// batch reveal must divide cleanly into the limit
  /// @param newBatchSize the new batch size
  function setBatchSize(uint256 newBatchSize) public onlyRealOwner {
      if(!useFancyMath) revert NotUsingBatches();
      if(totalSupply() == limit() && totalSupply() > 0) revert AllMinted();
      if(limit() % newBatchSize != 0) revert LimitBatchMismatch();
      emit BatchSizeUpdated(newBatchSize);
      _batchSize = newBatchSize;
  }

  /// @notice owner only function to update the max quantity per mint
  /// @param newMaxQuantity the new max quantity
  function setMaxQuantity(uint256 newMaxQuantity) public onlyRealOwner {
      emit MaxQuantityUpdated(newMaxQuantity);
      maxQuantity = newMaxQuantity;
  }

  /// @notice owner only function to update the price per mint
  /// @param newPrice the new price
  function setPrice(uint256 newPrice) public onlyRealOwner {
      emit PriceUpdated(newPrice);
      price = newPrice;
  }

  /// @notice owner only function to activate or deactivate the public sale
  function setPublicSale() public onlyRealOwner {
      emit PublicSaleUpdated(!publicSale);
      publicSale = !publicSale;
  }

  /// @notice owner only function to activate or deactivate the Mars list
  function setMarsList() public onlyRealOwner {
      emit MarsListUpdated(!marsList);
      marsList = !marsList;
  }

  /// @notice owner only function to set the minimum Mars List index supported
  /// @param newMinimumIndex the newMinimumIndex
  function setMinimumIndex(uint256 newMinimumIndex) public onlyRealOwner {
      minimumIndex = newMinimumIndex;
  }

  /// @notice Allows to set the royalties on the contract
  /// @param value royalties value (between 0 and 10000)
  function setRoyalties(uint256 value) public onlyRealOwner {
      emit RoyaltiesUpdated(value);
      _setRoyalties(realOwner, value);
  }

  /*///////////////////////////////////////////////////////////////
                      Updating Batches
  //////////////////////////////////////////////////////////////*/

  /// @notice simple predictable generator of randomness based on on-chain data, given a seed
  function _getPredictableRandom(uint256 _seed) internal view returns (uint256){
    return uint256(keccak256(abi.encodePacked( blockhash(block.number-1), _seed, msg.sender, address(this) )));
  }

  /// @notice set the random offsets for a batch of batchSize() tokens
  /// @param _batch the batch to reveal
  function setBatchOffset(uint256 _batch) public onlyRealOwner {
    if(!useFancyMath) revert NotUsingBatches();
    if(totalSupply() < batchSize() * _batch && totalSupply() < limit()) revert BatchNotMinted();
    if(_batch != (_revealedBatch + 1)) revert NonSequentialBatch();
    _revealedBatch = _batch;
    _setBatchOffset(_batch, _getPredictableRandom(_batch));
    }

  /*///////////////////////////////////////////////////////////////
                      Withdrawing proceeds
  //////////////////////////////////////////////////////////////*/

  /// @notice only owner function to withdraw funds
  function withdrawFunds() public onlyRealOwner {
      uint amount = address(this).balance;
      (bool success,) = msg.sender.call{value: amount}("");
      require(success, "Failed");
      emit FundsWithdrawn(amount);
  }

  /*///////////////////////////////////////////////////////////////
                          MINT LOGIC
  //////////////////////////////////////////////////////////////*/

  /// @notice internal only function to batch mint tokens
  /// @param to address to receive the tokens
  /// @param quantity number of tokens to mint
  function _batchMint(address to, uint256 quantity) internal virtual {
      if(quantity > (limit() - totalSupply()) || (quantity > maxQuantity && msg.sender != realOwner) || quantity == 0) revert OverMintLimit();
      _safeMint(to, quantity);
  }

  /// @notice public mint function, for public sale
  /// @param quantity number of tokens to mint
  function mint(uint256 quantity) public payable nonReentrant {
      if(!publicSale) revert PublicSaleNotStarted();
      if(msg.value < (price * quantity)) revert InsufficientValue();

      // hat tip to @dieverdump https://twitter.com/dievardump/status/1486111678550974464
      if (msg.sender != tx.origin) {
        if (lastCallFrom[tx.origin] == block.number) {
          revert OnlyOneCallPerBlockForNonEOA();
        }
        lastCallFrom[tx.origin] = block.number;
      }
      _batchMint(msg.sender, quantity);
  }

  /// @notice function to batch mint tokens with an owner signature
  /// @param quantity number of tokens to mint
  /// @param index the index of the Mars List spot
  /// @param signature owner signed message
  function mintWithSignature(uint256 quantity, uint256 index, bytes memory signature) public payable {
      if(!marsList || index < minimumIndex) revert MarsListInactive();
      if(msg.value < (price * quantity)) revert InsufficientValue();
      _useAllowance(index, signature);
      _batchMint(msg.sender, quantity);
  }

  /// @notice only owner function to mint based on the ownerLimit
  /// @param quantity number of tokens to mint
  function ownerMint(uint256 quantity) public onlyRealOwner {
      if(ownerCount + quantity > ownerLimit) revert OverMintLimit();
      ownerCount = ownerCount + quantity;
      _batchMint(msg.sender, quantity);
  }

}

File 18 of 20 : MultisigOwnable.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";

/*
Source: https://github.com/0xngmi/tubbies/blob/master/contracts/MultisigOwnable.sol
Opensea only allows EOAs to make changes to collections,
which makes it impossible to use multisigs to secure these NFT contracts
since when you want to make changes you need to transfer ownership to an EOA, who can rug.

This contract establishes a second owner that can change the EOA owner,
this way a multisig can give ownership to an EOA and later claim it back.
*/
abstract contract MultisigOwnable is Ownable {
    address public realOwner;

    event RealOwnershipTransferred(address oldRealOwner, address newRealOwner);

    constructor() {
        realOwner = msg.sender;
    }

    modifier onlyRealOwner() {
        require(realOwner == msg.sender, "MultisigOwnable: caller is not the real owner");
        _;
    }

    function transferRealOwnership(address newRealOwner) public onlyRealOwner {
        emit RealOwnershipTransferred(realOwner, newRealOwner);
        realOwner = newRealOwner;
    }

    function transferOwnership(address newOwner) public override onlyRealOwner {
        _transferOwnership(newOwner);
    }
}

File 19 of 20 : SignedAllowance.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';

/// @title SignedAllowance with claimedBitMap
/// @author Simon Fremaux (@dievardump) / Adam Fuller (@azf20)
/// Original: https://github.com/dievardump/signed-minting/blob/main/contracts/SignedAllowance.sol
contract SignedAllowance {
    using ECDSA for bytes32;

    // event to track claims
    event Claimed(uint256 index, address account);

    // This is a packed array of booleans to track claims
    mapping(uint256 => uint256) public claimedBitMap;

    /// @notice Helper to check if an index has been claimed
    /// @param index the index
    function isClaimed(uint256 index) public view returns (bool) {
        uint256 claimedWordIndex = index / 256;
        uint256 claimedBitIndex = index % 256;
        uint256 claimedWord = claimedBitMap[claimedWordIndex];
        uint256 mask = (1 << claimedBitIndex);
        return claimedWord & mask == mask;
    }

    /// @notice Internal function to set an index as claimed
    /// @param index the index
    function _setClaimed(uint256 index) private {
        uint256 claimedWordIndex = index / 256;
        uint256 claimedBitIndex = index % 256;
        claimedBitMap[claimedWordIndex] = claimedBitMap[claimedWordIndex] | (1 << claimedBitIndex);
    }

    // address used to sign the allowances
    address private _allowancesSigner;

    /// @notice Helper to know allowancesSigner address
    /// @return the allowance signer address
    function allowancesSigner() public view virtual returns (address) {
        return _allowancesSigner;
    }

    /// @notice Helper that creates the message that signer needs to sign to allow a mint
    ///         this is usually also used when creating the allowances, to ensure "message"
    ///         is the same
    /// @param account the account to allow
    /// @param index the index
    /// @return the message to sign
    function createMessage(address account, uint256 index)
        public
        view
        returns (bytes32)
    {
        return keccak256(abi.encode(account, index, address(this)));
    }

    /// @notice Helper that creates a list of messages that signer needs to sign to allow mintings
    /// @param accounts the accounts to allow
    /// @param indexes the corresponding indexes
    /// @return messages the messages to sign
    function createMessages(address[] memory accounts, uint256[] memory indexes)
        external
        view
        returns (bytes32[] memory messages)
    {
        require(accounts.length == indexes.length, '!LENGTH_MISMATCH!');
        messages = new bytes32[](accounts.length);
        for (uint256 i; i < accounts.length; i++) {
            messages[i] = createMessage(accounts[i], indexes[i]);
        }
    }

    /// @notice This function verifies that the current request is valid
    /// @dev It ensures that _allowancesSigner signed a message containing (account, index, address(this))
    ///      and that this message was not already used
    /// @param account the account the allowance is associated to
    /// @param index the index associated to this allowance
    /// @param signature the signature by the allowance signer wallet
    /// @return the message to mark as used
    function validateSignature(
        address account,
        uint256 index,
        bytes memory signature
    ) public view returns (bytes32) {
        return
            _validateSignature(account, index, signature, allowancesSigner());
    }

    /// @dev It ensures that signer signed a message containing (account, index, address(this))
    ///      and that this message was not already used
    /// @param account the account the allowance is associated to
    /// @param index the index associated to this allowance
    /// @param signature the signature by the allowance signer wallet
    /// @param signer the signer
    /// @return the message to mark as used
    function _validateSignature(
        address account,
        uint256 index,
        bytes memory signature,
        address signer
    ) internal view returns (bytes32) {
        bytes32 message = createMessage(account, index)
            .toEthSignedMessageHash();

        // verifies that the sha3(account, index, address(this)) has been signed by signer
        require(message.recover(signature) == signer, '!INVALID_SIGNATURE!');

        // verifies that the allowances was not already used
        require(isClaimed(index) == false, '!ALREADY_USED!');

        return message;
    }

    /// @notice internal function that verifies an allowance and marks it as used
    ///         this function throws if signature is wrong or this index for this user has already been used
    /// @param index the index
    /// @param signature the signature by the allowance wallet
    function _useAllowance(
        uint256 index,
        bytes memory signature
    ) internal {
        validateSignature(msg.sender, index, signature);
        _setClaimed(index);
    }

    /// @notice Allows to change the allowance signer. This can be used to revoke any signed allowance not already used
    /// @param newSigner the new signer address
    function _setAllowancesSigner(address newSigner) internal {
        _allowancesSigner = newSigner;
    }
}

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

pragma solidity ^0.8.4;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error ApproveToCaller();
error ApprovalToCurrentOwner();
error BalanceQueryForZeroAddress();
error MintedQueryForZeroAddress();
error BurnedQueryForZeroAddress();
error AuxQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerIndexOutOfBounds();
error OwnerQueryForNonexistentToken();
error TokenIndexOutOfBounds();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error URIQueryForNonexistentToken();

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Compiler will pack this into a single 256bit word.
    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
        // For miscellaneous variable(s) pertaining to the address
        // (e.g. number of whitelist mint slots used).
        // If there are multiple variables, please pack them into a uint64.
        uint64 aux;
    }

    // The tokenId of the next token to be minted.
    uint256 internal _currentIndex;

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

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

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

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

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

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
     */
    function totalSupply() public view returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than _currentIndex - _startTokenId() times
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

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

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return uint256(_addressData[owner].balance);
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        if (owner == address(0)) revert MintedQueryForZeroAddress();
        return uint256(_addressData[owner].numberMinted);
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        if (owner == address(0)) revert BurnedQueryForZeroAddress();
        return uint256(_addressData[owner].numberBurned);
    }

    /**
     * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        if (owner == address(0)) revert AuxQueryForZeroAddress();
        return _addressData[owner].aux;
    }

    /**
     * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        if (owner == address(0)) revert AuxQueryForZeroAddress();
        _addressData[owner].aux = aux;
    }

    /**
     * Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around in the collection over time.
     */
    function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr && curr < _currentIndex) {
                TokenOwnership memory ownership = _ownerships[curr];
                if (!ownership.burned) {
                    if (ownership.addr != address(0)) {
                        return ownership;
                    }
                    // Invariant:
                    // There will always be an ownership that has an address and is not burned
                    // before an ownership that does not have an address and is not burned.
                    // Hence, curr will not underflow.
                    while (true) {
                        curr--;
                        ownership = _ownerships[curr];
                        if (ownership.addr != address(0)) {
                            return ownership;
                        }
                    }
                }
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return ownershipOf(tokenId).addr;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

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

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

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public override {
        address owner = ERC721A.ownerOf(tokenId);
        if (to == owner) revert ApprovalToCurrentOwner();

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

        _approve(to, tokenId, owner);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public override {
        if (operator == _msgSender()) revert ApproveToCaller();

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        _transfer(from, to, tokenId);
        if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) {
            revert TransferToNonERC721ReceiverImplementer();
        }
    }

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

    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, '');
    }

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

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

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

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            if (safe && to.isContract()) {
                do {
                    emit Transfer(address(0), to, updatedIndex);
                    if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (updatedIndex != end);
                // Reentrancy protection
                if (_currentIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex != end);
            }
            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) private {
        TokenOwnership memory prevOwnership = ownershipOf(tokenId);

        bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
            isApprovedForAll(prevOwnership.addr, _msgSender()) ||
            getApproved(tokenId) == _msgSender());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();
        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId, prevOwnership.addr);

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

            _ownerships[tokenId].addr = to;
            _ownerships[tokenId].startTimestamp = uint64(block.timestamp);

            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            if (_ownerships[nextTokenId].addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId < _currentIndex) {
                    _ownerships[nextTokenId].addr = prevOwnership.addr;
                    _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

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

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

        _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId, prevOwnership.addr);

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            _addressData[prevOwnership.addr].balance -= 1;
            _addressData[prevOwnership.addr].numberBurned += 1;

            // Keep track of who burned the token, and the timestamp of burning.
            _ownerships[tokenId].addr = prevOwnership.addr;
            _ownerships[tokenId].startTimestamp = uint64(block.timestamp);
            _ownerships[tokenId].burned = true;

            // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            if (_ownerships[nextTokenId].addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId < _currentIndex) {
                    _ownerships[nextTokenId].addr = prevOwnership.addr;
                    _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(prevOwnership.addr, address(0), tokenId);
        _afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1);

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

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(
        address to,
        uint256 tokenId,
        address owner
    ) private {
        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"limit","type":"uint256"},{"internalType":"uint256","name":"maxQuantity","type":"uint256"},{"internalType":"uint256","name":"ownerLimit","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"string","name":"preRevealURI","type":"string"},{"internalType":"uint256","name":"revealBatchSize","type":"uint256"},{"internalType":"uint256","name":"royaltyValue","type":"uint256"}],"internalType":"struct MPL.InitialConfiguration","name":"config","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AllMinted","type":"error"},{"inputs":[],"name":"AlreadyClaimed","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"BatchNotMinted","type":"error"},{"inputs":[],"name":"BatchNotRevealed","type":"error"},{"inputs":[],"name":"ContractIsFrozen","type":"error"},{"inputs":[],"name":"InsufficientValue","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"LimitBatchMismatch","type":"error"},{"inputs":[],"name":"MarsListInactive","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NonSequentialBatch","type":"error"},{"inputs":[],"name":"NotUsingBatches","type":"error"},{"inputs":[],"name":"OnlyOneCallPerBlockForNonEOA","type":"error"},{"inputs":[],"name":"OverMintLimit","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"PublicSaleNotStarted","type":"error"},{"inputs":[],"name":"SenderNotTxOrigin","type":"error"},{"inputs":[],"name":"TokenDoesNotExist","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","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":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newBaseURI","type":"string"}],"name":"BaseURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"batch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"batchSize","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"within","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"overall","type":"uint256"}],"name":"BatchRevealed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newBatchSize","type":"uint256"}],"name":"BatchSizeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[],"name":"FancyMathUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"Frozen","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FundsWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"LimitUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"newValue","type":"bool"}],"name":"MarsListUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newMaxQuantity","type":"uint256"}],"name":"MaxQuantityUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newPreRevealURI","type":"string"}],"name":"PreRevealURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"PriceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"newValue","type":"bool"}],"name":"PublicSaleUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldRealOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newRealOwner","type":"address"}],"name":"RealOwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"RoyaltiesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newSuffix","type":"string"}],"name":"SuffixUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"allowancesSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"batchSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimedBitMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"configuration","outputs":[{"components":[{"internalType":"uint256","name":"limit","type":"uint256"},{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"maxQuantity","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"bool","name":"marsList","type":"bool"},{"internalType":"bool","name":"publicSale","type":"bool"}],"internalType":"struct MPL.Configuration","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"createMessage","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"indexes","type":"uint256[]"}],"name":"createMessages","outputs":[{"internalType":"bytes32[]","name":"messages","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"frozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getShuffledId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"idToBatch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"isClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastCallFrom","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"limit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marsList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxQuantity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintWithSignature","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"offsets","outputs":[{"internalType":"uint256","name":"seed","type":"uint256"},{"internalType":"uint256","name":"within","type":"uint256"},{"internalType":"uint256","name":"overall","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preRevealURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"realOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealedBatches","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"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":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_batch","type":"uint256"}],"name":"setBatchOffset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newBatchSize","type":"uint256"}],"name":"setBatchSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setFrozen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"setLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setMarsList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxQuantity","type":"uint256"}],"name":"setMaxQuantity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMinimumIndex","type":"uint256"}],"name":"setMinimumIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newPreRevealURI","type":"string"}],"name":"setPreRevealURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newSuffix","type":"string"}],"name":"setSuffix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setUseFancyMath","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"takenBitMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRealOwner","type":"address"}],"name":"transferRealOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"useFancyMath","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"validateSignature","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6001600f5560c06040526005608081905264173539b7b760d91b60a09081526200002d91601c91906200095e565b50601d805461ff0019166101001790553480156200004a57600080fd5b50604051620048c3380380620048c38339810160408190526200006d9162000b27565b60408051808201825260038082526213541360ea1b602080840182815285518087019096529285528401528151919291620000ab916002916200095e565b508051620000c19060039060208401906200095e565b50506000805550620000d3336200017f565b601180546001600160a01b0319163317905560e0810151620000f590620001d1565b6020810151620001059062000314565b6040810151620001159062000422565b606081015160175560808101516200012d90620004bb565b60a08101516200013d9062000554565b60c08101516200014d906200062c565b6101008101516200015e90620006db565b80516200016b906200078a565b80516200017890620007f6565b5062000caa565b601080546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6011546001600160a01b03163314620002365760405162461bcd60e51b815260206004820152602d6024820152600080516020620048a383398151915260448201526c3432903932b0b61037bbb732b960991b60648201526084015b60405180910390fd5b601d54610100900460ff166200025f5760405163d4ea2f2760e01b815260040160405180910390fd5b601354600154600054031480156200028457506000620002826001546000540390565b115b15620002a6576040516001623f872b60e21b0319815260040160405180910390fd5b80620002b160135490565b620002bd919062000c15565b15620002dc576040516361d5356f60e11b815260040160405180910390fd5b6040518181527ff85382ae20cca2cd15537b9219bcfe3b4100dd273ff15e4f4b93b48c540df7039060200160405180910390a1600955565b6011546001600160a01b03163314620003755760405162461bcd60e51b815260206004820152602d6024820152600080516020620048a383398151915260448201526c3432903932b0b61037bbb732b960991b60648201526084016200022d565b601354600154600054031480156200039a57506000620003986001546000540390565b115b15620003bc576040516001623f872b60e21b0319815260040160405180910390fd5b600954620003cb908262000c15565b15620003ea576040516361d5356f60e11b815260040160405180910390fd5b6040518181527f824bdce4cbdec6e790596be3c1ac027ebd2747f3b4f72e8e9b50a9ce5479fe409060200160405180910390a1601355565b6011546001600160a01b03163314620004835760405162461bcd60e51b815260206004820152602d6024820152600080516020620048a383398151915260448201526c3432903932b0b61037bbb732b960991b60648201526084016200022d565b6040518181527fba2490492fb9ae4ee8452747198a4521e3d9e75b259f9c245e33ec4fe204e6e89060200160405180910390a1601555565b6011546001600160a01b031633146200051c5760405162461bcd60e51b815260206004820152602d6024820152600080516020620048a383398151915260448201526c3432903932b0b61037bbb732b960991b60648201526084016200022d565b6040518181527f66cbca4f3c64fecf1dcb9ce094abcf7f68c3450a1d4e3a8e917dd621edb4ebe09060200160405180910390a1601655565b6011546001600160a01b03163314620005b55760405162461bcd60e51b815260206004820152602d6024820152600080516020620048a383398151915260448201526c3432903932b0b61037bbb732b960991b60648201526084016200022d565b601d5460ff1615620005da5760405163379dfc6360e01b815260040160405180910390fd5b7f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad816040516200060b919062000c38565b60405180910390a180516200062890601a9060208401906200095e565b5050565b6011546001600160a01b031633146200068d5760405162461bcd60e51b815260206004820152602d6024820152600080516020620048a383398151915260448201526c3432903932b0b61037bbb732b960991b60648201526084016200022d565b7f5f94d5d9b7297df00452e2c094a7f1e098db8499220afabec45cc68c8094305381604051620006be919062000c38565b60405180910390a180516200062890601b9060208401906200095e565b6011546001600160a01b031633146200073c5760405162461bcd60e51b815260206004820152602d6024820152600080516020620048a383398151915260448201526c3432903932b0b61037bbb732b960991b60648201526084016200022d565b6040518181527f382d6d457eaa3c84d586de142a0d72bac72f2a514a1691f8ccf48feae833ff099060200160405180910390a160115462000787906001600160a01b031682620008c0565b50565b6011546001600160a01b03163314620007eb5760405162461bcd60e51b815260206004820152602d6024820152600080516020620048a383398151915260448201526c3432903932b0b61037bbb732b960991b60648201526084016200022d565b62000787816200017f565b6011546001600160a01b03163314620008575760405162461bcd60e51b815260206004820152602d6024820152600080516020620048a383398151915260448201526c3432903932b0b61037bbb732b960991b60648201526084016200022d565b601154604080516001600160a01b03928316815291831660208301527f20a7c64657036690ea0f3f311c2e3236d6888db49c4f0913fa3a155660645b81910160405180910390a1601180546001600160a01b0319166001600160a01b0392909216919091179055565b612710811115620009145760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f206869676800000000000060448201526064016200022d565b604080518082019091526001600160a01b0390921680835262ffffff909116602090920182905260128054600160a01b9093026001600160b81b0319909316909117919091179055565b8280546200096c9062000c6d565b90600052602060002090601f016020900481019282620009905760008555620009db565b82601f10620009ab57805160ff1916838001178555620009db565b82800160010185558215620009db579182015b82811115620009db578251825591602001919060010190620009be565b50620009e9929150620009ed565b5090565b5b80821115620009e95760008155600101620009ee565b634e487b7160e01b600052604160045260246000fd5b60405161012081016001600160401b038111828210171562000a405762000a4062000a04565b60405290565b80516001600160a01b038116811462000a5e57600080fd5b919050565b60005b8381101562000a8057818101518382015260200162000a66565b8381111562000a90576000848401525b50505050565b600082601f83011262000aa857600080fd5b81516001600160401b038082111562000ac55762000ac562000a04565b604051601f8301601f19908116603f0116810190828211818310171562000af05762000af062000a04565b8160405283815286602085880101111562000b0a57600080fd5b62000b1d84602083016020890162000a63565b9695505050505050565b60006020828403121562000b3a57600080fd5b81516001600160401b038082111562000b5257600080fd5b90830190610120828603121562000b6857600080fd5b62000b7262000a1a565b62000b7d8362000a46565b81526020830151602082015260408301516040820152606083015160608201526080830151608082015260a08301518281111562000bba57600080fd5b62000bc88782860162000a96565b60a08301525060c08301518281111562000be157600080fd5b62000bef8782860162000a96565b60c08301525060e083810151908201526101009283015192810192909252509392505050565b60008262000c3357634e487b7160e01b600052601260045260246000fd5b500690565b602081526000825180602084015262000c5981604085016020870162000a63565b601f01601f19169190910160400192915050565b600181811c9082168062000c8257607f821691505b6020821081141562000ca457634e487b7160e01b600052602260045260246000fd5b50919050565b613be98062000cba6000396000f3fe6080604052600436106103c35760003560e01c806370a08231116101f2578063a22cb4651161010d578063e640cf7d116100a0578063f2fde38b1161006f578063f2fde38b14610b56578063f4daaba114610b76578063feff199914610b8b578063ff883caf14610bab57600080fd5b8063e640cf7d14610aaa578063e985e9c514610ac0578063ee25560b14610b09578063f19e75d414610b3657600080fd5b8063c1341322116100dc578063c134132214610a1b578063c87b56dd14610a48578063d9e3057014610a68578063e02f6d2714610a7d57600080fd5b8063a22cb465146109a6578063a4d66daf146109c6578063b88d4fde146109db578063b9b51827146109fb57600080fd5b806390260cbd1161018557806395d89b411161015457806395d89b41146109485780639e34070f1461095d578063a035b1fe1461097d578063a0712d681461099357600080fd5b806390260cbd146108e757806391b7f5ed146108fd57806392559fb51461091d5780639539f9d21461093257600080fd5b806381914619116101c1578063819146191461083d5780638838b5c314610894578063890621da146108a95780638da5cb5b146108c957600080fd5b806370a08231146107d3578063715018a6146107f357806375d5ae9f1461080857806379b6ed361461082857600080fd5b80632d29b368116102e2578063570bbbe8116102755780636352211e116102445780636352211e1461074f5780636c0360eb1461076f5780636c4a412c146107845780636c70bee9146107b157600080fd5b8063570bbbe8146106d1578063576f35e3146106f157806359cc5f24146107115780635eea5c911461073057600080fd5b8063496c2d28116102b1578063496c2d28146106695780634a65a5751461067c57806355f804b31461069c57806356f8f78c146106bc57600080fd5b80632d29b3681461060457806333bc1c5c1461061957806342842e0e14610633578063463f99d31461065357600080fd5b80631df270f31161035a5780632a55205a116103295780632a55205a146105655780632a85db55146105a45780632b80183f146105c45780632cff6770146105e457600080fd5b80631df270f3146104f057806323b872dd1461051057806324600fc31461053057806327ea6f2b1461054557600080fd5b8063095ea7b311610396578063095ea7b3146104715780630db026221461049357806315934e62146104b757806318160ddd146104d757600080fd5b806301ffc9a7146103c8578063054f7d9c146103fd57806306fdde0314610417578063081812fc14610439575b600080fd5b3480156103d457600080fd5b506103e86103e336600461335a565b610bcb565b60405190151581526020015b60405180910390f35b34801561040957600080fd5b50601d546103e89060ff1681565b34801561042357600080fd5b5061042c610bdc565b6040516103f491906133d6565b34801561044557600080fd5b506104596104543660046133e9565b610c6e565b6040516001600160a01b0390911681526020016103f4565b34801561047d57600080fd5b5061049161048c36600461341e565b610cb2565b005b34801561049f57600080fd5b506104a960185481565b6040519081526020016103f4565b3480156104c357600080fd5b506104a96104d23660046133e9565b610d40565b3480156104e357600080fd5b50600154600054036104a9565b3480156104fc57600080fd5b50601154610459906001600160a01b031681565b34801561051c57600080fd5b5061049161052b366004613448565b610da7565b34801561053c57600080fd5b50610491610db2565b34801561055157600080fd5b506104916105603660046133e9565b610e9f565b34801561057157600080fd5b50610585610580366004613484565b610f70565b604080516001600160a01b0390931683526020830191909152016103f4565b3480156105b057600080fd5b506104916105bf366004613543565b610fc5565b3480156105d057600080fd5b506104916105df3660046133e9565b61103d565b3480156105f057600080fd5b506104916105ff36600461358b565b6110b3565b34801561061057600080fd5b50610491611146565b34801561062557600080fd5b506019546103e89060ff1681565b34801561063f57600080fd5b5061049161064e366004613448565b6111cc565b34801561065f57600080fd5b506104a960175481565b6104916106773660046135c6565b6111e7565b34801561068857600080fd5b506104916106973660046133e9565b61125f565b3480156106a857600080fd5b506104916106b7366004613543565b6112c1565b3480156106c857600080fd5b50610491611359565b3480156106dd57600080fd5b506104916106ec3660046133e9565b6113d2565b3480156106fd57600080fd5b5061049161070c3660046133e9565b6114b4565b34801561071d57600080fd5b50601d546103e890610100900460ff1681565b34801561073c57600080fd5b506019546103e890610100900460ff1681565b34801561075b57600080fd5b5061045961076a3660046133e9565b6115b4565b34801561077b57600080fd5b5061042c6115c6565b34801561079057600080fd5b506107a461079f3660046136a3565b611654565b6040516103f49190613758565b3480156107bd57600080fd5b506107c661175e565b6040516103f4919061379c565b3480156107df57600080fd5b506104a96107ee36600461358b565b6118b7565b3480156107ff57600080fd5b50610491611905565b34801561081457600080fd5b50610491610823366004613543565b61196b565b34801561083457600080fd5b5061042c611a03565b34801561084957600080fd5b506108796108583660046133e9565b600a6020526000908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016103f4565b3480156108a057600080fd5b50610459611a10565b3480156108b557600080fd5b506104a96108c4366004613805565b611a29565b3480156108d557600080fd5b506010546001600160a01b0316610459565b3480156108f357600080fd5b506104a960085481565b34801561090957600080fd5b506104916109183660046133e9565b611a46565b34801561092957600080fd5b50610491611aa8565b34801561093e57600080fd5b506104a9601e5481565b34801561095457600080fd5b5061042c611b3c565b34801561096957600080fd5b506103e86109783660046133e9565b611b4b565b34801561098957600080fd5b506104a960165481565b6104916109a13660046133e9565b611b8c565b3480156109b257600080fd5b506104916109c1366004613845565b611c7d565b3480156109d257600080fd5b506013546104a9565b3480156109e757600080fd5b506104916109f6366004613881565b611d13565b348015610a0757600080fd5b50610491610a163660046133e9565b611d64565b348015610a2757600080fd5b506104a9610a3636600461358b565b601f6020526000908152604090205481565b348015610a5457600080fd5b5061042c610a633660046133e9565b611d93565b348015610a7457600080fd5b50610491611ef3565b348015610a8957600080fd5b506104a9610a983660046133e9565b600c6020526000908152604090205481565b348015610ab657600080fd5b506104a960155481565b348015610acc57600080fd5b506103e8610adb3660046138e8565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610b1557600080fd5b506104a9610b243660046133e9565b600d6020526000908152604090205481565b348015610b4257600080fd5b50610491610b513660046133e9565b611f79565b348015610b6257600080fd5b50610491610b7136600461358b565b611fee565b348015610b8257600080fd5b506009546104a9565b348015610b9757600080fd5b506104a9610ba636600461341e565b612021565b348015610bb757600080fd5b506104a9610bc63660046133e9565b612064565b6000610bd682612084565b92915050565b606060028054610beb9061391b565b80601f0160208091040260200160405190810160405280929190818152602001828054610c179061391b565b8015610c645780601f10610c3957610100808354040283529160200191610c64565b820191906000526020600020905b815481529060010190602001808311610c4757829003601f168201915b5050505050905090565b6000610c79826120a9565b610c96576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610cbd826115b4565b9050806001600160a01b0316836001600160a01b03161415610cf25760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610d125750610d108133610adb565b155b15610d30576040516367d9dca160e11b815260040160405180910390fd5b610d3b8383836120d4565b505050565b601d54600090610100900460ff16610d6b5760405163d4ea2f2760e01b815260040160405180910390fd5b6000610d76836115b4565b6001600160a01b03161415610d9e5760405163677510db60e11b815260040160405180910390fd5b610bd682612130565b610d3b838383612206565b6011546001600160a01b03163314610de55760405162461bcd60e51b8152600401610ddc90613956565b60405180910390fd5b6040514790600090339083908381818185875af1925050503d8060008114610e29576040519150601f19603f3d011682016040523d82523d6000602084013e610e2e565b606091505b5050905080610e685760405162461bcd60e51b815260206004820152600660248201526511985a5b195960d21b6044820152606401610ddc565b6040518281527f4a37b25aab49761ecf63117fe82b98d750917451133cf797507bc9fb5b96044a9060200160405180910390a15050565b6011546001600160a01b03163314610ec95760405162461bcd60e51b8152600401610ddc90613956565b60135460015460005403148015610eec57506000610eea6001546000540390565b115b15610f0d576040516001623f872b60e21b0319815260040160405180910390fd5b600954610f1a90826139b9565b15610f38576040516361d5356f60e11b815260040160405180910390fd5b6040518181527f824bdce4cbdec6e790596be3c1ac027ebd2747f3b4f72e8e9b50a9ce5479fe409060200160405180910390a1601355565b604080518082019091526012546001600160a01b038116808352600160a01b90910462ffffff1660208301819052909160009161271090610fb190866139e3565b610fbb9190613a02565b9150509250929050565b6011546001600160a01b03163314610fef5760405162461bcd60e51b8152600401610ddc90613956565b7f5f94d5d9b7297df00452e2c094a7f1e098db8499220afabec45cc68c809430538160405161101e91906133d6565b60405180910390a1805161103990601b9060208401906132ab565b5050565b6011546001600160a01b031633146110675760405162461bcd60e51b8152600401610ddc90613956565b6040518181527f382d6d457eaa3c84d586de142a0d72bac72f2a514a1691f8ccf48feae833ff099060200160405180910390a16011546110b0906001600160a01b03168261241a565b50565b6011546001600160a01b031633146110dd5760405162461bcd60e51b8152600401610ddc90613956565b601154604080516001600160a01b03928316815291831660208301527f20a7c64657036690ea0f3f311c2e3236d6888db49c4f0913fa3a155660645b81910160405180910390a1601180546001600160a01b0319166001600160a01b0392909216919091179055565b6011546001600160a01b031633146111705760405162461bcd60e51b8152600401610ddc90613956565b60195460405161010090910460ff161581527f8976fae98cd585866f463681c8e630922d2d21e3d1dc6358f48fc8bea2e3c9819060200160405180910390a16019805461ff001981166101009182900460ff1615909102179055565b610d3b83838360405180602001604052806000815250611d13565b601954610100900460ff1615806111ff5750601e5482105b1561121d5760405163904142ff60e01b815260040160405180910390fd5b8260165461122b91906139e3565b34101561124b5760405163044044a560e21b815260040160405180910390fd5b61125582826124b6565b610d3b33846124cb565b6011546001600160a01b031633146112895760405162461bcd60e51b8152600401610ddc90613956565b6040518181527fba2490492fb9ae4ee8452747198a4521e3d9e75b259f9c245e33ec4fe204e6e89060200160405180910390a1601555565b6011546001600160a01b031633146112eb5760405162461bcd60e51b8152600401610ddc90613956565b601d5460ff161561130f5760405163379dfc6360e01b815260040160405180910390fd5b7f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad8160405161133e91906133d6565b60405180910390a1805161103990601a9060208401906132ab565b6011546001600160a01b031633146113835760405162461bcd60e51b8152600401610ddc90613956565b60195460405160ff9091161581527fa7992653ae8b338245b8ec16329066a8d360248f6435e876a471bf532dcb9b3f9060200160405180910390a16019805460ff19811660ff90911615179055565b6011546001600160a01b031633146113fc5760405162461bcd60e51b8152600401610ddc90613956565b601d54610100900460ff166114245760405163d4ea2f2760e01b815260040160405180910390fd5b8061142e60095490565b61143891906139e3565b60015460005403108015611453575060135460015460005403105b156114715760405163288735bd60e11b815260040160405180910390fd5b60145461147f906001613a16565b811461149d57604051620417e760e61b815260040160405180910390fd5b60148190556110b0816114af81612534565b612595565b6011546001600160a01b031633146114de5760405162461bcd60e51b8152600401610ddc90613956565b601d54610100900460ff166115065760405163d4ea2f2760e01b815260040160405180910390fd5b60135460015460005403148015611529575060006115276001546000540390565b115b1561154a576040516001623f872b60e21b0319815260040160405180910390fd5b8061155460135490565b61155e91906139b9565b1561157c576040516361d5356f60e11b815260040160405180910390fd5b6040518181527ff85382ae20cca2cd15537b9219bcfe3b4100dd273ff15e4f4b93b48c540df7039060200160405180910390a1600955565b60006115bf8261280a565b5192915050565b601a80546115d39061391b565b80601f01602080910402602001604051908101604052809291908181526020018280546115ff9061391b565b801561164c5780601f106116215761010080835404028352916020019161164c565b820191906000526020600020905b81548152906001019060200180831161162f57829003601f168201915b505050505081565b6060815183511461169b5760405162461bcd60e51b8152602060048201526011602482015270214c454e4754485f4d49534d415443482160781b6044820152606401610ddc565b82516001600160401b038111156116b4576116b46134a6565b6040519080825280602002602001820160405280156116dd578160200160208202803683370190505b50905060005b83518110156117575761172884828151811061170157611701613a2e565b602002602001015184838151811061171b5761171b613a2e565b6020026020010151612021565b82828151811061173a5761173a613a2e565b60209081029190910101528061174f81613a44565b9150506116e3565b5092915050565b6117a26040518060e0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581526020016000151581525090565b6117e66040518060e0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581526020016000151581525090565b601354815260015460005403602082015260155460408201526016546060820152601a80546118149061391b565b80601f01602080910402602001604051908101604052809291908181526020018280546118409061391b565b801561188d5780601f106118625761010080835404028352916020019161188d565b820191906000526020600020905b81548152906001019060200180831161187057829003601f168201915b5050505050608082015260195460ff61010082048116151560a084015216151560c0820152919050565b60006001600160a01b0382166118e0576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6010546001600160a01b0316331461195f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ddc565b6119696000612924565b565b6011546001600160a01b031633146119955760405162461bcd60e51b8152600401610ddc90613956565b601d5460ff16156119b95760405163379dfc6360e01b815260040160405180910390fd5b7feebc6c7f6db58e481a825b9faae2b296ba1bd2fb29a7c83aa8a0bbcfb64d3747816040516119e891906133d6565b60405180910390a1805161103990601c9060208401906132ab565b601b80546115d39061391b565b6000611a246010546001600160a01b031690565b905090565b6000611a3e848484611a39611a10565b612976565b949350505050565b6011546001600160a01b03163314611a705760405162461bcd60e51b8152600401610ddc90613956565b6040518181527f66cbca4f3c64fecf1dcb9ce094abcf7f68c3450a1d4e3a8e917dd621edb4ebe09060200160405180910390a1601655565b6011546001600160a01b03163314611ad25760405162461bcd60e51b8152600401610ddc90613956565b601d5460ff1615611af65760405163379dfc6360e01b815260040160405180910390fd5b6040517fc998cc270b6dd4dda36a65c3073530c6cbba74a079c5e27577795e3c9077cda290600090a1601d805461ff001981166101009182900460ff1615909102179055565b606060038054610beb9061391b565b600080611b5a61010084613a02565b90506000611b6a610100856139b9565b6000928352600d602052604090922054600190921b9182169091149392505050565b600f54600114611bcb5760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b6044820152606401610ddc565b6002600f5560195460ff16611bf35760405163ac4d09c760e01b815260040160405180910390fd5b80601654611c0191906139e3565b341015611c215760405163044044a560e21b815260040160405180910390fd5b333214611c6b57326000908152601f6020526040902054431415611c58576040516332ff2ff160e21b815260040160405180910390fd5b326000908152601f602052604090204390555b611c7533826124cb565b506001600f55565b6001600160a01b038216331415611ca75760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611d1e848484612206565b6001600160a01b0383163b15158015611d405750611d3e84848484612a82565b155b15611d5e576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6011546001600160a01b03163314611d8e5760405162461bcd60e51b8152600401610ddc90613956565b601e55565b60606000611da0836115b4565b6001600160a01b03161415611dc85760405163677510db60e11b815260040160405180910390fd5b601d54610100900460ff16611e0c57601a611de283612b76565b601c604051602001611df693929190613af9565b6040516020818303038152906040529050919050565b601454611e1883612064565b1115611eb057601b8054611e2b9061391b565b80601f0160208091040260200160405190810160405280929190818152602001828054611e579061391b565b8015611ea45780601f10611e7957610100808354040283529160200191611ea4565b820191906000526020600020905b815481529060010190602001808311611e8757829003601f168201915b50505050509050919050565b6000611ebb83610d40565b9050601a611ec882612b76565b601c604051602001611edc93929190613af9565b604051602081830303815290604052915050919050565b6011546001600160a01b03163314611f1d5760405162461bcd60e51b8152600401610ddc90613956565b601d5460ff1615611f415760405163379dfc6360e01b815260040160405180910390fd5b6040517fa8cab3d1893ed53071b052fafa843143492f25d1d6b0170d460789f7ab1954be90600090a1601d805460ff19166001179055565b6011546001600160a01b03163314611fa35760405162461bcd60e51b8152600401610ddc90613956565b60175481601854611fb49190613a16565b1115611fd35760405163436a537960e01b815260040160405180910390fd5b80601854611fe19190613a16565b6018556110b033826124cb565b6011546001600160a01b031633146120185760405162461bcd60e51b8152600401610ddc90613956565b6110b081612924565b604080516001600160a01b038416602082015290810182905230606082015260009060800160405160208183030381529060405280519060200120905092915050565b600061206f60095490565b6120799083613a02565b610bd6906001613a16565b60006001600160e01b0319821663152a902d60e11b1480610bd65750610bd682612c73565b6000805482108015610bd6575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60008061213c83612064565b6000818152600a602052604090205490915061216b5760405163729b0f7560e01b815260040160405180910390fd5b6000818152600a602090815260408083208151606081018352815481526001820154938101939093526002015490820152906121a660095490565b60208301516009546121b890886139b9565b6121c29190613a16565b6121cc91906139b9565b905081604001516121dc60095490565b6013546121e99190613a02565b6121f390836139e3565b6121fd9190613a16565b95945050505050565b60006122118261280a565b80519091506000906001600160a01b0316336001600160a01b0316148061223f5750815161223f9033610adb565b8061225a57503361224f84610c6e565b6001600160a01b0316145b90508061227a57604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146122af5760405162a1148160e81b815260040160405180910390fd5b6001600160a01b0384166122d657604051633a954ecd60e21b815260040160405180910390fd5b6122e660008484600001516120d4565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b4290921691909102179092559086018083529120549091166123d0576000548110156123d057825160008281526004602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b61271081111561246c5760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f20686967680000000000006044820152606401610ddc565b604080518082019091526001600160a01b0390921680835262ffffff909116602090920182905260128054600160a01b9093026001600160b81b0319909316909117919091179055565b6124c1338383611a29565b5061103982612cc3565b600154600054036013546124df9190613b2c565b81118061250357506015548111801561250357506011546001600160a01b03163314155b8061250c575080155b1561252a5760405163436a537960e01b815260040160405180910390fd5b6110398282612d01565b6000612541600143613b2c565b604080519140602083015281018390526bffffffffffffffffffffffff1933606090811b82168184015230901b16607482015260880160408051601f19818403018152919052805160209091012092915050565b6125b960405180606001604052806000815260200160008152602001600081525090565b8181526009546125c990836139b9565b60208201526008546000906125dd60095490565b6013546125ea9190613a02565b6125f49190613b2c565b60109390931c929050600061260982856139b9565b90506000826001600160401b03811115612625576126256134a6565b60405190808252806020026020018201604052801561264e578160200160208202803683370190505b506000808052600c6020527f13649b2456f1b42fef0f0040b3aaeabcd21a76a0f3f5defd4f583839455116e854919250908190815b6009546013546126939190613a02565b81101561272d57826126a761010083613a02565b11156126cf57600c60006126bd61010084613a02565b81526020019081526020016000205491505b60006126dd610100836139b9565b90506001811b838116811461271857828787815181106126ff576126ff613a2e565b6020908102919091010152612715600187613a16565b95505b5050808061272590613a44565b915050612683565b5083858151811061274057612740613a2e565b60209081029190910101516040880181905261275b90612d1b565b86600a60008b81526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050506001600860008282546127a39190613a16565b909155507fe02ede6e733fdd5b73e8df05b85da1b29f5925bce35df5c7fcfdf3a4610effe59050896127d460095490565b60208a8101516040808d0151815195865292850193909352838301526060830152519081900360800190a1505050505050505050565b60408051606081018252600080825260208201819052918101919091528160005481101561290b57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906129095780516001600160a01b0316156128a0579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215612904579392505050565b6128a0565b505b604051636f96cda160e11b815260040160405180910390fd5b601080546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000806129d96129868787612021565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b90506001600160a01b0383166129ef8286612d59565b6001600160a01b031614612a3b5760405162461bcd60e51b815260206004820152601360248201527221494e56414c49445f5349474e41545552452160681b6044820152606401610ddc565b612a4485611b4b565b156121fd5760405162461bcd60e51b815260206004820152600e60248201526d21414c52454144595f555345442160901b6044820152606401610ddc565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612ab7903390899088908890600401613b43565b602060405180830381600087803b158015612ad157600080fd5b505af1925050508015612b01575060408051601f3d908101601f19168201909252612afe91810190613b80565b60015b612b5c573d808015612b2f576040519150601f19603f3d011682016040523d82523d6000602084013e612b34565b606091505b508051612b54576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611a3e565b606081612b9a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612bc45780612bae81613a44565b9150612bbd9050600a83613a02565b9150612b9e565b6000816001600160401b03811115612bde57612bde6134a6565b6040519080825280601f01601f191660200182016040528015612c08576020820181803683370190505b5090505b8415611a3e57612c1d600183613b2c565b9150612c2a600a866139b9565b612c35906030613a16565b60f81b818381518110612c4a57612c4a613a2e565b60200101906001600160f81b031916908160001a905350612c6c600a86613a02565b9450612c0c565b60006001600160e01b031982166380ac58cd60e01b1480612ca457506001600160e01b03198216635b5e139f60e01b145b80610bd657506301ffc9a760e01b6001600160e01b0319831614610bd6565b6000612cd161010083613a02565b90506000612ce1610100846139b9565b6000928352600d60205260409092208054600190931b9092179091555050565b611039828260405180602001604052806000815250612d7d565b6000612d2961010083613a02565b90506000612d39610100846139b9565b6000928352600c60205260409092208054600190931b9092179091555050565b6000806000612d688585612d8a565b91509150612d7581612dfa565b509392505050565b610d3b8383836001612fb5565b600080825160411415612dc15760208301516040840151606085015160001a612db587828585613185565b94509450505050612df3565b825160401415612deb5760208301516040840151612de0868383613272565b935093505050612df3565b506000905060025b9250929050565b6000816004811115612e0e57612e0e613b9d565b1415612e175750565b6001816004811115612e2b57612e2b613b9d565b1415612e795760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610ddc565b6002816004811115612e8d57612e8d613b9d565b1415612edb5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610ddc565b6003816004811115612eef57612eef613b9d565b1415612f485760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610ddc565b6004816004811115612f5c57612f5c613b9d565b14156110b05760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610ddc565b6000546001600160a01b038516612fde57604051622e076360e81b815260040160405180910390fd5b83612ffc5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b4290921691909102179055808085018380156130ad57506001600160a01b0387163b15155b15613136575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46130fe6000888480600101955088612a82565b61311b576040516368d2bf6b60e11b815260040160405180910390fd5b808214156130b357826000541461313157600080fd5b61317c565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821415613137575b50600055612413565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156131bc5750600090506003613269565b8460ff16601b141580156131d457508460ff16601c14155b156131e55750600090506004613269565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613239573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661326257600060019250925050613269565b9150600090505b94509492505050565b6000806001600160ff1b0383168161328f60ff86901c601b613a16565b905061329d87828885613185565b935093505050935093915050565b8280546132b79061391b565b90600052602060002090601f0160209004810192826132d9576000855561331f565b82601f106132f257805160ff191683800117855561331f565b8280016001018555821561331f579182015b8281111561331f578251825591602001919060010190613304565b5061332b92915061332f565b5090565b5b8082111561332b5760008155600101613330565b6001600160e01b0319811681146110b057600080fd5b60006020828403121561336c57600080fd5b813561337781613344565b9392505050565b60005b83811015613399578181015183820152602001613381565b83811115611d5e5750506000910152565b600081518084526133c281602086016020860161337e565b601f01601f19169290920160200192915050565b60208152600061337760208301846133aa565b6000602082840312156133fb57600080fd5b5035919050565b80356001600160a01b038116811461341957600080fd5b919050565b6000806040838503121561343157600080fd5b61343a83613402565b946020939093013593505050565b60008060006060848603121561345d57600080fd5b61346684613402565b925061347460208501613402565b9150604084013590509250925092565b6000806040838503121561349757600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156134e4576134e46134a6565b604052919050565b60006001600160401b03831115613505576135056134a6565b613518601f8401601f19166020016134bc565b905082815283838301111561352c57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561355557600080fd5b81356001600160401b0381111561356b57600080fd5b8201601f8101841361357c57600080fd5b611a3e848235602084016134ec565b60006020828403121561359d57600080fd5b61337782613402565b600082601f8301126135b757600080fd5b613377838335602085016134ec565b6000806000606084860312156135db57600080fd5b833592506020840135915060408401356001600160401b038111156135ff57600080fd5b61360b868287016135a6565b9150509250925092565b60006001600160401b0382111561362e5761362e6134a6565b5060051b60200190565b600082601f83011261364957600080fd5b8135602061365e61365983613615565b6134bc565b82815260059290921b8401810191818101908684111561367d57600080fd5b8286015b848110156136985780358352918301918301613681565b509695505050505050565b600080604083850312156136b657600080fd5b82356001600160401b03808211156136cd57600080fd5b818501915085601f8301126136e157600080fd5b813560206136f161365983613615565b82815260059290921b8401810191818101908984111561371057600080fd5b948201945b838610156137355761372686613402565b82529482019490820190613715565b9650508601359250508082111561374b57600080fd5b50610fbb85828601613638565b6020808252825182820181905260009190848201906040850190845b8181101561379057835183529284019291840191600101613774565b50909695505050505050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526000608083015160e060a08401526137e16101008401826133aa565b905060a0840151151560c084015260c0840151151560e08401528091505092915050565b60008060006060848603121561381a57600080fd5b61382384613402565b92506020840135915060408401356001600160401b038111156135ff57600080fd5b6000806040838503121561385857600080fd5b61386183613402565b91506020830135801515811461387657600080fd5b809150509250929050565b6000806000806080858703121561389757600080fd5b6138a085613402565b93506138ae60208601613402565b92506040850135915060608501356001600160401b038111156138d057600080fd5b6138dc878288016135a6565b91505092959194509250565b600080604083850312156138fb57600080fd5b61390483613402565b915061391260208401613402565b90509250929050565b600181811c9082168061392f57607f821691505b6020821081141561395057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4d756c74697369674f776e61626c653a2063616c6c6572206973206e6f74207460408201526c3432903932b0b61037bbb732b960991b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b6000826139c8576139c86139a3565b500690565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156139fd576139fd6139cd565b500290565b600082613a1157613a116139a3565b500490565b60008219821115613a2957613a296139cd565b500190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415613a5857613a586139cd565b5060010190565b8054600090600181811c9080831680613a7957607f831692505b6020808410821415613a9b57634e487b7160e01b600052602260045260246000fd5b818015613aaf5760018114613ac057613aed565b60ff19861689528489019650613aed565b60008881526020902060005b86811015613ae55781548b820152908501908301613acc565b505084890196505b50505050505092915050565b6000613b058286613a5f565b8451613b1581836020890161337e565b613b2181830186613a5f565b979650505050505050565b600082821015613b3e57613b3e6139cd565b500390565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613b76908301846133aa565b9695505050505050565b600060208284031215613b9257600080fd5b815161337781613344565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220691d32fdfd4e259361ebdaee659304bbfb0fa6e9a2715d2dbb1846540229137164736f6c634300080900334d756c74697369674f776e61626c653a2063616c6c6572206973206e6f742074000000000000000000000000000000000000000000000000000000000000002000000000000000000000000029b07dd797f0895784dc45fdedc016990a4226b80000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000fa0000000000000000000000000000000000000000000000000138a388a43c000000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000002ee0000000000000000000000000000000000000000000000000000000000000007697066733a2f2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d575331514c7136514d36797171414c43454542705044397653474d39484d346a5853765655655245564c74380000000000000000000000

Deployed Bytecode

0x6080604052600436106103c35760003560e01c806370a08231116101f2578063a22cb4651161010d578063e640cf7d116100a0578063f2fde38b1161006f578063f2fde38b14610b56578063f4daaba114610b76578063feff199914610b8b578063ff883caf14610bab57600080fd5b8063e640cf7d14610aaa578063e985e9c514610ac0578063ee25560b14610b09578063f19e75d414610b3657600080fd5b8063c1341322116100dc578063c134132214610a1b578063c87b56dd14610a48578063d9e3057014610a68578063e02f6d2714610a7d57600080fd5b8063a22cb465146109a6578063a4d66daf146109c6578063b88d4fde146109db578063b9b51827146109fb57600080fd5b806390260cbd1161018557806395d89b411161015457806395d89b41146109485780639e34070f1461095d578063a035b1fe1461097d578063a0712d681461099357600080fd5b806390260cbd146108e757806391b7f5ed146108fd57806392559fb51461091d5780639539f9d21461093257600080fd5b806381914619116101c1578063819146191461083d5780638838b5c314610894578063890621da146108a95780638da5cb5b146108c957600080fd5b806370a08231146107d3578063715018a6146107f357806375d5ae9f1461080857806379b6ed361461082857600080fd5b80632d29b368116102e2578063570bbbe8116102755780636352211e116102445780636352211e1461074f5780636c0360eb1461076f5780636c4a412c146107845780636c70bee9146107b157600080fd5b8063570bbbe8146106d1578063576f35e3146106f157806359cc5f24146107115780635eea5c911461073057600080fd5b8063496c2d28116102b1578063496c2d28146106695780634a65a5751461067c57806355f804b31461069c57806356f8f78c146106bc57600080fd5b80632d29b3681461060457806333bc1c5c1461061957806342842e0e14610633578063463f99d31461065357600080fd5b80631df270f31161035a5780632a55205a116103295780632a55205a146105655780632a85db55146105a45780632b80183f146105c45780632cff6770146105e457600080fd5b80631df270f3146104f057806323b872dd1461051057806324600fc31461053057806327ea6f2b1461054557600080fd5b8063095ea7b311610396578063095ea7b3146104715780630db026221461049357806315934e62146104b757806318160ddd146104d757600080fd5b806301ffc9a7146103c8578063054f7d9c146103fd57806306fdde0314610417578063081812fc14610439575b600080fd5b3480156103d457600080fd5b506103e86103e336600461335a565b610bcb565b60405190151581526020015b60405180910390f35b34801561040957600080fd5b50601d546103e89060ff1681565b34801561042357600080fd5b5061042c610bdc565b6040516103f491906133d6565b34801561044557600080fd5b506104596104543660046133e9565b610c6e565b6040516001600160a01b0390911681526020016103f4565b34801561047d57600080fd5b5061049161048c36600461341e565b610cb2565b005b34801561049f57600080fd5b506104a960185481565b6040519081526020016103f4565b3480156104c357600080fd5b506104a96104d23660046133e9565b610d40565b3480156104e357600080fd5b50600154600054036104a9565b3480156104fc57600080fd5b50601154610459906001600160a01b031681565b34801561051c57600080fd5b5061049161052b366004613448565b610da7565b34801561053c57600080fd5b50610491610db2565b34801561055157600080fd5b506104916105603660046133e9565b610e9f565b34801561057157600080fd5b50610585610580366004613484565b610f70565b604080516001600160a01b0390931683526020830191909152016103f4565b3480156105b057600080fd5b506104916105bf366004613543565b610fc5565b3480156105d057600080fd5b506104916105df3660046133e9565b61103d565b3480156105f057600080fd5b506104916105ff36600461358b565b6110b3565b34801561061057600080fd5b50610491611146565b34801561062557600080fd5b506019546103e89060ff1681565b34801561063f57600080fd5b5061049161064e366004613448565b6111cc565b34801561065f57600080fd5b506104a960175481565b6104916106773660046135c6565b6111e7565b34801561068857600080fd5b506104916106973660046133e9565b61125f565b3480156106a857600080fd5b506104916106b7366004613543565b6112c1565b3480156106c857600080fd5b50610491611359565b3480156106dd57600080fd5b506104916106ec3660046133e9565b6113d2565b3480156106fd57600080fd5b5061049161070c3660046133e9565b6114b4565b34801561071d57600080fd5b50601d546103e890610100900460ff1681565b34801561073c57600080fd5b506019546103e890610100900460ff1681565b34801561075b57600080fd5b5061045961076a3660046133e9565b6115b4565b34801561077b57600080fd5b5061042c6115c6565b34801561079057600080fd5b506107a461079f3660046136a3565b611654565b6040516103f49190613758565b3480156107bd57600080fd5b506107c661175e565b6040516103f4919061379c565b3480156107df57600080fd5b506104a96107ee36600461358b565b6118b7565b3480156107ff57600080fd5b50610491611905565b34801561081457600080fd5b50610491610823366004613543565b61196b565b34801561083457600080fd5b5061042c611a03565b34801561084957600080fd5b506108796108583660046133e9565b600a6020526000908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016103f4565b3480156108a057600080fd5b50610459611a10565b3480156108b557600080fd5b506104a96108c4366004613805565b611a29565b3480156108d557600080fd5b506010546001600160a01b0316610459565b3480156108f357600080fd5b506104a960085481565b34801561090957600080fd5b506104916109183660046133e9565b611a46565b34801561092957600080fd5b50610491611aa8565b34801561093e57600080fd5b506104a9601e5481565b34801561095457600080fd5b5061042c611b3c565b34801561096957600080fd5b506103e86109783660046133e9565b611b4b565b34801561098957600080fd5b506104a960165481565b6104916109a13660046133e9565b611b8c565b3480156109b257600080fd5b506104916109c1366004613845565b611c7d565b3480156109d257600080fd5b506013546104a9565b3480156109e757600080fd5b506104916109f6366004613881565b611d13565b348015610a0757600080fd5b50610491610a163660046133e9565b611d64565b348015610a2757600080fd5b506104a9610a3636600461358b565b601f6020526000908152604090205481565b348015610a5457600080fd5b5061042c610a633660046133e9565b611d93565b348015610a7457600080fd5b50610491611ef3565b348015610a8957600080fd5b506104a9610a983660046133e9565b600c6020526000908152604090205481565b348015610ab657600080fd5b506104a960155481565b348015610acc57600080fd5b506103e8610adb3660046138e8565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610b1557600080fd5b506104a9610b243660046133e9565b600d6020526000908152604090205481565b348015610b4257600080fd5b50610491610b513660046133e9565b611f79565b348015610b6257600080fd5b50610491610b7136600461358b565b611fee565b348015610b8257600080fd5b506009546104a9565b348015610b9757600080fd5b506104a9610ba636600461341e565b612021565b348015610bb757600080fd5b506104a9610bc63660046133e9565b612064565b6000610bd682612084565b92915050565b606060028054610beb9061391b565b80601f0160208091040260200160405190810160405280929190818152602001828054610c179061391b565b8015610c645780601f10610c3957610100808354040283529160200191610c64565b820191906000526020600020905b815481529060010190602001808311610c4757829003601f168201915b5050505050905090565b6000610c79826120a9565b610c96576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610cbd826115b4565b9050806001600160a01b0316836001600160a01b03161415610cf25760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610d125750610d108133610adb565b155b15610d30576040516367d9dca160e11b815260040160405180910390fd5b610d3b8383836120d4565b505050565b601d54600090610100900460ff16610d6b5760405163d4ea2f2760e01b815260040160405180910390fd5b6000610d76836115b4565b6001600160a01b03161415610d9e5760405163677510db60e11b815260040160405180910390fd5b610bd682612130565b610d3b838383612206565b6011546001600160a01b03163314610de55760405162461bcd60e51b8152600401610ddc90613956565b60405180910390fd5b6040514790600090339083908381818185875af1925050503d8060008114610e29576040519150601f19603f3d011682016040523d82523d6000602084013e610e2e565b606091505b5050905080610e685760405162461bcd60e51b815260206004820152600660248201526511985a5b195960d21b6044820152606401610ddc565b6040518281527f4a37b25aab49761ecf63117fe82b98d750917451133cf797507bc9fb5b96044a9060200160405180910390a15050565b6011546001600160a01b03163314610ec95760405162461bcd60e51b8152600401610ddc90613956565b60135460015460005403148015610eec57506000610eea6001546000540390565b115b15610f0d576040516001623f872b60e21b0319815260040160405180910390fd5b600954610f1a90826139b9565b15610f38576040516361d5356f60e11b815260040160405180910390fd5b6040518181527f824bdce4cbdec6e790596be3c1ac027ebd2747f3b4f72e8e9b50a9ce5479fe409060200160405180910390a1601355565b604080518082019091526012546001600160a01b038116808352600160a01b90910462ffffff1660208301819052909160009161271090610fb190866139e3565b610fbb9190613a02565b9150509250929050565b6011546001600160a01b03163314610fef5760405162461bcd60e51b8152600401610ddc90613956565b7f5f94d5d9b7297df00452e2c094a7f1e098db8499220afabec45cc68c809430538160405161101e91906133d6565b60405180910390a1805161103990601b9060208401906132ab565b5050565b6011546001600160a01b031633146110675760405162461bcd60e51b8152600401610ddc90613956565b6040518181527f382d6d457eaa3c84d586de142a0d72bac72f2a514a1691f8ccf48feae833ff099060200160405180910390a16011546110b0906001600160a01b03168261241a565b50565b6011546001600160a01b031633146110dd5760405162461bcd60e51b8152600401610ddc90613956565b601154604080516001600160a01b03928316815291831660208301527f20a7c64657036690ea0f3f311c2e3236d6888db49c4f0913fa3a155660645b81910160405180910390a1601180546001600160a01b0319166001600160a01b0392909216919091179055565b6011546001600160a01b031633146111705760405162461bcd60e51b8152600401610ddc90613956565b60195460405161010090910460ff161581527f8976fae98cd585866f463681c8e630922d2d21e3d1dc6358f48fc8bea2e3c9819060200160405180910390a16019805461ff001981166101009182900460ff1615909102179055565b610d3b83838360405180602001604052806000815250611d13565b601954610100900460ff1615806111ff5750601e5482105b1561121d5760405163904142ff60e01b815260040160405180910390fd5b8260165461122b91906139e3565b34101561124b5760405163044044a560e21b815260040160405180910390fd5b61125582826124b6565b610d3b33846124cb565b6011546001600160a01b031633146112895760405162461bcd60e51b8152600401610ddc90613956565b6040518181527fba2490492fb9ae4ee8452747198a4521e3d9e75b259f9c245e33ec4fe204e6e89060200160405180910390a1601555565b6011546001600160a01b031633146112eb5760405162461bcd60e51b8152600401610ddc90613956565b601d5460ff161561130f5760405163379dfc6360e01b815260040160405180910390fd5b7f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad8160405161133e91906133d6565b60405180910390a1805161103990601a9060208401906132ab565b6011546001600160a01b031633146113835760405162461bcd60e51b8152600401610ddc90613956565b60195460405160ff9091161581527fa7992653ae8b338245b8ec16329066a8d360248f6435e876a471bf532dcb9b3f9060200160405180910390a16019805460ff19811660ff90911615179055565b6011546001600160a01b031633146113fc5760405162461bcd60e51b8152600401610ddc90613956565b601d54610100900460ff166114245760405163d4ea2f2760e01b815260040160405180910390fd5b8061142e60095490565b61143891906139e3565b60015460005403108015611453575060135460015460005403105b156114715760405163288735bd60e11b815260040160405180910390fd5b60145461147f906001613a16565b811461149d57604051620417e760e61b815260040160405180910390fd5b60148190556110b0816114af81612534565b612595565b6011546001600160a01b031633146114de5760405162461bcd60e51b8152600401610ddc90613956565b601d54610100900460ff166115065760405163d4ea2f2760e01b815260040160405180910390fd5b60135460015460005403148015611529575060006115276001546000540390565b115b1561154a576040516001623f872b60e21b0319815260040160405180910390fd5b8061155460135490565b61155e91906139b9565b1561157c576040516361d5356f60e11b815260040160405180910390fd5b6040518181527ff85382ae20cca2cd15537b9219bcfe3b4100dd273ff15e4f4b93b48c540df7039060200160405180910390a1600955565b60006115bf8261280a565b5192915050565b601a80546115d39061391b565b80601f01602080910402602001604051908101604052809291908181526020018280546115ff9061391b565b801561164c5780601f106116215761010080835404028352916020019161164c565b820191906000526020600020905b81548152906001019060200180831161162f57829003601f168201915b505050505081565b6060815183511461169b5760405162461bcd60e51b8152602060048201526011602482015270214c454e4754485f4d49534d415443482160781b6044820152606401610ddc565b82516001600160401b038111156116b4576116b46134a6565b6040519080825280602002602001820160405280156116dd578160200160208202803683370190505b50905060005b83518110156117575761172884828151811061170157611701613a2e565b602002602001015184838151811061171b5761171b613a2e565b6020026020010151612021565b82828151811061173a5761173a613a2e565b60209081029190910101528061174f81613a44565b9150506116e3565b5092915050565b6117a26040518060e0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581526020016000151581525090565b6117e66040518060e0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581526020016000151581525090565b601354815260015460005403602082015260155460408201526016546060820152601a80546118149061391b565b80601f01602080910402602001604051908101604052809291908181526020018280546118409061391b565b801561188d5780601f106118625761010080835404028352916020019161188d565b820191906000526020600020905b81548152906001019060200180831161187057829003601f168201915b5050505050608082015260195460ff61010082048116151560a084015216151560c0820152919050565b60006001600160a01b0382166118e0576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6010546001600160a01b0316331461195f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ddc565b6119696000612924565b565b6011546001600160a01b031633146119955760405162461bcd60e51b8152600401610ddc90613956565b601d5460ff16156119b95760405163379dfc6360e01b815260040160405180910390fd5b7feebc6c7f6db58e481a825b9faae2b296ba1bd2fb29a7c83aa8a0bbcfb64d3747816040516119e891906133d6565b60405180910390a1805161103990601c9060208401906132ab565b601b80546115d39061391b565b6000611a246010546001600160a01b031690565b905090565b6000611a3e848484611a39611a10565b612976565b949350505050565b6011546001600160a01b03163314611a705760405162461bcd60e51b8152600401610ddc90613956565b6040518181527f66cbca4f3c64fecf1dcb9ce094abcf7f68c3450a1d4e3a8e917dd621edb4ebe09060200160405180910390a1601655565b6011546001600160a01b03163314611ad25760405162461bcd60e51b8152600401610ddc90613956565b601d5460ff1615611af65760405163379dfc6360e01b815260040160405180910390fd5b6040517fc998cc270b6dd4dda36a65c3073530c6cbba74a079c5e27577795e3c9077cda290600090a1601d805461ff001981166101009182900460ff1615909102179055565b606060038054610beb9061391b565b600080611b5a61010084613a02565b90506000611b6a610100856139b9565b6000928352600d602052604090922054600190921b9182169091149392505050565b600f54600114611bcb5760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b6044820152606401610ddc565b6002600f5560195460ff16611bf35760405163ac4d09c760e01b815260040160405180910390fd5b80601654611c0191906139e3565b341015611c215760405163044044a560e21b815260040160405180910390fd5b333214611c6b57326000908152601f6020526040902054431415611c58576040516332ff2ff160e21b815260040160405180910390fd5b326000908152601f602052604090204390555b611c7533826124cb565b506001600f55565b6001600160a01b038216331415611ca75760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611d1e848484612206565b6001600160a01b0383163b15158015611d405750611d3e84848484612a82565b155b15611d5e576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6011546001600160a01b03163314611d8e5760405162461bcd60e51b8152600401610ddc90613956565b601e55565b60606000611da0836115b4565b6001600160a01b03161415611dc85760405163677510db60e11b815260040160405180910390fd5b601d54610100900460ff16611e0c57601a611de283612b76565b601c604051602001611df693929190613af9565b6040516020818303038152906040529050919050565b601454611e1883612064565b1115611eb057601b8054611e2b9061391b565b80601f0160208091040260200160405190810160405280929190818152602001828054611e579061391b565b8015611ea45780601f10611e7957610100808354040283529160200191611ea4565b820191906000526020600020905b815481529060010190602001808311611e8757829003601f168201915b50505050509050919050565b6000611ebb83610d40565b9050601a611ec882612b76565b601c604051602001611edc93929190613af9565b604051602081830303815290604052915050919050565b6011546001600160a01b03163314611f1d5760405162461bcd60e51b8152600401610ddc90613956565b601d5460ff1615611f415760405163379dfc6360e01b815260040160405180910390fd5b6040517fa8cab3d1893ed53071b052fafa843143492f25d1d6b0170d460789f7ab1954be90600090a1601d805460ff19166001179055565b6011546001600160a01b03163314611fa35760405162461bcd60e51b8152600401610ddc90613956565b60175481601854611fb49190613a16565b1115611fd35760405163436a537960e01b815260040160405180910390fd5b80601854611fe19190613a16565b6018556110b033826124cb565b6011546001600160a01b031633146120185760405162461bcd60e51b8152600401610ddc90613956565b6110b081612924565b604080516001600160a01b038416602082015290810182905230606082015260009060800160405160208183030381529060405280519060200120905092915050565b600061206f60095490565b6120799083613a02565b610bd6906001613a16565b60006001600160e01b0319821663152a902d60e11b1480610bd65750610bd682612c73565b6000805482108015610bd6575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60008061213c83612064565b6000818152600a602052604090205490915061216b5760405163729b0f7560e01b815260040160405180910390fd5b6000818152600a602090815260408083208151606081018352815481526001820154938101939093526002015490820152906121a660095490565b60208301516009546121b890886139b9565b6121c29190613a16565b6121cc91906139b9565b905081604001516121dc60095490565b6013546121e99190613a02565b6121f390836139e3565b6121fd9190613a16565b95945050505050565b60006122118261280a565b80519091506000906001600160a01b0316336001600160a01b0316148061223f5750815161223f9033610adb565b8061225a57503361224f84610c6e565b6001600160a01b0316145b90508061227a57604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146122af5760405162a1148160e81b815260040160405180910390fd5b6001600160a01b0384166122d657604051633a954ecd60e21b815260040160405180910390fd5b6122e660008484600001516120d4565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b4290921691909102179092559086018083529120549091166123d0576000548110156123d057825160008281526004602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b61271081111561246c5760405162461bcd60e51b815260206004820152601a60248201527f45524332393831526f79616c746965733a20546f6f20686967680000000000006044820152606401610ddc565b604080518082019091526001600160a01b0390921680835262ffffff909116602090920182905260128054600160a01b9093026001600160b81b0319909316909117919091179055565b6124c1338383611a29565b5061103982612cc3565b600154600054036013546124df9190613b2c565b81118061250357506015548111801561250357506011546001600160a01b03163314155b8061250c575080155b1561252a5760405163436a537960e01b815260040160405180910390fd5b6110398282612d01565b6000612541600143613b2c565b604080519140602083015281018390526bffffffffffffffffffffffff1933606090811b82168184015230901b16607482015260880160408051601f19818403018152919052805160209091012092915050565b6125b960405180606001604052806000815260200160008152602001600081525090565b8181526009546125c990836139b9565b60208201526008546000906125dd60095490565b6013546125ea9190613a02565b6125f49190613b2c565b60109390931c929050600061260982856139b9565b90506000826001600160401b03811115612625576126256134a6565b60405190808252806020026020018201604052801561264e578160200160208202803683370190505b506000808052600c6020527f13649b2456f1b42fef0f0040b3aaeabcd21a76a0f3f5defd4f583839455116e854919250908190815b6009546013546126939190613a02565b81101561272d57826126a761010083613a02565b11156126cf57600c60006126bd61010084613a02565b81526020019081526020016000205491505b60006126dd610100836139b9565b90506001811b838116811461271857828787815181106126ff576126ff613a2e565b6020908102919091010152612715600187613a16565b95505b5050808061272590613a44565b915050612683565b5083858151811061274057612740613a2e565b60209081029190910101516040880181905261275b90612d1b565b86600a60008b81526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050506001600860008282546127a39190613a16565b909155507fe02ede6e733fdd5b73e8df05b85da1b29f5925bce35df5c7fcfdf3a4610effe59050896127d460095490565b60208a8101516040808d0151815195865292850193909352838301526060830152519081900360800190a1505050505050505050565b60408051606081018252600080825260208201819052918101919091528160005481101561290b57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906129095780516001600160a01b0316156128a0579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215612904579392505050565b6128a0565b505b604051636f96cda160e11b815260040160405180910390fd5b601080546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000806129d96129868787612021565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b90506001600160a01b0383166129ef8286612d59565b6001600160a01b031614612a3b5760405162461bcd60e51b815260206004820152601360248201527221494e56414c49445f5349474e41545552452160681b6044820152606401610ddc565b612a4485611b4b565b156121fd5760405162461bcd60e51b815260206004820152600e60248201526d21414c52454144595f555345442160901b6044820152606401610ddc565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612ab7903390899088908890600401613b43565b602060405180830381600087803b158015612ad157600080fd5b505af1925050508015612b01575060408051601f3d908101601f19168201909252612afe91810190613b80565b60015b612b5c573d808015612b2f576040519150601f19603f3d011682016040523d82523d6000602084013e612b34565b606091505b508051612b54576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611a3e565b606081612b9a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612bc45780612bae81613a44565b9150612bbd9050600a83613a02565b9150612b9e565b6000816001600160401b03811115612bde57612bde6134a6565b6040519080825280601f01601f191660200182016040528015612c08576020820181803683370190505b5090505b8415611a3e57612c1d600183613b2c565b9150612c2a600a866139b9565b612c35906030613a16565b60f81b818381518110612c4a57612c4a613a2e565b60200101906001600160f81b031916908160001a905350612c6c600a86613a02565b9450612c0c565b60006001600160e01b031982166380ac58cd60e01b1480612ca457506001600160e01b03198216635b5e139f60e01b145b80610bd657506301ffc9a760e01b6001600160e01b0319831614610bd6565b6000612cd161010083613a02565b90506000612ce1610100846139b9565b6000928352600d60205260409092208054600190931b9092179091555050565b611039828260405180602001604052806000815250612d7d565b6000612d2961010083613a02565b90506000612d39610100846139b9565b6000928352600c60205260409092208054600190931b9092179091555050565b6000806000612d688585612d8a565b91509150612d7581612dfa565b509392505050565b610d3b8383836001612fb5565b600080825160411415612dc15760208301516040840151606085015160001a612db587828585613185565b94509450505050612df3565b825160401415612deb5760208301516040840151612de0868383613272565b935093505050612df3565b506000905060025b9250929050565b6000816004811115612e0e57612e0e613b9d565b1415612e175750565b6001816004811115612e2b57612e2b613b9d565b1415612e795760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610ddc565b6002816004811115612e8d57612e8d613b9d565b1415612edb5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610ddc565b6003816004811115612eef57612eef613b9d565b1415612f485760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610ddc565b6004816004811115612f5c57612f5c613b9d565b14156110b05760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610ddc565b6000546001600160a01b038516612fde57604051622e076360e81b815260040160405180910390fd5b83612ffc5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b4290921691909102179055808085018380156130ad57506001600160a01b0387163b15155b15613136575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46130fe6000888480600101955088612a82565b61311b576040516368d2bf6b60e11b815260040160405180910390fd5b808214156130b357826000541461313157600080fd5b61317c565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821415613137575b50600055612413565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156131bc5750600090506003613269565b8460ff16601b141580156131d457508460ff16601c14155b156131e55750600090506004613269565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613239573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661326257600060019250925050613269565b9150600090505b94509492505050565b6000806001600160ff1b0383168161328f60ff86901c601b613a16565b905061329d87828885613185565b935093505050935093915050565b8280546132b79061391b565b90600052602060002090601f0160209004810192826132d9576000855561331f565b82601f106132f257805160ff191683800117855561331f565b8280016001018555821561331f579182015b8281111561331f578251825591602001919060010190613304565b5061332b92915061332f565b5090565b5b8082111561332b5760008155600101613330565b6001600160e01b0319811681146110b057600080fd5b60006020828403121561336c57600080fd5b813561337781613344565b9392505050565b60005b83811015613399578181015183820152602001613381565b83811115611d5e5750506000910152565b600081518084526133c281602086016020860161337e565b601f01601f19169290920160200192915050565b60208152600061337760208301846133aa565b6000602082840312156133fb57600080fd5b5035919050565b80356001600160a01b038116811461341957600080fd5b919050565b6000806040838503121561343157600080fd5b61343a83613402565b946020939093013593505050565b60008060006060848603121561345d57600080fd5b61346684613402565b925061347460208501613402565b9150604084013590509250925092565b6000806040838503121561349757600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156134e4576134e46134a6565b604052919050565b60006001600160401b03831115613505576135056134a6565b613518601f8401601f19166020016134bc565b905082815283838301111561352c57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561355557600080fd5b81356001600160401b0381111561356b57600080fd5b8201601f8101841361357c57600080fd5b611a3e848235602084016134ec565b60006020828403121561359d57600080fd5b61337782613402565b600082601f8301126135b757600080fd5b613377838335602085016134ec565b6000806000606084860312156135db57600080fd5b833592506020840135915060408401356001600160401b038111156135ff57600080fd5b61360b868287016135a6565b9150509250925092565b60006001600160401b0382111561362e5761362e6134a6565b5060051b60200190565b600082601f83011261364957600080fd5b8135602061365e61365983613615565b6134bc565b82815260059290921b8401810191818101908684111561367d57600080fd5b8286015b848110156136985780358352918301918301613681565b509695505050505050565b600080604083850312156136b657600080fd5b82356001600160401b03808211156136cd57600080fd5b818501915085601f8301126136e157600080fd5b813560206136f161365983613615565b82815260059290921b8401810191818101908984111561371057600080fd5b948201945b838610156137355761372686613402565b82529482019490820190613715565b9650508601359250508082111561374b57600080fd5b50610fbb85828601613638565b6020808252825182820181905260009190848201906040850190845b8181101561379057835183529284019291840191600101613774565b50909695505050505050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526000608083015160e060a08401526137e16101008401826133aa565b905060a0840151151560c084015260c0840151151560e08401528091505092915050565b60008060006060848603121561381a57600080fd5b61382384613402565b92506020840135915060408401356001600160401b038111156135ff57600080fd5b6000806040838503121561385857600080fd5b61386183613402565b91506020830135801515811461387657600080fd5b809150509250929050565b6000806000806080858703121561389757600080fd5b6138a085613402565b93506138ae60208601613402565b92506040850135915060608501356001600160401b038111156138d057600080fd5b6138dc878288016135a6565b91505092959194509250565b600080604083850312156138fb57600080fd5b61390483613402565b915061391260208401613402565b90509250929050565b600181811c9082168061392f57607f821691505b6020821081141561395057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4d756c74697369674f776e61626c653a2063616c6c6572206973206e6f74207460408201526c3432903932b0b61037bbb732b960991b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b6000826139c8576139c86139a3565b500690565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156139fd576139fd6139cd565b500290565b600082613a1157613a116139a3565b500490565b60008219821115613a2957613a296139cd565b500190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415613a5857613a586139cd565b5060010190565b8054600090600181811c9080831680613a7957607f831692505b6020808410821415613a9b57634e487b7160e01b600052602260045260246000fd5b818015613aaf5760018114613ac057613aed565b60ff19861689528489019650613aed565b60008881526020902060005b86811015613ae55781548b820152908501908301613acc565b505084890196505b50505050505092915050565b6000613b058286613a5f565b8451613b1581836020890161337e565b613b2181830186613a5f565b979650505050505050565b600082821015613b3e57613b3e6139cd565b500390565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613b76908301846133aa565b9695505050505050565b600060208284031215613b9257600080fd5b815161337781613344565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220691d32fdfd4e259361ebdaee659304bbfb0fa6e9a2715d2dbb1846540229137164736f6c63430008090033

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

000000000000000000000000000000000000000000000000000000000000002000000000000000000000000029b07dd797f0895784dc45fdedc016990a4226b80000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000fa0000000000000000000000000000000000000000000000000138a388a43c000000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000002ee0000000000000000000000000000000000000000000000000000000000000007697066733a2f2f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d575331514c7136514d36797171414c43454542705044397653474d39484d346a5853765655655245564c74380000000000000000000000

-----Decoded View---------------
Arg [0] : config (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 00000000000000000000000029b07dd797f0895784dc45fdedc016990a4226b8
Arg [2] : 0000000000000000000000000000000000000000000000000000000000002710
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000fa
Arg [5] : 0000000000000000000000000000000000000000000000000138a388a43c0000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [8] : 0000000000000000000000000000000000000000000000000000000000001388
Arg [9] : 00000000000000000000000000000000000000000000000000000000000002ee
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [11] : 697066733a2f2f00000000000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [13] : 697066733a2f2f516d575331514c7136514d36797171414c4345454270504439
Arg [14] : 7653474d39484d346a5853765655655245564c74380000000000000000000000


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.