ETH Price: $3,165.64 (+1.46%)
Gas: 3 Gwei

Token

Axiom Space3 (AXIOM)
 

Overview

Max Total Supply

0 AXIOM

Holders

31

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
1 AXIOM
0xb0022d1def3de08cce27e6c43993a617baf2e636
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
GenArt721CoreV3_Engine

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 25 runs

Other Settings:
default evmVersion
File 1 of 21 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

File 2 of 21 : 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 3 of 21 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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`.
     *
     * 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;

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

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

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

File 4 of 21 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 5 of 21 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 6 of 21 : 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 7 of 21 : 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 8 of 21 : 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 9 of 21 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // 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);
    }

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

File 10 of 21 : GenArt721CoreV3_Engine.sol
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity 0.8.19;

// Created By: Art Blocks Inc.

import "../../interfaces/0.8.x/IRandomizer_V3CoreBase.sol";
import "../../interfaces/0.8.x/IAdminACLV0.sol";
import "../../interfaces/0.8.x/IEngineRegistryV0.sol";
import "../../interfaces/0.8.x/IGenArt721CoreContractV3_Engine.sol";
import "../../interfaces/0.8.x/IGenArt721CoreContractExposesHashSeed.sol";
import "../../interfaces/0.8.x/IDependencyRegistryCompatibleV0.sol";
import "../../interfaces/0.8.x/IManifold.sol";

import "@openzeppelin-4.7/contracts/utils/Strings.sol";
import "@openzeppelin-4.7/contracts/access/Ownable.sol";
import "../../libs/0.8.x/ERC721_PackedHashSeed.sol";
import "../../libs/0.8.x/BytecodeStorageV1.sol";
import "../../libs/0.8.x/Bytes32Strings.sol";

/**
 * @title Art Blocks Engine ERC-721 core contract, V3.
 * @author Art Blocks Inc.
 * @notice Privileged Roles and Ownership:
 * This contract is designed to be managed, with progressively limited powers
 * as a project progresses from active to locked.
 * Privileged roles and abilities are controlled by the admin ACL contract and
 * artists. Both of these roles hold extensive power and can arbitrarily
 * control and modify portions of projects, dependent upon project state. After
 * a project is locked, important project metadata fields are locked including
 * the project name, artist name, and script and display details. Edition size
 * can never be increased.
 * Care must be taken to ensure that the admin ACL contract and artist
 * addresses are secure behind a multi-sig or other access control mechanism.
 * ----------------------------------------------------------------------------
 * The following functions are restricted to the Admin ACL contract:
 * - updateArtblocksDependencyRegistryAddress
 * - updateProviderSalesAddresses
 * - updateProviderPrimarySalesPercentages (up to 100%)
 * - updateProviderSecondarySalesBPS (up to 100%)
 * - updateMinterContract
 * - updateRandomizerAddress
 * - toggleProjectIsActive
 * - addProject
 * - forbidNewProjects (forever forbidding new projects)
 * - updateDefaultBaseURI (used to initialize new project base URIs)
 * ----------------------------------------------------------------------------
 * The following functions are restricted to either the the Artist address or
 * the Admin ACL contract, only when the project is not locked:
 * - updateProjectName
 * - updateProjectArtistName
 * - updateProjectLicense
 * - Change project script via addProjectScript, updateProjectScript,
 *   and removeProjectLastScript
 * - updateProjectScriptType
 * - updateProjectAspectRatio
 * ----------------------------------------------------------------------------
 * The following functions are restricted to only the Artist address:
 * - proposeArtistPaymentAddressesAndSplits (Note that this has to be accepted
 *   by adminAcceptArtistAddressesAndSplits to take effect, which is restricted
 *   to the Admin ACL contract, or the artist if the core contract owner has
 *   renounced ownership. Also note that a proposal will be automatically
 *   accepted if the artist only proposes changed payee percentages without
 *   modifying any payee addresses, or is only removing payee addresses, or
 *   if the global config `autoApproveArtistSplitProposals` is set to `true`.)
 * - toggleProjectIsPaused (note the artist can still mint while paused)
 * - updateProjectSecondaryMarketRoyaltyPercentage (up to
     ARTIST_MAX_SECONDARY_ROYALTY_PERCENTAGE percent)
 * - updateProjectWebsite
 * - updateProjectMaxInvocations (to a number greater than or equal to the
 *   current number of invocations, and less than current project maximum
 *   invocations)
 * - updateProjectBaseURI (controlling the base URI for tokens in the project)
 * ----------------------------------------------------------------------------
 * The following function is restricted to either the Admin ACL contract, or
 * the Artist address if the core contract owner has renounced ownership:
 * - adminAcceptArtistAddressesAndSplits
 * - updateProjectArtistAddress (owner ultimately controlling the project and
 *   its and-on revenue, unless owner has renounced ownership)
 * ----------------------------------------------------------------------------
 * The following function is restricted to the artist when a project is
 * unlocked, and only callable by Admin ACL contract when a project is locked:
 * - updateProjectDescription
 * ----------------------------------------------------------------------------
 * The following function is restricted to owner calling directly:
 * - transferOwnership
 * - renounceOwnership
 * ----------------------------------------------------------------------------
 * The following configuration variables are set at time of contract deployment,
 * and not modifiable thereafter (immutable after the point of deployment):
 * - (bool) autoApproveArtistSplitProposals
 * ----------------------------------------------------------------------------
 * Additional admin and artist privileged roles may be described on minters,
 * registries, and other contracts that may interact with this core contract.
 */
contract GenArt721CoreV3_Engine is
    ERC721_PackedHashSeed,
    Ownable,
    IDependencyRegistryCompatibleV0,
    IManifold,
    IGenArt721CoreContractV3_Engine,
    IGenArt721CoreContractExposesHashSeed
{
    using BytecodeStorageWriter for string;
    using Bytes32Strings for bytes32;
    using Strings for uint256;
    using Strings for address;
    uint256 constant ONE_HUNDRED = 100;
    uint256 constant ONE_MILLION = 1_000_000;
    uint24 constant ONE_MILLION_UINT24 = 1_000_000;
    uint256 constant FOUR_WEEKS_IN_SECONDS = 2_419_200;
    uint8 constant AT_CHARACTER_CODE = uint8(bytes1("@")); // 0x40

    // numeric constants
    uint256 constant MAX_PROVIDER_SECONDARY_SALES_BPS = 10000; // 10_000 BPS = 100%
    uint256 constant ARTIST_MAX_SECONDARY_ROYALTY_PERCENTAGE = 95; // 95%

    // This contract emits generic events that contain fields that indicate
    // which parameter has been updated. This is sufficient for application
    // state management, while also simplifying the contract and indexing code.
    // This was done as an alternative to having custom events that emit what
    // field-values have changed for each event, given that changed values can
    // be introspected by indexers due to the design of this smart contract
    // exposing these state changes via publicly viewable fields.
    //
    // The following fields are used to indicate which contract-level parameter
    // has been updated in the `PlatformUpdated` event:
    bytes32 constant FIELD_NEXT_PROJECT_ID = "nextProjectId";
    bytes32 constant FIELD_NEW_PROJECTS_FORBIDDEN = "newProjectsForbidden";
    bytes32 constant FIELD_DEFAULT_BASE_URI = "defaultBaseURI";
    bytes32 constant FIELD_RANDOMIZER_ADDRESS = "randomizerAddress";
    bytes32 constant FIELD_ARTBLOCKS_DEPENDENCY_REGISTRY_ADDRESS =
        "dependencyRegistryAddress";
    bytes32 constant FIELD_PROVIDER_SALES_ADDRESSES = "providerSalesAddresses";
    bytes32 constant FIELD_PROVIDER_PRIMARY_SALES_PERCENTAGES =
        "providerPrimaryPercentages";
    bytes32 constant FIELD_PROVIDER_SECONDARY_SALES_BPS =
        "providerSecondaryBPS";
    // The following fields are used to indicate which project-level parameter
    // has been updated in the `ProjectUpdated` event:
    bytes32 constant FIELD_PROJECT_COMPLETED = "completed";
    bytes32 constant FIELD_PROJECT_ACTIVE = "active";
    bytes32 constant FIELD_PROJECT_ARTIST_ADDRESS = "artistAddress";
    bytes32 constant FIELD_PROJECT_PAUSED = "paused";
    bytes32 constant FIELD_PROJECT_CREATED = "created";
    bytes32 constant FIELD_PROJECT_NAME = "name";
    bytes32 constant FIELD_PROJECT_ARTIST_NAME = "artistName";
    bytes32 constant FIELD_PROJECT_SECONDARY_MARKET_ROYALTY_PERCENTAGE =
        "royaltyPercentage";
    bytes32 constant FIELD_PROJECT_DESCRIPTION = "description";
    bytes32 constant FIELD_PROJECT_WEBSITE = "website";
    bytes32 constant FIELD_PROJECT_LICENSE = "license";
    bytes32 constant FIELD_PROJECT_MAX_INVOCATIONS = "maxInvocations";
    bytes32 constant FIELD_PROJECT_SCRIPT = "script";
    bytes32 constant FIELD_PROJECT_SCRIPT_TYPE = "scriptType";
    bytes32 constant FIELD_PROJECT_ASPECT_RATIO = "aspectRatio";
    bytes32 constant FIELD_PROJECT_BASE_URI = "baseURI";

    /// Dependency registry managed by Art Blocks
    address public artblocksDependencyRegistryAddress;

    /// current randomizer contract
    IRandomizer_V3CoreBase public randomizerContract;

    /// append-only array of all randomizer contract addresses ever used by
    /// this contract
    address[] private _historicalRandomizerAddresses;

    /// admin ACL contract
    IAdminACLV0 public adminACLContract;

    struct Project {
        uint24 invocations;
        uint24 maxInvocations;
        uint24 scriptCount;
        // max uint64 ~= 1.8e19 sec ~= 570 billion years
        uint64 completedTimestamp;
        bool active;
        bool paused;
        string name;
        string artist;
        string description;
        string website;
        string license;
        string projectBaseURI;
        bytes32 scriptTypeAndVersion;
        string aspectRatio;
        // mapping from script index to address storing script in bytecode
        mapping(uint256 => address) scriptBytecodeAddresses;
    }

    mapping(uint256 => Project) projects;

    /// packed struct containing project financial information
    struct ProjectFinance {
        address payable additionalPayeePrimarySales;
        // packed uint: max of 95, max uint8 = 255
        uint8 secondaryMarketRoyaltyPercentage;
        address payable additionalPayeeSecondarySales;
        // packed uint: max of 100, max uint8 = 255
        uint8 additionalPayeeSecondarySalesPercentage;
        address payable artistAddress;
        // packed uint: max of 100, max uint8 = 255
        uint8 additionalPayeePrimarySalesPercentage;
    }
    // Project financials mapping
    mapping(uint256 => ProjectFinance) projectIdToFinancials;

    /// hash of artist's proposed payment updates to be approved by admin
    mapping(uint256 => bytes32) public proposedArtistAddressesAndSplitsHash;

    /// The render provider payment address for all primary sales revenues
    /// (packed)
    address payable public renderProviderPrimarySalesAddress;
    /// Percentage of primary sales revenue allocated to the render provider
    /// (packed)
    // packed uint: max of 100, max uint8 = 255
    uint8 private _renderProviderPrimarySalesPercentage = 10;
    /// The platform provider payment address for all primary sales revenues
    /// (packed)
    address payable public platformProviderPrimarySalesAddress;
    /// Percentage of primary sales revenue allocated to the platform provider
    /// (packed)
    // packed uint: max of 100, max uint8 = 255
    uint8 private _platformProviderPrimarySalesPercentage = 10;

    /// The render provider payment address for all secondary sales royalty
    /// revenues
    address payable public renderProviderSecondarySalesAddress;
    /// Basis Points of secondary sales royalties allocated to the
    /// render provider
    uint256 public renderProviderSecondarySalesBPS = 250;
    /// The platform provider payment address for all secondary sales royalty
    /// revenues
    address payable public platformProviderSecondarySalesAddress;
    /// Basis Points of secondary sales royalties allocated to the
    /// platform provider
    uint256 public platformProviderSecondarySalesBPS = 250;

    /// single minter allowed for this core contract
    address public minterContract;

    /// starting (initial) project ID on this contract
    uint256 public immutable startingProjectId;

    /// next project ID to be created
    uint248 private _nextProjectId;

    /// bool indicating if adding new projects is forbidden;
    /// default behavior is to allow new projects
    bool public newProjectsForbidden;

    /// configuration variable (determined at time of deployment)
    /// that determines whether or not admin approval^ should be required
    /// to accept artist address change proposals, or if these proposals
    /// should always auto-approve, as determined by the business process
    /// requirements of the Engine partner using this contract.
    ///
    /// ^does not apply in the case where contract-ownership itself is revoked
    bool public immutable autoApproveArtistSplitProposals;

    /// version & type of this core contract
    bytes32 constant CORE_VERSION = "v3.1.2";

    function coreVersion() external pure returns (string memory) {
        return CORE_VERSION.toString();
    }

    bytes32 constant CORE_TYPE = "GenArt721CoreV3_Engine";

    function coreType() external pure returns (string memory) {
        return CORE_TYPE.toString();
    }

    /// default base URI to initialize all new project projectBaseURI values to
    string public defaultBaseURI;

    function _onlyNonZeroAddress(address _address) internal pure {
        require(_address != address(0), "Must input non-zero address");
    }

    function _onlyNonEmptyString(string memory _string) internal pure {
        require(bytes(_string).length != 0, "Must input non-empty string");
    }

    function _onlyValidTokenId(uint256 _tokenId) internal view {
        require(_exists(_tokenId), "Token ID does not exist");
    }

    function _onlyValidProjectId(uint256 _projectId) internal view {
        require(
            (_projectId >= startingProjectId) && (_projectId < _nextProjectId),
            "Project ID does not exist"
        );
    }

    function _onlyUnlocked(uint256 _projectId) internal view {
        // Note: calling `_projectUnlocked` enforces that the `_projectId`
        //       passed in is valid.`
        require(_projectUnlocked(_projectId), "Only if unlocked");
    }

    function _onlyAdminACL(bytes4 _selector) internal {
        require(
            adminACLAllowed(msg.sender, address(this), _selector),
            "Only Admin ACL allowed"
        );
    }

    function _onlyArtist(uint256 _projectId) internal view {
        require(
            msg.sender == projectIdToFinancials[_projectId].artistAddress,
            "Only artist"
        );
    }

    function _onlyArtistOrAdminACL(
        uint256 _projectId,
        bytes4 _selector
    ) internal {
        require(
            msg.sender == projectIdToFinancials[_projectId].artistAddress ||
                adminACLAllowed(msg.sender, address(this), _selector),
            "Only artist or Admin ACL allowed"
        );
    }

    /**
     * This modifier allows the artist of a project to call a function if the
     * owner of the contract has renounced ownership. This is to allow the
     * contract to continue to function if the owner decides to renounce
     * ownership.
     */
    function _onlyAdminACLOrRenouncedArtist(
        uint256 _projectId,
        bytes4 _selector
    ) internal {
        require(
            adminACLAllowed(msg.sender, address(this), _selector) ||
                (owner() == address(0) &&
                    msg.sender ==
                    projectIdToFinancials[_projectId].artistAddress),
            "Only Admin ACL allowed, or artist if owner has renounced"
        );
    }

    /**
     * @notice Initializes contract.
     * @param _tokenName Name of token.
     * @param _tokenSymbol Token symbol.
     * @param _randomizerContract Randomizer contract.
     * @param _adminACLContract Address of admin access control contract, to be
     * set as contract owner.
     * @param _startingProjectId The initial next project ID.
     * @param _autoApproveArtistSplitProposals Whether or not to always
     * auto-approve proposed artist split updates.
     * @dev _startingProjectId should be set to a value much, much less than
     * max(uint248), but an explicit input type of `uint248` is used as it is
     * safer to cast up to `uint256` than it is to cast down for the purposes
     * of setting `_nextProjectId`.
     */
    constructor(
        string memory _tokenName,
        string memory _tokenSymbol,
        address _renderProviderAddress,
        address _platformProviderAddress,
        address _randomizerContract,
        address _adminACLContract,
        uint248 _startingProjectId,
        bool _autoApproveArtistSplitProposals,
        address _engineRegistryContract
    ) ERC721_PackedHashSeed(_tokenName, _tokenSymbol) {
        _onlyNonZeroAddress(_renderProviderAddress);
        _onlyNonZeroAddress(_platformProviderAddress);
        _onlyNonZeroAddress(_randomizerContract);
        _onlyNonZeroAddress(_adminACLContract);
        // setup immutable `autoApproveArtistSplitProposals` config
        autoApproveArtistSplitProposals = _autoApproveArtistSplitProposals;
        // record contracts starting project ID
        // casting-up is safe
        startingProjectId = uint256(_startingProjectId);
        _updateProviderSalesAddresses(
            _renderProviderAddress,
            _renderProviderAddress,
            _platformProviderAddress,
            _platformProviderAddress
        );
        _updateRandomizerAddress(_randomizerContract);
        // set AdminACL management contract as owner
        _transferOwnership(_adminACLContract);
        // initialize default base URI
        _updateDefaultBaseURI(
            string.concat(
                "https://token.artblocks.io/",
                address(this).toHexString(),
                "/"
            )
        );
        // initialize next project ID
        _nextProjectId = _startingProjectId;
        emit PlatformUpdated(FIELD_NEXT_PROJECT_ID);
        // register contract as an Engine contract
        IEngineRegistryV0(_engineRegistryContract).registerContract(
            address(this),
            CORE_VERSION,
            CORE_TYPE
        );
    }

    /**
     * @notice Mints a token from project `_projectId` and sets the
     * token's owner to `_to`. Hash may or may not be assigned to the token
     * during the mint transaction, depending on the randomizer contract.
     * @param _to Address to be the minted token's owner.
     * @param _projectId Project ID to mint a token on.
     * @param _by Purchaser of minted token.
     * @return _tokenId The ID of the minted token.
     * @dev sender must be the allowed minterContract
     * @dev name of function is optimized for gas usage
     */
    function mint_Ecf(
        address _to,
        uint256 _projectId,
        address _by
    ) external returns (uint256 _tokenId) {
        // CHECKS
        require(msg.sender == minterContract, "Must mint from minter contract");
        Project storage project = projects[_projectId];
        // load invocations into memory
        uint24 invocationsBefore = project.invocations;
        uint24 invocationsAfter;
        unchecked {
            // invocationsBefore guaranteed <= maxInvocations <= 1_000_000,
            // 1_000_000 << max uint24, so no possible overflow
            invocationsAfter = invocationsBefore + 1;
        }
        uint24 maxInvocations = project.maxInvocations;

        require(
            invocationsBefore < maxInvocations,
            "Must not exceed max invocations"
        );
        require(
            project.active ||
                _by == projectIdToFinancials[_projectId].artistAddress,
            "Project must exist and be active"
        );
        require(
            !project.paused ||
                _by == projectIdToFinancials[_projectId].artistAddress,
            "Purchases are paused."
        );

        // EFFECTS
        // increment project's invocations
        project.invocations = invocationsAfter;
        uint256 thisTokenId;
        unchecked {
            // invocationsBefore is uint24 << max uint256. In production use,
            // _projectId * ONE_MILLION must be << max uint256, otherwise
            // tokenIdToProjectId function become invalid.
            // Therefore, no risk of overflow
            thisTokenId = (_projectId * ONE_MILLION) + invocationsBefore;
        }

        // mark project as completed if hit max invocations
        if (invocationsAfter == maxInvocations) {
            _completeProject(_projectId);
        }

        // INTERACTIONS
        _mint(_to, thisTokenId);

        // token hash is updated by the randomizer contract on V3
        randomizerContract.assignTokenHash(thisTokenId);

        // Do not need to also log `projectId` in event, as the `projectId` for
        // a given token can be derived from the `tokenId` with:
        //   projectId = tokenId / 1_000_000
        emit Mint(_to, thisTokenId);

        return thisTokenId;
    }

    /**
     * @notice Sets the hash seed for a given token ID `_tokenId`.
     * May only be called by the current randomizer contract.
     * May only be called for tokens that have not already been assigned a
     * non-zero hash.
     * @param _tokenId Token ID to set the hash for.
     * @param _hashSeed Hash seed to set for the token ID. Only last 12 bytes
     * will be used.
     * @dev gas-optimized function name because called during mint sequence
     * @dev if a separate event is required when the token hash is set, e.g.
     * for indexing purposes, it must be emitted by the randomizer. This is to
     * minimize gas when minting.
     */
    function setTokenHash_8PT(uint256 _tokenId, bytes32 _hashSeed) external {
        _onlyValidTokenId(_tokenId);

        OwnerAndHashSeed storage ownerAndHashSeed = _ownersAndHashSeeds[
            _tokenId
        ];
        require(
            msg.sender == address(randomizerContract),
            "Only randomizer may set"
        );
        require(
            ownerAndHashSeed.hashSeed == bytes12(0),
            "Token hash already set"
        );
        require(_hashSeed != bytes12(0), "No zero hash seed");
        ownerAndHashSeed.hashSeed = bytes12(_hashSeed);
    }

    /**
     * @notice Allows owner (AdminACL) to revoke ownership of the contract.
     * Note that the contract is intended to continue to function after the
     * owner renounces ownership, but no new projects will be able to be added.
     * Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the
     * owner/AdminACL contract. The same is true for any dependent contracts
     * that also integrate with the owner/AdminACL contract (e.g. potentially
     * minter suite contracts, registry contracts, etc.).
     * After renouncing ownership, artists will be in control of updates to
     * their payment addresses and splits (see modifier
     * onlyAdminACLOrRenouncedArtist`).
     * While there is no currently intended reason to call this method based on
     * typical Engine partner business practices, this method exists to allow
     * artists to continue to maintain the limited set of contract
     * functionality that exists post-project-lock in an environment in which
     * there is no longer an admin maintaining this smart contract.
     * @dev This function is intended to be called directly by the AdminACL,
     * not by an address allowed by the AdminACL contract.
     */
    function renounceOwnership() public override onlyOwner {
        // broadcast that new projects are no longer allowed (if not already)
        _forbidNewProjects();
        // renounce ownership viw Ownable
        Ownable.renounceOwnership();
    }

    /**
     * @notice Updates reference to Art Blocks Dependency Registry contract.
     * @param _artblocksDependencyRegistryAddress Address of new Dependency
     * Registry.
     */
    function updateArtblocksDependencyRegistryAddress(
        address _artblocksDependencyRegistryAddress
    ) external {
        _onlyAdminACL(this.updateArtblocksDependencyRegistryAddress.selector);
        _onlyNonZeroAddress(_artblocksDependencyRegistryAddress);
        artblocksDependencyRegistryAddress = _artblocksDependencyRegistryAddress;
        emit PlatformUpdated(FIELD_ARTBLOCKS_DEPENDENCY_REGISTRY_ADDRESS);
    }

    /**
     * @notice Updates sales addresses for the platform and render providers to
     * the input parameters.
     * @param _renderProviderPrimarySalesAddress Address of new primary sales
     * payment address.
     * @param _renderProviderSecondarySalesAddress Address of new secondary sales
     * payment address.
     * @param _platformProviderPrimarySalesAddress Address of new primary sales
     * payment address.
     * @param _platformProviderSecondarySalesAddress Address of new secondary sales
     * payment address.
     */
    function updateProviderSalesAddresses(
        address payable _renderProviderPrimarySalesAddress,
        address payable _renderProviderSecondarySalesAddress,
        address payable _platformProviderPrimarySalesAddress,
        address payable _platformProviderSecondarySalesAddress
    ) external {
        _onlyAdminACL(this.updateProviderSalesAddresses.selector);
        _onlyNonZeroAddress(_renderProviderPrimarySalesAddress);
        _onlyNonZeroAddress(_renderProviderSecondarySalesAddress);
        _onlyNonZeroAddress(_platformProviderPrimarySalesAddress);
        _onlyNonZeroAddress(_platformProviderSecondarySalesAddress);
        _updateProviderSalesAddresses(
            _renderProviderPrimarySalesAddress,
            _renderProviderSecondarySalesAddress,
            _platformProviderPrimarySalesAddress,
            _platformProviderSecondarySalesAddress
        );
    }

    /**
     * @notice Updates the render and platform provider primary sales revenue percentage to
     * the provided inputs.
     * @param renderProviderPrimarySalesPercentage_ New primary sales revenue % for the render provider
     * @param platformProviderPrimarySalesPercentage_ New primary sales revenue % for the platform provider
     * percentage.
     */
    function updateProviderPrimarySalesPercentages(
        uint256 renderProviderPrimarySalesPercentage_,
        uint256 platformProviderPrimarySalesPercentage_
    ) external {
        _onlyAdminACL(this.updateProviderPrimarySalesPercentages.selector);

        // Validate that the sum of the proposed %s, does not exceed 100%.
        require(
            (renderProviderPrimarySalesPercentage_ +
                platformProviderPrimarySalesPercentage_) <= ONE_HUNDRED,
            "Max sum of ONE_HUNDRED %"
        );
        // Casting to `uint8` here is safe due check above, which does not allow
        // overflow as of solidity version ^0.8.0.
        _renderProviderPrimarySalesPercentage = uint8(
            renderProviderPrimarySalesPercentage_
        );
        _platformProviderPrimarySalesPercentage = uint8(
            platformProviderPrimarySalesPercentage_
        );
        emit PlatformUpdated(FIELD_PROVIDER_PRIMARY_SALES_PERCENTAGES);
    }

    /**
     * @notice Updates render and platform provider secondary sales royalty Basis Points to
     * the provided inputs.
     * @param _renderProviderSecondarySalesBPS New secondary sales royalty Basis
     * points.
     * @param _platformProviderSecondarySalesBPS New secondary sales royalty Basis
     * points.
     * @dev Due to secondary royalties being ultimately enforced via social
     * consensus, no hard upper limit is imposed on the BPS value, other than
     * <= 100% royalty, which would not make mathematical sense. Realistically,
     * changing this value is expected to either never occur, or be a rare
     * occurrence.
     */
    function updateProviderSecondarySalesBPS(
        uint256 _renderProviderSecondarySalesBPS,
        uint256 _platformProviderSecondarySalesBPS
    ) external {
        _onlyAdminACL(this.updateProviderSecondarySalesBPS.selector);
        // Validate that the sum of the proposed provider BPS, does not exceed 10_000 BPS.
        require(
            (_renderProviderSecondarySalesBPS +
                _platformProviderSecondarySalesBPS) <=
                MAX_PROVIDER_SECONDARY_SALES_BPS,
            "Over max sum of BPS"
        );
        renderProviderSecondarySalesBPS = _renderProviderSecondarySalesBPS;
        platformProviderSecondarySalesBPS = _platformProviderSecondarySalesBPS;
        emit PlatformUpdated(FIELD_PROVIDER_SECONDARY_SALES_BPS);
    }

    /**
     * @notice Updates minter to `_address`.
     * @param _address Address of new minter.
     */
    function updateMinterContract(address _address) external {
        _onlyAdminACL(this.updateMinterContract.selector);
        _onlyNonZeroAddress(_address);
        minterContract = _address;
        emit MinterUpdated(_address);
    }

    /**
     * @notice Updates randomizer to `_randomizerAddress`.
     * @param _randomizerAddress Address of new randomizer.
     */
    function updateRandomizerAddress(address _randomizerAddress) external {
        _onlyAdminACL(this.updateRandomizerAddress.selector);
        _onlyNonZeroAddress(_randomizerAddress);
        _updateRandomizerAddress(_randomizerAddress);
    }

    /**
     * @notice Toggles project `_projectId` as active/inactive.
     * @param _projectId Project ID to be toggled.
     */
    function toggleProjectIsActive(uint256 _projectId) external {
        _onlyAdminACL(this.toggleProjectIsActive.selector);
        _onlyValidProjectId(_projectId);
        projects[_projectId].active = !projects[_projectId].active;
        emit ProjectUpdated(_projectId, FIELD_PROJECT_ACTIVE);
    }

    /**
     * @notice Artist proposes updated set of artist address, additional payee
     * addresses, and percentage splits for project `_projectId`. Addresses and
     * percentages do not have to all be changed, but they must all be defined
     * as a complete set.
     * Note that if the artist is only proposing a change to the payee percentage
     * splits, without modifying the payee addresses, the proposal will be
     * automatically approved and the new splits will become active immediately.
     * Automatic approval will also be granted if the artist is only removing
     * additional payee addresses, without adding any new ones.
     * Also note that if `autoApproveArtistSplitProposals` is true, proposals
     * will always be auto-approved, regardless of what is being changed.
     * Also note that if the artist is proposing sending funds to the zero
     * address, this function will revert and the proposal will not be created.
     * @param _projectId Project ID.
     * @param _artistAddress Artist address that controls the project, and may
     * receive payments.
     * @param _additionalPayeePrimarySales Address that may receive a
     * percentage split of the artist's primary sales revenue.
     * @param _additionalPayeePrimarySalesPercentage Percent of artist's
     * portion of primary sale revenue that will be split to address
     * `_additionalPayeePrimarySales`.
     * @param _additionalPayeeSecondarySales Address that may receive a percentage
     * split of the secondary sales royalties.
     * @param _additionalPayeeSecondarySalesPercentage Percent of artist's portion
     * of secondary sale royalties that will be split to address
     * `_additionalPayeeSecondarySales`.
     * @dev `_artistAddress` must be a valid address (non-zero-address), but it
     * is intentionally allowable for `_additionalPayee{Primary,Secondaary}Sales`
     * and their associated percentages to be zero'd out by the controlling artist.
     */
    function proposeArtistPaymentAddressesAndSplits(
        uint256 _projectId,
        address payable _artistAddress,
        address payable _additionalPayeePrimarySales,
        uint256 _additionalPayeePrimarySalesPercentage,
        address payable _additionalPayeeSecondarySales,
        uint256 _additionalPayeeSecondarySalesPercentage
    ) external {
        _onlyValidProjectId(_projectId);
        _onlyArtist(_projectId);
        _onlyNonZeroAddress(_artistAddress);
        ProjectFinance storage projectFinance = projectIdToFinancials[
            _projectId
        ];
        // checks
        require(
            _additionalPayeePrimarySalesPercentage <= ONE_HUNDRED &&
                _additionalPayeeSecondarySalesPercentage <= ONE_HUNDRED,
            "Max of 100%"
        );
        require(
            _additionalPayeePrimarySalesPercentage == 0 ||
                _additionalPayeePrimarySales != address(0),
            "Primary payee is zero address"
        );
        require(
            _additionalPayeeSecondarySalesPercentage == 0 ||
                _additionalPayeeSecondarySales != address(0),
            "Secondary payee is zero address"
        );
        // effects
        // emit event for off-chain indexing
        // note: always emit a proposal event, even in the pathway of
        // automatic approval, to simplify indexing expectations
        emit ProposedArtistAddressesAndSplits(
            _projectId,
            _artistAddress,
            _additionalPayeePrimarySales,
            _additionalPayeePrimarySalesPercentage,
            _additionalPayeeSecondarySales,
            _additionalPayeeSecondarySalesPercentage
        );
        // automatically accept if no proposed addresses modifications, or if
        // the proposal only removes payee addresses, or if contract is set to
        // always auto-approve.
        // store proposal hash on-chain, only if not automatic accept
        bool automaticAccept = autoApproveArtistSplitProposals;
        if (!automaticAccept) {
            // block scope to avoid stack too deep error
            bool artistUnchanged = _artistAddress ==
                projectFinance.artistAddress;
            bool additionalPrimaryUnchangedOrRemoved = (_additionalPayeePrimarySales ==
                    projectFinance.additionalPayeePrimarySales) ||
                    (_additionalPayeePrimarySales == address(0));
            bool additionalSecondaryUnchangedOrRemoved = (_additionalPayeeSecondarySales ==
                    projectFinance.additionalPayeeSecondarySales) ||
                    (_additionalPayeeSecondarySales == address(0));
            automaticAccept =
                artistUnchanged &&
                additionalPrimaryUnchangedOrRemoved &&
                additionalSecondaryUnchangedOrRemoved;
        }
        if (automaticAccept) {
            // clear any previously proposed values
            proposedArtistAddressesAndSplitsHash[_projectId] = bytes32(0);
            // update storage
            // artist address can change during automatic accept if
            // autoApproveArtistSplitProposals is true
            projectFinance.artistAddress = _artistAddress;
            projectFinance
                .additionalPayeePrimarySales = _additionalPayeePrimarySales;
            // safe to cast as uint8 as max is 100%, max uint8 is 255
            projectFinance.additionalPayeePrimarySalesPercentage = uint8(
                _additionalPayeePrimarySalesPercentage
            );
            projectFinance
                .additionalPayeeSecondarySales = _additionalPayeeSecondarySales;
            // safe to cast as uint8 as max is 100%, max uint8 is 255
            projectFinance.additionalPayeeSecondarySalesPercentage = uint8(
                _additionalPayeeSecondarySalesPercentage
            );
            // emit event for off-chain indexing
            emit AcceptedArtistAddressesAndSplits(_projectId);
        } else {
            proposedArtistAddressesAndSplitsHash[_projectId] = keccak256(
                abi.encode(
                    _artistAddress,
                    _additionalPayeePrimarySales,
                    _additionalPayeePrimarySalesPercentage,
                    _additionalPayeeSecondarySales,
                    _additionalPayeeSecondarySalesPercentage
                )
            );
        }
    }

    /**
     * @notice Admin accepts a proposed set of updated artist address,
     * additional payee addresses, and percentage splits for project
     * `_projectId`. Addresses and percentages do not have to all be changed,
     * but they must all be defined as a complete set.
     * @param _projectId Project ID.
     * @param _artistAddress Artist address that controls the project, and may
     * receive payments.
     * @param _additionalPayeePrimarySales Address that may receive a
     * percentage split of the artist's primary sales revenue.
     * @param _additionalPayeePrimarySalesPercentage Percent of artist's
     * portion of primary sale revenue that will be split to address
     * `_additionalPayeePrimarySales`.
     * @param _additionalPayeeSecondarySales Address that may receive a percentage
     * split of the secondary sales royalties.
     * @param _additionalPayeeSecondarySalesPercentage Percent of artist's portion
     * of secondary sale royalties that will be split to address
     * `_additionalPayeeSecondarySales`.
     * @dev this must be called by the Admin ACL contract, and must only accept
     * the most recent proposed values for a given project (validated on-chain
     * by comparing the hash of the proposed and accepted values).
     * @dev `_artistAddress` must be a valid address (non-zero-address), but it
     * is intentionally allowable for `_additionalPayee{Primary,Secondaary}Sales`
     * and their associated percentages to be zero'd out by the controlling artist.
     */
    function adminAcceptArtistAddressesAndSplits(
        uint256 _projectId,
        address payable _artistAddress,
        address payable _additionalPayeePrimarySales,
        uint256 _additionalPayeePrimarySalesPercentage,
        address payable _additionalPayeeSecondarySales,
        uint256 _additionalPayeeSecondarySalesPercentage
    ) external {
        _onlyValidProjectId(_projectId);
        _onlyAdminACLOrRenouncedArtist(
            _projectId,
            this.adminAcceptArtistAddressesAndSplits.selector
        );
        _onlyNonZeroAddress(_artistAddress);
        // checks
        require(
            proposedArtistAddressesAndSplitsHash[_projectId] ==
                keccak256(
                    abi.encode(
                        _artistAddress,
                        _additionalPayeePrimarySales,
                        _additionalPayeePrimarySalesPercentage,
                        _additionalPayeeSecondarySales,
                        _additionalPayeeSecondarySalesPercentage
                    )
                ),
            "Must match artist proposal"
        );
        // effects
        ProjectFinance storage projectFinance = projectIdToFinancials[
            _projectId
        ];
        projectFinance.artistAddress = _artistAddress;
        projectFinance
            .additionalPayeePrimarySales = _additionalPayeePrimarySales;
        projectFinance.additionalPayeePrimarySalesPercentage = uint8(
            _additionalPayeePrimarySalesPercentage
        );
        projectFinance
            .additionalPayeeSecondarySales = _additionalPayeeSecondarySales;
        projectFinance.additionalPayeeSecondarySalesPercentage = uint8(
            _additionalPayeeSecondarySalesPercentage
        );
        // clear proposed values
        proposedArtistAddressesAndSplitsHash[_projectId] = bytes32(0);
        // emit event for off-chain indexing
        emit AcceptedArtistAddressesAndSplits(_projectId);
    }

    /**
     * @notice Updates artist of project `_projectId` to `_artistAddress`.
     * This is to only be used in the event that the artist address is
     * compromised or sanctioned.
     * @param _projectId Project ID.
     * @param _artistAddress New artist address.
     */
    function updateProjectArtistAddress(
        uint256 _projectId,
        address payable _artistAddress
    ) external {
        _onlyValidProjectId(_projectId);
        _onlyAdminACLOrRenouncedArtist(
            _projectId,
            this.updateProjectArtistAddress.selector
        );
        _onlyNonZeroAddress(_artistAddress);
        projectIdToFinancials[_projectId].artistAddress = _artistAddress;
        emit ProjectUpdated(_projectId, FIELD_PROJECT_ARTIST_ADDRESS);
    }

    /**
     * @notice Toggles paused state of project `_projectId`.
     * @param _projectId Project ID to be toggled.
     */
    function toggleProjectIsPaused(uint256 _projectId) external {
        _onlyArtist(_projectId);
        projects[_projectId].paused = !projects[_projectId].paused;
        emit ProjectUpdated(_projectId, FIELD_PROJECT_PAUSED);
    }

    /**
     * @notice Adds new project `_projectName` by `_artistAddress`.
     * @param _projectName Project name.
     * @param _artistAddress Artist's address.
     * @dev token price now stored on minter
     */
    function addProject(
        string memory _projectName,
        address payable _artistAddress
    ) external {
        _onlyAdminACL(this.addProject.selector);
        _onlyNonEmptyString(_projectName);
        _onlyNonZeroAddress(_artistAddress);
        require(!newProjectsForbidden, "New projects forbidden");
        uint256 projectId = _nextProjectId;
        projectIdToFinancials[projectId].artistAddress = _artistAddress;
        projects[projectId].name = _projectName;
        projects[projectId].paused = true;
        projects[projectId].maxInvocations = ONE_MILLION_UINT24;
        projects[projectId].projectBaseURI = defaultBaseURI;

        _nextProjectId = uint248(projectId) + 1;
        emit ProjectUpdated(projectId, FIELD_PROJECT_CREATED);
    }

    /**
     * @notice Forever forbids new projects from being added to this contract.
     */
    function forbidNewProjects() external {
        _onlyAdminACL(this.forbidNewProjects.selector);
        require(!newProjectsForbidden, "Already forbidden");
        _forbidNewProjects();
    }

    /**
     * @notice Updates name of project `_projectId` to be `_projectName`.
     * @param _projectId Project ID.
     * @param _projectName New project name.
     */
    function updateProjectName(
        uint256 _projectId,
        string memory _projectName
    ) external {
        _onlyUnlocked(_projectId);
        _onlyArtistOrAdminACL(_projectId, this.updateProjectName.selector);
        _onlyNonEmptyString(_projectName);
        projects[_projectId].name = _projectName;
        emit ProjectUpdated(_projectId, FIELD_PROJECT_NAME);
    }

    /**
     * @notice Updates artist name for project `_projectId` to be
     * `_projectArtistName`.
     * @param _projectId Project ID.
     * @param _projectArtistName New artist name.
     */
    function updateProjectArtistName(
        uint256 _projectId,
        string memory _projectArtistName
    ) external {
        _onlyUnlocked(_projectId);
        _onlyArtistOrAdminACL(
            _projectId,
            this.updateProjectArtistName.selector
        );
        _onlyNonEmptyString(_projectArtistName);
        projects[_projectId].artist = _projectArtistName;
        emit ProjectUpdated(_projectId, FIELD_PROJECT_ARTIST_NAME);
    }

    /**
     * @notice Updates artist secondary market royalties for project
     * `_projectId` to be `_secondMarketRoyalty` percent.
     * This DOES NOT include the secondary market royalty percentages collected
     * by the issuing platform; it is only the total percentage of royalties
     * that will be split to artist and additionalSecondaryPayee.
     * @param _projectId Project ID.
     * @param _secondMarketRoyalty Percent of secondary sales revenue that will
     * be split to artist and additionalSecondaryPayee. This must be less than
     * or equal to ARTIST_MAX_SECONDARY_ROYALTY_PERCENTAGE percent.
     */
    function updateProjectSecondaryMarketRoyaltyPercentage(
        uint256 _projectId,
        uint256 _secondMarketRoyalty
    ) external {
        _onlyArtist(_projectId);
        require(
            _secondMarketRoyalty <= ARTIST_MAX_SECONDARY_ROYALTY_PERCENTAGE,
            "Over max percent"
        );
        projectIdToFinancials[_projectId]
            .secondaryMarketRoyaltyPercentage = uint8(_secondMarketRoyalty);
        emit ProjectUpdated(
            _projectId,
            FIELD_PROJECT_SECONDARY_MARKET_ROYALTY_PERCENTAGE
        );
    }

    /**
     * @notice Updates description of project `_projectId`.
     * Only artist may call when unlocked, only admin may call when locked.
     * @param _projectId Project ID.
     * @param _projectDescription New project description.
     */
    function updateProjectDescription(
        uint256 _projectId,
        string memory _projectDescription
    ) external {
        // checks
        require(
            _projectUnlocked(_projectId)
                ? msg.sender == projectIdToFinancials[_projectId].artistAddress
                : adminACLAllowed(
                    msg.sender,
                    address(this),
                    this.updateProjectDescription.selector
                ),
            "Only artist when unlocked, owner when locked"
        );
        // effects
        projects[_projectId].description = _projectDescription;
        emit ProjectUpdated(_projectId, FIELD_PROJECT_DESCRIPTION);
    }

    /**
     * @notice Updates website of project `_projectId` to be `_projectWebsite`.
     * @param _projectId Project ID.
     * @param _projectWebsite New project website.
     * @dev It is intentionally allowed for this to be set to the empty string.
     */
    function updateProjectWebsite(
        uint256 _projectId,
        string memory _projectWebsite
    ) external {
        _onlyArtist(_projectId);
        projects[_projectId].website = _projectWebsite;
        emit ProjectUpdated(_projectId, FIELD_PROJECT_WEBSITE);
    }

    /**
     * @notice Updates license for project `_projectId`.
     * @param _projectId Project ID.
     * @param _projectLicense New project license.
     */
    function updateProjectLicense(
        uint256 _projectId,
        string memory _projectLicense
    ) external {
        _onlyUnlocked(_projectId);
        _onlyArtistOrAdminACL(_projectId, this.updateProjectLicense.selector);
        _onlyNonEmptyString(_projectLicense);
        projects[_projectId].license = _projectLicense;
        emit ProjectUpdated(_projectId, FIELD_PROJECT_LICENSE);
    }

    /**
     * @notice Updates maximum invocations for project `_projectId` to
     * `_maxInvocations`. Maximum invocations may only be decreased by the
     * artist, and must be greater than or equal to current invocations.
     * New projects are created with maximum invocations of 1 million by
     * default.
     * @param _projectId Project ID.
     * @param _maxInvocations New maximum invocations.
     */
    function updateProjectMaxInvocations(
        uint256 _projectId,
        uint24 _maxInvocations
    ) external {
        _onlyArtist(_projectId);
        // CHECKS
        Project storage project = projects[_projectId];
        uint256 _invocations = project.invocations;
        require(
            (_maxInvocations < project.maxInvocations),
            "Only maxInvocations decrease"
        );
        require(_maxInvocations >= _invocations, "Only gte invocations");
        // EFFECTS
        project.maxInvocations = _maxInvocations;
        emit ProjectUpdated(_projectId, FIELD_PROJECT_MAX_INVOCATIONS);

        // register completed timestamp if action completed the project
        if (_maxInvocations == _invocations) {
            _completeProject(_projectId);
        }
    }

    /**
     * @notice Adds a script to project `_projectId`.
     * @param _projectId Project to be updated.
     * @param _script Script to be added. Required to be a non-empty string,
     * but no further validation is performed.
     */
    function addProjectScript(
        uint256 _projectId,
        string memory _script
    ) external {
        _onlyUnlocked(_projectId);
        _onlyArtistOrAdminACL(_projectId, this.addProjectScript.selector);
        _onlyNonEmptyString(_script);
        Project storage project = projects[_projectId];
        // store script in contract bytecode
        project.scriptBytecodeAddresses[project.scriptCount] = _script
            .writeToBytecode();
        project.scriptCount = project.scriptCount + 1;
        emit ProjectUpdated(_projectId, FIELD_PROJECT_SCRIPT);
    }

    /**
     * @notice Updates script for project `_projectId` at script ID `_scriptId`.
     * @param _projectId Project to be updated.
     * @param _scriptId Script ID to be updated.
     * @param _script The updated script value. Required to be a non-empty
     *                string, but no further validation is performed.
     */
    function updateProjectScript(
        uint256 _projectId,
        uint256 _scriptId,
        string memory _script
    ) external {
        _onlyUnlocked(_projectId);
        _onlyArtistOrAdminACL(_projectId, this.updateProjectScript.selector);
        _onlyNonEmptyString(_script);
        Project storage project = projects[_projectId];
        require(_scriptId < project.scriptCount, "scriptId out of range");
        // store script in contract bytecode, replacing reference address from
        // the old storage contract with the newly created one
        project.scriptBytecodeAddresses[_scriptId] = _script.writeToBytecode();
        emit ProjectUpdated(_projectId, FIELD_PROJECT_SCRIPT);
    }

    /**
     * @notice Removes last script from project `_projectId`.
     * @param _projectId Project to be updated.
     */
    function removeProjectLastScript(uint256 _projectId) external {
        _onlyUnlocked(_projectId);
        _onlyArtistOrAdminACL(
            _projectId,
            this.removeProjectLastScript.selector
        );
        Project storage project = projects[_projectId];
        require(project.scriptCount > 0, "No scripts to remove");
        // delete reference to old storage contract address
        delete project.scriptBytecodeAddresses[project.scriptCount - 1];
        unchecked {
            project.scriptCount = project.scriptCount - 1;
        }
        emit ProjectUpdated(_projectId, FIELD_PROJECT_SCRIPT);
    }

    /**
     * @notice Updates script type for project `_projectId`.
     * @param _projectId Project to be updated.
     * @param _scriptTypeAndVersion Script type and version e.g. "[email protected]",
     * as bytes32 encoded string.
     */
    function updateProjectScriptType(
        uint256 _projectId,
        bytes32 _scriptTypeAndVersion
    ) external {
        _onlyUnlocked(_projectId);
        _onlyArtistOrAdminACL(
            _projectId,
            this.updateProjectScriptType.selector
        );
        Project storage project = projects[_projectId];
        // require exactly one @ symbol in _scriptTypeAndVersion
        require(
            _scriptTypeAndVersion.containsExactCharacterQty(
                AT_CHARACTER_CODE,
                uint8(1)
            ),
            "must contain exactly one @"
        );
        project.scriptTypeAndVersion = _scriptTypeAndVersion;
        emit ProjectUpdated(_projectId, FIELD_PROJECT_SCRIPT_TYPE);
    }

    /**
     * @notice Updates project's aspect ratio.
     * @param _projectId Project to be updated.
     * @param _aspectRatio Aspect ratio to be set. Intended to be string in the
     * format of a decimal, e.g. "1" for square, "1.77777778" for 16:9, etc.,
     * allowing for a maximum of 10 digits and one (optional) decimal separator.
     */
    function updateProjectAspectRatio(
        uint256 _projectId,
        string memory _aspectRatio
    ) external {
        _onlyUnlocked(_projectId);
        _onlyArtistOrAdminACL(
            _projectId,
            this.updateProjectAspectRatio.selector
        );
        _onlyNonEmptyString(_aspectRatio);
        // Perform more detailed input validation for aspect ratio.
        bytes memory aspectRatioBytes = bytes(_aspectRatio);
        uint256 bytesLength = aspectRatioBytes.length;
        require(bytesLength <= 11, "Aspect ratio format too long");
        bool hasSeenDecimalSeparator = false;
        bool hasSeenNumber = false;
        for (uint256 i; i < bytesLength; i++) {
            bytes1 character = aspectRatioBytes[i];
            // Allow as many #s as desired.
            if (character >= 0x30 && character <= 0x39) {
                // 9-0
                // We need to ensure there is at least 1 `9-0` occurrence.
                hasSeenNumber = true;
                continue;
            }
            if (character == 0x2E) {
                // .
                // Allow no more than 1 `.` occurrence.
                if (!hasSeenDecimalSeparator) {
                    hasSeenDecimalSeparator = true;
                    continue;
                }
            }
            revert("Improperly formatted aspect ratio");
        }
        require(hasSeenNumber, "Aspect ratio has no numbers");

        projects[_projectId].aspectRatio = _aspectRatio;
        emit ProjectUpdated(_projectId, FIELD_PROJECT_ASPECT_RATIO);
    }

    /**
     * @notice Updates base URI for project `_projectId` to `_newBaseURI`.
     * This is the controlling base URI for all tokens in the project. The
     * contract-level defaultBaseURI is only used when initializing new
     * projects.
     * @param _projectId Project to be updated.
     * @param _newBaseURI New base URI.
     */
    function updateProjectBaseURI(
        uint256 _projectId,
        string memory _newBaseURI
    ) external {
        _onlyArtist(_projectId);
        _onlyNonEmptyString(_newBaseURI);
        projects[_projectId].projectBaseURI = _newBaseURI;
        emit ProjectUpdated(_projectId, FIELD_PROJECT_BASE_URI);
    }

    /**
     * @notice Updates default base URI to `_defaultBaseURI`. The
     * contract-level defaultBaseURI is only used when initializing new
     * projects. Token URIs are determined by their project's `projectBaseURI`.
     * @param _defaultBaseURI New default base URI.
     */
    function updateDefaultBaseURI(string memory _defaultBaseURI) external {
        _onlyAdminACL(this.updateDefaultBaseURI.selector);
        _onlyNonEmptyString(_defaultBaseURI);
        _updateDefaultBaseURI(_defaultBaseURI);
    }

    /**
     * @notice Next project ID to be created on this contract.
     * @return uint256 Next project ID.
     */
    function nextProjectId() external view returns (uint256) {
        return _nextProjectId;
    }

    /**
     * @notice Returns token hash for token ID `_tokenId`. Returns null if hash
     * has not been set.
     * @param _tokenId Token ID to be queried.
     * @return bytes32 Token hash.
     * @dev token hash is the keccak256 hash of the stored hash seed
     */
    function tokenIdToHash(uint256 _tokenId) external view returns (bytes32) {
        bytes12 _hashSeed = _ownersAndHashSeeds[_tokenId].hashSeed;
        if (_hashSeed == 0) {
            return 0;
        }
        return keccak256(abi.encode(_hashSeed));
    }

    /**
     * @notice Returns token hash **seed** for token ID `_tokenId`. Returns
     * null if hash seed has not been set. The hash seed id the bytes12 value
     * which is hashed to produce the token hash.
     * @param _tokenId Token ID to be queried.
     * @return bytes12 Token hash seed.
     * @dev token hash seed is keccak256 hashed to give the token hash
     */
    function tokenIdToHashSeed(
        uint256 _tokenId
    ) external view returns (bytes12) {
        return _ownersAndHashSeeds[_tokenId].hashSeed;
    }

    /**
     * @notice View function returning the render provider portion of
     * primary sales, in percent.
     * @return uint256 The render provider portion of primary sales,
     * in percent.
     */
    function renderProviderPrimarySalesPercentage()
        external
        view
        returns (uint256)
    {
        return _renderProviderPrimarySalesPercentage;
    }

    /**
     * @notice View function returning the platform provider portion of
     * primary sales, in percent.
     * @return uint256 The platform provider portion of primary sales,
     * in percent.
     */
    function platformProviderPrimarySalesPercentage()
        external
        view
        returns (uint256)
    {
        return _platformProviderPrimarySalesPercentage;
    }

    /**
     * @notice View function returning Artist's address for project
     * `_projectId`.
     * @param _projectId Project ID to be queried.
     * @return address Artist's address.
     */
    function projectIdToArtistAddress(
        uint256 _projectId
    ) external view returns (address payable) {
        return projectIdToFinancials[_projectId].artistAddress;
    }

    /**
     * @notice View function returning Artist's secondary market royalty
     * percentage for project `_projectId`.
     * This does not include render/platform providers portions of secondary
     * market royalties.
     * @param _projectId Project ID to be queried.
     * @return uint256 Artist's secondary market royalty percentage.
     */
    function projectIdToSecondaryMarketRoyaltyPercentage(
        uint256 _projectId
    ) external view returns (uint256) {
        return
            projectIdToFinancials[_projectId].secondaryMarketRoyaltyPercentage;
    }

    /**
     * @notice View function returning Artist's additional payee address for
     * primary sales, for project `_projectId`.
     * @param _projectId Project ID to be queried.
     * @return address Artist's additional payee address for primary sales.
     */
    function projectIdToAdditionalPayeePrimarySales(
        uint256 _projectId
    ) external view returns (address payable) {
        return projectIdToFinancials[_projectId].additionalPayeePrimarySales;
    }

    /**
     * @notice View function returning Artist's additional payee primary sales
     * percentage, for project `_projectId`.
     * @param _projectId Project ID to be queried.
     * @return uint256 Artist's additional payee primary sales percentage.
     */
    function projectIdToAdditionalPayeePrimarySalesPercentage(
        uint256 _projectId
    ) external view returns (uint256) {
        return
            projectIdToFinancials[_projectId]
                .additionalPayeePrimarySalesPercentage;
    }

    /**
     * @notice View function returning Artist's additional payee address for
     * secondary sales, for project `_projectId`.
     * @param _projectId Project ID to be queried.
     * @return address payable Artist's additional payee address for secondary
     * sales.
     */
    function projectIdToAdditionalPayeeSecondarySales(
        uint256 _projectId
    ) external view returns (address payable) {
        return projectIdToFinancials[_projectId].additionalPayeeSecondarySales;
    }

    /**
     * @notice View function returning Artist's additional payee secondary
     * sales percentage, for project `_projectId`.
     * @param _projectId Project ID to be queried.
     * @return uint256 Artist's additional payee secondary sales percentage.
     */
    function projectIdToAdditionalPayeeSecondarySalesPercentage(
        uint256 _projectId
    ) external view returns (uint256) {
        return
            projectIdToFinancials[_projectId]
                .additionalPayeeSecondarySalesPercentage;
    }

    /**
     * @notice Returns project details for project `_projectId`.
     * @param _projectId Project to be queried.
     * @return projectName Name of project
     * @return artist Artist of project
     * @return description Project description
     * @return website Project website
     * @return license Project license
     * @dev this function was named projectDetails prior to V3 core contract.
     */
    function projectDetails(
        uint256 _projectId
    )
        external
        view
        returns (
            string memory projectName,
            string memory artist,
            string memory description,
            string memory website,
            string memory license
        )
    {
        Project storage project = projects[_projectId];
        projectName = project.name;
        artist = project.artist;
        description = project.description;
        website = project.website;
        license = project.license;
    }

    /**
     * @notice Returns project state data for project `_projectId`.
     * @param _projectId Project to be queried
     * @return invocations Current number of invocations
     * @return maxInvocations Maximum allowed invocations
     * @return active Boolean representing if project is currently active
     * @return paused Boolean representing if project is paused
     * @return completedTimestamp zero if project not complete, otherwise
     * timestamp of project completion.
     * @return locked Boolean representing if project is locked
     * @dev price and currency info are located on minter contracts
     */
    function projectStateData(
        uint256 _projectId
    )
        external
        view
        returns (
            uint256 invocations,
            uint256 maxInvocations,
            bool active,
            bool paused,
            uint256 completedTimestamp,
            bool locked
        )
    {
        Project storage project = projects[_projectId];
        invocations = project.invocations;
        maxInvocations = project.maxInvocations;
        active = project.active;
        paused = project.paused;
        completedTimestamp = project.completedTimestamp;
        locked = !_projectUnlocked(_projectId);
    }

    /**
     * @notice Returns artist payment information for project `_projectId`.
     * @param _projectId Project to be queried
     * @return artistAddress Project Artist's address
     * @return additionalPayeePrimarySales Additional payee address for primary
     * sales
     * @return additionalPayeePrimarySalesPercentage Percentage of artist revenue
     * to be sent to the additional payee address for primary sales
     * @return additionalPayeeSecondarySales Additional payee address for secondary
     * sales royalties
     * @return additionalPayeeSecondarySalesPercentage Percentage of artist revenue
     * to be sent to the additional payee address for secondary sales royalties
     * @return secondaryMarketRoyaltyPercentage Royalty percentage to be sent to
     * combination of artist and additional payee. This does not include the
     * platform's percentage of secondary sales royalties, which is defined as
     * the sum of `renderProviderSecondarySalesBPS`
     * and `platformProviderSecondarySalesBPS`.
     */
    function projectArtistPaymentInfo(
        uint256 _projectId
    )
        external
        view
        returns (
            address artistAddress,
            address additionalPayeePrimarySales,
            uint256 additionalPayeePrimarySalesPercentage,
            address additionalPayeeSecondarySales,
            uint256 additionalPayeeSecondarySalesPercentage,
            uint256 secondaryMarketRoyaltyPercentage
        )
    {
        ProjectFinance storage projectFinance = projectIdToFinancials[
            _projectId
        ];
        artistAddress = projectFinance.artistAddress;
        additionalPayeePrimarySales = projectFinance
            .additionalPayeePrimarySales;
        additionalPayeePrimarySalesPercentage = projectFinance
            .additionalPayeePrimarySalesPercentage;
        additionalPayeeSecondarySales = projectFinance
            .additionalPayeeSecondarySales;
        additionalPayeeSecondarySalesPercentage = projectFinance
            .additionalPayeeSecondarySalesPercentage;
        secondaryMarketRoyaltyPercentage = projectFinance
            .secondaryMarketRoyaltyPercentage;
    }

    /**
     * @notice Returns script information for project `_projectId`.
     * @param _projectId Project to be queried.
     * @return scriptTypeAndVersion Project's script type and version
     * (e.g. "p5js(atSymbol)1.0.0")
     * @return aspectRatio Aspect ratio of project (e.g. "1" for square,
     * "1.77777778" for 16:9, etc.)
     * @return scriptCount Count of scripts for project
     */
    function projectScriptDetails(
        uint256 _projectId
    )
        external
        view
        override(IGenArt721CoreContractV3_Base, IDependencyRegistryCompatibleV0)
        returns (
            string memory scriptTypeAndVersion,
            string memory aspectRatio,
            uint256 scriptCount
        )
    {
        Project storage project = projects[_projectId];
        scriptTypeAndVersion = project.scriptTypeAndVersion.toString();
        aspectRatio = project.aspectRatio;
        scriptCount = project.scriptCount;
    }

    /**
     * @notice Returns address with bytecode containing project script for
     * project `_projectId` at script index `_index`.
     */
    function projectScriptBytecodeAddressByIndex(
        uint256 _projectId,
        uint256 _index
    ) external view returns (address) {
        return projects[_projectId].scriptBytecodeAddresses[_index];
    }

    /**
     * @notice Returns script for project `_projectId` at script index `_index`.
     * @param _projectId Project to be queried.
     * @param _index Index of script to be queried.
     */
    function projectScriptByIndex(
        uint256 _projectId,
        uint256 _index
    ) external view returns (string memory) {
        Project storage project = projects[_projectId];
        // If trying to access an out-of-index script, return the empty string.
        if (_index >= project.scriptCount) {
            return "";
        }
        return _readFromBytecode(project.scriptBytecodeAddresses[_index]);
    }

    /**
     * @notice Returns base URI for project `_projectId`.
     * @param _projectId Project to be queried.
     * @return projectBaseURI Base URI for project
     */
    function projectURIInfo(
        uint256 _projectId
    ) external view returns (string memory projectBaseURI) {
        projectBaseURI = projects[_projectId].projectBaseURI;
    }

    /**
     * @notice Backwards-compatible (pre-V3) function returning if `_minter` is
     * minterContract.
     * @param _minter Address to be queried.
     * @return bool Boolean representing if `_minter` is minterContract.
     */
    function isMintWhitelisted(address _minter) external view returns (bool) {
        return (minterContract == _minter);
    }

    /**
     * @notice Gets qty of randomizers in history of all randomizers used by
     * this core contract. If a randomizer is switched away from then back to,
     * it will show up in the history twice.
     * @return randomizerHistoryCount Count of randomizers in history
     */
    function numHistoricalRandomizers() external view returns (uint256) {
        return _historicalRandomizerAddresses.length;
    }

    /**
     * @notice Gets address of randomizer at index `_index` in history of all
     * randomizers used by this core contract. Index is zero-based.
     * @param _index Historical index of randomizer to be queried.
     * @return randomizerAddress Address of randomizer at index `_index`.
     * @dev If a randomizer is switched away from and then switched back to, it
     * will show up in the history twice.
     */
    function getHistoricalRandomizerAt(
        uint256 _index
    ) external view returns (address) {
        require(
            _index < _historicalRandomizerAddresses.length,
            "Index out of bounds"
        );
        return _historicalRandomizerAddresses[_index];
    }

    /**
     * @notice Gets royalty Basis Points (BPS) for token ID `_tokenId`.
     * This conforms to the IManifold interface designated in the Royalty
     * Registry's RoyaltyEngineV1.sol contract.
     * ref: https://github.com/manifoldxyz/royalty-registry-solidity
     * @param _tokenId Token ID to be queried.
     * @return recipients Array of royalty payment recipients
     * @return bps Array of Basis Points (BPS) allocated to each recipient,
     * aligned by index.
     * @dev reverts if invalid _tokenId
     * @dev only returns recipients that have a non-zero BPS allocation
     */
    function getRoyalties(
        uint256 _tokenId
    )
        external
        view
        returns (address payable[] memory recipients, uint256[] memory bps)
    {
        _onlyValidTokenId(_tokenId);
        // initialize arrays with maximum potential length
        recipients = new address payable[](4);
        bps = new uint256[](4);

        uint256 projectId = tokenIdToProjectId(_tokenId);
        ProjectFinance storage projectFinance = projectIdToFinancials[
            projectId
        ];
        // load values into memory
        uint256 royaltyPercentageForArtistAndAdditional = projectFinance
            .secondaryMarketRoyaltyPercentage;
        uint256 additionalPayeePercentage = projectFinance
            .additionalPayeeSecondarySalesPercentage;
        // calculate BPS = percentage * 100
        uint256 artistBPS = (ONE_HUNDRED - additionalPayeePercentage) *
            royaltyPercentageForArtistAndAdditional;

        uint256 additionalBPS = additionalPayeePercentage *
            royaltyPercentageForArtistAndAdditional;
        uint256 renderProviderBPS = renderProviderSecondarySalesBPS;
        uint256 platformProviderBPS = platformProviderSecondarySalesBPS;
        // populate arrays
        uint256 payeeCount;
        if (artistBPS > 0) {
            recipients[payeeCount] = projectFinance.artistAddress;
            bps[payeeCount++] = artistBPS;
        }
        if (additionalBPS > 0) {
            recipients[payeeCount] = projectFinance
                .additionalPayeeSecondarySales;
            bps[payeeCount++] = additionalBPS;
        }
        if (renderProviderBPS > 0) {
            recipients[payeeCount] = renderProviderSecondarySalesAddress;
            bps[payeeCount++] = renderProviderBPS;
        }
        if (platformProviderBPS > 0) {
            recipients[payeeCount] = platformProviderSecondarySalesAddress;
            bps[payeeCount++] = platformProviderBPS;
        }
        // trim arrays if necessary
        if (4 > payeeCount) {
            assembly {
                let decrease := sub(4, payeeCount)
                mstore(recipients, sub(mload(recipients), decrease))
                mstore(bps, sub(mload(bps), decrease))
            }
        }
        return (recipients, bps);
    }

    /**
     * @notice View function that returns appropriate revenue splits between
     * different render provider, platform provider, Artist, and Artist's
     * additional primary sales payee given a sale price of `_price` on
     * project `_projectId`.
     * This always returns four revenue amounts and four addresses, but if a
     * revenue is zero for either Artist or additional payee, the corresponding
     * address returned will also be null (for gas optimization).
     * Does not account for refund if user overpays for a token (minter should
     * handle a refund of the difference, if appropriate).
     * Some minters may have alternative methods of splitting payments, in
     * which case they should implement their own payment splitting logic.
     * @param _projectId Project ID to be queried.
     * @param _price Sale price of token.
     * @return renderProviderRevenue_ amount of revenue to be sent to the
     * render provider
     * @return renderProviderAddress_ address to send render provider revenue to
     * @return platformProviderRevenue_ amount of revenue to be sent to the
     * platform provider
     * @return platformProviderAddress_ address to send platform provider revenue to
     * @return artistRevenue_ amount of revenue to be sent to Artist
     * @return artistAddress_ address to send Artist revenue to. Will be null
     * if no revenue is due to artist (gas optimization).
     * @return additionalPayeePrimaryRevenue_ amount of revenue to be sent to
     * additional payee for primary sales
     * @return additionalPayeePrimaryAddress_ address to send Artist's
     * additional payee for primary sales revenue to. Will be null if no
     * revenue is due to additional payee for primary sales (gas optimization).
     * @dev this always returns four addresses and four revenues, but if the
     * revenue is zero, the corresponding address will be address(0). It is up
     * to the contract performing the revenue split to handle this
     * appropriately.
     */
    function getPrimaryRevenueSplits(
        uint256 _projectId,
        uint256 _price
    )
        external
        view
        returns (
            uint256 renderProviderRevenue_,
            address payable renderProviderAddress_,
            uint256 platformProviderRevenue_,
            address payable platformProviderAddress_,
            uint256 artistRevenue_,
            address payable artistAddress_,
            uint256 additionalPayeePrimaryRevenue_,
            address payable additionalPayeePrimaryAddress_
        )
    {
        ProjectFinance storage projectFinance = projectIdToFinancials[
            _projectId
        ];
        // calculate revenues – this is a three-way split between the
        // render provider, the platform provider, and the artist, and
        // is safe to perform this given that in the case of loss of
        // precision Solidity will round down.
        uint256 projectFunds = _price;
        renderProviderRevenue_ =
            (_price * uint256(_renderProviderPrimarySalesPercentage)) /
            ONE_HUNDRED;
        // renderProviderRevenue_ percentage is always <=100, so guaranteed to never underflow
        projectFunds -= renderProviderRevenue_;
        platformProviderRevenue_ =
            (_price * uint256(_platformProviderPrimarySalesPercentage)) /
            ONE_HUNDRED;
        // platformProviderRevenue_ percentage is always <=100, so guaranteed to never underflow
        projectFunds -= platformProviderRevenue_;
        additionalPayeePrimaryRevenue_ =
            (projectFunds *
                projectFinance.additionalPayeePrimarySalesPercentage) /
            ONE_HUNDRED;
        // projectIdToAdditionalPayeePrimarySalesPercentage is always
        // <=100, so guaranteed to never underflow
        artistRevenue_ = projectFunds - additionalPayeePrimaryRevenue_;
        // set addresses from storage
        renderProviderAddress_ = renderProviderPrimarySalesAddress;
        platformProviderAddress_ = platformProviderPrimarySalesAddress;
        if (artistRevenue_ > 0) {
            artistAddress_ = projectFinance.artistAddress;
        }
        if (additionalPayeePrimaryRevenue_ > 0) {
            additionalPayeePrimaryAddress_ = projectFinance
                .additionalPayeePrimarySales;
        }
    }

    /**
     * @notice Backwards-compatible (pre-V3) getter returning contract admin
     * @return address Address of contract admin (same as owner)
     */
    function admin() external view returns (address) {
        return owner();
    }

    /**
     * @notice Gets the project ID for a given `_tokenId`.
     * @param _tokenId Token ID to be queried.
     * @return _projectId Project ID for given `_tokenId`.
     */
    function tokenIdToProjectId(
        uint256 _tokenId
    ) public pure returns (uint256 _projectId) {
        return _tokenId / ONE_MILLION;
    }

    /**
     * @notice Convenience function that returns whether `_sender` is allowed
     * to call function with selector `_selector` on contract `_contract`, as
     * determined by this contract's current Admin ACL contract. Expected use
     * cases include minter contracts checking if caller is allowed to call
     * admin-gated functions on minter contracts.
     * @param _sender Address of the sender calling function with selector
     * `_selector` on contract `_contract`.
     * @param _contract Address of the contract being called by `_sender`.
     * @param _selector Function selector of the function being called by
     * `_sender`.
     * @return bool Whether `_sender` is allowed to call function with selector
     * `_selector` on contract `_contract`.
     * @dev assumes the Admin ACL contract is the owner of this contract, which
     * is expected to always be true.
     * @dev adminACLContract is expected to either be null address (if owner
     * has renounced ownership), or conform to IAdminACLV0 interface. Check for
     * null address first to avoid revert when admin has renounced ownership.
     */
    function adminACLAllowed(
        address _sender,
        address _contract,
        bytes4 _selector
    ) public returns (bool) {
        return
            owner() != address(0) &&
            adminACLContract.allowed(_sender, _contract, _selector);
    }

    /**
     * @notice Returns contract owner. Set to deployer's address by default on
     * contract deployment.
     * @return address Address of contract owner.
     * @dev ref: https://docs.openzeppelin.com/contracts/4.x/api/access#Ownable
     * @dev owner role was called `admin` prior to V3 core contract
     */
    function owner()
        public
        view
        override(Ownable, IGenArt721CoreContractV3_Base)
        returns (address)
    {
        return Ownable.owner();
    }

    /**
     * @notice Gets token URI for token ID `_tokenId`.
     * @param _tokenId Token ID to be queried.
     * @return string URI of token ID `_tokenId`.
     * @dev token URIs are the concatenation of the project base URI and the
     * token ID.
     */
    function tokenURI(
        uint256 _tokenId
    ) public view override returns (string memory) {
        _onlyValidTokenId(_tokenId);
        string memory _projectBaseURI = projects[tokenIdToProjectId(_tokenId)]
            .projectBaseURI;
        return string.concat(_projectBaseURI, _tokenId.toString());
    }

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

    /**
     * @notice Forbids new projects from being created
     * @dev only performs operation and emits event if contract is not already
     * forbidding new projects.
     */
    function _forbidNewProjects() internal {
        if (!newProjectsForbidden) {
            newProjectsForbidden = true;
            emit PlatformUpdated(FIELD_NEW_PROJECTS_FORBIDDEN);
        }
    }

    /**
     * @notice Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     * @param newOwner New owner.
     * @dev owner role was called `admin` prior to V3 core contract.
     * @dev Overrides and wraps OpenZeppelin's _transferOwnership function to
     * also update adminACLContract for improved introspection.
     */
    function _transferOwnership(address newOwner) internal override {
        Ownable._transferOwnership(newOwner);
        adminACLContract = IAdminACLV0(newOwner);
    }

    /**
     * @notice Updates sales addresses for the platform and render providers to
     * the input parameters.
     * @param _renderProviderPrimarySalesAddress Address of new primary sales
     * payment address.
     * @param _renderProviderSecondarySalesAddress Address of new secondary sales
     * payment address.
     * @param _platformProviderPrimarySalesAddress Address of new primary sales
     * payment address.
     * @param _platformProviderSecondarySalesAddress Address of new secondary sales
     * payment address.
     * @dev Note that this method does not check that the input address is
     * not `address(0)`, as it is expected that callers of this method should
     * perform input validation where applicable.
     */
    function _updateProviderSalesAddresses(
        address _renderProviderPrimarySalesAddress,
        address _renderProviderSecondarySalesAddress,
        address _platformProviderPrimarySalesAddress,
        address _platformProviderSecondarySalesAddress
    ) internal {
        platformProviderPrimarySalesAddress = payable(
            _platformProviderPrimarySalesAddress
        );
        platformProviderSecondarySalesAddress = payable(
            _platformProviderSecondarySalesAddress
        );
        renderProviderPrimarySalesAddress = payable(
            _renderProviderPrimarySalesAddress
        );
        renderProviderSecondarySalesAddress = payable(
            _renderProviderSecondarySalesAddress
        );
        emit PlatformUpdated(FIELD_PROVIDER_SALES_ADDRESSES);
    }

    /**
     * @notice Updates randomizer address to `_randomizerAddress`.
     * @param _randomizerAddress New randomizer address.
     * @dev Note that this method does not check that the input address is
     * not `address(0)`, as it is expected that callers of this method should
     * perform input validation where applicable.
     */
    function _updateRandomizerAddress(address _randomizerAddress) internal {
        randomizerContract = IRandomizer_V3CoreBase(_randomizerAddress);
        // populate historical randomizer array
        _historicalRandomizerAddresses.push(_randomizerAddress);
        emit PlatformUpdated(FIELD_RANDOMIZER_ADDRESS);
    }

    /**
     * @notice Updates default base URI to `_defaultBaseURI`.
     * When new projects are added, their `projectBaseURI` is automatically
     * initialized to `_defaultBaseURI`.
     * @param _defaultBaseURI New default base URI.
     * @dev Note that this method does not check that the input string is not
     * the empty string, as it is expected that callers of this method should
     * perform input validation where applicable.
     */
    function _updateDefaultBaseURI(string memory _defaultBaseURI) internal {
        defaultBaseURI = _defaultBaseURI;
        emit PlatformUpdated(FIELD_DEFAULT_BASE_URI);
    }

    /**
     * @notice Internal function to complete a project.
     * @param _projectId Project ID to be completed.
     */
    function _completeProject(uint256 _projectId) internal {
        projects[_projectId].completedTimestamp = uint64(block.timestamp);
        emit ProjectUpdated(_projectId, FIELD_PROJECT_COMPLETED);
    }

    /**
     * @notice Internal function that returns whether a project is unlocked.
     * Projects automatically lock four weeks after they are completed.
     * Projects are considered completed when they have been invoked the
     * maximum number of times.
     * @param _projectId Project ID to be queried.
     * @return bool true if project is unlocked, false otherwise.
     * @dev This also enforces that the `_projectId` passed in is valid.
     */
    function _projectUnlocked(uint256 _projectId) internal view returns (bool) {
        _onlyValidProjectId(_projectId);

        uint256 projectCompletedTimestamp = projects[_projectId]
            .completedTimestamp;
        bool projectOpen = projectCompletedTimestamp == 0;
        return
            projectOpen ||
            (block.timestamp - projectCompletedTimestamp <
                FOUR_WEEKS_IN_SECONDS);
    }

    /**
     * Helper for calling `BytecodeStorageReader` external library reader method,
     * added for bytecode size reduction purposes.
     */
    function _readFromBytecode(
        address _address
    ) internal view returns (string memory) {
        return BytecodeStorageReader.readFromBytecode(_address);
    }
}

