ETH Price: $3,099.10 (+0.51%)
Gas: 5 Gwei

Token

CryptoHomiesGenesis (CHG)
 

Overview

Max Total Supply

1,998 CHG

Holders

352

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
18 CHG
0x8dd39fb001b60631e1ee59fa9b52fae55817fede
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:
CryptoHomiesGenesis

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 27 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

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

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

File 2 of 27 : PaymentSplitter.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (finance/PaymentSplitter.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/utils/SafeERC20.sol";
import "../utils/Address.sol";
import "../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. The distribution of shares is set at the
 * time of contract deployment and can't be updated thereafter.
 *
 * `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 PaymentSplitter 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 _totalReleased;

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

    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_) payable {
        require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
        require(payees.length > 0, "PaymentSplitter: no payees");

        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 Getter for the amount of payee's releasable Ether.
     */
    function releasable(address account) public view returns (uint256) {
        uint256 totalReceived = address(this).balance + totalReleased();
        return _pendingPayment(account, totalReceived, released(account));
    }

    /**
     * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an
     * IERC20 contract.
     */
    function releasable(IERC20 token, address account) public view returns (uint256) {
        uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);
        return _pendingPayment(account, totalReceived, released(token, account));
    }

    /**
     * @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 payment = releasable(account);

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

        // _totalReleased is the sum of all values in _released.
        // If "_totalReleased += payment" does not overflow, then "_released[account] += payment" cannot overflow.
        _totalReleased += payment;
        unchecked {
            _released[account] += 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 payment = releasable(token, account);

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

        // _erc20TotalReleased[token] is the sum of all values in _erc20Released[token].
        // If "_erc20TotalReleased[token] += payment" does not overflow, then "_erc20Released[token][account] += payment"
        // cannot overflow.
        _erc20TotalReleased[token] += payment;
        unchecked {
            _erc20Released[token][account] += 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) {
        return (totalReceived * _shares[account]) / _totalShares - 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_;
        emit PayeeAdded(account, shares_);
    }
}

File 3 of 27 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

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

File 4 of 27 : IERC5267.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol)

pragma solidity ^0.8.0;

interface IERC5267 {
    /**
     * @dev MAY be emitted to signal that the domain could have changed.
     */
    event EIP712DomainChanged();

    /**
     * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
     * signature.
     */
    function eip712Domain()
        external
        view
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        );
}

File 5 of 27 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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 6 of 27 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/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 7 of 27 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/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;

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    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));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    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");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to
     * 0 before setting it to a non-zero value.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    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");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation 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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

File 8 of 27 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (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 9 of 27 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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 10 of 27 : 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 11 of 27 : 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 12 of 27 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [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://consensys.net/diligence/blog/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.8.0/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 13 of 27 : 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 14 of 27 : ShortStrings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol)

pragma solidity ^0.8.8;

import "./StorageSlot.sol";

// | string  | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA   |
// | length  | 0x                                                              BB |
type ShortString is bytes32;

/**
 * @dev This library provides functions to convert short memory strings
 * into a `ShortString` type that can be used as an immutable variable.
 *
 * Strings of arbitrary length can be optimized using this library if
 * they are short enough (up to 31 bytes) by packing them with their
 * length (1 byte) in a single EVM word (32 bytes). Additionally, a
 * fallback mechanism can be used for every other case.
 *
 * Usage example:
 *
 * ```solidity
 * contract Named {
 *     using ShortStrings for *;
 *
 *     ShortString private immutable _name;
 *     string private _nameFallback;
 *
 *     constructor(string memory contractName) {
 *         _name = contractName.toShortStringWithFallback(_nameFallback);
 *     }
 *
 *     function name() external view returns (string memory) {
 *         return _name.toStringWithFallback(_nameFallback);
 *     }
 * }
 * ```
 */
library ShortStrings {
    // Used as an identifier for strings longer than 31 bytes.
    bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;

    error StringTooLong(string str);
    error InvalidShortString();

    /**
     * @dev Encode a string of at most 31 chars into a `ShortString`.
     *
     * This will trigger a `StringTooLong` error is the input string is too long.
     */
    function toShortString(string memory str) internal pure returns (ShortString) {
        bytes memory bstr = bytes(str);
        if (bstr.length > 31) {
            revert StringTooLong(str);
        }
        return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));
    }

    /**
     * @dev Decode a `ShortString` back to a "normal" string.
     */
    function toString(ShortString sstr) internal pure returns (string memory) {
        uint256 len = byteLength(sstr);
        // using `new string(len)` would work locally but is not memory safe.
        string memory str = new string(32);
        /// @solidity memory-safe-assembly
        assembly {
            mstore(str, len)
            mstore(add(str, 0x20), sstr)
        }
        return str;
    }

    /**
     * @dev Return the length of a `ShortString`.
     */
    function byteLength(ShortString sstr) internal pure returns (uint256) {
        uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;
        if (result > 31) {
            revert InvalidShortString();
        }
        return result;
    }

    /**
     * @dev Encode a string into a `ShortString`, or write it to storage if it is too long.
     */
    function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {
        if (bytes(value).length < 32) {
            return toShortString(value);
        } else {
            StorageSlot.getStringSlot(store).value = value;
            return ShortString.wrap(_FALLBACK_SENTINEL);
        }
    }

    /**
     * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
     */
    function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {
        if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) {
            return toString(value);
        } else {
            return store;
        }
    }

    /**
     * @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
     *
     * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of
     * actual characters as the UTF-8 encoding of a single character can span over multiple bytes.
     */
    function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {
        if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) {
            return byteLength(value);
        } else {
            return bytes(store).length;
        }
    }
}

File 15 of 27 : StorageSlot.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```solidity
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._
 * _Available since v4.9 for `string`, `bytes`._
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` with member `value` located at `slot`.
     */
    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.
     */
    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` with member `value` located at `slot`.
     */
    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
     */
    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }
}

