ETH Price: $3,462.11 (+3.93%)
Gas: 4 Gwei

Token

BLUUTOPIA (BLUU)
 

Overview

Max Total Supply

2,104 BLUU

Holders

390

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Filtered by Token Holder
fireape.eth
Balance
4 BLUU
0x553bfc1e4a9c48bcbcebad54aa4cd5b48c8b037d
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Bluutopia

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 29 : LinkTokenInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface LinkTokenInterface {
  function allowance(address owner, address spender) external view returns (uint256 remaining);

  function approve(address spender, uint256 value) external returns (bool success);

  function balanceOf(address owner) external view returns (uint256 balance);

  function decimals() external view returns (uint8 decimalPlaces);

  function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);

  function increaseApproval(address spender, uint256 subtractedValue) external;

  function name() external view returns (string memory tokenName);

  function symbol() external view returns (string memory tokenSymbol);

  function totalSupply() external view returns (uint256 totalTokensIssued);

  function transfer(address to, uint256 value) external returns (bool success);

  function transferAndCall(
    address to,
    uint256 value,
    bytes calldata data
  ) external returns (bool success);

  function transferFrom(
    address from,
    address to,
    uint256 value
  ) external returns (bool success);
}

File 2 of 29 : VRFConsumerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./interfaces/LinkTokenInterface.sol";

import "./VRFRequestIDBase.sol";

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constructor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator, _link) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash), and have told you the minimum LINK
 * @dev price for VRF service. Make sure your contract has sufficient LINK, and
 * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you
 * @dev want to generate randomness from.
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomness method.
 *
 * @dev The randomness argument to fulfillRandomness is the actual random value
 * @dev generated from your seed.
 *
 * @dev The requestId argument is generated from the keyHash and the seed by
 * @dev makeRequestId(keyHash, seed). If your contract could have concurrent
 * @dev requests open, you can use the requestId to track which seed is
 * @dev associated with which randomness. See VRFRequestIDBase.sol for more
 * @dev details. (See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.)
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ. (Which is critical to making unpredictable randomness! See the
 * @dev next section.)
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the ultimate input to the VRF is mixed with the block hash of the
 * @dev block in which the request is made, user-provided seeds have no impact
 * @dev on its economic security properties. They are only included for API
 * @dev compatability with previous versions of this contract.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request.
 */
abstract contract VRFConsumerBase is VRFRequestIDBase {
  /**
   * @notice fulfillRandomness handles the VRF response. Your contract must
   * @notice implement it. See "SECURITY CONSIDERATIONS" above for important
   * @notice principles to keep in mind when implementing your fulfillRandomness
   * @notice method.
   *
   * @dev VRFConsumerBase expects its subcontracts to have a method with this
   * @dev signature, and will call it once it has verified the proof
   * @dev associated with the randomness. (It is triggered via a call to
   * @dev rawFulfillRandomness, below.)
   *
   * @param requestId The Id initially returned by requestRandomness
   * @param randomness the VRF output
   */
  function fulfillRandomness(bytes32 requestId, uint256 randomness) internal virtual;

  /**
   * @dev In order to keep backwards compatibility we have kept the user
   * seed field around. We remove the use of it because given that the blockhash
   * enters later, it overrides whatever randomness the used seed provides.
   * Given that it adds no security, and can easily lead to misunderstandings,
   * we have removed it from usage and can now provide a simpler API.
   */
  uint256 private constant USER_SEED_PLACEHOLDER = 0;

  /**
   * @notice requestRandomness initiates a request for VRF output given _seed
   *
   * @dev The fulfillRandomness method receives the output, once it's provided
   * @dev by the Oracle, and verified by the vrfCoordinator.
   *
   * @dev The _keyHash must already be registered with the VRFCoordinator, and
   * @dev the _fee must exceed the fee specified during registration of the
   * @dev _keyHash.
   *
   * @dev The _seed parameter is vestigial, and is kept only for API
   * @dev compatibility with older versions. It can't *hurt* to mix in some of
   * @dev your own randomness, here, but it's not necessary because the VRF
   * @dev oracle will mix the hash of the block containing your request into the
   * @dev VRF seed it ultimately uses.
   *
   * @param _keyHash ID of public key against which randomness is generated
   * @param _fee The amount of LINK to send with the request
   *
   * @return requestId unique ID for this request
   *
   * @dev The returned requestId can be used to distinguish responses to
   * @dev concurrent requests. It is passed as the first argument to
   * @dev fulfillRandomness.
   */
  function requestRandomness(bytes32 _keyHash, uint256 _fee) internal returns (bytes32 requestId) {
    LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER));
    // This is the seed passed to VRFCoordinator. The oracle will mix this with
    // the hash of the block containing this request to obtain the seed/input
    // which is finally passed to the VRF cryptographic machinery.
    uint256 vRFSeed = makeVRFInputSeed(_keyHash, USER_SEED_PLACEHOLDER, address(this), nonces[_keyHash]);
    // nonces[_keyHash] must stay in sync with
    // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above
    // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest).
    // This provides protection against the user repeating their input seed,
    // which would result in a predictable/duplicate output, if multiple such
    // requests appeared in the same block.
    nonces[_keyHash] = nonces[_keyHash] + 1;
    return makeRequestId(_keyHash, vRFSeed);
  }

  LinkTokenInterface internal immutable LINK;
  address private immutable vrfCoordinator;

  // Nonces for each VRF key from which randomness has been requested.
  //
  // Must stay in sync with VRFCoordinator[_keyHash][this]
  mapping(bytes32 => uint256) /* keyHash */ /* nonce */
    private nonces;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   * @param _link address of LINK token contract
   *
   * @dev https://docs.chain.link/docs/link-token-contracts
   */
  constructor(address _vrfCoordinator, address _link) {
    vrfCoordinator = _vrfCoordinator;
    LINK = LinkTokenInterface(_link);
  }

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomness(bytes32 requestId, uint256 randomness) external {
    require(msg.sender == vrfCoordinator, "Only VRFCoordinator can fulfill");
    fulfillRandomness(requestId, randomness);
  }
}

File 3 of 29 : VRFRequestIDBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract VRFRequestIDBase {
  /**
   * @notice returns the seed which is actually input to the VRF coordinator
   *
   * @dev To prevent repetition of VRF output due to repetition of the
   * @dev user-supplied seed, that seed is combined in a hash with the
   * @dev user-specific nonce, and the address of the consuming contract. The
   * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in
   * @dev the final seed, but the nonce does protect against repetition in
   * @dev requests which are included in a single block.
   *
   * @param _userSeed VRF seed input provided by user
   * @param _requester Address of the requesting contract
   * @param _nonce User-specific nonce at the time of the request
   */
  function makeVRFInputSeed(
    bytes32 _keyHash,
    uint256 _userSeed,
    address _requester,
    uint256 _nonce
  ) internal pure returns (uint256) {
    return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce)));
  }

  /**
   * @notice Returns the id for this request
   * @param _keyHash The serviceAgreement ID to be used for this request
   * @param _vRFInputSeed The seed to be passed directly to the VRF
   * @return The id for this request
   *
   * @dev Note that _vRFInputSeed is not the seed passed by the consuming
   * @dev contract, but the one generated by makeVRFInputSeed
   */
  function makeRequestId(bytes32 _keyHash, uint256 _vRFInputSeed) internal pure returns (bytes32) {
    return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed));
  }
}

File 4 of 29 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

File 5 of 29 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 6 of 29 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 7 of 29 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 8 of 29 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 9 of 29 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 10 of 29 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.2) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../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: address zero is not a valid owner");
        return _balances[owner];
    }

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");

        _transfer(from, to, tokenId);
    }

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @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 _ownerOf(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) {
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

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

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

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

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

        // Check that tokenId was not minted by `_beforeTokenTransfer` hook
        require(!_exists(tokenId), "ERC721: token already minted");

        unchecked {
            // Will not overflow unless all 2**256 token ids are minted to the same owner.
            // Given that tokens are minted one by one, it is impossible in practice that
            // this ever happens. Might change if we allow batch minting.
            // The ERC fails to describe this case.
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

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

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

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

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

        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
        owner = ERC721.ownerOf(tokenId);

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            // Cannot overflow, as that would require more tokens to be burned/transferred
            // out than the owner initially received through minting and transferring in.
            _balances[owner] -= 1;
        }
        delete _owners[tokenId];

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

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

    /**
     * @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 from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId, 1);

        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");

        // Clear approvals from the previous owner
        delete _tokenApprovals[tokenId];

        unchecked {
            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
            // `from`'s balance is the number of token held, which is at least one before the current
            // transfer.
            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
            // all 2**256 token ids to be minted, which in practice is impossible.
            _balances[from] -= 1;
            _balances[to] += 1;
        }
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId, 1);
    }

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

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

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

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

    /**
     * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
     * - When `from` is zero, the tokens were minted for `to`.
     * - When `to` is zero, ``from``'s tokens were burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}

    /**
     * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
     *
     * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant
     * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such
     * that `ownerOf(tokenId)` is `a`.
     */
    // solhint-disable-next-line func-name-mixedcase
    function __unsafe_increaseBalance(address account, uint256 amount) internal {
        _balances[account] += amount;
    }
}

File 11 of 29 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./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 See {ERC721-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, firstTokenId, batchSize);

        if (batchSize > 1) {
            // Will only trigger during construction. Batch transferring (minting) is not available afterwards.
            revert("ERC721Enumerable: consecutive transfers not supported");
        }

        uint256 tokenId = firstTokenId;

        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 12 of 29 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 14 of 29 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

File 15 of 29 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 16 of 29 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

File 18 of 29 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 21 of 29 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 22 of 29 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 23 of 29 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

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

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

File 24 of 29 : Bluutopia.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./lib/BlockbasedSale.sol";
import "./lib/PaymentSplitterWithTax.sol";
import "./lib/Roles.sol";
import "./lib/Revealable.sol";
import "./lib/RequestSigning.sol";

contract Bluutopia is
    Ownable,
    ERC721,
    ERC721Enumerable,
    ReentrancyGuard,
    Roles,
    Revealable,
    BlockbasedSale,
    RequestSigning
{
    using Address for address;
    using SafeMath for uint256;

    event Airdrop(address[] addresses, uint256 amount);
    event Purchased(address indexed account, uint256 indexed index);
    event WithdrawNonPurchaseFund(uint256 balance);
    event Release(address account);

    mapping(address => uint256) private _privateSaleClaimed;
    mapping(address => uint256) private _ogClaimed;
    PaymentSplitterWithTax private _splitter;

    struct ChainLinkParams {
        address coordinator;
        address linkToken;
        bytes32 keyHash;
    }

    struct RevenueShareParams {
        address[] payees;
        uint256[] shares;
        uint256 index;
        uint256 tax;
    }

    struct MintInfo {
        uint128 price;
        uint8 amount;
    }

    mapping(address => MintInfo[]) public fairDAInfo;

    modifier shareHolderOnly() {
        require(
            _splitter.shares(msg.sender) > 0 || owner() == _msgSender(),
            "not shareholder/owner"
        );
        _;
    }

    constructor(
        string memory _tokenName,
        string memory _symbol,
        uint256 _maxSupply,
        uint256 _startPrice,
        string memory _defaultURI,
        ChainLinkParams memory chainLinkParams,
        RevenueShareParams memory revenueShare
    )
        ERC721(_tokenName, _symbol)
        Revealable(
            _defaultURI,
            chainLinkParams.coordinator,
            chainLinkParams.linkToken,
            chainLinkParams.keyHash
        )
        RequestSigning(_symbol)
    {
        _splitter = new PaymentSplitterWithTax(
            revenueShare.payees,
            revenueShare.shares,
            revenueShare.index,
            revenueShare.tax
        );
        maxSupply = _maxSupply;
        publicSaleBeginPrice = _startPrice;
        finalDAPrice = _startPrice;
    }

    function airdrop(address[] memory addresses, uint256 amount)
        external
        nonReentrant
        onlyOperator
    {
        require(
            totalSupply().add(addresses.length.mul(amount)) <= maxSupply,
            "Exceed max supply limit."
        );

        require(
            saleStats.totalReserveMinted.add(addresses.length.mul(amount)) <=
                maxReserve,
            "Insufficient reserve."
        );

        saleStats.totalReserveMinted = saleStats.totalReserveMinted.add(
            addresses.length.mul(amount)
        );

        for (uint256 i = 0; i < addresses.length; i++) {
            _mintToken(addresses[i], amount);
        }
        emit Airdrop(addresses, amount);
    }

    function mintOg(uint256 amount, bytes calldata signature)
        external
        payable
        nonReentrant
        returns (bool)
    {
        require(msg.sender == tx.origin, "Contract is not allowed.");
        require(
            getState() == SaleState.PrivateSaleDuring,
            "Sale not available."
        );

        require(isOG(signature), "Not OG whitelisted.");
        require(amount.add(_ogClaimed[msg.sender]) <= 2, "Exceed 0xOG quota.");
        require(
            totalPrivateSaleMinted().add(amount) <= privateSaleCapped,
            "Exceed private sale limit."
        );

        require(
            msg.value >= amount.mul(getPriceByMode()),
            "Insufficient funds."
        );

        _ogClaimed[msg.sender] = _ogClaimed[msg.sender] + amount;
        saleStats.totalOGMinted = saleStats.totalOGMinted.add(amount);

        _mintToken(msg.sender, amount);

        payable(_splitter).transfer(msg.value);

        return true;
    }

    function mintToken(uint256 amount, bytes calldata signature)
        external
        payable
        nonReentrant
        returns (bool)
    {
        SaleState state = getState();
        require(msg.sender == tx.origin, "Contract is not allowed.");
        require(
            state == SaleState.PrivateSaleDuring ||
                state == SaleState.PublicSaleDuring ||
                state == SaleState.DutchAuctionDuring,
            "Sale not available."
        );
        require(
            msg.value >= amount.mul(getPriceByMode()),
            "Insufficient funds."
        );

        if (state == SaleState.DutchAuctionDuring) {
            require(
                amount <= saleConfig.maxDAMintPerTx,
                "Exceed transaction limits."
            );
            require(
                saleStats.totalDAMinted.add(amount) <= dutchAuctionCapped,
                "Purchase exceed limit."
            );
        }

        if (state == SaleState.PublicSaleDuring) {
            require(
                amount <= saleConfig.maxFMMintPerTx,
                "Exceed transaction limits."
            );
            require(
                totalSupply().add(amount).add(availableReserve()) <= maxSupply,
                "Exceed max supply."
            );
        }

        if (state == SaleState.PrivateSaleDuring) {
            require(isWhiteListed(signature), "Not whitelisted.");
            require(amount <= 2, "Exceed transaction limits.");
            require(
                _privateSaleClaimed[msg.sender] + amount <= 2,
                "Exceed whitelist quota."
            );
            require(
                totalPrivateSaleMinted().add(amount) <= privateSaleCapped,
                "Exceed private sale limit."
            );
        }

        _mintToken(msg.sender, amount);
        if (state == SaleState.DutchAuctionDuring) {
            saleStats.totalDAMinted = saleStats.totalDAMinted.add(amount);

            uint256 mintPrice = msg.value.div(amount);

            fairDAInfo[msg.sender].push(
                MintInfo(uint128(mintPrice), uint8(amount))
            );

            if (mintPrice < finalDAPrice) {
                finalDAPrice = mintPrice;
            }
        }
        if (state == SaleState.PublicSaleDuring) {
            saleStats.totalFMMinted = saleStats.totalFMMinted.add(amount);
        }
        if (state == SaleState.PrivateSaleDuring) {
            _privateSaleClaimed[msg.sender] =
                _privateSaleClaimed[msg.sender] +
                amount;
            saleStats.totalWLMinted = saleStats.totalWLMinted.add(amount);
        }
        payable(_splitter).transfer(msg.value);

        return true;
    }

    function cutSupply(uint256 newMaxSupply) external onlyOperator {
        
        require(newMaxSupply <= maxSupply, "Cannot increase max supply");
        require(newMaxSupply >= (
            totalSupply() + maxReserve - saleStats.totalReserveMinted
        ), "Max supply is too low");
        unchecked {
            maxSupply = newMaxSupply;
        }
    }

    function dutchAuctionInfo(address user)
        external
        view
        returns (MintInfo[] memory)
    {
        return fairDAInfo[user];
    }

    function _mintToken(address addr, uint256 amount) internal returns (bool) {
        for (uint256 i = 0; i < amount; i++) {
            uint256 tokenIndex = totalSupply();
            if (tokenIndex < maxSupply) {
                _safeMint(addr, tokenIndex + 1);
                emit Purchased(addr, tokenIndex);
            }
        }
        return true;
    }

    function tokenURI(uint256 tokenId)
        public
        view
        override(ERC721)
        returns (string memory)
    {
        require(tokenId > 0 && tokenId <= totalSupply(), "Token not exist.");

        return
            isRevealed()
                ? string(
                    abi.encodePacked(
                        revealedBaseURI,
                        getShuffledId(totalSupply(), maxSupply, tokenId, 1),
                        ".json"
                    )
                )
                : defaultURI;
    }

    function release(address payable account) external virtual shareHolderOnly {
        require(
            msg.sender == account || msg.sender == owner(),
            "Release: no permission"
        );

        _splitter.release(account);
        emit Release(address(account));
    }

    function withdraw() external onlyOperator {
        uint256 balance = address(this).balance;
        payable(msg.sender).transfer(balance);
        emit WithdrawNonPurchaseFund(balance);
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId,
        uint256 batchSize
    ) internal virtual override(ERC721, ERC721Enumerable) {
        super._beforeTokenTransfer(from, to, tokenId, batchSize);
    }

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

}

File 25 of 29 : BlockbasedSale.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./Roles.sol";