File 11 of 21 : IAdminACLV0.sol
// SPDX-License-Identifier: LGPL-3.0-only
// Created By: Art Blocks Inc.

pragma solidity ^0.8.0;

interface IAdminACLV0 {
    /**
     * @notice Token ID `_tokenId` minted to `_to`.
     * @param previousSuperAdmin The previous superAdmin address.
     * @param newSuperAdmin The new superAdmin address.
     * @param genArt721CoreAddressesToUpdate Array of genArt721Core
     * addresses to update to the new superAdmin, for indexing purposes only.
     */
    event SuperAdminTransferred(
        address indexed previousSuperAdmin,
        address indexed newSuperAdmin,
        address[] genArt721CoreAddressesToUpdate
    );

    /// Type of the Admin ACL contract, e.g. "AdminACLV0"
    function AdminACLType() external view returns (string memory);

    /// super admin address
    function superAdmin() external view returns (address);

    /**
     * @notice Calls transferOwnership on other contract from this contract.
     * This is useful for updating to a new AdminACL contract.
     * @dev this function should be gated to only superAdmin-like addresses.
     */
    function transferOwnershipOn(
        address _contract,
        address _newAdminACL
    ) external;

    /**
     * @notice Calls renounceOwnership on other contract from this contract.
     * @dev this function should be gated to only superAdmin-like addresses.
     */
    function renounceOwnershipOn(address _contract) external;