File 16 of 27 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.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 `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

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

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 17 of 27 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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 message) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, "\x19Ethereum Signed Message:\n32")
            mstore(0x1c, hash)
            message := keccak256(0x00, 0x3c)
        }
    }

    /**
     * @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 data) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, "\x19\x01")
            mstore(add(ptr, 0x02), domainSeparator)
            mstore(add(ptr, 0x22), structHash)
            data := keccak256(ptr, 0x42)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Data with intended validator, created from a
     * `validator` and `data` according to the version 0 of EIP-191.
     *
     * See {recover}.
     */
    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x00", validator, data));
    }
}

File 18 of 27 : EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol)

pragma solidity ^0.8.8;

import "./ECDSA.sol";
import "../ShortStrings.sol";
import "../../interfaces/IERC5267.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
 * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the
 * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
 *
 * _Available since v3.4._
 *
 * @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
 */
abstract contract EIP712 is IERC5267 {
    using ShortStrings for *;

    bytes32 private constant _TYPE_HASH =
        keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");

    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _cachedDomainSeparator;
    uint256 private immutable _cachedChainId;
    address private immutable _cachedThis;

    bytes32 private immutable _hashedName;
    bytes32 private immutable _hashedVersion;

    ShortString private immutable _name;
    ShortString private immutable _version;
    string private _nameFallback;
    string private _versionFallback;

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        _name = name.toShortStringWithFallback(_nameFallback);
        _version = version.toShortStringWithFallback(_versionFallback);
        _hashedName = keccak256(bytes(name));
        _hashedVersion = keccak256(bytes(version));

        _cachedChainId = block.chainid;
        _cachedDomainSeparator = _buildDomainSeparator();
        _cachedThis = address(this);
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _cachedThis && block.chainid == _cachedChainId) {
            return _cachedDomainSeparator;
        } else {
            return _buildDomainSeparator();
        }
    }

    function _buildDomainSeparator() private view returns (bytes32) {
        return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }

    /**
     * @dev See {EIP-5267}.
     *
     * _Available since v4.9._
     */
    function eip712Domain()
        public
        view
        virtual
        override
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        )
    {
        return (
            hex"0f", // 01111
            _name.toStringWithFallback(_nameFallback),
            _version.toStringWithFallback(_versionFallback),
            block.chainid,
            address(this),
            bytes32(0),
            new uint256[](0)
        );
    }
}

File 19 of 27 : draft-EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)

pragma solidity ^0.8.0;

// EIP-712 is Final as of 2022-08-11. This file is deprecated.

import "./EIP712.sol";

File 20 of 27 : 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 21 of 27 : 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 22 of 27 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 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 256, 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 << 3) < value ? 1 : 0);
        }
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

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

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 24 of 27 : CommonERC721.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

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

import "./IERC2981.sol";

contract CommonERC721 is ERC721, Ownable, IERC2981 {
    uint16 internal tokenIdCount;

    uint16 internal currentStage = 0;
    bool public saleActive = true;

    uint256 public mintRate;
    uint16 public MAX_SUPPLY;

    string public baseURI =
        "ipfs://QmaG2ifKFartY5vkdmVcsYh93teFj5pgcbrfPvJ9413f7b/chg.gif";

    mapping(uint16 => mapping(address => bool)) mintedUsers;

    address public royaltyReceiver;
    uint256 public royalty;
    string public contractURI;

    constructor(
        string memory name,
        string memory symbol,
        uint16 maxSupply,
        uint256 _mintRate,
        string memory _contractURI
    ) ERC721(name, symbol) {
        MAX_SUPPLY = maxSupply;
        mintRate = _mintRate;
        royaltyReceiver = owner();
        royalty = 250;
        contractURI = _contractURI;
    }

    function supportsInterface(
        bytes4 interfaceId
    ) public view virtual override(ERC721, IERC165) returns (bool) {
        return
            interfaceId == type(IERC2981).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    function royaltyInfo(
        uint256,
        uint256 _salePrice
    ) external view virtual override returns (address, uint256) {
        uint256 royaltyAmount = (_salePrice * royalty) / 10000;

        return (royaltyReceiver, royaltyAmount);
    }

    function _baseURI() internal view override returns (string memory) {
        return baseURI;
    }

    function totalSupply() public view returns (uint16) {
        return tokenIdCount;
    }

    function setMintRate(uint256 _mintRate) public onlyOwner {
        mintRate = _mintRate;
    }

    function setSaleActive(bool _saleActive) public onlyOwner {
        saleActive = _saleActive;
    }

    function resetMintedUsers() public onlyOwner {
        currentStage += 1;
    }

    function setRoyaltyReceiver(address royaltyReceiver_) public onlyOwner {
        royaltyReceiver = royaltyReceiver_;
    }

    function setRoyalty(uint256 _royalty) public onlyOwner {
        royalty = _royalty;
    }

    function setContractURI(string memory _contractURI) public onlyOwner {
        contractURI = _contractURI;
    }

    function changeBaseURI(string memory baseURI_) public onlyOwner {
        baseURI = baseURI_;
    }
}

File 25 of 27 : CryptoHomiesCommon.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

import "./CommonERC721.sol";

contract CryptoHomiesCommon is CommonERC721 {
    address public genesisContract;

    uint16 public mintsWithGenesis = 3;
    uint16 public mintLimitPerTransaction = 3;

    constructor(
        address owner,
        string memory _contractURI
    )
        CommonERC721(
            "CryptoHomiesCommon",
            "CHC",
            5994,
            0.1 ether,
            _contractURI
        )
    {
        genesisContract = msg.sender;
        _transferOwnership(owner);
    }

    function mintWithGenesis(address _to) public onlyGenesis returns (bool) {
        for (uint16 i = 0; i < mintsWithGenesis; i++) {
            _mint(_to);
        }

        return true;
    }

    function mintTokensForOwner(uint16 _amount) public onlyOwner {
        require(saleActive, "Sale not active");
        require(_amount <= mintLimitPerTransaction, "Minting limit exceeded");
        require(!mintedUsers[currentStage][owner()], "Owner has minted already");
        require(tokenIdCount + _amount <= MAX_SUPPLY, "No more items left");

        for (uint16 i = 0; i < _amount; i++) {
            _mint(owner());
        }

        mintedUsers[currentStage][owner()] = true;
    }

    function _mint(address _to) internal {
        ++tokenIdCount;
        _safeMint(_to, tokenIdCount);
    }

    modifier onlyGenesis() {
        require(msg.sender == genesisContract || msg.sender == owner(), "Caller is not authorized");
        _;
    }

    function changeMintLimitPerTransaction(uint16 _mintLimitPerTransaction) public onlyOwner {
        mintLimitPerTransaction = _mintLimitPerTransaction;
    }

    function changeMintsWithGenesis(uint16 _mintsWithGenesis) public onlyOwner {
        mintsWithGenesis = _mintsWithGenesis;
    }
}

File 26 of 27 : CryptoHomiesGenesis.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

import "./CommonERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "./CryptoHomiesCommon.sol";

contract CryptoHomiesGenesis is PaymentSplitter, Ownable, CommonERC721, EIP712 {
    string private constant SIGNING_DOMAIN = "CryptoHomiesGenesis";
    string private constant SIGNATURE_VERSION = "1";

    bool public teamMinted;
    bool public allowlistOnly = false;
    address validSigner;

    struct Voucher {
        uint16 id;
        address recipient;
        bytes signature;
    }

    mapping(uint16 => bool) redeemedVouchers;

    CryptoHomiesCommon public commonContract;

    constructor(
        string memory _contractURI,
        address _validSigner,
        address[] memory _payees,
        uint256[] memory _shares
    )
        CommonERC721(
            "CryptoHomiesGenesis",
            "CHG",
            1998,
            0.1 ether,
            _contractURI
        )
        EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION)
        PaymentSplitter(_payees, _shares)
    {
        commonContract = new CryptoHomiesCommon(
            msg.sender,
            "ipfs://QmScp6Bk1VwksWni4nhWESTP8HMoMVMbPDMj4eHGjAbLCv/chc.json"
        );
        validSigner = _validSigner;
    }

    function mintTokensForOwner(
        uint16 _genesisTokens,
        uint16 _commonTokens
    ) public onlyOwner {
        // Mint Genesis tokens for free without platform fee
        for (uint16 i = 0; i < _genesisTokens; i++) {
            _mintWithoutFee(owner());
        }

        // Mint common tokens without checking mint limit
        CryptoHomiesCommon commonContractInstance = CryptoHomiesCommon(
            address(commonContract)
        );
        for (uint16 i = 0; i < _commonTokens; i++) {
            commonContractInstance.mintWithGenesis(owner());
        }
    }

    function _mintWithoutFee(address _recipient) internal {
        uint16 _tokenId = tokenIdCount + 1;
        require(saleActive, "Sale not active");
        require(_tokenId <= MAX_SUPPLY, "No more items left");

        _safeMint(_recipient, _tokenId);
        commonContract.mintWithGenesis(_recipient);

        tokenIdCount = _tokenId;
    }

    function mint(address _buyer, uint16 _desiredTokenAmount) public payable {
        require(!allowlistOnly, "Can only mint through allow list");
        _mintTokens(_buyer, _desiredTokenAmount);
    }

    function _mintTokens(address _buyer, uint16 _desiredTokenAmount) internal {
        require(
            _desiredTokenAmount >= 1 && _desiredTokenAmount <= 10,
            "Invalid token amount"
        );

        require(saleActive, "Sale not active");
        require(
            tokenIdCount + _desiredTokenAmount <= MAX_SUPPLY,
            "Not enough items left"
        );
        require(
            msg.value >= mintRate * _desiredTokenAmount,
            "Not enough ether sent"
        );
        require(!mintedUsers[currentStage][_buyer], "User has already minted");

        // Calculate the platform fee
        uint256 platformFee = (mintRate * _desiredTokenAmount) / 100; // 1% of the mint rate per token

        // Calculate the total amount to be paid by the user
        uint256 totalAmount = mintRate * _desiredTokenAmount + platformFee;

        require(msg.value >= totalAmount, "Insufficient payment");

        // Transfer the platform fee to the specified address
        Address.sendValue(
            payable(0xA2b8E073eA72E4b1b29C0A4E383138ABde571870),
            platformFee
        );

        uint256 refundAmount = msg.value - totalAmount;

        for (uint16 i = 0; i < _desiredTokenAmount; i++) {
            uint16 tokenId = tokenIdCount + i + 1;

            _safeMint(_buyer, tokenId);
            commonContract.mintWithGenesis(_buyer);
            mintedUsers[currentStage][_buyer] = true;
        }

        tokenIdCount += _desiredTokenAmount;

        // Refund any excess amount sent by the user
        if (refundAmount > 0) {
            Address.sendValue(payable(_buyer), refundAmount);
        }
    }

    function setAllowlistOnly(bool _allowlistOnly) public onlyOwner {
        allowlistOnly = _allowlistOnly;
    }

    function setValidSigner(address _validSigner) public onlyOwner {
        validSigner = _validSigner;
    }

    function _hash(Voucher calldata pass) internal view returns (bytes32) {
        return
            _hashTypedDataV4(
                keccak256(
                    abi.encode(
                        keccak256("Voucher(uint16 id,address recipient)"),
                        pass.id,
                        pass.recipient
                    )
                )
            );
    }

    function _verify(Voucher calldata pass) internal view returns (address) {
        bytes32 digest = _hash(pass);
        return ECDSA.recover(digest, pass.signature);
    }

    /**
     * @dev Release the contract's balance to the payees.
     */
    function release() public onlyOwner {
        super.release(payable(address(this)));
    }
}

File 27 of 27 : IERC2981.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

import "@openzeppelin/contracts/interfaces/IERC165.sol";

interface IERC2981 is IERC165 {
    function royaltyInfo(
        uint256 tokenId,
        uint256 salePrice
    ) external view returns (address receiver, uint256 royaltyAmount);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_contractURI","type":"string"},{"internalType":"address","name":"_validSigner","type":"address"},{"internalType":"address[]","name":"_payees","type":"address[]"},{"internalType":"uint256[]","name":"_shares","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowlistOnly","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"changeBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"commonContract","outputs":[{"internalType":"contract CryptoHomiesCommon","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","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":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_buyer","type":"address"},{"internalType":"uint16","name":"_desiredTokenAmount","type":"uint16"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_genesisTokens","type":"uint16"},{"internalType":"uint16","name":"_commonTokens","type":"uint16"}],"name":"mintTokensForOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetMintedUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_allowlistOnly","type":"bool"}],"name":"setAllowlistOnly","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintRate","type":"uint256"}],"name":"setMintRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_royalty","type":"uint256"}],"name":"setRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"royaltyReceiver_","type":"address"}],"name":"setRoyaltyReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_saleActive","type":"bool"}],"name":"setSaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_validSigner","type":"address"}],"name":"setValidSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"teamMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"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"},{"stateMutability":"payable","type":"receive"}]

600d805462ffffff60b01b1916600160c01b1790556101c0604052603d61016081815290620062c9610180396010906200003a908262000820565b506017805461ff00191690553480156200005357600080fd5b506040516200630638038062006306833981016040819052620000769162000a66565b6040518060400160405280601381526020017243727970746f486f6d69657347656e6573697360681b815250604051806040016040528060018152602001603160f81b8152506040518060400160405280601381526020017243727970746f486f6d69657347656e6573697360681b8152506040518060400160405280600381526020016243484760e81b8152506107ce67016345785d8a00008984848a8a8051825114620001875760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620001da5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f2070617965657300000000000060448201526064016200017e565b60005b825181101562000246576200023183828151811062000200576200020062000b66565b60200260200101518383815181106200021d576200021d62000b66565b60200260200101516200049560201b60201c565b806200023d8162000b92565b915050620001dd565b5060079150620002599050838262000820565b50600862000268828262000820565b505050620002856200027f6200068160201b60201c565b62000685565b600f805461ffff191661ffff8516179055600e829055620002ae600d546001600160a01b031690565b601280546001600160a01b0319166001600160a01b039290921691909117905560fa6013556014620002e1828262000820565b50505050505062000302601583620006d760201b620016011790919060201c565b610120526200031f816016620006d7602090811b6200160117901c565b61014052815160208084019190912060e052815190820120610100524660a052620003ad60e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526040513390620003c6906200076d565b6001600160a01b039091168152604060208201819052603e908201527f697066733a2f2f516d53637036426b3156776b73576e69346e6857455354503860608201527f484d6f4d564d6250444d6a346548476a41624c43762f6368632e6a736f6e0000608082015260a001604051809103906000f0801580156200044e573d6000803e3d6000fd5b50601980546001600160a01b0319166001600160a01b039283161790556017805462010000600160b01b031916620100009590921694909402179092555062000c1e915050565b6001600160a01b038216620005025760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b60648201526084016200017e565b60008111620005545760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a2073686172657320617265203000000060448201526064016200017e565b6001600160a01b03821660009081526002602052604090205415620005d05760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b60648201526084016200017e565b60048054600181019091557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b0384169081179091556000908152600260205260408120829055546200063890829062000bae565b600055604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b3390565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602083511015620006f757620006ef8362000727565b905062000721565b826200070e836200076a60201b620016321760201c565b906200071b908262000820565b5060ff90505b92915050565b600080829050601f8151111562000755578260405163305a27a960e01b81526004016200017e919062000bc4565b8051620007628262000bf9565b179392505050565b90565b61236e8062003f5b83390190565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620007a657607f821691505b602082108103620007c757634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200081b57600081815260208120601f850160051c81016020861015620007f65750805b601f850160051c820191505b81811015620008175782815560010162000802565b5050505b505050565b81516001600160401b038111156200083c576200083c6200077b565b62000854816200084d845462000791565b84620007cd565b602080601f8311600181146200088c5760008415620008735750858301515b600019600386901b1c1916600185901b17855562000817565b600085815260208120601f198616915b82811015620008bd578886015182559484019460019091019084016200089c565b5085821015620008dc5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b604051601f8201601f191681016001600160401b03811182821017156200091757620009176200077b565b604052919050565b60005b838110156200093c57818101518382015260200162000922565b50506000910152565b80516001600160a01b03811681146200095d57600080fd5b919050565b60006001600160401b038211156200097e576200097e6200077b565b5060051b60200190565b600082601f8301126200099a57600080fd5b81516020620009b3620009ad8362000962565b620008ec565b82815260059290921b84018101918181019086841115620009d357600080fd5b8286015b84811015620009f957620009eb8162000945565b8352918301918301620009d7565b509695505050505050565b600082601f83011262000a1657600080fd5b8151602062000a29620009ad8362000962565b82815260059290921b8401810191818101908684111562000a4957600080fd5b8286015b84811015620009f9578051835291830191830162000a4d565b6000806000806080858703121562000a7d57600080fd5b84516001600160401b038082111562000a9557600080fd5b818701915087601f83011262000aaa57600080fd5b81518181111562000abf5762000abf6200077b565b62000ad4601f8201601f1916602001620008ec565b81815289602083860101111562000aea57600080fd5b62000afd8260208301602087016200091f565b965062000b0f90506020880162000945565b9450604087015191508082111562000b2657600080fd5b62000b348883890162000988565b9350606087015191508082111562000b4b57600080fd5b5062000b5a8782880162000a04565b91505092959194509250565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162000ba75762000ba762000b7c565b5060010190565b8082018082111562000721576200072162000b7c565b602081526000825180602084015262000be58160408501602087016200091f565b601f01601f19169190910160400192915050565b80516020808301519190811015620007c75760001960209190910360031b1b16919050565b60805160a05160c05160e0516101005161012051610140516132f162000c6a60003960006112780152600061124d015260005050600050506000505060005050600050506132f16000f3fe6080604052600436106103025760003560e01c8063715018a611610190578063ad0be4bd116100dc578063d79779b211610095578063e8a3d4851161006f578063e8a3d485146109b8578063e8b5498d146109cd578063e985e9c5146109e7578063f2fde38b14610a3057600080fd5b8063d79779b21461094d578063dbe2193f14610983578063e33b7de3146109a357600080fd5b8063ad0be4bd1461088e578063b88d4fde146108a1578063c45ac050146108c1578063c87b56dd146108e1578063ca0dcf1614610901578063ce7c2ac21461091757600080fd5b80638dc251e3116101495780639852595c116101235780639852595c146107f85780639fbc87131461082e578063a22cb4651461084e578063a3f8eace1461086e57600080fd5b80638dc251e3146107a3578063938e3d7b146107c357806395d89b41146107e357600080fd5b8063715018a6146106f3578063841718a61461070857806384b0196e1461072857806386d1a69f146107505780638b83209b146107655780638da5cb5b1461078557600080fd5b8063304d394c1161024f5780634209a2e1116102085780636352211e116101e25780636352211e1461067d57806368428a1b1461069d5780636c0360eb146106be57806370a08231146106d357600080fd5b80634209a2e11461061d57806342842e0e1461063d57806348b750441461065d57600080fd5b8063304d394c1461054857806332cb6b0c1461056857806339a0c6f9146105835780633a98ef39146105a35780633d141aa3146105b8578063406072a9146105d757600080fd5b806318160ddd116102bc57806323b872dd1161029657806323b872dd146104a557806329ee566c146104c55780632a55205a146104e95780632e4770e81461052857600080fd5b806318160ddd1461043657806318ac827e14610465578063191655871461048557600080fd5b80627171531461035057806301ffc9a71461036757806306fdde031461039c578063081812fc146103be578063095ea7b3146103f657806312d8b6591461041657600080fd5b3661034b577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561035c57600080fd5b50610365610a50565b005b34801561037357600080fd5b506103876103823660046129f2565b610a94565b60405190151581526020015b60405180910390f35b3480156103a857600080fd5b506103b1610abf565b6040516103939190612a5f565b3480156103ca57600080fd5b506103de6103d9366004612a72565b610b51565b6040516001600160a01b039091168152602001610393565b34801561040257600080fd5b50610365610411366004612aa0565b610b78565b34801561042257600080fd5b50610365610431366004612acc565b610c92565b34801561044257600080fd5b50600d54600160a01b900461ffff165b60405161ffff9091168152602001610393565b34801561047157600080fd5b50610365610480366004612af7565b610cc4565b34801561049157600080fd5b506103656104a0366004612acc565b610ce6565b3480156104b157600080fd5b506103656104c0366004612b14565b610dcd565b3480156104d157600080fd5b506104db60135481565b604051908152602001610393565b3480156104f557600080fd5b50610509610504366004612b55565b610dfe565b604080516001600160a01b039093168352602083019190915201610393565b34801561053457600080fd5b50610365610543366004612b8e565b610e35565b34801561055457600080fd5b506019546103de906001600160a01b031681565b34801561057457600080fd5b50600f546104529061ffff1681565b34801561058f57600080fd5b5061036561059e366004612c4d565b610f40565b3480156105af57600080fd5b506000546104db565b3480156105c457600080fd5b5060175461038790610100900460ff1681565b3480156105e357600080fd5b506104db6105f2366004612c96565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b34801561062957600080fd5b50610365610638366004612a72565b610f58565b34801561064957600080fd5b50610365610658366004612b14565b610f65565b34801561066957600080fd5b50610365610678366004612c96565b610f80565b34801561068957600080fd5b506103de610698366004612a72565b611091565b3480156106a957600080fd5b50600d5461038790600160c01b900460ff1681565b3480156106ca57600080fd5b506103b16110f1565b3480156106df57600080fd5b506104db6106ee366004612acc565b61117f565b3480156106ff57600080fd5b50610365611205565b34801561071457600080fd5b50610365610723366004612af7565b611219565b34801561073457600080fd5b5061073d61123f565b6040516103939796959493929190612ccf565b34801561075c57600080fd5b506103656112c8565b34801561077157600080fd5b506103de610780366004612a72565b6112d9565b34801561079157600080fd5b50600d546001600160a01b03166103de565b3480156107af57600080fd5b506103656107be366004612acc565b611309565b3480156107cf57600080fd5b506103656107de366004612c4d565b611333565b3480156107ef57600080fd5b506103b1611347565b34801561080457600080fd5b506104db610813366004612acc565b6001600160a01b031660009081526003602052604090205490565b34801561083a57600080fd5b506012546103de906001600160a01b031681565b34801561085a57600080fd5b50610365610869366004612d65565b611356565b34801561087a57600080fd5b506104db610889366004612acc565b611361565b61036561089c366004612d93565b6113a9565b3480156108ad57600080fd5b506103656108bc366004612db1565b61140b565b3480156108cd57600080fd5b506104db6108dc366004612c96565b61143d565b3480156108ed57600080fd5b506103b16108fc366004612a72565b611508565b34801561090d57600080fd5b506104db600e5481565b34801561092357600080fd5b506104db610932366004612acc565b6001600160a01b031660009081526002602052604090205490565b34801561095957600080fd5b506104db610968366004612acc565b6001600160a01b031660009081526005602052604090205490565b34801561098f57600080fd5b5061036561099e366004612a72565b61156e565b3480156109af57600080fd5b506001546104db565b3480156109c457600080fd5b506103b161157b565b3480156109d957600080fd5b506017546103879060ff1681565b3480156109f357600080fd5b50610387610a02366004612c96565b6001600160a01b039182166000908152600c6020908152604080832093909416825291909152205460ff1690565b348015610a3c57600080fd5b50610365610a4b366004612acc565b611588565b610a58611635565b6001600d60168282829054906101000a900461ffff16610a789190612e47565b92506101000a81548161ffff021916908361ffff160217905550565b60006001600160e01b0319821663152a902d60e11b1480610ab95750610ab98261168f565b92915050565b606060078054610ace90612e69565b80601f0160208091040260200160405190810160405280929190818152602001828054610afa90612e69565b8015610b475780601f10610b1c57610100808354040283529160200191610b47565b820191906000526020600020905b815481529060010190602001808311610b2a57829003601f168201915b5050505050905090565b6000610b5c826116df565b506000908152600b60205260409020546001600160a01b031690565b6000610b8382611091565b9050806001600160a01b0316836001600160a01b031603610bf55760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610c115750610c118133610a02565b610c835760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610bec565b610c8d838361173e565b505050565b610c9a611635565b601780546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b610ccc611635565b601780549115156101000261ff0019909216919091179055565b6001600160a01b038116600090815260026020526040902054610d1b5760405162461bcd60e51b8152600401610bec90612ea3565b6000610d2682611361565b905080600003610d485760405162461bcd60e51b8152600401610bec90612ee9565b8060016000828254610d5a9190612f34565b90915550506001600160a01b0382166000908152600360205260409020805482019055610d8782826117ac565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b610dd733826118c5565b610df35760405162461bcd60e51b8152600401610bec90612f47565b610c8d838383611943565b600080600061271060135485610e149190612f94565b610e1e9190612fab565b6012546001600160a01b0316969095509350505050565b610e3d611635565b60005b8261ffff168161ffff161015610e7c57610e6a610e65600d546001600160a01b031690565b611aa7565b80610e7481612fcd565b915050610e40565b506019546001600160a01b031660005b8261ffff168161ffff161015610f3a57816001600160a01b0316637de224b7610ebd600d546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024016020604051808303816000875af1158015610f03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f279190612fee565b5080610f3281612fcd565b915050610e8c565b50505050565b610f48611635565b6010610f548282613059565b5050565b610f60611635565b601355565b610c8d8383836040518060200160405280600081525061140b565b6001600160a01b038116600090815260026020526040902054610fb55760405162461bcd60e51b8152600401610bec90612ea3565b6000610fc1838361143d565b905080600003610fe35760405162461bcd60e51b8152600401610bec90612ee9565b6001600160a01b0383166000908152600560205260408120805483929061100b908490612f34565b90915550506001600160a01b038084166000908152600660209081526040808320938616835292905220805482019055611046838383611c02565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b6000818152600960205260408120546001600160a01b031680610ab95760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610bec565b601080546110fe90612e69565b80601f016020809104026020016040519081016040528092919081815260200182805461112a90612e69565b80156111775780601f1061114c57610100808354040283529160200191611177565b820191906000526020600020905b81548152906001019060200180831161115a57829003601f168201915b505050505081565b60006001600160a01b0382166111e95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610bec565b506001600160a01b03166000908152600a602052604090205490565b61120d611635565b6112176000611c54565b565b611221611635565b600d8054911515600160c01b0260ff60c01b19909216919091179055565b6000606080828080836112737f00000000000000000000000000000000000000000000000000000000000000006015611ca6565b61129e7f00000000000000000000000000000000000000000000000000000000000000006016611ca6565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6112d0611635565b61121730610ce6565b6000600482815481106112ee576112ee613119565b6000918252602090912001546001600160a01b031692915050565b611311611635565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b61133b611635565b6014610f548282613059565b606060088054610ace90612e69565b610f54338383611d4a565b60008061136d60015490565b6113779047612f34565b90506113a2838261139d866001600160a01b031660009081526003602052604090205490565b611e18565b9392505050565b601754610100900460ff16156114015760405162461bcd60e51b815260206004820181905260248201527f43616e206f6e6c79206d696e74207468726f75676820616c6c6f77206c6973746044820152606401610bec565b610f548282611e53565b61141533836118c5565b6114315760405162461bcd60e51b8152600401610bec90612f47565b610f3a84848484612254565b6001600160a01b03821660009081526005602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa15801561149c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c0919061312f565b6114ca9190612f34565b6001600160a01b038086166000908152600660209081526040808320938816835292905220549091506115009084908390611e18565b949350505050565b6060611513826116df565b600061151d612287565b9050600081511161153d57604051806020016040528060008152506113a2565b8061154784612296565b604051602001611558929190613148565b6040516020818303038152906040529392505050565b611576611635565b600e55565b601480546110fe90612e69565b611590611635565b6001600160a01b0381166115f55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610bec565b6115fe81611c54565b50565b600060208351101561161d5761161683612329565b9050610ab9565b816116288482613059565b5060ff9050610ab9565b90565b600d546001600160a01b031633146112175760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bec565b60006001600160e01b031982166380ac58cd60e01b14806116c057506001600160e01b03198216635b5e139f60e01b145b80610ab957506301ffc9a760e01b6001600160e01b0319831614610ab9565b6000818152600960205260409020546001600160a01b03166115fe5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610bec565b6000818152600b6020526040902080546001600160a01b0319166001600160a01b038416908117909155819061177382611091565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b804710156117fc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610bec565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611849576040519150601f19603f3d011682016040523d82523d6000602084013e61184e565b606091505b5050905080610c8d5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610bec565b6000806118d183611091565b9050806001600160a01b0316846001600160a01b0316148061191857506001600160a01b038082166000908152600c602090815260408083209388168352929052205460ff165b806115005750836001600160a01b031661193184610b51565b6001600160a01b031614949350505050565b826001600160a01b031661195682611091565b6001600160a01b03161461197c5760405162461bcd60e51b8152600401610bec90613177565b6001600160a01b0382166119de5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610bec565b826001600160a01b03166119f182611091565b6001600160a01b031614611a175760405162461bcd60e51b8152600401610bec90613177565b6000818152600b6020908152604080832080546001600160a01b03199081169091556001600160a01b03878116808652600a8552838620805460001901905590871680865283862080546001019055868652600990945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600d54600090611ac390600160a01b900461ffff166001612e47565b600d54909150600160c01b900460ff16611b115760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b6044820152606401610bec565b600f5461ffff9081169082161115611b605760405162461bcd60e51b8152602060048201526012602482015271139bc81b5bdc99481a5d195b5cc81b19599d60721b6044820152606401610bec565b611b6e828261ffff16612367565b601954604051637de224b760e01b81526001600160a01b03848116600483015290911690637de224b7906024016020604051808303816000875af1158015611bba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bde9190612fee565b50600d805461ffff909216600160a01b0261ffff60a01b1990921691909117905550565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610c8d908490612381565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606060ff8314611cb95761161683612456565b818054611cc590612e69565b80601f0160208091040260200160405190810160405280929190818152602001828054611cf190612e69565b8015611d3e5780601f10611d1357610100808354040283529160200191611d3e565b820191906000526020600020905b815481529060010190602001808311611d2157829003601f168201915b50505050509050610ab9565b816001600160a01b0316836001600160a01b031603611dab5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610bec565b6001600160a01b038381166000818152600c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600080546001600160a01b038516825260026020526040822054839190611e3f9086612f94565b611e499190612fab565b61150091906131bc565b60018161ffff1610158015611e6d5750600a8161ffff1611155b611eb05760405162461bcd60e51b8152602060048201526014602482015273125b9d985b1a59081d1bdad95b88185b5bdd5b9d60621b6044820152606401610bec565b600d54600160c01b900460ff16611efb5760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b6044820152606401610bec565b600f54600d5461ffff91821691611f1c918491600160a01b90910416612e47565b61ffff161115611f665760405162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da081a5d195b5cc81b19599d605a1b6044820152606401610bec565b8061ffff16600e54611f789190612f94565b341015611fbf5760405162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08195d1a195c881cd95b9d605a1b6044820152606401610bec565b600d54600160b01b900461ffff1660009081526011602090815260408083206001600160a01b038616845290915290205460ff16156120405760405162461bcd60e51b815260206004820152601760248201527f557365722068617320616c7265616479206d696e7465640000000000000000006044820152606401610bec565b600060648261ffff16600e546120569190612f94565b6120609190612fab565b90506000818361ffff16600e546120779190612f94565b6120819190612f34565b9050803410156120ca5760405162461bcd60e51b8152602060048201526014602482015273125b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606401610bec565b6120e873a2b8e073ea72e4b1b29c0a4e383138abde571870836117ac565b60006120f482346131bc565b905060005b8461ffff168161ffff16101561220057600d54600090612125908390600160a01b900461ffff16612e47565b612130906001612e47565b9050612140878261ffff16612367565b601954604051637de224b760e01b81526001600160a01b03898116600483015290911690637de224b7906024016020604051808303816000875af115801561218c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b09190612fee565b5050600d5461ffff600160b01b9091041660009081526011602090815260408083206001600160a01b038a1684529091529020805460ff19166001179055806121f881612fcd565b9150506120f9565b5083600d60148282829054906101000a900461ffff166122209190612e47565b92506101000a81548161ffff021916908361ffff160217905550600081111561224d5761224d85826117ac565b5050505050565b61225f848484611943565b61226b84848484612495565b610f3a5760405162461bcd60e51b8152600401610bec906131cf565b606060108054610ace90612e69565b606060006122a383612596565b600101905060008167ffffffffffffffff8111156122c3576122c3612bc1565b6040519080825280601f01601f1916602001820160405280156122ed576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846122f757509392505050565b600080829050601f81511115612354578260405163305a27a960e01b8152600401610bec9190612a5f565b805161235f82613221565b179392505050565b610f5482826040518060200160405280600081525061266e565b60006123d6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166126a19092919063ffffffff16565b90508051600014806123f75750808060200190518101906123f79190612fee565b610c8d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610bec565b60606000612463836126b0565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b60006001600160a01b0384163b1561258b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906124d9903390899088908890600401613245565b6020604051808303816000875af1925050508015612514575060408051601f3d908101601f1916820190925261251191810190613282565b60015b612571573d808015612542576040519150601f19603f3d011682016040523d82523d6000602084013e612547565b606091505b5080516000036125695760405162461bcd60e51b8152600401610bec906131cf565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611500565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106125d55772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612601576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061261f57662386f26fc10000830492506010015b6305f5e1008310612637576305f5e100830492506008015b612710831061264b57612710830492506004015b6064831061265d576064830492506002015b600a8310610ab95760010192915050565b61267883836126d8565b6126856000848484612495565b610c8d5760405162461bcd60e51b8152600401610bec906131cf565b60606115008484600085612863565b600060ff8216601f811115610ab957604051632cd44ac360e21b815260040160405180910390fd5b6001600160a01b03821661272e5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610bec565b6000818152600960205260409020546001600160a01b0316156127935760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610bec565b6000818152600960205260409020546001600160a01b0316156127f85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610bec565b6001600160a01b0382166000818152600a6020908152604080832080546001019055848352600990915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060824710156128c45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610bec565b600080866001600160a01b031685876040516128e0919061329f565b60006040518083038185875af1925050503d806000811461291d576040519150601f19603f3d011682016040523d82523d6000602084013e612922565b606091505b50915091506129338783838761293e565b979650505050505050565b606083156129ad5782516000036129a6576001600160a01b0385163b6129a65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610bec565b5081611500565b61150083838151156129c25781518083602001fd5b8060405162461bcd60e51b8152600401610bec9190612a5f565b6001600160e01b0319811681146115fe57600080fd5b600060208284031215612a0457600080fd5b81356113a2816129dc565b60005b83811015612a2a578181015183820152602001612a12565b50506000910152565b60008151808452612a4b816020860160208601612a0f565b601f01601f19169290920160200192915050565b6020815260006113a26020830184612a33565b600060208284031215612a8457600080fd5b5035919050565b6001600160a01b03811681146115fe57600080fd5b60008060408385031215612ab357600080fd5b8235612abe81612a8b565b946020939093013593505050565b600060208284031215612ade57600080fd5b81356113a281612a8b565b80151581146115fe57600080fd5b600060208284031215612b0957600080fd5b81356113a281612ae9565b600080600060608486031215612b2957600080fd5b8335612b3481612a8b565b92506020840135612b4481612a8b565b929592945050506040919091013590565b60008060408385031215612b6857600080fd5b50508035926020909101359150565b803561ffff81168114612b8957600080fd5b919050565b60008060408385031215612ba157600080fd5b612baa83612b77565b9150612bb860208401612b77565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612bf257612bf2612bc1565b604051601f8501601f19908116603f01168101908282118183101715612c1a57612c1a612bc1565b81604052809350858152868686011115612c3357600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612c5f57600080fd5b813567ffffffffffffffff811115612c7657600080fd5b8201601f81018413612c8757600080fd5b61150084823560208401612bd7565b60008060408385031215612ca957600080fd5b8235612cb481612a8b565b91506020830135612cc481612a8b565b809150509250929050565b60ff60f81b881681526000602060e081840152612cef60e084018a612a33565b8381036040850152612d01818a612a33565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015612d5357835183529284019291840191600101612d37565b50909c9b505050505050505050505050565b60008060408385031215612d7857600080fd5b8235612d8381612a8b565b91506020830135612cc481612ae9565b60008060408385031215612da657600080fd5b8235612baa81612a8b565b60008060008060808587031215612dc757600080fd5b8435612dd281612a8b565b93506020850135612de281612a8b565b925060408501359150606085013567ffffffffffffffff811115612e0557600080fd5b8501601f81018713612e1657600080fd5b612e2587823560208401612bd7565b91505092959194509250565b634e487b7160e01b600052601160045260246000fd5b61ffff818116838216019080821115612e6257612e62612e31565b5092915050565b600181811c90821680612e7d57607f821691505b602082108103612e9d57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b80820180821115610ab957610ab9612e31565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b8082028115828204841417610ab957610ab9612e31565b600082612fc857634e487b7160e01b600052601260045260246000fd5b500490565b600061ffff808316818103612fe457612fe4612e31565b6001019392505050565b60006020828403121561300057600080fd5b81516113a281612ae9565b601f821115610c8d57600081815260208120601f850160051c810160208610156130325750805b601f850160051c820191505b818110156130515782815560010161303e565b505050505050565b815167ffffffffffffffff81111561307357613073612bc1565b613087816130818454612e69565b8461300b565b602080601f8311600181146130bc57600084156130a45750858301515b600019600386901b1c1916600185901b178555613051565b600085815260208120601f198616915b828110156130eb578886015182559484019460019091019084016130cc565b50858210156131095787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561314157600080fd5b5051919050565b6000835161315a818460208801612a0f565b83519083019061316e818360208801612a0f565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b81810381811115610ab957610ab9612e31565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b80516020808301519190811015612e9d5760001960209190910360031b1b16919050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061327890830184612a33565b9695505050505050565b60006020828403121561329457600080fd5b81516113a2816129dc565b600082516132b1818460208701612a0f565b919091019291505056fea26469706673582212206d951356009af1a2fdfd1e0a22bda21252c1bbf388f7446683b30ec3d204e28564736f6c634300081100336006805462ffffff60b01b1916600160c01b17905560e0604052603d6080818152906200233160a03960099062000037908262000297565b50600e805463ffffffff60a01b19166203000360a01b1790553480156200005d57600080fd5b506040516200236e3803806200236e833981016040819052620000809162000363565b6040518060400160405280601281526020017121b93cb83a37a437b6b4b2b9a1b7b6b6b7b760711b8152506040518060400160405280600381526020016243484360e81b81525061176a67016345785d8a00008484848160009081620000e7919062000297565b506001620000f6828262000297565b505050620001136200010d6200019c60201b60201c565b620001a0565b6008805461ffff191661ffff851617905560078290556200013c6006546001600160a01b031690565b600b80546001600160a01b0319166001600160a01b039290921691909117905560fa600c55600d6200016f828262000297565b5050600e80546001600160a01b031916331790555062000194925084915050620001a0565b505062000459565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200021d57607f821691505b6020821081036200023e57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200029257600081815260208120601f850160051c810160208610156200026d5750805b601f850160051c820191505b818110156200028e5782815560010162000279565b5050505b505050565b81516001600160401b03811115620002b357620002b3620001f2565b620002cb81620002c4845462000208565b8462000244565b602080601f831160018114620003035760008415620002ea5750858301515b600019600386901b1c1916600185901b1785556200028e565b600085815260208120601f198616915b82811015620003345788860151825594840194600190910190840162000313565b5085821015620003535787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600080604083850312156200037757600080fd5b82516001600160a01b03811681146200038f57600080fd5b602084810151919350906001600160401b0380821115620003af57600080fd5b818601915086601f830112620003c457600080fd5b815181811115620003d957620003d9620001f2565b604051601f8201601f19908116603f01168101908382118183101715620004045762000404620001f2565b8160405282815289868487010111156200041d57600080fd5b600093505b8284101562000441578484018601518185018701529285019262000422565b60008684830101528096505050505050509250929050565b611ec880620004696000396000f3fe608060405234801561001057600080fd5b506004361061023c5760003560e01c806370a082311161013b578063a22cb465116100b8578063d8e99f921161007c578063d8e99f92146104f2578063dbe2193f14610505578063e8a3d48514610518578063e985e9c514610520578063f2fde38b1461053357600080fd5b8063a22cb4651461049b578063b15c4dd0146104ae578063b88d4fde146104c3578063c87b56dd146104d6578063ca0dcf16146104e957600080fd5b80638da5cb5b116100ff5780638da5cb5b146104495780638dc251e31461045a578063938e3d7b1461046d57806395d89b41146104805780639fbc87131461048857600080fd5b806370a08231146103f3578063715018a614610406578063735577fc1461040e5780637de224b714610423578063841718a61461043657600080fd5b80632a55205a116101c95780634209a2e11161018d5780634209a2e11461039e57806342842e0e146103b15780636352211e146103c457806368428a1b146103d75780636c0360eb146103eb57600080fd5b80632a55205a146103255780632b3e62d31461035757806330aefb611461036a57806332cb6b0c1461037d57806339a0c6f91461038b57600080fd5b8063095ea7b311610210578063095ea7b3146102b357806316674ae1146102c657806318160ddd146102d957806323b872dd146102fb57806329ee566c1461030e57600080fd5b80627171531461024157806301ffc9a71461024b57806306fdde0314610273578063081812fc14610288575b600080fd5b610249610546565b005b61025e6102593660046117fb565b61058a565b60405190151581526020015b60405180910390f35b61027b6105b5565b60405161026a9190611868565b61029b61029636600461187b565b610647565b6040516001600160a01b03909116815260200161026a565b6102496102c13660046118ab565b61066e565b6102496102d43660046118d5565b610788565b600654600160a01b900461ffff165b60405161ffff909116815260200161026a565b6102496103093660046118f9565b61099c565b610317600c5481565b60405190815260200161026a565b610338610333366004611935565b6109cd565b604080516001600160a01b03909316835260208301919091520161026a565b6102496103653660046118d5565b610a04565b6102496103783660046118d5565b610a2e565b6008546102e89061ffff1681565b6102496103993660046119e3565b610a58565b6102496103ac36600461187b565b610a70565b6102496103bf3660046118f9565b610a7d565b61029b6103d236600461187b565b610a98565b60065461025e90600160c01b900460ff1681565b61027b610af8565b610317610401366004611a2c565b610b86565b610249610c0c565b600e546102e890600160a01b900461ffff1681565b61025e610431366004611a2c565b610c20565b610249610444366004611a57565b610cd4565b6006546001600160a01b031661029b565b610249610468366004611a2c565b610cfa565b61024961047b3660046119e3565b610d24565b61027b610d38565b600b5461029b906001600160a01b031681565b6102496104a9366004611a72565b610d47565b600e546102e890600160b01b900461ffff1681565b6102496104d1366004611aa5565b610d52565b61027b6104e436600461187b565b610d8a565b61031760075481565b600e5461029b906001600160a01b031681565b61024961051336600461187b565b610df1565b61027b610dfe565b61025e61052e366004611b21565b610e0b565b610249610541366004611a2c565b610e39565b61054e610eb2565b6001600660168282829054906101000a900461ffff1661056e9190611b61565b92506101000a81548161ffff021916908361ffff160217905550565b60006001600160e01b0319821663152a902d60e11b14806105af57506105af82610f0c565b92915050565b6060600080546105c490611b83565b80601f01602080910402602001604051908101604052809291908181526020018280546105f090611b83565b801561063d5780601f106106125761010080835404028352916020019161063d565b820191906000526020600020905b81548152906001019060200180831161062057829003601f168201915b5050505050905090565b600061065282610f5c565b506000908152600460205260409020546001600160a01b031690565b600061067982610a98565b9050806001600160a01b0316836001600160a01b0316036106eb5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061070757506107078133610e0b565b6107795760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016106e2565b6107838383610fbb565b505050565b610790610eb2565b600654600160c01b900460ff166107db5760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b60448201526064016106e2565b600e5461ffff600160b01b909104811690821611156108355760405162461bcd60e51b8152602060048201526016602482015275135a5b9d1a5b99c81b1a5b5a5d08195e18d95959195960521b60448201526064016106e2565b60065461ffff600160b01b8204166000908152600a602090815260408083206001600160a01b039094168352929052205460ff16156108b65760405162461bcd60e51b815260206004820152601860248201527f4f776e657220686173206d696e74656420616c7265616479000000000000000060448201526064016106e2565b60085460065461ffff918216916108d7918491600160a01b90910416611b61565b61ffff16111561091e5760405162461bcd60e51b8152602060048201526012602482015271139bc81b5bdc99481a5d195b5cc81b19599d60721b60448201526064016106e2565b60005b8161ffff168161ffff16101561095d5761094b6109466006546001600160a01b031690565b611029565b8061095581611bbd565b915050610921565b505060065461ffff600160b01b8204166000908152600a602090815260408083206001600160a01b03909416835292905220805460ff19166001179055565b6109a6338261107c565b6109c25760405162461bcd60e51b81526004016106e290611bde565b6107838383836110db565b6000806000612710600c54856109e39190611c2b565b6109ed9190611c42565b600b546001600160a01b0316969095509350505050565b610a0c610eb2565b600e805461ffff909216600160a01b0261ffff60a01b19909216919091179055565b610a36610eb2565b600e805461ffff909216600160b01b0261ffff60b01b19909216919091179055565b610a60610eb2565b6009610a6c8282611cb2565b5050565b610a78610eb2565b600c55565b61078383838360405180602001604052806000815250610d52565b6000818152600260205260408120546001600160a01b0316806105af5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016106e2565b60098054610b0590611b83565b80601f0160208091040260200160405190810160405280929190818152602001828054610b3190611b83565b8015610b7e5780601f10610b5357610100808354040283529160200191610b7e565b820191906000526020600020905b815481529060010190602001808311610b6157829003601f168201915b505050505081565b60006001600160a01b038216610bf05760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016106e2565b506001600160a01b031660009081526003602052604090205490565b610c14610eb2565b610c1e600061123f565b565b600e546000906001600160a01b0316331480610c4657506006546001600160a01b031633145b610c925760405162461bcd60e51b815260206004820152601860248201527f43616c6c6572206973206e6f7420617574686f72697a6564000000000000000060448201526064016106e2565b60005b600e5461ffff600160a01b90910481169082161015610cc957610cb783611029565b80610cc181611bbd565b915050610c95565b50600190505b919050565b610cdc610eb2565b60068054911515600160c01b0260ff60c01b19909216919091179055565b610d02610eb2565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b610d2c610eb2565b600d610a6c8282611cb2565b6060600180546105c490611b83565b610a6c338383611291565b610d5c338361107c565b610d785760405162461bcd60e51b81526004016106e290611bde565b610d848484848461135f565b50505050565b6060610d9582610f5c565b6000610d9f611392565b90506000815111610dbf5760405180602001604052806000815250610dea565b80610dc9846113a1565b604051602001610dda929190611d72565b6040516020818303038152906040525b9392505050565b610df9610eb2565b600755565b600d8054610b0590611b83565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b610e41610eb2565b6001600160a01b038116610ea65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106e2565b610eaf8161123f565b50565b6006546001600160a01b03163314610c1e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106e2565b60006001600160e01b031982166380ac58cd60e01b1480610f3d57506001600160e01b03198216635b5e139f60e01b145b806105af57506301ffc9a760e01b6001600160e01b03198316146105af565b6000818152600260205260409020546001600160a01b0316610eaf5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016106e2565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610ff082610a98565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6006805460149061104490600160a01b900461ffff16611bbd565b91906101000a81548161ffff021916908361ffff160217905550610eaf81600660149054906101000a900461ffff1661ffff16611434565b60008061108883610a98565b9050806001600160a01b0316846001600160a01b031614806110af57506110af8185610e0b565b806110d35750836001600160a01b03166110c884610647565b6001600160a01b0316145b949350505050565b826001600160a01b03166110ee82610a98565b6001600160a01b0316146111145760405162461bcd60e51b81526004016106e290611da1565b6001600160a01b0382166111765760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106e2565b826001600160a01b031661118982610a98565b6001600160a01b0316146111af5760405162461bcd60e51b81526004016106e290611da1565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036112f25760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106e2565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61136a8484846110db565b6113768484848461144e565b610d845760405162461bcd60e51b81526004016106e290611de6565b6060600980546105c490611b83565b606060006113ae8361154f565b600101905060008167ffffffffffffffff8111156113ce576113ce611957565b6040519080825280601f01601f1916602001820160405280156113f8576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461140257509392505050565b610a6c828260405180602001604052806000815250611627565b60006001600160a01b0384163b1561154457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611492903390899088908890600401611e38565b6020604051808303816000875af19250505080156114cd575060408051601f3d908101601f191682019092526114ca91810190611e75565b60015b61152a573d8080156114fb576040519150601f19603f3d011682016040523d82523d6000602084013e611500565b606091505b5080516000036115225760405162461bcd60e51b81526004016106e290611de6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506110d3565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061158e5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106115ba576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106115d857662386f26fc10000830492506010015b6305f5e10083106115f0576305f5e100830492506008015b612710831061160457612710830492506004015b60648310611616576064830492506002015b600a83106105af5760010192915050565b611631838361165a565b61163e600084848461144e565b6107835760405162461bcd60e51b81526004016106e290611de6565b6001600160a01b0382166116b05760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106e2565b6000818152600260205260409020546001600160a01b0316156117155760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106e2565b6000818152600260205260409020546001600160a01b03161561177a5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106e2565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b031981168114610eaf57600080fd5b60006020828403121561180d57600080fd5b8135610dea816117e5565b60005b8381101561183357818101518382015260200161181b565b50506000910152565b60008151808452611854816020860160208601611818565b601f01601f19169290920160200192915050565b602081526000610dea602083018461183c565b60006020828403121561188d57600080fd5b5035919050565b80356001600160a01b0381168114610ccf57600080fd5b600080604083850312156118be57600080fd5b6118c783611894565b946020939093013593505050565b6000602082840312156118e757600080fd5b813561ffff81168114610dea57600080fd5b60008060006060848603121561190e57600080fd5b61191784611894565b925061192560208501611894565b9150604084013590509250925092565b6000806040838503121561194857600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561198857611988611957565b604051601f8501601f19908116603f011681019082821181831017156119b0576119b0611957565b816040528093508581528686860111156119c957600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156119f557600080fd5b813567ffffffffffffffff811115611a0c57600080fd5b8201601f81018413611a1d57600080fd5b6110d38482356020840161196d565b600060208284031215611a3e57600080fd5b610dea82611894565b80358015158114610ccf57600080fd5b600060208284031215611a6957600080fd5b610dea82611a47565b60008060408385031215611a8557600080fd5b611a8e83611894565b9150611a9c60208401611a47565b90509250929050565b60008060008060808587031215611abb57600080fd5b611ac485611894565b9350611ad260208601611894565b925060408501359150606085013567ffffffffffffffff811115611af557600080fd5b8501601f81018713611b0657600080fd5b611b158782356020840161196d565b91505092959194509250565b60008060408385031215611b3457600080fd5b611b3d83611894565b9150611a9c60208401611894565b634e487b7160e01b600052601160045260246000fd5b61ffff818116838216019080821115611b7c57611b7c611b4b565b5092915050565b600181811c90821680611b9757607f821691505b602082108103611bb757634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff808316818103611bd457611bd4611b4b565b6001019392505050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b80820281158282048414176105af576105af611b4b565b600082611c5f57634e487b7160e01b600052601260045260246000fd5b500490565b601f82111561078357600081815260208120601f850160051c81016020861015611c8b5750805b601f850160051c820191505b81811015611caa57828155600101611c97565b505050505050565b815167ffffffffffffffff811115611ccc57611ccc611957565b611ce081611cda8454611b83565b84611c64565b602080601f831160018114611d155760008415611cfd5750858301515b600019600386901b1c1916600185901b178555611caa565b600085815260208120601f198616915b82811015611d4457888601518255948401946001909101908401611d25565b5085821015611d625787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008351611d84818460208801611818565b835190830190611d98818360208801611818565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611e6b9083018461183c565b9695505050505050565b600060208284031215611e8757600080fd5b8151610dea816117e556fea264697066735822122093b006fd10966f068b6c42b01b9b0a28b4f069cf6a08358ea646f09bc37723ac64736f6c63430008110033697066733a2f2f516d61473269664b466172745935766b646d566373596839337465466a3570676362726650764a393431336637622f6368672e676966697066733a2f2f516d61473269664b466172745935766b646d566373596839337465466a3570676362726650764a393431336637622f6368672e676966000000000000000000000000000000000000000000000000000000000000008000000000000000000000000063620a51611cd692ae39b2824f661116b318c9e000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000000037697066733a2f2f516d544744465731364e79336a7a51314c4447444c674d434a504b4e4443623861317975424c55507047574336532f30000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000063620a51611cd692ae39b2824f661116b318c9e000000000000000000000000048cb797bbc50ad7896d737066bab7467446b975a0000000000000000000000008bbbef48e7e05c8d4027b88cb1b441e33ee20f3b000000000000000000000000244093984725ca5bfec6f97bb87b443e9addcb84000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000009d800000000000000000000000000000000000000000000000000000000000005dc00000000000000000000000000000000000000000000000000000000000005140000000000000000000000000000000000000000000000000000000000001248

Deployed Bytecode

0x6080604052600436106103025760003560e01c8063715018a611610190578063ad0be4bd116100dc578063d79779b211610095578063e8a3d4851161006f578063e8a3d485146109b8578063e8b5498d146109cd578063e985e9c5146109e7578063f2fde38b14610a3057600080fd5b8063d79779b21461094d578063dbe2193f14610983578063e33b7de3146109a357600080fd5b8063ad0be4bd1461088e578063b88d4fde146108a1578063c45ac050146108c1578063c87b56dd146108e1578063ca0dcf1614610901578063ce7c2ac21461091757600080fd5b80638dc251e3116101495780639852595c116101235780639852595c146107f85780639fbc87131461082e578063a22cb4651461084e578063a3f8eace1461086e57600080fd5b80638dc251e3146107a3578063938e3d7b146107c357806395d89b41146107e357600080fd5b8063715018a6146106f3578063841718a61461070857806384b0196e1461072857806386d1a69f146107505780638b83209b146107655780638da5cb5b1461078557600080fd5b8063304d394c1161024f5780634209a2e1116102085780636352211e116101e25780636352211e1461067d57806368428a1b1461069d5780636c0360eb146106be57806370a08231146106d357600080fd5b80634209a2e11461061d57806342842e0e1461063d57806348b750441461065d57600080fd5b8063304d394c1461054857806332cb6b0c1461056857806339a0c6f9146105835780633a98ef39146105a35780633d141aa3146105b8578063406072a9146105d757600080fd5b806318160ddd116102bc57806323b872dd1161029657806323b872dd146104a557806329ee566c146104c55780632a55205a146104e95780632e4770e81461052857600080fd5b806318160ddd1461043657806318ac827e14610465578063191655871461048557600080fd5b80627171531461035057806301ffc9a71461036757806306fdde031461039c578063081812fc146103be578063095ea7b3146103f657806312d8b6591461041657600080fd5b3661034b577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561035c57600080fd5b50610365610a50565b005b34801561037357600080fd5b506103876103823660046129f2565b610a94565b60405190151581526020015b60405180910390f35b3480156103a857600080fd5b506103b1610abf565b6040516103939190612a5f565b3480156103ca57600080fd5b506103de6103d9366004612a72565b610b51565b6040516001600160a01b039091168152602001610393565b34801561040257600080fd5b50610365610411366004612aa0565b610b78565b34801561042257600080fd5b50610365610431366004612acc565b610c92565b34801561044257600080fd5b50600d54600160a01b900461ffff165b60405161ffff9091168152602001610393565b34801561047157600080fd5b50610365610480366004612af7565b610cc4565b34801561049157600080fd5b506103656104a0366004612acc565b610ce6565b3480156104b157600080fd5b506103656104c0366004612b14565b610dcd565b3480156104d157600080fd5b506104db60135481565b604051908152602001610393565b3480156104f557600080fd5b50610509610504366004612b55565b610dfe565b604080516001600160a01b039093168352602083019190915201610393565b34801561053457600080fd5b50610365610543366004612b8e565b610e35565b34801561055457600080fd5b506019546103de906001600160a01b031681565b34801561057457600080fd5b50600f546104529061ffff1681565b34801561058f57600080fd5b5061036561059e366004612c4d565b610f40565b3480156105af57600080fd5b506000546104db565b3480156105c457600080fd5b5060175461038790610100900460ff1681565b3480156105e357600080fd5b506104db6105f2366004612c96565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b34801561062957600080fd5b50610365610638366004612a72565b610f58565b34801561064957600080fd5b50610365610658366004612b14565b610f65565b34801561066957600080fd5b50610365610678366004612c96565b610f80565b34801561068957600080fd5b506103de610698366004612a72565b611091565b3480156106a957600080fd5b50600d5461038790600160c01b900460ff1681565b3480156106ca57600080fd5b506103b16110f1565b3480156106df57600080fd5b506104db6106ee366004612acc565b61117f565b3480156106ff57600080fd5b50610365611205565b34801561071457600080fd5b50610365610723366004612af7565b611219565b34801561073457600080fd5b5061073d61123f565b6040516103939796959493929190612ccf565b34801561075c57600080fd5b506103656112c8565b34801561077157600080fd5b506103de610780366004612a72565b6112d9565b34801561079157600080fd5b50600d546001600160a01b03166103de565b3480156107af57600080fd5b506103656107be366004612acc565b611309565b3480156107cf57600080fd5b506103656107de366004612c4d565b611333565b3480156107ef57600080fd5b506103b1611347565b34801561080457600080fd5b506104db610813366004612acc565b6001600160a01b031660009081526003602052604090205490565b34801561083a57600080fd5b506012546103de906001600160a01b031681565b34801561085a57600080fd5b50610365610869366004612d65565b611356565b34801561087a57600080fd5b506104db610889366004612acc565b611361565b61036561089c366004612d93565b6113a9565b3480156108ad57600080fd5b506103656108bc366004612db1565b61140b565b3480156108cd57600080fd5b506104db6108dc366004612c96565b61143d565b3480156108ed57600080fd5b506103b16108fc366004612a72565b611508565b34801561090d57600080fd5b506104db600e5481565b34801561092357600080fd5b506104db610932366004612acc565b6001600160a01b031660009081526002602052604090205490565b34801561095957600080fd5b506104db610968366004612acc565b6001600160a01b031660009081526005602052604090205490565b34801561098f57600080fd5b5061036561099e366004612a72565b61156e565b3480156109af57600080fd5b506001546104db565b3480156109c457600080fd5b506103b161157b565b3480156109d957600080fd5b506017546103879060ff1681565b3480156109f357600080fd5b50610387610a02366004612c96565b6001600160a01b039182166000908152600c6020908152604080832093909416825291909152205460ff1690565b348015610a3c57600080fd5b50610365610a4b366004612acc565b611588565b610a58611635565b6001600d60168282829054906101000a900461ffff16610a789190612e47565b92506101000a81548161ffff021916908361ffff160217905550565b60006001600160e01b0319821663152a902d60e11b1480610ab95750610ab98261168f565b92915050565b606060078054610ace90612e69565b80601f0160208091040260200160405190810160405280929190818152602001828054610afa90612e69565b8015610b475780601f10610b1c57610100808354040283529160200191610b47565b820191906000526020600020905b815481529060010190602001808311610b2a57829003601f168201915b5050505050905090565b6000610b5c826116df565b506000908152600b60205260409020546001600160a01b031690565b6000610b8382611091565b9050806001600160a01b0316836001600160a01b031603610bf55760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610c115750610c118133610a02565b610c835760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610bec565b610c8d838361173e565b505050565b610c9a611635565b601780546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b610ccc611635565b601780549115156101000261ff0019909216919091179055565b6001600160a01b038116600090815260026020526040902054610d1b5760405162461bcd60e51b8152600401610bec90612ea3565b6000610d2682611361565b905080600003610d485760405162461bcd60e51b8152600401610bec90612ee9565b8060016000828254610d5a9190612f34565b90915550506001600160a01b0382166000908152600360205260409020805482019055610d8782826117ac565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b610dd733826118c5565b610df35760405162461bcd60e51b8152600401610bec90612f47565b610c8d838383611943565b600080600061271060135485610e149190612f94565b610e1e9190612fab565b6012546001600160a01b0316969095509350505050565b610e3d611635565b60005b8261ffff168161ffff161015610e7c57610e6a610e65600d546001600160a01b031690565b611aa7565b80610e7481612fcd565b915050610e40565b506019546001600160a01b031660005b8261ffff168161ffff161015610f3a57816001600160a01b0316637de224b7610ebd600d546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024016020604051808303816000875af1158015610f03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f279190612fee565b5080610f3281612fcd565b915050610e8c565b50505050565b610f48611635565b6010610f548282613059565b5050565b610f60611635565b601355565b610c8d8383836040518060200160405280600081525061140b565b6001600160a01b038116600090815260026020526040902054610fb55760405162461bcd60e51b8152600401610bec90612ea3565b6000610fc1838361143d565b905080600003610fe35760405162461bcd60e51b8152600401610bec90612ee9565b6001600160a01b0383166000908152600560205260408120805483929061100b908490612f34565b90915550506001600160a01b038084166000908152600660209081526040808320938616835292905220805482019055611046838383611c02565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b6000818152600960205260408120546001600160a01b031680610ab95760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610bec565b601080546110fe90612e69565b80601f016020809104026020016040519081016040528092919081815260200182805461112a90612e69565b80156111775780601f1061114c57610100808354040283529160200191611177565b820191906000526020600020905b81548152906001019060200180831161115a57829003601f168201915b505050505081565b60006001600160a01b0382166111e95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610bec565b506001600160a01b03166000908152600a602052604090205490565b61120d611635565b6112176000611c54565b565b611221611635565b600d8054911515600160c01b0260ff60c01b19909216919091179055565b6000606080828080836112737f43727970746f486f6d69657347656e65736973000000000000000000000000136015611ca6565b61129e7f31000000000000000000000000000000000000000000000000000000000000016016611ca6565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6112d0611635565b61121730610ce6565b6000600482815481106112ee576112ee613119565b6000918252602090912001546001600160a01b031692915050565b611311611635565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b61133b611635565b6014610f548282613059565b606060088054610ace90612e69565b610f54338383611d4a565b60008061136d60015490565b6113779047612f34565b90506113a2838261139d866001600160a01b031660009081526003602052604090205490565b611e18565b9392505050565b601754610100900460ff16156114015760405162461bcd60e51b815260206004820181905260248201527f43616e206f6e6c79206d696e74207468726f75676820616c6c6f77206c6973746044820152606401610bec565b610f548282611e53565b61141533836118c5565b6114315760405162461bcd60e51b8152600401610bec90612f47565b610f3a84848484612254565b6001600160a01b03821660009081526005602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa15801561149c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c0919061312f565b6114ca9190612f34565b6001600160a01b038086166000908152600660209081526040808320938816835292905220549091506115009084908390611e18565b949350505050565b6060611513826116df565b600061151d612287565b9050600081511161153d57604051806020016040528060008152506113a2565b8061154784612296565b604051602001611558929190613148565b6040516020818303038152906040529392505050565b611576611635565b600e55565b601480546110fe90612e69565b611590611635565b6001600160a01b0381166115f55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610bec565b6115fe81611c54565b50565b600060208351101561161d5761161683612329565b9050610ab9565b816116288482613059565b5060ff9050610ab9565b90565b600d546001600160a01b031633146112175760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bec565b60006001600160e01b031982166380ac58cd60e01b14806116c057506001600160e01b03198216635b5e139f60e01b145b80610ab957506301ffc9a760e01b6001600160e01b0319831614610ab9565b6000818152600960205260409020546001600160a01b03166115fe5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610bec565b6000818152600b6020526040902080546001600160a01b0319166001600160a01b038416908117909155819061177382611091565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b804710156117fc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610bec565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611849576040519150601f19603f3d011682016040523d82523d6000602084013e61184e565b606091505b5050905080610c8d5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610bec565b6000806118d183611091565b9050806001600160a01b0316846001600160a01b0316148061191857506001600160a01b038082166000908152600c602090815260408083209388168352929052205460ff165b806115005750836001600160a01b031661193184610b51565b6001600160a01b031614949350505050565b826001600160a01b031661195682611091565b6001600160a01b03161461197c5760405162461bcd60e51b8152600401610bec90613177565b6001600160a01b0382166119de5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610bec565b826001600160a01b03166119f182611091565b6001600160a01b031614611a175760405162461bcd60e51b8152600401610bec90613177565b6000818152600b6020908152604080832080546001600160a01b03199081169091556001600160a01b03878116808652600a8552838620805460001901905590871680865283862080546001019055868652600990945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600d54600090611ac390600160a01b900461ffff166001612e47565b600d54909150600160c01b900460ff16611b115760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b6044820152606401610bec565b600f5461ffff9081169082161115611b605760405162461bcd60e51b8152602060048201526012602482015271139bc81b5bdc99481a5d195b5cc81b19599d60721b6044820152606401610bec565b611b6e828261ffff16612367565b601954604051637de224b760e01b81526001600160a01b03848116600483015290911690637de224b7906024016020604051808303816000875af1158015611bba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bde9190612fee565b50600d805461ffff909216600160a01b0261ffff60a01b1990921691909117905550565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610c8d908490612381565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606060ff8314611cb95761161683612456565b818054611cc590612e69565b80601f0160208091040260200160405190810160405280929190818152602001828054611cf190612e69565b8015611d3e5780601f10611d1357610100808354040283529160200191611d3e565b820191906000526020600020905b815481529060010190602001808311611d2157829003601f168201915b50505050509050610ab9565b816001600160a01b0316836001600160a01b031603611dab5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610bec565b6001600160a01b038381166000818152600c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600080546001600160a01b038516825260026020526040822054839190611e3f9086612f94565b611e499190612fab565b61150091906131bc565b60018161ffff1610158015611e6d5750600a8161ffff1611155b611eb05760405162461bcd60e51b8152602060048201526014602482015273125b9d985b1a59081d1bdad95b88185b5bdd5b9d60621b6044820152606401610bec565b600d54600160c01b900460ff16611efb5760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b6044820152606401610bec565b600f54600d5461ffff91821691611f1c918491600160a01b90910416612e47565b61ffff161115611f665760405162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da081a5d195b5cc81b19599d605a1b6044820152606401610bec565b8061ffff16600e54611f789190612f94565b341015611fbf5760405162461bcd60e51b8152602060048201526015602482015274139bdd08195b9bdd59da08195d1a195c881cd95b9d605a1b6044820152606401610bec565b600d54600160b01b900461ffff1660009081526011602090815260408083206001600160a01b038616845290915290205460ff16156120405760405162461bcd60e51b815260206004820152601760248201527f557365722068617320616c7265616479206d696e7465640000000000000000006044820152606401610bec565b600060648261ffff16600e546120569190612f94565b6120609190612fab565b90506000818361ffff16600e546120779190612f94565b6120819190612f34565b9050803410156120ca5760405162461bcd60e51b8152602060048201526014602482015273125b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606401610bec565b6120e873a2b8e073ea72e4b1b29c0a4e383138abde571870836117ac565b60006120f482346131bc565b905060005b8461ffff168161ffff16101561220057600d54600090612125908390600160a01b900461ffff16612e47565b612130906001612e47565b9050612140878261ffff16612367565b601954604051637de224b760e01b81526001600160a01b03898116600483015290911690637de224b7906024016020604051808303816000875af115801561218c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b09190612fee565b5050600d5461ffff600160b01b9091041660009081526011602090815260408083206001600160a01b038a1684529091529020805460ff19166001179055806121f881612fcd565b9150506120f9565b5083600d60148282829054906101000a900461ffff166122209190612e47565b92506101000a81548161ffff021916908361ffff160217905550600081111561224d5761224d85826117ac565b5050505050565b61225f848484611943565b61226b84848484612495565b610f3a5760405162461bcd60e51b8152600401610bec906131cf565b606060108054610ace90612e69565b606060006122a383612596565b600101905060008167ffffffffffffffff8111156122c3576122c3612bc1565b6040519080825280601f01601f1916602001820160405280156122ed576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846122f757509392505050565b600080829050601f81511115612354578260405163305a27a960e01b8152600401610bec9190612a5f565b805161235f82613221565b179392505050565b610f5482826040518060200160405280600081525061266e565b60006123d6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166126a19092919063ffffffff16565b90508051600014806123f75750808060200190518101906123f79190612fee565b610c8d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610bec565b60606000612463836126b0565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b60006001600160a01b0384163b1561258b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906124d9903390899088908890600401613245565b6020604051808303816000875af1925050508015612514575060408051601f3d908101601f1916820190925261251191810190613282565b60015b612571573d808015612542576040519150601f19603f3d011682016040523d82523d6000602084013e612547565b606091505b5080516000036125695760405162461bcd60e51b8152600401610bec906131cf565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611500565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106125d55772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612601576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061261f57662386f26fc10000830492506010015b6305f5e1008310612637576305f5e100830492506008015b612710831061264b57612710830492506004015b6064831061265d576064830492506002015b600a8310610ab95760010192915050565b61267883836126d8565b6126856000848484612495565b610c8d5760405162461bcd60e51b8152600401610bec906131cf565b60606115008484600085612863565b600060ff8216601f811115610ab957604051632cd44ac360e21b815260040160405180910390fd5b6001600160a01b03821661272e5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610bec565b6000818152600960205260409020546001600160a01b0316156127935760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610bec565b6000818152600960205260409020546001600160a01b0316156127f85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610bec565b6001600160a01b0382166000818152600a6020908152604080832080546001019055848352600990915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060824710156128c45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610bec565b600080866001600160a01b031685876040516128e0919061329f565b60006040518083038185875af1925050503d806000811461291d576040519150601f19603f3d011682016040523d82523d6000602084013e612922565b606091505b50915091506129338783838761293e565b979650505050505050565b606083156129ad5782516000036129a6576001600160a01b0385163b6129a65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610bec565b5081611500565b61150083838151156129c25781518083602001fd5b8060405162461bcd60e51b8152600401610bec9190612a5f565b6001600160e01b0319811681146115fe57600080fd5b600060208284031215612a0457600080fd5b81356113a2816129dc565b60005b83811015612a2a578181015183820152602001612a12565b50506000910152565b60008151808452612a4b816020860160208601612a0f565b601f01601f19169290920160200192915050565b6020815260006113a26020830184612a33565b600060208284031215612a8457600080fd5b5035919050565b6001600160a01b03811681146115fe57600080fd5b60008060408385031215612ab357600080fd5b8235612abe81612a8b565b946020939093013593505050565b600060208284031215612ade57600080fd5b81356113a281612a8b565b80151581146115fe57600080fd5b600060208284031215612b0957600080fd5b81356113a281612ae9565b600080600060608486031215612b2957600080fd5b8335612b3481612a8b565b92506020840135612b4481612a8b565b929592945050506040919091013590565b60008060408385031215612b6857600080fd5b50508035926020909101359150565b803561ffff81168114612b8957600080fd5b919050565b60008060408385031215612ba157600080fd5b612baa83612b77565b9150612bb860208401612b77565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612bf257612bf2612bc1565b604051601f8501601f19908116603f01168101908282118183101715612c1a57612c1a612bc1565b81604052809350858152868686011115612c3357600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612c5f57600080fd5b813567ffffffffffffffff811115612c7657600080fd5b8201601f81018413612c8757600080fd5b61150084823560208401612bd7565b60008060408385031215612ca957600080fd5b8235612cb481612a8b565b91506020830135612cc481612a8b565b809150509250929050565b60ff60f81b881681526000602060e081840152612cef60e084018a612a33565b8381036040850152612d01818a612a33565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825283870192509083019060005b81811015612d5357835183529284019291840191600101612d37565b50909c9b505050505050505050505050565b60008060408385031215612d7857600080fd5b8235612d8381612a8b565b91506020830135612cc481612ae9565b60008060408385031215612da657600080fd5b8235612baa81612a8b565b60008060008060808587031215612dc757600080fd5b8435612dd281612a8b565b93506020850135612de281612a8b565b925060408501359150606085013567ffffffffffffffff811115612e0557600080fd5b8501601f81018713612e1657600080fd5b612e2587823560208401612bd7565b91505092959194509250565b634e487b7160e01b600052601160045260246000fd5b61ffff818116838216019080821115612e6257612e62612e31565b5092915050565b600181811c90821680612e7d57607f821691505b602082108103612e9d57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b80820180821115610ab957610ab9612e31565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b8082028115828204841417610ab957610ab9612e31565b600082612fc857634e487b7160e01b600052601260045260246000fd5b500490565b600061ffff808316818103612fe457612fe4612e31565b6001019392505050565b60006020828403121561300057600080fd5b81516113a281612ae9565b601f821115610c8d57600081815260208120601f850160051c810160208610156130325750805b601f850160051c820191505b818110156130515782815560010161303e565b505050505050565b815167ffffffffffffffff81111561307357613073612bc1565b613087816130818454612e69565b8461300b565b602080601f8311600181146130bc57600084156130a45750858301515b600019600386901b1c1916600185901b178555613051565b600085815260208120601f198616915b828110156130eb578886015182559484019460019091019084016130cc565b50858210156131095787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561314157600080fd5b5051919050565b6000835161315a818460208801612a0f565b83519083019061316e818360208801612a0f565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b81810381811115610ab957610ab9612e31565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b80516020808301519190811015612e9d5760001960209190910360031b1b16919050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061327890830184612a33565b9695505050505050565b60006020828403121561329457600080fd5b81516113a2816129dc565b600082516132b1818460208701612a0f565b919091019291505056fea26469706673582212206d951356009af1a2fdfd1e0a22bda21252c1bbf388f7446683b30ec3d204e28564736f6c63430008110033

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

000000000000000000000000000000000000000000000000000000000000008000000000000000000000000063620a51611cd692ae39b2824f661116b318c9e000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000000037697066733a2f2f516d544744465731364e79336a7a51314c4447444c674d434a504b4e4443623861317975424c55507047574336532f30000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000063620a51611cd692ae39b2824f661116b318c9e000000000000000000000000048cb797bbc50ad7896d737066bab7467446b975a0000000000000000000000008bbbef48e7e05c8d4027b88cb1b441e33ee20f3b000000000000000000000000244093984725ca5bfec6f97bb87b443e9addcb84000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000009d800000000000000000000000000000000000000000000000000000000000005dc00000000000000000000000000000000000000000000000000000000000005140000000000000000000000000000000000000000000000000000000000001248

-----Decoded View---------------
Arg [0] : _contractURI (string): ipfs://QmTGDFW16Ny3jzQ1LDGDLgMCJPKNDCb8a1yuBLUPpGWC6S/0
Arg [1] : _validSigner (address): 0x63620a51611cD692ae39B2824f661116b318C9e0
Arg [2] : _payees (address[]): 0x63620a51611cD692ae39B2824f661116b318C9e0,0x48cb797bbC50AD7896d737066BAb7467446B975A,0x8bBbEF48E7E05c8d4027b88CB1B441e33Ee20F3B,0x244093984725Ca5BfeC6F97bb87b443e9aDDCB84
Arg [3] : _shares (uint256[]): 2520,1500,1300,4680

-----Encoded View---------------
17 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000063620a51611cd692ae39b2824f661116b318c9e0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000037
Arg [5] : 697066733a2f2f516d544744465731364e79336a7a51314c4447444c674d434a
Arg [6] : 504b4e4443623861317975424c55507047574336532f30000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [8] : 00000000000000000000000063620a51611cd692ae39b2824f661116b318c9e0
Arg [9] : 00000000000000000000000048cb797bbc50ad7896d737066bab7467446b975a
Arg [10] : 0000000000000000000000008bbbef48e7e05c8d4027b88cb1b441e33ee20f3b
Arg [11] : 000000000000000000000000244093984725ca5bfec6f97bb87b443e9addcb84
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [13] : 00000000000000000000000000000000000000000000000000000000000009d8
Arg [14] : 00000000000000000000000000000000000000000000000000000000000005dc
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000514
Arg [16] : 0000000000000000000000000000000000000000000000000000000000001248


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.