ETH Price: $2,480.46 (-3.14%)

Token

Plutocats (PCAT)
 

Overview

Max Total Supply

2,299 PCAT

Holders

94

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
0 PCAT
0x31357bc62a65d730f739e1520176e623d42eb60d
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Contract Source Code Verified (Exact Match)

Contract Name:
PlutocatsToken

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 21 : PlutocatsToken.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Plutocats NFT

pragma solidity >=0.8.0;

import {ERC721} from "nouns-monorepo/packages/nouns-contracts/contracts/base/ERC721.sol";
import {IBlast} from "./interfaces/IBlast.sol";
import {ERC721Checkpointable} from "nouns-monorepo/packages/nouns-contracts/contracts/base/ERC721Checkpointable.sol";
import {IPlutocatsDescriptorMinimal} from "./interfaces/IPlutocatsDescriptorMinimal.sol";
import {IPlutocatsSeeder} from "./interfaces/IPlutocatsSeeder.sol";
import {IPlutocatsToken} from "./interfaces/IPlutocatsToken.sol";
import {LinearVRGDA} from "VRGDAs/LinearVRGDA.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {toDaysWadUnsafe} from "solmate/utils/SignedWadMath.sol";

contract PlutocatsToken is IPlutocatsToken, ERC721Checkpointable, LinearVRGDA, Ownable {
    using Address for address payable;

    /// Timestamp for when minting will start.
    uint256 public immutable MINT_START;

    /// The internal tokenId tracker.
    uint256 private _currentCatId;

    /// The address of the reserve.
    address public reserve;

    /// The Plutocats token URI descriptor.
    IPlutocatsDescriptorMinimal public descriptor;

    /// The Plutocats token seeder.
    IPlutocatsSeeder public seeder;

    /// Plutocat seeds.
    mapping(uint256 => IPlutocatsSeeder.Seed) public seeds;

    /// Whether to turn off dynamic book value reserve price for mints.
    bool public enableReservePrice;

    /// a mapping that records contributions to the reserve.
    mapping(uint256 => Contribution) internal contributions;

    // IPFS content hash of contract-level metadata.
    string private _contractURIHash = "QmYK3uptbXYQJX26TKUeYDBYHDhy7kPbYPmBHcZRaEqh1g";

    /// The address of the pre-deployed Blast contract.
    address public constant BLAST_PREDEPLOY_ADDRESS = 0x4300000000000000000000000000000000000002;
    IBlast public blast;

    /// MEOWMEOWMEOW
    constructor(
        uint256 _mintStart,
        address _reserve,
        address _descriptor,
        address _seeder,
        bool _enableReservePrice,
        address _blast
    )
        ERC721("Plutocats", "PCAT")
        LinearVRGDA(
            0.1e18, // Target price
            0.07e18, // Price decay percent
            10e18 // Per time unit
        )
    {
        require(_reserve != address(0), "PlutocatsToken: reserve address cannot be 0");
        require(_descriptor != address(0), "PlutocatsToken: descriptor address cannot be 0");
        require(_seeder != address(0), "PlutocatsToken: seeder address cannot be 0");

        MINT_START = _mintStart;
        reserve = _reserve;
        descriptor = IPlutocatsDescriptorMinimal(_descriptor);
        seeder = IPlutocatsSeeder(_seeder);
        enableReservePrice = _enableReservePrice;

        if (_blast != address(0)) {
            blast = IBlast(_blast);
        } else {
            blast = IBlast(BLAST_PREDEPLOY_ADDRESS);
        }

        // capture blast gas for future use
        blast.configureClaimableGas();
    }

    /// IPFS uri for contract-level metadata.
    function contractURI() public view returns (string memory) {
        return string(abi.encodePacked("ipfs://", _contractURIHash));
    }

    /// Set the contract uri hash.
    function setContractURIHash(string memory newContractURIHash) external onlyOwner {
        _contractURIHash = newContractURIHash;
    }

    /// Mint a Plutocat to the caller.
    function mint() public payable override returns (uint256) {
        // will revert prior to mint start time, causing an underflow
        uint256 currentPrice = getPrice();

        if (currentPrice > msg.value) {
            revert InsufficientFundsProvided();
        }

        // send ETH to the reserve
        payable(reserve).sendValue(msg.value);
        emit ETHSent(reserve, msg.value);

        return mintToInternal(msg.sender, _currentCatId++);
    }

    /// Get the current price of the next Plutocat to be minted. Enforces a minimum price
    /// of reserve book value. (reserveBalance / adjustedTotalSupply).
    function getPrice() public view returns (uint256) {
        // checked math will cause underflow to prevent mints before start time
        uint256 timeSinceStart = block.timestamp - MINT_START;
        uint256 vrgdaPrice = getVRGDAPrice(toDaysWadUnsafe(timeSinceStart), _currentCatId);
        uint256 minPrice = vrgdaPrice;
        uint256 adjTotalSupply = adjustedTotalSupply();

        /// dynamic reserve price based off book value
        if (enableReservePrice && adjTotalSupply > 0) {
            minPrice = reserve.balance / adjTotalSupply;
        }

        // enforce minimum price on membership
        if (vrgdaPrice < minPrice) {
            return minPrice;
        }

        return vrgdaPrice;
    }

    /// Mint a Plutocat with id to the provided address.
    function mintToInternal(address _to, uint256 _catId) internal returns (uint256) {
        IPlutocatsSeeder.Seed memory seed = seeds[_catId] = seeder.generateSeed(_catId, descriptor);

        _mint(address(0), _to, _catId);
        contributions[_catId] = Contribution({amount: msg.value, joinTime: block.timestamp});

        emit PlutocatPurchased(_catId, msg.sender, msg.value, seed);

        return _catId;
    }

    /// A distinct URI for the given token.
    function tokenURI(uint256 _tokenId) public view override returns (string memory) {
        if (!_exists(_tokenId)) {
            revert TokenDoesNotExist();
        }

        return descriptor.tokenURI(_tokenId, seeds[_tokenId]);
    }

    /// Similar to tokenURI but always returns a base64 encoded data URI.
    function dataURI(uint256 _tokenId) public view override returns (string memory) {
        if (!_exists(_tokenId)) {
            revert TokenDoesNotExist();
        }

        return descriptor.dataURI(_tokenId, seeds[_tokenId]);
    }

    /// Get the adjusted total supply of the contract.
    /// Does not include cats that have quit the club or have been burned.
    function adjustedTotalSupply() public view returns (uint256) {
        return totalSupply() - balanceOf(address(reserve));
    }

    /// Get total contributions of a member to the reserve.
    function contributionsOf(uint256 _tokenId) external view returns (Contribution memory) {
        return contributions[_tokenId];
    }

    /// Set the Plutocats token URI descriptor.
    function setDescriptor(address _descriptor) external onlyOwner {
        descriptor = IPlutocatsDescriptorMinimal(_descriptor);
        emit DescriptorUpdated(_descriptor);
    }

    /// Set the Plutocats token seeder.
    function setSeeder(address _seeder) external onlyOwner {
        seeder = IPlutocatsSeeder(_seeder);
        emit SeederUpdated(_seeder);
    }

    /// Set whether dynamic reserve price is enabled on mints.
    function setReservePrice(bool _enableReservePrice) external onlyOwner {
        enableReservePrice = _enableReservePrice;
        emit ReservePriceSet(_enableReservePrice);
    }

    /// Sets the blast governor for this contract. If phase 2 is implemented, the
    /// DAO will be able to claim the gas of this contract for use. Only callable
    /// if this contract is still the governor.
    function setGovernor(address _governor) external onlyOwner {
        blast.configureGovernor(_governor);
        emit SetBlastGovernor(_governor);
    }
}

File 2 of 21 : Ownable.sol
// SPDX-License-Identifier: MIT

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 () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 3 of 21 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

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

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

File 4 of 21 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

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 5 of 21 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 6 of 21 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 7 of 21 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 8 of 21 : Context.sol
// SPDX-License-Identifier: MIT

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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 9 of 21 : ERC165.sol
// SPDX-License-Identifier: MIT

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 10 of 21 : IERC165.sol
// SPDX-License-Identifier: MIT

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 11 of 21 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

}

File 12 of 21 : ERC721.sol
// SPDX-License-Identifier: MIT

/// @title ERC721 Token Implementation

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

// LICENSE
// ERC721.sol modifies OpenZeppelin's ERC721.sol:
// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/6618f9f18424ade44116d0221719f4c93be6a078/contracts/token/ERC721/ERC721.sol
//
// ERC721.sol source code copyright OpenZeppelin licensed under the MIT License.
// With modifications by Nounders DAO.
//
//
// MODIFICATIONS:
// `_safeMint` and `_mint` contain an additional `creator` argument and
// emit two `Transfer` logs, rather than one. The first log displays the
// transfer (mint) from `address(0)` to the `creator`. The second displays the
// transfer from the `creator` to the `to` address. This enables correct
// attribution on various NFT marketplaces.

pragma solidity ^0.8.6;

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