    /**
     * @notice Checks if sender `_sender` is allowed to call function with selector
     * `_selector` on contract `_contract`.
     */
    function allowed(
        address _sender,
        address _contract,
        bytes4 _selector
    ) external returns (bool);
}

File 12 of 21 : IDependencyRegistryCompatibleV0.sol
// SPDX-License-Identifier: LGPL-3.0-only
// Created By: Art Blocks Inc.
pragma solidity ^0.8.19;

interface IDependencyRegistryCompatibleV0 {
    /// Dependency registry managed by Art Blocks
    function artblocksDependencyRegistryAddress()
        external
        view
        returns (address);

    /**
     * @notice Returns script information for project `_projectId`.
     * @param _projectId Project to be queried.
     * @return scriptTypeAndVersion Project's script type and version
     * (e.g. "p5js(atSymbol)1.0.0")
     * @return aspectRatio Aspect ratio of project (e.g. "1" for square,
     * "1.77777778" for 16:9, etc.)
     * @return scriptCount Count of scripts for project
     */
    function projectScriptDetails(
        uint256 _projectId
    )
        external
        view
        returns (
            string memory scriptTypeAndVersion,
            string memory aspectRatio,
            uint256 scriptCount
        );
}

File 13 of 21 : IEngineRegistryV0.sol
// SPDX-License-Identifier: LGPL-3.0-only
// Created By: Art Blocks Inc.
pragma solidity ^0.8.0;