contract BlockbasedSale is Ownable, Roles {
    using SafeMath for uint256;

    event AssignDutchAuction(bool flag);
    event AssignDutchAuctionCap(uint256 cap);
    event AssignPrivateSaleCap(uint256 cap);
    event AssignPriceDecayParameter(
        uint256 size,
        uint256 _lowerBoundPrice,
        uint256 _priceFactor
    );
    event AssignTransactionLimit(uint256 _dutchAuction, uint256 _freeMarket);
    event AssignPrivateSaleConfig(uint256 beginBlock, uint256 endBlock);
    event AssignPublicSaleConfig(uint256 beginBlock, uint256 endBlock);
    event AssignDutchAuctionConfig(uint256 beginBlock, uint256 endBlock);
    event AssignPrivateSalePrice(uint256 price);
    event AssignPublicSalePrice(uint256 price);
    event AssignReserveLimit(uint256 limit);
    event AssignPrivateSapeCap(uint256 cap);
    event EnablePublicSale();
    event EnablePrivateSale();
    event EnableFairDutchAuction();
    event ForceCloseSale();
    event ForcePauseSale();
    event ResetOverridedSaleState();
    event OverrideFinalDAPrice(uint256 price);

    enum SaleState {
        NotStarted,
        DutchAuctionBeforeWithoutBlock,
        DutchAuctionBeforeWithBlock,
        DutchAuctionDuring,
        DutchAuctionEnd,
        DutchAuctionEndSoldOut,
        PrivateSaleBeforeWithoutBlock,
        PrivateSaleBeforeWithBlock,
        PrivateSaleDuring,
        PrivateSaleEnd,
        PrivateSaleEndSoldOut,
        PublicSaleBeforeWithoutBlock,
        PublicSaleBeforeWithBlock,
        PublicSaleDuring,
        PublicSaleEnd,
        PublicSaleEndSoldOut,
        PauseSale,
        AllSalesEnd
    }

    enum SalePhase {
        None,
        DutchAuction,
        Private,
        Public
    }

    enum OverrideSaleState {
        None,
        Pause,
        Close
    }

    struct SalesBlock {
        uint256 beginBlock;
        uint256 endBlock;
    }

    struct DutchAuctionConfig {
        uint256 discountBlockSize;
        uint256 lowerBoundPrice;
        uint256 priceFactor;
    }

    struct SaleStats {
        uint256 totalReserveMinted;
        uint256 totalDAMinted;
        uint256 totalOGMinted;
        uint256 totalWLMinted;
        uint256 totalFMMinted;
    }

    struct SaleConfig {
        uint256 maxDAMintPerTx;
        uint256 maxFMMintPerTx;
    }

    SalesBlock public dutchAuction;
    SalesBlock public privateSale;
    SalesBlock public publicSale;

    OverrideSaleState public overridedSaleState = OverrideSaleState.None;
    SalePhase public salePhase = SalePhase.None;

    DutchAuctionConfig public dutchAuctionConfig;
    SaleStats public saleStats;
    SaleConfig public saleConfig;

    uint256 public maxSupply = 10000;
    uint256 public maxReserve;
    uint256 public privateSalePriceCapped = 500000000000000000;
    uint256 public publicSaleBeginPrice = 500000000000000000;
    uint256 public finalDAPrice;
    uint256 public privateSaleCapped;
    uint256 public dutchAuctionCapped;

    function setDutchAuctionBlocks(SalesBlock memory _dutchAuction)
        external
        onlyOperator
    {
        dutchAuction = _dutchAuction;
        emit AssignDutchAuctionConfig(
            _dutchAuction.beginBlock,
            _dutchAuction.endBlock
        );
    }

    function setPrivateSaleBlocks(SalesBlock memory _privateSale)
        external
        onlyOperator
    {
        privateSale = _privateSale;
        emit AssignPrivateSaleConfig(
            _privateSale.beginBlock,
            _privateSale.endBlock
        );
    }

    function setPublicSaleBlocks(SalesBlock memory _publicSale)
        external
        onlyOperator
    {
        publicSale = _publicSale;
        emit AssignPublicSaleConfig(
            _publicSale.beginBlock,
            _publicSale.endBlock
        );
    }

    function setOverrideFinalDAPrice(uint256 price) external onlyOperator {
        finalDAPrice = price;
        emit OverrideFinalDAPrice(price);
    }

    function setDutchAuctionParam(
        uint256 size,
        uint256 lowerBoundPrice,
        uint256 factor
    ) external onlyOperator {
        dutchAuctionConfig.discountBlockSize = size;
        dutchAuctionConfig.lowerBoundPrice = lowerBoundPrice;
        dutchAuctionConfig.priceFactor = factor;
        emit AssignPriceDecayParameter(size, lowerBoundPrice, factor);
    }

    function setTransactionLimit(uint256 _dutchAuction, uint256 _freeMarket)
        external
        onlyOperator
    {
        saleConfig.maxDAMintPerTx = _dutchAuction;
        saleConfig.maxFMMintPerTx = _freeMarket;
        emit AssignTransactionLimit(_dutchAuction, _freeMarket);
    }

    function setPublicSalePrice(uint256 _price) external onlyOperator {
        publicSaleBeginPrice = _price;
        emit AssignPublicSalePrice(_price);
    }

    function setPrivateSaleCapPrice(uint256 _price) external onlyOperator {
        privateSalePriceCapped = _price;
        emit AssignPrivateSalePrice(_price);
    }

    function setCloseSale() external onlyOperator {
        overridedSaleState = OverrideSaleState.Close;
        emit ForceCloseSale();
    }

    function setPauseSale() external onlyOperator {
        overridedSaleState = OverrideSaleState.Pause;
        emit ForcePauseSale();
    }

    function resetOverridedSaleState() external onlyOperator {
        overridedSaleState = OverrideSaleState.None;
        emit ResetOverridedSaleState();
    }

    function setReserve(uint256 reserve) external onlyOperator {
        maxReserve = reserve;
        emit AssignReserveLimit(reserve);
    }

    function setDutchAuctionCap(uint256 cap) external onlyOperator {
        dutchAuctionCapped = cap;
        emit AssignDutchAuctionCap(cap);
    }

    function setPrivateSaleCap(uint256 cap) external onlyOperator {
        privateSaleCapped = cap;
        emit AssignPrivateSaleCap(cap);
    }

    function enableDutchAuction() external onlyOperator {
        salePhase = SalePhase.DutchAuction;
        emit EnableFairDutchAuction();
    }

    function enablePublicSale() external onlyOperator {
        salePhase = SalePhase.Public;
        emit EnablePublicSale();
    }

    function enablePrivateSale() external onlyOperator {
        salePhase = SalePhase.Private;
        emit EnablePrivateSale();
    }

    function getStartSaleBlock() external view returns (uint256) {
        if (salePhase == SalePhase.DutchAuction) {
            return dutchAuction.beginBlock;
        }

        if (salePhase == SalePhase.Private) {
            return privateSale.beginBlock;
        }

        if (salePhase == SalePhase.Public) {
            return publicSale.beginBlock;
        }

        return 0;
    }

    function getEndSaleBlock() external view returns (uint256) {
        if (salePhase == SalePhase.DutchAuction) {
            return dutchAuction.endBlock;
        }

        if (salePhase == SalePhase.Private) {
            return privateSale.endBlock;
        }

        if (salePhase == SalePhase.Public) {
            return publicSale.endBlock;
        }

        return 0;
    }

    function availableReserve() public view returns (uint256) {
        return maxReserve - saleStats.totalReserveMinted;
    }

    function getMaxSupplyByMode() external view returns (uint256) {
        SaleState state = getState();
        if (state == SaleState.DutchAuctionDuring)
            return dutchAuctionCapped;
        if (state == SaleState.PrivateSaleDuring) return privateSaleCapped;
        if (state == SaleState.PublicSaleDuring)
            return
                maxSupply -
                saleStats.totalOGMinted -
                saleStats.totalWLMinted -
                maxReserve -
                saleStats.totalDAMinted;
        return 0;
    }

    function getMintedByMode() external view returns (uint256) {
        SaleState state = getState();
        if (state == SaleState.PrivateSaleDuring)
            return saleStats.totalOGMinted + saleStats.totalWLMinted;
        if (state == SaleState.PublicSaleDuring)
            return saleStats.totalFMMinted;
        if (state == SaleState.DutchAuctionDuring)
            return saleStats.totalDAMinted;
        return 0;
    }

    function getTransactionCappedByMode() external view returns (uint256) {
        if (getState() == SaleState.DutchAuctionDuring)
            return saleConfig.maxDAMintPerTx;
        if (getState() == SaleState.PublicSaleDuring)
            return saleConfig.maxFMMintPerTx;
        return 2;
    }

    function getPriceByMode() public view returns (uint256) {
        SaleState state = getState();
        if (state == SaleState.DutchAuctionDuring) {
            uint256 passedBlock = block.number - dutchAuction.beginBlock;
            uint256 discountPrice = passedBlock
                .div(dutchAuctionConfig.discountBlockSize)
                .mul(dutchAuctionConfig.priceFactor);

            if (
                discountPrice >=
                publicSaleBeginPrice.sub(dutchAuctionConfig.lowerBoundPrice)
            ) {
                return dutchAuctionConfig.lowerBoundPrice;
            } else {
                return publicSaleBeginPrice.sub(discountPrice);
            }
        }

        if (state == SaleState.PrivateSaleDuring) {
            return privateSalePriceCapped;
        }

        if (state == SaleState.PublicSaleDuring) {
            return publicSaleBeginPrice;
        }

        return publicSaleBeginPrice;
    }

    function totalPrivateSaleMinted() public view returns (uint256) {
        return saleStats.totalWLMinted + saleStats.totalOGMinted;
    }

    function isPrivateSaleSoldOut() public view returns (bool) {
        return totalPrivateSaleMinted() == privateSaleCapped;
    }

    function isDASoldOut() public view returns (bool) {
        return dutchAuctionCapped == saleStats.totalDAMinted;
    }

    function isSoldOut() public view returns (bool) {
        uint256 supplyWithoutReserve = maxSupply - maxReserve;
        uint256 mintedWithoutReserve = saleStats.totalDAMinted +
            saleStats.totalFMMinted +
            saleStats.totalOGMinted + 
            saleStats.totalWLMinted;
        return supplyWithoutReserve == mintedWithoutReserve;
    }

    function getStateName() external view returns (string memory) {
        SaleState state = getState();
        if (state == SaleState.DutchAuctionBeforeWithoutBlock)
            return "DutchAuctionBeforeWithoutBlock";
        if (state == SaleState.DutchAuctionBeforeWithBlock)
            return "DutchAuctionBeforeWithBlock";
        if (state == SaleState.DutchAuctionDuring) return "DutchAuctionDuring";
        if (state == SaleState.DutchAuctionEnd) return "DutchAuctionEnd";
        if (state == SaleState.DutchAuctionEndSoldOut)
            return "DutchAuctionEndSoldOut";
        if (state == SaleState.PrivateSaleBeforeWithoutBlock)
            return "PrivateSaleBeforeWithoutBlock";
        if (state == SaleState.PrivateSaleBeforeWithBlock)
            return "PrivateSaleBeforeWithBlock";
        if (state == SaleState.PrivateSaleDuring) return "PrivateSaleDuring";
        if (state == SaleState.PrivateSaleEnd) return "PrivateSaleEnd";
        if (state == SaleState.PrivateSaleEndSoldOut)
            return "PrivateSaleEndSoldOut";
        if (state == SaleState.PublicSaleBeforeWithoutBlock)
            return "PublicSaleBeforeWithoutBlock";
        if (state == SaleState.PublicSaleBeforeWithBlock)
            return "PublicSaleBeforeWithBlock";
        if (state == SaleState.PublicSaleDuring) return "PublicSaleDuring";
        if (state == SaleState.PublicSaleEnd) return "PublicSaleEnd";
        if (state == SaleState.PublicSaleEndSoldOut)
            return "PublicSaleEndSoldOut";
        if (state == SaleState.PauseSale) return "PauseSale";
        if (state == SaleState.AllSalesEnd) return "AllSalesEnd";

        return "NotStarted";
    }

    function getState() public view returns (SaleState) {
        if (overridedSaleState == OverrideSaleState.Close) {
            return SaleState.AllSalesEnd;
        }

        if (overridedSaleState == OverrideSaleState.Pause) {
            return SaleState.PauseSale;
        }

        if (salePhase == SalePhase.None) {
            return SaleState.NotStarted;
        }

        /******* Public Sale Phase Determination  *******/

        if (salePhase == SalePhase.Public) {
            if (isSoldOut()) {
                return SaleState.PublicSaleEndSoldOut;
            }

            if (publicSale.endBlock > 0 && block.number > publicSale.endBlock) {
                return SaleState.PublicSaleEnd;
            }

            if (
                publicSale.beginBlock > 0 &&
                block.number >= publicSale.beginBlock
            ) {
                return SaleState.PublicSaleDuring;
            }

            if (
                publicSale.beginBlock > 0 &&
                block.number < publicSale.beginBlock &&
                block.number > privateSale.endBlock
            ) {
                return SaleState.PublicSaleBeforeWithBlock;
            }

            if (
                publicSale.beginBlock == 0 &&
                block.number > privateSale.endBlock
            ) {
                return SaleState.PublicSaleBeforeWithoutBlock;
            }
        }
        /******* Private Sale Phase Determination  *******/
        if (salePhase == SalePhase.Private) {
            if (isPrivateSaleSoldOut()) {
                return SaleState.PrivateSaleEndSoldOut;
            }

            if (
                privateSale.endBlock > 0 && block.number > privateSale.endBlock
            ) {
                return SaleState.PrivateSaleEnd;
            }

            if (
                privateSale.beginBlock > 0 &&
                block.number >= privateSale.beginBlock
            ) {
                return SaleState.PrivateSaleDuring;
            }

            if (
                privateSale.beginBlock > 0 &&
                block.number < privateSale.beginBlock
            ) {
                return SaleState.PrivateSaleBeforeWithBlock;
            }

            if (privateSale.beginBlock == 0) {
                return SaleState.PrivateSaleBeforeWithoutBlock;
            }
        }
        /******* Dutch Auction Phase Determination  *******/
        if (salePhase == SalePhase.DutchAuction) {
            if (isDASoldOut()) {
                return SaleState.DutchAuctionEndSoldOut;
            }

            if (
                dutchAuction.endBlock > 0 &&
                block.number > dutchAuction.endBlock
            ) {
                return SaleState.DutchAuctionEnd;
            }

            if (
                dutchAuction.beginBlock > 0 &&
                block.number >= dutchAuction.beginBlock
            ) {
                return SaleState.DutchAuctionDuring;
            }

            if (
                dutchAuction.beginBlock > 0 &&
                block.number < dutchAuction.beginBlock
            ) {
                return SaleState.DutchAuctionBeforeWithBlock;
            }

            if (dutchAuction.beginBlock == 0) {
                return SaleState.DutchAuctionBeforeWithoutBlock;
            }
        }

        return SaleState.NotStarted;
    }
}

File 26 of 29 : PaymentSplitterWithTax.sol
// SPDX-License-Identifier: MIT
// Inspired by OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol)

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";

/**
 * @title PaymentSplitter
 * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
 * that the Ether will be split in this way, since it is handled transparently by the contract.
 *
 * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
 * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
 * an amount proportional to the percentage of total shares they were assigned.
 *
 * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
 * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
 * function.
 *
 * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
 * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
 * to run tests before sending real value to this contract.
 */