/**
 * @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 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // 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: balance query for the zero address');
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), 'ERC721: owner query for nonexistent token');
        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) {
        require(_exists(tokenId), 'ERC721Metadata: URI query for nonexistent token');

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

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

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

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

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), 'ERC721: approved query for nonexistent token');

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), 'ERC721: approve to caller');

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), 'ERC721: transfer caller is not 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: transfer caller is not 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 _owners[tokenId] != 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) {
        require(_exists(tokenId), 'ERC721: operator query for nonexistent token');
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId`, transfers it to `to`, and emits two log events -
     * 1. Credits the `minter` with the mint.
     * 2. Shows transfer from the `minter` 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 creator,
        address to,
        uint256 tokenId
    ) internal virtual {
        _safeMint(creator, 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 creator,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(creator, to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            'ERC721: transfer to non ERC721Receiver implementer'
        );
    }

    /**
     * @dev Mints `tokenId`, transfers it to `to`, and emits two log events -
     * 1. Credits the `creator` with the mint.
     * 2. Shows transfer from the `creator` 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 creator,
        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;
        _owners[tokenId] = to;

        emit Transfer(address(0), creator, tokenId);
        emit Transfer(creator, 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.ownerOf(tokenId);

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

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

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(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.ownerOf(tokenId) == from, 'ERC721: transfer of token that is not own');
        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;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

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

    /**
     * @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(to).onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert('ERC721: transfer to non ERC721Receiver implementer');
                } else {
                    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 {}
}

File 13 of 21 : ERC721Checkpointable.sol
// SPDX-License-Identifier: BSD-3-Clause

/// @title Vote checkpointing for an ERC-721 token

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

// LICENSE
// ERC721Checkpointable.sol uses and modifies part of Compound Lab's Comp.sol:
// https://github.com/compound-finance/compound-protocol/blob/ae4388e780a8d596d97619d9704a931a2752c2bc/contracts/Governance/Comp.sol
//
// Comp.sol source code Copyright 2020 Compound Labs, Inc. licensed under the BSD-3-Clause license.
// With modifications by Nounders DAO.
//
// Additional conditions of BSD-3-Clause can be found here: https://opensource.org/licenses/BSD-3-Clause
//
// MODIFICATIONS
// Checkpointing logic from Comp.sol has been used with the following modifications:
// - `delegates` is renamed to `_delegates` and is set to private
// - `delegates` is a public function that uses the `_delegates` mapping look-up, but unlike
//   Comp.sol, returns the delegator's own address if there is no delegate.
//   This avoids the delegator needing to "delegate to self" with an additional transaction
// - `_transferTokens()` is renamed `_beforeTokenTransfer()` and adapted to hook into OpenZeppelin's ERC721 hooks.

pragma solidity ^0.8.6;

import './ERC721Enumerable.sol';

abstract contract ERC721Checkpointable is ERC721Enumerable {
    /// @notice Defines decimals as per ERC-20 convention to make integrations with 3rd party governance platforms easier
    uint8 public constant decimals = 0;

    /// @notice A record of each accounts delegate
    mapping(address => address) private _delegates;

    /// @notice A checkpoint for marking number of votes from a given block
    struct Checkpoint {
        uint32 fromBlock;
        uint96 votes;
    }

    /// @notice A record of votes checkpoints for each account, by index
    mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;

    /// @notice The number of checkpoints for each account
    mapping(address => uint32) public numCheckpoints;

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH =
        keccak256('EIP712Domain(string name,uint256 chainId,address verifyingContract)');

    /// @notice The EIP-712 typehash for the delegation struct used by the contract
    bytes32 public constant DELEGATION_TYPEHASH =
        keccak256('Delegation(address delegatee,uint256 nonce,uint256 expiry)');

    /// @notice A record of states for signing / validating signatures
    mapping(address => uint256) public nonces;

    /// @notice An event thats emitted when an account changes its delegate
    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

    /// @notice An event thats emitted when a delegate account's vote balance changes
    event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);

    /**
     * @notice The votes a delegator can delegate, which is the current balance of the delegator.
     * @dev Used when calling `_delegate()`
     */
    function votesToDelegate(address delegator) public view returns (uint96) {
        return safe96(balanceOf(delegator), 'ERC721Checkpointable::votesToDelegate: amount exceeds 96 bits');
    }

    /**
     * @notice Overrides the standard `Comp.sol` delegates mapping to return
     * the delegator's own address if they haven't delegated.
     * This avoids having to delegate to oneself.
     */
    function delegates(address delegator) public view returns (address) {
        address current = _delegates[delegator];
        return current == address(0) ? delegator : current;
    }

    /**
     * @notice Adapted from `_transferTokens()` in `Comp.sol` to update delegate votes.
     * @dev hooks into OpenZeppelin's `ERC721._transfer`
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal override {
        super._beforeTokenTransfer(from, to, tokenId);

        /// @notice Differs from `_transferTokens()` to use `delegates` override method to simulate auto-delegation
        _moveDelegates(delegates(from), delegates(to), 1);
    }

    /**
     * @notice Delegate votes from `msg.sender` to `delegatee`
     * @param delegatee The address to delegate votes to
     */
    function delegate(address delegatee) public {
        if (delegatee == address(0)) delegatee = msg.sender;
        return _delegate(msg.sender, delegatee);
    }

    /**
     * @notice Delegates votes from signatory to `delegatee`
     * @param delegatee The address to delegate votes to
     * @param nonce The contract state required to match the signature
     * @param expiry The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function delegateBySig(
        address delegatee,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public {
        bytes32 domainSeparator = keccak256(
            abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), address(this))
        );
        bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));
        bytes32 digest = keccak256(abi.encodePacked('\x19\x01', domainSeparator, structHash));
        address signatory = ecrecover(digest, v, r, s);
        require(signatory != address(0), 'ERC721Checkpointable::delegateBySig: invalid signature');
        require(nonce == nonces[signatory]++, 'ERC721Checkpointable::delegateBySig: invalid nonce');
        require(block.timestamp <= expiry, 'ERC721Checkpointable::delegateBySig: signature expired');
        return _delegate(signatory, delegatee);
    }

    /**
     * @notice Gets the current votes balance for `account`
     * @param account The address to get votes balance
     * @return The number of current votes for `account`
     */
    function getCurrentVotes(address account) external view returns (uint96) {
        uint32 nCheckpoints = numCheckpoints[account];
        return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
    }

    /**
     * @notice Determine the prior number of votes for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param account The address of the account to check
     * @param blockNumber The block number to get the vote balance at
     * @return The number of votes the account had as of the given block
     */
    function getPriorVotes(address account, uint256 blockNumber) public view returns (uint96) {
        require(blockNumber < block.number, 'ERC721Checkpointable::getPriorVotes: not yet determined');

        uint32 nCheckpoints = numCheckpoints[account];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
            return checkpoints[account][nCheckpoints - 1].votes;
        }

        // Next check implicit zero balance
        if (checkpoints[account][0].fromBlock > blockNumber) {
            return 0;
        }

        uint32 lower = 0;
        uint32 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = checkpoints[account][center];
            if (cp.fromBlock == blockNumber) {
                return cp.votes;
            } else if (cp.fromBlock < blockNumber) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return checkpoints[account][lower].votes;
    }

    function _delegate(address delegator, address delegatee) internal {
        /// @notice differs from `_delegate()` in `Comp.sol` to use `delegates` override method to simulate auto-delegation
        address currentDelegate = delegates(delegator);

        _delegates[delegator] = delegatee;

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        uint96 amount = votesToDelegate(delegator);

        _moveDelegates(currentDelegate, delegatee, amount);
    }

    function _moveDelegates(
        address srcRep,
        address dstRep,
        uint96 amount
    ) internal {
        if (srcRep != dstRep && amount > 0) {
            if (srcRep != address(0)) {
                uint32 srcRepNum = numCheckpoints[srcRep];
                uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;
                uint96 srcRepNew = sub96(srcRepOld, amount, 'ERC721Checkpointable::_moveDelegates: amount underflows');
                _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
            }

            if (dstRep != address(0)) {
                uint32 dstRepNum = numCheckpoints[dstRep];
                uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;
                uint96 dstRepNew = add96(dstRepOld, amount, 'ERC721Checkpointable::_moveDelegates: amount overflows');
                _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
            }
        }
    }

    function _writeCheckpoint(
        address delegatee,
        uint32 nCheckpoints,
        uint96 oldVotes,
        uint96 newVotes
    ) internal {
        uint32 blockNumber = safe32(
            block.number,
            'ERC721Checkpointable::_writeCheckpoint: block number exceeds 32 bits'
        );

        if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {
            checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
        } else {
            checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);
            numCheckpoints[delegatee] = nCheckpoints + 1;
        }

        emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }

    function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {
        require(n < 2**32, errorMessage);
        return uint32(n);
    }

    function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {
        require(n < 2**96, errorMessage);
        return uint96(n);
    }

    function add96(
        uint96 a,
        uint96 b,
        string memory errorMessage
    ) internal pure returns (uint96) {
        uint96 c = a + b;
        require(c >= a, errorMessage);
        return c;
    }

    function sub96(
        uint96 a,
        uint96 b,
        string memory errorMessage
    ) internal pure returns (uint96) {
        require(b <= a, errorMessage);
        return a - b;
    }

    function getChainId() internal view returns (uint256) {
        uint256 chainId;
        assembly {
            chainId := chainid()
        }
        return chainId;
    }
}

File 14 of 21 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

/// @title ERC721 Enumerable Extension

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

// LICENSE
// ERC721.sol modifies OpenZeppelin's ERC721Enumerable.sol:
// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/6618f9f18424ade44116d0221719f4c93be6a078/contracts/token/ERC721/extensions/ERC721Enumerable.sol
//
// ERC721Enumerable.sol source code copyright OpenZeppelin licensed under the MIT License.
// With modifications by Nounders DAO.
//
// MODIFICATIONS:
// Consumes modified `ERC721` contract. See notes in `ERC721.sol`.

pragma solidity ^0.8.0;