interface IEngineRegistryV0 {
    /// ADDRESS
    /**
     * @notice contract has been registered as a contract that is powered by the Art Blocks Engine.
     */
    event ContractRegistered(
        address indexed _contractAddress,
        bytes32 _coreVersion,
        bytes32 _coreType
    );

    /// ADDRESS
    /**
     * @notice contract has been unregistered as a contract that is powered by the Art Blocks Engine.
     */
    event ContractUnregistered(address indexed _contractAddress);

    /**
     * @notice Emits a `ContractRegistered` event with the provided information.
     * @dev this function should be gated to only deployer addresses.
     */
    function registerContract(
        address _contractAddress,
        bytes32 _coreVersion,
        bytes32 _coreType
    ) external;

    /**
     * @notice Emits a `ContractUnregistered` event with the provided information, validating that the provided
     *         address was indeed previously registered.
     * @dev this function should be gated to only deployer addresses.
     */
    function unregisterContract(address _contractAddress) external;
}

File 14 of 21 : IGenArt721CoreContractExposesHashSeed.sol
// SPDX-License-Identifier: LGPL-3.0-only
// Created By: Art Blocks Inc.

pragma solidity ^0.8.0;

interface IGenArt721CoreContractExposesHashSeed {
    // function to read the hash-seed for a given tokenId
    function tokenIdToHashSeed(
        uint256 _tokenId
    ) external view returns (bytes12);
}

File 15 of 21 : IGenArt721CoreContractV3_Base.sol
// SPDX-License-Identifier: LGPL-3.0-only
// Created By: Art Blocks Inc.

pragma solidity ^0.8.0;

import "./IAdminACLV0.sol";
/// use the Royalty Registry's IManifold interface for token royalties
import "./IManifold.sol";

/**
 * @title This interface is intended to house interface items that are common
 * across all GenArt721CoreContractV3 flagship and derivative implementations.
 * This interface extends the IManifold royalty interface in order to
 * add support the Royalty Registry by default.
 * @author Art Blocks Inc.
 */
interface IGenArt721CoreContractV3_Base is IManifold {
    /**
     * @notice Token ID `_tokenId` minted to `_to`.
     */
    event Mint(address indexed _to, uint256 indexed _tokenId);

    /**
     * @notice currentMinter updated to `_currentMinter`.
     * @dev Implemented starting with V3 core
     */
    event MinterUpdated(address indexed _currentMinter);

    /**
     * @notice Platform updated on bytes32-encoded field `_field`.
     */
    event PlatformUpdated(bytes32 indexed _field);

    /**
     * @notice Project ID `_projectId` updated on bytes32-encoded field
     * `_update`.
     */
    event ProjectUpdated(uint256 indexed _projectId, bytes32 indexed _update);

    event ProposedArtistAddressesAndSplits(
        uint256 indexed _projectId,
        address _artistAddress,
        address _additionalPayeePrimarySales,
        uint256 _additionalPayeePrimarySalesPercentage,
        address _additionalPayeeSecondarySales,
        uint256 _additionalPayeeSecondarySalesPercentage
    );

    event AcceptedArtistAddressesAndSplits(uint256 indexed _projectId);

    // version and type of the core contract
    // coreVersion is a string of the form "0.x.y"
    function coreVersion() external view returns (string memory);

    // coreType is a string of the form "GenArt721CoreV3"
    function coreType() external view returns (string memory);

    // owner (pre-V3 was named admin) of contract
    // this is expected to be an Admin ACL contract for V3
    function owner() external view returns (address);

    // Admin ACL contract for V3, will be at the address owner()
    function adminACLContract() external returns (IAdminACLV0);

    // backwards-compatible (pre-V3) admin - equal to owner()
    function admin() external view returns (address);

    /**
     * Function determining if _sender is allowed to call function with
     * selector _selector on contract `_contract`. Intended to be used with
     * peripheral contracts such as minters, as well as internally by the
     * core contract itself.
     */
    function adminACLAllowed(
        address _sender,
        address _contract,
        bytes4 _selector
    ) external returns (bool);

    /// getter function of public variable
    function startingProjectId() external view returns (uint256);

    // getter function of public variable
    function nextProjectId() external view returns (uint256);

    // getter function of public mapping
    function tokenIdToProjectId(
        uint256 tokenId
    ) external view returns (uint256 projectId);

    // @dev this is not available in V0
    function isMintWhitelisted(address minter) external view returns (bool);

    function projectIdToArtistAddress(
        uint256 _projectId
    ) external view returns (address payable);

    function projectIdToAdditionalPayeePrimarySales(
        uint256 _projectId
    ) external view returns (address payable);

    function projectIdToAdditionalPayeePrimarySalesPercentage(
        uint256 _projectId
    ) external view returns (uint256);

    function projectIdToSecondaryMarketRoyaltyPercentage(
        uint256 _projectId
    ) external view returns (uint256);

    function projectURIInfo(
        uint256 _projectId
    ) external view returns (string memory projectBaseURI);

    // @dev new function in V3
    function projectStateData(
        uint256 _projectId
    )
        external
        view
        returns (
            uint256 invocations,
            uint256 maxInvocations,
            bool active,
            bool paused,
            uint256 completedTimestamp,
            bool locked
        );

    function projectDetails(
        uint256 _projectId
    )
        external
        view
        returns (
            string memory projectName,
            string memory artist,
            string memory description,
            string memory website,
            string memory license
        );

    function projectScriptDetails(
        uint256 _projectId
    )
        external
        view
        returns (
            string memory scriptTypeAndVersion,
            string memory aspectRatio,
            uint256 scriptCount
        );

    function projectScriptByIndex(
        uint256 _projectId,
        uint256 _index
    ) external view returns (string memory);

    function tokenIdToHash(uint256 _tokenId) external view returns (bytes32);

    // function to set a token's hash (must be guarded)
    function setTokenHash_8PT(uint256 _tokenId, bytes32 _hash) external;

    // @dev gas-optimized signature in V3 for `mint`
    function mint_Ecf(
        address _to,
        uint256 _projectId,
        address _by
    ) external returns (uint256 tokenId);
}

File 16 of 21 : IGenArt721CoreContractV3_Engine.sol
// SPDX-License-Identifier: LGPL-3.0-only
// Created By: Art Blocks Inc.

pragma solidity ^0.8.0;

import "./IAdminACLV0.sol";
import "./IGenArt721CoreContractV3_Base.sol";

interface IGenArt721CoreContractV3_Engine is IGenArt721CoreContractV3_Base {
    // @dev new function in V3
    function getPrimaryRevenueSplits(
        uint256 _projectId,
        uint256 _price
    )
        external
        view
        returns (
            uint256 renderProviderRevenue_,
            address payable renderProviderAddress_,
            uint256 platformProviderRevenue_,
            address payable platformProviderAddress_,
            uint256 artistRevenue_,
            address payable artistAddress_,
            uint256 additionalPayeePrimaryRevenue_,
            address payable additionalPayeePrimaryAddress_
        );

    // @dev The render provider primary sales payment address
    function renderProviderPrimarySalesAddress()
        external
        view
        returns (address payable);

    // @dev The platform provider primary sales payment address
    function platformProviderPrimarySalesAddress()
        external
        view
        returns (address payable);

    // @dev Percentage of primary sales allocated to the render provider
    function renderProviderPrimarySalesPercentage()
        external
        view
        returns (uint256);

    // @dev Percentage of primary sales allocated to the platform provider
    function platformProviderPrimarySalesPercentage()
        external
        view
        returns (uint256);

    // @dev The render provider secondary sales royalties payment address
    function renderProviderSecondarySalesAddress()
        external
        view
        returns (address payable);

    // @dev The platform provider secondary sales royalties payment address
    function platformProviderSecondarySalesAddress()
        external
        view
        returns (address payable);

    // @dev Basis points of secondary sales allocated to the render provider
    function renderProviderSecondarySalesBPS() external view returns (uint256);

    // @dev Basis points of secondary sales allocated to the platform provider
    function platformProviderSecondarySalesBPS()
        external
        view
        returns (uint256);
}

File 17 of 21 : IManifold.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @dev Royalty Registry interface, used to support the Royalty Registry.
/// @dev Source: https://github.com/manifoldxyz/royalty-registry-solidity/blob/main/contracts/specs/IManifold.sol

/// @author: manifold.xyz

/**
 * @dev Royalty interface for creator core classes
 */
interface IManifold {
    /**
     * @dev Get royalites of a token.  Returns list of receivers and basisPoints
     *
     *  bytes4(keccak256('getRoyalties(uint256)')) == 0xbb3bafd6
     *
     *  => 0xbb3bafd6 = 0xbb3bafd6
     */
    function getRoyalties(
        uint256 tokenId
    ) external view returns (address payable[] memory, uint256[] memory);
}

File 18 of 21 : IRandomizer_V3CoreBase.sol
// SPDX-License-Identifier: LGPL-3.0-only
// Creatd By: Art Blocks Inc.

pragma solidity ^0.8.0;

interface IRandomizer_V3CoreBase {
    // When a core contract calls this, it can be assured that the randomizer
    // will set a bytes32 hash for tokenId `_tokenId` on the core contract.
    function assignTokenHash(uint256 _tokenId) external;
}

File 19 of 21 : BytecodeStorageV1.sol
// SPDX-License-Identifier: LGPL-3.0-only
// Created By: Art Blocks Inc.

pragma solidity ^0.8.0;

/**
 * @title Art Blocks Script Storage Library
 * @notice Utilize contract bytecode as persistent storage for large chunks of script string data.
 *         This library is intended to have an external deployed copy that is released in the future,
 *         and, as such, has been designed to support both updated V1 (versioned, with purging removed)
 *         reads as well as backwards-compatible reads for both a) the unversioned "V0" storage contracts
 *         which were deployed by the original version of this libary and b) contracts that were deployed
 *         using one of the SSTORE2 implementations referenced below.
 *         For these pre-V1 storage contracts (which themselves did not have any explicit versioning semantics)
 *         backwards-compatible reads are optimistic, and only expected to work for contracts actually
 *         deployed by the original version of this library – and may fail ungracefully if attempted to be
 *         used to read from other contracts.
 *         This library is split into two components, intended to be updated in tandem, and thus included
 *         here in the same source file. One component is an internal library that is intended to be embedded
 *         directly into other contracts and provides all _write_ functionality. The other is a public library
 *         that is intended to be deployed as a standalone contract and provides all _read_ functionality.
 *
 * @author Art Blocks Inc.
 * @author Modified from 0xSequence (https://github.com/0xsequence/sstore2/blob/master/contracts/SSTORE2.sol)
 * @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SSTORE2.sol)
 *
 * @dev Compared to the above two rerferenced libraries, this contracts-as-storage implementation makes a few
 *      notably different design decisions:
 *      - uses the `string` data type for input/output on reads, rather than speaking in bytes directly
 *      - stores the "writer" address (library user) in the deployed contract bytes, which is useful for
 *        on-chain introspection and provenance purposes
 *      - stores a very simple versioning string in the deployed contract bytes, which captures the version
 *        of the library that was used to deploy the storage contract and useful for supporting future
 *        compatibility management as this library evolves (e.g. in response to EOF v1 migration plans)
 *      Also, given that much of this library is written in assembly, this library makes use of a slightly
 *      different convention (when compared to the rest of the Art Blocks smart contract repo) around
 *      pre-defining return values in some cases in order to simplify need to directly memory manage these
 *      return values.
 */

/**
 * @title Art Blocks Script Storage Library (Public, Reads)
 * @author Art Blocks Inc.
 * @notice The public library for reading from storage contracts. This library is intended to be deployed as a
 *         standalone contract, and provides all _read_ functionality.
 */
library BytecodeStorageReader {
    // Define the set of known valid version strings that may be stored in the deployed storage contract bytecode
    // note: These are all intentionally exactly 32-bytes and are null-terminated. Null-termination is used due
    //       to this being the standard expected formatting in common web3 tooling such as ethers.js. Please see
    //       the following for additional context: https://docs.ethers.org/v5/api/utils/strings/#Bytes32String
    // Used for storage contracts that were deployed by an unknown source
    bytes32 public constant UNKNOWN_VERSION_STRING =
        "UNKNOWN_VERSION_STRING_________ ";
    // Pre-dates versioning string, so this doesn't actually exist in any deployed contracts,
    // but is useful for backwards-compatible semantics with original version of this library
    bytes32 public constant V0_VERSION_STRING =
        "BytecodeStorage_V0.0.0_________ ";
    // The first versioned storage contract, deployed by an updated version of this library
    bytes32 public constant V1_VERSION_STRING =
        "BytecodeStorage_V1.0.0_________ ";
    // The current version of this library.
    bytes32 public constant CURRENT_VERSION = V1_VERSION_STRING;

    //---------------------------------------------------------------------------------------------------------------//
    // Starting Index | Size | Ending Index | Description                                                            //
    //---------------------------------------------------------------------------------------------------------------//
    // 0              | N/A  | 0            |                                                                        //
    // 0              | 1    | 1            | single byte opcode for making the storage contract non-executable      //
    // 1              | 32   | 33           | the 32 byte slot used for storing a basic versioning string            //
    // 33             | 32   | 65           | the 32 bytes for storing the deploying contract's (0-padded) address   //
    //---------------------------------------------------------------------------------------------------------------//
    // Define the offset for where the "meta bytes" end, and the "data bytes" begin. Note that this is a manually
    // calculated value, and must be updated if the above table is changed. It is expected that tests will fail
    // loudly if these values are not updated in-step with eachother.
    uint256 private constant VERSION_OFFSET = 1;
    uint256 private constant ADDRESS_OFFSET = 33;
    uint256 private constant DATA_OFFSET = 65;

    // Define the set of known *historic* offset values for where the "meta bytes" end, and the "data bytes" begin.
    // SSTORE2 deployed storage contracts take the general format of:
    // concat(0x00, data)
    // note: this is true for both variants of the SSTORE2 library
    uint256 private constant SSTORE2_DATA_OFFSET = 1;
    // V0 deployed storage contracts take the general format of:
    // concat(gated-cleanup-logic, deployer-address, data)
    uint256 private constant V0_ADDRESS_OFFSET = 72;
    uint256 private constant V0_DATA_OFFSET = 104;
    // V1 deployed storage contracts take the general format of:
    // concat(invalid opcode, version, deployer-address, data)
    uint256 private constant V1_ADDRESS_OFFSET = ADDRESS_OFFSET;
    uint256 private constant V1_DATA_OFFSET = DATA_OFFSET;

    /*//////////////////////////////////////////////////////////////
                               READ LOGIC
    //////////////////////////////////////////////////////////////*/

    /**
     * @notice Read a string from contract bytecode
     * @param _address address of deployed contract with bytecode stored in the V0 or V1 format
     * @return data string read from contract bytecode
     * @dev This function performs input validation that the contract to read is in an expected format
     */
    function readFromBytecode(
        address _address
    ) public view returns (string memory data) {
        uint256 dataOffset = _bytecodeDataOffsetAt(_address);
        return string(readBytesFromBytecode(_address, dataOffset));
    }

    /**
     * @notice Read the bytes from contract bytecode that was written to the EVM using SSTORE2
     * @param _address address of deployed contract with bytecode stored in the SSTORE2 format
     * @return data bytes read from contract bytecode
     * @dev This function performs no input validation on the provided contract,
     *      other than that there is content to read (but not that its a "storage contract")
     */
    function readBytesFromSSTORE2Bytecode(
        address _address
    ) public view returns (bytes memory data) {
        return readBytesFromBytecode(_address, SSTORE2_DATA_OFFSET);
    }

    /**
     * @notice Read the bytes from contract bytecode, with an explicitly provided starting offset
     * @param _address address of deployed contract with bytecode stored in the V0 or V1 format
     * @param _offset offset to read from in contract bytecode, explicitly provided (not calculated)
     * @return data bytes read from contract bytecode
     * @dev This function performs no input validation on the provided contract,
     *      other than that there is content to read (but not that its a "storage contract")
     */
    function readBytesFromBytecode(
        address _address,
        uint256 _offset
    ) public view returns (bytes memory data) {
        // get the size of the bytecode
        uint256 bytecodeSize = _bytecodeSizeAt(_address);
        // handle case where address contains code < _offset
        if (bytecodeSize < _offset) {
            revert("ContractAsStorage: Read Error");
        }

        // handle case where address contains code >= dataOffset
        // decrement by dataOffset to account for header info
        uint256 size;
        unchecked {
            size = bytecodeSize - _offset;
        }

        assembly {
            // allocate free memory
            data := mload(0x40)
            // update free memory pointer
            // use and(x, not(0x1f) as cheaper equivalent to sub(x, mod(x, 0x20)).
            // adding 0x1f to size + logic above ensures the free memory pointer
            // remains word-aligned, following the Solidity convention.
            mstore(0x40, add(data, and(add(add(size, 0x20), 0x1f), not(0x1f))))
            // store length of data in first 32 bytes
            mstore(data, size)
            // copy code to memory, excluding the deployer-address
            extcodecopy(_address, add(data, 0x20), _offset, size)
        }
    }

    /**
     * @notice Get address for deployer for given contract bytecode
     * @param _address address of deployed contract with bytecode stored in the V0 or V1 format
     * @return writerAddress address read from contract bytecode
     */
    function getWriterAddressForBytecode(
        address _address
    ) public view returns (address) {
        // get the size of the data
        uint256 bytecodeSize = _bytecodeSizeAt(_address);
        // the dataOffset for the bytecode
        uint256 addressOffset = _bytecodeAddressOffsetAt(_address);
        // handle case where address contains code < addressOffset + 32 (address takes a whole slot)
        if (bytecodeSize < (addressOffset + 32)) {
            revert("ContractAsStorage: Read Error");
        }

        assembly {
            // allocate free memory
            let writerAddress := mload(0x40)
            // shift free memory pointer by one slot
            mstore(0x40, add(mload(0x40), 0x20))
            // copy the 32-byte address of the data contract writer to memory
            // note: this relies on the assumption noted at the top-level of
            //       this file that the storage layout for the deployed
            //       contracts-as-storage contract looks like::
            //       | invalid opcode | version-string (unless v0) | deployer-address (padded) | data |
            extcodecopy(
                _address,
                writerAddress,
                addressOffset,
                0x20 // full 32-bytes, as address is expected to be zero-padded
            )
            return(
                writerAddress,
                0x20 // return size is entire slot, as it is zero-padded
            )
        }
    }

    /**
     * @notice Get version for given contract bytecode
     * @param _address address of deployed contract with bytecode stored in the V0 or V1 format
     * @return version version read from contract bytecode
     */
    function getLibraryVersionForBytecode(
        address _address
    ) public view returns (bytes32) {
        return _bytecodeVersionAt(_address);
    }

    /*//////////////////////////////////////////////////////////////
                          INTERNAL HELPER LOGIC
    //////////////////////////////////////////////////////////////*/

    /**
     * @notice Returns the size of the bytecode at address `_address`
     * @param _address address that may or may not contain bytecode
     * @return size size of the bytecode code at `_address`
     */
    function _bytecodeSizeAt(
        address _address
    ) private view returns (uint256 size) {
        assembly {
            size := extcodesize(_address)
        }
        if (size == 0) {
            revert("ContractAsStorage: Read Error");
        }
    }

    /**
     * @notice Returns the offset of the data in the bytecode at address `_address`
     * @param _address address that may or may not contain bytecode
     * @return dataOffset offset of data in bytecode if a known version, otherwise 0
     */
    function _bytecodeDataOffsetAt(
        address _address
    ) private view returns (uint256 dataOffset) {
        bytes32 version = _bytecodeVersionAt(_address);
        if (version == V1_VERSION_STRING) {
            dataOffset = V1_DATA_OFFSET;
        } else if (version == V0_VERSION_STRING) {
            dataOffset = V0_DATA_OFFSET;
        } else {
            // unknown version, revert
            revert("ContractAsStorage: Unsupported Version");
        }
    }

    /**
     * @notice Returns the offset of the address in the bytecode at address `_address`
     * @param _address address that may or may not contain bytecode
     * @return addressOffset offset of address in bytecode if a known version, otherwise 0
     */
    function _bytecodeAddressOffsetAt(
        address _address
    ) private view returns (uint256 addressOffset) {
        bytes32 version = _bytecodeVersionAt(_address);
        if (version == V1_VERSION_STRING) {
            addressOffset = V1_ADDRESS_OFFSET;
        } else if (version == V0_VERSION_STRING) {
            addressOffset = V0_ADDRESS_OFFSET;
        } else {
            // unknown version, revert
            revert("ContractAsStorage: Unsupported Version");
        }
    }

    /**
     * @notice Get version string for given contract bytecode
     * @param _address address of deployed contract with bytecode stored in the V0 or V1 format
     * @return version version string read from contract bytecode
     */
    function _bytecodeVersionAt(
        address _address
    ) private view returns (bytes32 version) {
        // get the size of the data
        uint256 bytecodeSize = _bytecodeSizeAt(_address);
        // handle case where address contains code < minimum expected version string size,
        // by returning early with the unknown version string
        if (bytecodeSize < (VERSION_OFFSET + 32)) {
            return UNKNOWN_VERSION_STRING;
        }

        assembly {
            // allocate free memory
            let versionString := mload(0x40)
            // shift free memory pointer by one slot
            mstore(0x40, add(mload(0x40), 0x20))
            // copy the 32-byte version string of the bytecode library to memory
            // note: this relies on the assumption noted at the top-level of
            //       this file that the storage layout for the deployed
            //       contracts-as-storage contract looks like:
            //       | invalid opcode | version-string (unless v0) | deployer-address (padded) | data |
            extcodecopy(
                _address,
                versionString,
                VERSION_OFFSET,
                0x20 // 32-byte version string
            )
            // note: must check against literal strings, as Yul does not allow for
            //       dynamic strings in switch statements.
            switch mload(versionString)
            case "BytecodeStorage_V1.0.0_________ " {
                version := V1_VERSION_STRING
            }
            case 0x2060486000396000513314601057fe5b60013614601957fe5b6000357fff0000 {
                // the v0 variant of this library pre-dates formal versioning w/ version strings,
                // so we check the first 32 bytes of the execution bytecode itself which
                // is static and known across all storage contracts deployed with the first version
                // of this library.
                version := V0_VERSION_STRING
            }
            default {
                version := UNKNOWN_VERSION_STRING
            }
        }
    }
}

/**
 * @title Art Blocks Script Storage Library (Internal, Writes)
 * @author Art Blocks Inc.
 * @notice The internal library for writing to storage contracts. This library is intended to be deployed
 *         within library client contracts that use this library to perform _write_ operations on storage.
 */
library BytecodeStorageWriter {
    /*//////////////////////////////////////////////////////////////
                           WRITE LOGIC
    //////////////////////////////////////////////////////////////*/

    /**
     * @notice Write a string to contract bytecode
     * @param _data string to be written to contract. No input validation is performed on this parameter.
     * @param address_ address of deployed contract with bytecode stored in the V0 or V1 format
     */
    function writeToBytecode(
        string memory _data
    ) internal returns (address address_) {
        // prefix bytecode with
        bytes memory creationCode = abi.encodePacked(
            //---------------------------------------------------------------------------------------------------------------//
            // Opcode  | Opcode + Arguments  | Description  | Stack View                                                     //
            //---------------------------------------------------------------------------------------------------------------//
            // a.) creation code returns all code in the contract except for the first 11 (0B in hex) bytes, as these 11
            //     bytes are the creation code itself which we do not want to store in the deployed storage contract result
            //---------------------------------------------------------------------------------------------------------------//
            // 0x60    |  0x60_0B            | PUSH1 11     | codeOffset                                                     //
            // 0x59    |  0x59               | MSIZE        | 0 codeOffset                                                   //
            // 0x81    |  0x81               | DUP2         | codeOffset 0 codeOffset                                        //
            // 0x38    |  0x38               | CODESIZE     | codeSize codeOffset 0 codeOffset                               //
            // 0x03    |  0x03               | SUB          | (codeSize - codeOffset) 0 codeOffset                           //
            // 0x80    |  0x80               | DUP          | (codeSize - codeOffset) (codeSize - codeOffset) 0 codeOffset   //
            // 0x92    |  0x92               | SWAP3        | codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset)   //
            // 0x59    |  0x59               | MSIZE        | 0 codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset) //
            // 0x39    |  0x39               | CODECOPY     | 0 (codeSize - codeOffset)                                      //
            // 0xF3    |  0xF3               | RETURN       |                                                                //
            //---------------------------------------------------------------------------------------------------------------//
            // (11 bytes)
            hex"60_0B_59_81_38_03_80_92_59_39_F3",
            //---------------------------------------------------------------------------------------------------------------//
            // b.) ensure that the deployed storage contract is non-executeable (first opcode is the `invalid` opcode)
            //---------------------------------------------------------------------------------------------------------------//
            //---------------------------------------------------------------------------------------------------------------//
            // 0xFE    |  0xFE               | INVALID      |                                                                //
            //---------------------------------------------------------------------------------------------------------------//
            // (1 byte)
            hex"FE",
            //---------------------------------------------------------------------------------------------------------------//
            // c.) store the version string, which is already represented as a 32-byte value
            //---------------------------------------------------------------------------------------------------------------//
            // (32 bytes)
            BytecodeStorageReader.CURRENT_VERSION,
            //---------------------------------------------------------------------------------------------------------------//
            // d.) store the deploying-contract's address with 0-padding to fit a 20-byte address into a 32-byte slot
            //---------------------------------------------------------------------------------------------------------------//
            // (12 bytes)
            hex"00_00_00_00_00_00_00_00_00_00_00_00",
            // (20 bytes)
            address(this),
            // uploaded data (stored as bytecode) comes last
            _data
        );

        assembly {
            // deploy a new contract with the generated creation code.
            // start 32 bytes into creationCode to avoid copying the byte length.
            address_ := create(0, add(creationCode, 0x20), mload(creationCode))
        }

        // address must be non-zero if contract was deployed successfully
        require(address_ != address(0), "ContractAsStorage: Write Error");
    }
}