contract PaymentSplitterWithTax is Context {
    event PayeeAdded(address account, uint256 shares);
    event PaymentReleased(address to, uint256 amount);
    event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
    event PaymentReceived(address from, uint256 amount);

    uint256 private _totalShares;
    uint256 private _totalSharesWithoutTax;
    uint256 private _totalReleased;
    uint256 private _tax;

    mapping(address => uint256) private _shares;
    mapping(address => uint256) private _released;
    address[] private _payees;
    address private _taxman;

    mapping(IERC20 => uint256) private _erc20TotalReleased;
    mapping(IERC20 => mapping(address => uint256)) private _erc20Released;

    /**
     * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
     * the matching position in the `shares` array.
     *
     * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
     * duplicates in `payees`.
     */
    constructor(address[] memory payees, uint256[] memory shares_, uint256 index_, uint256 tax_) payable {
        require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
        require(payees.length > 0, "PaymentSplitter: no payees");
        require(payees.length > index_, "PaymentSplitter: index out of range");

        _taxman = payees[index_];
        _tax = tax_;
        for (uint256 i = 0; i < payees.length; i++) {
            _addPayee(payees[i], shares_[i]);
        }
    }

    /**
     * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
     * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
     * reliability of the events, and not the actual splitting of Ether.
     *
     * To learn more about this see the Solidity documentation for
     * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
     * functions].
     */
    receive() external payable virtual {
        emit PaymentReceived(_msgSender(), msg.value);
    }

    /**
     * @dev Getter for the total shares held by payees.
     */
    function totalShares() public view returns (uint256) {
        return _totalShares;
    }

    /**
     * @dev Getter for the total amount of Ether already released.
     */
    function totalReleased() public view returns (uint256) {
        return _totalReleased;
    }

    /**
     * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
     * contract.
     */
    function totalReleased(IERC20 token) public view returns (uint256) {
        return _erc20TotalReleased[token];
    }

    /**
     * @dev Getter for the amount of shares held by an account.
     */
    function shares(address account) public view returns (uint256) {
        return _shares[account];
    }

    /**
     * @dev Getter for the amount of Ether already released to a payee.
     */
    function released(address account) public view returns (uint256) {
        return _released[account];
    }

    /**
     * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
     * IERC20 contract.
     */
    function released(IERC20 token, address account) public view returns (uint256) {
        return _erc20Released[token][account];
    }

    /**
     * @dev Getter for the address of the payee number `index`.
     */
    function payee(uint256 index) public view returns (address) {
        return _payees[index];
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
     * total shares and their previous withdrawals.
     */
    function release(address payable account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 totalReceived = address(this).balance + totalReleased();
        uint256 payment = _pendingPayment(account, totalReceived, released(account));

        require(payment != 0, "PaymentSplitter: account is not due payment");

        _released[account] += payment;
        _totalReleased += payment;

        Address.sendValue(account, payment);
        emit PaymentReleased(account, payment);
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
     * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
     * contract.
     */
    function release(IERC20 token, address account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);
        uint256 payment = _pendingPayment(account, totalReceived, released(token, account));

        require(payment != 0, "PaymentSplitter: account is not due payment");

        _erc20Released[token][account] += payment;
        _erc20TotalReleased[token] += payment;

        SafeERC20.safeTransfer(token, account, payment);
        emit ERC20PaymentReleased(token, account, payment);
    }

    /**
     * @dev internal logic for computing the pending payment of an `account` given the token historical balances and
     * already released amounts.
     */
    function _pendingPayment(
        address account,
        uint256 totalReceived,
        uint256 alreadyReleased
    ) private view returns (uint256) {
        if ((totalReceived * _shares[_taxman]) / _totalShares > _tax) {
            return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;
        }
        else {
            uint256 tax = ((totalReceived < _tax) ? totalReceived : _tax);
            if (account == _taxman) {
                return tax - _released[_taxman];
            }
            return ((totalReceived - tax) * _shares[account]) / _totalSharesWithoutTax - alreadyReleased;
        }
    }

    /**
     * @dev Add a new payee to the contract.
     * @param account The address of the payee to add.
     * @param shares_ The number of shares owned by the payee.
     */
    function _addPayee(address account, uint256 shares_) private {
        require(account != address(0), "PaymentSplitter: account is the zero address");
        require(shares_ > 0, "PaymentSplitter: shares are 0");
        require(_shares[account] == 0, "PaymentSplitter: account already has shares");

        _payees.push(account);
        _shares[account] = shares_;
        _totalShares = _totalShares + shares_;
        if (account != _taxman) {
            _totalSharesWithoutTax = _totalSharesWithoutTax + shares_;
        }
        emit PayeeAdded(account, shares_);
    }
}

File 27 of 29 : RequestSigning.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;

import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./Roles.sol";

abstract contract RequestSigning is Ownable, Roles {
    using ECDSA for bytes32;

    event AssignWhitelistSigningKey(address indexed _address);
    event AssignOgSigningKey(address indexed _address);

    // The key(s) used to sign whitelist signatures.
    // We will check to ensure that the key that signed the signature
    // is this one that we expect.
    address public whitelistKey = address(0);
    address public ogKey = address(0);

    // Domain Separator is the EIP-712 defined structure that defines what contract
    // and chain these signatures can be used for.  This ensures people can't take
    // a signature used to mint on one contract and use it for another, or a signature
    // from testnet to replay on mainnet.
    // It has to be created in the constructor so we can dynamically grab the chainId.
    // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#definition-of-domainseparator
    bytes32 public domainSeparator;

    // The typehash for the data type specified in the structured data
    // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#rationale-for-typehash
    // This should match whats in the client side whitelist signing code
    bytes32 public constant MINTER_TYPEHASH =
        keccak256("Minter(address wallet)");

    constructor(string memory _schemeName) {
        // This should match whats in the client side whitelist signing code
        domainSeparator = keccak256(
            abi.encode(
                keccak256(
                    "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
                ),
                // This should match the domain you set in your client side signing.
                keccak256(bytes.concat(bytes(_schemeName), bytes("Whitelist"))),
                keccak256(bytes("1")),
                block.chainid,
                address(this)
            )
        );
    }

    function setWhitelistSigningKey(address newSigningKey)
        external
        onlyOperator
    {
        whitelistKey = newSigningKey;
        emit AssignWhitelistSigningKey(newSigningKey);
    }

    function setOgSigningKey(address newSigningKey) external onlyOperator {
        ogKey = newSigningKey;
        emit AssignOgSigningKey(newSigningKey);
    }

    function isWhiteListed(bytes calldata signature)
        public
        view
        returns (bool)
    {
        require(whitelistKey != address(0), "WL key not assigned");
        return getEIP712RecoverAddress(signature) == whitelistKey;
    }

    function isOG(bytes calldata signature) public view returns (bool) {
        require(ogKey != address(0), "OG key not assigned");
        return getEIP712RecoverAddress(signature) == ogKey;
    }

    function getEIP712RecoverAddress(bytes calldata signature)
        internal
        view
        returns (address)
    {
        // Verify EIP-712 signature by recreating the data structure
        // that we signed on the client side, and then using that to recover
        // the address that signed the signature for this data.
        // Signature begin with \x19\x01, see: https://eips.ethereum.org/EIPS/eip-712
        bytes32 digest = keccak256(
            abi.encodePacked(
                "\x19\x01",
                domainSeparator,
                keccak256(abi.encode(MINTER_TYPEHASH, msg.sender))
            )
        );

        // Use the recover method to see what address was used to create
        // the signature on this data.
        // Note that if the digest doesn't exactly match what was signed we'll
        // get a random recovered address.
        return digest.recover(signature);
    }
}

File 28 of 29 : Revealable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.14;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./Roles.sol";

abstract contract Revealable is VRFConsumerBase, Roles {
    bool public randomseedRequested;
    bytes32 public keyHash;
    uint256 public revealBlock;
    uint256 public seed;
    string public revealedBaseURI;
    string public defaultURI;

    event RandomseedRequested(uint256 timestamp);
    event RandomseedFulfilmentSuccess(
        uint256 timestamp,
        bytes32 requestId,
        uint256 seed
    );
    event RandomseedFulfilmentFail(uint256 timestamp, bytes32 requestId, uint256 randomNumber);
    event SetRevealedBaseURI(string _baseURI);
    event SetRevealBlock(uint256 blockNumber);
    event SetDefaultURI(string uri);

    constructor(
        string memory _defaultUri,
        address _coordinator,
        address _linkToken,
        bytes32 _keyHash
    ) VRFConsumerBase(_coordinator, _linkToken) {
        defaultURI = _defaultUri;
        keyHash = _keyHash;
    }

    function setDefaultURI(string memory _defaultURI) external onlyOperator {
        require(!isRevealed(), "Already revealed");

        defaultURI = _defaultURI;
        emit SetDefaultURI(_defaultURI);
    }

    function setRevealBlock(uint256 blockNumber) external onlyOperator {
        revealBlock = blockNumber;
        emit SetRevealBlock(blockNumber);
    }

    function setRevealedBaseURI(string memory _baseURI) external onlyOperator {
        revealedBaseURI = _baseURI;
        emit SetRevealedBaseURI(_baseURI);
    }

    function requestChainlinkVRF() external onlyOperator {
        require(!randomseedRequested, "Chainlink VRF already requested");
        require(
            LINK.balanceOf(address(this)) >= 2000000000000000000,
            "Insufficient LINK"
        );
        requestRandomness(keyHash, 2000000000000000000);
        randomseedRequested = true;
        emit RandomseedRequested(block.timestamp);
    }

    function fulfillRandomness(bytes32 requestId, uint256 randomNumber)
        internal
        override
    {
        if (randomNumber > 0) {
            if (seed == 0) {
                seed = randomNumber;
                emit RandomseedFulfilmentSuccess(block.timestamp, requestId, seed);
            } else {
                emit RandomseedFulfilmentFail(block.timestamp, requestId, randomNumber);
            }
        } else {
            emit RandomseedFulfilmentFail(block.timestamp, requestId, randomNumber);
        }
    }

    function isRevealed() public view returns (bool) {
        return seed > 0 && revealBlock > 0 && block.number > revealBlock;
    }

    function setSeed(uint256 _seed) external onlyOperator {
        require(seed == 0, "Seed number exists.");

        seed = _seed;
        randomseedRequested = true;
        emit RandomseedFulfilmentSuccess(block.timestamp, 0, seed);
    }

    function getShuffledId(
        uint256 totalSupply,
        uint256 maxSupply,
        uint256 tokenId,
        uint256 startIndex
    ) public view returns (string memory) {
        if (_msgSender() != owner()) {
            require(tokenId <= totalSupply, "Token not exists");
        }

        if (!isRevealed()) return "default";

        uint256[] memory metadata = new uint256[](maxSupply + 1);

        for (uint256 i = 1; i <= maxSupply; i += 1) {
            metadata[i] = i;
        }

        for (uint256 i = startIndex; i <= maxSupply; i += 1) {
            uint256 j = (uint256(keccak256(abi.encode(seed, i))) %
                (maxSupply)) + 1;

            (metadata[i], metadata[j]) = (metadata[j], metadata[i]);
        }

        return Strings.toString(metadata[tokenId]);
    }
}

File 29 of 29 : Roles.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.14;

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

abstract contract Roles is Ownable {
    address public operatorAddress;
    address public governorAddress;

    event AssignGovernorAddress(address indexed _address);
    event AssignOperatorAddress(address indexed _address);

    constructor() {}

    modifier onlyOperator() {
        require(
            msg.sender == operatorAddress,
            "Only operator allowed."
        );
        _;
    }

    modifier onlyGovernor() {
        require(
            msg.sender == governorAddress,
            "Only governor allowed."
        );
        _;
    }

    function setOperatorAddress(address _operator) external onlyOwner {
        require(_operator != address(0), "Cannot assign 0x0");
        operatorAddress = _operator;
        emit AssignOperatorAddress(_operator);
    }

    function setGovernorAddress(address _governor) external onlyOwner {
        require(_governor != address(0), "Cannot assign 0x0");
        governorAddress = _governor;
        emit AssignGovernorAddress(_governor);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_startPrice","type":"uint256"},{"internalType":"string","name":"_defaultURI","type":"string"},{"components":[{"internalType":"address","name":"coordinator","type":"address"},{"internalType":"address","name":"linkToken","type":"address"},{"internalType":"bytes32","name":"keyHash","type":"bytes32"}],"internalType":"struct Bluutopia.ChainLinkParams","name":"chainLinkParams","type":"tuple"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"tax","type":"uint256"}],"internalType":"struct Bluutopia.RevenueShareParams","name":"revenueShare","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"addresses","type":"address[]"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Airdrop","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"flag","type":"bool"}],"name":"AssignDutchAuction","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cap","type":"uint256"}],"name":"AssignDutchAuctionCap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"beginBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"}],"name":"AssignDutchAuctionConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"}],"name":"AssignGovernorAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"}],"name":"AssignOgSigningKey","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"}],"name":"AssignOperatorAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"size","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_lowerBoundPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_priceFactor","type":"uint256"}],"name":"AssignPriceDecayParameter","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cap","type":"uint256"}],"name":"AssignPrivateSaleCap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"beginBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"}],"name":"AssignPrivateSaleConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"AssignPrivateSalePrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cap","type":"uint256"}],"name":"AssignPrivateSapeCap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"beginBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"}],"name":"AssignPublicSaleConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"AssignPublicSalePrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"}],"name":"AssignReserveLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_dutchAuction","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_freeMarket","type":"uint256"}],"name":"AssignTransactionLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"}],"name":"AssignWhitelistSigningKey","type":"event"},{"anonymous":false,"inputs":[],"name":"EnableFairDutchAuction","type":"event"},{"anonymous":false,"inputs":[],"name":"EnablePrivateSale","type":"event"},{"anonymous":false,"inputs":[],"name":"EnablePublicSale","type":"event"},{"anonymous":false,"inputs":[],"name":"ForceCloseSale","type":"event"},{"anonymous":false,"inputs":[],"name":"ForcePauseSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"OverrideFinalDAPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"}],"name":"Purchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"randomNumber","type":"uint256"}],"name":"RandomseedFulfilmentFail","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"seed","type":"uint256"}],"name":"RandomseedFulfilmentSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"RandomseedRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Release","type":"event"},{"anonymous":false,"inputs":[],"name":"ResetOverridedSaleState","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"SetDefaultURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"SetRevealBlock","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_baseURI","type":"string"}],"name":"SetRevealedBaseURI","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"WithdrawNonPurchaseFund","type":"event"},{"inputs":[],"name":"MINTER_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"availableReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxSupply","type":"uint256"}],"name":"cutSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"defaultURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"domainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dutchAuction","outputs":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dutchAuctionCapped","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dutchAuctionConfig","outputs":[{"internalType":"uint256","name":"discountBlockSize","type":"uint256"},{"internalType":"uint256","name":"lowerBoundPrice","type":"uint256"},{"internalType":"uint256","name":"priceFactor","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"dutchAuctionInfo","outputs":[{"components":[{"internalType":"uint128","name":"price","type":"uint128"},{"internalType":"uint8","name":"amount","type":"uint8"}],"internalType":"struct Bluutopia.MintInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableDutchAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enablePrivateSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enablePublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"fairDAInfo","outputs":[{"internalType":"uint128","name":"price","type":"uint128"},{"internalType":"uint8","name":"amount","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalDAPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getEndSaleBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxSupplyByMode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintedByMode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPriceByMode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"startIndex","type":"uint256"}],"name":"getShuffledId","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStartSaleBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getState","outputs":[{"internalType":"enum BlockbasedSale.SaleState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStateName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTransactionCappedByMode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"isDASoldOut","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isOG","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPrivateSaleSoldOut","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRevealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSoldOut","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"isWhiteListed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keyHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintOg","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ogKey","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"overridedSaleState","outputs":[{"internalType":"enum BlockbasedSale.OverrideSaleState","name":"","type":"uint8"}],"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":"privateSale","outputs":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"privateSaleCapped","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"privateSalePriceCapped","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSale","outputs":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleBeginPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomseedRequested","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requestChainlinkVRF","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetOverridedSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revealedBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"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":"saleConfig","outputs":[{"internalType":"uint256","name":"maxDAMintPerTx","type":"uint256"},{"internalType":"uint256","name":"maxFMMintPerTx","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"salePhase","outputs":[{"internalType":"enum BlockbasedSale.SalePhase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleStats","outputs":[{"internalType":"uint256","name":"totalReserveMinted","type":"uint256"},{"internalType":"uint256","name":"totalDAMinted","type":"uint256"},{"internalType":"uint256","name":"totalOGMinted","type":"uint256"},{"internalType":"uint256","name":"totalWLMinted","type":"uint256"},{"internalType":"uint256","name":"totalFMMinted","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"seed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"setCloseSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_defaultURI","type":"string"}],"name":"setDefaultURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"internalType":"struct BlockbasedSale.SalesBlock","name":"_dutchAuction","type":"tuple"}],"name":"setDutchAuctionBlocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"cap","type":"uint256"}],"name":"setDutchAuctionCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"size","type":"uint256"},{"internalType":"uint256","name":"lowerBoundPrice","type":"uint256"},{"internalType":"uint256","name":"factor","type":"uint256"}],"name":"setDutchAuctionParam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governor","type":"address"}],"name":"setGovernorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSigningKey","type":"address"}],"name":"setOgSigningKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperatorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setOverrideFinalDAPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPauseSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"internalType":"struct BlockbasedSale.SalesBlock","name":"_privateSale","type":"tuple"}],"name":"setPrivateSaleBlocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"cap","type":"uint256"}],"name":"setPrivateSaleCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPrivateSaleCapPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"beginBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"}],"internalType":"struct BlockbasedSale.SalesBlock","name":"_publicSale","type":"tuple"}],"name":"setPublicSaleBlocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPublicSalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reserve","type":"uint256"}],"name":"setReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"setRevealBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setRevealedBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_seed","type":"uint256"}],"name":"setSeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_dutchAuction","type":"uint256"},{"internalType":"uint256","name":"_freeMarket","type":"uint256"}],"name":"setTransactionLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSigningKey","type":"address"}],"name":"setWhitelistSigningKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"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":"totalPrivateSaleMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"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":[],"name":"whitelistKey","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0604052601a805461ffff191690556127106025556706f05b59d3b200006027819055602855602c80546001600160a01b0319908116909155602d805490911690553480156200004f57600080fd5b5060405162007a1e38038062007a1e83398101604081905262000072916200068e565b8151602083015160408401516001600160a01b0380841660a05282166080528892869290918b85620000a43362000258565b8151620000b9906002906020850190620002aa565b508051620000cf906003906020840190620002aa565b50506001600c55508351620000ec906013906020870190620002aa565b50600f555050604080518082018252600981526815da1a5d195b1a5cdd60ba1b60208083019190915291517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f935062000149928592910162000770565b60408051808303601f190181528282528051602091820120838301835260018452603160f81b938201939093528151908101939093528201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160408051601f198184030181528282528051602091820120602e558451908501519185015160608601519194509192620001f19062000339565b620002009493929190620007a3565b604051809103906000f0801580156200021d573d6000803e3d6000fd5b50603180546001600160a01b0319166001600160a01b0392909216919091179055505050602591909155602881905560295550620008719050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620002b89062000835565b90600052602060002090601f016020900481019282620002dc576000855562000327565b82601f10620002f757805160ff191683800117855562000327565b8280016001018555821562000327579182015b82811115620003275782518255916020019190600101906200030a565b506200033592915062000347565b5090565b611386806200669883390190565b5b8082111562000335576000815560010162000348565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b03811182821017156200039957620003996200035e565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620003ca57620003ca6200035e565b604052919050565b60005b83811015620003ef578181015183820152602001620003d5565b83811115620003ff576000848401525b50505050565b600082601f8301126200041757600080fd5b81516001600160401b038111156200043357620004336200035e565b62000448601f8201601f19166020016200039f565b8181528460208386010111156200045e57600080fd5b62000471826020830160208701620003d2565b949350505050565b80516001600160a01b03811681146200049157600080fd5b919050565b600060608284031215620004a957600080fd5b604051606081016001600160401b0381118282101715620004ce57620004ce6200035e565b604052905080620004df8362000479565b8152620004ef6020840162000479565b6020820152604083015160408201525092915050565b60006001600160401b038211156200052157620005216200035e565b5060051b60200190565b600082601f8301126200053d57600080fd5b8151602062000556620005508362000505565b6200039f565b82815260059290921b840181019181810190868411156200057657600080fd5b8286015b848110156200059357805183529183019183016200057a565b509695505050505050565b600060808284031215620005b157600080fd5b620005bb62000374565b82519091506001600160401b0380821115620005d657600080fd5b818401915084601f830112620005eb57600080fd5b81516020620005fe620005508362000505565b82815260059290921b840181019181810190888411156200061e57600080fd5b948201945b838610156200064757620006378662000479565b8252948201949082019062000623565b865250858101519350828411156200065e57600080fd5b6200066c878588016200052b565b8186015250505050604082015160408201526060820151606082015292915050565b6000806000806000806000610120888a031215620006ab57600080fd5b87516001600160401b0380821115620006c357600080fd5b620006d18b838c0162000405565b985060208a0151915080821115620006e857600080fd5b620006f68b838c0162000405565b975060408a0151965060608a0151955060808a01519150808211156200071b57600080fd5b620007298b838c0162000405565b94506200073a8b60a08c0162000496565b93506101008a01519150808211156200075257600080fd5b50620007618a828b016200059e565b91505092959891949750929550565b6000835162000784818460208801620003d2565b8351908301906200079a818360208801620003d2565b01949350505050565b6080808252855190820181905260009060209060a0840190828901845b82811015620007e75781516001600160a01b031684529284019290840190600101620007c0565b5050508381038285015286518082528783019183019060005b818110156200081e5783518352928401929184019160010162000800565b505060408501969096525050506060015292915050565b600181811c908216806200084a57607f821691505b6020821081036200086b57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a051615df3620008a560003960008181612fef015261471401526000818161370e01526146e50152615df36000f3fe6080604052600436106105395760003560e01c80637a9e1d03116102ad578063c87b56dd11610170578063dddb91ba116100d7578063efc4bc7c11610090578063efc4bc7c14610fd1578063f15c85b414610fe7578063f2fde38b14611007578063f3b3a9fa14611027578063f4c445691461103d578063f698da251461105d578063fa4d280c1461107357600080fd5b8063dddb91ba14610eef578063df20ad8f14610f0f578063dfe363ef14610f50578063e4f2487a14610f65578063e83d508b14610f91578063e985e9c514610fb157600080fd5b8063d2c1f20611610129578063d2c1f20614610e44578063d5abeb0114610e59578063d5b1ae5e14610e6f578063da0a985214610e9c578063da1b9e0814610eaf578063da324a3014610ecf57600080fd5b8063c87b56dd14610dbb578063c91621c214610ddb578063c9a8d9f714610df0578063ccc5d84714610e05578063d0b77ab414610e1a578063d1fe033d14610e2f57600080fd5b80639da0d7d411610214578063b88d4fde116101cd578063b88d4fde14610d0b578063ba1f879f14610d2b578063be008ccb14610d46578063c204642c14610d5b578063c32a50f914610d7b578063c67e8b6814610d9b57600080fd5b80639da0d7d414610c5d578063a22cb46514610c78578063a2fb7b5d14610c98578063aab4b09e14610cbf578063b6eb6d6914610cd5578063b78ef4cb14610cf557600080fd5b80639024fc96116102665780639024fc9614610bca57806390aa0b0f14610bdf578063933edbb814610bfa57806394985ddd14610c1357806395d89b4114610c335780639b154a7114610c4857600080fd5b80637a9e1d0314610b105780637bd07f8b14610b305780637d94792a14610b6a5780637ee7866114610b805780638708431314610b955780638da5cb5b14610bb557600080fd5b806333bc1c5c116104005780635626e404116103675780636e83843a116103205780636e83843a14610a5157806370a0823114610a71578063715018a614610a9157806373b19e8f14610aa6578063776451b014610abb578063791a251914610ad0578063792bce7014610af057600080fd5b80635626e404146109b05780635e9f9613146109d057806361728f39146109e55780636352211e146109fb57806366bb81c714610a1b5780636c635d3f14610a3157600080fd5b80634256dbe3116103b95780634256dbe31461090657806342842e0e14610926578063447321801461094657806349aaa5d91461095b5780634f6ccce71461097b57806354214f691461099b57600080fd5b806333bc1c5c146108615780633584602814610891578063398c0ec1146108a75780633a367a67146108bc5780633ccfd60b146108d15780633da65fc1146108e657600080fd5b806319165587116104a4578063276f1c411161045d578063276f1c41146107b65780632da5ea17146107d65780632ee723fb146107eb5780632f1d5a60146108015780632f745c591461082157806330878ba91461084157600080fd5b806319165587146107015780631bae492e146107215780631cbe14c91461074157806320510b55146107615780632316b4da1461078157806323b872dd1461079657600080fd5b80630f30cde0116104f65780630f30cde0146106285780631197705e1461063b578063127effb21461065b578063166ca2bc1461067b57806318160ddd146106ca5780631865c57d146106df57600080fd5b806301ffc9a71461053e57806302410f4714610573578063031ab9f51461059457806306fdde03146105b7578063081812fc146105d9578063095ea7b314610606575b600080fd5b34801561054a57600080fd5b5061055e6105593660046151ea565b6110a7565b60405190151581526020015b60405180910390f35b34801561057f57600080fd5b50600e5461055e90600160a01b900460ff1681565b3480156105a057600080fd5b506105a96110b8565b60405190815260200161056a565b3480156105c357600080fd5b506105cc61113e565b60405161056a919061525f565b3480156105e557600080fd5b506105f96105f4366004615272565b6111d0565b60405161056a919061528b565b34801561061257600080fd5b506106266106213660046152b4565b6111f7565b005b61055e610636366004615321565b611311565b34801561064757600080fd5b5061062661065636600461536c565b6117b1565b34801561066757600080fd5b50600d546105f9906001600160a01b031681565b34801561068757600080fd5b50601e54601f546020546021546022546106a2949392919085565b604080519586526020860194909452928401919091526060830152608082015260a00161056a565b3480156106d657600080fd5b50600a546105a9565b3480156106eb57600080fd5b506106f4611829565b60405161056a919061539f565b34801561070d57600080fd5b5061062661071c36600461536c565b611a8d565b34801561072d57600080fd5b50602c546105f9906001600160a01b031681565b34801561074d57600080fd5b5061062661075c3660046153b9565b611c6e565b34801561076d57600080fd5b5061062661077c36600461536c565b611ce0565b34801561078d57600080fd5b50610626611d54565b3480156107a257600080fd5b506106266107b13660046153db565b611db8565b3480156107c257600080fd5b50600e546105f9906001600160a01b031681565b3480156107e257600080fd5b5061055e611de9565b3480156107f757600080fd5b506105a9602b5481565b34801561080d57600080fd5b5061062661081c36600461536c565b611e36565b34801561082d57600080fd5b506105a961083c3660046152b4565b611eae565b34801561084d57600080fd5b506105cc61085c36600461541c565b611f44565b34801561086d57600080fd5b5060185460195461087c919082565b6040805192835260208301919091520161056a565b34801561089d57600080fd5b506105a960295481565b3480156108b357600080fd5b506105a961216e565b3480156108c857600080fd5b506105cc612249565b3480156108dd57600080fd5b506106266122d7565b3480156108f257600080fd5b5061055e61090136600461544e565b612361565b34801561091257600080fd5b50610626610921366004615272565b6123d9565b34801561093257600080fd5b506106266109413660046153db565b612438565b34801561095257600080fd5b50610626612453565b34801561096757600080fd5b50610626610976366004615272565b6124b2565b34801561098757600080fd5b506105a9610996366004615272565b612511565b3480156109a757600080fd5b5061055e6125a4565b3480156109bc57600080fd5b506106266109cb366004615272565b6125cb565b3480156109dc57600080fd5b506105a961262a565b3480156109f157600080fd5b506105a9600f5481565b348015610a0757600080fd5b506105f9610a16366004615272565b61263c565b348015610a2757600080fd5b506105a960105481565b348015610a3d57600080fd5b50610626610a4c366004615272565b612671565b348015610a5d57600080fd5b50610626610a6c36600461552c565b6126d0565b348015610a7d57600080fd5b506105a9610a8c36600461536c565b61273d565b348015610a9d57600080fd5b506106266127c3565b348015610ab257600080fd5b506105a96127d7565b348015610ac757600080fd5b506105a9612884565b348015610adc57600080fd5b50610626610aeb366004615272565b6128fc565b348015610afc57600080fd5b50610626610b0b366004615574565b61295b565b348015610b1c57600080fd5b5061055e610b2b36600461544e565b6129da565b348015610b3c57600080fd5b50601b54601c54601d54610b4f92919083565b6040805193845260208401929092529082015260600161056a565b348015610b7657600080fd5b506105a960115481565b348015610b8c57600080fd5b506105cc612a41565b348015610ba157600080fd5b50610626610bb03660046155a0565b612f54565b348015610bc157600080fd5b506105f9612fc3565b348015610bd657600080fd5b506105a9612fd2565b348015610beb57600080fd5b5060235460245461087c919082565b348015610c0657600080fd5b50601f54602b541461055e565b348015610c1f57600080fd5b50610626610c2e3660046153b9565b612fe4565b348015610c3f57600080fd5b506105cc61306a565b348015610c5457600080fd5b506105cc613079565b348015610c6957600080fd5b5060145460155461087c919082565b348015610c8457600080fd5b50610626610c933660046155fc565b613086565b348015610ca457600080fd5b50601a54610cb29060ff1681565b60405161056a9190615635565b348015610ccb57600080fd5b506105a960275481565b348015610ce157600080fd5b50610626610cf036600461536c565b613091565b348015610d0157600080fd5b506105a960285481565b348015610d1757600080fd5b50610626610d26366004615649565b613105565b348015610d3757600080fd5b5060165460175461087c919082565b348015610d5257600080fd5b5061062661313d565b348015610d6757600080fd5b50610626610d763660046156c8565b61319f565b348015610d8757600080fd5b50610626610d96366004615272565b613330565b348015610da757600080fd5b50610626610db63660046155a0565b6133f6565b348015610dc757600080fd5b506105cc610dd6366004615272565b613465565b348015610de757600080fd5b506105a9613593565b348015610dfc57600080fd5b506105a96135e9565b348015610e1157600080fd5b50610626613669565b348015610e2657600080fd5b5061055e61382a565b348015610e3b57600080fd5b5061062661383d565b348015610e5057600080fd5b506106266138a1565b348015610e6557600080fd5b506105a960255481565b348015610e7b57600080fd5b50610e8f610e8a36600461536c565b613905565b60405161056a919061577f565b61055e610eaa366004615321565b613991565b348015610ebb57600080fd5b50610626610eca36600461552c565b613b8f565b348015610edb57600080fd5b50610626610eea366004615272565b613c44565b348015610efb57600080fd5b50610626610f0a3660046155a0565b613ca3565b348015610f1b57600080fd5b50610f2f610f2a3660046152b4565b613d11565b604080516001600160801b03909316835260ff90911660208301520161056a565b348015610f5c57600080fd5b50610626613d54565b348015610f7157600080fd5b50601a54610f8490610100900460ff1681565b60405161056a91906157da565b348015610f9d57600080fd5b50610626610fac366004615272565b613db6565b348015610fbd57600080fd5b5061055e610fcc3660046157ee565b613e15565b348015610fdd57600080fd5b506105a9602a5481565b348015610ff357600080fd5b50602d546105f9906001600160a01b031681565b34801561101357600080fd5b5061062661102236600461536c565b613e43565b34801561103357600080fd5b506105a960265481565b34801561104957600080fd5b50610626611058366004615272565b613ebc565b34801561106957600080fd5b506105a9602e5481565b34801561107f57600080fd5b506105a97f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c981565b60006110b282613fa1565b92915050565b60006001601a54610100900460ff1660038111156110d8576110d8615389565b036110e4575060155490565b6002601a54610100900460ff16600381111561110257611102615389565b0361110e575060175490565b6003601a54610100900460ff16600381111561112c5761112c615389565b03611138575060195490565b50600090565b60606002805461114d9061581c565b80601f01602080910402602001604051908101604052809291908181526020018280546111799061581c565b80156111c65780601f1061119b576101008083540402835291602001916111c6565b820191906000526020600020905b8154815290600101906020018083116111a957829003601f168201915b5050505050905090565b60006111db82613fc6565b506000908152600660205260409020546001600160a01b031690565b60006112028261263c565b9050806001600160a01b0316836001600160a01b0316036112745760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061129057506112908133613e15565b6113025760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840161126b565b61130c8383613feb565b505050565b600061131b614059565b6000611325611829565b90503332146113465760405162461bcd60e51b815260040161126b90615856565b600881601181111561135a5761135a615389565b14806113775750600d81601181111561137557611375615389565b145b806113935750600381601181111561139157611391615389565b145b6113af5760405162461bcd60e51b815260040161126b90615888565b6113c16113ba61216e565b86906140b2565b3410156113e05760405162461bcd60e51b815260040161126b906158b5565b60038160118111156113f4576113f4615389565b036114725760235485111561141b5760405162461bcd60e51b815260040161126b906158e2565b602b54601f5461142b90876140be565b11156114725760405162461bcd60e51b8152602060048201526016602482015275283ab931b430b9b29032bc31b2b2b2103634b6b4ba1760511b604482015260640161126b565b600d81601181111561148657611486615389565b03611511576024548511156114ad5760405162461bcd60e51b815260040161126b906158e2565b6025546114ce6114bb61262a565b6114c8886114c8600a5490565b906140be565b11156115115760405162461bcd60e51b815260206004820152601260248201527122bc31b2b2b21036b0bc1039bab838363c9760711b604482015260640161126b565b600881601181111561152557611525615389565b03611627576115348484612361565b6115735760405162461bcd60e51b815260206004820152601060248201526f2737ba103bb434ba32b634b9ba32b21760811b604482015260640161126b565b60028511156115945760405162461bcd60e51b815260040161126b906158e2565b336000908152602f60205260409020546002906115b290879061592f565b11156115fa5760405162461bcd60e51b815260206004820152601760248201527622bc31b2b2b2103bb434ba32b634b9ba1038bab7ba309760491b604482015260640161126b565b602a54611609866114c8612fd2565b11156116275760405162461bcd60e51b815260040161126b90615947565b61163133866140ca565b50600381601181111561164657611646615389565b036116e257601f5461165890866140be565b601f5560006116673487614155565b33600090815260326020908152604080832081518083019092526001600160801b03808616835260ff808d1684860190815283546001810185559387529490952092519290910180549351909416600160801b026001600160881b03199093169116171790556029549091508110156116e05760298190555b505b600d8160118111156116f6576116f6615389565b0361170c5760225461170890866140be565b6022555b600881601181111561172057611720615389565b0361176157336000908152602f602052604090205461174090869061592f565b336000908152602f602052604090205560215461175d90866140be565b6021555b6031546040516001600160a01b03909116903480156108fc02916000818181858888f1935050505015801561179a573d6000803e3d6000fd5b5060019150506117aa6001600c55565b9392505050565b6117b9614161565b6001600160a01b0381166117df5760405162461bcd60e51b815260040161126b9061597e565b600e80546001600160a01b0319166001600160a01b0383169081179091556040517f5b92f2f101ec36b062768cd1330146da74961809b300919c88c6853ca703261590600090a250565b60006002601a5460ff16600281111561184457611844615389565b0361184f5750601190565b6001601a5460ff16600281111561186857611868615389565b036118735750601090565b6000601a54610100900460ff16600381111561189157611891615389565b0361189c5750600090565b6003601a54610100900460ff1660038111156118ba576118ba615389565b03611953576118c7611de9565b156118d25750600f90565b601954158015906118e4575060195443115b156118ef5750600e90565b6018541580159061190257506018544310155b1561190d5750600d90565b6018541580159061191f575060185443105b801561192c575060175443115b156119375750600c90565b601854158015611948575060175443115b156119535750600b90565b6002601a54610100900460ff16600381111561197157611971615389565b036119f15761197e61382a565b156119895750600a90565b6017541580159061199b575060175443115b156119a65750600990565b601654158015906119b957506016544310155b156119c45750600890565b601654158015906119d6575060165443105b156119e15750600790565b6016546000036119f15750600690565b6001601a54610100900460ff166003811115611a0f57611a0f615389565b0361113857601f54602b5403611a255750600590565b60155415801590611a37575060155443115b15611a425750600490565b60145415801590611a5557506014544310155b15611a605750600390565b60145415801590611a72575060145443105b15611a7d5750600290565b6014546000036111385750600190565b60315460405163673e156160e11b81526000916001600160a01b03169063ce7c2ac290611abe90339060040161528b565b602060405180830381865afa158015611adb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aff91906159a9565b1180611b1a575033611b0f612fc3565b6001600160a01b0316145b611b5e5760405162461bcd60e51b81526020600482015260156024820152743737ba1039b430b932b437b63232b917b7bbb732b960591b604482015260640161126b565b336001600160a01b0382161480611b8d5750611b78612fc3565b6001600160a01b0316336001600160a01b0316145b611bd25760405162461bcd60e51b81526020600482015260166024820152752932b632b0b9b29d103737903832b936b4b9b9b4b7b760511b604482015260640161126b565b603154604051631916558760e01b81526001600160a01b0390911690631916558790611c0290849060040161528b565b600060405180830381600087803b158015611c1c57600080fd5b505af1158015611c30573d6000803e3d6000fd5b505050507f7955210193a82a2c13259e4b48f1e8b90a4170115a1021fdae0570d045bba20581604051611c63919061528b565b60405180910390a150565b600d546001600160a01b03163314611c985760405162461bcd60e51b815260040161126b906159c2565b6023829055602481905560408051838152602081018390527f97720c97a8962cb9a18ee69ad344acb999cca0250317bc9b023bb6badad22e1391015b60405180910390a15050565b600d546001600160a01b03163314611d0a5760405162461bcd60e51b815260040161126b906159c2565b602c80546001600160a01b0319166001600160a01b0383169081179091556040517fb01190fe4bf51f48a33625333c07da1825c9f14d04cff4433b6e056c9dc2033a90600090a250565b600d546001600160a01b03163314611d7e5760405162461bcd60e51b815260040161126b906159c2565b601a805461ff0019166103001790556040517fca29b392f61fad3260f009b6fc1de9d8efda05563601b6c91396b795eeefff2e90600090a1565b611dc233826141c0565b611dde5760405162461bcd60e51b815260040161126b906159f2565b61130c83838361421e565b600080602654602554611dfc9190615a3f565b602154602054602254601f54939450600093611e18919061592f565b611e22919061592f565b611e2c919061592f565b9190911492915050565b611e3e614161565b6001600160a01b038116611e645760405162461bcd60e51b815260040161126b9061597e565b600d80546001600160a01b0319166001600160a01b0383169081179091556040517fa508d3b137dbcdf7e06f84833fe4aca137451e1e3309f454a207d8fb85c2ccd890600090a250565b6000611eb98361273d565b8210611f1b5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161126b565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b6060611f4e612fc3565b6001600160a01b0316336001600160a01b031614611fa95784831115611fa95760405162461bcd60e51b815260206004820152601060248201526f546f6b656e206e6f742065786973747360801b604482015260640161126b565b611fb16125a4565b611fd95750604080518082019091526007815266191959985d5b1d60ca1b6020820152612166565b6000611fe685600161592f565b6001600160401b03811115611ffd57611ffd61548f565b604051908082528060200260200182016040528015612026578160200160208202803683370190505b50905060015b858111612063578082828151811061204657612046615a56565b602090810291909101015261205c60018261592f565b905061202c565b50825b85811161213f576000866011548360405160200161208e929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6120b19190615a82565b6120bc90600161592f565b90508281815181106120d0576120d0615a56565b60200260200101518383815181106120ea576120ea615a56565b602002602001015184848151811061210457612104615a56565b6020026020010185848151811061211d5761211d615a56565b6020908102919091010191909152525061213860018261592f565b9050612066565b5061216281858151811061215557612155615a56565b602002602001015161438f565b9150505b949350505050565b600080612179611829565b9050600381601181111561218f5761218f615389565b036121ff576014546000906121a49043615a3f565b601d54601b549192506000916121c691906121c0908590614155565b906140b2565b601c546028549192506121d99190614421565b81106121ea575050601c5492915050565b6028546121f79082614421565b935050505090565b600881601181111561221357612213615389565b0361222057505060275490565b600d81601181111561223457612234615389565b0361224157505060285490565b505060285490565b601380546122569061581c565b80601f01602080910402602001604051908101604052809291908181526020018280546122829061581c565b80156122cf5780601f106122a4576101008083540402835291602001916122cf565b820191906000526020600020905b8154815290600101906020018083116122b257829003601f168201915b505050505081565b600d546001600160a01b031633146123015760405162461bcd60e51b815260040161126b906159c2565b6040514790339082156108fc029083906000818181858888f19350505050158015612330573d6000803e3d6000fd5b506040518181527f807631352cb3389b100202fae783b0b18fedc90bd3a438433796cb89462f4fad90602001611c63565b602c546000906001600160a01b03166123b25760405162461bcd60e51b815260206004820152601360248201527215d3081ad95e481b9bdd08185cdcda59db9959606a1b604482015260640161126b565b602c546001600160a01b03166123c8848461442d565b6001600160a01b0316149392505050565b600d546001600160a01b031633146124035760405162461bcd60e51b815260040161126b906159c2565b60268190556040518181527fe1fb8f58d0fe8f41debc65095588c6530f5b3c96964aee78a164712c7ab7cb3f90602001611c63565b61130c83838360405180602001604052806000815250613105565b600d546001600160a01b0316331461247d5760405162461bcd60e51b815260040161126b906159c2565b601a805460ff191690556040517f4f0f641a7e3d2c654d00279745eb7cf977b86891e3c7dd11cf315972d02089ce90600090a1565b600d546001600160a01b031633146124dc5760405162461bcd60e51b815260040161126b906159c2565b60278190556040518181527f8ea69d9e909b68c4f14f78ed645aa5bb6e5aaa632c8e2f365618f51f6e10373290602001611c63565b600061251c600a5490565b821061257f5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161126b565b600a828154811061259257612592615a56565b90600052602060002001549050919050565b6000806011541180156125b957506000601054115b80156125c6575060105443115b905090565b600d546001600160a01b031633146125f55760405162461bcd60e51b815260040161126b906159c2565b602a8190556040518181527fee53f3111b00616aa0a325f68aaf488d4433b7f00ea57bdfe5346fb08899c1aa90602001611c63565b601e546026546000916125c691615a3f565b6000818152600460205260408120546001600160a01b0316806110b25760405162461bcd60e51b815260040161126b90615a96565b600d546001600160a01b0316331461269b5760405162461bcd60e51b815260040161126b906159c2565b60298190556040518181527f98302d1de36f493ad21f68a7d43aada3c922bcde2576a9db30b75187321cabfc90602001611c63565b600d546001600160a01b031633146126fa5760405162461bcd60e51b815260040161126b906159c2565b805161270d90601290602084019061513b565b507fda0697149924c38db1462c9de1c03a46ce996f35d278fcf8dc4a76eb1065dc2e81604051611c63919061525f565b60006001600160a01b0382166127a75760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840161126b565b506001600160a01b031660009081526005602052604090205490565b6127cb614161565b6127d56000614501565b565b6000806127e2611829565b905060038160118111156127f8576127f8615389565b03612805575050602b5490565b600881601181111561281957612819615389565b03612826575050602a5490565b600d81601181111561283a5761283a615389565b0361287c57601f546026546021546020546025546128589190615a3f565b6128629190615a3f565b61286c9190615a3f565b6128769190615a3f565b91505090565b600091505090565b60008061288f611829565b905060088160118111156128a5576128a5615389565b036128ba57602154602054612876919061592f565b600d8160118111156128ce576128ce615389565b036128db57505060225490565b60038160118111156128ef576128ef615389565b0361287c575050601f5490565b600d546001600160a01b031633146129265760405162461bcd60e51b815260040161126b906159c2565b60288190556040518181527ff959ca468c08c9457955f238a0ad6a31fc63f09b1e9bbafb4e409f19163bbe1490602001611c63565b600d546001600160a01b031633146129855760405162461bcd60e51b815260040161126b906159c2565b601b839055601c829055601d81905560408051848152602081018490529081018290527f25712bfd18ae9c5dd63c26ade669b68a324cfbe3e863cdc207d2a06e9727d3929060600160405180910390a1505050565b602d546000906001600160a01b0316612a2b5760405162461bcd60e51b815260206004820152601360248201527213d1c81ad95e481b9bdd08185cdcda59db9959606a1b604482015260640161126b565b602d546001600160a01b03166123c8848461442d565b60606000612a4d611829565b90506001816011811115612a6357612a63615389565b03612aa157505060408051808201909152601e81527f447574636841756374696f6e4265666f7265576974686f7574426c6f636b0000602082015290565b6002816011811115612ab557612ab5615389565b03612af357505060408051808201909152601b81527f447574636841756374696f6e4265666f726557697468426c6f636b0000000000602082015290565b6003816011811115612b0757612b07615389565b03612b3a575050604080518082019091526012815271447574636841756374696f6e447572696e6760701b602082015290565b6004816011811115612b4e57612b4e615389565b03612b7e57505060408051808201909152600f81526e111d5d18da105d58dd1a5bdb915b99608a1b602082015290565b6005816011811115612b9257612b92615389565b03612bc9575050604080518082019091526016815275111d5d18da105d58dd1a5bdb915b9914dbdb1913dd5d60521b602082015290565b6006816011811115612bdd57612bdd615389565b03612c1b57505060408051808201909152601d81527f5072697661746553616c654265666f7265576974686f7574426c6f636b000000602082015290565b6007816011811115612c2f57612c2f615389565b03612c6d57505060408051808201909152601a81527f5072697661746553616c654265666f726557697468426c6f636b000000000000602082015290565b6008816011811115612c8157612c81615389565b03612cb35750506040805180820190915260118152705072697661746553616c65447572696e6760781b602082015290565b6009816011811115612cc757612cc7615389565b03612cf657505060408051808201909152600e81526d141c9a5d985d1954d85b19515b9960921b602082015290565b600a816011811115612d0a57612d0a615389565b03612d40575050604080518082019091526015815274141c9a5d985d1954d85b19515b9914dbdb1913dd5d605a1b602082015290565b600b816011811115612d5457612d54615389565b03612d9257505060408051808201909152601c81527f5075626c696353616c654265666f7265576974686f7574426c6f636b00000000602082015290565b600c816011811115612da657612da6615389565b03612de05750506040805180820190915260198152785075626c696353616c654265666f726557697468426c6f636b60381b602082015290565b600d816011811115612df457612df4615389565b03612e2557505060408051808201909152601081526f5075626c696353616c65447572696e6760801b602082015290565b600e816011811115612e3957612e39615389565b03612e6757505060408051808201909152600d81526c141d589b1a58d4d85b19515b99609a1b602082015290565b600f816011811115612e7b57612e7b615389565b03612eb0575050604080518082019091526014815273141d589b1a58d4d85b19515b9914dbdb1913dd5d60621b602082015290565b6010816011811115612ec457612ec4615389565b03612eee575050604080518082019091526009815268506175736553616c6560b81b602082015290565b6011816011811115612f0257612f02615389565b03612f2e57505060408051808201909152600b81526a105b1b14d85b195cd15b9960aa1b602082015290565b505060408051808201909152600a815269139bdd14dd185c9d195960b21b602082015290565b600d546001600160a01b03163314612f7e5760405162461bcd60e51b815260040161126b906159c2565b80516014819055602080830151601581905560408051938452918301527f46b9f9d83ded22a38ee2e31b09c026a8c683dd2e9060de026c383b15a655f4fd9101611c63565b6001546001600160a01b031690565b6020546021546000916125c69161592f565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461305c5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604482015260640161126b565b6130668282614553565b5050565b60606003805461114d9061581c565b601280546122569061581c565b6130663383836145e4565b600d546001600160a01b031633146130bb5760405162461bcd60e51b815260040161126b906159c2565b602d80546001600160a01b0319166001600160a01b0383169081179091556040517f14ac04b188e9f32c0e4b3ae39771c1c288169ca48b8bddc22be8bec64d12ba0a90600090a250565b61310f33836141c0565b61312b5760405162461bcd60e51b815260040161126b906159f2565b613137848484846146ae565b50505050565b600d546001600160a01b031633146131675760405162461bcd60e51b815260040161126b906159c2565b601a805460ff191660021790556040517f58abff1119ad7689f2843996246b31faf77e0a40545d5085ee99361a768a3f7d90600090a1565b6131a7614059565b600d546001600160a01b031633146131d15760405162461bcd60e51b815260040161126b906159c2565b60255482516131ec906131e490846140b2565b600a546114c8565b11156132355760405162461bcd60e51b815260206004820152601860248201527722bc31b2b2b21036b0bc1039bab838363c903634b6b4ba1760411b604482015260640161126b565b60265482516132519061324890846140b2565b601e54906140be565b11156132975760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103932b9b2b93b329760591b604482015260640161126b565b81516132a79061324890836140b2565b601e5560005b82518110156132ec576132d98382815181106132cb576132cb615a56565b6020026020010151836140ca565b50806132e481615ac8565b9150506132ad565b507f08b3e41950189550b73643a90143efc8a526a17dc07e6abe0fb50ce7c10b50fc828260405161331e929190615ae1565b60405180910390a16130666001600c55565b600d546001600160a01b0316331461335a5760405162461bcd60e51b815260040161126b906159c2565b601154156133a05760405162461bcd60e51b815260206004820152601360248201527229b2b2b210373ab6b132b91032bc34b9ba399760691b604482015260640161126b565b6011819055600e805460ff60a01b1916600160a01b17905560408051428152600060208201529081018290527f59e4c9bb1559d5420398abdcb1a7eb97cc4a7e27b2ae810b8d7f44fbc2327ffa90606001611c63565b600d546001600160a01b031633146134205760405162461bcd60e51b815260040161126b906159c2565b80516018819055602080830151601981905560408051938452918301527f70441bfeec4000206c01cb310438ec41bb281f98d8ea4f08f086e3329ff4eb299101611c63565b60606000821180156134795750600a548211155b6134b85760405162461bcd60e51b815260206004820152601060248201526f2a37b5b2b7103737ba1032bc34b9ba1760811b604482015260640161126b565b6134c06125a4565b61355457601380546134d19061581c565b80601f01602080910402602001604051908101604052809291908181526020018280546134fd9061581c565b801561354a5780601f1061351f5761010080835404028352916020019161354a565b820191906000526020600020905b81548152906001019060200180831161352d57829003601f168201915b50505050506110b2565b601261356d613562600a5490565b602554856001611f44565b60405160200161357e929190615b4e565b60405160208183030381529060405292915050565b6000600361359f611829565b60118111156135b0576135b0615389565b036135bc575060235490565b600d6135c6611829565b60118111156135d7576135d7615389565b036135e3575060245490565b50600290565b60006001601a54610100900460ff16600381111561360957613609615389565b03613615575060145490565b6002601a54610100900460ff16600381111561363357613633615389565b0361363f575060165490565b6003601a54610100900460ff16600381111561365d5761365d615389565b03611138575060185490565b600d546001600160a01b031633146136935760405162461bcd60e51b815260040161126b906159c2565b600e54600160a01b900460ff16156136ed5760405162461bcd60e51b815260206004820152601f60248201527f436861696e6c696e6b2056524620616c72656164792072657175657374656400604482015260640161126b565b6040516370a0823160e01b8152671bc16d674ec80000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319061374390309060040161528b565b602060405180830381865afa158015613760573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061378491906159a9565b10156137c65760405162461bcd60e51b8152602060048201526011602482015270496e73756666696369656e74204c494e4b60781b604482015260640161126b565b6137da600f54671bc16d674ec800006146e1565b50600e805460ff60a01b1916600160a01b1790556040517f8bcef1354992d6b49befbd8ce23b2578ce493191f74c32b543d2f177962a139f906138209042815260200190565b60405180910390a1565b6000602a54613837612fd2565b14905090565b600d546001600160a01b031633146138675760405162461bcd60e51b815260040161126b906159c2565b601a805461ff0019166101001790556040517f82e232fa1250b177b43a967e555410ac1c850806b01cac8363fe6e94e7edfd0190600090a1565b600d546001600160a01b031633146138cb5760405162461bcd60e51b815260040161126b906159c2565b601a805461ff0019166102001790556040517f0913c47876f976a46ce9674a2e5a22679ebf61b03b7a333913652272a9262c7790600090a1565b6001600160a01b0381166000908152603260209081526040808320805482518185028101850190935280835260609492939192909184015b8282101561398657600084815260209081902060408051808201909152908401546001600160801b0381168252600160801b900460ff168183015282526001909201910161393d565b505050509050919050565b600061399b614059565b3332146139ba5760405162461bcd60e51b815260040161126b90615856565b60086139c4611829565b60118111156139d5576139d5615389565b146139f25760405162461bcd60e51b815260040161126b90615888565b6139fc83836129da565b613a3e5760405162461bcd60e51b81526020600482015260136024820152722737ba1027a3903bb434ba32b634b9ba32b21760691b604482015260640161126b565b33600090815260306020526040902054600290613a5c9086906140be565b1115613a9f5760405162461bcd60e51b815260206004820152601260248201527122bc31b2b2b210183c27a39038bab7ba309760711b604482015260640161126b565b602a54613aae856114c8612fd2565b1115613acc5760405162461bcd60e51b815260040161126b90615947565b613ade613ad761216e565b85906140b2565b341015613afd5760405162461bcd60e51b815260040161126b906158b5565b33600090815260306020526040902054613b1890859061592f565b3360009081526030602090815260409091209190915554613b3990856140be565b602055613b4633856140ca565b506031546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015613b80573d6000803e3d6000fd5b50600190506117aa6001600c55565b600d546001600160a01b03163314613bb95760405162461bcd60e51b815260040161126b906159c2565b613bc16125a4565b15613c015760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481c995d99585b195960821b604482015260640161126b565b8051613c1490601390602084019061513b565b507fb0cb658f6a70918635661157bac90270b4184dff76f6b90dfebdad09e29ce5eb81604051611c63919061525f565b600d546001600160a01b03163314613c6e5760405162461bcd60e51b815260040161126b906159c2565b60108190556040518181527ffd1cd879b90803328042915a0dab567886d80637d84c7875df6a3e4495c379ac90602001611c63565b600d546001600160a01b03163314613ccd5760405162461bcd60e51b815260040161126b906159c2565b80516016819055602080830151601781905560408051938452918301527ea742ba61fbc2be98048a2bafed46ef5f837610c64f7a83e332b100f6aab0759101611c63565b60326020528160005260406000208181548110613d2d57600080fd5b6000918252602090912001546001600160801b0381169250600160801b900460ff16905082565b600d546001600160a01b03163314613d7e5760405162461bcd60e51b815260040161126b906159c2565b601a805460ff191660011790556040517f6d4e2212f1a4fcfebfe8fd91368752c56e02d80a28c18c5cce3d812cfcbcb4a790600090a1565b600d546001600160a01b03163314613de05760405162461bcd60e51b815260040161126b906159c2565b602b8190556040518181527febe3296c3cc674d6155214007876758ba86e54f6a760820db1bc6c3d2520523e90602001611c63565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b613e4b614161565b6001600160a01b038116613eb05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161126b565b613eb981614501565b50565b600d546001600160a01b03163314613ee65760405162461bcd60e51b815260040161126b906159c2565b602554811115613f385760405162461bcd60e51b815260206004820152601a60248201527f43616e6e6f7420696e637265617365206d617820737570706c79000000000000604482015260640161126b565b601e54602654600a54613f4b919061592f565b613f559190615a3f565b811015613f9c5760405162461bcd60e51b81526020600482015260156024820152744d617820737570706c7920697320746f6f206c6f7760581b604482015260640161126b565b602555565b60006001600160e01b0319821663780e9d6360e01b14806110b257506110b282614858565b613fcf816148a8565b613eb95760405162461bcd60e51b815260040161126b90615a96565b600081815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906140208261263c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6002600c54036140ab5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161126b565b6002600c55565b60006117aa8284615c08565b60006117aa828461592f565b6000805b8281101561414b5760006140e1600a5490565b905060255481101561413857614101856140fc83600161592f565b6148c5565b60405181906001600160a01b038716907fa512fb2532ca8587f236380171326ebb69670e86a2ba0c4412a3fcca4c3ada9b90600090a35b508061414381615ac8565b9150506140ce565b5060019392505050565b60006117aa8284615c27565b3361416a612fc3565b6001600160a01b0316146127d55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161126b565b6000806141cc8361263c565b9050806001600160a01b0316846001600160a01b031614806141f357506141f38185613e15565b806121665750836001600160a01b031661420c846111d0565b6001600160a01b031614949350505050565b826001600160a01b03166142318261263c565b6001600160a01b0316146142575760405162461bcd60e51b815260040161126b90615c3b565b6001600160a01b0382166142b95760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161126b565b6142c683838360016148df565b826001600160a01b03166142d98261263c565b6001600160a01b0316146142ff5760405162461bcd60e51b815260040161126b90615c3b565b600081815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260058552838620805460001901905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6060600061439c836148eb565b60010190506000816001600160401b038111156143bb576143bb61548f565b6040519080825280601f01601f1916602001820160405280156143e5576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846143ef57509392505050565b60006117aa8284615a3f565b602e54604080517f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c9602082015233918101919091526000918291606001604051602081830303815290604052805190602001206040516020016144a792919061190160f01b81526002810192909252602282015260420190565b60405160208183030381529060405280519060200120905061216684848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525085939250506149c39050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80156145a6576011546000036145a657601181905560408051428152602081018490529081018290527f59e4c9bb1559d5420398abdcb1a7eb97cc4a7e27b2ae810b8d7f44fbc2327ffa90606001611cd4565b60408051428152602081018490529081018290527f1c01baa2e4487f389547acd2b2396e5b8938b605d047d0559c4b855b5f82c81a90606001611cd4565b816001600160a01b0316836001600160a01b0316036146415760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b604482015260640161126b565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6146b984848461421e565b6146c5848484846149e7565b6131375760405162461bcd60e51b815260040161126b90615c80565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001614751929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161477e93929190615cd2565b6020604051808303816000875af115801561479d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906147c19190615cf9565b5060008381526020818152604080832054815180840188905280830185905230606082015260808082018390528351808303909101815260a09091019092528151918301919091208684529290915261481b90600161592f565b6000858152602081815260409182902092909255805180830187905280820184905281518082038301815260609091019091528051910120612166565b60006001600160e01b031982166380ac58cd60e01b148061488957506001600160e01b03198216635b5e139f60e01b145b806110b257506301ffc9a760e01b6001600160e01b03198316146110b2565b6000908152600460205260409020546001600160a01b0316151590565b613066828260405180602001604052806000815250614ae5565b61313784848484614b18565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061492a5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310614956576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061497457662386f26fc10000830492506010015b6305f5e100831061498c576305f5e100830492506008015b61271083106149a057612710830492506004015b606483106149b2576064830492506002015b600a83106110b25760010192915050565b60008060006149d28585614c4c565b915091506149df81614c91565b509392505050565b60006001600160a01b0384163b15614add57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614a2b903390899088908890600401615d16565b6020604051808303816000875af1925050508015614a66575060408051601f3d908101601f19168201909252614a6391810190615d53565b60015b614ac3573d808015614a94576040519150601f19603f3d011682016040523d82523d6000602084013e614a99565b606091505b508051600003614abb5760405162461bcd60e51b815260040161126b90615c80565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612166565b506001612166565b614aef8383614dd6565b614afc60008484846149e7565b61130c5760405162461bcd60e51b815260040161126b90615c80565b6001811115614b875760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b606482015260840161126b565b816001600160a01b038516614be357614bde81600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b614c06565b836001600160a01b0316856001600160a01b031614614c0657614c068582614ef1565b6001600160a01b038416614c2257614c1d81614f8e565b614c45565b846001600160a01b0316846001600160a01b031614614c4557614c45848261503d565b5050505050565b6000808251604103614c825760208301516040840151606085015160001a614c7687828585615081565b94509450505050614c8a565b506000905060025b9250929050565b6000816004811115614ca557614ca5615389565b03614cad5750565b6001816004811115614cc157614cc1615389565b03614d095760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b604482015260640161126b565b6002816004811115614d1d57614d1d615389565b03614d6a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161126b565b6003816004811115614d7e57614d7e615389565b03613eb95760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161126b565b6001600160a01b038216614e2c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161126b565b614e35816148a8565b15614e525760405162461bcd60e51b815260040161126b90615d70565b614e606000838360016148df565b614e69816148a8565b15614e865760405162461bcd60e51b815260040161126b90615d70565b6001600160a01b038216600081815260056020908152604080832080546001019055848352600490915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001614efe8461273d565b614f089190615a3f565b600083815260096020526040902054909150808214614f5b576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a54600090614fa090600190615a3f565b6000838152600b6020526040812054600a8054939450909284908110614fc857614fc8615a56565b9060005260206000200154905080600a8381548110614fe957614fe9615a56565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a80548061502157615021615da7565b6001900381819060005260206000200160009055905550505050565b60006150488361273d565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311156150ae5750600090506003615132565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015615102573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661512b57600060019250925050615132565b9150600090505b94509492505050565b8280546151479061581c565b90600052602060002090601f01602090048101928261516957600085556151af565b82601f1061518257805160ff19168380011785556151af565b828001600101855582156151af579182015b828111156151af578251825591602001919060010190615194565b506151bb9291506151bf565b5090565b5b808211156151bb57600081556001016151c0565b6001600160e01b031981168114613eb957600080fd5b6000602082840312156151fc57600080fd5b81356117aa816151d4565b60005b8381101561522257818101518382015260200161520a565b838111156131375750506000910152565b6000815180845261524b816020860160208601615207565b601f01601f19169290920160200192915050565b6020815260006117aa6020830184615233565b60006020828403121561528457600080fd5b5035919050565b6001600160a01b0391909116815260200190565b6001600160a01b0381168114613eb957600080fd5b600080604083850312156152c757600080fd5b82356152d28161529f565b946020939093013593505050565b60008083601f8401126152f257600080fd5b5081356001600160401b0381111561530957600080fd5b602083019150836020828501011115614c8a57600080fd5b60008060006040848603121561533657600080fd5b8335925060208401356001600160401b0381111561535357600080fd5b61535f868287016152e0565b9497909650939450505050565b60006020828403121561537e57600080fd5b81356117aa8161529f565b634e487b7160e01b600052602160045260246000fd5b60208101601283106153b3576153b3615389565b91905290565b600080604083850312156153cc57600080fd5b50508035926020909101359150565b6000806000606084860312156153f057600080fd5b83356153fb8161529f565b9250602084013561540b8161529f565b929592945050506040919091013590565b6000806000806080858703121561543257600080fd5b5050823594602084013594506040840135936060013592509050565b6000806020838503121561546157600080fd5b82356001600160401b0381111561547757600080fd5b615483858286016152e0565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156154cd576154cd61548f565b604052919050565b60006001600160401b038311156154ee576154ee61548f565b615501601f8401601f19166020016154a5565b905082815283838301111561551557600080fd5b828260208301376000602084830101529392505050565b60006020828403121561553e57600080fd5b81356001600160401b0381111561555457600080fd5b8201601f8101841361556557600080fd5b612166848235602084016154d5565b60008060006060848603121561558957600080fd5b505081359360208301359350604090920135919050565b6000604082840312156155b257600080fd5b604051604081018181106001600160401b03821117156155d4576155d461548f565b604052823581526020928301359281019290925250919050565b8015158114613eb957600080fd5b6000806040838503121561560f57600080fd5b823561561a8161529f565b9150602083013561562a816155ee565b809150509250929050565b60208101600383106153b3576153b3615389565b6000806000806080858703121561565f57600080fd5b843561566a8161529f565b9350602085013561567a8161529f565b92506040850135915060608501356001600160401b0381111561569c57600080fd5b8501601f810187136156ad57600080fd5b6156bc878235602084016154d5565b91505092959194509250565b600080604083850312156156db57600080fd5b82356001600160401b03808211156156f257600080fd5b818501915085601f83011261570657600080fd5b813560208282111561571a5761571a61548f565b8160051b925061572b8184016154a5565b828152928401810192818101908985111561574557600080fd5b948201945b8486101561576f578535935061575f8461529f565b838252948201949082019061574a565b9997909101359750505050505050565b602080825282518282018190526000919060409081850190868401855b828110156157cd57815180516001600160801b0316855286015160ff1686850152928401929085019060010161579c565b5091979650505050505050565b60208101600483106153b3576153b3615389565b6000806040838503121561580157600080fd5b823561580c8161529f565b9150602083013561562a8161529f565b600181811c9082168061583057607f821691505b60208210810361585057634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526018908201527721b7b73a3930b1ba1034b9903737ba1030b63637bbb2b21760411b604082015260600190565b60208082526013908201527229b0b632903737ba1030bb30b4b630b136329760691b604082015260600190565b60208082526013908201527224b739bab33334b1b4b2b73a10333ab732399760691b604082015260600190565b6020808252601a908201527f457863656564207472616e73616374696f6e206c696d6974732e000000000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561594257615942615919565b500190565b6020808252601a908201527f45786365656420707269766174652073616c65206c696d69742e000000000000604082015260600190565b602080825260119082015270043616e6e6f742061737369676e2030783607c1b604082015260600190565b6000602082840312156159bb57600080fd5b5051919050565b60208082526016908201527527b7363c9037b832b930ba37b91030b63637bbb2b21760511b604082015260600190565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b600082821015615a5157615a51615919565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082615a9157615a91615a6c565b500690565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b600060018201615ada57615ada615919565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015615b235781516001600160a01b031684529284019290840190600101615afe565b50505092019290925292915050565b60008151615b44818560208601615207565b9290920192915050565b600080845481600182811c915080831680615b6a57607f831692505b60208084108203615b8957634e487b7160e01b86526022600452602486fd5b818015615b9d5760018114615bae57615bdb565b60ff19861689528489019650615bdb565b60008b81526020902060005b86811015615bd35781548b820152908501908301615bba565b505084890196505b505050505050615bff615bee8286615b32565b64173539b7b760d91b815260050190565b95945050505050565b6000816000190483118215151615615c2257615c22615919565b500290565b600082615c3657615c36615a6c565b500490565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60018060a01b0384168152826020820152606060408201526000615bff6060830184615233565b600060208284031215615d0b57600080fd5b81516117aa816155ee565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615d4990830184615233565b9695505050505050565b600060208284031215615d6557600080fd5b81516117aa816151d4565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b634e487b7160e01b600052603160045260246000fdfea264697066735822122015f2880619df50bff4fa6ca118057fc5f408abe0f6767f76374ab76af3b7cbed64736f6c634300080e0033608060405260405162001386380380620013868339810160408190526200002691620004fc565b8251845114620000985760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000845111620000eb5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f2070617965657300000000000060448201526064016200008f565b81845111620001495760405162461bcd60e51b815260206004820152602360248201527f5061796d656e7453706c69747465723a20696e646578206f7574206f662072616044820152626e676560e81b60648201526084016200008f565b8382815181106200015e576200015e620005ea565b6020908102919091010151600780546001600160a01b0319166001600160a01b03909216919091179055600381905560005b8451811015620001f957620001e4858281518110620001b357620001b3620005ea565b6020026020010151858381518110620001d057620001d0620005ea565b60200260200101516200020460201b60201c565b80620001f08162000616565b91505062000190565b50505050506200064d565b6001600160a01b038216620002715760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b60648201526084016200008f565b60008111620002c35760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a2073686172657320617265203000000060448201526064016200008f565b6001600160a01b038216600090815260046020526040902054156200033f5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b60648201526084016200008f565b60068054600181019091557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b038416908117909155600090815260046020526040812082905554620003a790829062000632565b6000556007546001600160a01b03838116911614620003d45780600154620003d0919062000632565b6001555b604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200045b576200045b6200041a565b604052919050565b60006001600160401b038211156200047f576200047f6200041a565b5060051b60200190565b600082601f8301126200049b57600080fd5b81516020620004b4620004ae8362000463565b62000430565b82815260059290921b84018101918181019086841115620004d457600080fd5b8286015b84811015620004f15780518352918301918301620004d8565b509695505050505050565b600080600080608085870312156200051357600080fd5b84516001600160401b03808211156200052b57600080fd5b818701915087601f8301126200054057600080fd5b8151602062000553620004ae8362000463565b82815260059290921b8401810191818101908b8411156200057357600080fd5b948201945b83861015620005aa5785516001600160a01b03811681146200059a5760008081fd5b8252948201949082019062000578565b918a0151919850909350505080821115620005c457600080fd5b50620005d38782880162000489565b604087015160609097015195989097509350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016200062b576200062b62000600565b5060010190565b6000821982111562000648576200064862000600565b500190565b610d29806200065d6000396000f3fe60806040526004361061007a5760003560e01c806319165587146100bf5780633a98ef39146100e1578063406072a91461010557806348b75044146101255780638b83209b146101455780639852595c1461017d578063ce7c2ac2146101b3578063d79779b2146101e9578063e33b7de31461021f57600080fd5b366100ba577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033346040516100b0929190610a6c565b60405180910390a1005b600080fd5b3480156100cb57600080fd5b506100df6100da366004610a9d565b610234565b005b3480156100ed57600080fd5b506000545b6040519081526020015b60405180910390f35b34801561011157600080fd5b506100f2610120366004610aba565b610365565b34801561013157600080fd5b506100df610140366004610aba565b610390565b34801561015157600080fd5b50610165610160366004610af3565b610543565b6040516001600160a01b0390911681526020016100fc565b34801561018957600080fd5b506100f2610198366004610a9d565b6001600160a01b031660009081526005602052604090205490565b3480156101bf57600080fd5b506100f26101ce366004610a9d565b6001600160a01b031660009081526004602052604090205490565b3480156101f557600080fd5b506100f2610204366004610a9d565b6001600160a01b031660009081526008602052604090205490565b34801561022b57600080fd5b506002546100f2565b6001600160a01b0381166000908152600460205260409020546102725760405162461bcd60e51b815260040161026990610b0c565b60405180910390fd5b600061027d60025490565b6102879047610b68565b905060006102b483836102af866001600160a01b031660009081526005602052604090205490565b610573565b9050806000036102d65760405162461bcd60e51b815260040161026990610b80565b6001600160a01b038316600090815260056020526040812080548392906102fe908490610b68565b9250508190555080600260008282546103179190610b68565b909155506103279050838261069b565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0568382604051610358929190610a6c565b60405180910390a1505050565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205490565b6001600160a01b0381166000908152600460205260409020546103c55760405162461bcd60e51b815260040161026990610b0c565b6001600160a01b0382166000908152600860205260408120546040516370a0823160e01b81523060048201526001600160a01b038516906370a0823190602401602060405180830381865afa158015610422573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104469190610bcb565b6104509190610b68565b9050600061046383836102af8787610365565b9050806000036104855760405162461bcd60e51b815260040161026990610b80565b6001600160a01b038085166000908152600960209081526040808320938716835292905290812080548392906104bc908490610b68565b90915550506001600160a01b038416600090815260086020526040812080548392906104e9908490610b68565b909155506104fa90508484836107b9565b836001600160a01b03167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a8483604051610535929190610a6c565b60405180910390a250505050565b60006006828154811061055857610558610be4565b6000918252602090912001546001600160a01b031692915050565b600354600080546007546001600160a01b031682526004602052604082205491929161059f9086610bfa565b6105a99190610c19565b11156105f257600080546001600160a01b038616825260046020526040909120548391906105d79086610bfa565b6105e19190610c19565b6105eb9190610c3b565b9050610694565b6000600354841061060557600354610607565b835b6007549091506001600160a01b039081169086160361064d576007546001600160a01b03166000908152600560205260409020546106459082610c3b565b915050610694565b6001546001600160a01b0386166000908152600460205260409020548491906106768488610c3b565b6106809190610bfa565b61068a9190610c19565b6106459190610c3b565b9392505050565b804710156106eb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610269565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610738576040519150601f19603f3d011682016040523d82523d6000602084013e61073d565b606091505b50509050806107b45760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610269565b505050565b6107b48363a9059cbb60e01b84846040516024016107d8929190610a6c565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152600061085f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166108dc9092919063ffffffff16565b8051909150156107b4578080602001905181019061087d9190610c52565b6107b45760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610269565b60606108eb84846000856108f3565b949350505050565b6060824710156109545760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610269565b600080866001600160a01b031685876040516109709190610ca4565b60006040518083038185875af1925050503d80600081146109ad576040519150601f19603f3d011682016040523d82523d6000602084013e6109b2565b606091505b50915091506109c3878383876109ce565b979650505050505050565b60608315610a3d578251600003610a36576001600160a01b0385163b610a365760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610269565b50816108eb565b6108eb8383815115610a525781518083602001fd5b8060405162461bcd60e51b81526004016102699190610cc0565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0381168114610a9a57600080fd5b50565b600060208284031215610aaf57600080fd5b813561069481610a85565b60008060408385031215610acd57600080fd5b8235610ad881610a85565b91506020830135610ae881610a85565b809150509250929050565b600060208284031215610b0557600080fd5b5035919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115610b7b57610b7b610b52565b500190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b600060208284031215610bdd57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000816000190483118215151615610c1457610c14610b52565b500290565b600082610c3657634e487b7160e01b600052601260045260246000fd5b500490565b600082821015610c4d57610c4d610b52565b500390565b600060208284031215610c6457600080fd5b8151801515811461069457600080fd5b60005b83811015610c8f578181015183820152602001610c77565b83811115610c9e576000848401525b50505050565b60008251610cb6818460208701610c74565b9190910192915050565b6020815260008251806020840152610cdf816040850160208701610c74565b601f01601f1916919091016040019291505056fea26469706673582212205444a121c05914953303a4f19ca84fa06ae00513ed3c6a68bdbcbb60da55e68164736f6c634300080e003300000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000182600000000000000000000000000000000000000000000000000c3663566a5800000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af44500000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000009424c5555544f50494100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004424c555500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005468747470733a2f2f626c7575746f7069612e6d7970696e6174612e636c6f75642f697066732f516d506d35397a3475483755613751686363626650706969684d664d674d464a76775938423348326b574b445669000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002b5e3af16b188000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000009f0eaed13c91db1974c9457c7d601a23718f89f70000000000000000000000006b65534bf44b95cdb8a2777016348de6e2604ea800000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000017000000000000000000000000000000000000000000000000000000000000004d