import './ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol';

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), 'ERC721Enumerable: owner index out of bounds');
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), 'ERC721Enumerable: global index out of bounds');
        return _allTokens[index];
    }

    /**
     * @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` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * 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 override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 15 of 21 : SignedWadMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/// @notice Signed 18 decimal fixed point (wad) arithmetic library.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SignedWadMath.sol)
/// @author Modified from Remco Bloemen (https://xn--2-umb.com/22/exp-ln/index.html)

/// @dev Will not revert on overflow, only use where overflow is not possible.
function toWadUnsafe(uint256 x) pure returns (int256 r) {
    /// @solidity memory-safe-assembly
    assembly {
        // Multiply x by 1e18.
        r := mul(x, 1000000000000000000)
    }
}

/// @dev Takes an integer amount of seconds and converts it to a wad amount of days.
/// @dev Will not revert on overflow, only use where overflow is not possible.
/// @dev Not meant for negative second amounts, it assumes x is positive.
function toDaysWadUnsafe(uint256 x) pure returns (int256 r) {
    /// @solidity memory-safe-assembly
    assembly {
        // Multiply x by 1e18 and then divide it by 86400.
        r := div(mul(x, 1000000000000000000), 86400)
    }
}

/// @dev Takes a wad amount of days and converts it to an integer amount of seconds.
/// @dev Will not revert on overflow, only use where overflow is not possible.
/// @dev Not meant for negative day amounts, it assumes x is positive.
function fromDaysWadUnsafe(int256 x) pure returns (uint256 r) {
    /// @solidity memory-safe-assembly
    assembly {
        // Multiply x by 86400 and then divide it by 1e18.
        r := div(mul(x, 86400), 1000000000000000000)
    }
}

/// @dev Will not revert on overflow, only use where overflow is not possible.
function unsafeWadMul(int256 x, int256 y) pure returns (int256 r) {
    /// @solidity memory-safe-assembly
    assembly {
        // Multiply x by y and divide by 1e18.
        r := sdiv(mul(x, y), 1000000000000000000)
    }
}

/// @dev Will return 0 instead of reverting if y is zero and will
/// not revert on overflow, only use where overflow is not possible.
function unsafeWadDiv(int256 x, int256 y) pure returns (int256 r) {
    /// @solidity memory-safe-assembly
    assembly {
        // Multiply x by 1e18 and divide it by y.
        r := sdiv(mul(x, 1000000000000000000), y)
    }
}

function wadMul(int256 x, int256 y) pure returns (int256 r) {
    /// @solidity memory-safe-assembly
    assembly {
        // Store x * y in r for now.
        r := mul(x, y)

        // Combined overflow check (`x == 0 || (x * y) / x == y`) and edge case check
        // where x == -1 and y == type(int256).min, for y == -1 and x == min int256,
        // the second overflow check will catch this.
        // See: https://secure-contracts.com/learn_evm/arithmetic-checks.html#arithmetic-checks-for-int256-multiplication
        // Combining into 1 expression saves gas as resulting bytecode will only have 1 `JUMPI`
        // rather than 2.
        if iszero(
            and(
                or(iszero(x), eq(sdiv(r, x), y)),
                or(lt(x, not(0)), sgt(y, 0x8000000000000000000000000000000000000000000000000000000000000000))
            )
        ) {
            revert(0, 0)
        }

        // Scale the result down by 1e18.
        r := sdiv(r, 1000000000000000000)
    }
}

function wadDiv(int256 x, int256 y) pure returns (int256 r) {
    /// @solidity memory-safe-assembly
    assembly {
        // Store x * 1e18 in r for now.
        r := mul(x, 1000000000000000000)

        // Equivalent to require(y != 0 && ((x * 1e18) / 1e18 == x))
        if iszero(and(iszero(iszero(y)), eq(sdiv(r, 1000000000000000000), x))) {
            revert(0, 0)
        }

        // Divide r by y.
        r := sdiv(r, y)
    }
}

/// @dev Will not work with negative bases, only use when x is positive.
function wadPow(int256 x, int256 y) pure returns (int256) {
    // Equivalent to x to the power of y because x ** y = (e ** ln(x)) ** y = e ** (ln(x) * y)
    return wadExp((wadLn(x) * y) / 1e18); // Using ln(x) means x must be greater than 0.
}

function wadExp(int256 x) pure returns (int256 r) {
    unchecked {
        // When the result is < 0.5 we return zero. This happens when
        // x <= floor(log(0.5e18) * 1e18) ~ -42e18
        if (x <= -42139678854452767551) return 0;

        // When the result is > (2**255 - 1) / 1e18 we can not represent it as an
        // int. This happens when x >= floor(log((2**255 - 1) / 1e18) * 1e18) ~ 135.
        if (x >= 135305999368893231589) revert("EXP_OVERFLOW");

        // x is now in the range (-42, 136) * 1e18. Convert to (-42, 136) * 2**96
        // for more intermediate precision and a binary basis. This base conversion
        // is a multiplication by 1e18 / 2**96 = 5**18 / 2**78.
        x = (x << 78) / 5**18;

        // Reduce range of x to (-½ ln 2, ½ ln 2) * 2**96 by factoring out powers
        // of two such that exp(x) = exp(x') * 2**k, where k is an integer.
        // Solving this gives k = round(x / log(2)) and x' = x - k * log(2).
        int256 k = ((x << 96) / 54916777467707473351141471128 + 2**95) >> 96;
        x = x - k * 54916777467707473351141471128;

        // k is in the range [-61, 195].

        // Evaluate using a (6, 7)-term rational approximation.
        // p is made monic, we'll multiply by a scale factor later.
        int256 y = x + 1346386616545796478920950773328;
        y = ((y * x) >> 96) + 57155421227552351082224309758442;
        int256 p = y + x - 94201549194550492254356042504812;
        p = ((p * y) >> 96) + 28719021644029726153956944680412240;
        p = p * x + (4385272521454847904659076985693276 << 96);

        // We leave p in 2**192 basis so we don't need to scale it back up for the division.
        int256 q = x - 2855989394907223263936484059900;
        q = ((q * x) >> 96) + 50020603652535783019961831881945;
        q = ((q * x) >> 96) - 533845033583426703283633433725380;
        q = ((q * x) >> 96) + 3604857256930695427073651918091429;
        q = ((q * x) >> 96) - 14423608567350463180887372962807573;
        q = ((q * x) >> 96) + 26449188498355588339934803723976023;

        /// @solidity memory-safe-assembly
        assembly {
            // Div in assembly because solidity adds a zero check despite the unchecked.
            // The q polynomial won't have zeros in the domain as all its roots are complex.
            // No scaling is necessary because p is already 2**96 too large.
            r := sdiv(p, q)
        }

        // r should be in the range (0.09, 0.25) * 2**96.

        // We now need to multiply r by:
        // * the scale factor s = ~6.031367120.
        // * the 2**k factor from the range reduction.
        // * the 1e18 / 2**96 factor for base conversion.
        // We do this all at once, with an intermediate result in 2**213
        // basis, so the final right shift is always by a positive amount.
        r = int256((uint256(r) * 3822833074963236453042738258902158003155416615667) >> uint256(195 - k));
    }
}

function wadLn(int256 x) pure returns (int256 r) {
    unchecked {
        require(x > 0, "UNDEFINED");

        // We want to convert x from 10**18 fixed point to 2**96 fixed point.
        // We do this by multiplying by 2**96 / 10**18. But since
        // ln(x * C) = ln(x) + ln(C), we can simply do nothing here
        // and add ln(2**96 / 10**18) at the end.

        /// @solidity memory-safe-assembly
        assembly {
            r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))
            r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))
            r := or(r, shl(5, lt(0xffffffff, shr(r, x))))
            r := or(r, shl(4, lt(0xffff, shr(r, x))))
            r := or(r, shl(3, lt(0xff, shr(r, x))))
            r := or(r, shl(2, lt(0xf, shr(r, x))))
            r := or(r, shl(1, lt(0x3, shr(r, x))))
            r := or(r, lt(0x1, shr(r, x)))
        }

        // Reduce range of x to (1, 2) * 2**96
        // ln(2^k * x) = k * ln(2) + ln(x)
        int256 k = r - 96;
        x <<= uint256(159 - k);
        x = int256(uint256(x) >> 159);

        // Evaluate using a (8, 8)-term rational approximation.
        // p is made monic, we will multiply by a scale factor later.
        int256 p = x + 3273285459638523848632254066296;
        p = ((p * x) >> 96) + 24828157081833163892658089445524;
        p = ((p * x) >> 96) + 43456485725739037958740375743393;
        p = ((p * x) >> 96) - 11111509109440967052023855526967;
        p = ((p * x) >> 96) - 45023709667254063763336534515857;
        p = ((p * x) >> 96) - 14706773417378608786704636184526;
        p = p * x - (795164235651350426258249787498 << 96);

        // We leave p in 2**192 basis so we don't need to scale it back up for the division.
        // q is monic by convention.
        int256 q = x + 5573035233440673466300451813936;
        q = ((q * x) >> 96) + 71694874799317883764090561454958;
        q = ((q * x) >> 96) + 283447036172924575727196451306956;
        q = ((q * x) >> 96) + 401686690394027663651624208769553;
        q = ((q * x) >> 96) + 204048457590392012362485061816622;
        q = ((q * x) >> 96) + 31853899698501571402653359427138;
        q = ((q * x) >> 96) + 909429971244387300277376558375;
        /// @solidity memory-safe-assembly
        assembly {
            // Div in assembly because solidity adds a zero check despite the unchecked.
            // The q polynomial is known not to have zeros in the domain.
            // No scaling required because p is already 2**96 too large.
            r := sdiv(p, q)
        }

        // r is in the range (0, 0.125) * 2**96

        // Finalization, we need to:
        // * multiply by the scale factor s = 5.549…
        // * add ln(2**96 / 10**18)
        // * add k * ln(2)
        // * multiply by 10**18 / 2**96 = 5**18 >> 78

        // mul s * 5e18 * 2**96, base is now 5**18 * 2**192
        r *= 1677202110996718588342820967067443963516166;
        // add ln(2) * k * 5e18 * 2**192
        r += 16597577552685614221487285958193947469193820559219878177908093499208371 * k;
        // add ln(2**96 / 10**18) * 5e18 * 2**192
        r += 600920179829731861736702779321621459595472258049074101567377883020018308;
        // base conversion: mul 2**18 / 2**192
        r >>= 174;
    }
}

/// @dev Will return 0 instead of reverting if y is zero.
function unsafeDiv(int256 x, int256 y) pure returns (int256 r) {
    /// @solidity memory-safe-assembly
    assembly {
        // Divide x by y.
        r := sdiv(x, y)
    }
}

File 16 of 21 : IBlast.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for Blast predeploy

pragma solidity >=0.8.0;

enum YieldMode {
    AUTOMATIC,
    VOID,
    CLAIMABLE
}

enum GasMode {
    VOID,
    CLAIMABLE
}

interface IBlast {
    // configure
    function configureContract(address contractAddress, YieldMode _yield, GasMode gasMode, address governor) external;
    function configure(YieldMode _yield, GasMode gasMode, address governor) external;

    // base configuration options
    function configureClaimableYield() external;
    function configureClaimableYieldOnBehalf(address contractAddress) external;
    function configureAutomaticYield() external;
    function configureAutomaticYieldOnBehalf(address contractAddress) external;
    function configureVoidYield() external;
    function configureVoidYieldOnBehalf(address contractAddress) external;
    function configureClaimableGas() external;
    function configureClaimableGasOnBehalf(address contractAddress) external;
    function configureVoidGas() external;
    function configureVoidGasOnBehalf(address contractAddress) external;
    function configureGovernor(address _governor) external;
    function configureGovernorOnBehalf(address _newGovernor, address contractAddress) external;

    // claim yield
    function claimYield(address contractAddress, address recipientOfYield, uint256 amount) external returns (uint256);
    function claimAllYield(address contractAddress, address recipientOfYield) external returns (uint256);

    // claim gas
    function claimAllGas(address contractAddress, address recipientOfGas) external returns (uint256);
    function claimGasAtMinClaimRate(address contractAddress, address recipientOfGas, uint256 minClaimRateBips)
        external
        returns (uint256);
    function claimMaxGas(address contractAddress, address recipientOfGas) external returns (uint256);
    function claimGas(address contractAddress, address recipientOfGas, uint256 gasToClaim, uint256 gasSecondsToConsume)
        external
        returns (uint256);

    // read functions
    function readClaimableYield(address contractAddress) external view returns (uint256);
    function readYieldConfiguration(address contractAddress) external view returns (uint8);
    function readGasParams(address contractAddress)
        external
        view
        returns (uint256 etherSeconds, uint256 etherBalance, uint256 lastUpdated, GasMode);
}

File 17 of 21 : IPlutocatsDescriptorMinimal.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for Plutocats Descriptor Minimal

pragma solidity >=0.8.0;

import {IPlutocatsSeeder} from "./IPlutocatsSeeder.sol";

interface IPlutocatsDescriptorMinimal {
    ///
    /// USED BY TOKEN
    ///
    function tokenURI(uint256 tokenId, IPlutocatsSeeder.Seed memory seed) external view returns (string memory);
    function dataURI(uint256 tokenId, IPlutocatsSeeder.Seed memory seed) external view returns (string memory);

    ///
    /// USED BY SEEDER
    ///
    function backgroundCount() external view returns (uint256);
    function bodyCount() external view returns (uint256);
    function accessoryCount() external view returns (uint256);
    function headCount() external view returns (uint256);
    function eyesCount() external view returns (uint256);
    function glassesCount() external view returns (uint256);
}

File 18 of 21 : IPlutocatsSeeder.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for Plutocats Seeder

pragma solidity >=0.8.0;

import {IPlutocatsDescriptorMinimal} from "./IPlutocatsDescriptorMinimal.sol";

interface IPlutocatsSeeder {
    struct Seed {
        uint48 background;
        uint48 body;
        uint48 accessory;
        uint48 head;
        uint48 eyes;
        uint48 glasses;
    }

    function generateSeed(uint256 tokenId, IPlutocatsDescriptorMinimal descriptor)
        external
        view
        returns (Seed memory);
}

File 19 of 21 : IPlutocatsToken.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for Plutocats Token

pragma solidity >=0.8.0;

import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {IPlutocatsDescriptorMinimal} from "./IPlutocatsDescriptorMinimal.sol";
import {IPlutocatsSeeder} from "./IPlutocatsSeeder.sol";

interface IPlutocatsToken is IERC721 {
    struct Contribution {
        uint256 amount;
        uint256 joinTime;
    }

    event PlutocatPurchased(
        uint256 indexed tokenId, address indexed msgSender, uint256 price, IPlutocatsSeeder.Seed seed
    );
    event ETHSent(address indexed to, uint256 amount);
    event DescriptorUpdated(address indexed newDescriptor);
    event SeederUpdated(address indexed newSeeder);
    event ReservePriceSet(bool on);
    event SetBlastGovernor(address indexed governor);

    error InsufficientFundsProvided();
    error DescriptorIsLocked();
    error SeederIsLocked();
    error OnlyReserve();
    error TokenDoesNotExist();
    error CallerIsNotOwnerOrApproved();

    function mint() external payable returns (uint256);
    function dataURI(uint256 tokenId) external returns (string memory);
    function setDescriptor(address descriptor) external;
    function setSeeder(address seeder) external;
    function setReservePrice(bool _enableReservePrice) external;
    function getPrice() external returns (uint256);
}

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

import {unsafeWadDiv} from "solmate/utils/SignedWadMath.sol";

import {VRGDA} from "./VRGDA.sol";

/// @title Linear Variable Rate Gradual Dutch Auction
/// @author transmissions11 <[email protected]>
/// @author FrankieIsLost <[email protected]>
/// @notice VRGDA with a linear issuance curve.
abstract contract LinearVRGDA is VRGDA {
    /*//////////////////////////////////////////////////////////////
                           PRICING PARAMETERS
    //////////////////////////////////////////////////////////////*/

    /// @dev The total number of tokens to target selling every full unit of time.
    /// @dev Represented as an 18 decimal fixed point number.
    int256 internal immutable perTimeUnit;

    /// @notice Sets pricing parameters for the VRGDA.
    /// @param _targetPrice The target price for a token if sold on pace, scaled by 1e18.
    /// @param _priceDecayPercent The percent price decays per unit of time with no sales, scaled by 1e18.
    /// @param _perTimeUnit The number of tokens to target selling in 1 full unit of time, scaled by 1e18.
    constructor(
        int256 _targetPrice,
        int256 _priceDecayPercent,
        int256 _perTimeUnit
    ) VRGDA(_targetPrice, _priceDecayPercent) {
        perTimeUnit = _perTimeUnit;
    }

    /*//////////////////////////////////////////////////////////////
                              PRICING LOGIC
    //////////////////////////////////////////////////////////////*/

    /// @dev Given a number of tokens sold, return the target time that number of tokens should be sold by.
    /// @param sold A number of tokens sold, scaled by 1e18, to get the corresponding target sale time for.
    /// @return The target time the tokens should be sold by, scaled by 1e18, where the time is
    /// relative, such that 0 means the tokens should be sold immediately when the VRGDA begins.
    function getTargetSaleTime(int256 sold) public view virtual override returns (int256) {
        return unsafeWadDiv(sold, perTimeUnit);
    }
}

File 21 of 21 : VRGDA.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import {wadExp, wadLn, wadMul, unsafeWadMul, toWadUnsafe} from "solmate/utils/SignedWadMath.sol";