File 20 of 21 : Bytes32Strings.sol
// SPDX-License-Identifier: LGPL-3.0-only
// Created By: Art Blocks Inc.
// Inspired by: https://ethereum.stackexchange.com/a/123950/103422

pragma solidity ^0.8.0;

/**
 * @dev Operations on bytes32 data type, dealing with conversion to string.
 */
library Bytes32Strings {
    /**
     * @dev Intended to convert a `bytes32`-encoded string literal to `string`.
     * Trims zero padding to arrive at original string literal.
     */
    function toString(
        bytes32 source
    ) internal pure returns (string memory result) {
        uint8 length = 0;
        while (source[length] != 0 && length < 32) {
            length++;
        }
        assembly {
            // free memory pointer
            result := mload(0x40)
            // update free memory pointer to new "memory end"
            // (offset is 64-bytes: 32 for length, 32 for data)
            mstore(0x40, add(result, 0x40))
            // store length in first 32-byte memory slot
            mstore(result, length)
            // write actual data in second 32-byte memory slot
            mstore(add(result, 0x20), source)
        }
    }

    /**
     * @dev Intended to check if a `bytes32`-encoded string contains a given
     * character with UTF-8 character code `utf8CharCode exactly `targetQty`
     * times. Does not support searching for multi-byte characters, only
     * characters with UTF-8 character codes < 0x80.
     */
    function containsExactCharacterQty(
        bytes32 source,
        uint8 utf8CharCode,
        uint8 targetQty
    ) internal pure returns (bool) {
        uint8 _occurrences = 0;
        uint8 i;
        for (i = 0; i < 32; ) {
            uint8 _charCode = uint8(source[i]);
            // if not a null byte, or a multi-byte UTF-8 character, check match
            if (_charCode != 0 && _charCode < 0x80) {
                if (_charCode == utf8CharCode) {
                    unchecked {
                        // no risk of overflow since max 32 iterations < max uin8=255
                        ++_occurrences;
                    }
                }
            }
            unchecked {
                // no risk of overflow since max 32 iterations < max uin8=255
                ++i;
            }
        }
        return _occurrences == targetQty;
    }
}