Deployed Bytecode

0x6080604052600436106105395760003560e01c80637a9e1d03116102ad578063c87b56dd11610170578063dddb91ba116100d7578063efc4bc7c11610090578063efc4bc7c14610fd1578063f15c85b414610fe7578063f2fde38b14611007578063f3b3a9fa14611027578063f4c445691461103d578063f698da251461105d578063fa4d280c1461107357600080fd5b8063dddb91ba14610eef578063df20ad8f14610f0f578063dfe363ef14610f50578063e4f2487a14610f65578063e83d508b14610f91578063e985e9c514610fb157600080fd5b8063d2c1f20611610129578063d2c1f20614610e44578063d5abeb0114610e59578063d5b1ae5e14610e6f578063da0a985214610e9c578063da1b9e0814610eaf578063da324a3014610ecf57600080fd5b8063c87b56dd14610dbb578063c91621c214610ddb578063c9a8d9f714610df0578063ccc5d84714610e05578063d0b77ab414610e1a578063d1fe033d14610e2f57600080fd5b80639da0d7d411610214578063b88d4fde116101cd578063b88d4fde14610d0b578063ba1f879f14610d2b578063be008ccb14610d46578063c204642c14610d5b578063c32a50f914610d7b578063c67e8b6814610d9b57600080fd5b80639da0d7d414610c5d578063a22cb46514610c78578063a2fb7b5d14610c98578063aab4b09e14610cbf578063b6eb6d6914610cd5578063b78ef4cb14610cf557600080fd5b80639024fc96116102665780639024fc9614610bca57806390aa0b0f14610bdf578063933edbb814610bfa57806394985ddd14610c1357806395d89b4114610c335780639b154a7114610c4857600080fd5b80637a9e1d0314610b105780637bd07f8b14610b305780637d94792a14610b6a5780637ee7866114610b805780638708431314610b955780638da5cb5b14610bb557600080fd5b806333bc1c5c116104005780635626e404116103675780636e83843a116103205780636e83843a14610a5157806370a0823114610a71578063715018a614610a9157806373b19e8f14610aa6578063776451b014610abb578063791a251914610ad0578063792bce7014610af057600080fd5b80635626e404146109b05780635e9f9613146109d057806361728f39146109e55780636352211e146109fb57806366bb81c714610a1b5780636c635d3f14610a3157600080fd5b80634256dbe3116103b95780634256dbe31461090657806342842e0e14610926578063447321801461094657806349aaa5d91461095b5780634f6ccce71461097b57806354214f691461099b57600080fd5b806333bc1c5c146108615780633584602814610891578063398c0ec1146108a75780633a367a67146108bc5780633ccfd60b146108d15780633da65fc1146108e657600080fd5b806319165587116104a4578063276f1c411161045d578063276f1c41146107b65780632da5ea17146107d65780632ee723fb146107eb5780632f1d5a60146108015780632f745c591461082157806330878ba91461084157600080fd5b806319165587146107015780631bae492e146107215780631cbe14c91461074157806320510b55146107615780632316b4da1461078157806323b872dd1461079657600080fd5b80630f30cde0116104f65780630f30cde0146106285780631197705e1461063b578063127effb21461065b578063166ca2bc1461067b57806318160ddd146106ca5780631865c57d146106df57600080fd5b806301ffc9a71461053e57806302410f4714610573578063031ab9f51461059457806306fdde03146105b7578063081812fc146105d9578063095ea7b314610606575b600080fd5b34801561054a57600080fd5b5061055e6105593660046151ea565b6110a7565b60405190151581526020015b60405180910390f35b34801561057f57600080fd5b50600e5461055e90600160a01b900460ff1681565b3480156105a057600080fd5b506105a96110b8565b60405190815260200161056a565b3480156105c357600080fd5b506105cc61113e565b60405161056a919061525f565b3480156105e557600080fd5b506105f96105f4366004615272565b6111d0565b60405161056a919061528b565b34801561061257600080fd5b506106266106213660046152b4565b6111f7565b005b61055e610636366004615321565b611311565b34801561064757600080fd5b5061062661065636600461536c565b6117b1565b34801561066757600080fd5b50600d546105f9906001600160a01b031681565b34801561068757600080fd5b50601e54601f546020546021546022546106a2949392919085565b604080519586526020860194909452928401919091526060830152608082015260a00161056a565b3480156106d657600080fd5b50600a546105a9565b3480156106eb57600080fd5b506106f4611829565b60405161056a919061539f565b34801561070d57600080fd5b5061062661071c36600461536c565b611a8d565b34801561072d57600080fd5b50602c546105f9906001600160a01b031681565b34801561074d57600080fd5b5061062661075c3660046153b9565b611c6e565b34801561076d57600080fd5b5061062661077c36600461536c565b611ce0565b34801561078d57600080fd5b50610626611d54565b3480156107a257600080fd5b506106266107b13660046153db565b611db8565b3480156107c257600080fd5b50600e546105f9906001600160a01b031681565b3480156107e257600080fd5b5061055e611de9565b3480156107f757600080fd5b506105a9602b5481565b34801561080d57600080fd5b5061062661081c36600461536c565b611e36565b34801561082d57600080fd5b506105a961083c3660046152b4565b611eae565b34801561084d57600080fd5b506105cc61085c36600461541c565b611f44565b34801561086d57600080fd5b5060185460195461087c919082565b6040805192835260208301919091520161056a565b34801561089d57600080fd5b506105a960295481565b3480156108b357600080fd5b506105a961216e565b3480156108c857600080fd5b506105cc612249565b3480156108dd57600080fd5b506106266122d7565b3480156108f257600080fd5b5061055e61090136600461544e565b612361565b34801561091257600080fd5b50610626610921366004615272565b6123d9565b34801561093257600080fd5b506106266109413660046153db565b612438565b34801561095257600080fd5b50610626612453565b34801561096757600080fd5b50610626610976366004615272565b6124b2565b34801561098757600080fd5b506105a9610996366004615272565b612511565b3480156109a757600080fd5b5061055e6125a4565b3480156109bc57600080fd5b506106266109cb366004615272565b6125cb565b3480156109dc57600080fd5b506105a961262a565b3480156109f157600080fd5b506105a9600f5481565b348015610a0757600080fd5b506105f9610a16366004615272565b61263c565b348015610a2757600080fd5b506105a960105481565b348015610a3d57600080fd5b50610626610a4c366004615272565b612671565b348015610a5d57600080fd5b50610626610a6c36600461552c565b6126d0565b348015610a7d57600080fd5b506105a9610a8c36600461536c565b61273d565b348015610a9d57600080fd5b506106266127c3565b348015610ab257600080fd5b506105a96127d7565b348015610ac757600080fd5b506105a9612884565b348015610adc57600080fd5b50610626610aeb366004615272565b6128fc565b348015610afc57600080fd5b50610626610b0b366004615574565b61295b565b348015610b1c57600080fd5b5061055e610b2b36600461544e565b6129da565b348015610b3c57600080fd5b50601b54601c54601d54610b4f92919083565b6040805193845260208401929092529082015260600161056a565b348015610b7657600080fd5b506105a960115481565b348015610b8c57600080fd5b506105cc612a41565b348015610ba157600080fd5b50610626610bb03660046155a0565b612f54565b348015610bc157600080fd5b506105f9612fc3565b348015610bd657600080fd5b506105a9612fd2565b348015610beb57600080fd5b5060235460245461087c919082565b348015610c0657600080fd5b50601f54602b541461055e565b348015610c1f57600080fd5b50610626610c2e3660046153b9565b612fe4565b348015610c3f57600080fd5b506105cc61306a565b348015610c5457600080fd5b506105cc613079565b348015610c6957600080fd5b5060145460155461087c919082565b348015610c8457600080fd5b50610626610c933660046155fc565b613086565b348015610ca457600080fd5b50601a54610cb29060ff1681565b60405161056a9190615635565b348015610ccb57600080fd5b506105a960275481565b348015610ce157600080fd5b50610626610cf036600461536c565b613091565b348015610d0157600080fd5b506105a960285481565b348015610d1757600080fd5b50610626610d26366004615649565b613105565b348015610d3757600080fd5b5060165460175461087c919082565b348015610d5257600080fd5b5061062661313d565b348015610d6757600080fd5b50610626610d763660046156c8565b61319f565b348015610d8757600080fd5b50610626610d96366004615272565b613330565b348015610da757600080fd5b50610626610db63660046155a0565b6133f6565b348015610dc757600080fd5b506105cc610dd6366004615272565b613465565b348015610de757600080fd5b506105a9613593565b348015610dfc57600080fd5b506105a96135e9565b348015610e1157600080fd5b50610626613669565b348015610e2657600080fd5b5061055e61382a565b348015610e3b57600080fd5b5061062661383d565b348015610e5057600080fd5b506106266138a1565b348015610e6557600080fd5b506105a960255481565b348015610e7b57600080fd5b50610e8f610e8a36600461536c565b613905565b60405161056a919061577f565b61055e610eaa366004615321565b613991565b348015610ebb57600080fd5b50610626610eca36600461552c565b613b8f565b348015610edb57600080fd5b50610626610eea366004615272565b613c44565b348015610efb57600080fd5b50610626610f0a3660046155a0565b613ca3565b348015610f1b57600080fd5b50610f2f610f2a3660046152b4565b613d11565b604080516001600160801b03909316835260ff90911660208301520161056a565b348015610f5c57600080fd5b50610626613d54565b348015610f7157600080fd5b50601a54610f8490610100900460ff1681565b60405161056a91906157da565b348015610f9d57600080fd5b50610626610fac366004615272565b613db6565b348015610fbd57600080fd5b5061055e610fcc3660046157ee565b613e15565b348015610fdd57600080fd5b506105a9602a5481565b348015610ff357600080fd5b50602d546105f9906001600160a01b031681565b34801561101357600080fd5b5061062661102236600461536c565b613e43565b34801561103357600080fd5b506105a960265481565b34801561104957600080fd5b50610626611058366004615272565b613ebc565b34801561106957600080fd5b506105a9602e5481565b34801561107f57600080fd5b506105a97f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c981565b60006110b282613fa1565b92915050565b60006001601a54610100900460ff1660038111156110d8576110d8615389565b036110e4575060155490565b6002601a54610100900460ff16600381111561110257611102615389565b0361110e575060175490565b6003601a54610100900460ff16600381111561112c5761112c615389565b03611138575060195490565b50600090565b60606002805461114d9061581c565b80601f01602080910402602001604051908101604052809291908181526020018280546111799061581c565b80156111c65780601f1061119b576101008083540402835291602001916111c6565b820191906000526020600020905b8154815290600101906020018083116111a957829003601f168201915b5050505050905090565b60006111db82613fc6565b506000908152600660205260409020546001600160a01b031690565b60006112028261263c565b9050806001600160a01b0316836001600160a01b0316036112745760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061129057506112908133613e15565b6113025760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840161126b565b61130c8383613feb565b505050565b600061131b614059565b6000611325611829565b90503332146113465760405162461bcd60e51b815260040161126b90615856565b600881601181111561135a5761135a615389565b14806113775750600d81601181111561137557611375615389565b145b806113935750600381601181111561139157611391615389565b145b6113af5760405162461bcd60e51b815260040161126b90615888565b6113c16113ba61216e565b86906140b2565b3410156113e05760405162461bcd60e51b815260040161126b906158b5565b60038160118111156113f4576113f4615389565b036114725760235485111561141b5760405162461bcd60e51b815260040161126b906158e2565b602b54601f5461142b90876140be565b11156114725760405162461bcd60e51b8152602060048201526016602482015275283ab931b430b9b29032bc31b2b2b2103634b6b4ba1760511b604482015260640161126b565b600d81601181111561148657611486615389565b03611511576024548511156114ad5760405162461bcd60e51b815260040161126b906158e2565b6025546114ce6114bb61262a565b6114c8886114c8600a5490565b906140be565b11156115115760405162461bcd60e51b815260206004820152601260248201527122bc31b2b2b21036b0bc1039bab838363c9760711b604482015260640161126b565b600881601181111561152557611525615389565b03611627576115348484612361565b6115735760405162461bcd60e51b815260206004820152601060248201526f2737ba103bb434ba32b634b9ba32b21760811b604482015260640161126b565b60028511156115945760405162461bcd60e51b815260040161126b906158e2565b336000908152602f60205260409020546002906115b290879061592f565b11156115fa5760405162461bcd60e51b815260206004820152601760248201527622bc31b2b2b2103bb434ba32b634b9ba1038bab7ba309760491b604482015260640161126b565b602a54611609866114c8612fd2565b11156116275760405162461bcd60e51b815260040161126b90615947565b61163133866140ca565b50600381601181111561164657611646615389565b036116e257601f5461165890866140be565b601f5560006116673487614155565b33600090815260326020908152604080832081518083019092526001600160801b03808616835260ff808d1684860190815283546001810185559387529490952092519290910180549351909416600160801b026001600160881b03199093169116171790556029549091508110156116e05760298190555b505b600d8160118111156116f6576116f6615389565b0361170c5760225461170890866140be565b6022555b600881601181111561172057611720615389565b0361176157336000908152602f602052604090205461174090869061592f565b336000908152602f602052604090205560215461175d90866140be565b6021555b6031546040516001600160a01b03909116903480156108fc02916000818181858888f1935050505015801561179a573d6000803e3d6000fd5b5060019150506117aa6001600c55565b9392505050565b6117b9614161565b6001600160a01b0381166117df5760405162461bcd60e51b815260040161126b9061597e565b600e80546001600160a01b0319166001600160a01b0383169081179091556040517f5b92f2f101ec36b062768cd1330146da74961809b300919c88c6853ca703261590600090a250565b60006002601a5460ff16600281111561184457611844615389565b0361184f5750601190565b6001601a5460ff16600281111561186857611868615389565b036118735750601090565b6000601a54610100900460ff16600381111561189157611891615389565b0361189c5750600090565b6003601a54610100900460ff1660038111156118ba576118ba615389565b03611953576118c7611de9565b156118d25750600f90565b601954158015906118e4575060195443115b156118ef5750600e90565b6018541580159061190257506018544310155b1561190d5750600d90565b6018541580159061191f575060185443105b801561192c575060175443115b156119375750600c90565b601854158015611948575060175443115b156119535750600b90565b6002601a54610100900460ff16600381111561197157611971615389565b036119f15761197e61382a565b156119895750600a90565b6017541580159061199b575060175443115b156119a65750600990565b601654158015906119b957506016544310155b156119c45750600890565b601654158015906119d6575060165443105b156119e15750600790565b6016546000036119f15750600690565b6001601a54610100900460ff166003811115611a0f57611a0f615389565b0361113857601f54602b5403611a255750600590565b60155415801590611a37575060155443115b15611a425750600490565b60145415801590611a5557506014544310155b15611a605750600390565b60145415801590611a72575060145443105b15611a7d5750600290565b6014546000036111385750600190565b60315460405163673e156160e11b81526000916001600160a01b03169063ce7c2ac290611abe90339060040161528b565b602060405180830381865afa158015611adb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aff91906159a9565b1180611b1a575033611b0f612fc3565b6001600160a01b0316145b611b5e5760405162461bcd60e51b81526020600482015260156024820152743737ba1039b430b932b437b63232b917b7bbb732b960591b604482015260640161126b565b336001600160a01b0382161480611b8d5750611b78612fc3565b6001600160a01b0316336001600160a01b0316145b611bd25760405162461bcd60e51b81526020600482015260166024820152752932b632b0b9b29d103737903832b936b4b9b9b4b7b760511b604482015260640161126b565b603154604051631916558760e01b81526001600160a01b0390911690631916558790611c0290849060040161528b565b600060405180830381600087803b158015611c1c57600080fd5b505af1158015611c30573d6000803e3d6000fd5b505050507f7955210193a82a2c13259e4b48f1e8b90a4170115a1021fdae0570d045bba20581604051611c63919061528b565b60405180910390a150565b600d546001600160a01b03163314611c985760405162461bcd60e51b815260040161126b906159c2565b6023829055602481905560408051838152602081018390527f97720c97a8962cb9a18ee69ad344acb999cca0250317bc9b023bb6badad22e1391015b60405180910390a15050565b600d546001600160a01b03163314611d0a5760405162461bcd60e51b815260040161126b906159c2565b602c80546001600160a01b0319166001600160a01b0383169081179091556040517fb01190fe4bf51f48a33625333c07da1825c9f14d04cff4433b6e056c9dc2033a90600090a250565b600d546001600160a01b03163314611d7e5760405162461bcd60e51b815260040161126b906159c2565b601a805461ff0019166103001790556040517fca29b392f61fad3260f009b6fc1de9d8efda05563601b6c91396b795eeefff2e90600090a1565b611dc233826141c0565b611dde5760405162461bcd60e51b815260040161126b906159f2565b61130c83838361421e565b600080602654602554611dfc9190615a3f565b602154602054602254601f54939450600093611e18919061592f565b611e22919061592f565b611e2c919061592f565b9190911492915050565b611e3e614161565b6001600160a01b038116611e645760405162461bcd60e51b815260040161126b9061597e565b600d80546001600160a01b0319166001600160a01b0383169081179091556040517fa508d3b137dbcdf7e06f84833fe4aca137451e1e3309f454a207d8fb85c2ccd890600090a250565b6000611eb98361273d565b8210611f1b5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161126b565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b6060611f4e612fc3565b6001600160a01b0316336001600160a01b031614611fa95784831115611fa95760405162461bcd60e51b815260206004820152601060248201526f546f6b656e206e6f742065786973747360801b604482015260640161126b565b611fb16125a4565b611fd95750604080518082019091526007815266191959985d5b1d60ca1b6020820152612166565b6000611fe685600161592f565b6001600160401b03811115611ffd57611ffd61548f565b604051908082528060200260200182016040528015612026578160200160208202803683370190505b50905060015b858111612063578082828151811061204657612046615a56565b602090810291909101015261205c60018261592f565b905061202c565b50825b85811161213f576000866011548360405160200161208e929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6120b19190615a82565b6120bc90600161592f565b90508281815181106120d0576120d0615a56565b60200260200101518383815181106120ea576120ea615a56565b602002602001015184848151811061210457612104615a56565b6020026020010185848151811061211d5761211d615a56565b6020908102919091010191909152525061213860018261592f565b9050612066565b5061216281858151811061215557612155615a56565b602002602001015161438f565b9150505b949350505050565b600080612179611829565b9050600381601181111561218f5761218f615389565b036121ff576014546000906121a49043615a3f565b601d54601b549192506000916121c691906121c0908590614155565b906140b2565b601c546028549192506121d99190614421565b81106121ea575050601c5492915050565b6028546121f79082614421565b935050505090565b600881601181111561221357612213615389565b0361222057505060275490565b600d81601181111561223457612234615389565b0361224157505060285490565b505060285490565b601380546122569061581c565b80601f01602080910402602001604051908101604052809291908181526020018280546122829061581c565b80156122cf5780601f106122a4576101008083540402835291602001916122cf565b820191906000526020600020905b8154815290600101906020018083116122b257829003601f168201915b505050505081565b600d546001600160a01b031633146123015760405162461bcd60e51b815260040161126b906159c2565b6040514790339082156108fc029083906000818181858888f19350505050158015612330573d6000803e3d6000fd5b506040518181527f807631352cb3389b100202fae783b0b18fedc90bd3a438433796cb89462f4fad90602001611c63565b602c546000906001600160a01b03166123b25760405162461bcd60e51b815260206004820152601360248201527215d3081ad95e481b9bdd08185cdcda59db9959606a1b604482015260640161126b565b602c546001600160a01b03166123c8848461442d565b6001600160a01b0316149392505050565b600d546001600160a01b031633146124035760405162461bcd60e51b815260040161126b906159c2565b60268190556040518181527fe1fb8f58d0fe8f41debc65095588c6530f5b3c96964aee78a164712c7ab7cb3f90602001611c63565b61130c83838360405180602001604052806000815250613105565b600d546001600160a01b0316331461247d5760405162461bcd60e51b815260040161126b906159c2565b601a805460ff191690556040517f4f0f641a7e3d2c654d00279745eb7cf977b86891e3c7dd11cf315972d02089ce90600090a1565b600d546001600160a01b031633146124dc5760405162461bcd60e51b815260040161126b906159c2565b60278190556040518181527f8ea69d9e909b68c4f14f78ed645aa5bb6e5aaa632c8e2f365618f51f6e10373290602001611c63565b600061251c600a5490565b821061257f5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161126b565b600a828154811061259257612592615a56565b90600052602060002001549050919050565b6000806011541180156125b957506000601054115b80156125c6575060105443115b905090565b600d546001600160a01b031633146125f55760405162461bcd60e51b815260040161126b906159c2565b602a8190556040518181527fee53f3111b00616aa0a325f68aaf488d4433b7f00ea57bdfe5346fb08899c1aa90602001611c63565b601e546026546000916125c691615a3f565b6000818152600460205260408120546001600160a01b0316806110b25760405162461bcd60e51b815260040161126b90615a96565b600d546001600160a01b0316331461269b5760405162461bcd60e51b815260040161126b906159c2565b60298190556040518181527f98302d1de36f493ad21f68a7d43aada3c922bcde2576a9db30b75187321cabfc90602001611c63565b600d546001600160a01b031633146126fa5760405162461bcd60e51b815260040161126b906159c2565b805161270d90601290602084019061513b565b507fda0697149924c38db1462c9de1c03a46ce996f35d278fcf8dc4a76eb1065dc2e81604051611c63919061525f565b60006001600160a01b0382166127a75760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840161126b565b506001600160a01b031660009081526005602052604090205490565b6127cb614161565b6127d56000614501565b565b6000806127e2611829565b905060038160118111156127f8576127f8615389565b03612805575050602b5490565b600881601181111561281957612819615389565b03612826575050602a5490565b600d81601181111561283a5761283a615389565b0361287c57601f546026546021546020546025546128589190615a3f565b6128629190615a3f565b61286c9190615a3f565b6128769190615a3f565b91505090565b600091505090565b60008061288f611829565b905060088160118111156128a5576128a5615389565b036128ba57602154602054612876919061592f565b600d8160118111156128ce576128ce615389565b036128db57505060225490565b60038160118111156128ef576128ef615389565b0361287c575050601f5490565b600d546001600160a01b031633146129265760405162461bcd60e51b815260040161126b906159c2565b60288190556040518181527ff959ca468c08c9457955f238a0ad6a31fc63f09b1e9bbafb4e409f19163bbe1490602001611c63565b600d546001600160a01b031633146129855760405162461bcd60e51b815260040161126b906159c2565b601b839055601c829055601d81905560408051848152602081018490529081018290527f25712bfd18ae9c5dd63c26ade669b68a324cfbe3e863cdc207d2a06e9727d3929060600160405180910390a1505050565b602d546000906001600160a01b0316612a2b5760405162461bcd60e51b815260206004820152601360248201527213d1c81ad95e481b9bdd08185cdcda59db9959606a1b604482015260640161126b565b602d546001600160a01b03166123c8848461442d565b60606000612a4d611829565b90506001816011811115612a6357612a63615389565b03612aa157505060408051808201909152601e81527f447574636841756374696f6e4265666f7265576974686f7574426c6f636b0000602082015290565b6002816011811115612ab557612ab5615389565b03612af357505060408051808201909152601b81527f447574636841756374696f6e4265666f726557697468426c6f636b0000000000602082015290565b6003816011811115612b0757612b07615389565b03612b3a575050604080518082019091526012815271447574636841756374696f6e447572696e6760701b602082015290565b6004816011811115612b4e57612b4e615389565b03612b7e57505060408051808201909152600f81526e111d5d18da105d58dd1a5bdb915b99608a1b602082015290565b6005816011811115612b9257612b92615389565b03612bc9575050604080518082019091526016815275111d5d18da105d58dd1a5bdb915b9914dbdb1913dd5d60521b602082015290565b6006816011811115612bdd57612bdd615389565b03612c1b57505060408051808201909152601d81527f5072697661746553616c654265666f7265576974686f7574426c6f636b000000602082015290565b6007816011811115612c2f57612c2f615389565b03612c6d57505060408051808201909152601a81527f5072697661746553616c654265666f726557697468426c6f636b000000000000602082015290565b6008816011811115612c8157612c81615389565b03612cb35750506040805180820190915260118152705072697661746553616c65447572696e6760781b602082015290565b6009816011811115612cc757612cc7615389565b03612cf657505060408051808201909152600e81526d141c9a5d985d1954d85b19515b9960921b602082015290565b600a816011811115612d0a57612d0a615389565b03612d40575050604080518082019091526015815274141c9a5d985d1954d85b19515b9914dbdb1913dd5d605a1b602082015290565b600b816011811115612d5457612d54615389565b03612d9257505060408051808201909152601c81527f5075626c696353616c654265666f7265576974686f7574426c6f636b00000000602082015290565b600c816011811115612da657612da6615389565b03612de05750506040805180820190915260198152785075626c696353616c654265666f726557697468426c6f636b60381b602082015290565b600d816011811115612df457612df4615389565b03612e2557505060408051808201909152601081526f5075626c696353616c65447572696e6760801b602082015290565b600e816011811115612e3957612e39615389565b03612e6757505060408051808201909152600d81526c141d589b1a58d4d85b19515b99609a1b602082015290565b600f816011811115612e7b57612e7b615389565b03612eb0575050604080518082019091526014815273141d589b1a58d4d85b19515b9914dbdb1913dd5d60621b602082015290565b6010816011811115612ec457612ec4615389565b03612eee575050604080518082019091526009815268506175736553616c6560b81b602082015290565b6011816011811115612f0257612f02615389565b03612f2e57505060408051808201909152600b81526a105b1b14d85b195cd15b9960aa1b602082015290565b505060408051808201909152600a815269139bdd14dd185c9d195960b21b602082015290565b600d546001600160a01b03163314612f7e5760405162461bcd60e51b815260040161126b906159c2565b80516014819055602080830151601581905560408051938452918301527f46b9f9d83ded22a38ee2e31b09c026a8c683dd2e9060de026c383b15a655f4fd9101611c63565b6001546001600160a01b031690565b6020546021546000916125c69161592f565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952161461305c5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604482015260640161126b565b6130668282614553565b5050565b60606003805461114d9061581c565b601280546122569061581c565b6130663383836145e4565b600d546001600160a01b031633146130bb5760405162461bcd60e51b815260040161126b906159c2565b602d80546001600160a01b0319166001600160a01b0383169081179091556040517f14ac04b188e9f32c0e4b3ae39771c1c288169ca48b8bddc22be8bec64d12ba0a90600090a250565b61310f33836141c0565b61312b5760405162461bcd60e51b815260040161126b906159f2565b613137848484846146ae565b50505050565b600d546001600160a01b031633146131675760405162461bcd60e51b815260040161126b906159c2565b601a805460ff191660021790556040517f58abff1119ad7689f2843996246b31faf77e0a40545d5085ee99361a768a3f7d90600090a1565b6131a7614059565b600d546001600160a01b031633146131d15760405162461bcd60e51b815260040161126b906159c2565b60255482516131ec906131e490846140b2565b600a546114c8565b11156132355760405162461bcd60e51b815260206004820152601860248201527722bc31b2b2b21036b0bc1039bab838363c903634b6b4ba1760411b604482015260640161126b565b60265482516132519061324890846140b2565b601e54906140be565b11156132975760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103932b9b2b93b329760591b604482015260640161126b565b81516132a79061324890836140b2565b601e5560005b82518110156132ec576132d98382815181106132cb576132cb615a56565b6020026020010151836140ca565b50806132e481615ac8565b9150506132ad565b507f08b3e41950189550b73643a90143efc8a526a17dc07e6abe0fb50ce7c10b50fc828260405161331e929190615ae1565b60405180910390a16130666001600c55565b600d546001600160a01b0316331461335a5760405162461bcd60e51b815260040161126b906159c2565b601154156133a05760405162461bcd60e51b815260206004820152601360248201527229b2b2b210373ab6b132b91032bc34b9ba399760691b604482015260640161126b565b6011819055600e805460ff60a01b1916600160a01b17905560408051428152600060208201529081018290527f59e4c9bb1559d5420398abdcb1a7eb97cc4a7e27b2ae810b8d7f44fbc2327ffa90606001611c63565b600d546001600160a01b031633146134205760405162461bcd60e51b815260040161126b906159c2565b80516018819055602080830151601981905560408051938452918301527f70441bfeec4000206c01cb310438ec41bb281f98d8ea4f08f086e3329ff4eb299101611c63565b60606000821180156134795750600a548211155b6134b85760405162461bcd60e51b815260206004820152601060248201526f2a37b5b2b7103737ba1032bc34b9ba1760811b604482015260640161126b565b6134c06125a4565b61355457601380546134d19061581c565b80601f01602080910402602001604051908101604052809291908181526020018280546134fd9061581c565b801561354a5780601f1061351f5761010080835404028352916020019161354a565b820191906000526020600020905b81548152906001019060200180831161352d57829003601f168201915b50505050506110b2565b601261356d613562600a5490565b602554856001611f44565b60405160200161357e929190615b4e565b60405160208183030381529060405292915050565b6000600361359f611829565b60118111156135b0576135b0615389565b036135bc575060235490565b600d6135c6611829565b60118111156135d7576135d7615389565b036135e3575060245490565b50600290565b60006001601a54610100900460ff16600381111561360957613609615389565b03613615575060145490565b6002601a54610100900460ff16600381111561363357613633615389565b0361363f575060165490565b6003601a54610100900460ff16600381111561365d5761365d615389565b03611138575060185490565b600d546001600160a01b031633146136935760405162461bcd60e51b815260040161126b906159c2565b600e54600160a01b900460ff16156136ed5760405162461bcd60e51b815260206004820152601f60248201527f436861696e6c696e6b2056524620616c72656164792072657175657374656400604482015260640161126b565b6040516370a0823160e01b8152671bc16d674ec80000906001600160a01b037f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca16906370a082319061374390309060040161528b565b602060405180830381865afa158015613760573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061378491906159a9565b10156137c65760405162461bcd60e51b8152602060048201526011602482015270496e73756666696369656e74204c494e4b60781b604482015260640161126b565b6137da600f54671bc16d674ec800006146e1565b50600e805460ff60a01b1916600160a01b1790556040517f8bcef1354992d6b49befbd8ce23b2578ce493191f74c32b543d2f177962a139f906138209042815260200190565b60405180910390a1565b6000602a54613837612fd2565b14905090565b600d546001600160a01b031633146138675760405162461bcd60e51b815260040161126b906159c2565b601a805461ff0019166101001790556040517f82e232fa1250b177b43a967e555410ac1c850806b01cac8363fe6e94e7edfd0190600090a1565b600d546001600160a01b031633146138cb5760405162461bcd60e51b815260040161126b906159c2565b601a805461ff0019166102001790556040517f0913c47876f976a46ce9674a2e5a22679ebf61b03b7a333913652272a9262c7790600090a1565b6001600160a01b0381166000908152603260209081526040808320805482518185028101850190935280835260609492939192909184015b8282101561398657600084815260209081902060408051808201909152908401546001600160801b0381168252600160801b900460ff168183015282526001909201910161393d565b505050509050919050565b600061399b614059565b3332146139ba5760405162461bcd60e51b815260040161126b90615856565b60086139c4611829565b60118111156139d5576139d5615389565b146139f25760405162461bcd60e51b815260040161126b90615888565b6139fc83836129da565b613a3e5760405162461bcd60e51b81526020600482015260136024820152722737ba1027a3903bb434ba32b634b9ba32b21760691b604482015260640161126b565b33600090815260306020526040902054600290613a5c9086906140be565b1115613a9f5760405162461bcd60e51b815260206004820152601260248201527122bc31b2b2b210183c27a39038bab7ba309760711b604482015260640161126b565b602a54613aae856114c8612fd2565b1115613acc5760405162461bcd60e51b815260040161126b90615947565b613ade613ad761216e565b85906140b2565b341015613afd5760405162461bcd60e51b815260040161126b906158b5565b33600090815260306020526040902054613b1890859061592f565b3360009081526030602090815260409091209190915554613b3990856140be565b602055613b4633856140ca565b506031546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015613b80573d6000803e3d6000fd5b50600190506117aa6001600c55565b600d546001600160a01b03163314613bb95760405162461bcd60e51b815260040161126b906159c2565b613bc16125a4565b15613c015760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481c995d99585b195960821b604482015260640161126b565b8051613c1490601390602084019061513b565b507fb0cb658f6a70918635661157bac90270b4184dff76f6b90dfebdad09e29ce5eb81604051611c63919061525f565b600d546001600160a01b03163314613c6e5760405162461bcd60e51b815260040161126b906159c2565b60108190556040518181527ffd1cd879b90803328042915a0dab567886d80637d84c7875df6a3e4495c379ac90602001611c63565b600d546001600160a01b03163314613ccd5760405162461bcd60e51b815260040161126b906159c2565b80516016819055602080830151601781905560408051938452918301527ea742ba61fbc2be98048a2bafed46ef5f837610c64f7a83e332b100f6aab0759101611c63565b60326020528160005260406000208181548110613d2d57600080fd5b6000918252602090912001546001600160801b0381169250600160801b900460ff16905082565b600d546001600160a01b03163314613d7e5760405162461bcd60e51b815260040161126b906159c2565b601a805460ff191660011790556040517f6d4e2212f1a4fcfebfe8fd91368752c56e02d80a28c18c5cce3d812cfcbcb4a790600090a1565b600d546001600160a01b03163314613de05760405162461bcd60e51b815260040161126b906159c2565b602b8190556040518181527febe3296c3cc674d6155214007876758ba86e54f6a760820db1bc6c3d2520523e90602001611c63565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b613e4b614161565b6001600160a01b038116613eb05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161126b565b613eb981614501565b50565b600d546001600160a01b03163314613ee65760405162461bcd60e51b815260040161126b906159c2565b602554811115613f385760405162461bcd60e51b815260206004820152601a60248201527f43616e6e6f7420696e637265617365206d617820737570706c79000000000000604482015260640161126b565b601e54602654600a54613f4b919061592f565b613f559190615a3f565b811015613f9c5760405162461bcd60e51b81526020600482015260156024820152744d617820737570706c7920697320746f6f206c6f7760581b604482015260640161126b565b602555565b60006001600160e01b0319821663780e9d6360e01b14806110b257506110b282614858565b613fcf816148a8565b613eb95760405162461bcd60e51b815260040161126b90615a96565b600081815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906140208261263c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6002600c54036140ab5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161126b565b6002600c55565b60006117aa8284615c08565b60006117aa828461592f565b6000805b8281101561414b5760006140e1600a5490565b905060255481101561413857614101856140fc83600161592f565b6148c5565b60405181906001600160a01b038716907fa512fb2532ca8587f236380171326ebb69670e86a2ba0c4412a3fcca4c3ada9b90600090a35b508061414381615ac8565b9150506140ce565b5060019392505050565b60006117aa8284615c27565b3361416a612fc3565b6001600160a01b0316146127d55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161126b565b6000806141cc8361263c565b9050806001600160a01b0316846001600160a01b031614806141f357506141f38185613e15565b806121665750836001600160a01b031661420c846111d0565b6001600160a01b031614949350505050565b826001600160a01b03166142318261263c565b6001600160a01b0316146142575760405162461bcd60e51b815260040161126b90615c3b565b6001600160a01b0382166142b95760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161126b565b6142c683838360016148df565b826001600160a01b03166142d98261263c565b6001600160a01b0316146142ff5760405162461bcd60e51b815260040161126b90615c3b565b600081815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260058552838620805460001901905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6060600061439c836148eb565b60010190506000816001600160401b038111156143bb576143bb61548f565b6040519080825280601f01601f1916602001820160405280156143e5576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846143ef57509392505050565b60006117aa8284615a3f565b602e54604080517f68e83002b91b0fd96d4df3566b5122221117e3ec6c2468fda594f6491f89b1c9602082015233918101919091526000918291606001604051602081830303815290604052805190602001206040516020016144a792919061190160f01b81526002810192909252602282015260420190565b60405160208183030381529060405280519060200120905061216684848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525085939250506149c39050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80156145a6576011546000036145a657601181905560408051428152602081018490529081018290527f59e4c9bb1559d5420398abdcb1a7eb97cc4a7e27b2ae810b8d7f44fbc2327ffa90606001611cd4565b60408051428152602081018490529081018290527f1c01baa2e4487f389547acd2b2396e5b8938b605d047d0559c4b855b5f82c81a90606001611cd4565b816001600160a01b0316836001600160a01b0316036146415760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b604482015260640161126b565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6146b984848461421e565b6146c5848484846149e7565b6131375760405162461bcd60e51b815260040161126b90615c80565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795284866000604051602001614751929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161477e93929190615cd2565b6020604051808303816000875af115801561479d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906147c19190615cf9565b5060008381526020818152604080832054815180840188905280830185905230606082015260808082018390528351808303909101815260a09091019092528151918301919091208684529290915261481b90600161592f565b6000858152602081815260409182902092909255805180830187905280820184905281518082038301815260609091019091528051910120612166565b60006001600160e01b031982166380ac58cd60e01b148061488957506001600160e01b03198216635b5e139f60e01b145b806110b257506301ffc9a760e01b6001600160e01b03198316146110b2565b6000908152600460205260409020546001600160a01b0316151590565b613066828260405180602001604052806000815250614ae5565b61313784848484614b18565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061492a5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310614956576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061497457662386f26fc10000830492506010015b6305f5e100831061498c576305f5e100830492506008015b61271083106149a057612710830492506004015b606483106149b2576064830492506002015b600a83106110b25760010192915050565b60008060006149d28585614c4c565b915091506149df81614c91565b509392505050565b60006001600160a01b0384163b15614add57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614a2b903390899088908890600401615d16565b6020604051808303816000875af1925050508015614a66575060408051601f3d908101601f19168201909252614a6391810190615d53565b60015b614ac3573d808015614a94576040519150601f19603f3d011682016040523d82523d6000602084013e614a99565b606091505b508051600003614abb5760405162461bcd60e51b815260040161126b90615c80565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612166565b506001612166565b614aef8383614dd6565b614afc60008484846149e7565b61130c5760405162461bcd60e51b815260040161126b90615c80565b6001811115614b875760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b606482015260840161126b565b816001600160a01b038516614be357614bde81600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b614c06565b836001600160a01b0316856001600160a01b031614614c0657614c068582614ef1565b6001600160a01b038416614c2257614c1d81614f8e565b614c45565b846001600160a01b0316846001600160a01b031614614c4557614c45848261503d565b5050505050565b6000808251604103614c825760208301516040840151606085015160001a614c7687828585615081565b94509450505050614c8a565b506000905060025b9250929050565b6000816004811115614ca557614ca5615389565b03614cad5750565b6001816004811115614cc157614cc1615389565b03614d095760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b604482015260640161126b565b6002816004811115614d1d57614d1d615389565b03614d6a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161126b565b6003816004811115614d7e57614d7e615389565b03613eb95760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161126b565b6001600160a01b038216614e2c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161126b565b614e35816148a8565b15614e525760405162461bcd60e51b815260040161126b90615d70565b614e606000838360016148df565b614e69816148a8565b15614e865760405162461bcd60e51b815260040161126b90615d70565b6001600160a01b038216600081815260056020908152604080832080546001019055848352600490915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001614efe8461273d565b614f089190615a3f565b600083815260096020526040902054909150808214614f5b576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a54600090614fa090600190615a3f565b6000838152600b6020526040812054600a8054939450909284908110614fc857614fc8615a56565b9060005260206000200154905080600a8381548110614fe957614fe9615a56565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a80548061502157615021615da7565b6001900381819060005260206000200160009055905550505050565b60006150488361273d565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311156150ae5750600090506003615132565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015615102573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661512b57600060019250925050615132565b9150600090505b94509492505050565b8280546151479061581c565b90600052602060002090601f01602090048101928261516957600085556151af565b82601f1061518257805160ff19168380011785556151af565b828001600101855582156151af579182015b828111156151af578251825591602001919060010190615194565b506151bb9291506151bf565b5090565b5b808211156151bb57600081556001016151c0565b6001600160e01b031981168114613eb957600080fd5b6000602082840312156151fc57600080fd5b81356117aa816151d4565b60005b8381101561522257818101518382015260200161520a565b838111156131375750506000910152565b6000815180845261524b816020860160208601615207565b601f01601f19169290920160200192915050565b6020815260006117aa6020830184615233565b60006020828403121561528457600080fd5b5035919050565b6001600160a01b0391909116815260200190565b6001600160a01b0381168114613eb957600080fd5b600080604083850312156152c757600080fd5b82356152d28161529f565b946020939093013593505050565b60008083601f8401126152f257600080fd5b5081356001600160401b0381111561530957600080fd5b602083019150836020828501011115614c8a57600080fd5b60008060006040848603121561533657600080fd5b8335925060208401356001600160401b0381111561535357600080fd5b61535f868287016152e0565b9497909650939450505050565b60006020828403121561537e57600080fd5b81356117aa8161529f565b634e487b7160e01b600052602160045260246000fd5b60208101601283106153b3576153b3615389565b91905290565b600080604083850312156153cc57600080fd5b50508035926020909101359150565b6000806000606084860312156153f057600080fd5b83356153fb8161529f565b9250602084013561540b8161529f565b929592945050506040919091013590565b6000806000806080858703121561543257600080fd5b5050823594602084013594506040840135936060013592509050565b6000806020838503121561546157600080fd5b82356001600160401b0381111561547757600080fd5b615483858286016152e0565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156154cd576154cd61548f565b604052919050565b60006001600160401b038311156154ee576154ee61548f565b615501601f8401601f19166020016154a5565b905082815283838301111561551557600080fd5b828260208301376000602084830101529392505050565b60006020828403121561553e57600080fd5b81356001600160401b0381111561555457600080fd5b8201601f8101841361556557600080fd5b612166848235602084016154d5565b60008060006060848603121561558957600080fd5b505081359360208301359350604090920135919050565b6000604082840312156155b257600080fd5b604051604081018181106001600160401b03821117156155d4576155d461548f565b604052823581526020928301359281019290925250919050565b8015158114613eb957600080fd5b6000806040838503121561560f57600080fd5b823561561a8161529f565b9150602083013561562a816155ee565b809150509250929050565b60208101600383106153b3576153b3615389565b6000806000806080858703121561565f57600080fd5b843561566a8161529f565b9350602085013561567a8161529f565b92506040850135915060608501356001600160401b0381111561569c57600080fd5b8501601f810187136156ad57600080fd5b6156bc878235602084016154d5565b91505092959194509250565b600080604083850312156156db57600080fd5b82356001600160401b03808211156156f257600080fd5b818501915085601f83011261570657600080fd5b813560208282111561571a5761571a61548f565b8160051b925061572b8184016154a5565b828152928401810192818101908985111561574557600080fd5b948201945b8486101561576f578535935061575f8461529f565b838252948201949082019061574a565b9997909101359750505050505050565b602080825282518282018190526000919060409081850190868401855b828110156157cd57815180516001600160801b0316855286015160ff1686850152928401929085019060010161579c565b5091979650505050505050565b60208101600483106153b3576153b3615389565b6000806040838503121561580157600080fd5b823561580c8161529f565b9150602083013561562a8161529f565b600181811c9082168061583057607f821691505b60208210810361585057634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526018908201527721b7b73a3930b1ba1034b9903737ba1030b63637bbb2b21760411b604082015260600190565b60208082526013908201527229b0b632903737ba1030bb30b4b630b136329760691b604082015260600190565b60208082526013908201527224b739bab33334b1b4b2b73a10333ab732399760691b604082015260600190565b6020808252601a908201527f457863656564207472616e73616374696f6e206c696d6974732e000000000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561594257615942615919565b500190565b6020808252601a908201527f45786365656420707269766174652073616c65206c696d69742e000000000000604082015260600190565b602080825260119082015270043616e6e6f742061737369676e2030783607c1b604082015260600190565b6000602082840312156159bb57600080fd5b5051919050565b60208082526016908201527527b7363c9037b832b930ba37b91030b63637bbb2b21760511b604082015260600190565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b600082821015615a5157615a51615919565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601260045260246000fd5b600082615a9157615a91615a6c565b500690565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b600060018201615ada57615ada615919565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015615b235781516001600160a01b031684529284019290840190600101615afe565b50505092019290925292915050565b60008151615b44818560208601615207565b9290920192915050565b600080845481600182811c915080831680615b6a57607f831692505b60208084108203615b8957634e487b7160e01b86526022600452602486fd5b818015615b9d5760018114615bae57615bdb565b60ff19861689528489019650615bdb565b60008b81526020902060005b86811015615bd35781548b820152908501908301615bba565b505084890196505b505050505050615bff615bee8286615b32565b64173539b7b760d91b815260050190565b95945050505050565b6000816000190483118215151615615c2257615c22615919565b500290565b600082615c3657615c36615a6c565b500490565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60018060a01b0384168152826020820152606060408201526000615bff6060830184615233565b600060208284031215615d0b57600080fd5b81516117aa816155ee565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615d4990830184615233565b9695505050505050565b600060208284031215615d6557600080fd5b81516117aa816151d4565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b634e487b7160e01b600052603160045260246000fdfea264697066735822122015f2880619df50bff4fa6ca118057fc5f408abe0f6767f76374ab76af3b7cbed64736f6c634300080e0033

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