/// @title Variable Rate Gradual Dutch Auction
/// @author transmissions11 <[email protected]>
/// @author FrankieIsLost <[email protected]>
/// @notice Sell tokens roughly according to an issuance schedule.
abstract contract VRGDA {
    /*//////////////////////////////////////////////////////////////
                            VRGDA PARAMETERS
    //////////////////////////////////////////////////////////////*/

    /// @notice Target price for a token, to be scaled according to sales pace.
    /// @dev Represented as an 18 decimal fixed point number.
    int256 public immutable targetPrice;

    /// @dev Precomputed constant that allows us to rewrite a pow() as an exp().
    /// @dev Represented as an 18 decimal fixed point number.
    int256 internal immutable decayConstant;

    /// @notice Sets target price and per time unit price decay for the VRGDA.
    /// @param _targetPrice The target price for a token if sold on pace, scaled by 1e18.
    /// @param _priceDecayPercent The percent price decays per unit of time with no sales, scaled by 1e18.
    constructor(int256 _targetPrice, int256 _priceDecayPercent) {
        targetPrice = _targetPrice;

        decayConstant = wadLn(1e18 - _priceDecayPercent);

        // The decay constant must be negative for VRGDAs to work.
        require(decayConstant < 0, "NON_NEGATIVE_DECAY_CONSTANT");
    }

    /*//////////////////////////////////////////////////////////////
                              PRICING LOGIC
    //////////////////////////////////////////////////////////////*/

    /// @notice Calculate the price of a token according to the VRGDA formula.
    /// @param timeSinceStart Time passed since the VRGDA began, scaled by 1e18.
    /// @param sold The total number of tokens that have been sold so far.
    /// @return The price of a token according to VRGDA, scaled by 1e18.
    function getVRGDAPrice(int256 timeSinceStart, uint256 sold) public view virtual returns (uint256) {
        unchecked {
            // prettier-ignore
            return uint256(wadMul(targetPrice, wadExp(unsafeWadMul(decayConstant,
                // Theoretically calling toWadUnsafe with sold can silently overflow but under
                // any reasonable circumstance it will never be large enough. We use sold + 1 as
                // the VRGDA formula's n param represents the nth token and sold is the n-1th token.
                timeSinceStart - getTargetSaleTime(toWadUnsafe(sold + 1))
            ))));
        }
    }

    /// @dev Given a number of tokens sold, return the target time that number of tokens should be sold by.
    /// @param sold A number of tokens sold, scaled by 1e18, to get the corresponding target sale time for.
    /// @return The target time the tokens should be sold by, scaled by 1e18, where the time is
    /// relative, such that 0 means the tokens should be sold immediately when the VRGDA begins.
    function getTargetSaleTime(int256 sold) public view virtual returns (int256);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_mintStart","type":"uint256"},{"internalType":"address","name":"_reserve","type":"address"},{"internalType":"address","name":"_descriptor","type":"address"},{"internalType":"address","name":"_seeder","type":"address"},{"internalType":"bool","name":"_enableReservePrice","type":"bool"},{"internalType":"address","name":"_blast","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CallerIsNotOwnerOrApproved","type":"error"},{"inputs":[],"name":"DescriptorIsLocked","type":"error"},{"inputs":[],"name":"InsufficientFundsProvided","type":"error"},{"inputs":[],"name":"OnlyReserve","type":"error"},{"inputs":[],"name":"SeederIsLocked","type":"error"},{"inputs":[],"name":"TokenDoesNotExist","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newDescriptor","type":"address"}],"name":"DescriptorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ETHSent","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":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"msgSender","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"eyes","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"indexed":false,"internalType":"struct IPlutocatsSeeder.Seed","name":"seed","type":"tuple"}],"name":"PlutocatPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"on","type":"bool"}],"name":"ReservePriceSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newSeeder","type":"address"}],"name":"SeederUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"governor","type":"address"}],"name":"SetBlastGovernor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"BLAST_PREDEPLOY_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DELEGATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_START","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"adjustedTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blast","outputs":[{"internalType":"contract IBlast","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"checkpoints","outputs":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint96","name":"votes","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"contributionsOf","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"joinTime","type":"uint256"}],"internalType":"struct IPlutocatsToken.Contribution","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"dataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegator","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"descriptor","outputs":[{"internalType":"contract IPlutocatsDescriptorMinimal","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableReservePrice","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getCurrentVotes","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPriorVotes","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int256","name":"sold","type":"int256"}],"name":"getTargetSaleTime","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int256","name":"timeSinceStart","type":"int256"},{"internalType":"uint256","name":"sold","type":"uint256"}],"name":"getVRGDAPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserve","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seeder","outputs":[{"internalType":"contract IPlutocatsSeeder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"seeds","outputs":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"eyes","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newContractURIHash","type":"string"}],"name":"setContractURIHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_descriptor","type":"address"}],"name":"setDescriptor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governor","type":"address"}],"name":"setGovernor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enableReservePrice","type":"bool"}],"name":"setReservePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_seeder","type":"address"}],"name":"setSeeder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"targetPrice","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegator","type":"address"}],"name":"votesToDelegate","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"}]