File 21 of 21 : ERC721_PackedHashSeed.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Forked version of the OpenZeppelin v4.7.1 ERC721 contract. Utilizes a
 * struct to pack owner and hash seed into a single storage slot.
 * ---------------------
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721_PackedHashSeed is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    /// struct to pack a token owner and hash seed into same storage slot
    struct OwnerAndHashSeed {
        // 20 bytes for address of token's owner
        address owner;
        // remaining 12 bytes allocated to token hash seed
        bytes12 hashSeed;
    }

    /// mapping of token ID to OwnerAndHashSeed
    /// @dev visibility internal so inheriting contracts can access
    mapping(uint256 => OwnerAndHashSeed) internal _ownersAndHashSeeds;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

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

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @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 virtual override returns (uint256) {
        require(
            owner != address(0),
            "ERC721: address zero is not a valid owner"
        );
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(
        uint256 tokenId
    ) public view virtual override returns (address) {
        address owner = _ownersAndHashSeeds[tokenId].owner;
        require(owner != address(0), "ERC721: invalid token ID");
        return owner;
    }

    /**
     * @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) {
        _requireMinted(tokenId);

        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 overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721_PackedHashSeed.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not token owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(
        uint256 tokenId
    ) public view virtual override returns (address) {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(
        address operator,
        bool approved
    ) public virtual override {
        _setApprovalForAll(_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 {
        //solhint-disable-next-line max-line-length
        require(
            _isApprovedOrOwner(_msgSender(), tokenId),
            "ERC721: caller is not token owner nor approved"
        );

        _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 {
        require(
            _isApprovedOrOwner(_msgSender(), tokenId),
            "ERC721: caller is not token owner nor approved"
        );
        _safeTransfer(from, to, tokenId, data);
    }

    /**
     * @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.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(
            _checkOnERC721Received(from, to, tokenId, data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @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`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _ownersAndHashSeeds[tokenId].owner != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(
        address spender,
        uint256 tokenId
    ) internal view virtual returns (bool) {
        address owner = ERC721_PackedHashSeed.ownerOf(tokenId);
        return (spender == owner ||
            isApprovedForAll(owner, spender) ||
            getApproved(tokenId) == spender);
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _ownersAndHashSeeds[tokenId].owner = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId);
    }

    /**
     * @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 {
        address owner = ERC721_PackedHashSeed.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _ownersAndHashSeeds[tokenId].owner;

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * 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
    ) internal virtual {
        require(
            ERC721_PackedHashSeed.ownerOf(tokenId) == from,
            "ERC721: transfer from incorrect owner"
        );
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

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

        _balances[from] -= 1;
        _balances[to] += 1;
        _ownersAndHashSeeds[tokenId].owner = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits an {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721_PackedHashSeed.ownerOf(tokenId), to, tokenId);
    }

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

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a 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 _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) private returns (bool) {
        if (to.isContract()) {
            try
                IERC721Receiver(to).onERC721Received(
                    _msgSender(),
                    from,
                    tokenId,
                    data
                )
            returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert(
                        "ERC721: transfer to non ERC721Receiver implementer"
                    );
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * 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, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 25
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {
    "contracts/libs/0.8.x/BytecodeStorageV1.sol": {
      "BytecodeStorageReader": "0xf0585df582a0ad119f1616fb82f3b449a98eecd5"
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_tokenSymbol","type":"string"},{"internalType":"address","name":"_renderProviderAddress","type":"address"},{"internalType":"address","name":"_platformProviderAddress","type":"address"},{"internalType":"address","name":"_randomizerContract","type":"address"},{"internalType":"address","name":"_adminACLContract","type":"address"},{"internalType":"uint248","name":"_startingProjectId","type":"uint248"},{"internalType":"bool","name":"_autoApproveArtistSplitProposals","type":"bool"},{"internalType":"address","name":"_engineRegistryContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"AcceptedArtistAddressesAndSplits","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_currentMinter","type":"address"}],"name":"MinterUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_field","type":"bytes32"}],"name":"PlatformUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_projectId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"_update","type":"bytes32"}],"name":"ProjectUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_projectId","type":"uint256"},{"indexed":false,"internalType":"address","name":"_artistAddress","type":"address"},{"indexed":false,"internalType":"address","name":"_additionalPayeePrimarySales","type":"address"},{"indexed":false,"internalType":"uint256","name":"_additionalPayeePrimarySalesPercentage","type":"uint256"},{"indexed":false,"internalType":"address","name":"_additionalPayeeSecondarySales","type":"address"},{"indexed":false,"internalType":"uint256","name":"_additionalPayeeSecondarySalesPercentage","type":"uint256"}],"name":"ProposedArtistAddressesAndSplits","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":[{"internalType":"string","name":"_projectName","type":"string"},{"internalType":"address payable","name":"_artistAddress","type":"address"}],"name":"addProject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_script","type":"string"}],"name":"addProjectScript","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"address","name":"_contract","type":"address"},{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"adminACLAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"adminACLContract","outputs":[{"internalType":"contract IAdminACLV0","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"address payable","name":"_artistAddress","type":"address"},{"internalType":"address payable","name":"_additionalPayeePrimarySales","type":"address"},{"internalType":"uint256","name":"_additionalPayeePrimarySalesPercentage","type":"uint256"},{"internalType":"address payable","name":"_additionalPayeeSecondarySales","type":"address"},{"internalType":"uint256","name":"_additionalPayeeSecondarySalesPercentage","type":"uint256"}],"name":"adminAcceptArtistAddressesAndSplits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"artblocksDependencyRegistryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"autoApproveArtistSplitProposals","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"coreType","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"coreVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"defaultBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forbidNewProjects","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getHistoricalRandomizerAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"getPrimaryRevenueSplits","outputs":[{"internalType":"uint256","name":"renderProviderRevenue_","type":"uint256"},{"internalType":"address payable","name":"renderProviderAddress_","type":"address"},{"internalType":"uint256","name":"platformProviderRevenue_","type":"uint256"},{"internalType":"address payable","name":"platformProviderAddress_","type":"address"},{"internalType":"uint256","name":"artistRevenue_","type":"uint256"},{"internalType":"address payable","name":"artistAddress_","type":"address"},{"internalType":"uint256","name":"additionalPayeePrimaryRevenue_","type":"uint256"},{"internalType":"address payable","name":"additionalPayeePrimaryAddress_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"bps","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":"address","name":"_minter","type":"address"}],"name":"isMintWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"address","name":"_by","type":"address"}],"name":"mint_Ecf","outputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minterContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newProjectsForbidden","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextProjectId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numHistoricalRandomizers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platformProviderPrimarySalesAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platformProviderPrimarySalesPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platformProviderSecondarySalesAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platformProviderSecondarySalesBPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectArtistPaymentInfo","outputs":[{"internalType":"address","name":"artistAddress","type":"address"},{"internalType":"address","name":"additionalPayeePrimarySales","type":"address"},{"internalType":"uint256","name":"additionalPayeePrimarySalesPercentage","type":"uint256"},{"internalType":"address","name":"additionalPayeeSecondarySales","type":"address"},{"internalType":"uint256","name":"additionalPayeeSecondarySalesPercentage","type":"uint256"},{"internalType":"uint256","name":"secondaryMarketRoyaltyPercentage","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectDetails","outputs":[{"internalType":"string","name":"projectName","type":"string"},{"internalType":"string","name":"artist","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"website","type":"string"},{"internalType":"string","name":"license","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectIdToAdditionalPayeePrimarySales","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectIdToAdditionalPayeePrimarySalesPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectIdToAdditionalPayeeSecondarySales","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectIdToAdditionalPayeeSecondarySalesPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectIdToArtistAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectIdToSecondaryMarketRoyaltyPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"projectScriptByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"projectScriptBytecodeAddressByIndex","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectScriptDetails","outputs":[{"internalType":"string","name":"scriptTypeAndVersion","type":"string"},{"internalType":"string","name":"aspectRatio","type":"string"},{"internalType":"uint256","name":"scriptCount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectStateData","outputs":[{"internalType":"uint256","name":"invocations","type":"uint256"},{"internalType":"uint256","name":"maxInvocations","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"bool","name":"paused","type":"bool"},{"internalType":"uint256","name":"completedTimestamp","type":"uint256"},{"internalType":"bool","name":"locked","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectURIInfo","outputs":[{"internalType":"string","name":"projectBaseURI","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"address payable","name":"_artistAddress","type":"address"},{"internalType":"address payable","name":"_additionalPayeePrimarySales","type":"address"},{"internalType":"uint256","name":"_additionalPayeePrimarySalesPercentage","type":"uint256"},{"internalType":"address payable","name":"_additionalPayeeSecondarySales","type":"address"},{"internalType":"uint256","name":"_additionalPayeeSecondarySalesPercentage","type":"uint256"}],"name":"proposeArtistPaymentAddressesAndSplits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"proposedArtistAddressesAndSplitsHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomizerContract","outputs":[{"internalType":"contract IRandomizer_V3CoreBase","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"removeProjectLastScript","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renderProviderPrimarySalesAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renderProviderPrimarySalesPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renderProviderSecondarySalesAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renderProviderSecondarySalesBPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"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":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes32","name":"_hashSeed","type":"bytes32"}],"name":"setTokenHash_8PT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startingProjectId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"toggleProjectIsActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"toggleProjectIsPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenIdToHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenIdToHashSeed","outputs":[{"internalType":"bytes12","name":"","type":"bytes12"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenIdToProjectId","outputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"_artblocksDependencyRegistryAddress","type":"address"}],"name":"updateArtblocksDependencyRegistryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_defaultBaseURI","type":"string"}],"name":"updateDefaultBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"updateMinterContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"address payable","name":"_artistAddress","type":"address"}],"name":"updateProjectArtistAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_projectArtistName","type":"string"}],"name":"updateProjectArtistName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_aspectRatio","type":"string"}],"name":"updateProjectAspectRatio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"updateProjectBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_projectDescription","type":"string"}],"name":"updateProjectDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_projectLicense","type":"string"}],"name":"updateProjectLicense","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint24","name":"_maxInvocations","type":"uint24"}],"name":"updateProjectMaxInvocations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_projectName","type":"string"}],"name":"updateProjectName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_scriptId","type":"uint256"},{"internalType":"string","name":"_script","type":"string"}],"name":"updateProjectScript","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"bytes32","name":"_scriptTypeAndVersion","type":"bytes32"}],"name":"updateProjectScriptType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_secondMarketRoyalty","type":"uint256"}],"name":"updateProjectSecondaryMarketRoyaltyPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_projectWebsite","type":"string"}],"name":"updateProjectWebsite","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"renderProviderPrimarySalesPercentage_","type":"uint256"},{"internalType":"uint256","name":"platformProviderPrimarySalesPercentage_","type":"uint256"}],"name":"updateProviderPrimarySalesPercentages","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_renderProviderPrimarySalesAddress","type":"address"},{"internalType":"address payable","name":"_renderProviderSecondarySalesAddress","type":"address"},{"internalType":"address payable","name":"_platformProviderPrimarySalesAddress","type":"address"},{"internalType":"address payable","name":"_platformProviderSecondarySalesAddress","type":"address"}],"name":"updateProviderSalesAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_renderProviderSecondarySalesBPS","type":"uint256"},{"internalType":"uint256","name":"_platformProviderSecondarySalesBPS","type":"uint256"}],"name":"updateProviderSecondarySalesBPS","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_randomizerAddress","type":"address"}],"name":"updateRandomizerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0604052600e8054600560a11b60ff60a01b199182168117909255600f8054909116909117905560fa60118190556013553480156200003e57600080fd5b5060405162005dc938038062005dc983398101604081905262000061916200073d565b88886000620000718382620008c7565b506001620000808282620008c7565b5050506200009d620000976200023360201b60201c565b62000237565b620000a88762000264565b620000b38662000264565b620000be8562000264565b620000c98462000264565b81151560a0526001600160f81b038316608052620000ea87808880620002c3565b620000f5856200034d565b620001008462000237565b620001376200010f30620003d5565b60405160200162000121919062000993565b60408051601f19818403018152919052620003f3565b601580547fff00000000000000000000000000000000000000000000000000000000000000166001600160f81b0385161790556040516c1b995e1d141c9bda9958dd1259609a1b9060008051602062005da983398151915290600090a260405163f889b3ed60e01b8152306004820152653b199718971960d11b60248201527f47656e417274373231436f726556335f456e67696e650000000000000000000060448201526001600160a01b0382169063f889b3ed90606401600060405180830381600087803b1580156200020b57600080fd5b505af115801562000220573d6000803e3d6000fd5b5050505050505050505050505062000a5b565b3390565b620002428162000430565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038116620002c05760405162461bcd60e51b815260206004820152601b60248201527f4d75737420696e707574206e6f6e2d7a65726f2061646472657373000000000060448201526064015b60405180910390fd5b50565b600f80546001600160a01b038085166001600160a01b03199283161790925560128054848416908316179055600e805487841690831617905560108054928616929091169190911790556040517f70726f766964657253616c6573416464726573736573000000000000000000009060008051602062005da983398151915290600090a250505050565b600880546001600160a01b0383166001600160a01b031991821681179092556009805460018101825560009182527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805490921690921790556040517072616e646f6d697a65724164647265737360781b9160008051602062005da983398151915291a250565b6060620003ed6001600160a01b038316601462000482565b92915050565b6016620004018282620008c7565b506040516d64656661756c744261736555524960901b9060008051602062005da983398151915290600090a250565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060600062000493836002620009fb565b620004a090600262000a15565b6001600160401b03811115620004ba57620004ba62000642565b6040519080825280601f01601f191660200182016040528015620004e5576020820181803683370190505b509050600360fc1b8160008151811062000503576200050362000a2b565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062000535576200053562000a2b565b60200101906001600160f81b031916908160001a90535060006200055b846002620009fb565b6200056890600162000a15565b90505b6001811115620005ea576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110620005a057620005a062000a2b565b1a60f81b828281518110620005b957620005b962000a2b565b60200101906001600160f81b031916908160001a90535060049490941c93620005e28162000a41565b90506200056b565b5083156200063b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401620002b7565b9392505050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620006755781810151838201526020016200065b565b50506000910152565b600082601f8301126200069057600080fd5b81516001600160401b0380821115620006ad57620006ad62000642565b604051601f8301601f19908116603f01168101908282118183101715620006d857620006d862000642565b81604052838152866020858801011115620006f257600080fd5b6200070584602083016020890162000658565b9695505050505050565b80516001600160a01b03811681146200072757600080fd5b919050565b805180151581146200072757600080fd5b60008060008060008060008060006101208a8c0312156200075d57600080fd5b89516001600160401b03808211156200077557600080fd5b620007838d838e016200067e565b9a5060208c01519150808211156200079a57600080fd5b50620007a98c828d016200067e565b985050620007ba60408b016200070f565b9650620007ca60608b016200070f565b9550620007da60808b016200070f565b9450620007ea60a08b016200070f565b60c08b01519094506001600160f81b03811681146200080857600080fd5b92506200081860e08b016200072c565b9150620008296101008b016200070f565b90509295985092959850929598565b600181811c908216806200084d57607f821691505b6020821081036200086e57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620008c257600081815260208120601f850160051c810160208610156200089d5750805b601f850160051c820191505b81811015620008be57828155600101620008a9565b5050505b505050565b81516001600160401b03811115620008e357620008e362000642565b620008fb81620008f4845462000838565b8462000874565b602080601f8311600181146200093357600084156200091a5750858301515b600019600386901b1c1916600185901b178555620008be565b600085815260208120601f198616915b82811015620009645788860151825594840194600190910190840162000943565b5085821015620009835787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b7f68747470733a2f2f746f6b656e2e617274626c6f636b732e696f2f0000000000815260008251620009cd81601b85016020870162000658565b602f60f81b601b939091019283015250601c01919050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417620003ed57620003ed620009e5565b80820180821115620003ed57620003ed620009e5565b634e487b7160e01b600052603260045260246000fd5b60008162000a535762000a53620009e5565b506000190190565b60805160a05161531a62000a8f60003960008181610b410152611b1b015260008181610c890152613e33015261531a6000f3fe608060405234801561001057600080fd5b50600436106104145760003560e01c8063715018a611610223578063b75395e01161012c578063b75395e014610a42578063b7b04fae14610a55578063b88d4fde14610a68578063b971136814610a7b578063bb3bafd614610a83578063bd3d10e714610aa4578063c34a03b514610ab7578063c6c7c5bf14610aca578063c87b56dd14610add578063cc90e72514610af0578063d03c390c14610b03578063db21a84614610b16578063db2ff86114610b29578063e6032df214610b3c578063e935b7b114610b63578063e985e9c514610b74578063eb9cd5d414610b87578063ed8abfda14610ba9578063f2fde38b14610bd3578063f313d73314610be6578063f851a44014610c7c578063f893c07b14610c8457600080fd5b8063715018a61461080c57806376ee6fab146108145780638639415b146108275780638c3c9cdd146108825780638da5cb5b146108955780638dd91a561461089d57806392f00233146108c157806395d89b41146108d45780639a02e4fa146108dc578063a11ec70a14610913578063a22cb46514610926578063a3b2cca614610939578063a47d29cb1461094c578063abcbb7b414610978578063ac11fa1c14610980578063acad0124146109a0578063acd4c66f146109b3578063ad0305ce146109c5578063ad2cdfc4146109e7578063ae45ad9814610a14578063b1656ba314610a1c578063b168762214610a2f57600080fd5b806328ec8f501161032557806328ec8f50146106315780632b2741661461065e5780632b65e67d146106715780632b8258c5146106845780632d9c02051461068d57806330ef4c5f146106a057806336c7c12c146106b257806337859963146106c557806338c8e468146106d85780633bb22553146107045780633e48e8481461070d57806341814cd31461072057806342842e0e1461073357806348337282146107465780634e1d64af146107595780635508fd521461076157806358b9a5a914610775578063621a1f74146107ad5780636352211e146107c057806369d14faf146107d35780636c907b7f146107e657806370a08231146107f957600080fd5b80611e3c146104195780615de51461042e5780630132c6971461045457806301856fd41461046757806301ffc9a71461047a57806304143a5c1461049d57806306fdde03146104a5578063081812fc146104ba578063095ea7b3146104da5780630d170673146104ed5780630e79c928146105005780630ea5613f146105135780630ebeb0ee1461055d57806317df5366146105865780631ab6014c146105995780631b689c0b146105ac5780631c05cad7146105bf5780631e9bef46146105d25780632302cbda146105e5578063230448b1146105f857806323b872dd1461060b57806325b75d681461061e575b600080fd5b61042c610427366004614594565b610cab565b005b61044161043c3660046145cb565b610dda565b6040519081526020015b60405180910390f35b61042c61046236600461460d565b61107e565b61042c610475366004614594565b6111a4565b61048d61048836600461465b565b611258565b604051901515815260200161044b565b61042c611283565b6104ad6112eb565b60405161044b91906146cf565b6104cd6104c83660046146e2565b61137d565b60405161044b91906146fb565b61042c6104e836600461470f565b6113a4565b61042c6104fb366004614806565b6114b9565b61042c61050e366004614806565b61151e565b6105266105213660046146e2565b61171a565b60408051968752602087019590955292151593850193909352151560608401526080830191909152151560a082015260c00161044b565b6104cd61056b3660046146e2565b6000908152600c60205260409020546001600160a01b031690565b6007546104cd906001600160a01b031681565b600f546104cd906001600160a01b031681565b6104416105ba3660046146e2565b61177d565b61042c6105cd36600461484c565b61178c565b600a546104cd906001600160a01b031681565b61042c6105f33660046148a8565b6117cc565b61048d6106063660046148dc565b6117f1565b61042c61061936600461491c565b61189d565b61042c61062c366004614806565b6118ce565b61044161063f3660046146e2565b6000908152600c6020526040902060010154600160a01b900460ff1690565b61042c61066c36600461495d565b611936565b61042c61067f36600461497a565b6119a2565b61044160135481565b6104ad61069b3660046146e2565b611d08565b600f54600160a01b900460ff16610441565b6008546104cd906001600160a01b031681565b61042c6106d3366004614806565b611dad565b6104cd6106e63660046146e2565b6000908152600c60205260409020600101546001600160a01b031690565b61044160115481565b61042c61071b366004614806565b611dfb565b6010546104cd906001600160a01b031681565b61042c61074136600461491c565b611e52565b61042c61075436600461495d565b611e6d565b6104ad611ed0565b60155461048d90600160f81b900460ff1681565b6104cd610783366004614594565b6000918252600b60209081526040808420928452600990920190529020546001600160a01b031690565b6104416107bb3660046146e2565b611ee9565b6104cd6107ce3660046146e2565b611f4b565b61042c6107e13660046149e1565b611f80565b61042c6107f436600461495d565b611ff9565b61044161080736600461495d565b61201b565b61042c6120a1565b61042c61082236600461497a565b6120b9565b61083a610835366004614594565b612281565b604080519889526001600160a01b0397881660208a015288019590955292851660608701526080860191909152831660a085015260c08401521660e08201526101000161044b565b6104ad610890366004614594565b61238a565b6104cd6123e9565b6108b06108ab3660046146e2565b6123fd565b60405161044b959493929190614a06565b6014546104cd906001600160a01b031681565b6104ad6126f1565b6109066108ea3660046146e2565b600090815260026020526040902054600160a01b900460a01b90565b60405161044b9190614a73565b61042c6109213660046146e2565b612700565b61042c610934366004614a96565b612758565b61042c610947366004614806565b612767565b6104cd61095a3660046146e2565b6000908152600c60205260409020600201546001600160a01b031690565b6104ad612853565b61044161098e3660046146e2565b600d6020526000908152604090205481565b61042c6109ae366004614806565b6128e1565b600e54600160a01b900460ff16610441565b61048d6109d336600461495d565b6014546001600160a01b0390811691161490565b6104416109f53660046146e2565b6000908152600c6020526040902060020154600160a01b900460ff1690565b6104ad6129b4565b61042c610a2a366004614ac4565b6129d8565b6104cd610a3d3660046146e2565b612abd565b600e546104cd906001600160a01b031681565b61042c610a63366004614806565b612b35565b61042c610a76366004614b13565b612ba0565b600954610441565b610a96610a913660046146e2565b612bd2565b60405161044b929190614b92565b61042c610ab2366004614594565b612e66565b61042c610ac5366004614594565b612f32565b6012546104cd906001600160a01b031681565b6104ad610aeb3660046146e2565b612fd3565b61042c610afe366004614c16565b6130bb565b61042c610b113660046146e2565b613210565b61042c610b24366004614594565b613278565b61042c610b373660046146e2565b613317565b61048d7f000000000000000000000000000000000000000000000000000000000000000081565b6015546001600160f81b0316610441565b61048d610b82366004614c5c565b613424565b610b9a610b953660046146e2565b613452565b60405161044b93929190614c8a565b610441610bb73660046146e2565b6000908152600c6020526040902054600160a01b900460ff1690565b61042c610be136600461495d565b61351e565b610c3e610bf43660046146e2565b6000908152600c60205260409020600281015481546001909201546001600160a01b03808316948482169460ff600160a01b95869004811695938516948490048116939091041690565b604080516001600160a01b039788168152958716602087015285019390935293166060830152608082019290925260a081019190915260c00161044b565b6104cd613594565b6104417f000000000000000000000000000000000000000000000000000000000000000081565b610cb48261359e565b60008281526002602052604090206008546001600160a01b03163314610d1b5760405162461bcd60e51b815260206004820152601760248201527613db9b1e481c985b991bdb5a5e995c881b585e481cd95d604a1b60448201526064015b60405180910390fd5b8054600160a01b900460a01b6001600160a01b03191615610d775760405162461bcd60e51b8152602060048201526016602482015275151bdad95b881a185cda08185b1c9958591e481cd95d60521b6044820152606401610d12565b81610db85760405162461bcd60e51b8152602060048201526011602482015270139bc81e995c9bc81a185cda081cd95959607a1b6044820152606401610d12565b805460a09290921c600160a01b026001600160a01b0390921691909117905550565b6014546000906001600160a01b03163314610e375760405162461bcd60e51b815260206004820152601e60248201527f4d757374206d696e742066726f6d206d696e74657220636f6e747261637400006044820152606401610d12565b6000838152600b60205260409020805462ffffff808216916001830191630100000090910416808310610eac5760405162461bcd60e51b815260206004820152601f60248201527f4d757374206e6f7420657863656564206d617820696e766f636174696f6e73006044820152606401610d12565b8354600160881b900460ff1680610edf57506000878152600c60205260409020600201546001600160a01b038781169116145b610f2b5760405162461bcd60e51b815260206004820181905260248201527f50726f6a656374206d75737420657869737420616e64206265206163746976656044820152606401610d12565b8354600160901b900460ff161580610f5f57506000878152600c60205260409020600201546001600160a01b038781169116145b610fa35760405162461bcd60e51b8152602060048201526015602482015274283ab931b430b9b2b99030b932903830bab9b2b21760591b6044820152606401610d12565b835462ffffff191662ffffff8381169182178655848116620f42408a0201919083169003610fd457610fd4886135ed565b610fde8982613645565b600854604051635b140b8d60e11b8152600481018390526001600160a01b039091169063b628171a90602401600060405180830381600087803b15801561102457600080fd5b505af1158015611038573d6000803e3d6000fd5b50506040518392506001600160a01b038c1691507f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688590600090a398975050505050505050565b61108782613777565b6000828152600b60205260409020805462ffffff80821691630100000090048116908416106110f75760405162461bcd60e51b815260206004820152601c60248201527b4f6e6c79206d6178496e766f636174696f6e7320646563726561736560201b6044820152606401610d12565b808362ffffff1610156111435760405162461bcd60e51b81526020600482015260146024820152734f6e6c792067746520696e766f636174696f6e7360601b6044820152606401610d12565b815465ffffff0000001916630100000062ffffff8516021782556040516d6d6178496e766f636174696f6e7360901b9085906000805160206152c583398151915290600090a3808362ffffff160361119e5761119e846135ed565b50505050565b6111ad826137ce565b6111bd8262615bf560e21b613816565b6000828152600b602052604090819020906111db9083906001613890565b6112245760405162461bcd60e51b815260206004820152601a60248201527901b5d5cdd0818dbdb9d185a5b88195e1858dd1b1e481bdb9948160361b6044820152606401610d12565b60078101829055604051697363726970745479706560b01b9084906000805160206152c583398151915290600090a3505050565b60006001600160e01b03198216635d9dd7eb60e11b148061127d575061127d82613903565b92915050565b6112936301050e9760e21b613953565b601554600160f81b900460ff16156112e15760405162461bcd60e51b815260206004820152601160248201527020b63932b0b23c903337b93134b23232b760791b6044820152606401610d12565b6112e96139a3565b565b6060600080546112fa90614cc0565b80601f016020809104026020016040519081016040528092919081815260200182805461132690614cc0565b80156113735780601f1061134857610100808354040283529160200191611373565b820191906000526020600020905b81548152906001019060200180831161135657829003601f168201915b5050505050905090565b6000611388826139fb565b506000908152600460205260409020546001600160a01b031690565b60006113af82611f4b565b9050806001600160a01b0316836001600160a01b03160361141c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d12565b336001600160a01b038216148061143857506114388133613424565b6114aa5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610d12565b6114b48383613a20565b505050565b6114c2826137ce565b6114d382630d17067360e01b613816565b6114dc81613a8e565b6000828152600b602052604090206001016114f78282614d57565b50604051636e616d6560e01b9083906000805160206152c583398151915290600090a35050565b611527826137ce565b611538826301cf392560e31b613816565b61154181613a8e565b80518190600b8111156115955760405162461bcd60e51b815260206004820152601c60248201527b41737065637420726174696f20666f726d617420746f6f206c6f6e6760201b6044820152606401610d12565b60008060005b838110156116815760008582815181106115b7576115b7614e10565b01602001516001600160f81b0319169050600360fc1b81108015906115ea5750603960f81b6001600160f81b0319821611155b156115f957600192505061166f565b6001600160f81b03198116601760f91b0361161d578361161d57600193505061166f565b60405162461bcd60e51b815260206004820152602160248201527f496d70726f7065726c7920666f726d61747465642061737065637420726174696044820152606f60f81b6064820152608401610d12565b8061167981614e3c565b91505061159b565b50806116cd5760405162461bcd60e51b815260206004820152601b60248201527a41737065637420726174696f20686173206e6f206e756d6265727360281b6044820152606401610d12565b6000868152600b602052604090206008016116e88682614d57565b506040516a617370656374526174696f60a81b9087906000805160206152c583398151915290600090a3505050505050565b6000818152600b60205260408120805462ffffff808216936301000000830490911692600160881b830460ff90811693600160901b810490911692600160481b9091046001600160401b03169161177088613add565b1591505091939550919395565b600061127d620f424083614e6b565b61179c631c05cad760e01b613953565b6117a584613b27565b6117ae83613b27565b6117b782613b27565b6117c081613b27565b61119e84848484613b7b565b6117dc63118165ed60e11b613953565b6117e581613a8e565b6117ee81613bfd565b50565b6000806117fc6123e9565b6001600160a01b0316141580156118955750600a546040516217798b60e61b81526001600160a01b03868116600483015285811660248301526001600160e01b031985166044830152909116906305de62c0906064016020604051808303816000875af1158015611871573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118959190614e7f565b949350505050565b6118a73382613c37565b6118c35760405162461bcd60e51b8152600401610d1290614e9c565b6114b4838383613c95565b6118d7826137ce565b6118e8826304b6ebad60e31b613816565b6118f181613a8e565b6000828152600b6020526040902060050161190c8282614d57565b50604051666c6963656e736560c81b9083906000805160206152c583398151915290600090a35050565b611946631593a0b360e11b613953565b61194f81613b27565b600780546001600160a01b0319166001600160a01b03831617905560405178646570656e64656e637952656769737472794164647265737360381b906000805160206152a583398151915290600090a250565b6119ab86613e31565b6119b486613777565b6119bd85613b27565b6000868152600c60205260409020606484118015906119dd575060648211155b611a175760405162461bcd60e51b815260206004820152600b60248201526a4d6178206f66203130302560a81b6044820152606401610d12565b831580611a2c57506001600160a01b03851615155b611a785760405162461bcd60e51b815260206004820152601d60248201527f5072696d617279207061796565206973207a65726f20616464726573730000006044820152606401610d12565b811580611a8d57506001600160a01b03831615155b611ad95760405162461bcd60e51b815260206004820152601f60248201527f5365636f6e64617279207061796565206973207a65726f2061646472657373006044820152606401610d12565b867f6ff7d102bb3657a26dcbbcd299d821a066718a7cf76ae7cd98279f18b74da8ac8787878787604051611b11959493929190614eea565b60405180910390a27f000000000000000000000000000000000000000000000000000000000000000080611bb757600282015482546001600160a01b03918216898316149160009181169089161480611b7157506001600160a01b038816155b60018501549091506000906001600160a01b0388811691161480611b9c57506001600160a01b038716155b9050828015611ba85750815b8015611bb15750805b93505050505b8015611cbf576000801b600d60008a815260200190815260200160002081905550868260020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550858260000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550848260020160146101000a81548160ff021916908360ff160217905550838260010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550828260010160146101000a81548160ff021916908360ff160217905550877fc582d05e1da854143bd3271ef4529d79cf5a69fc6057ae320f357acfd291b73860405160405180910390a2611cfe565b8686868686604051602001611cd8959493929190614eea565b60408051601f19818403018152918152815160209283012060008b8152600d9093529120555b5050505050505050565b6000818152600b60205260409020600601805460609190611d2890614cc0565b80601f0160208091040260200160405190810160405280929190818152602001828054611d5490614cc0565b8015611da15780601f10611d7657610100808354040283529160200191611da1565b820191906000526020600020905b815481529060010190602001808311611d8457829003601f168201915b50505050509050919050565b611db682613777565b6000828152600b60205260409020600401611dd18282614d57565b50604051667765627369746560c81b9083906000805160206152c583398151915290600090a35050565b611e0482613777565b611e0d81613a8e565b6000828152600b60205260409020600601611e288282614d57565b50604051666261736555524960c81b9083906000805160206152c583398151915290600090a35050565b6114b483838360405180602001604052806000815250612ba0565b611e7d632419b94160e11b613953565b611e8681613b27565b601480546001600160a01b0319166001600160a01b0383169081179091556040517fad0f299ec81a386c98df0ac27dae11dd020ed1b56963c53a7292e7a3a314539a90600090a250565b6060611ee4653b199718971960d11b613eb3565b905090565b600081815260026020526040812054600160a01b900460a01b6001600160a01b031981168203611f1c5750600092915050565b80604051602001611f2d9190614a73565b60405160208183030381529060405280519060200120915050919050565b6000818152600260205260408120546001600160a01b03168061127d5760405162461bcd60e51b8152600401610d1290614f1d565b611f8982613e31565b611f9a826369d14faf60e01b613f1e565b611fa381613b27565b6000828152600c602052604080822060020180546001600160a01b0319166001600160a01b038516179055516c6172746973744164647265737360981b9184916000805160206152c58339815191529190a35050565b612009636c907b7f60e01b613953565b61201281613b27565b6117ee81613fd5565b60006001600160a01b0382166120855760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610d12565b506001600160a01b031660009081526003602052604090205490565b6120a961405c565b6120b16139a3565b6112e96140bb565b6120c286613e31565b6120d3866376ee6fab60e01b613f1e565b6120dc85613b27565b84848484846040516020016120f5959493929190614eea565b60408051601f1981840301815291815281516020928301206000898152600d909352912054146121645760405162461bcd60e51b815260206004820152601a602482015279135d5cdd081b585d18da08185c9d1a5cdd081c1c9bdc1bdcd85b60321b6044820152606401610d12565b6000600c60008881526020019081526020016000209050858160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550848160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550838160020160146101000a81548160ff021916908360ff160217905550828160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550818160010160146101000a81548160ff021916908360ff1602179055506000801b600d600089815260200190815260200160002081905550867fc582d05e1da854143bd3271ef4529d79cf5a69fc6057ae320f357acfd291b73860405160405180910390a250505050505050565b6000828152600c60205260408120600e548291829182918291829182918291908a906064906122ba90600160a01b900460ff1683614f4f565b6122c49190614e6b565b99506122d08a82614f66565b600f549091506064906122ed90600160a01b900460ff168d614f4f565b6122f79190614e6b565b97506123038882614f66565b600283015490915060649061232290600160a01b900460ff1683614f4f565b61232c9190614e6b565b93506123388482614f66565b600e54600f546001600160a01b039182169b50169750955085156123675760028201546001600160a01b031694505b831561237b5781546001600160a01b031692505b50509295985092959890939650565b6000828152600b60205260409020805460609190600160301b900462ffffff1683106123c657505060408051602081019091526000815261127d565b6000838152600982016020526040902054611895906001600160a01b03166140cd565b6000611ee46006546001600160a01b031690565b60608060608060606000600b6000888152602001908152602001600020905080600101805461242b90614cc0565b80601f016020809104026020016040519081016040528092919081815260200182805461245790614cc0565b80156124a45780601f10612479576101008083540402835291602001916124a4565b820191906000526020600020905b81548152906001019060200180831161248757829003601f168201915b505050505095508060020180546124ba90614cc0565b80601f01602080910402602001604051908101604052809291908181526020018280546124e690614cc0565b80156125335780601f1061250857610100808354040283529160200191612533565b820191906000526020600020905b81548152906001019060200180831161251657829003601f168201915b5050505050945080600301805461254990614cc0565b80601f016020809104026020016040519081016040528092919081815260200182805461257590614cc0565b80156125c25780601f10612597576101008083540402835291602001916125c2565b820191906000526020600020905b8154815290600101906020018083116125a557829003601f168201915b505050505093508060040180546125d890614cc0565b80601f016020809104026020016040519081016040528092919081815260200182805461260490614cc0565b80156126515780601f1061262657610100808354040283529160200191612651565b820191906000526020600020905b81548152906001019060200180831161263457829003601f168201915b5050505050925080600501805461266790614cc0565b80601f016020809104026020016040519081016040528092919081815260200182805461269390614cc0565b80156126e05780601f106126b5576101008083540402835291602001916126e0565b820191906000526020600020905b8154815290600101906020018083116126c357829003601f168201915b505050505091505091939590929450565b6060600180546112fa90614cc0565b61270981613777565b6000818152600b6020526040808220805460ff60901b198116600160901b9182900460ff161590910217905551651c185d5cd95960d21b9183916000805160206152c58339815191529190a350565b61276333838361414c565b5050565b61277082613add565b61278b5761278633306351d9665360e11b6117f1565b6127a9565b6000828152600c60205260409020600201546001600160a01b031633145b61280a5760405162461bcd60e51b815260206004820152602c60248201527f4f6e6c7920617274697374207768656e20756e6c6f636b65642c206f776e657260448201526b081dda195b881b1bd8dad95960a21b6064820152608401610d12565b6000828152600b602052604090206003016128258282614d57565b506040516a3232b9b1b934b83a34b7b760a91b9083906000805160206152c583398151915290600090a35050565b6016805461286090614cc0565b80601f016020809104026020016040519081016040528092919081815260200182805461288c90614cc0565b80156128d95780601f106128ae576101008083540402835291602001916128d9565b820191906000526020600020905b8154815290600101906020018083116128bc57829003601f168201915b505050505081565b6128ea826137ce565b6128fb82632b2b404960e21b613816565b61290481613a8e565b6000828152600b6020526040902061291b82614216565b8154600160301b9081900462ffffff9081166000908152600985016020526040902080546001600160a01b0319166001600160a01b039490941693909317909255825461296d92919004166001614f79565b815462ffffff91909116600160301b0262ffffff60301b19909116178155604051651cd8dc9a5c1d60d21b9084906000805160206152c583398151915290600090a3505050565b6060611ee47547656e417274373231436f726556335f456e67696e6560501b613eb3565b6129e1836137ce565b6129f28363b1656ba360e01b613816565b6129fb81613a8e565b6000838152600b602052604090208054600160301b900462ffffff168310612a5d5760405162461bcd60e51b81526020600482015260156024820152747363726970744964206f7574206f662072616e676560581b6044820152606401610d12565b612a6682614216565b600084815260098301602052604080822080546001600160a01b0319166001600160a01b0394909416939093179092559051651cd8dc9a5c1d60d21b9186916000805160206152c58339815191529190a350505050565b6009546000908210612b075760405162461bcd60e51b8152602060048201526013602482015272496e646578206f7574206f6620626f756e647360681b6044820152606401610d12565b60098281548110612b1a57612b1a614e10565b6000918252602090912001546001600160a01b031692915050565b612b3e826137ce565b612b4f82635bd827d760e11b613816565b612b5881613a8e565b6000828152600b60205260409020600201612b738282614d57565b50604051696172746973744e616d6560b01b9083906000805160206152c583398151915290600090a35050565b612baa3383613c37565b612bc65760405162461bcd60e51b8152600401610d1290614e9c565b61119e848484846142c6565b606080612bde8361359e565b60408051600480825260a082019092529060208201608080368337505060408051600480825260a082019092529294509050602082016080803683370190505090506000612c2b8461177d565b6000818152600c6020526040812080546001820154939450909260ff600160a01b9283900481169392909104169082612c65836064614f66565b612c6f9190614f4f565b90506000612c7d8484614f4f565b6011546013549192509060008415612cf75760028801548b516001600160a01b03909116908c9083908110612cb457612cb4614e10565b6001600160a01b0390921660209283029190910190910152848a82612cd881614e3c565b935081518110612cea57612cea614e10565b6020026020010181815250505b8315612d655760018801548b516001600160a01b03909116908c9083908110612d2257612d22614e10565b6001600160a01b0390921660209283029190910190910152838a82612d4681614e3c565b935081518110612d5857612d58614e10565b6020026020010181815250505b8215612dd1576010548b516001600160a01b03909116908c9083908110612d8e57612d8e614e10565b6001600160a01b0390921660209283029190910190910152828a82612db281614e3c565b935081518110612dc457612dc4614e10565b6020026020010181815250505b8115612e3d576012548b516001600160a01b03909116908c9083908110612dfa57612dfa614e10565b6001600160a01b0390921660209283029190910190910152818a82612e1e81614e3c565b935081518110612e3057612e30614e10565b6020026020010181815250505b8060041115612e585780600403808c51038c52808b51038b52505b505050505050505050915091565b612e7663bd3d10e760e01b613953565b6064612e828284614f9c565b1115612ecb5760405162461bcd60e51b81526020600482015260186024820152774d61782073756d206f66204f4e455f48554e44524544202560401b6044820152606401610d12565b600e805460ff808516600160a01b90810260ff60a01b1993841617909355600f805491851690930291161790556040517970726f76696465725072696d61727950657263656e746167657360301b906000805160206152a583398151915290600090a25050565b612f3b82613777565b605f811115612f7f5760405162461bcd60e51b815260206004820152601060248201526f13dd995c881b585e081c195c98d95b9d60821b6044820152606401610d12565b6000828152600c6020526040808220805460ff60a01b1916600160a01b60ff8616021790555170726f79616c747950657263656e7461676560781b9184916000805160206152c58339815191529190a35050565b6060612fde8261359e565b6000600b6000612fed8561177d565b8152602001908152602001600020600601805461300990614cc0565b80601f016020809104026020016040519081016040528092919081815260200182805461303590614cc0565b80156130825780601f1061305757610100808354040283529160200191613082565b820191906000526020600020905b81548152906001019060200180831161306557829003601f168201915b5050505050905080613093846142f9565b6040516020016130a4929190614faf565b604051602081830303815290604052915050919050565b6130cb63cc90e72560e01b613953565b6130d482613a8e565b6130dd81613b27565b601554600160f81b900460ff16156131305760405162461bcd60e51b81526020600482015260166024820152752732bb90383937b532b1ba39903337b93134b23232b760511b6044820152606401610d12565b6015546001600160f81b03166000818152600c6020908152604080832060020180546001600160a01b0319166001600160a01b038716179055600b909152902060010161317d8482614d57565b506000818152600b60205260409020805465ffffff00000060ff60901b011916613d09601e1b600160901b011781556006016131ba601682614fde565b506131c68160016150b2565b601580546001600160f81b0319166001600160f81b03929092169190911790556040516618dc99585d195960ca1b9082906000805160206152c583398151915290600090a3505050565b61322063340f0e4360e21b613953565b61322981613e31565b6000818152600b6020526040808220805460ff60881b198116600160881b9182900460ff1615909102179055516561637469766560d01b9183916000805160206152c58339815191529190a350565b613288636d90d42360e11b613953565b6127106132958284614f9c565b11156132d95760405162461bcd60e51b81526020600482015260136024820152724f766572206d61782073756d206f662042505360681b6044820152606401610d12565b601182905560138190556040517370726f76696465725365636f6e6461727942505360601b906000805160206152a583398151915290600090a25050565b613320816137ce565b6133318163db2ff86160e01b613816565b6000818152600b602052604090208054600160301b900462ffffff166133905760405162461bcd60e51b81526020600482015260146024820152734e6f207363726970747320746f2072656d6f766560601b6044820152606401610d12565b805460098201906000906133b290600190600160301b900462ffffff166150d2565b62ffffff908116825260208201929092526040908101600090812080546001600160a01b0319169055835462ffffff60301b198116600160301b918290048516600019019094160292909217835551651cd8dc9a5c1d60d21b9184916000805160206152c58339815191529190a35050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6000818152600b6020526040812060078101546060928392909161347590613eb3565b935080600801805461348690614cc0565b80601f01602080910402602001604051908101604052809291908181526020018280546134b290614cc0565b80156134ff5780601f106134d4576101008083540402835291602001916134ff565b820191906000526020600020905b8154815290600101906020018083116134e257829003601f168201915b5050935496989297505050600160301b90940462ffffff169392505050565b61352661405c565b6001600160a01b03811661358b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d12565b6117ee816143f9565b6000611ee46123e9565b6135a781614424565b6117ee5760405162461bcd60e51b8152602060048201526017602482015276151bdad95b88125108191bd95cc81b9bdd08195e1a5cdd604a1b6044820152606401610d12565b6000818152600b6020526040808220805467ffffffffffffffff60481b1916600160481b426001600160401b031602179055516818dbdb5c1b195d195960ba1b9183916000805160206152c58339815191529190a350565b6001600160a01b03821661369b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d12565b6136a481614424565b156136f05760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610d12565b6001600160a01b0382166000908152600360205260408120805460019290613719908490614f9c565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000818152600c60205260409020600201546001600160a01b031633146117ee5760405162461bcd60e51b815260206004820152600b60248201526a13db9b1e48185c9d1a5cdd60aa1b6044820152606401610d12565b6137d781613add565b6117ee5760405162461bcd60e51b815260206004820152601060248201526f13db9b1e481a59881d5b9b1bd8dad95960821b6044820152606401610d12565b6000828152600c60205260409020600201546001600160a01b031633148061384457506138443330836117f1565b6127635760405162461bcd60e51b815260206004820181905260248201527f4f6e6c7920617274697374206f722041646d696e2041434c20616c6c6f7765646044820152606401610d12565b600080805b60208160ff1610156138ef576000868260ff16602081106138b8576138b8614e10565b1a905080158015906138cd575060808160ff16105b156138e6578560ff168160ff16036138e6578260010192505b50600101613895565b8360ff168260ff1614925050509392505050565b60006001600160e01b031982166380ac58cd60e01b148061393457506001600160e01b03198216635b5e139f60e01b145b8061127d57506301ffc9a760e01b6001600160e01b031983161461127d565b61395e3330836117f1565b6117ee5760405162461bcd60e51b815260206004820152601660248201527513db9b1e4810591b5a5b881050d308185b1b1bddd95960521b6044820152606401610d12565b601554600160f81b900460ff166112e957601580546001600160f81b0316600160f81b179055604051733732bba83937b532b1ba39a337b93134b23232b760611b906000805160206152a583398151915290600090a2565b613a0481614424565b6117ee5760405162461bcd60e51b8152600401610d1290614f1d565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613a5582611f4b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b80516000036117ee5760405162461bcd60e51b815260206004820152601b60248201527a4d75737420696e707574206e6f6e2d656d70747920737472696e6760281b6044820152606401610d12565b6000613ae882613e31565b6000828152600b6020526040902054600160481b90046001600160401b03168015808061189557506224ea00613b1e8342614f66565b10949350505050565b6001600160a01b0381166117ee5760405162461bcd60e51b815260206004820152601b60248201527a4d75737420696e707574206e6f6e2d7a65726f206164647265737360281b6044820152606401610d12565b600f80546001600160a01b038085166001600160a01b03199283161790925560128054848416908316179055600e805487841690831617905560108054928616929091169190911790556040517570726f766964657253616c657341646472657373657360501b906000805160206152a583398151915290600090a250505050565b6016613c098282614d57565b506040516d64656661756c744261736555524960901b906000805160206152a583398151915290600090a250565b600080613c4383611f4b565b9050806001600160a01b0316846001600160a01b03161480613c6a5750613c6a8185613424565b806118955750836001600160a01b0316613c838461137d565b6001600160a01b031614949350505050565b826001600160a01b0316613ca882611f4b565b6001600160a01b031614613d0c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610d12565b6001600160a01b038216613d6e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d12565b613d79600082613a20565b6001600160a01b0383166000908152600360205260408120805460019290613da2908490614f66565b90915550506001600160a01b0382166000908152600360205260408120805460019290613dd0908490614f9c565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b7f00000000000000000000000000000000000000000000000000000000000000008110158015613e6b57506015546001600160f81b031681105b6117ee5760405162461bcd60e51b8152602060048201526019602482015278141c9bda9958dd08125108191bd95cc81b9bdd08195e1a5cdd603a1b6044820152606401610d12565b606060005b828160ff1660208110613ecd57613ecd614e10565b1a60f81b6001600160f81b03191615801590613eec575060208160ff16105b15613f035780613efb816150ee565b915050613eb8565b60405191506040820160405280825282602083015250919050565b613f293330836117f1565b80613f6857506000613f396123e9565b6001600160a01b0316148015613f6857506000828152600c60205260409020600201546001600160a01b031633145b6127635760405162461bcd60e51b815260206004820152603860248201527f4f6e6c792041646d696e2041434c20616c6c6f7765642c206f722061727469736044820152771d081a59881bdddb995c881a185cc81c995b9bdd5b98d95960421b6064820152608401610d12565b600880546001600160a01b0383166001600160a01b031991821681179092556009805460018101825560009182527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805490921690921790556040517072616e646f6d697a65724164647265737360781b916000805160206152a583398151915291a250565b336140656123e9565b6001600160a01b0316146112e95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d12565b6140c361405c565b6112e960006143f9565b604051630eacc5e760e31b815260609073f0585df582a0ad119f1616fb82f3b449a98eecd5906375662f38906141079085906004016146fb565b600060405180830381865af4158015614124573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261127d919081019061510d565b816001600160a01b0316836001600160a01b0316036141a95760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610d12565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000807f42797465636f646553746f726167655f56312e302e305f5f5f5f5f5f5f5f5f20308460405160200161424e93929190615183565b60405160208183030381529060405290508051602082016000f091506001600160a01b0382166142c05760405162461bcd60e51b815260206004820152601e60248201527f436f6e7472616374417353746f726167653a205772697465204572726f7200006044820152606401610d12565b50919050565b6142d1848484613c95565b6142dd84848484614441565b61119e5760405162461bcd60e51b8152600401610d12906151e4565b6060816000036143205750506040805180820190915260018152600360fc1b602082015290565b8160005b811561434a578061433481614e3c565b91506143439050600a83614e6b565b9150614324565b6000816001600160401b038111156143645761436461473b565b6040519080825280601f01601f19166020018201604052801561438e576020820181803683370190505b5090505b8415611895576143a3600183614f66565b91506143b0600a86615236565b6143bb906030614f9c565b60f81b8183815181106143d0576143d0614e10565b60200101906001600160f81b031916908160001a9053506143f2600a86614e6b565b9450614392565b61440281614542565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6000908152600260205260409020546001600160a01b0316151590565b60006001600160a01b0384163b1561453757604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061448590339089908890889060040161524a565b6020604051808303816000875af19250505080156144c0575060408051601f3d908101601f191682019092526144bd91810190615287565b60015b61451d573d8080156144ee576040519150601f19603f3d011682016040523d82523d6000602084013e6144f3565b606091505b5080516000036145155760405162461bcd60e51b8152600401610d12906151e4565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611895565b506001949350505050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080604083850312156145a757600080fd5b50508035926020909101359150565b6001600160a01b03811681146117ee57600080fd5b6000806000606084860312156145e057600080fd5b83356145eb816145b6565b9250602084013591506040840135614602816145b6565b809150509250925092565b6000806040838503121561462057600080fd5b82359150602083013562ffffff8116811461463a57600080fd5b809150509250929050565b6001600160e01b0319811681146117ee57600080fd5b60006020828403121561466d57600080fd5b813561467881614645565b9392505050565b60005b8381101561469a578181015183820152602001614682565b50506000910152565b600081518084526146bb81602086016020860161467f565b601f01601f19169290920160200192915050565b60208152600061467860208301846146a3565b6000602082840312156146f457600080fd5b5035919050565b6001600160a01b0391909116815260200190565b6000806040838503121561472257600080fd5b823561472d816145b6565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156147795761477961473b565b604052919050565b60006001600160401b0382111561479a5761479a61473b565b50601f01601f191660200190565b60006147bb6147b684614781565b614751565b90508281528383830111156147cf57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126147f757600080fd5b614678838335602085016147a8565b6000806040838503121561481957600080fd5b8235915060208301356001600160401b0381111561483657600080fd5b614842858286016147e6565b9150509250929050565b6000806000806080858703121561486257600080fd5b843561486d816145b6565b9350602085013561487d816145b6565b9250604085013561488d816145b6565b9150606085013561489d816145b6565b939692955090935050565b6000602082840312156148ba57600080fd5b81356001600160401b038111156148d057600080fd5b611895848285016147e6565b6000806000606084860312156148f157600080fd5b83356148fc816145b6565b9250602084013561490c816145b6565b9150604084013561460281614645565b60008060006060848603121561493157600080fd5b833561493c816145b6565b9250602084013561494c816145b6565b929592945050506040919091013590565b60006020828403121561496f57600080fd5b8135614678816145b6565b60008060008060008060c0878903121561499357600080fd5b8635955060208701356149a5816145b6565b945060408701356149b5816145b6565b93506060870135925060808701356149cc816145b6565b8092505060a087013590509295509295509295565b600080604083850312156149f457600080fd5b82359150602083013561463a816145b6565b60a081526000614a1960a08301886146a3565b8281036020840152614a2b81886146a3565b90508281036040840152614a3f81876146a3565b90508281036060840152614a5381866146a3565b90508281036080840152614a6781856146a3565b98975050505050505050565b6001600160a01b031991909116815260200190565b80151581146117ee57600080fd5b60008060408385031215614aa957600080fd5b8235614ab4816145b6565b9150602083013561463a81614a88565b600080600060608486031215614ad957600080fd5b833592506020840135915060408401356001600160401b03811115614afd57600080fd5b614b09868287016147e6565b9150509250925092565b60008060008060808587031215614b2957600080fd5b8435614b34816145b6565b93506020850135614b44816145b6565b92506040850135915060608501356001600160401b03811115614b6657600080fd5b8501601f81018713614b7757600080fd5b614b86878235602084016147a8565b91505092959194509250565b604080825283519082018190526000906020906060840190828701845b82811015614bd45781516001600160a01b031684529284019290840190600101614baf565b5050508381038285015284518082528583019183019060005b81811015614c0957835183529284019291840191600101614bed565b5090979650505050505050565b60008060408385031215614c2957600080fd5b82356001600160401b03811115614c3f57600080fd5b614c4b858286016147e6565b925050602083013561463a816145b6565b60008060408385031215614c6f57600080fd5b8235614c7a816145b6565b9150602083013561463a816145b6565b606081526000614c9d60608301866146a3565b8281036020840152614caf81866146a3565b915050826040830152949350505050565b600181811c90821680614cd457607f821691505b6020821081036142c057634e487b7160e01b600052602260045260246000fd5b601f8211156114b457600081815260208120601f850160051c81016020861015614d1b5750805b601f850160051c820191505b81811015614d3a57828155600101614d27565b505050505050565b600019600383901b1c191660019190911b1790565b81516001600160401b03811115614d7057614d7061473b565b614d8481614d7e8454614cc0565b84614cf4565b602080601f831160018114614db35760008415614da15750858301515b614dab8582614d42565b865550614d3a565b600085815260208120601f198616915b82811015614de257888601518255948401946001909101908401614dc3565b5085821015614e005787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201614e4e57614e4e614e26565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082614e7a57614e7a614e55565b500490565b600060208284031215614e9157600080fd5b815161467881614a88565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b6001600160a01b039586168152938516602085015260408401929092529092166060820152608081019190915260a00190565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b808202811582820484141761127d5761127d614e26565b8181038181111561127d5761127d614e26565b62ffffff818116838216019080821115614f9557614f95614e26565b5092915050565b8082018082111561127d5761127d614e26565b60008351614fc181846020880161467f565b835190830190614fd581836020880161467f565b01949350505050565b818103614fe9575050565b614ff38254614cc0565b6001600160401b0381111561500a5761500a61473b565b61501881614d7e8454614cc0565b6000601f82116001811461504657600083156150345750848201545b61503e8482614d42565b8555506150ab565b600085815260209020601f19841690600086815260209020845b838110156150805782860154825560019586019590910190602001615060565b508583101561509e5781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b6001600160f81b03818116838216019080821115614f9557614f95614e26565b62ffffff828116828216039080821115614f9557614f95614e26565b600060ff821660ff810361510457615104614e26565b60010192915050565b60006020828403121561511f57600080fd5b81516001600160401b0381111561513557600080fd5b8201601f8101841361514657600080fd5b80516151546147b682614781565b81815285602083850101111561516957600080fd5b61517a82602083016020860161467f565b95945050505050565b6a600b5981380380925939f360a81b8152607f60f91b600b820152600c81018490526000602c8201819052606084901b6001600160601b031916603883015282516151d581604c85016020870161467f565b91909101604c01949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008261524557615245614e55565b500690565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061527d908301846146a3565b9695505050505050565b60006020828403121561529957600080fd5b81516146788161464556fe8b810f233ce7ee6e962ab4d98bf0277751de1f5589de3dcc812ac2047994d009b96a30340e86d03ce4be42f94ac02d7b27b4a4cdae942beb69026718dfe66afca264697066735822122095f2c264d08419ff611c102d80e55f6a0c3841dfdc638a7fcfae203ef0f5b5f664736f6c634300081300338b810f233ce7ee6e962ab4d98bf0277751de1f5589de3dcc812ac2047994d0090000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000027c914e3e5c4a008c3f04578323293dcaee13b7200000000000000000000000052dba55dd2b5de24f51efc6c57231c173e869fb9000000000000000000000000a5d5eb80c5f613a5b5611f9df58d875e70d5cf79000000000000000000000000d0a385cff92a27ffc8b3c3ef83fcbc63181a2d6600000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000652490c8bb6e7ec3fd798537d2f348d7904bbbc2000000000000000000000000000000000000000000000000000000000000000c4178696f6d20537061636533000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054158494f4d000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106104145760003560e01c8063715018a611610223578063b75395e01161012c578063b75395e014610a42578063b7b04fae14610a55578063b88d4fde14610a68578063b971136814610a7b578063bb3bafd614610a83578063bd3d10e714610aa4578063c34a03b514610ab7578063c6c7c5bf14610aca578063c87b56dd14610add578063cc90e72514610af0578063d03c390c14610b03578063db21a84614610b16578063db2ff86114610b29578063e6032df214610b3c578063e935b7b114610b63578063e985e9c514610b74578063eb9cd5d414610b87578063ed8abfda14610ba9578063f2fde38b14610bd3578063f313d73314610be6578063f851a44014610c7c578063f893c07b14610c8457600080fd5b8063715018a61461080c57806376ee6fab146108145780638639415b146108275780638c3c9cdd146108825780638da5cb5b146108955780638dd91a561461089d57806392f00233146108c157806395d89b41146108d45780639a02e4fa146108dc578063a11ec70a14610913578063a22cb46514610926578063a3b2cca614610939578063a47d29cb1461094c578063abcbb7b414610978578063ac11fa1c14610980578063acad0124146109a0578063acd4c66f146109b3578063ad0305ce146109c5578063ad2cdfc4146109e7578063ae45ad9814610a14578063b1656ba314610a1c578063b168762214610a2f57600080fd5b806328ec8f501161032557806328ec8f50146106315780632b2741661461065e5780632b65e67d146106715780632b8258c5146106845780632d9c02051461068d57806330ef4c5f146106a057806336c7c12c146106b257806337859963146106c557806338c8e468146106d85780633bb22553146107045780633e48e8481461070d57806341814cd31461072057806342842e0e1461073357806348337282146107465780634e1d64af146107595780635508fd521461076157806358b9a5a914610775578063621a1f74146107ad5780636352211e146107c057806369d14faf146107d35780636c907b7f146107e657806370a08231146107f957600080fd5b80611e3c146104195780615de51461042e5780630132c6971461045457806301856fd41461046757806301ffc9a71461047a57806304143a5c1461049d57806306fdde03146104a5578063081812fc146104ba578063095ea7b3146104da5780630d170673146104ed5780630e79c928146105005780630ea5613f146105135780630ebeb0ee1461055d57806317df5366146105865780631ab6014c146105995780631b689c0b146105ac5780631c05cad7146105bf5780631e9bef46146105d25780632302cbda146105e5578063230448b1146105f857806323b872dd1461060b57806325b75d681461061e575b600080fd5b61042c610427366004614594565b610cab565b005b61044161043c3660046145cb565b610dda565b6040519081526020015b60405180910390f35b61042c61046236600461460d565b61107e565b61042c610475366004614594565b6111a4565b61048d61048836600461465b565b611258565b604051901515815260200161044b565b61042c611283565b6104ad6112eb565b60405161044b91906146cf565b6104cd6104c83660046146e2565b61137d565b60405161044b91906146fb565b61042c6104e836600461470f565b6113a4565b61042c6104fb366004614806565b6114b9565b61042c61050e366004614806565b61151e565b6105266105213660046146e2565b61171a565b60408051968752602087019590955292151593850193909352151560608401526080830191909152151560a082015260c00161044b565b6104cd61056b3660046146e2565b6000908152600c60205260409020546001600160a01b031690565b6007546104cd906001600160a01b031681565b600f546104cd906001600160a01b031681565b6104416105ba3660046146e2565b61177d565b61042c6105cd36600461484c565b61178c565b600a546104cd906001600160a01b031681565b61042c6105f33660046148a8565b6117cc565b61048d6106063660046148dc565b6117f1565b61042c61061936600461491c565b61189d565b61042c61062c366004614806565b6118ce565b61044161063f3660046146e2565b6000908152600c6020526040902060010154600160a01b900460ff1690565b61042c61066c36600461495d565b611936565b61042c61067f36600461497a565b6119a2565b61044160135481565b6104ad61069b3660046146e2565b611d08565b600f54600160a01b900460ff16610441565b6008546104cd906001600160a01b031681565b61042c6106d3366004614806565b611dad565b6104cd6106e63660046146e2565b6000908152600c60205260409020600101546001600160a01b031690565b61044160115481565b61042c61071b366004614806565b611dfb565b6010546104cd906001600160a01b031681565b61042c61074136600461491c565b611e52565b61042c61075436600461495d565b611e6d565b6104ad611ed0565b60155461048d90600160f81b900460ff1681565b6104cd610783366004614594565b6000918252600b60209081526040808420928452600990920190529020546001600160a01b031690565b6104416107bb3660046146e2565b611ee9565b6104cd6107ce3660046146e2565b611f4b565b61042c6107e13660046149e1565b611f80565b61042c6107f436600461495d565b611ff9565b61044161080736600461495d565b61201b565b61042c6120a1565b61042c61082236600461497a565b6120b9565b61083a610835366004614594565b612281565b604080519889526001600160a01b0397881660208a015288019590955292851660608701526080860191909152831660a085015260c08401521660e08201526101000161044b565b6104ad610890366004614594565b61238a565b6104cd6123e9565b6108b06108ab3660046146e2565b6123fd565b60405161044b959493929190614a06565b6014546104cd906001600160a01b031681565b6104ad6126f1565b6109066108ea3660046146e2565b600090815260026020526040902054600160a01b900460a01b90565b60405161044b9190614a73565b61042c6109213660046146e2565b612700565b61042c610934366004614a96565b612758565b61042c610947366004614806565b612767565b6104cd61095a3660046146e2565b6000908152600c60205260409020600201546001600160a01b031690565b6104ad612853565b61044161098e3660046146e2565b600d6020526000908152604090205481565b61042c6109ae366004614806565b6128e1565b600e54600160a01b900460ff16610441565b61048d6109d336600461495d565b6014546001600160a01b0390811691161490565b6104416109f53660046146e2565b6000908152600c6020526040902060020154600160a01b900460ff1690565b6104ad6129b4565b61042c610a2a366004614ac4565b6129d8565b6104cd610a3d3660046146e2565b612abd565b600e546104cd906001600160a01b031681565b61042c610a63366004614806565b612b35565b61042c610a76366004614b13565b612ba0565b600954610441565b610a96610a913660046146e2565b612bd2565b60405161044b929190614b92565b61042c610ab2366004614594565b612e66565b61042c610ac5366004614594565b612f32565b6012546104cd906001600160a01b031681565b6104ad610aeb3660046146e2565b612fd3565b61042c610afe366004614c16565b6130bb565b61042c610b113660046146e2565b613210565b61042c610b24366004614594565b613278565b61042c610b373660046146e2565b613317565b61048d7f000000000000000000000000000000000000000000000000000000000000000081565b6015546001600160f81b0316610441565b61048d610b82366004614c5c565b613424565b610b9a610b953660046146e2565b613452565b60405161044b93929190614c8a565b610441610bb73660046146e2565b6000908152600c6020526040902054600160a01b900460ff1690565b61042c610be136600461495d565b61351e565b610c3e610bf43660046146e2565b6000908152600c60205260409020600281015481546001909201546001600160a01b03808316948482169460ff600160a01b95869004811695938516948490048116939091041690565b604080516001600160a01b039788168152958716602087015285019390935293166060830152608082019290925260a081019190915260c00161044b565b6104cd613594565b6104417f000000000000000000000000000000000000000000000000000000000000002281565b610cb48261359e565b60008281526002602052604090206008546001600160a01b03163314610d1b5760405162461bcd60e51b815260206004820152601760248201527613db9b1e481c985b991bdb5a5e995c881b585e481cd95d604a1b60448201526064015b60405180910390fd5b8054600160a01b900460a01b6001600160a01b03191615610d775760405162461bcd60e51b8152602060048201526016602482015275151bdad95b881a185cda08185b1c9958591e481cd95d60521b6044820152606401610d12565b81610db85760405162461bcd60e51b8152602060048201526011602482015270139bc81e995c9bc81a185cda081cd95959607a1b6044820152606401610d12565b805460a09290921c600160a01b026001600160a01b0390921691909117905550565b6014546000906001600160a01b03163314610e375760405162461bcd60e51b815260206004820152601e60248201527f4d757374206d696e742066726f6d206d696e74657220636f6e747261637400006044820152606401610d12565b6000838152600b60205260409020805462ffffff808216916001830191630100000090910416808310610eac5760405162461bcd60e51b815260206004820152601f60248201527f4d757374206e6f7420657863656564206d617820696e766f636174696f6e73006044820152606401610d12565b8354600160881b900460ff1680610edf57506000878152600c60205260409020600201546001600160a01b038781169116145b610f2b5760405162461bcd60e51b815260206004820181905260248201527f50726f6a656374206d75737420657869737420616e64206265206163746976656044820152606401610d12565b8354600160901b900460ff161580610f5f57506000878152600c60205260409020600201546001600160a01b038781169116145b610fa35760405162461bcd60e51b8152602060048201526015602482015274283ab931b430b9b2b99030b932903830bab9b2b21760591b6044820152606401610d12565b835462ffffff191662ffffff8381169182178655848116620f42408a0201919083169003610fd457610fd4886135ed565b610fde8982613645565b600854604051635b140b8d60e11b8152600481018390526001600160a01b039091169063b628171a90602401600060405180830381600087803b15801561102457600080fd5b505af1158015611038573d6000803e3d6000fd5b50506040518392506001600160a01b038c1691507f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688590600090a398975050505050505050565b61108782613777565b6000828152600b60205260409020805462ffffff80821691630100000090048116908416106110f75760405162461bcd60e51b815260206004820152601c60248201527b4f6e6c79206d6178496e766f636174696f6e7320646563726561736560201b6044820152606401610d12565b808362ffffff1610156111435760405162461bcd60e51b81526020600482015260146024820152734f6e6c792067746520696e766f636174696f6e7360601b6044820152606401610d12565b815465ffffff0000001916630100000062ffffff8516021782556040516d6d6178496e766f636174696f6e7360901b9085906000805160206152c583398151915290600090a3808362ffffff160361119e5761119e846135ed565b50505050565b6111ad826137ce565b6111bd8262615bf560e21b613816565b6000828152600b602052604090819020906111db9083906001613890565b6112245760405162461bcd60e51b815260206004820152601a60248201527901b5d5cdd0818dbdb9d185a5b88195e1858dd1b1e481bdb9948160361b6044820152606401610d12565b60078101829055604051697363726970745479706560b01b9084906000805160206152c583398151915290600090a3505050565b60006001600160e01b03198216635d9dd7eb60e11b148061127d575061127d82613903565b92915050565b6112936301050e9760e21b613953565b601554600160f81b900460ff16156112e15760405162461bcd60e51b815260206004820152601160248201527020b63932b0b23c903337b93134b23232b760791b6044820152606401610d12565b6112e96139a3565b565b6060600080546112fa90614cc0565b80601f016020809104026020016040519081016040528092919081815260200182805461132690614cc0565b80156113735780601f1061134857610100808354040283529160200191611373565b820191906000526020600020905b81548152906001019060200180831161135657829003601f168201915b5050505050905090565b6000611388826139fb565b506000908152600460205260409020546001600160a01b031690565b60006113af82611f4b565b9050806001600160a01b0316836001600160a01b03160361141c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d12565b336001600160a01b038216148061143857506114388133613424565b6114aa5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610d12565b6114b48383613a20565b505050565b6114c2826137ce565b6114d382630d17067360e01b613816565b6114dc81613a8e565b6000828152600b602052604090206001016114f78282614d57565b50604051636e616d6560e01b9083906000805160206152c583398151915290600090a35050565b611527826137ce565b611538826301cf392560e31b613816565b61154181613a8e565b80518190600b8111156115955760405162461bcd60e51b815260206004820152601c60248201527b41737065637420726174696f20666f726d617420746f6f206c6f6e6760201b6044820152606401610d12565b60008060005b838110156116815760008582815181106115b7576115b7614e10565b01602001516001600160f81b0319169050600360fc1b81108015906115ea5750603960f81b6001600160f81b0319821611155b156115f957600192505061166f565b6001600160f81b03198116601760f91b0361161d578361161d57600193505061166f565b60405162461bcd60e51b815260206004820152602160248201527f496d70726f7065726c7920666f726d61747465642061737065637420726174696044820152606f60f81b6064820152608401610d12565b8061167981614e3c565b91505061159b565b50806116cd5760405162461bcd60e51b815260206004820152601b60248201527a41737065637420726174696f20686173206e6f206e756d6265727360281b6044820152606401610d12565b6000868152600b602052604090206008016116e88682614d57565b506040516a617370656374526174696f60a81b9087906000805160206152c583398151915290600090a3505050505050565b6000818152600b60205260408120805462ffffff808216936301000000830490911692600160881b830460ff90811693600160901b810490911692600160481b9091046001600160401b03169161177088613add565b1591505091939550919395565b600061127d620f424083614e6b565b61179c631c05cad760e01b613953565b6117a584613b27565b6117ae83613b27565b6117b782613b27565b6117c081613b27565b61119e84848484613b7b565b6117dc63118165ed60e11b613953565b6117e581613a8e565b6117ee81613bfd565b50565b6000806117fc6123e9565b6001600160a01b0316141580156118955750600a546040516217798b60e61b81526001600160a01b03868116600483015285811660248301526001600160e01b031985166044830152909116906305de62c0906064016020604051808303816000875af1158015611871573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118959190614e7f565b949350505050565b6118a73382613c37565b6118c35760405162461bcd60e51b8152600401610d1290614e9c565b6114b4838383613c95565b6118d7826137ce565b6118e8826304b6ebad60e31b613816565b6118f181613a8e565b6000828152600b6020526040902060050161190c8282614d57565b50604051666c6963656e736560c81b9083906000805160206152c583398151915290600090a35050565b611946631593a0b360e11b613953565b61194f81613b27565b600780546001600160a01b0319166001600160a01b03831617905560405178646570656e64656e637952656769737472794164647265737360381b906000805160206152a583398151915290600090a250565b6119ab86613e31565b6119b486613777565b6119bd85613b27565b6000868152600c60205260409020606484118015906119dd575060648211155b611a175760405162461bcd60e51b815260206004820152600b60248201526a4d6178206f66203130302560a81b6044820152606401610d12565b831580611a2c57506001600160a01b03851615155b611a785760405162461bcd60e51b815260206004820152601d60248201527f5072696d617279207061796565206973207a65726f20616464726573730000006044820152606401610d12565b811580611a8d57506001600160a01b03831615155b611ad95760405162461bcd60e51b815260206004820152601f60248201527f5365636f6e64617279207061796565206973207a65726f2061646472657373006044820152606401610d12565b867f6ff7d102bb3657a26dcbbcd299d821a066718a7cf76ae7cd98279f18b74da8ac8787878787604051611b11959493929190614eea565b60405180910390a27f000000000000000000000000000000000000000000000000000000000000000080611bb757600282015482546001600160a01b03918216898316149160009181169089161480611b7157506001600160a01b038816155b60018501549091506000906001600160a01b0388811691161480611b9c57506001600160a01b038716155b9050828015611ba85750815b8015611bb15750805b93505050505b8015611cbf576000801b600d60008a815260200190815260200160002081905550868260020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550858260000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550848260020160146101000a81548160ff021916908360ff160217905550838260010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550828260010160146101000a81548160ff021916908360ff160217905550877fc582d05e1da854143bd3271ef4529d79cf5a69fc6057ae320f357acfd291b73860405160405180910390a2611cfe565b8686868686604051602001611cd8959493929190614eea565b60408051601f19818403018152918152815160209283012060008b8152600d9093529120555b5050505050505050565b6000818152600b60205260409020600601805460609190611d2890614cc0565b80601f0160208091040260200160405190810160405280929190818152602001828054611d5490614cc0565b8015611da15780601f10611d7657610100808354040283529160200191611da1565b820191906000526020600020905b815481529060010190602001808311611d8457829003601f168201915b50505050509050919050565b611db682613777565b6000828152600b60205260409020600401611dd18282614d57565b50604051667765627369746560c81b9083906000805160206152c583398151915290600090a35050565b611e0482613777565b611e0d81613a8e565b6000828152600b60205260409020600601611e288282614d57565b50604051666261736555524960c81b9083906000805160206152c583398151915290600090a35050565b6114b483838360405180602001604052806000815250612ba0565b611e7d632419b94160e11b613953565b611e8681613b27565b601480546001600160a01b0319166001600160a01b0383169081179091556040517fad0f299ec81a386c98df0ac27dae11dd020ed1b56963c53a7292e7a3a314539a90600090a250565b6060611ee4653b199718971960d11b613eb3565b905090565b600081815260026020526040812054600160a01b900460a01b6001600160a01b031981168203611f1c5750600092915050565b80604051602001611f2d9190614a73565b60405160208183030381529060405280519060200120915050919050565b6000818152600260205260408120546001600160a01b03168061127d5760405162461bcd60e51b8152600401610d1290614f1d565b611f8982613e31565b611f9a826369d14faf60e01b613f1e565b611fa381613b27565b6000828152600c602052604080822060020180546001600160a01b0319166001600160a01b038516179055516c6172746973744164647265737360981b9184916000805160206152c58339815191529190a35050565b612009636c907b7f60e01b613953565b61201281613b27565b6117ee81613fd5565b60006001600160a01b0382166120855760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610d12565b506001600160a01b031660009081526003602052604090205490565b6120a961405c565b6120b16139a3565b6112e96140bb565b6120c286613e31565b6120d3866376ee6fab60e01b613f1e565b6120dc85613b27565b84848484846040516020016120f5959493929190614eea565b60408051601f1981840301815291815281516020928301206000898152600d909352912054146121645760405162461bcd60e51b815260206004820152601a602482015279135d5cdd081b585d18da08185c9d1a5cdd081c1c9bdc1bdcd85b60321b6044820152606401610d12565b6000600c60008881526020019081526020016000209050858160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550848160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550838160020160146101000a81548160ff021916908360ff160217905550828160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550818160010160146101000a81548160ff021916908360ff1602179055506000801b600d600089815260200190815260200160002081905550867fc582d05e1da854143bd3271ef4529d79cf5a69fc6057ae320f357acfd291b73860405160405180910390a250505050505050565b6000828152600c60205260408120600e548291829182918291829182918291908a906064906122ba90600160a01b900460ff1683614f4f565b6122c49190614e6b565b99506122d08a82614f66565b600f549091506064906122ed90600160a01b900460ff168d614f4f565b6122f79190614e6b565b97506123038882614f66565b600283015490915060649061232290600160a01b900460ff1683614f4f565b61232c9190614e6b565b93506123388482614f66565b600e54600f546001600160a01b039182169b50169750955085156123675760028201546001600160a01b031694505b831561237b5781546001600160a01b031692505b50509295985092959890939650565b6000828152600b60205260409020805460609190600160301b900462ffffff1683106123c657505060408051602081019091526000815261127d565b6000838152600982016020526040902054611895906001600160a01b03166140cd565b6000611ee46006546001600160a01b031690565b60608060608060606000600b6000888152602001908152602001600020905080600101805461242b90614cc0565b80601f016020809104026020016040519081016040528092919081815260200182805461245790614cc0565b80156124a45780601f10612479576101008083540402835291602001916124a4565b820191906000526020600020905b81548152906001019060200180831161248757829003601f168201915b505050505095508060020180546124ba90614cc0565b80601f01602080910402602001604051908101604052809291908181526020018280546124e690614cc0565b80156125335780601f1061250857610100808354040283529160200191612533565b820191906000526020600020905b81548152906001019060200180831161251657829003601f168201915b5050505050945080600301805461254990614cc0565b80601f016020809104026020016040519081016040528092919081815260200182805461257590614cc0565b80156125c25780601f10612597576101008083540402835291602001916125c2565b820191906000526020600020905b8154815290600101906020018083116125a557829003601f168201915b505050505093508060040180546125d890614cc0565b80601f016020809104026020016040519081016040528092919081815260200182805461260490614cc0565b80156126515780601f1061262657610100808354040283529160200191612651565b820191906000526020600020905b81548152906001019060200180831161263457829003601f168201915b5050505050925080600501805461266790614cc0565b80601f016020809104026020016040519081016040528092919081815260200182805461269390614cc0565b80156126e05780601f106126b5576101008083540402835291602001916126e0565b820191906000526020600020905b8154815290600101906020018083116126c357829003601f168201915b505050505091505091939590929450565b6060600180546112fa90614cc0565b61270981613777565b6000818152600b6020526040808220805460ff60901b198116600160901b9182900460ff161590910217905551651c185d5cd95960d21b9183916000805160206152c58339815191529190a350565b61276333838361414c565b5050565b61277082613add565b61278b5761278633306351d9665360e11b6117f1565b6127a9565b6000828152600c60205260409020600201546001600160a01b031633145b61280a5760405162461bcd60e51b815260206004820152602c60248201527f4f6e6c7920617274697374207768656e20756e6c6f636b65642c206f776e657260448201526b081dda195b881b1bd8dad95960a21b6064820152608401610d12565b6000828152600b602052604090206003016128258282614d57565b506040516a3232b9b1b934b83a34b7b760a91b9083906000805160206152c583398151915290600090a35050565b6016805461286090614cc0565b80601f016020809104026020016040519081016040528092919081815260200182805461288c90614cc0565b80156128d95780601f106128ae576101008083540402835291602001916128d9565b820191906000526020600020905b8154815290600101906020018083116128bc57829003601f168201915b505050505081565b6128ea826137ce565b6128fb82632b2b404960e21b613816565b61290481613a8e565b6000828152600b6020526040902061291b82614216565b8154600160301b9081900462ffffff9081166000908152600985016020526040902080546001600160a01b0319166001600160a01b039490941693909317909255825461296d92919004166001614f79565b815462ffffff91909116600160301b0262ffffff60301b19909116178155604051651cd8dc9a5c1d60d21b9084906000805160206152c583398151915290600090a3505050565b6060611ee47547656e417274373231436f726556335f456e67696e6560501b613eb3565b6129e1836137ce565b6129f28363b1656ba360e01b613816565b6129fb81613a8e565b6000838152600b602052604090208054600160301b900462ffffff168310612a5d5760405162461bcd60e51b81526020600482015260156024820152747363726970744964206f7574206f662072616e676560581b6044820152606401610d12565b612a6682614216565b600084815260098301602052604080822080546001600160a01b0319166001600160a01b0394909416939093179092559051651cd8dc9a5c1d60d21b9186916000805160206152c58339815191529190a350505050565b6009546000908210612b075760405162461bcd60e51b8152602060048201526013602482015272496e646578206f7574206f6620626f756e647360681b6044820152606401610d12565b60098281548110612b1a57612b1a614e10565b6000918252602090912001546001600160a01b031692915050565b612b3e826137ce565b612b4f82635bd827d760e11b613816565b612b5881613a8e565b6000828152600b60205260409020600201612b738282614d57565b50604051696172746973744e616d6560b01b9083906000805160206152c583398151915290600090a35050565b612baa3383613c37565b612bc65760405162461bcd60e51b8152600401610d1290614e9c565b61119e848484846142c6565b606080612bde8361359e565b60408051600480825260a082019092529060208201608080368337505060408051600480825260a082019092529294509050602082016080803683370190505090506000612c2b8461177d565b6000818152600c6020526040812080546001820154939450909260ff600160a01b9283900481169392909104169082612c65836064614f66565b612c6f9190614f4f565b90506000612c7d8484614f4f565b6011546013549192509060008415612cf75760028801548b516001600160a01b03909116908c9083908110612cb457612cb4614e10565b6001600160a01b0390921660209283029190910190910152848a82612cd881614e3c565b935081518110612cea57612cea614e10565b6020026020010181815250505b8315612d655760018801548b516001600160a01b03909116908c9083908110612d2257612d22614e10565b6001600160a01b0390921660209283029190910190910152838a82612d4681614e3c565b935081518110612d5857612d58614e10565b6020026020010181815250505b8215612dd1576010548b516001600160a01b03909116908c9083908110612d8e57612d8e614e10565b6001600160a01b0390921660209283029190910190910152828a82612db281614e3c565b935081518110612dc457612dc4614e10565b6020026020010181815250505b8115612e3d576012548b516001600160a01b03909116908c9083908110612dfa57612dfa614e10565b6001600160a01b0390921660209283029190910190910152818a82612e1e81614e3c565b935081518110612e3057612e30614e10565b6020026020010181815250505b8060041115612e585780600403808c51038c52808b51038b52505b505050505050505050915091565b612e7663bd3d10e760e01b613953565b6064612e828284614f9c565b1115612ecb5760405162461bcd60e51b81526020600482015260186024820152774d61782073756d206f66204f4e455f48554e44524544202560401b6044820152606401610d12565b600e805460ff808516600160a01b90810260ff60a01b1993841617909355600f805491851690930291161790556040517970726f76696465725072696d61727950657263656e746167657360301b906000805160206152a583398151915290600090a25050565b612f3b82613777565b605f811115612f7f5760405162461bcd60e51b815260206004820152601060248201526f13dd995c881b585e081c195c98d95b9d60821b6044820152606401610d12565b6000828152600c6020526040808220805460ff60a01b1916600160a01b60ff8616021790555170726f79616c747950657263656e7461676560781b9184916000805160206152c58339815191529190a35050565b6060612fde8261359e565b6000600b6000612fed8561177d565b8152602001908152602001600020600601805461300990614cc0565b80601f016020809104026020016040519081016040528092919081815260200182805461303590614cc0565b80156130825780601f1061305757610100808354040283529160200191613082565b820191906000526020600020905b81548152906001019060200180831161306557829003601f168201915b5050505050905080613093846142f9565b6040516020016130a4929190614faf565b604051602081830303815290604052915050919050565b6130cb63cc90e72560e01b613953565b6130d482613a8e565b6130dd81613b27565b601554600160f81b900460ff16156131305760405162461bcd60e51b81526020600482015260166024820152752732bb90383937b532b1ba39903337b93134b23232b760511b6044820152606401610d12565b6015546001600160f81b03166000818152600c6020908152604080832060020180546001600160a01b0319166001600160a01b038716179055600b909152902060010161317d8482614d57565b506000818152600b60205260409020805465ffffff00000060ff60901b011916613d09601e1b600160901b011781556006016131ba601682614fde565b506131c68160016150b2565b601580546001600160f81b0319166001600160f81b03929092169190911790556040516618dc99585d195960ca1b9082906000805160206152c583398151915290600090a3505050565b61322063340f0e4360e21b613953565b61322981613e31565b6000818152600b6020526040808220805460ff60881b198116600160881b9182900460ff1615909102179055516561637469766560d01b9183916000805160206152c58339815191529190a350565b613288636d90d42360e11b613953565b6127106132958284614f9c565b11156132d95760405162461bcd60e51b81526020600482015260136024820152724f766572206d61782073756d206f662042505360681b6044820152606401610d12565b601182905560138190556040517370726f76696465725365636f6e6461727942505360601b906000805160206152a583398151915290600090a25050565b613320816137ce565b6133318163db2ff86160e01b613816565b6000818152600b602052604090208054600160301b900462ffffff166133905760405162461bcd60e51b81526020600482015260146024820152734e6f207363726970747320746f2072656d6f766560601b6044820152606401610d12565b805460098201906000906133b290600190600160301b900462ffffff166150d2565b62ffffff908116825260208201929092526040908101600090812080546001600160a01b0319169055835462ffffff60301b198116600160301b918290048516600019019094160292909217835551651cd8dc9a5c1d60d21b9184916000805160206152c58339815191529190a35050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6000818152600b6020526040812060078101546060928392909161347590613eb3565b935080600801805461348690614cc0565b80601f01602080910402602001604051908101604052809291908181526020018280546134b290614cc0565b80156134ff5780601f106134d4576101008083540402835291602001916134ff565b820191906000526020600020905b8154815290600101906020018083116134e257829003601f168201915b5050935496989297505050600160301b90940462ffffff169392505050565b61352661405c565b6001600160a01b03811661358b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d12565b6117ee816143f9565b6000611ee46123e9565b6135a781614424565b6117ee5760405162461bcd60e51b8152602060048201526017602482015276151bdad95b88125108191bd95cc81b9bdd08195e1a5cdd604a1b6044820152606401610d12565b6000818152600b6020526040808220805467ffffffffffffffff60481b1916600160481b426001600160401b031602179055516818dbdb5c1b195d195960ba1b9183916000805160206152c58339815191529190a350565b6001600160a01b03821661369b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d12565b6136a481614424565b156136f05760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610d12565b6001600160a01b0382166000908152600360205260408120805460019290613719908490614f9c565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000818152600c60205260409020600201546001600160a01b031633146117ee5760405162461bcd60e51b815260206004820152600b60248201526a13db9b1e48185c9d1a5cdd60aa1b6044820152606401610d12565b6137d781613add565b6117ee5760405162461bcd60e51b815260206004820152601060248201526f13db9b1e481a59881d5b9b1bd8dad95960821b6044820152606401610d12565b6000828152600c60205260409020600201546001600160a01b031633148061384457506138443330836117f1565b6127635760405162461bcd60e51b815260206004820181905260248201527f4f6e6c7920617274697374206f722041646d696e2041434c20616c6c6f7765646044820152606401610d12565b600080805b60208160ff1610156138ef576000868260ff16602081106138b8576138b8614e10565b1a905080158015906138cd575060808160ff16105b156138e6578560ff168160ff16036138e6578260010192505b50600101613895565b8360ff168260ff1614925050509392505050565b60006001600160e01b031982166380ac58cd60e01b148061393457506001600160e01b03198216635b5e139f60e01b145b8061127d57506301ffc9a760e01b6001600160e01b031983161461127d565b61395e3330836117f1565b6117ee5760405162461bcd60e51b815260206004820152601660248201527513db9b1e4810591b5a5b881050d308185b1b1bddd95960521b6044820152606401610d12565b601554600160f81b900460ff166112e957601580546001600160f81b0316600160f81b179055604051733732bba83937b532b1ba39a337b93134b23232b760611b906000805160206152a583398151915290600090a2565b613a0481614424565b6117ee5760405162461bcd60e51b8152600401610d1290614f1d565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613a5582611f4b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b80516000036117ee5760405162461bcd60e51b815260206004820152601b60248201527a4d75737420696e707574206e6f6e2d656d70747920737472696e6760281b6044820152606401610d12565b6000613ae882613e31565b6000828152600b6020526040902054600160481b90046001600160401b03168015808061189557506224ea00613b1e8342614f66565b10949350505050565b6001600160a01b0381166117ee5760405162461bcd60e51b815260206004820152601b60248201527a4d75737420696e707574206e6f6e2d7a65726f206164647265737360281b6044820152606401610d12565b600f80546001600160a01b038085166001600160a01b03199283161790925560128054848416908316179055600e805487841690831617905560108054928616929091169190911790556040517570726f766964657253616c657341646472657373657360501b906000805160206152a583398151915290600090a250505050565b6016613c098282614d57565b506040516d64656661756c744261736555524960901b906000805160206152a583398151915290600090a250565b600080613c4383611f4b565b9050806001600160a01b0316846001600160a01b03161480613c6a5750613c6a8185613424565b806118955750836001600160a01b0316613c838461137d565b6001600160a01b031614949350505050565b826001600160a01b0316613ca882611f4b565b6001600160a01b031614613d0c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610d12565b6001600160a01b038216613d6e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d12565b613d79600082613a20565b6001600160a01b0383166000908152600360205260408120805460019290613da2908490614f66565b90915550506001600160a01b0382166000908152600360205260408120805460019290613dd0908490614f9c565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b7f00000000000000000000000000000000000000000000000000000000000000228110158015613e6b57506015546001600160f81b031681105b6117ee5760405162461bcd60e51b8152602060048201526019602482015278141c9bda9958dd08125108191bd95cc81b9bdd08195e1a5cdd603a1b6044820152606401610d12565b606060005b828160ff1660208110613ecd57613ecd614e10565b1a60f81b6001600160f81b03191615801590613eec575060208160ff16105b15613f035780613efb816150ee565b915050613eb8565b60405191506040820160405280825282602083015250919050565b613f293330836117f1565b80613f6857506000613f396123e9565b6001600160a01b0316148015613f6857506000828152600c60205260409020600201546001600160a01b031633145b6127635760405162461bcd60e51b815260206004820152603860248201527f4f6e6c792041646d696e2041434c20616c6c6f7765642c206f722061727469736044820152771d081a59881bdddb995c881a185cc81c995b9bdd5b98d95960421b6064820152608401610d12565b600880546001600160a01b0383166001600160a01b031991821681179092556009805460018101825560009182527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01805490921690921790556040517072616e646f6d697a65724164647265737360781b916000805160206152a583398151915291a250565b336140656123e9565b6001600160a01b0316146112e95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d12565b6140c361405c565b6112e960006143f9565b604051630eacc5e760e31b815260609073f0585df582a0ad119f1616fb82f3b449a98eecd5906375662f38906141079085906004016146fb565b600060405180830381865af4158015614124573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261127d919081019061510d565b816001600160a01b0316836001600160a01b0316036141a95760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610d12565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000807f42797465636f646553746f726167655f56312e302e305f5f5f5f5f5f5f5f5f20308460405160200161424e93929190615183565b60405160208183030381529060405290508051602082016000f091506001600160a01b0382166142c05760405162461bcd60e51b815260206004820152601e60248201527f436f6e7472616374417353746f726167653a205772697465204572726f7200006044820152606401610d12565b50919050565b6142d1848484613c95565b6142dd84848484614441565b61119e5760405162461bcd60e51b8152600401610d12906151e4565b6060816000036143205750506040805180820190915260018152600360fc1b602082015290565b8160005b811561434a578061433481614e3c565b91506143439050600a83614e6b565b9150614324565b6000816001600160401b038111156143645761436461473b565b6040519080825280601f01601f19166020018201604052801561438e576020820181803683370190505b5090505b8415611895576143a3600183614f66565b91506143b0600a86615236565b6143bb906030614f9c565b60f81b8183815181106143d0576143d0614e10565b60200101906001600160f81b031916908160001a9053506143f2600a86614e6b565b9450614392565b61440281614542565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6000908152600260205260409020546001600160a01b0316151590565b60006001600160a01b0384163b1561453757604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061448590339089908890889060040161524a565b6020604051808303816000875af19250505080156144c0575060408051601f3d908101601f191682019092526144bd91810190615287565b60015b61451d573d8080156144ee576040519150601f19603f3d011682016040523d82523d6000602084013e6144f3565b606091505b5080516000036145155760405162461bcd60e51b8152600401610d12906151e4565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611895565b506001949350505050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080604083850312156145a757600080fd5b50508035926020909101359150565b6001600160a01b03811681146117ee57600080fd5b6000806000606084860312156145e057600080fd5b83356145eb816145b6565b9250602084013591506040840135614602816145b6565b809150509250925092565b6000806040838503121561462057600080fd5b82359150602083013562ffffff8116811461463a57600080fd5b809150509250929050565b6001600160e01b0319811681146117ee57600080fd5b60006020828403121561466d57600080fd5b813561467881614645565b9392505050565b60005b8381101561469a578181015183820152602001614682565b50506000910152565b600081518084526146bb81602086016020860161467f565b601f01601f19169290920160200192915050565b60208152600061467860208301846146a3565b6000602082840312156146f457600080fd5b5035919050565b6001600160a01b0391909116815260200190565b6000806040838503121561472257600080fd5b823561472d816145b6565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156147795761477961473b565b604052919050565b60006001600160401b0382111561479a5761479a61473b565b50601f01601f191660200190565b60006147bb6147b684614781565b614751565b90508281528383830111156147cf57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126147f757600080fd5b614678838335602085016147a8565b6000806040838503121561481957600080fd5b8235915060208301356001600160401b0381111561483657600080fd5b614842858286016147e6565b9150509250929050565b6000806000806080858703121561486257600080fd5b843561486d816145b6565b9350602085013561487d816145b6565b9250604085013561488d816145b6565b9150606085013561489d816145b6565b939692955090935050565b6000602082840312156148ba57600080fd5b81356001600160401b038111156148d057600080fd5b611895848285016147e6565b6000806000606084860312156148f157600080fd5b83356148fc816145b6565b9250602084013561490c816145b6565b9150604084013561460281614645565b60008060006060848603121561493157600080fd5b833561493c816145b6565b9250602084013561494c816145b6565b929592945050506040919091013590565b60006020828403121561496f57600080fd5b8135614678816145b6565b60008060008060008060c0878903121561499357600080fd5b8635955060208701356149a5816145b6565b945060408701356149b5816145b6565b93506060870135925060808701356149cc816145b6565b8092505060a087013590509295509295509295565b600080604083850312156149f457600080fd5b82359150602083013561463a816145b6565b60a081526000614a1960a08301886146a3565b8281036020840152614a2b81886146a3565b90508281036040840152614a3f81876146a3565b90508281036060840152614a5381866146a3565b90508281036080840152614a6781856146a3565b98975050505050505050565b6001600160a01b031991909116815260200190565b80151581146117ee57600080fd5b60008060408385031215614aa957600080fd5b8235614ab4816145b6565b9150602083013561463a81614a88565b600080600060608486031215614ad957600080fd5b833592506020840135915060408401356001600160401b03811115614afd57600080fd5b614b09868287016147e6565b9150509250925092565b60008060008060808587031215614b2957600080fd5b8435614b34816145b6565b93506020850135614b44816145b6565b92506040850135915060608501356001600160401b03811115614b6657600080fd5b8501601f81018713614b7757600080fd5b614b86878235602084016147a8565b91505092959194509250565b604080825283519082018190526000906020906060840190828701845b82811015614bd45781516001600160a01b031684529284019290840190600101614baf565b5050508381038285015284518082528583019183019060005b81811015614c0957835183529284019291840191600101614bed565b5090979650505050505050565b60008060408385031215614c2957600080fd5b82356001600160401b03811115614c3f57600080fd5b614c4b858286016147e6565b925050602083013561463a816145b6565b60008060408385031215614c6f57600080fd5b8235614c7a816145b6565b9150602083013561463a816145b6565b606081526000614c9d60608301866146a3565b8281036020840152614caf81866146a3565b915050826040830152949350505050565b600181811c90821680614cd457607f821691505b6020821081036142c057634e487b7160e01b600052602260045260246000fd5b601f8211156114b457600081815260208120601f850160051c81016020861015614d1b5750805b601f850160051c820191505b81811015614d3a57828155600101614d27565b505050505050565b600019600383901b1c191660019190911b1790565b81516001600160401b03811115614d7057614d7061473b565b614d8481614d7e8454614cc0565b84614cf4565b602080601f831160018114614db35760008415614da15750858301515b614dab8582614d42565b865550614d3a565b600085815260208120601f198616915b82811015614de257888601518255948401946001909101908401614dc3565b5085821015614e005787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201614e4e57614e4e614e26565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082614e7a57614e7a614e55565b500490565b600060208284031215614e9157600080fd5b815161467881614a88565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b6001600160a01b039586168152938516602085015260408401929092529092166060820152608081019190915260a00190565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b808202811582820484141761127d5761127d614e26565b8181038181111561127d5761127d614e26565b62ffffff818116838216019080821115614f9557614f95614e26565b5092915050565b8082018082111561127d5761127d614e26565b60008351614fc181846020880161467f565b835190830190614fd581836020880161467f565b01949350505050565b818103614fe9575050565b614ff38254614cc0565b6001600160401b0381111561500a5761500a61473b565b61501881614d7e8454614cc0565b6000601f82116001811461504657600083156150345750848201545b61503e8482614d42565b8555506150ab565b600085815260209020601f19841690600086815260209020845b838110156150805782860154825560019586019590910190602001615060565b508583101561509e5781850154600019600388901b60f8161c191681555b50505060018360011b0184555b5050505050565b6001600160f81b03818116838216019080821115614f9557614f95614e26565b62ffffff828116828216039080821115614f9557614f95614e26565b600060ff821660ff810361510457615104614e26565b60010192915050565b60006020828403121561511f57600080fd5b81516001600160401b0381111561513557600080fd5b8201601f8101841361514657600080fd5b80516151546147b682614781565b81815285602083850101111561516957600080fd5b61517a82602083016020860161467f565b95945050505050565b6a600b5981380380925939f360a81b8152607f60f91b600b820152600c81018490526000602c8201819052606084901b6001600160601b031916603883015282516151d581604c85016020870161467f565b91909101604c01949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008261524557615245614e55565b500690565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061527d908301846146a3565b9695505050505050565b60006020828403121561529957600080fd5b81516146788161464556fe8b810f233ce7ee6e962ab4d98bf0277751de1f5589de3dcc812ac2047994d009b96a30340e86d03ce4be42f94ac02d7b27b4a4cdae942beb69026718dfe66afca264697066735822122095f2c264d08419ff611c102d80e55f6a0c3841dfdc638a7fcfae203ef0f5b5f664736f6c63430008130033

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

0000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000027c914e3e5c4a008c3f04578323293dcaee13b7200000000000000000000000052dba55dd2b5de24f51efc6c57231c173e869fb9000000000000000000000000a5d5eb80c5f613a5b5611f9df58d875e70d5cf79000000000000000000000000d0a385cff92a27ffc8b3c3ef83fcbc63181a2d6600000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000652490c8bb6e7ec3fd798537d2f348d7904bbbc2000000000000000000000000000000000000000000000000000000000000000c4178696f6d20537061636533000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054158494f4d000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _tokenName (string): Axiom Space3
Arg [1] : _tokenSymbol (string): AXIOM
Arg [2] : _renderProviderAddress (address): 0x27c914E3E5C4a008C3F04578323293DcAeE13B72
Arg [3] : _platformProviderAddress (address): 0x52DbA55DD2b5de24f51EfC6C57231C173E869fb9
Arg [4] : _randomizerContract (address): 0xA5D5EB80C5f613A5B5611f9DF58d875E70d5CF79
Arg [5] : _adminACLContract (address): 0xD0A385CfF92a27ffC8B3C3ef83fcbC63181A2d66
Arg [6] : _startingProjectId (uint248): 34
Arg [7] : _autoApproveArtistSplitProposals (bool): False
Arg [8] : _engineRegistryContract (address): 0x652490c8BB6e7ec3Fd798537D2F348D7904BBbc2

-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [2] : 00000000000000000000000027c914e3e5c4a008c3f04578323293dcaee13b72
Arg [3] : 00000000000000000000000052dba55dd2b5de24f51efc6c57231c173e869fb9
Arg [4] : 000000000000000000000000a5d5eb80c5f613a5b5611f9df58d875e70d5cf79
Arg [5] : 000000000000000000000000d0a385cff92a27ffc8b3c3ef83fcbc63181a2d66
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000022
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [8] : 000000000000000000000000652490c8bb6e7ec3fd798537d2f348d7904bbbc2
Arg [9] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [10] : 4178696f6d205370616365330000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [12] : 4158494f4d000000000000000000000000000000000000000000000000000000


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.