00000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000182600000000000000000000000000000000000000000000000000c3663566a5800000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af44500000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000009424c5555544f50494100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004424c555500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005468747470733a2f2f626c7575746f7069612e6d7970696e6174612e636c6f75642f697066732f516d506d35397a3475483755613751686363626650706969684d664d674d464a76775938423348326b574b445669000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002b5e3af16b188000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000009f0eaed13c91db1974c9457c7d601a23718f89f70000000000000000000000006b65534bf44b95cdb8a2777016348de6e2604ea800000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000017000000000000000000000000000000000000000000000000000000000000004d

-----Decoded View---------------
Arg [0] : _tokenName (string): BLUUTOPIA
Arg [1] : _symbol (string): BLUU
Arg [2] : _maxSupply (uint256): 6182
Arg [3] : _startPrice (uint256): 55000000000000000
Arg [4] : _defaultURI (string): https://bluutopia.mypinata.cloud/ipfs/QmPm59z4uH7Ua7QhccbfPpiihMfMgMFJvwY8B3H2kWKDVi
Arg [5] : chainLinkParams (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [6] : revenueShare (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
27 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [2] : 0000000000000000000000000000000000000000000000000000000000001826
Arg [3] : 00000000000000000000000000000000000000000000000000c3663566a58000
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [5] : 000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952
Arg [6] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [7] : aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000220
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [10] : 424c5555544f5049410000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [12] : 424c555500000000000000000000000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000054
Arg [14] : 68747470733a2f2f626c7575746f7069612e6d7970696e6174612e636c6f7564
Arg [15] : 2f697066732f516d506d35397a3475483755613751686363626650706969684d
Arg [16] : 664d674d464a76775938423348326b574b445669000000000000000000000000
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [18] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [20] : 000000000000000000000000000000000000000000000002b5e3af16b1880000
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [22] : 0000000000000000000000009f0eaed13c91db1974c9457c7d601a23718f89f7
Arg [23] : 0000000000000000000000006b65534bf44b95cdb8a2777016348de6e2604ea8
Arg [24] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [25] : 0000000000000000000000000000000000000000000000000000000000000017
Arg [26] : 000000000000000000000000000000000000000000000000000000000000004d


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

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