610160604052602e61010081815290620045e661012039601690620000259082620006c3565b503480156200003357600080fd5b5060405162004614380380620046148339810160408190526200005691620007ac565b67016345785d8a000066f8b0a10e470000678ac7230489e80000828260405180604001604052806009815260200168506c75746f6361747360b81b815250604051806040016040528060048152602001631410d05560e21b8152508160009081620000c29190620006c3565b506001620000d18282620006c3565b5050506080829052620000f7620000f182670de0b6b3a76400006200082a565b620003f5565b60a0819052600013620001515760405162461bcd60e51b815260206004820152601b60248201527f4e4f4e5f4e454741544956455f44454341595f434f4e5354414e54000000000060448201526064015b60405180910390fd5b505060c0525050600e80546001600160a01b0319163390811790915560405181906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160a01b038516620002075760405162461bcd60e51b815260206004820152602b60248201527f506c75746f63617473546f6b656e3a207265736572766520616464726573732060448201526a063616e6e6f7420626520360ac1b606482015260840162000148565b6001600160a01b038416620002765760405162461bcd60e51b815260206004820152602e60248201527f506c75746f63617473546f6b656e3a2064657363726970746f7220616464726560448201526d073732063616e6e6f7420626520360941b606482015260840162000148565b6001600160a01b038316620002e15760405162461bcd60e51b815260206004820152602a60248201527f506c75746f63617473546f6b656e3a20736565646572206164647265737320636044820152690616e6e6f7420626520360b41b606482015260840162000148565b60e0869052601080546001600160a01b03199081166001600160a01b0388811691909117909255601180548216878416179055601280549091168583161790556014805460ff19168415151790558116156200035857601780546001600160a01b0319166001600160a01b0383161790556200037f565b601780546001600160a01b0319167343000000000000000000000000000000000000021790555b601760009054906101000a90046001600160a01b03166001600160a01b0316634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b158015620003d057600080fd5b505af1158015620003e5573d6000803e3d6000fd5b5050505050505050505062000860565b6000808213620004345760405162461bcd60e51b815260206004820152600960248201526815539111519253915160ba1b604482015260640162000148565b5060606001600160801b03821160071b82811c6001600160401b031060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110600190811b90911783811c90911017609f81810383019390931b90921c6c465772b2bbbb5f824b15207a3081018102821d6d0388eaa27412d5aca026815d636e018102821d6d0df99ac502031bf953eff472fdcc018102821d6d13cdffb29d51d99322bdff5f2211018102821d6d0a0f742023def783a307a986912e018102821d6d01920d8043ca89b5239253284e42018102821d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7882018202831d6d0139601a2efabe717e604cbb4894018202831d6d02247f7a7b6594320649aa03aba1018202831d6c8c3f38e95a6b1ff2ab1c3b343619018202831d6d02384773bdf1ac5676facced60901901820290921d6cb9a025d814b29c212b8b1a07cd19010260016c0504a838426634cdd8738f543560611b03190105711340daa0d5f769dba1915cef59f0815a550602605f19919091017d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b302017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d90565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200064957607f821691505b6020821081036200066a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620006be57600081815260208120601f850160051c81016020861015620006995750805b601f850160051c820191505b81811015620006ba57828155600101620006a5565b5050505b505050565b81516001600160401b03811115620006df57620006df6200061e565b620006f781620006f0845462000634565b8462000670565b602080601f8311600181146200072f5760008415620007165750858301515b600019600386901b1c1916600185901b178555620006ba565b600085815260208120601f198616915b8281101562000760578886015182559484019460019091019084016200073f565b50858210156200077f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80516001600160a01b0381168114620007a757600080fd5b919050565b60008060008060008060c08789031215620007c657600080fd5b86519550620007d8602088016200078f565b9450620007e8604088016200078f565b9350620007f8606088016200078f565b9250608087015180151581146200080e57600080fd5b91506200081e60a088016200078f565b90509295509295509295565b81810360008312801583831316838312821617156200085957634e487b7160e01b600052601160045260246000fd5b5092915050565b60805160a05160c05160e051613d3e620008a86000396000818161087b01526116300152600061122401526000611f0a0152600081816109640152611ee30152613d3e6000f3fe60806040526004361061031a5760003560e01c806381254bb5116101ab578063c87b56dd116100f7578063e8a3d48511610095578063f0503e801161006f578063f0503e8014610a38578063f1127ed814610ae4578063f2fde38b14610b58578063f466d4ab14610b7857600080fd5b8063e8a3d485146109ba578063e9580e91146109cf578063e985e9c5146109ef57600080fd5b8063d50b31eb116100d1578063d50b31eb14610918578063d9bfb50914610938578063dc38679c14610952578063e7a324dc1461098657600080fd5b8063c87b56dd146108b8578063cd3293de146108d8578063d29e9fb7146108f857600080fd5b8063b4b5ea5711610164578063c3cda5201161013e578063c3cda52014610829578063c42cf53514610849578063c6374d0c14610869578063c76600351461089d57600080fd5b8063b4b5ea57146107c9578063b88d4fde146107e9578063baedc1c41461080957600080fd5b806381254bb5146106d85780638da5cb5b1461074c5780638f1314b61461076a57806395d89b411461077f57806398d5fdca14610794578063a22cb465146107a957600080fd5b806342842e0e1161026a578063684931ed1161022357806370a08231116101fd57806370a082311461063e578063715018a61461065e578063782d6fe1146106735780637ecebe00146106ab57600080fd5b8063684931ed146105b65780636d9d33b7146105d65780636fcfff45146105f657600080fd5b806342842e0e146104f65780634f6ccce714610516578063587cde1e146105365780635ac1e3bb146105565780635c19a95c146105765780636352211e1461059657600080fd5b8063175e1a7d116102d757806323b872dd116102b157806323b872dd1461046f5780632f745c591461048f578063303e74df146104af578063313ce567146104cf57600080fd5b8063175e1a7d1461040657806318160ddd1461042657806320606b701461043b57600080fd5b806301b9a3971461031f57806301ffc9a71461034157806306fdde0314610376578063081812fc14610398578063095ea7b3146103d05780631249c58b146103f0575b600080fd5b34801561032b57600080fd5b5061033f61033a36600461325c565b610b98565b005b34801561034d57600080fd5b5061036161035c36600461328d565b610c15565b60405190151581526020015b60405180910390f35b34801561038257600080fd5b5061038b610c40565b60405161036d91906132fa565b3480156103a457600080fd5b506103b86103b336600461330d565b610cd2565b6040516001600160a01b03909116815260200161036d565b3480156103dc57600080fd5b5061033f6103eb366004613326565b610d67565b6103f8610e7c565b60405190815260200161036d565b34801561041257600080fd5b506017546103b8906001600160a01b031681565b34801561043257600080fd5b506008546103f8565b34801561044757600080fd5b506103f87f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b34801561047b57600080fd5b5061033f61048a366004613350565b610f27565b34801561049b57600080fd5b506103f86104aa366004613326565b610f58565b3480156104bb57600080fd5b506011546103b8906001600160a01b031681565b3480156104db57600080fd5b506104e4600081565b60405160ff909116815260200161036d565b34801561050257600080fd5b5061033f610511366004613350565b610fee565b34801561052257600080fd5b506103f861053136600461330d565b611009565b34801561054257600080fd5b506103b861055136600461325c565b61109c565b34801561056257600080fd5b5061038b61057136600461330d565b6110ce565b34801561058257600080fd5b5061033f61059136600461325c565b61118b565b3480156105a257600080fd5b506103b86105b136600461330d565b6111a9565b3480156105c257600080fd5b506012546103b8906001600160a01b031681565b3480156105e257600080fd5b506103f86105f136600461330d565b611220565b34801561060257600080fd5b5061062961061136600461325c565b600c6020526000908152604090205463ffffffff1681565b60405163ffffffff909116815260200161036d565b34801561064a57600080fd5b506103f861065936600461325c565b611254565b34801561066a57600080fd5b5061033f6112db565b34801561067f57600080fd5b5061069361068e366004613326565b61134f565b6040516001600160601b03909116815260200161036d565b3480156106b757600080fd5b506103f86106c636600461325c565b600d6020526000908152604090205481565b3480156106e457600080fd5b506107316106f336600461330d565b604080518082019091526000808252602082015250600090815260156020908152604091829020825180840190935280548352600101549082015290565b6040805182518152602092830151928101929092520161036d565b34801561075857600080fd5b50600e546001600160a01b03166103b8565b34801561077657600080fd5b506103f86115ef565b34801561078b57600080fd5b5061038b611619565b3480156107a057600080fd5b506103f8611628565b3480156107b557600080fd5b5061033f6107c436600461339c565b6116cf565b3480156107d557600080fd5b506106936107e436600461325c565b611793565b3480156107f557600080fd5b5061033f61080436600461347c565b611810565b34801561081557600080fd5b5061033f6108243660046134f8565b611848565b34801561083557600080fd5b5061033f610844366004613541565b611882565b34801561085557600080fd5b5061033f61086436600461325c565b611b80565b34801561087557600080fd5b506103f87f000000000000000000000000000000000000000000000000000000000000000081565b3480156108a957600080fd5b506103b86002604360981b0181565b3480156108c457600080fd5b5061038b6108d336600461330d565b611c40565b3480156108e457600080fd5b506010546103b8906001600160a01b031681565b34801561090457600080fd5b5061033f6109133660046135a1565b611cb8565b34801561092457600080fd5b5061033f61093336600461325c565b611d29565b34801561094457600080fd5b506014546103619060ff1681565b34801561095e57600080fd5b506103f87f000000000000000000000000000000000000000000000000000000000000000081565b34801561099257600080fd5b506103f87fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b3480156109c657600080fd5b5061038b611d9d565b3480156109db57600080fd5b506106936109ea36600461325c565b611dc5565b3480156109fb57600080fd5b50610361610a0a3660046135bc565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a4457600080fd5b50610aa3610a5336600461330d565b6013602052600090815260409020805460019091015465ffffffffffff8083169266010000000000008104821692600160601b8204831692600160901b8304811692600160c01b90048116911686565b6040805165ffffffffffff978816815295871660208701529386169385019390935290841660608401528316608083015290911660a082015260c00161036d565b348015610af057600080fd5b50610b34610aff3660046135e6565b600b60209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b6040805163ffffffff90931683526001600160601b0390911660208301520161036d565b348015610b6457600080fd5b5061033f610b7336600461325c565b611df1565b348015610b8457600080fd5b506103f8610b93366004613626565b611edc565b600e546001600160a01b03163314610bcb5760405162461bcd60e51b8152600401610bc290613648565b60405180910390fd5b601180546001600160a01b0319166001600160a01b0383169081179091556040517f6e66ab22238a5471005895947c8f57db923c2a9c9c73180eff80864c21295c1b90600090a250565b60006001600160e01b0319821663780e9d6360e01b1480610c3a5750610c3a82611f5a565b92915050565b606060008054610c4f9061367d565b80601f0160208091040260200160405190810160405280929190818152602001828054610c7b9061367d565b8015610cc85780601f10610c9d57610100808354040283529160200191610cc8565b820191906000526020600020905b815481529060010190602001808311610cab57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610d4b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610bc2565b506000908152600460205260409020546001600160a01b031690565b6000610d72826111a9565b9050806001600160a01b0316836001600160a01b031603610ddf5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610bc2565b336001600160a01b0382161480610dfb5750610dfb8133610a0a565b610e6d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610bc2565b610e778383611faa565b505050565b600080610e87611628565b905034811115610eaa5760405163fcfdd65160e01b815260040160405180910390fd5b601054610ec0906001600160a01b031634612018565b6010546040513481526001600160a01b03909116907f07e522f923c81306583f6ac561a0b016b750def4b9fba3fc2198249b036905e59060200160405180910390a2600f8054610f21913391906000610f18836136cd565b91905055612131565b91505090565b610f313382612384565b610f4d5760405162461bcd60e51b8152600401610bc2906136e6565b610e7783838361247b565b6000610f6383611254565b8210610fc55760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610bc2565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b610e7783838360405180602001604052806000815250611810565b600061101460085490565b82106110775760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610bc2565b6008828154811061108a5761108a613737565b90600052602060002001549050919050565b6001600160a01b038082166000908152600a602052604081205490911680156110c557806110c7565b825b9392505050565b6000818152600260205260409020546060906001600160a01b03166111065760405163677510db60e11b815260040160405180910390fd5b601154600083815260136020526040908190209051630a18f67160e41b81526001600160a01b039092169163a18f6710916111469186919060040161374d565b600060405180830381865afa158015611163573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c3a91908101906137a3565b6001600160a01b03811661119c5750335b6111a63382612626565b50565b6000818152600260205260408120546001600160a01b031680610c3a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610bc2565b60007f0000000000000000000000000000000000000000000000000000000000000000670de0b6b3a7640000830205610c3a565b60006001600160a01b0382166112bf5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610bc2565b506001600160a01b031660009081526003602052604090205490565b600e546001600160a01b031633146113055760405162461bcd60e51b8152600401610bc290613648565b600e546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600e80546001600160a01b0319169055565b60004382106113c65760405162461bcd60e51b815260206004820152603760248201527f455243373231436865636b706f696e7461626c653a3a6765745072696f72566f60448201527f7465733a206e6f74207965742064657465726d696e65640000000000000000006064820152608401610bc2565b6001600160a01b0383166000908152600c602052604081205463ffffffff16908190036113f7576000915050610c3a565b6001600160a01b0384166000908152600b60205260408120849161141c60018561381a565b63ffffffff9081168252602082019290925260400160002054161161148f576001600160a01b0384166000908152600b602052604081209061145f60018461381a565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03169150610c3a9050565b6001600160a01b0384166000908152600b6020908152604080832083805290915290205463ffffffff168310156114ca576000915050610c3a565b6000806114d860018461381a565b90505b8163ffffffff168163ffffffff1611156115aa57600060026114fd848461381a565b6115079190613854565b611511908361381a565b6001600160a01b0388166000908152600b6020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b03169181019190915291925087900361157e57602001519450610c3a9350505050565b805163ffffffff16871115611595578193506115a3565b6115a060018361381a565b92505b50506114db565b506001600160a01b0385166000908152600b6020908152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b601054600090611607906001600160a01b0316611254565b6008546116149190613877565b905090565b606060018054610c4f9061367d565b6000806116557f000000000000000000000000000000000000000000000000000000000000000042613877565b9050600061167462015180670de0b6b3a7640000840204600f54611edc565b90508060006116816115ef565b60145490915060ff1680156116965750600081115b156116b6576010546116b39082906001600160a01b03163161388a565b91505b818310156116c657509392505050565b50909392505050565b336001600160a01b038316036117275760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610bc2565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6001600160a01b0381166000908152600c602052604081205463ffffffff16806117be5760006110c7565b6001600160a01b0383166000908152600b60205260408120906117e260018461381a565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03169392505050565b61181a3383612384565b6118365760405162461bcd60e51b8152600401610bc2906136e6565b611842848484846126a6565b50505050565b600e546001600160a01b031633146118725760405162461bcd60e51b8152600401610bc290613648565b601661187e82826138e4565b5050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8666118ad610c40565b805190602001206118bb4690565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08401526001600160a01b038b1660e084015261010083018a90526101208084018a90528251808503909101815261014084019092528151919093012061190160f01b610160830152610162820183905261018282018190529192506000906101a20160408051601f198184030181528282528051602091820120600080855291840180845281905260ff8a169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa1580156119e7573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611a695760405162461bcd60e51b815260206004820152603660248201527f455243373231436865636b706f696e7461626c653a3a64656c656761746542796044820152755369673a20696e76616c6964207369676e617475726560501b6064820152608401610bc2565b6001600160a01b0381166000908152600d60205260408120805491611a8d836136cd565b919050558914611afa5760405162461bcd60e51b815260206004820152603260248201527f455243373231436865636b706f696e7461626c653a3a64656c656761746542796044820152715369673a20696e76616c6964206e6f6e636560701b6064820152608401610bc2565b87421115611b695760405162461bcd60e51b815260206004820152603660248201527f455243373231436865636b706f696e7461626c653a3a64656c6567617465427960448201527514da59ce881cda59db985d1d5c9948195e1c1a5c995960521b6064820152608401610bc2565b611b73818b612626565b505050505b505050505050565b600e546001600160a01b03163314611baa5760405162461bcd60e51b8152600401610bc290613648565b601754604051631d70c8d360e31b81526001600160a01b0383811660048301529091169063eb86469890602401600060405180830381600087803b158015611bf157600080fd5b505af1158015611c05573d6000803e3d6000fd5b50506040516001600160a01b03841692507ff42dc25d733ba57cbd105e5bb4e560cdfd88e8a66b01478ce340adc185b54d4f9150600090a250565b6000818152600260205260409020546060906001600160a01b0316611c785760405163677510db60e11b815260040160405180910390fd5b601154600083815260136020526040908190209051634263812160e01b81526001600160a01b03909216916342638121916111469186919060040161374d565b600e546001600160a01b03163314611ce25760405162461bcd60e51b8152600401610bc290613648565b6014805460ff19168215159081179091556040519081527f12621264816ab9f7395785f12075ee12ac0161abd0ec787360166e5c21fbf7669060200160405180910390a150565b600e546001600160a01b03163314611d535760405162461bcd60e51b8152600401610bc290613648565b601280546001600160a01b0319166001600160a01b0383169081179091556040517fb3025222d01ce9a26c7f9d52bc3bfd0352366bd90a793c273fbfe1c81e0e288e90600090a250565b60606016604051602001611db191906139a4565b604051602081830303815290604052905090565b6000610c3a611dd383611254565b6040518060600160405280603d8152602001613c95603d91396126d9565b600e546001600160a01b03163314611e1b5760405162461bcd60e51b8152600401610bc290613648565b6001600160a01b038116611e805760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610bc2565b600e546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600e80546001600160a01b0319166001600160a01b0392909216919091179055565b60006110c77f0000000000000000000000000000000000000000000000000000000000000000611f55611f507f0000000000000000000000000000000000000000000000000000000000000000611f3f670de0b6b3a76400006001890102611220565b8803670de0b6b3a764000091020590565b612708565b6128b1565b60006001600160e01b031982166380ac58cd60e01b1480611f8b57506001600160e01b03198216635b5e139f60e01b145b80610c3a57506301ffc9a760e01b6001600160e01b0319831614610c3a565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611fdf826111a9565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b804710156120685760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610bc2565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146120b5576040519150601f19603f3d011682016040523d82523d6000602084013e6120ba565b606091505b5050905080610e775760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610bc2565b60125460115460405163422e2e9960e01b8152600481018490526001600160a01b0391821660248201526000928392169063422e2e999060440160c060405180830381865afa158015612188573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121ac9190613a49565b60008481526013602090815260408083208451815486850151878501516060808a01516080808c015165ffffffffffff9788166bffffffffffffffffffffffff199097169690961766010000000000009588168602176bffffffffffffffffffffffff60601b1916600160601b948816850265ffffffffffff60901b191617600160901b92881683021765ffffffffffff60c01b198116600160c01b9789168802908117808b5560a09e8f01516001909b01805465ffffffffffff19169b8b169b8c1790558b5160c081018d52928a16918a1691909117825295860488169a81019a909a52928404861697890197909752958204841695870195909552041691830191909152928101929092529091506122c79085856128e4565b604080518082018252348082524260208084019182526000888152601582528590209351845590516001909301929092558251908152835165ffffffffffff90811682840152918401518216818401529183015181166060808401919091528301518116608080840191909152830151811660a0808401919091528301511660c0820152339084907f0ce421ac653cca86420bc35faf04041ace002afd7c5392706c10c7acbf4eecff9060e00160405180910390a3509092915050565b6000818152600260205260408120546001600160a01b03166123fd5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610bc2565b6000612408836111a9565b9050806001600160a01b0316846001600160a01b031614806124435750836001600160a01b031661243884610cd2565b6001600160a01b0316145b8061247357506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661248e826111a9565b6001600160a01b0316146124f65760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610bc2565b6001600160a01b0382166125585760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610bc2565b612563838383612a7a565b61256e600082611faa565b6001600160a01b0383166000908152600360205260408120805460019290612597908490613877565b90915550506001600160a01b03821660009081526003602052604081208054600192906125c5908490613ae8565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006126318361109c565b6001600160a01b038481166000818152600a602052604080822080546001600160a01b031916888616908117909155905194955093928516927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4600061269984611dc5565b9050611842828483612a9d565b6126b184848461247b565b6126bd84848484612c49565b6118425760405162461bcd60e51b8152600401610bc290613afb565b600081600160601b84106127005760405162461bcd60e51b8152600401610bc291906132fa565b509192915050565b6000680248ce36a70cb26b3e19821361272357506000919050565b680755bf798b4a1bf1e5821261276a5760405162461bcd60e51b815260206004820152600c60248201526b4558505f4f564552464c4f5760a01b6044820152606401610bc2565b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b81810282158382058314176000198410600160ff1b841317166128d357600080fd5b670de0b6b3a7640000900592915050565b6001600160a01b03821661293a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610bc2565b6000818152600260205260409020546001600160a01b03161561299f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610bc2565b6129ab60008383612a7a565b6001600160a01b03821660009081526003602052604081208054600192906129d4908490613ae8565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03868116919091179091559051839291861691907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b612a85838383612d4a565b610e77612a918461109c565b612a9a8461109c565b60015b816001600160a01b0316836001600160a01b031614158015612ac857506000816001600160601b0316115b15610e77576001600160a01b03831615612b8d576001600160a01b0383166000908152600c602052604081205463ffffffff169081612b08576000612b54565b6001600160a01b0385166000908152600b6020526040812090612b2c60018561381a565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03165b90506000612b7b8285604051806060016040528060378152602001613cd260379139612e02565b9050612b8986848484612e44565b5050505b6001600160a01b03821615610e77576001600160a01b0382166000908152600c602052604081205463ffffffff169081612bc8576000612c14565b6001600160a01b0384166000908152600b6020526040812090612bec60018561381a565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03165b90506000612c3b8285604051806060016040528060368152602001613c1b6036913961303c565b9050611b7885848484612e44565b60006001600160a01b0384163b15612d3f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612c8d903390899088908890600401613b4d565b6020604051808303816000875af1925050508015612cc8575060408051601f3d908101601f19168201909252612cc591810190613b8a565b60015b612d25573d808015612cf6576040519150601f19603f3d011682016040523d82523d6000602084013e612cfb565b606091505b508051600003612d1d5760405162461bcd60e51b8152600401610bc290613afb565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612473565b506001949350505050565b6001600160a01b038316612da557612da081600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612dc8565b816001600160a01b0316836001600160a01b031614612dc857612dc88382613089565b6001600160a01b038216612ddf57610e7781613126565b826001600160a01b0316826001600160a01b031614610e7757610e7782826131d5565b6000836001600160601b0316836001600160601b031611158290612e395760405162461bcd60e51b8152600401610bc291906132fa565b506124738385613ba7565b6000612e6843604051806080016040528060448152602001613c5160449139613219565b905060008463ffffffff16118015612ec257506001600160a01b0385166000908152600b6020526040812063ffffffff831691612ea660018861381a565b63ffffffff908116825260208201929092526040016000205416145b15612f36576001600160a01b0385166000908152600b602052604081208391612eec60018861381a565b63ffffffff168152602081019190915260400160002080546001600160601b0392909216600160201b026fffffffffffffffffffffffff0000000019909216919091179055612fe7565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000908152600b82528681208b8616825290915294909420925183549451909116600160201b026fffffffffffffffffffffffffffffffff19909416911617919091179055612fb6846001613bc7565b6001600160a01b0386166000908152600c60205260409020805463ffffffff191663ffffffff929092169190911790555b604080516001600160601b038086168252841660208201526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b6000806130498486613be4565b9050846001600160601b0316816001600160601b0316101583906130805760405162461bcd60e51b8152600401610bc291906132fa565b50949350505050565b6000600161309684611254565b6130a09190613877565b6000838152600760205260409020549091508082146130f3576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061313890600190613877565b6000838152600960205260408120546008805493945090928490811061316057613160613737565b90600052602060002001549050806008838154811061318157613181613737565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806131b9576131b9613c04565b6001900381819060005260206000200160009055905550505050565b60006131e083611254565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600081600160201b84106127005760405162461bcd60e51b8152600401610bc291906132fa565b80356001600160a01b038116811461325757600080fd5b919050565b60006020828403121561326e57600080fd5b6110c782613240565b6001600160e01b0319811681146111a657600080fd5b60006020828403121561329f57600080fd5b81356110c781613277565b60005b838110156132c55781810151838201526020016132ad565b50506000910152565b600081518084526132e68160208601602086016132aa565b601f01601f19169290920160200192915050565b6020815260006110c760208301846132ce565b60006020828403121561331f57600080fd5b5035919050565b6000806040838503121561333957600080fd5b61334283613240565b946020939093013593505050565b60008060006060848603121561336557600080fd5b61336e84613240565b925061337c60208501613240565b9150604084013590509250925092565b8035801515811461325757600080fd5b600080604083850312156133af57600080fd5b6133b883613240565b91506133c66020840161338c565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561340e5761340e6133cf565b604052919050565b600067ffffffffffffffff821115613430576134306133cf565b50601f01601f191660200190565b600061345161344c84613416565b6133e5565b905082815283838301111561346557600080fd5b828260208301376000602084830101529392505050565b6000806000806080858703121561349257600080fd5b61349b85613240565b93506134a960208601613240565b925060408501359150606085013567ffffffffffffffff8111156134cc57600080fd5b8501601f810187136134dd57600080fd5b6134ec8782356020840161343e565b91505092959194509250565b60006020828403121561350a57600080fd5b813567ffffffffffffffff81111561352157600080fd5b8201601f8101841361353257600080fd5b6124738482356020840161343e565b60008060008060008060c0878903121561355a57600080fd5b61356387613240565b95506020870135945060408701359350606087013560ff8116811461358757600080fd5b9598949750929560808101359460a0909101359350915050565b6000602082840312156135b357600080fd5b6110c78261338c565b600080604083850312156135cf57600080fd5b6135d883613240565b91506133c660208401613240565b600080604083850312156135f957600080fd5b61360283613240565b9150602083013563ffffffff8116811461361b57600080fd5b809150509250929050565b6000806040838503121561363957600080fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c9082168061369157607f821691505b6020821081036136b157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000600182016136df576136df6136b7565b5060010190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b918252805465ffffffffffff8082166020850152603082901c81166040850152606082811c821690850152609082901c8116608085015260c091821c811660a08501526001909201549091169082015260e00190565b6000602082840312156137b557600080fd5b815167ffffffffffffffff8111156137cc57600080fd5b8201601f810184136137dd57600080fd5b80516137eb61344c82613416565b81815285602083850101111561380057600080fd5b6138118260208301602086016132aa565b95945050505050565b63ffffffff828116828216039080821115613837576138376136b7565b5092915050565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061386b5761386b61383e565b92169190910492915050565b81810381811115610c3a57610c3a6136b7565b6000826138995761389961383e565b500490565b601f821115610e7757600081815260208120601f850160051c810160208610156138c55750805b601f850160051c820191505b81811015611b78578281556001016138d1565b815167ffffffffffffffff8111156138fe576138fe6133cf565b6139128161390c845461367d565b8461389e565b602080601f831160018114613947576000841561392f5750858301515b600019600386901b1c1916600185901b178555611b78565b600085815260208120601f198616915b8281101561397657888601518255948401946001909101908401613957565b50858210156139945787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b66697066733a2f2f60c81b815260006007600084546139c28161367d565b600182811680156139da57600181146139f357613a26565b60ff198416888701528215158302880186019450613a26565b8860005260208060002060005b85811015613a1b5781548b82018a0152908401908201613a00565b505050858389010194505b5092979650505050505050565b805165ffffffffffff8116811461325757600080fd5b600060c08284031215613a5b57600080fd5b60405160c0810181811067ffffffffffffffff82111715613a7e57613a7e6133cf565b604052613a8a83613a33565b8152613a9860208401613a33565b6020820152613aa960408401613a33565b6040820152613aba60608401613a33565b6060820152613acb60808401613a33565b6080820152613adc60a08401613a33565b60a08201529392505050565b80820180821115610c3a57610c3a6136b7565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613b80908301846132ce565b9695505050505050565b600060208284031215613b9c57600080fd5b81516110c781613277565b6001600160601b03828116828216039080821115613837576138376136b7565b63ffffffff818116838216019080821115613837576138376136b7565b6001600160601b03818116838216019080821115613837576138376136b7565b634e487b7160e01b600052603160045260246000fdfe455243373231436865636b706f696e7461626c653a3a5f6d6f766544656c6567617465733a20616d6f756e74206f766572666c6f7773455243373231436865636b706f696e7461626c653a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473455243373231436865636b706f696e7461626c653a3a766f746573546f44656c65676174653a20616d6f756e7420657863656564732039362062697473455243373231436865636b706f696e7461626c653a3a5f6d6f766544656c6567617465733a20616d6f756e7420756e646572666c6f7773a2646970667358221220288f3989e00b21ec88b1f79ae6397818c3defe3b52baff2521c80c23362d428264736f6c63430008130033516d594b33757074625859514a583236544b55655944425948446879376b506259506d4248635a526145716831670000000000000000000000000000000000000000000000000000000065f3543d0000000000000000000000004ea682b94b7e13894c3d0b9afebfbdd38cdacc3c0000000000000000000000009c2682b4d295a955fb546148967aa6ca1b66d2dc000000000000000000000000e571a5dd7b38298099d27e8943748b2d8572050b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061031a5760003560e01c806381254bb5116101ab578063c87b56dd116100f7578063e8a3d48511610095578063f0503e801161006f578063f0503e8014610a38578063f1127ed814610ae4578063f2fde38b14610b58578063f466d4ab14610b7857600080fd5b8063e8a3d485146109ba578063e9580e91146109cf578063e985e9c5146109ef57600080fd5b8063d50b31eb116100d1578063d50b31eb14610918578063d9bfb50914610938578063dc38679c14610952578063e7a324dc1461098657600080fd5b8063c87b56dd146108b8578063cd3293de146108d8578063d29e9fb7146108f857600080fd5b8063b4b5ea5711610164578063c3cda5201161013e578063c3cda52014610829578063c42cf53514610849578063c6374d0c14610869578063c76600351461089d57600080fd5b8063b4b5ea57146107c9578063b88d4fde146107e9578063baedc1c41461080957600080fd5b806381254bb5146106d85780638da5cb5b1461074c5780638f1314b61461076a57806395d89b411461077f57806398d5fdca14610794578063a22cb465146107a957600080fd5b806342842e0e1161026a578063684931ed1161022357806370a08231116101fd57806370a082311461063e578063715018a61461065e578063782d6fe1146106735780637ecebe00146106ab57600080fd5b8063684931ed146105b65780636d9d33b7146105d65780636fcfff45146105f657600080fd5b806342842e0e146104f65780634f6ccce714610516578063587cde1e146105365780635ac1e3bb146105565780635c19a95c146105765780636352211e1461059657600080fd5b8063175e1a7d116102d757806323b872dd116102b157806323b872dd1461046f5780632f745c591461048f578063303e74df146104af578063313ce567146104cf57600080fd5b8063175e1a7d1461040657806318160ddd1461042657806320606b701461043b57600080fd5b806301b9a3971461031f57806301ffc9a71461034157806306fdde0314610376578063081812fc14610398578063095ea7b3146103d05780631249c58b146103f0575b600080fd5b34801561032b57600080fd5b5061033f61033a36600461325c565b610b98565b005b34801561034d57600080fd5b5061036161035c36600461328d565b610c15565b60405190151581526020015b60405180910390f35b34801561038257600080fd5b5061038b610c40565b60405161036d91906132fa565b3480156103a457600080fd5b506103b86103b336600461330d565b610cd2565b6040516001600160a01b03909116815260200161036d565b3480156103dc57600080fd5b5061033f6103eb366004613326565b610d67565b6103f8610e7c565b60405190815260200161036d565b34801561041257600080fd5b506017546103b8906001600160a01b031681565b34801561043257600080fd5b506008546103f8565b34801561044757600080fd5b506103f87f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b34801561047b57600080fd5b5061033f61048a366004613350565b610f27565b34801561049b57600080fd5b506103f86104aa366004613326565b610f58565b3480156104bb57600080fd5b506011546103b8906001600160a01b031681565b3480156104db57600080fd5b506104e4600081565b60405160ff909116815260200161036d565b34801561050257600080fd5b5061033f610511366004613350565b610fee565b34801561052257600080fd5b506103f861053136600461330d565b611009565b34801561054257600080fd5b506103b861055136600461325c565b61109c565b34801561056257600080fd5b5061038b61057136600461330d565b6110ce565b34801561058257600080fd5b5061033f61059136600461325c565b61118b565b3480156105a257600080fd5b506103b86105b136600461330d565b6111a9565b3480156105c257600080fd5b506012546103b8906001600160a01b031681565b3480156105e257600080fd5b506103f86105f136600461330d565b611220565b34801561060257600080fd5b5061062961061136600461325c565b600c6020526000908152604090205463ffffffff1681565b60405163ffffffff909116815260200161036d565b34801561064a57600080fd5b506103f861065936600461325c565b611254565b34801561066a57600080fd5b5061033f6112db565b34801561067f57600080fd5b5061069361068e366004613326565b61134f565b6040516001600160601b03909116815260200161036d565b3480156106b757600080fd5b506103f86106c636600461325c565b600d6020526000908152604090205481565b3480156106e457600080fd5b506107316106f336600461330d565b604080518082019091526000808252602082015250600090815260156020908152604091829020825180840190935280548352600101549082015290565b6040805182518152602092830151928101929092520161036d565b34801561075857600080fd5b50600e546001600160a01b03166103b8565b34801561077657600080fd5b506103f86115ef565b34801561078b57600080fd5b5061038b611619565b3480156107a057600080fd5b506103f8611628565b3480156107b557600080fd5b5061033f6107c436600461339c565b6116cf565b3480156107d557600080fd5b506106936107e436600461325c565b611793565b3480156107f557600080fd5b5061033f61080436600461347c565b611810565b34801561081557600080fd5b5061033f6108243660046134f8565b611848565b34801561083557600080fd5b5061033f610844366004613541565b611882565b34801561085557600080fd5b5061033f61086436600461325c565b611b80565b34801561087557600080fd5b506103f87f0000000000000000000000000000000000000000000000000000000065f3543d81565b3480156108a957600080fd5b506103b86002604360981b0181565b3480156108c457600080fd5b5061038b6108d336600461330d565b611c40565b3480156108e457600080fd5b506010546103b8906001600160a01b031681565b34801561090457600080fd5b5061033f6109133660046135a1565b611cb8565b34801561092457600080fd5b5061033f61093336600461325c565b611d29565b34801561094457600080fd5b506014546103619060ff1681565b34801561095e57600080fd5b506103f87f000000000000000000000000000000000000000000000000016345785d8a000081565b34801561099257600080fd5b506103f87fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b3480156109c657600080fd5b5061038b611d9d565b3480156109db57600080fd5b506106936109ea36600461325c565b611dc5565b3480156109fb57600080fd5b50610361610a0a3660046135bc565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a4457600080fd5b50610aa3610a5336600461330d565b6013602052600090815260409020805460019091015465ffffffffffff8083169266010000000000008104821692600160601b8204831692600160901b8304811692600160c01b90048116911686565b6040805165ffffffffffff978816815295871660208701529386169385019390935290841660608401528316608083015290911660a082015260c00161036d565b348015610af057600080fd5b50610b34610aff3660046135e6565b600b60209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b6040805163ffffffff90931683526001600160601b0390911660208301520161036d565b348015610b6457600080fd5b5061033f610b7336600461325c565b611df1565b348015610b8457600080fd5b506103f8610b93366004613626565b611edc565b600e546001600160a01b03163314610bcb5760405162461bcd60e51b8152600401610bc290613648565b60405180910390fd5b601180546001600160a01b0319166001600160a01b0383169081179091556040517f6e66ab22238a5471005895947c8f57db923c2a9c9c73180eff80864c21295c1b90600090a250565b60006001600160e01b0319821663780e9d6360e01b1480610c3a5750610c3a82611f5a565b92915050565b606060008054610c4f9061367d565b80601f0160208091040260200160405190810160405280929190818152602001828054610c7b9061367d565b8015610cc85780601f10610c9d57610100808354040283529160200191610cc8565b820191906000526020600020905b815481529060010190602001808311610cab57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610d4b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610bc2565b506000908152600460205260409020546001600160a01b031690565b6000610d72826111a9565b9050806001600160a01b0316836001600160a01b031603610ddf5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610bc2565b336001600160a01b0382161480610dfb5750610dfb8133610a0a565b610e6d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610bc2565b610e778383611faa565b505050565b600080610e87611628565b905034811115610eaa5760405163fcfdd65160e01b815260040160405180910390fd5b601054610ec0906001600160a01b031634612018565b6010546040513481526001600160a01b03909116907f07e522f923c81306583f6ac561a0b016b750def4b9fba3fc2198249b036905e59060200160405180910390a2600f8054610f21913391906000610f18836136cd565b91905055612131565b91505090565b610f313382612384565b610f4d5760405162461bcd60e51b8152600401610bc2906136e6565b610e7783838361247b565b6000610f6383611254565b8210610fc55760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610bc2565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b610e7783838360405180602001604052806000815250611810565b600061101460085490565b82106110775760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610bc2565b6008828154811061108a5761108a613737565b90600052602060002001549050919050565b6001600160a01b038082166000908152600a602052604081205490911680156110c557806110c7565b825b9392505050565b6000818152600260205260409020546060906001600160a01b03166111065760405163677510db60e11b815260040160405180910390fd5b601154600083815260136020526040908190209051630a18f67160e41b81526001600160a01b039092169163a18f6710916111469186919060040161374d565b600060405180830381865afa158015611163573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c3a91908101906137a3565b6001600160a01b03811661119c5750335b6111a63382612626565b50565b6000818152600260205260408120546001600160a01b031680610c3a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610bc2565b60007f0000000000000000000000000000000000000000000000008ac7230489e80000670de0b6b3a7640000830205610c3a565b60006001600160a01b0382166112bf5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610bc2565b506001600160a01b031660009081526003602052604090205490565b600e546001600160a01b031633146113055760405162461bcd60e51b8152600401610bc290613648565b600e546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600e80546001600160a01b0319169055565b60004382106113c65760405162461bcd60e51b815260206004820152603760248201527f455243373231436865636b706f696e7461626c653a3a6765745072696f72566f60448201527f7465733a206e6f74207965742064657465726d696e65640000000000000000006064820152608401610bc2565b6001600160a01b0383166000908152600c602052604081205463ffffffff16908190036113f7576000915050610c3a565b6001600160a01b0384166000908152600b60205260408120849161141c60018561381a565b63ffffffff9081168252602082019290925260400160002054161161148f576001600160a01b0384166000908152600b602052604081209061145f60018461381a565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03169150610c3a9050565b6001600160a01b0384166000908152600b6020908152604080832083805290915290205463ffffffff168310156114ca576000915050610c3a565b6000806114d860018461381a565b90505b8163ffffffff168163ffffffff1611156115aa57600060026114fd848461381a565b6115079190613854565b611511908361381a565b6001600160a01b0388166000908152600b6020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b03169181019190915291925087900361157e57602001519450610c3a9350505050565b805163ffffffff16871115611595578193506115a3565b6115a060018361381a565b92505b50506114db565b506001600160a01b0385166000908152600b6020908152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b601054600090611607906001600160a01b0316611254565b6008546116149190613877565b905090565b606060018054610c4f9061367d565b6000806116557f0000000000000000000000000000000000000000000000000000000065f3543d42613877565b9050600061167462015180670de0b6b3a7640000840204600f54611edc565b90508060006116816115ef565b60145490915060ff1680156116965750600081115b156116b6576010546116b39082906001600160a01b03163161388a565b91505b818310156116c657509392505050565b50909392505050565b336001600160a01b038316036117275760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610bc2565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6001600160a01b0381166000908152600c602052604081205463ffffffff16806117be5760006110c7565b6001600160a01b0383166000908152600b60205260408120906117e260018461381a565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03169392505050565b61181a3383612384565b6118365760405162461bcd60e51b8152600401610bc2906136e6565b611842848484846126a6565b50505050565b600e546001600160a01b031633146118725760405162461bcd60e51b8152600401610bc290613648565b601661187e82826138e4565b5050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8666118ad610c40565b805190602001206118bb4690565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08401526001600160a01b038b1660e084015261010083018a90526101208084018a90528251808503909101815261014084019092528151919093012061190160f01b610160830152610162820183905261018282018190529192506000906101a20160408051601f198184030181528282528051602091820120600080855291840180845281905260ff8a169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa1580156119e7573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611a695760405162461bcd60e51b815260206004820152603660248201527f455243373231436865636b706f696e7461626c653a3a64656c656761746542796044820152755369673a20696e76616c6964207369676e617475726560501b6064820152608401610bc2565b6001600160a01b0381166000908152600d60205260408120805491611a8d836136cd565b919050558914611afa5760405162461bcd60e51b815260206004820152603260248201527f455243373231436865636b706f696e7461626c653a3a64656c656761746542796044820152715369673a20696e76616c6964206e6f6e636560701b6064820152608401610bc2565b87421115611b695760405162461bcd60e51b815260206004820152603660248201527f455243373231436865636b706f696e7461626c653a3a64656c6567617465427960448201527514da59ce881cda59db985d1d5c9948195e1c1a5c995960521b6064820152608401610bc2565b611b73818b612626565b505050505b505050505050565b600e546001600160a01b03163314611baa5760405162461bcd60e51b8152600401610bc290613648565b601754604051631d70c8d360e31b81526001600160a01b0383811660048301529091169063eb86469890602401600060405180830381600087803b158015611bf157600080fd5b505af1158015611c05573d6000803e3d6000fd5b50506040516001600160a01b03841692507ff42dc25d733ba57cbd105e5bb4e560cdfd88e8a66b01478ce340adc185b54d4f9150600090a250565b6000818152600260205260409020546060906001600160a01b0316611c785760405163677510db60e11b815260040160405180910390fd5b601154600083815260136020526040908190209051634263812160e01b81526001600160a01b03909216916342638121916111469186919060040161374d565b600e546001600160a01b03163314611ce25760405162461bcd60e51b8152600401610bc290613648565b6014805460ff19168215159081179091556040519081527f12621264816ab9f7395785f12075ee12ac0161abd0ec787360166e5c21fbf7669060200160405180910390a150565b600e546001600160a01b03163314611d535760405162461bcd60e51b8152600401610bc290613648565b601280546001600160a01b0319166001600160a01b0383169081179091556040517fb3025222d01ce9a26c7f9d52bc3bfd0352366bd90a793c273fbfe1c81e0e288e90600090a250565b60606016604051602001611db191906139a4565b604051602081830303815290604052905090565b6000610c3a611dd383611254565b6040518060600160405280603d8152602001613c95603d91396126d9565b600e546001600160a01b03163314611e1b5760405162461bcd60e51b8152600401610bc290613648565b6001600160a01b038116611e805760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610bc2565b600e546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600e80546001600160a01b0319166001600160a01b0392909216919091179055565b60006110c77f000000000000000000000000000000000000000000000000016345785d8a0000611f55611f507ffffffffffffffffffffffffffffffffffffffffffffffffffefe2d56e079c419611f3f670de0b6b3a76400006001890102611220565b8803670de0b6b3a764000091020590565b612708565b6128b1565b60006001600160e01b031982166380ac58cd60e01b1480611f8b57506001600160e01b03198216635b5e139f60e01b145b80610c3a57506301ffc9a760e01b6001600160e01b0319831614610c3a565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611fdf826111a9565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b804710156120685760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610bc2565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146120b5576040519150601f19603f3d011682016040523d82523d6000602084013e6120ba565b606091505b5050905080610e775760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610bc2565b60125460115460405163422e2e9960e01b8152600481018490526001600160a01b0391821660248201526000928392169063422e2e999060440160c060405180830381865afa158015612188573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121ac9190613a49565b60008481526013602090815260408083208451815486850151878501516060808a01516080808c015165ffffffffffff9788166bffffffffffffffffffffffff199097169690961766010000000000009588168602176bffffffffffffffffffffffff60601b1916600160601b948816850265ffffffffffff60901b191617600160901b92881683021765ffffffffffff60c01b198116600160c01b9789168802908117808b5560a09e8f01516001909b01805465ffffffffffff19169b8b169b8c1790558b5160c081018d52928a16918a1691909117825295860488169a81019a909a52928404861697890197909752958204841695870195909552041691830191909152928101929092529091506122c79085856128e4565b604080518082018252348082524260208084019182526000888152601582528590209351845590516001909301929092558251908152835165ffffffffffff90811682840152918401518216818401529183015181166060808401919091528301518116608080840191909152830151811660a0808401919091528301511660c0820152339084907f0ce421ac653cca86420bc35faf04041ace002afd7c5392706c10c7acbf4eecff9060e00160405180910390a3509092915050565b6000818152600260205260408120546001600160a01b03166123fd5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610bc2565b6000612408836111a9565b9050806001600160a01b0316846001600160a01b031614806124435750836001600160a01b031661243884610cd2565b6001600160a01b0316145b8061247357506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661248e826111a9565b6001600160a01b0316146124f65760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610bc2565b6001600160a01b0382166125585760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610bc2565b612563838383612a7a565b61256e600082611faa565b6001600160a01b0383166000908152600360205260408120805460019290612597908490613877565b90915550506001600160a01b03821660009081526003602052604081208054600192906125c5908490613ae8565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006126318361109c565b6001600160a01b038481166000818152600a602052604080822080546001600160a01b031916888616908117909155905194955093928516927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4600061269984611dc5565b9050611842828483612a9d565b6126b184848461247b565b6126bd84848484612c49565b6118425760405162461bcd60e51b8152600401610bc290613afb565b600081600160601b84106127005760405162461bcd60e51b8152600401610bc291906132fa565b509192915050565b6000680248ce36a70cb26b3e19821361272357506000919050565b680755bf798b4a1bf1e5821261276a5760405162461bcd60e51b815260206004820152600c60248201526b4558505f4f564552464c4f5760a01b6044820152606401610bc2565b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b81810282158382058314176000198410600160ff1b841317166128d357600080fd5b670de0b6b3a7640000900592915050565b6001600160a01b03821661293a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610bc2565b6000818152600260205260409020546001600160a01b03161561299f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610bc2565b6129ab60008383612a7a565b6001600160a01b03821660009081526003602052604081208054600192906129d4908490613ae8565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03868116919091179091559051839291861691907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b612a85838383612d4a565b610e77612a918461109c565b612a9a8461109c565b60015b816001600160a01b0316836001600160a01b031614158015612ac857506000816001600160601b0316115b15610e77576001600160a01b03831615612b8d576001600160a01b0383166000908152600c602052604081205463ffffffff169081612b08576000612b54565b6001600160a01b0385166000908152600b6020526040812090612b2c60018561381a565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03165b90506000612b7b8285604051806060016040528060378152602001613cd260379139612e02565b9050612b8986848484612e44565b5050505b6001600160a01b03821615610e77576001600160a01b0382166000908152600c602052604081205463ffffffff169081612bc8576000612c14565b6001600160a01b0384166000908152600b6020526040812090612bec60018561381a565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03165b90506000612c3b8285604051806060016040528060368152602001613c1b6036913961303c565b9050611b7885848484612e44565b60006001600160a01b0384163b15612d3f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612c8d903390899088908890600401613b4d565b6020604051808303816000875af1925050508015612cc8575060408051601f3d908101601f19168201909252612cc591810190613b8a565b60015b612d25573d808015612cf6576040519150601f19603f3d011682016040523d82523d6000602084013e612cfb565b606091505b508051600003612d1d5760405162461bcd60e51b8152600401610bc290613afb565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612473565b506001949350505050565b6001600160a01b038316612da557612da081600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612dc8565b816001600160a01b0316836001600160a01b031614612dc857612dc88382613089565b6001600160a01b038216612ddf57610e7781613126565b826001600160a01b0316826001600160a01b031614610e7757610e7782826131d5565b6000836001600160601b0316836001600160601b031611158290612e395760405162461bcd60e51b8152600401610bc291906132fa565b506124738385613ba7565b6000612e6843604051806080016040528060448152602001613c5160449139613219565b905060008463ffffffff16118015612ec257506001600160a01b0385166000908152600b6020526040812063ffffffff831691612ea660018861381a565b63ffffffff908116825260208201929092526040016000205416145b15612f36576001600160a01b0385166000908152600b602052604081208391612eec60018861381a565b63ffffffff168152602081019190915260400160002080546001600160601b0392909216600160201b026fffffffffffffffffffffffff0000000019909216919091179055612fe7565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000908152600b82528681208b8616825290915294909420925183549451909116600160201b026fffffffffffffffffffffffffffffffff19909416911617919091179055612fb6846001613bc7565b6001600160a01b0386166000908152600c60205260409020805463ffffffff191663ffffffff929092169190911790555b604080516001600160601b038086168252841660208201526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b6000806130498486613be4565b9050846001600160601b0316816001600160601b0316101583906130805760405162461bcd60e51b8152600401610bc291906132fa565b50949350505050565b6000600161309684611254565b6130a09190613877565b6000838152600760205260409020549091508082146130f3576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061313890600190613877565b6000838152600960205260408120546008805493945090928490811061316057613160613737565b90600052602060002001549050806008838154811061318157613181613737565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806131b9576131b9613c04565b6001900381819060005260206000200160009055905550505050565b60006131e083611254565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600081600160201b84106127005760405162461bcd60e51b8152600401610bc291906132fa565b80356001600160a01b038116811461325757600080fd5b919050565b60006020828403121561326e57600080fd5b6110c782613240565b6001600160e01b0319811681146111a657600080fd5b60006020828403121561329f57600080fd5b81356110c781613277565b60005b838110156132c55781810151838201526020016132ad565b50506000910152565b600081518084526132e68160208601602086016132aa565b601f01601f19169290920160200192915050565b6020815260006110c760208301846132ce565b60006020828403121561331f57600080fd5b5035919050565b6000806040838503121561333957600080fd5b61334283613240565b946020939093013593505050565b60008060006060848603121561336557600080fd5b61336e84613240565b925061337c60208501613240565b9150604084013590509250925092565b8035801515811461325757600080fd5b600080604083850312156133af57600080fd5b6133b883613240565b91506133c66020840161338c565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561340e5761340e6133cf565b604052919050565b600067ffffffffffffffff821115613430576134306133cf565b50601f01601f191660200190565b600061345161344c84613416565b6133e5565b905082815283838301111561346557600080fd5b828260208301376000602084830101529392505050565b6000806000806080858703121561349257600080fd5b61349b85613240565b93506134a960208601613240565b925060408501359150606085013567ffffffffffffffff8111156134cc57600080fd5b8501601f810187136134dd57600080fd5b6134ec8782356020840161343e565b91505092959194509250565b60006020828403121561350a57600080fd5b813567ffffffffffffffff81111561352157600080fd5b8201601f8101841361353257600080fd5b6124738482356020840161343e565b60008060008060008060c0878903121561355a57600080fd5b61356387613240565b95506020870135945060408701359350606087013560ff8116811461358757600080fd5b9598949750929560808101359460a0909101359350915050565b6000602082840312156135b357600080fd5b6110c78261338c565b600080604083850312156135cf57600080fd5b6135d883613240565b91506133c660208401613240565b600080604083850312156135f957600080fd5b61360283613240565b9150602083013563ffffffff8116811461361b57600080fd5b809150509250929050565b6000806040838503121561363957600080fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c9082168061369157607f821691505b6020821081036136b157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000600182016136df576136df6136b7565b5060010190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b918252805465ffffffffffff8082166020850152603082901c81166040850152606082811c821690850152609082901c8116608085015260c091821c811660a08501526001909201549091169082015260e00190565b6000602082840312156137b557600080fd5b815167ffffffffffffffff8111156137cc57600080fd5b8201601f810184136137dd57600080fd5b80516137eb61344c82613416565b81815285602083850101111561380057600080fd5b6138118260208301602086016132aa565b95945050505050565b63ffffffff828116828216039080821115613837576138376136b7565b5092915050565b634e487b7160e01b600052601260045260246000fd5b600063ffffffff8084168061386b5761386b61383e565b92169190910492915050565b81810381811115610c3a57610c3a6136b7565b6000826138995761389961383e565b500490565b601f821115610e7757600081815260208120601f850160051c810160208610156138c55750805b601f850160051c820191505b81811015611b78578281556001016138d1565b815167ffffffffffffffff8111156138fe576138fe6133cf565b6139128161390c845461367d565b8461389e565b602080601f831160018114613947576000841561392f5750858301515b600019600386901b1c1916600185901b178555611b78565b600085815260208120601f198616915b8281101561397657888601518255948401946001909101908401613957565b50858210156139945787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b66697066733a2f2f60c81b815260006007600084546139c28161367d565b600182811680156139da57600181146139f357613a26565b60ff198416888701528215158302880186019450613a26565b8860005260208060002060005b85811015613a1b5781548b82018a0152908401908201613a00565b505050858389010194505b5092979650505050505050565b805165ffffffffffff8116811461325757600080fd5b600060c08284031215613a5b57600080fd5b60405160c0810181811067ffffffffffffffff82111715613a7e57613a7e6133cf565b604052613a8a83613a33565b8152613a9860208401613a33565b6020820152613aa960408401613a33565b6040820152613aba60608401613a33565b6060820152613acb60808401613a33565b6080820152613adc60a08401613a33565b60a08201529392505050565b80820180821115610c3a57610c3a6136b7565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613b80908301846132ce565b9695505050505050565b600060208284031215613b9c57600080fd5b81516110c781613277565b6001600160601b03828116828216039080821115613837576138376136b7565b63ffffffff818116838216019080821115613837576138376136b7565b6001600160601b03818116838216019080821115613837576138376136b7565b634e487b7160e01b600052603160045260246000fdfe455243373231436865636b706f696e7461626c653a3a5f6d6f766544656c6567617465733a20616d6f756e74206f766572666c6f7773455243373231436865636b706f696e7461626c653a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473455243373231436865636b706f696e7461626c653a3a766f746573546f44656c65676174653a20616d6f756e7420657863656564732039362062697473455243373231436865636b706f696e7461626c653a3a5f6d6f766544656c6567617465733a20616d6f756e7420756e646572666c6f7773a2646970667358221220288f3989e00b21ec88b1f79ae6397818c3defe3b52baff2521c80c23362d428264736f6c63430008130033

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

0000000000000000000000000000000000000000000000000000000065f3543d0000000000000000000000004ea682b94b7e13894c3d0b9afebfbdd38cdacc3c0000000000000000000000009c2682b4d295a955fb546148967aa6ca1b66d2dc000000000000000000000000e571a5dd7b38298099d27e8943748b2d8572050b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _mintStart (uint256): 1710445629
Arg [1] : _reserve (address): 0x4eA682B94B7e13894C3d0b9afEbFbDd38CdACc3C
Arg [2] : _descriptor (address): 0x9c2682B4D295a955FB546148967aA6ca1B66d2dC
Arg [3] : _seeder (address): 0xe571a5dD7b38298099d27E8943748b2D8572050B
Arg [4] : _enableReservePrice (bool): True
Arg [5] : _blast (address): 0x0000000000000000000000000000000000000000

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000065f3543d
Arg [1] : 0000000000000000000000004ea682b94b7e13894c3d0b9afebfbdd38cdacc3c
Arg [2] : 0000000000000000000000009c2682b4d295a955fb546148967aa6ca1b66d2dc
Arg [3] : 000000000000000000000000e571a5dd7b38298099d27e8943748b2d8572050b
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000000


[ 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.